:root {
    --bg: #eef3f7;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --border: #dbe4ee;
    --text: #14233b;
    --muted: #6c7c93;
    --navy: #31445f;
    --navy-hover: #26364d;
    --green-bg: #d8f3e5;
    --green-text: #0d7a4d;
    --red-bg: #fde2e2;
    --red-text: #b42318;
    --yellow-bg: #fbe9b8;
    --yellow-text: #b86a00;
    --blue-bg: #d8ebfb;
    --blue-text: #2a6ea8;
    --sick-bg: #f9e3a9;
    --sick-text: #b76a00;
    --shadow: 0 8px 24px rgba(20, 35, 59, 0.06);
    --radius: 18px;
    --radius-sm: 12px;
    --max-width: 1140px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.45;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

img {
    max-width: 100%;
    display: block;
}

/* page shell */

.page-shell {
    min-height: 100vh;
    background: var(--bg);
}

.page-main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 28px 24px 48px;
}

.page-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 22px;
}

.page-title {
    margin: 0;
    font-size: 2rem;
    line-height: 1.1;
    font-weight: 800;
    color: var(--text);
}

.page-subtitle {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 1rem;
}

.surface-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.section-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.section-card + .section-card {
    margin-top: 24px;
}

.section-head {
    padding: 20px 24px 14px;
    border-bottom: 1px solid #edf2f7;
}

.section-head h2,
.section-head h3 {
    margin: 0;
    font-size: 1.9rem;
    font-weight: 800;
}

.section-body {
    padding: 22px 24px 24px;
}

/* navbar */

.app-header {
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.app-header__inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 18px 24px 14px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}

.app-brand h1,
.app-brand h3 {
    margin: 0;
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
}

.app-brand p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 1rem;
}

.app-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.app-nav a,
.app-nav button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 14px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text);
    font-weight: 700;
    transition: 0.18s ease;
}

.app-nav a:hover,
.app-nav button:hover {
    background: #e9eff6;
}

.app-nav a.is-active {
    background: var(--navy);
    color: #fff;
}

.exit-form {
    margin: 0;
}

/* buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 14px;
    border: 0;
    font-weight: 800;
    transition: 0.18s ease;
}

.btn-primary {
    background: var(--navy);
    color: #fff;
}

.btn-primary:hover {
    background: var(--navy-hover);
}

.btn-success {
    background: #0d9c6f;
    color: #fff;
}

.btn-success:hover {
    background: #0b845e;
}

.btn-danger {
    background: #e11d48;
    color: #fff;
}

.btn-danger:hover {
    background: #be123c;
}

.btn-ghost {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-ghost:hover {
    background: #f8fbff;
}

/* badges */

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.93rem;
    font-weight: 800;
    white-space: nowrap;
}

.badge-pending {
    background: var(--yellow-bg);
    color: var(--yellow-text);
}

.badge-approved {
    background: var(--green-bg);
    color: var(--green-text);
}

.badge-rejected {
    background: var(--red-bg);
    color: var(--red-text);
}

/* forms */

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 700;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    border-radius: 12px;
    padding: 12px 14px;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: #9ab3cf;
    box-shadow: 0 0 0 4px rgba(49, 68, 95, 0.08);
}

.form-textarea {
    resize: vertical;
    min-height: 96px;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 18px;
}

/* home */

.hero-quote {
    max-width: var(--max-width);
    margin: 0 auto 28px;
    padding: 10px 18px;
    text-align: center;
    font-style: italic;
    color: var(--navy);
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(255,255,255,0.45);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.days-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 18px 16px;
    min-height: 150px;
}

.days-card h4 {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 1.2rem;
    font-weight: 500;
}

.days-card .days-number {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text);
}

.days-card .days-caption {
    margin-top: 12px;
    color: #a0aec0;
    font-size: 0.95rem;
    font-weight: 700;
}

.requests-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.requests-list li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 0;
    border-top: 1px solid #edf2f7;
}

.requests-list li:first-child {
    border-top: 0;
    padding-top: 0;
}

.request-meta {
    min-width: 0;
}

.request-type-line {
    font-size: 1.12rem;
    font-weight: 800;
    color: var(--text);
}

