* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #5865F2;
    --secondary-color: #4F545C;
    --success-color: #23A55A;
    --danger-color: #F23F42;
    --warning-color: #F0B232;
    --bg-color: #F7F8FA;
    --card-bg: #FFFFFF;
    --text-color: #2C2F33;
    --border-color: #E3E5E8;
}

[data-theme="dark"] {
    --bg-color: #1e1e2e;
    --card-bg: #2d2d3d;
    --text-color: #e4e4e7;
    --border-color: #3f3f50;
    --secondary-color: #a1a1aa;
}

[data-theme="dark"] .navbar {
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

[data-theme="dark"] .login-container,
[data-theme="dark"] .admin-card,
[data-theme="dark"] .status-card,
[data-theme="dark"] .reviewer-dashboard-card {
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

[data-theme="dark"] .declined-timesheet-card {
    background: #3d2a2a;
    border-color: #f87171;
}

[data-theme="dark"] .declined-notice,
[data-theme="dark"] .report-late-section {
    background: #3d3520;
    border-color: #facc15;
}

[data-theme="dark"] .bulk-fill-bar {
    background: #2d2d3d;
}

[data-theme="dark"] .toast-container .error-message {
    background: #7f1d1d;
    border-color: #dc2626;
}

[data-theme="dark"] .toast-container .success-message {
    background: #14532d;
    border-color: #22c55e;
}

[data-theme="dark"] .data-table {
    background: var(--card-bg);
}

[data-theme="dark"] .data-table th,
[data-theme="dark"] .data-table td {
    border-color: var(--border-color);
}

[data-theme="dark"] .timesheet-table th,
[data-theme="dark"] .timesheet-table td {
    border-color: var(--border-color);
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .filter-input,
[data-theme="dark"] .filter-select {
    background: #252535;
    border-color: var(--border-color);
    color: var(--text-color);
}

[data-theme="dark"] .spinner {
    border-color: var(--border-color);
    border-top-color: var(--primary-color);
}

[data-theme="dark"] .modal-overlay + div,
[data-theme="dark"] .modal-content,
[data-theme="dark"] [style*="background: white"] {
    background: var(--card-bg) !important;
    color: var(--text-color);
}

[data-theme="dark"] .muted {
    color: var(--secondary-color);
}

/* Dark mode toggle button */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 6px;
    color: var(--text-color);
}

.theme-toggle:hover {
    background: var(--bg-color);
}

[data-theme="dark"] .theme-toggle:hover {
    background: #3f3f50;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.navbar {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Full-width nav for admins/reviewers (more menu items) */
.navbar.navbar-wide .nav-container {
    max-width: none;
    width: 100%;
    padding: 0 1.5rem;
}

.navbar.navbar-wide .nav-menu {
    gap: 0.35rem;
    flex-wrap: nowrap;
}

.navbar.navbar-wide .nav-link {
    padding: 0.5rem 0.65rem;
    white-space: nowrap;
}

.navbar.navbar-wide .nav-brand {
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: bold;
    font-size: 1.2rem;
}

.logo {
    width: 32px;
    height: 32px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    border-radius: 4px;
}
.nav-toggle:hover {
    background: var(--bg-color);
}
.nav-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-menu {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.nav-link:hover {
    background: var(--bg-color);
}

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Full-width admin user management table */
.main-content:has(.admin-users-panel) {
    max-width: none;
    width: 100%;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.admin-users-panel {
    width: 100%;
}

.admin-users-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.admin-users-header h3 {
    margin: 0;
}

.admin-users-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.admin-sync-msg {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    font-size: 0.95rem;
}

.admin-sync-msg-ok {
    border-color: var(--success-color);
    color: var(--success-color);
}

.admin-sync-msg-err {
    border-color: var(--danger-color);
    color: var(--danger-color);
}

.admin-users-table-wrap {
    width: 100%;
    overflow-x: auto;
    margin-top: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
}

.admin-users-table {
    margin: 0;
    width: 100%;
    min-width: 960px;
}

.admin-users-table th,
.admin-users-table td {
    white-space: nowrap;
}

.admin-users-actions-cell {
    white-space: nowrap;
}

.admin-users-actions-cell .btn {
    margin: 0.15rem;
}

.screen {
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Login Screen */
.login-container {
    max-width: 400px;
    margin: 4rem auto;
    text-align: center;
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.login-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
}

.login-container h1 {
    margin-bottom: 0.5rem;
}

.login-container p {
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #4752C4;
}

/* Disabled button - make it obvious */
.btn:disabled,
.btn[disabled] {
    opacity: 0.55;
    background: #99a2b0 !important;
    color: #6b7280 !important;
    cursor: not-allowed !important;
    box-shadow: none;
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #3C4147;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Submit for Review - very obvious when disabled */
.bulk-fill-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #f0f4ff;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.bulk-fill-label {
    font-size: 0.9rem;
    font-weight: 500;
}

.bulk-fill-select { width: 180px; }
.bulk-fill-input { width: 100px; }

.bulk-copy-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f8f9fc;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}
.bulk-copy-label { font-size: 0.9rem; font-weight: 500; }

[data-theme="dark"] .bulk-copy-bar {
    background: var(--card-bg);
}

.btn-clear-row {
    padding: 0.35rem 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-clear-row svg {
    display: block;
}

.validation-errors-bottom {
    margin: 1rem 0;
}

#submitTimesheetBtn:disabled,
#submitTimesheetBtn[disabled] {
    opacity: 0.5;
    background: #9ca3af !important;
    color: #6b7280 !important;
    cursor: not-allowed !important;
    box-shadow: none;
    border: 2px dashed #6b7280;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

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

/* Forms */
.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* Status Cards */
.status-cards {
    margin: 2rem 0;
}

.status-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.status-card.late {
    border-left: 4px solid var(--danger-color);
}

.status-card.up-to-date {
    border-left: 4px solid var(--success-color);
}

.status-card.review {
    border-left: 4px solid var(--warning-color);
}

.status-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-color);
}

.status-card.late .status-icon {
    background: #FEE;
    color: var(--danger-color);
}

.status-card.up-to-date .status-icon {
    background: #EFE;
    color: var(--success-color);
}

/* Announcements */
.announcements-section {
    margin-bottom: 2rem;
}

.announcement {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.announcement h3 {
    margin-bottom: 0.5rem;
}

/* Declined timesheet notice */
.declined-timesheet-card {
    background: #fff5f5;
    border: 1px solid var(--danger-color);
    border-left: 4px solid var(--danger-color);
    border-radius: 8px;
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.declined-notice {
    background: #fef3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
}

/* Reporting screen */
.reporting-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1.25rem 2rem;
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
}

.reporting-filters .filter-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
}

.reporting-filters .filter-group.filter-actions {
    flex-direction: row;
    align-items: center;
}

.filter-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Styled inputs for reporting filters */
.filter-input,
.filter-select {
    min-width: 160px;
    padding: 0.5rem 0.75rem;
    font-size: 0.95rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--text-color);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.filter-input:hover,
.filter-select:hover {
    border-color: #b9bbbe;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.2);
}

/* Month input - improve native calendar picker appearance */
.filter-input[type="month"] {
    cursor: pointer;
    font-family: inherit;
}

/* Select - custom dropdown appearance */
.filter-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234F545C' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.65rem center;
    padding-right: 2rem;
}

/* Custom checkbox in filters */
.filter-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.4rem 0;
}

.filter-checkbox-input {
    appearance: none;
    -webkit-appearance: none;
    width: 1.1rem;
    height: 1.1rem;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    background: var(--card-bg);
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.2s, background 0.2s;
}

.filter-checkbox-input:hover {
    border-color: var(--primary-color);
}

.filter-checkbox-input:checked {
    background: var(--primary-color);
    border-color: var(--primary-color);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpolyline fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' points='2,6 5,9 10,3'/%3E%3C/svg%3E");
    background-size: 10px 10px;
    background-position: center;
}

.filter-checkbox-label {
    font-size: 0.9rem;
    color: var(--text-color);
}

/* Filter action buttons spacing */
.reporting-filters .filter-actions .btn {
    white-space: nowrap;
}

.report-summary {
    margin: 1rem 0;
}

.summary-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.summary-card {
    background: var(--card-bg);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.summary-card.late .summary-value {
    color: var(--danger-color);
}

.summary-value {
    font-size: 1.5rem;
    font-weight: bold;
    display: block;
}

.report-late-section {
    background: #fef3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
}

.reporting-table .row-late {
    background: #fff5f5;
}

.reporting-table .row-late td {
    font-weight: 500;
    color: #7f1d1d;
}

[data-theme="dark"] .reporting-table .row-late {
    background: rgba(127, 29, 29, 0.35);
}

[data-theme="dark"] .reporting-table .row-late td {
    color: #fecaca;
}

/* Reviewer dashboard on home */
.review-submenu {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}
.review-submenu-link {
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--secondary-color);
    border-radius: 4px;
}
.review-submenu-link:hover {
    background: var(--bg-color);
    color: var(--text-color);
}
.review-submenu-link.active {
    background: var(--primary-color);
    color: white;
}

.download-timesheets-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.download-timesheets-controls input[type="month"] {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}
.muted { color: var(--secondary-color); }

.reviewer-dashboard {
    margin: 2rem 0;
}

.reviewer-dashboard-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-left: 4px solid var(--primary-color);
}

.reviewer-dashboard-card h3 {
    margin-bottom: 1rem;
}

.reviewer-dashboard-card ul {
    list-style: none;
    margin: 0.5rem 0;
}

.reviewer-dashboard-card li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
}

