/* ============================================
   WINDOWS XP RETRO STYLE LOGBUCH
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #0a7fb0 0%, #0f5f8f 100%);
    font-family: Tahoma, Arial, sans-serif;
    font-size: 13px;
    color: #000;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.desktop {
    width: 100%;
    max-width: 900px;
}

/* ============================================
   WINDOW STYLING
   ============================================ */

.window {
    background: #e0e0e0;
    border: 2px solid;
    border-color: #dfdfdf #808080 #808080 #dfdfdf;
    box-shadow: 1px 1px 0 #ffffff inset, 2px 2px 0 #dfdfdf inset, 1px 1px 0 #000000;
}

/* Titlebar */
.titlebar {
    background: linear-gradient(90deg, #0a7fb0 0%, #0f5f8f 100%);
    color: white;
    padding: 2px 2px 2px 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 24px;
    font-weight: bold;
    font-size: 11px;
}

.titlebar-text {
    flex-grow: 1;
}

.titlebar-controls {
    display: flex;
    gap: 2px;
}

.titlebar-button {
    width: 18px;
    height: 18px;
    background: #e0e0e0;
    border: 2px solid;
    border-color: #ffffff #0a0a0a #0a0a0a #ffffff;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-weight: bold;
    padding: 0;
}

.titlebar-button:active {
    border-color: #0a0a0a #ffffff #ffffff #0a0a0a;
}

.titlebar-button.close:hover {
    background: #c00000;
    color: white;
}

/* Window Body */
.window-body {
    background: #e0e0e0;
}

/* Menu Bar */
.menu-bar {
    display: flex;
    background: #e0e0e0;
    border-bottom: 2px solid;
    border-color: #dfdfdf #808080 #808080 #dfdfdf;
    padding: 4px;
    gap: 6px;
}

.menu-item {
    padding: 4px 12px;
    cursor: pointer;
    border: 2px solid transparent;
    font-size: 12px;
}

.menu-item:hover {
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
}

.menu-item:active {
    border-color: #808080 #ffffff #ffffff #808080;
}

/* Toolbar */
.toolbar {
    background: #e0e0e0;
    border-bottom: 2px solid;
    border-color: #dfdfdf #808080 #808080 #dfdfdf;
    padding: 6px;
    display: flex;
    gap: 4px;
}

.toolbar-button {
    background: #e0e0e0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    padding: 4px 12px;
    font-family: Tahoma, Arial, sans-serif;
    font-size: 11px;
    cursor: pointer;
    user-select: none;
}

.toolbar-button:hover {
    border-color: #dfdfdf #606060 #606060 #dfdfdf;
}

.toolbar-button:active {
    border-color: #808080 #ffffff #ffffff #808080;
    padding: 4px 7px 2px 9px;
}

/* Content Area */
.content {
    padding: 16px;
    background: #e0e0e0;
    min-height: 400px;
}

.content h1 {
    font-size: 18px;
    margin-bottom: 16px;
    color: #000080;
}

/* Entries Container */
.entries-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.loading {
    padding: 30px;
    text-align: center;
    color: #666;
    font-style: italic;
    font-size: 13px;
}

/* Entry Card */
.entry {
    background: #e0e0e0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    padding: 12px;
    padding-right: 120px;
    position: relative;
    overflow: hidden;
}

.entry-stamp {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 15px;
    font-weight: bold;
    border: 2px solid;
    padding: 4px 8px;
    transform: rotate(-20deg);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.entry-stamp.angenommen {
    color: #00a000;
    border-color: #00a000;
}

.entry-stamp.abgelehnt {
    color: #c00000;
    border-color: #c00000;
}

.entry-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 8px;
}

.entry-title {
    font-weight: bold;
    color: #000080;
    font-size: 14px;
    margin-bottom: 4px;
}

.entry-date {
    color: #666;
    font-size: 11px;
    font-style: italic;
}

.entry-text {
    color: #000;
    line-height: 1.5;
    font-size: 12px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.no-entries {
    padding: 30px;
    text-align: center;
    color: #666;
    font-style: italic;
    font-size: 13px;
}

/* Statusbar */
.statusbar {
    background: #e0e0e0;
    border-top: 2px solid;
    border-color: #dfdfdf #808080 #808080 #dfdfdf;
    padding: 2px 2px;
    font-size: 11px;
    color: #000;
    height: 22px;
    display: flex;
    align-items: center;
    padding-left: 4px;
}

/* ============================================
   MODALS & DIALOGS
   ============================================ */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

/* Color Picker Modal */
.modal-content {
    background: #e0e0e0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    box-shadow: 1px 1px 0 #ffffff inset, 2px 2px 0 #dfdfdf inset, 1px 1px 0 #000000;
    padding: 12px;
    min-width: 300px;
}

.modal-title {
    font-weight: bold;
    color: #000080;
    margin-bottom: 12px;
    font-size: 12px;
}

.color-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.color-btn {
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    height: 60px;
    cursor: pointer;
    font-weight: bold;
    color: transparent;
    font-size: 0;
}

.color-btn:hover {
    border-color: #dfdfdf #606060 #606060 #dfdfdf;
}

.color-btn:active {
    border-color: #808080 #ffffff #ffffff #808080;
}

/* Error Dialog */
.error-dialog {
    background: #e0e0e0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    box-shadow: 1px 1px 0 #ffffff inset, 2px 2px 0 #dfdfdf inset, 1px 1px 0 #000000;
    min-width: 280px;
}

.error-titlebar {
    background: linear-gradient(90deg, #c00000 0%, #800000 100%);
    color: white;
    padding: 2px 4px;
    font-weight: bold;
    font-size: 11px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 20px;
}

.error-content {
    padding: 12px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.error-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.error-text {
    font-size: 11px;
    color: #000;
}

.error-buttons {
    padding: 8px 12px;
    border-top: 1px solid #dfdfdf;
    display: flex;
    justify-content: flex-end;
}

.error-button {
    background: #e0e0e0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    padding: 3px 12px;
    font-family: Tahoma, Arial, sans-serif;
    font-size: 10px;
    cursor: pointer;
    min-width: 50px;
}

.error-button:hover {
    border-color: #dfdfdf #606060 #606060 #dfdfdf;
}

.error-button:active {
    border-color: #808080 #ffffff #ffffff #808080;
}

/* ============================================
   DARK MODE
   ============================================ */

body.dark-mode {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
}

body.dark-mode .window {
    background: #3a3a3a;
}

body.dark-mode .titlebar {
    background: linear-gradient(90deg, #1a1a1a 0%, #0a0a0a 100%);
}

body.dark-mode .window-body {
    background: #3a3a3a;
}

body.dark-mode .menu-bar {
    background: #3a3a3a;
    border-color: #4a4a4a #2a2a2a #2a2a2a #4a4a4a;
}

body.dark-mode .menu-item {
    color: #e0e0e0;
}

body.dark-mode .menu-item:hover {
    background: #4a4a4a;
}

body.dark-mode .toolbar {
    background: #3a3a3a;
    border-color: #4a4a4a #2a2a2a #2a2a2a #4a4a4a;
}

body.dark-mode .toolbar-button {
    background: #3a3a3a;
    border-color: #5a5a5a #1a1a1a #1a1a1a #5a5a5a;
    color: #e0e0e0;
}

body.dark-mode .toolbar-button:hover {
    border-color: #6a6a6a #0a0a0a #0a0a0a #6a6a6a;
}

body.dark-mode .content {
    background: #3a3a3a;
    color: #e0e0e0;
}

body.dark-mode .content h1 {
    color: #88ccff;
}

body.dark-mode .entry {
    background: #3a3a3a;
    border-color: #5a5a5a #1a1a1a #1a1a1a #5a5a5a;
}

body.dark-mode .entry-title {
    color: #88ccff;
}

body.dark-mode .entry-date {
    color: #aaa;
}

body.dark-mode .entry-text {
    color: #e0e0e0;
}

body.dark-mode .statusbar {
    background: #3a3a3a;
    border-color: #4a4a4a #2a2a2a #2a2a2a #4a4a4a;
    color: #e0e0e0;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 600px) {
    .window {
        max-width: 100%;
    }

    .content {
        min-height: auto;
    }

    .entry-title {
        font-size: 11px;
    }

    .entry-text {
        font-size: 10px;
    }
}