.request-dates {
    color: #6981a1;
    font-weight: 500;
    margin-left: 10px;
}

.request-note,
.request-substitute {
    margin-top: 6px;
    color: var(--muted);
}

.request-status {
    align-self: center;
}

/* approvals */

#requests-render {
    list-style: none;
    padding: 0;
    margin: 0;
    max-width: var(--max-width);
    width: 100%;
}

#requests-render > li,
.approval-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 20px;
    margin-bottom: 18px;
}

.approval-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 10px;
}

.approval-name {
    font-size: 1.55rem;
    font-weight: 800;
    margin: 0;
}

.approval-email {
    color: var(--muted);
    margin-top: 2px;
}

.approval-type {
    font-size: 1.3rem;
    font-weight: 500;
    color: #5d7597;
}

.approval-substitute {
    color: #7086a5;
    margin-top: 8px;
}

.approval-note-wrap {
    margin-top: 16px;
}

.approval-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

/* users */

.users-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
}

#users,
#absences {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

#users thead th,
#absences thead th {
    text-align: left;
    font-size: 1rem;
    font-weight: 700;
    color: #5f748f;
    padding: 18px 16px;
    background: #fff;
    border-bottom: 1px solid #edf2f7;
}

#users tbody td,
#absences tbody td {
    padding: 16px;
    vertical-align: middle;
    border-top: 1px solid #edf2f7;
}

#users tbody tr:first-child td,
#absences tbody tr:first-child td {
    border-top: 0;
}

.user-name {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text);
}

.user-email {
    margin-top: 4px;
    color: var(--muted);
}

.edit-icon-button {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.edit-icon-button:hover {
    background: #edf4fb;
}

/* calendar */

.calendar-layout {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
}

.calendar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px;
    border-bottom: 1px solid #edf2f7;
}

.calendar-header h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 800;
}

.calendar-header button {
    min-width: 54px;
    height: 42px;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 12px;
    font-weight: 800;
}

.calendar-header button:hover {
    background: #f7fbff;
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.calendar-table thead th {
    padding: 14px 8px;
    background: #fff;
    color: #5f748f;
    font-size: 1rem;
    font-weight: 700;
    border-bottom: 1px solid #edf2f7;
}

.calendar-day {
    height: 118px;
    vertical-align: top;
    padding: 10px 8px;
    border-top: 1px solid #edf2f7;
    border-right: 1px solid #edf2f7;
    background: #fff;
}

.calendar-table tbody tr td:last-child {
    border-right: 0;
}

.day-number {
    font-size: 0.96rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.absences {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.calendar-chip {
    display: block;
    width: 100%;
    padding: 4px 8px;
    border-radius: 7px;
    font-size: 0.88rem;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-chip.paid {
    background: var(--blue-bg);
    color: var(--blue-text);
}

.calendar-chip.sick {
    background: var(--sick-bg);
    color: var(--sick-text);
}

.calendar-chip.unpaid {
    background: #d7dde8;
    color: #607087;
}

.day-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-height: 90px;
}

.calendar-day-full-info {
    padding: 18px;
    color: var(--muted);
}

/* profile */

.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 40px;
}

.profile-item-label {
    color: var(--muted);
    margin-bottom: 6px;
}

.profile-item-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text);
}

#userSelect {
    width: 100%;
    max-width: 460px;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 14px;
    background: #fff;
    margin-bottom: 18px;
}

#upload-form {
    margin-top: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
}

#file-input {
    margin-bottom: 12px;
}

#file-list {
    list-style: none;
    padding: 0;
    margin: 12px 0 18px;
}

#file-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border-top: 1px solid #edf2f7;
}

#file-list li:first-child {
    border-top: 0;
}

/* modal */

#new-leave-request {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.38);
}

#new-leave-request .modal-card {
    width: min(560px, 100%);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(20, 35, 59, 0.18);
    padding: 24px;
}

#new-leave-request h3 {
    margin: 0 0 18px;
    font-size: 1.6rem;
    font-weight: 800;
}

/* utilities */

.stack-24 > * + * {
    margin-top: 24px;
}

.stack-18 > * + * {
    margin-top: 18px;
}