.announcement p {
    color: var(--secondary-color);
}

/* Help Section */
.help-section {
    margin-bottom: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.help-section summary {
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-weight: 500;
    color: var(--primary-color);
    list-style: none;
}

.help-section summary::-webkit-details-marker {
    display: none;
}

.help-section summary::before {
    content: '▶ ';
    font-size: 0.7em;
    margin-right: 0.5rem;
}

.help-section[open] summary::before {
    content: '▼ ';
}

.help-content {
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

.help-content ol {
    margin: 0;
    padding-left: 1.25rem;
}

.help-content li {
    margin-bottom: 0.5rem;
}

/* Timesheet Table */
.timesheet-placeholder {
    padding: 2rem;
    text-align: center;
    color: var(--secondary-color);
    background: var(--bg-color);
    border-radius: 8px;
    margin: 1rem 0;
}

.timesheet-controls {
    display: flex;
    gap: 1rem;
    align-items: end;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.team-vacations-controls {
    align-items: center;
    flex-wrap: nowrap;
}

.team-vacations-controls #teamVacationsMonth {
    width: 250px;
    max-width: 250px;
    flex: 0 0 250px;
}

.team-vacations-controls .team-vac-nav-btn {
    min-width: 2.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 1.35rem;
    line-height: 1;
    font-weight: 600;
    flex-shrink: 0;
}

.timesheet-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.timesheet-table th,
.timesheet-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.timesheet-table .col-select {
    width: 2rem;
    text-align: center;
    padding: 0.5rem;
}

.timesheet-table .row-select {
    width: 2rem;
    text-align: center;
    vertical-align: middle;
}

.timesheet-table .row-select-cb {
    width: 1rem;
    height: 1rem;
}

.timesheet-table .col-status {
    width: 2rem;
    text-align: center;
}

.timesheet-table .row-status {
    width: 2rem;
    text-align: center;
    vertical-align: middle;
}

.timesheet-table .row-check {
    color: var(--success-color);
    font-weight: bold;
    font-size: 1.1rem;
    background: #e8f5e9;
    border-radius: 50%;
    width: 1.5rem;
    height: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.timesheet-table .row-empty {
    color: var(--border-color);
    font-size: 1rem;
}

.timesheet-table tbody tr.row-source-highlight {
    background: rgba(34, 197, 94, 0.12);
    box-shadow: inset 0 0 0 2px var(--success-color);
}
[data-theme="dark"] .timesheet-table tbody tr.row-source-highlight {
    background: rgba(34, 197, 94, 0.15);
    box-shadow: inset 0 0 0 2px var(--success-color);
}

.timesheet-table th {
    background: var(--bg-color);
    font-weight: 600;
}

.timesheet-table th:nth-child(3),
.timesheet-table td:nth-child(3) { width: 14%; }
.timesheet-table th:nth-child(4),
.timesheet-table td:nth-child(4) { width: 23%; }
.timesheet-table th:nth-child(5),
.timesheet-table td:nth-child(5) { width: 7%; }
.timesheet-table th:nth-child(6),
.timesheet-table td:nth-child(6) { width: 40%; }
.timesheet-table th:nth-child(7),
.timesheet-table td:nth-child(7) { width: auto; }

.timesheet-table input,
.timesheet-table select,
.timesheet-table textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
}

.timesheet-table textarea {
    resize: vertical;
    min-height: 60px;
}

.timesheet-table .row-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 0.35rem;
}

.timesheet-table .row-actions .btn-add-task { grid-column: 1; grid-row: 1; }
.timesheet-table .row-actions .btn-remove-row { grid-column: 2; grid-row: 1; }
.timesheet-table .row-actions .btn-clear-row { grid-column: 3; grid-row: 1; }
.timesheet-table .row-actions .btn-copy-day { grid-column: 1 / -1; grid-row: 2; }

.timesheet-table .row-actions .btn {
    min-width: 0;
    height: 32px;
    padding: 0 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    font-size: 0.875rem;
}

.timesheet-actions {
    margin-top: 2rem;
}

.timesheet-actions-inner {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

@media (min-width: 769px) {
    #timesheetScreen {
        padding-bottom: 80px;
    }
    .timesheet-actions {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        margin-top: 0;
        background: var(--card-bg);
        border-top: 1px solid var(--border-color);
        box-shadow: 0 -4px 12px rgba(0,0,0,0.12);
        padding: 1rem 0;
        z-index: 100;
    }
    .timesheet-actions-inner {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 1rem;
    }
}

@media (max-width: 768px) {
    .timesheet-actions-inner {
        flex-wrap: wrap;
    }
}

/* Data Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: var(--bg-color);
    font-weight: 600;
}

.data-table tr:hover {
    background: var(--bg-color);
}

/* Working Days Selector */
.working-days-selector {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.day-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.2s;
}

.day-checkbox:hover {
    background: var(--bg-color);
}

.day-checkbox input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

.day-checkbox input[type="checkbox"]:checked + span,
.day-checkbox:has(input[type="checkbox"]:checked) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Error Messages */
.error-message {
    background: #FEE;
    color: var(--danger-color);
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
    border-left: 4px solid var(--danger-color);
}

.success-message {
    background: #EFE;
    color: var(--success-color);
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
    border-left: 4px solid var(--success-color);
}

/* Toast container - fixed at bottom */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 90%;
    width: 400px;
}

