:root {
    --app-primary: #4F46E5;
    --app-primary-dark: #3730A3;
    --app-primary-light: #6C63FF;
    --app-bg: #F5F3FF;
    --app-surface: #ffffff;
    --app-muted: #6b7280;
    --app-border: #e5e7eb;
}

html {
    font-size: 14px;
    height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    background-color: var(--app-bg);
    color: #1e1b4b;
}

body > .container {
    flex: 1;
}

/* Navbar */
.app-navbar {
    background-color: var(--app-surface);
    border-bottom: 1px solid var(--app-border);
    box-shadow: 0 1px 3px rgba(79, 70, 229, 0.08);
    padding-top: 0;
    padding-bottom: 0;
    min-height: 56px;
}

.app-navbar__logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--app-primary) !important;
    letter-spacing: -0.02em;
    text-decoration: none;
    padding: 0.9rem 0;
}

.app-navbar__logo:hover {
    color: var(--app-primary-dark) !important;
}

.app-navbar__logo-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--app-primary);
    flex-shrink: 0;
}

.app-navbar__link {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--app-muted) !important;
    text-decoration: none;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.app-navbar__link:hover {
    background: var(--app-bg);
    color: var(--app-primary) !important;
}

.app-navbar__link.active {
    background: rgba(79, 70, 229, 0.08);
    color: var(--app-primary) !important;
    font-weight: 600;
}

.app-navbar__bell {
    padding: 0.35rem 0.5rem;
}

.app-navbar__badge {
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(40%, -40%);
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1;
    padding: 2px 5px;
    border-radius: 999px;
    min-width: 16px;
    text-align: center;
}

.app-navbar__divider {
    width: 1px;
    height: 20px;
    background: var(--app-border);
    margin: 0 0.25rem;
}

.app-navbar__logout {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--app-muted);
    background: none;
    border: none;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.app-navbar__logout:hover {
    background: #fef2f2;
    color: #ef4444;
}

/* Footer */
.app-footer {
    background-color: var(--app-surface);
    border-top: 1px solid var(--app-border);
    color: var(--app-muted);
    font-size: 0.85rem;
    padding: 1rem 0;
    margin-top: auto;
}

/* Focus ring */
.btn:focus, .btn:active:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(79, 70, 229, 0.4);
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ── CalendarMonthTable ─────────────────────────────────────────────────── */
.monthly-report {
    max-width: 1000px;
    margin: 1.5rem auto;
    font-family: Arial, sans-serif;
    color: #000;
}

.monthly-report__title {
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

/* Info table */
.monthly-report__info-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.monthly-report__info-table td {
    border: 1px solid #000;
    padding: 4px 8px;
    font-size: 0.85rem;
}

.monthly-report__info-table .info-personal-no {
    width: 40%;
}

/* Main table */
.monthly-report__main-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 0.78rem;
}

.monthly-report__main-table th,
.monthly-report__main-table td {
    border: 1px solid #000;
    padding: 2px 3px;
    vertical-align: middle;
    text-align: center;
}

/* Column widths */
.monthly-report__main-table .col-date        { width: 38px; }
.monthly-report__main-table .col-work-time   { width: 100px; }
.monthly-report__main-table .col-break       { width: 44px; }
.monthly-report__main-table .col-count-small { width: 32px; }
.monthly-report__main-table .col-count-mid   { width: 56px; }

/* Legend */
.monthly-report__main-table .legend-cell {
    background-color: #c8c8c8;
    text-align: left;
    padding: 3px 8px;
    font-size: 0.77rem;
}

/* Header cells */
.monthly-report__main-table .th-group,
.monthly-report__main-table .th-datum,
.monthly-report__main-table .th-header,
.monthly-report__main-table .th-sub {
    background-color: #e0e0e0;
}

.monthly-report__main-table .th-group {
    font-weight: bold;
    font-size: 0.8rem;
}