.hidden {
    display: none !important;
}

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .app-header__inner,
    .page-header-row,
    .users-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 768px) {
    .page-main {
        padding: 20px 14px 36px;
    }

    .stats-grid,
    .form-grid-2,
    .profile-grid {
        grid-template-columns: 1fr;
    }

    .requests-list li,
    .approval-header,
    .approval-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .calendar-day {
        height: 92px;
        padding: 8px 6px;
    }

    .calendar-chip {
        font-size: 0.78rem;
    }

    #users,
    #absences {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}
/* ===== ADDITIONS ONLY ===== */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.modal-title {
    margin: 0 0 18px;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
}

.modal-card-wide {
    width: min(680px, 100%);
}

#new-employee-form,
#edit-employee-form {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.38);
    overflow-y: auto;
}

#new-employee-form .modal-card,
#edit-employee-form .modal-card {
    width: min(680px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(20, 35, 59, 0.18);
    padding: 24px;
}

#new-employee-form[style*="display: block"],
#edit-employee-form[style*="display: block"],
#new-leave-request[style*="display: block"] {
    display: flex !important;
}

#new-leave-request .modal-card,
#new-employee-form .modal-card,
#edit-employee-form .modal-card {
    scrollbar-width: thin;
    scrollbar-color: #c5d2e0 transparent;
}

#new-leave-request .form-actions,
#new-employee-form .form-actions,
#edit-employee-form .form-actions {
    margin-top: 8px;
}

#new-employee-form .form-actions .btn,
#edit-employee-form .form-actions .btn,
#new-leave-request .form-actions .btn {
    min-width: 120px;
}

#new-employee-form .form-select,
#new-employee-form .form-input,
#new-employee-form .form-textarea,
#edit-employee-form .form-select,
#edit-employee-form .form-input,
#edit-employee-form .form-textarea {
    background: #fff;
}

@media (max-width: 768px) {
    .page-main {
        padding: 16px 12px 28px;
    }

    .page-header-row {
        gap: 12px;
        margin-bottom: 18px;
    }

    .page-title,
    .app-brand h1,
    .app-brand h3 {
        font-size: 1.55rem;
    }

    .page-subtitle,
    .app-brand p {
        font-size: 0.92rem;
    }

    .app-header__inner {
        padding: 14px 14px 12px;
        gap: 12px;
    }

    .section-head {
        padding: 16px 16px 12px;
    }

    .section-head h2,
    .section-head h3 {
        font-size: 1.45rem;
    }

    .section-body {
        padding: 16px;
    }

    .hero-quote {
        margin-bottom: 18px;
        padding: 10px 14px;
        font-size: 0.95rem;
    }

    .stats-grid {
        gap: 14px;
    }

    .days-card {
        min-height: 0;
        padding: 16px;
    }

    .days-card h4 {
        font-size: 1rem;
        margin-bottom: 10px;
    }

    .days-card .days-number {
        font-size: 1.9rem;
    }

    .requests-list li {
        padding: 14px 0;
    }

    .request-type-line {
        font-size: 1rem;
    }

    .approval-name {
        font-size: 1.2rem;
    }

    .approval-type {
        font-size: 1.05rem;
    }

    .calendar {
        overflow-x: auto;
    }

    .calendar-table {
        min-width: 680px;
    }

    .profile-item-value {
        font-size: 1.05rem;
    }

    #upload-form {
        padding: 16px;
    }

    #new-leave-request,
    #new-employee-form,
    #edit-employee-form {
        align-items: flex-end;
        padding: 0;
    }

    #new-leave-request .modal-card,
    #new-employee-form .modal-card,
    #edit-employee-form .modal-card {
        width: 100%;
        max-height: 90vh;
        border-radius: 22px 22px 0 0;
        padding: 18px 16px 16px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .form-actions {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .section-card,
    .surface-card,
    .days-card,
    .calendar,
    .day-panel,
    #upload-form,
    #users,
    #absences,
    .approval-card,
    #requests-render > li {
        border-radius: 16px;
    }

    .btn {
        min-height: 46px;
        padding: 0 16px;
    }

    .form-label {
        margin-bottom: 6px;
    }

    .form-input,
    .form-select,
    .form-textarea {
        padding: 11px 12px;
        border-radius: 10px;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-actions .btn {
        width: 100%;
    }
}
/* ===== AUTH PAGE ===== */

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: 0 20px 40px rgba(20, 35, 59, 0.12);
    padding: 28px 26px 24px;
}