.toast-container .toast-message {
    animation: toastIn 0.3s ease;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(1rem); }
    to { opacity: 1; transform: translateY(0); }
}

/* Admin Styles */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.admin-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.admin-card h3 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-success {
    background: var(--success-color);
    color: white;
}

.badge-warning {
    background: var(--warning-color);
    color: white;
}

.badge-danger {
    background: var(--danger-color);
    color: white;
}

/* Button Sizes */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Install Button */
.install-btn {
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--card-bg);
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transition: max-height 0.3s ease, opacity 0.2s, visibility 0.2s;
    }

    .nav-menu.is-open {
        max-height: 80vh;
        opacity: 1;
        visibility: visible;
        overflow-y: auto;
    }

    .nav-menu .theme-toggle,
    .nav-menu .nav-link,
    .nav-menu .btn {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding: 0.85rem 1rem;
        border-radius: 0;
        border-bottom: 1px solid var(--border-color);
        width: 100%;
    }
    .nav-menu > *:last-child { border-bottom: none; }

    .navbar {
        position: relative;
    }
    .nav-container {
        flex-wrap: wrap;
    }
}

@media (min-width: 769px) {
    .nav-menu.is-open {
        max-height: none;
        opacity: 1;
        visibility: visible;
    }
}

@media (max-width: 768px) {
    .timesheet-table {
        font-size: 0.9rem;
    }

    .timesheet-table th,
    .timesheet-table td {
        padding: 0.5rem;
    }

    .admin-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading Spinner */
.spinner {
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Button loading state */
.btn-loading {
    pointer-events: none;
    opacity: 0.85;
}
.btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}
.btn.btn-secondary .btn-spinner,
.btn.btn-danger .btn-spinner {
    border-color: rgba(255,255,255,0.4);
    border-top-color: #fff;
}

/* Vacations */
.vacations-intro {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.vacations-loading,
.vacations-empty,
.vacations-hint {
    color: var(--secondary-color);
    margin: 0.75rem 0 1.5rem;
}

.vacations-message {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
}

.vacations-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.vacations-employee {
    font-size: 1.25rem;
    font-weight: 600;
}

.vacations-meta {
    color: var(--secondary-color);
    margin-top: 0.25rem;
}

.vacations-section-title {
    margin: 1.75rem 0 0.75rem;
    font-size: 1.1rem;
}

.vacation-balance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.vacation-balance-tile {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.vacation-balance-name {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.vacation-balance-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.vacation-balance-unit {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--secondary-color);
}

.vacation-balance-meta {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--secondary-color);
}

.leave-status {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    background: var(--bg-color);
}

.leave-status-validate {
    background: #E8F8EF;
    color: var(--success-color);
}

.leave-status-confirm,
.leave-status-validate1 {
    background: #FFF6E5;
    color: #a16207;
}

.leave-status-refuse,
.leave-status-cancel {
    background: #FEE;
    color: var(--danger-color);
}

[data-theme="dark"] .vacation-balance-tile {
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

[data-theme="dark"] .leave-status-validate {
    background: #1f3d2c;
}

[data-theme="dark"] .leave-status-confirm,
[data-theme="dark"] .leave-status-validate1 {
    background: #3d3520;
}

[data-theme="dark"] .leave-status-refuse,
[data-theme="dark"] .leave-status-cancel {
    background: #3d2a2a;
}

@media (max-width: 640px) {
    .vacations-header {
        flex-direction: column;
    }
}

/* Team Vacations calendar */
.team-cal {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.team-cal-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.team-cal-header h3 {
    margin: 0;
    font-size: 1.15rem;
}

.team-cal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.team-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
}

.team-cal-weekday {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--secondary-color);
    padding: 0.35rem 0;
}

.team-cal-day {
    min-height: 88px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.35rem;
    background: var(--bg-color);
}

.team-cal-day-empty {
    background: transparent;
    border-color: transparent;
    min-height: 0;
}

.team-cal-day-today {
    border-color: var(--primary-color);
    box-shadow: inset 0 0 0 1px var(--primary-color);
}

.team-cal-day-num {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.team-cal-chips {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.team-cal-chip {
    display: block;
    font-size: 0.68rem;
    line-height: 1.2;
    padding: 0.15rem 0.3rem;
    border-radius: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-cal-chip.leave-status-validate {
    background: #E8F8EF;
    color: var(--success-color);
}

.team-cal-chip.leave-status-confirm,
.team-cal-chip.leave-status-validate1 {
    background: #FFF6E5;
    color: #a16207;
}

.team-cal-chip.leave-status-refuse {
    background: #FEE;
    color: var(--danger-color);
}

.team-vac-group {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
}

.team-vac-employee {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

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

.team-vac-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.4rem 0;
    border-top: 1px solid var(--border-color);
}

.team-vac-item:first-child {
    border-top: none;
}

.team-vac-period {
    font-weight: 500;
}

[data-theme="dark"] .team-cal,
[data-theme="dark"] .team-vac-group {
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

[data-theme="dark"] .team-cal-chip.leave-status-validate {
    background: #1f3d2c;
}

[data-theme="dark"] .team-cal-chip.leave-status-confirm,
[data-theme="dark"] .team-cal-chip.leave-status-validate1 {
    background: #3d3520;
}

[data-theme="dark"] .team-cal-chip.leave-status-refuse {
    background: #3d2a2a;
}

@media (max-width: 768px) {
    .team-cal-day {
        min-height: 64px;
        padding: 0.2rem;
    }
    .team-cal-chip {
        font-size: 0.6rem;
    }
}