.monthly-report__main-table .th-datum,
.monthly-report__main-table .th-header {
    font-weight: bold;
    font-size: 0.78rem;
}

.monthly-report__main-table .th-sub {
    font-size: 0.72rem;
    line-height: 1.2;
    font-weight: normal;
}

.monthly-report__main-table .th-bold {
    font-weight: bold;
}

/* Day rows */
.monthly-report__main-table .day-row td {
    height: 22px;
}

.monthly-report__main-table .td-date {
    text-align: left;
    padding-left: 4px;
    font-size: 0.78rem;
}

/* Total row */
.monthly-report__main-table .total-row td {
    padding: 4px 6px;
    font-size: 0.8rem;
    text-align: center;
}

.monthly-report__main-table .total-row td:first-child {
    text-align: left;
}

/* Footer */
.monthly-report__footer {
    margin-top: 1rem;
    font-size: 0.88rem;
    color: #000;
}

.monthly-report__footer .footer-date {
    margin-bottom: 0.5rem;
}

.monthly-report__footer .footer-signatures {
    display: flex;
    margin-top: 1rem;
}

.monthly-report__footer .footer-signatures span:first-child {
    flex: 1;
}

.monthly-report__footer .footer-signatures span:last-child {
    flex: 1;
}

/* ── WorkingTime editor table (Create / Edit / Preview) ─────────────────── */
.working-time {
    max-width: 820px;
    font-family: Arial, sans-serif;
    color: #000;
}

.wt-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 0.85rem;
}

.wt-table th,
.wt-table td {
    border: 1px solid #000;
    padding: 4px 6px;
    vertical-align: middle;
    text-align: center;
}

/* Column widths */
.col-day     { width: 44px; }
.col-empty   { width: 28px; }
.col-prima   { width: 220px; }
.col-prestav { width: 160px; }
.col-neprima { width: 160px; }

/* Column headers */
.wt-header-row th {
    font-weight: bold;
    font-size: 0.78rem;
    line-height: 1.3;
    padding: 6px 4px;
}

.th-prima {
    background-color: #92d050;
    font-weight: bold;
}

.th-normal {
    background-color: #fff;
}

.th-day,
.th-empty {
    background-color: #fff;
}

/* Day rows */
.wt-day-row td {
    height: 44px;
}

.td-day {
    font-weight: bold;
    font-size: 0.9rem;
}

.td-prima {
    background-color: #e2efda;
}

.td-normal {
    background-color: #fff;
}

/* Time inputs inside cells */
.wt-input {
    width: 52px;
    border: 1px solid #bbb;
    border-radius: 3px;
    background: #fff;
    font-size: 0.82rem;
    text-align: center;
    padding: 2px 3px;
    outline: none;
    font-family: monospace;
    letter-spacing: 0.03em;
}

.wt-input:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.15);
}

.wt-input::placeholder {
    color: #bbb;
    letter-spacing: 0;
}

.wt-sep {
    font-size: 0.8rem;
    color: #555;
    margin: 0 1px;
}

/* Copy-down hint */
.copy-hint {
    font-size: 0.8rem;
    color: #555;
    margin-bottom: 1rem;
}

.copy-hint__icon {
    color: #0d6efd;
    margin-right: 4px;
}

/* Copy-down footer row */
.wt-copy-row td {
    border-top: 2px solid #000;
    padding: 4px;
    text-align: center;
    background: #f8f9fa;
}

.btn-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
    line-height: 1;
    background: #0d6efd;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
    transition: background 0.15s;
}

.btn-copy:hover {
    background: #0b5ed7;
}

/* Slot sections */
.slot-section {
    margin-bottom: 2rem;
}

.slot-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #333;
}

/* ── Admin calendar print ───────────────────────────────────────────────── */
@page { margin: 10mm 8mm; size: A4 landscape; }

@media print {
    header,
    footer,
    .cal-nav,
    .alert {
        display: none !important;
    }

    body {
        background: #fff !important;
    }
}