.auth-title {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 800;
    text-align: center;
}

.auth-subtitle {
    margin: 8px 0 22px;
    text-align: center;
    color: var(--muted);
    font-size: 0.95rem;
}

.auth-btn {
    width: 100%;
    margin-top: 6px;
    height: 48px;
}

.auth-footer {
    margin-top: 18px;
    text-align: center;
    color: var(--muted);
    font-size: 0.92rem;
}

/* mobile tweak */
@media (max-width: 480px) {
    .auth-card {
        padding: 22px 18px;
        border-radius: 18px;
    }

    .auth-title {
        font-size: 1.35rem;
    }
}
.error-message {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 6px;
    font-size: 16px;
    display: flex;
    justify-content: center;
}
.approval-name {
    font-size: 1.25rem; /* беше 1.55 */
}

.approval-email {
    font-size: 0.9rem;
}

.approval-type {
    font-size: 1rem; /* беше 1.3 */
    margin-top: 6px;
}

.approval-substitute,
.request-note {
    font-size: 0.92rem;
}

.form-label {
    font-size: 0.9rem;
}

.form-input {
    padding: 10px 12px;
    font-size: 0.95rem;
}

.btn {
    min-height: 42px;
    padding: 0 16px;
    font-size: 0.95rem;
}

.badge {
    font-size: 0.85rem;
    padding: 0 10px;
}
.upload-card {
    overflow: hidden;
}

.section-subtitle {
    margin: 6px 0 0;
    font-size: 14px;
    color: #64748b;
}

.upload-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#file-input {
    display: none;
}

.upload-dropzone {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px 20px;
    border: 1.5px dashed #cbd5e1;
    border-radius: 16px;
    background: #f8fafc;
    cursor: pointer;
    transition: 0.2s ease;
}

.upload-dropzone:hover {
    border-color: #94a3b8;
    background: #f1f5f9;
}

.upload-dropzone-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.upload-dropzone-text {
    font-size: 14px;
    color: #64748b;
}

.file-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.file-list:empty {
    display: none;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
}

.file-item-name {
    min-width: 0;
    flex: 1;
    font-size: 14px;
    color: #0f172a;
    word-break: break-word;
}

.file-remove-btn {
    flex-shrink: 0;
    border: 1px solid #fecaca;
    background: #fff1f2;
    color: #be123c;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.file-remove-btn:hover {
    background: #ffe4e6;
    border-color: #fda4af;
}

.upload-actions {
    display: flex;
    justify-content: flex-start;
    padding-top: 4px;
}

#upload-button {
    min-width: 120px;
}

#upload-button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}
.upload-message {
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.45;
    border: 1px solid transparent;
}

.upload-message.error {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #be123c;
}

.upload-message.success {
    background: #ecfdf3;
    border-color: #bbf7d0;
    color: #166534;
}
.calendar-day {
    position: relative;
    min-height: 118px;
    padding: 10px 10px 8px;
    border: 1px solid #dbe4ee;
    background: #ffffff;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.calendar-day:hover {
    background: #f8fbff;
}

.calendar-day.current-month {
    background: #ffffff;
}

.calendar-day.other-month {
    background: #f4f7fb;
}

.calendar-day.weekend {
    background: #faf6f2;
}

.calendar-day.other-month.weekend {
    background: #f3eeea;
}

.calendar-day.holiday {
    background: #fff2f2;
}

.calendar-day.weekend.holiday {
    background: #fdeaea;
}

/* active трябва да е най-отгоре */
.calendar-day.active-date {
    border-color: #4f83d1;
    box-shadow: inset 0 0 0 1px #4f83d1;
}

/* ако active е върху other-month/weekend/holiday, не им троши фона */
.calendar-day.other-month.active-date {
    background: #edf4ff;
}

.calendar-day.weekend.active-date {
    background: #f3f8ff;
}

.calendar-day.holiday.active-date {
    background: #ffeef0;
}

