body {
    margin: 0;
    padding: 0;
    font-family: Tahoma, Verdana, Arial, sans-serif;
    font-size: 12px;
    color: #000;
    background-color: #fff;
}

a {
    color: #003399;
    text-decoration: underline;
}

a:hover {
    color: #cc0000;
}

#header {
    background-color: #d6e8f0;
    border-bottom: 1px solid #8aa8bc;
    padding: 12px 20px;
}

#header h1 {
    margin: 0;
    font-size: 18px;
    color: #1a3d52;
    font-weight: bold;
}

#header p.subtitle {
    margin: 4px 0 0 0;
    font-size: 11px;
    color: #4a6b7e;
}

/* ── Left sidebar layout ─────────────────────────────── */

#page-wrap {
    display: flex;
    min-height: calc(100vh - 50px);
}

#sidebar {
    width: 130px;
    background-color: #e8f2f7;
    border-right: 1px solid #c5d9e4;
    padding-top: 6px;
    flex-shrink: 0;
}

#sidebar a {
    display: block;
    padding: 6px 10px;
    margin-bottom: 2px;
    text-decoration: none;
    color: #003399;
    font-size: 12px;
    white-space: nowrap;
}

#sidebar a:hover,
#sidebar a.active {
    background-color: #d0e4f0;
    color: #cc0000;
}

#main-area {
    flex: 1;
    min-width: 0;
}

#content {
    max-width: 780px;
    margin: 24px auto;
    padding: 0 20px;
}

#footer {
    border-top: 1px solid #c5d9e4;
    background-color: #f0f6fa;
    padding: 10px 20px;
    text-align: center;
    font-size: 11px;
    color: #7a8a96;
}

h2 {
    font-size: 15px;
    color: #1a3d52;
    border-bottom: 1px solid #c5d9e4;
    padding-bottom: 4px;
    margin: 0 0 12px 0;
}

h3 {
    font-size: 13px;
    color: #2a5a78;
    margin: 16px 0 8px 0;
}

p, ul, ol {
    line-height: 1.6;
    margin: 8px 0;
}

ul {
    padding-left: 24px;
}

table.info {
    border-collapse: collapse;
    width: 100%;
    margin: 12px 0;
}

table.info th,
table.info td {
    border: 1px solid #a0b8c8;
    padding: 6px 10px;
    text-align: left;
    vertical-align: top;
}

table.info th {
    background-color: #e4f0f7;
    font-weight: bold;
    color: #1a3d52;
    width: 160px;
}

input[type="text"],
input[type="email"],
textarea,
select {
    font-family: Tahoma, Verdana, Arial, sans-serif;
    font-size: 12px;
    padding: 4px 6px;
    border: 1px solid #8aa0b0;
    margin: 3px 0;
}

textarea {
    width: 95%;
    height: 120px;
    resize: vertical;
}

input[type="submit"],
button.btn {
    font-family: Tahoma, Verdana, Arial, sans-serif;
    font-size: 12px;
    padding: 5px 16px;
    background-color: #e8f0f5;
    border: 1px solid #8aa0b0;
    color: #003399;
    cursor: pointer;
}

input[type="submit"]:hover,
button.btn:hover {
    background-color: #d0e4f0;
    border-color: #5a7a8c;
}

.note-box {
    background-color: #ffffee;
    border: 1px solid #ccbb66;
    padding: 10px 14px;
    margin: 12px 0;
    font-size: 12px;
    color: #5a4a00;
}

.warning-box {
    background-color: #fee;
    border: 1px solid #c88;
    padding: 10px 14px;
    margin: 12px 0;
    font-size: 12px;
    color: #833;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* ── Task blocks ─────────────────────────────────────── */

.task-section table {
    border-collapse: collapse;
    width: 100%;
    margin: 6px 0 14px 0;
}

.task-section td {
    border: 1px solid #c8dce8;
    padding: 5px 8px;
    vertical-align: top;
    font-size: 12px;
    min-width: 200px;
    width: 33%;
}

.task-section td.done-col {
    text-decoration: line-through;
    color: #888;
    background-color: #f5f9fa;
}

.task-section .task-item {
    margin-bottom: 4px;
}

/* ── Admin login overlay ─────────────────────────────── */

.admin-login-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #d6e8f0ee;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.admin-login-box {
    background: #fff;
    border: 2px solid #8aa8bc;
    padding: 24px;
    width: 300px;
    text-align: center;
}

.admin-login-box h3 {
    margin-top: 0;
    color: #1a3d52;
}

/* ── Admin task table ────────────────────────────────── */

.task-edit-table {
    border-collapse: collapse;
    width: 100%;
    margin: 8px 0;
}

.task-edit-table th,
.task-edit-table td {
    border: 1px solid #c8dce8;
    padding: 4px 6px;
    text-align: left;
    vertical-align: top;
    font-size: 12px;
}

.task-edit-table th {
    background-color: #e4f0f7;
    width: 80px;
}

.task-edit-table .priority-Важно {
    color: #cc0000;
    font-weight: bold;
}

.task-edit-table .priority-Средне {
    color: #bbaa00;
    font-weight: bold;
}

.task-edit-table input[type="text"] {
    width: 98%;
}

.admin-toolbar {
    padding: 10px 20px;
    background-color: #f5fafc;
    border-bottom: 1px solid #c5d9e4;
}

/* ── Responsive / mobile ─────────────────────────────── */

@media (max-width: 640px) {
    body {
        font-size: 13px;
    }

    #header {
        padding: 10px 12px;
    }

    #header h1 {
        font-size: 16px;
    }

    /* Stack sidebar on top for mobile */
    #page-wrap {
        flex-direction: column;
    }

    #sidebar {
        width: auto;
        border-right: none;
        border-bottom: 1px solid #c5d9e4;
        padding-top: 0;
        overflow-x: hidden;
    }

    #sidebar a {
        display: inline-block;
        margin: 2px 6px;
        padding: 4px 8px;
        white-space: normal;
    }

    #content {
        margin: 16px auto;
        padding: 0 12px;
    }

    table.info th,
    table.info td {
        display: block;
        width: 100%;
    }

    table.info th {
        background-color: #f5fafc;
    }

    textarea {
        width: 92%;
    }

    .task-section td {
        min-width: auto;
        display: block;
        width: 100%;
        border-bottom: none;
    }

    .task-section td::after {
        content: "";
        display: block;
        border-top: 1px solid #c8dce8;
        margin-top: 4px;
    }
}