.calendar-day.weekend.holiday.active-date {
    background: #fdecef;
}

.day-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    margin-bottom: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #16335b;
    border-radius: 999px;
}

/* other month number */
.calendar-day.other-month .day-number {
    color: #9aa8bb;
}

/* holiday number */
.calendar-day.holiday .day-number {
    color: #b42318;
}

/* today = само кръгче около числото */
.calendar-day.today .day-number {
    background: #dbeafe;
    color: #1d4ed8;
}

/* active бие today */
.calendar-day.active-date .day-number {
    background: #4f83d1;
    color: #ffffff;
}

/* ако е other-month + active, пак да си е ясно */
.calendar-day.other-month.active-date .day-number {
    background: #4f83d1;
    color: #ffffff;
}

.absences {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
}

.absence {
    padding: 3px 7px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.absence-paid {
    background: #dbeafe;
    color: #1e40af;
    border-left: 3px solid #3b82f6;
}

.absence-sick {
    background: #fee2e2;
    color: #b91c1c;
    border-left: 3px solid #ef4444;
}

.absence-unpaid {
    background: #ede9fe;
    color: #6d28d9;
    border-left: 3px solid #8b5cf6;
}

.absence.more {
    background: #eef2f7;
    color: #526174;
    border-left: 3px solid #94a3b8;
}
.success-message {
    background: #ecfee2;
    color: #3f7a17;
    border: 1px solid #d6feca;
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 6px;
    font-size: 16px;
    display: flex;
    justify-content: center;
}
.form-anchor {
    display: inline-block;
    margin-top: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--navy);
    text-decoration: none;
}

.form-anchor:hover {
    color: var(--navy-hover);
    text-decoration: underline;
}
.absence.pending {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;

    background: var(--yellow-bg);
    color: var(--yellow-text);

    font-size: 11px;
    font-weight: 600;

    line-height: 1.4;
    white-space: nowrap;
}
.calendar-legend {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 12px 0 20px;
    font-size: 13px;
    color: var(--text);
    background-color: var(--bg);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.legend-dot.holiday {
    background: #b42318;
    opacity: 0.75;
    box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.15);
}

.legend-text {
    font-weight: 500;
}
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
}

.pagination button {
    min-width: 32px;
    height: 32px;
    padding: 0 10px;

    border: 1px solid #dbe4ee;
    background: #ffffff;
    color: #31445f;

    border-radius: 8px;
    cursor: pointer;

    font-size: 13px;
    font-weight: 500;

    transition: all 0.15s ease;
}

.pagination button:hover:not(:disabled) {
    background: #f4f7fb;
    border-color: #c7d3e3;
}

.pagination button.active-page {
    background: #31445f;
    color: white;
    border-color: #31445f;
}

.pagination button:disabled {
    opacity: 0.6;
    cursor: default;
}

.pagination button:first-child,
.pagination button:last-child {
    padding: 0 12px;
}
.delete-confirmation-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.38);
}

.delete-confirmation-modal .modal-card {
    width: min(520px, 100%);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(20, 35, 59, 0.18);
    padding: 24px;
}

.delete-confirmation-text {
    margin: 0;
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
}

.delete-confirmation-warning {
    margin: 8px 0 0;
    color: var(--red-text);
    font-size: 0.95rem;
}
@media(min-width: 1024px){
    .delete-button {
        margin-right: auto;
    }
}
.nav-toggle {
    display: none;
}

@media (max-width: 768px) {
    .app-header__inner {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 40px;
        padding: 0 14px;
        border: 1px solid var(--border);
        border-radius: 12px;
        background: var(--surface);
        color: var(--text);
        font-weight: 800;
    }

    .app-nav {
        display: none !important;
    }

    .app-nav.open {
        display: flex !important;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        width: 100%;
        margin-top: 0;
        padding: 8px;
        border: 1px solid var(--border);
        border-radius: 14px;
        background: var(--surface);
    }

    .app-nav.open a,
    .app-nav.open button {
        width: 100%;
        min-height: 40px;
        justify-content: flex-start;
        padding: 0 12px;
    }

    .app-nav.open form,
    .exit-form {
        width: 100%;
        margin: 0;
    }
}