/* StaffFlow — Coffee theme (matched to Cafe Manager design system) */
:root {
    --bg: #1a1410;
    --bg-card: #2a2118;
    --bg-elevated: #352a1f;
    --cream: #f5ebe0;
    --cream-muted: #c4b5a5;
    --accent: #c87941;
    --accent-hover: #d9925a;
    --green: #8b5a2b;
    --amber: #ffd84d;
    --red: #c45c5c;
    --success: #8bba5c;
    --info: #c87941;
    --warning: #ffd84d;
    --danger: #c45c5c;

    --border: rgba(245, 235, 224, 0.08);
    --border-hover: rgba(245, 235, 224, 0.2);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.45);
    --text-primary: var(--cream);
    --text-muted: var(--cream-muted);
    --radius: 12px;
    --radius-sm: 8px;

    --font-main: "DM Sans", system-ui, -apple-system, sans-serif;
    --font-display: "Playfair Display", Georgia, serif;

    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;

    /* Shift palettes (coffee-tuned) */
    --s-bg: rgba(255, 216, 77, 0.15);
    --s-text: #ffd84d;
    --s-border: rgba(255, 216, 77, 0.45);

    --c-bg: rgba(96, 165, 250, 0.18);
    --c-text: #93c5fd;
    --c-border: rgba(96, 165, 250, 0.5);

    --sc-bg: rgba(168, 230, 160, 0.14);
    --sc-text: #a8e6a0;
    --sc-border: rgba(168, 230, 160, 0.45);

    --o-bg: rgba(196, 92, 92, 0.14);
    --o-text: #e08a8a;
    --o-border: rgba(196, 92, 92, 0.4);

    --custom-bg: rgba(245, 235, 224, 0.08);
    --custom-text: #f5ebe0;
    --custom-border: rgba(245, 235, 224, 0.25);
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg);
    color: var(--cream);
    min-height: 100vh;
    min-height: 100dvh;
    line-height: 1.5;
    overflow-x: hidden;
    position: relative;
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(200, 121, 65, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(139, 90, 43, 0.10), transparent);
    background-attachment: fixed;
}

/* Layout */
.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.25rem 1.5rem 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Generic surface (was .glass) */
.glass {
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(26, 20, 16, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    position: sticky;
    top: 0.75rem;
    z-index: 100;
    flex-wrap: wrap;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.logo-icon {
    font-size: 1.9rem;
    color: var(--accent);
    line-height: 1;
}

.logo-text h1 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.logo-text span {
    font-size: 0.8rem;
    color: var(--cream-muted);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.notification-wrap { position: relative; }

.notification-btn {
    position: relative;
    min-width: 42px;
    padding: 0.5rem 0.75rem;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 10px;
    line-height: 18px;
    border-radius: 999px;
}

.notification-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(360px, calc(100vw - 2rem));
    max-height: 420px;
    z-index: 200;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.notification-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
}

.notification-panel-header h4 {
    margin: 0;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-sm {
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
    min-height: 30px;
}

.notification-list {
    max-height: 340px;
    overflow-y: auto;
}

.notification-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.85rem 1rem;
    border: none;
    border-bottom: 1px solid var(--border);
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.15s;
}

.notification-item:hover { background: rgba(255, 255, 255, 0.04); }
.notification-item.unread {
    background: rgba(212, 165, 116, 0.08);
    border-left: 3px solid var(--accent);
}

.notification-item-title {
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 0.25rem;
}

.notification-item-message {
    font-size: 0.82rem;
    color: var(--cream-muted);
    line-height: 1.4;
}

.notification-item-time {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

.notification-empty {
    padding: 1.5rem 1rem;
    text-align: center;
}

.current-user-box {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
}

.user-avatar-icon {
    font-size: 1.6rem;
    color: var(--accent);
}

.current-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: flex-start;
}

#current-user-name {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Inputs */
.glass-input {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--cream);
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: border-color var(--transition-fast);
}

.glass-input::placeholder { color: var(--cream-muted); opacity: 0.7; }

.glass-input:focus {
    border-color: var(--accent);
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.glass-input[readonly] {
    opacity: 0.7;
    cursor: not-allowed;
}

select.glass-input { cursor: pointer; }

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    letter-spacing: 0.02em;
}

.badge-staff {
    background: rgba(245, 235, 224, 0.1);
    color: var(--cream-muted);
    border: 1px solid var(--border);
}

.badge-admin {
    background: var(--accent);
    color: var(--bg);
}

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

/* Buttons */
.btn {
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 1px solid transparent;
    transition: background var(--transition-fast), transform 0.1s, border-color var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 42px;
    white-space: nowrap;
}

.btn:active { transform: scale(0.98); }

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

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

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--cream);
}

.btn-secondary:hover { border-color: var(--border-hover); }

.btn-group {
    display: inline-flex;
    gap: 0.4rem;
}

/* Navigation tabs */
.app-nav {
    display: flex;
    gap: 0.4rem;
    padding: 0.6rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    flex-wrap: wrap;
}

.nav-tab {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--cream-muted);
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: all var(--transition-fast);
}

.nav-tab:hover {
    color: var(--cream);
    border-color: var(--cream-muted);
}

.nav-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
}

/* Content panes */
.app-content { width: 100%; }

.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fadeIn 0.25s ease; }

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

.pane-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.pane-title h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.pane-title h2 i { color: var(--accent); }

.pane-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.text-muted { color: var(--cream-muted); font-size: 0.85rem; }
.text-danger { color: var(--red); }

.date-picker-wrapper, .month-selector-wrapper, .emp-filter-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--cream-muted);
}

.emp-filter-wrapper select {
    min-width: 180px;
    cursor: pointer;
}

/* Week status banner */
.week-status-banner {
    margin-bottom: 1rem;
    padding: 0.75rem 1.1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.week-status-banner:empty { display: none; }

.week-status-banner.open {
    background: rgba(139, 186, 92, 0.12);
    color: var(--success);
    border: 1px solid rgba(139, 186, 92, 0.35);
}

.week-status-banner.locked {
    background: rgba(196, 92, 92, 0.12);
    color: var(--o-text);
    border: 1px solid rgba(196, 92, 92, 0.35);
}

/* Schedule table */
.schedule-table-wrapper {
    overflow-x: auto;
    padding: 0.5rem;
    margin-bottom: 1.25rem;
}

.schedule-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 760px;
}

.schedule-table th {
    background: rgba(0, 0, 0, 0.25);
    color: var(--cream-muted);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.75rem 0.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.schedule-table th:first-child { text-align: left; padding-left: 1rem; border-top-left-radius: var(--radius-sm); }
.schedule-table th:last-child { border-top-right-radius: var(--radius-sm); }

.col-date { color: var(--accent); font-size: 0.72rem; }

/* Cột / ô của ngày hôm nay */
.schedule-table th.today-col {
    background: rgba(255, 153, 0, 0.28);
    color: var(--cream);
}
.schedule-table td.today-cell {
    box-shadow: inset 0 0 0 2px var(--accent);
}

.schedule-table td {
    padding: 0.65rem 0.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.emp-name-cell {
    text-align: left !important;
    padding-left: 1rem !important;
    font-weight: 600;
    white-space: nowrap;
}

.shift-cell {
    font-weight: 700;
    font-size: 1.15rem;
    position: relative;
    cursor: default;
    border-radius: 6px;
    transition: outline var(--transition-fast);
}

.shift-cell.editable-cell { cursor: pointer; }
.shift-cell.editable-cell:hover {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

/* Cố định độ rộng cột ca để không bị giãn khi nhập trực tiếp */
.schedule-table td.shift-cell { width: 84px; }

.inline-shift-input {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    padding: 3px 2px;
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
    text-transform: lowercase;
    border: 2px solid var(--accent);
    border-radius: 6px;
    background: var(--card, #1e1e1e);
    color: var(--cream, #f5f5f5);
    outline: none;
}

.shift-s { background-color: var(--s-bg); color: var(--s-text); }
.shift-c { background-color: var(--c-bg); color: var(--c-text); }
.shift-sc { background-color: var(--sc-bg); color: var(--sc-text); }
.shift-o { background-color: var(--o-bg); color: var(--o-text); }
.shift-custom { background-color: var(--custom-bg); color: var(--custom-text); }

.cell-note-indicator {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
}

.total-hours-cell {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--accent);
}

.group-divider-row td {
    padding: 0;
    height: 8px;
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 2px solid var(--accent);
}

tr.my-row .emp-name-cell { color: var(--accent); }

/* Legend */
.schedule-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    align-items: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.82rem;
    color: var(--cream-muted);
}

.legend-color {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
}

.legend-s { background: var(--s-bg); color: var(--s-text); border: 1px solid var(--s-border); }
.legend-c { background: var(--c-bg); color: var(--c-text); border: 1px solid var(--c-border); }
.legend-sc { background: var(--sc-bg); color: var(--sc-text); border: 1px solid var(--sc-border); }
.legend-o { background: var(--o-bg); color: var(--o-text); border: 1px solid var(--o-border); }

.legend-label strong { color: var(--cream); }

.info-bubble {
    margin-left: auto;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.info-bubble i { color: var(--accent); margin-right: 0.35rem; }
.info-bubble code, code {
    background: rgba(0, 0, 0, 0.35);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-size: 0.85em;
    color: var(--accent);
}

/* Swap dashboard */
.swap-dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.swap-section { padding: 1.25rem; }
.swap-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}
.swap-section-header h3 { margin: 0; }
.swap-history-hint { font-size: 0.82rem; margin: -0.25rem 0 0.75rem; }
.swap-section h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.swap-section h3 i { color: var(--accent); }

.swap-list { display: flex; flex-direction: column; gap: 0.85rem; }

.swap-card {
    padding: 1rem 1.1rem;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated) !important;
    border: 1px solid var(--border);
}

.swap-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
}

.swap-card-title { font-weight: 600; display: flex; align-items: center; gap: 0.4rem; }
.swap-card-title i { color: var(--accent); }
.swap-card-body { font-size: 0.9rem; margin-bottom: 0.5rem; }

.swap-card-note {
    font-size: 0.85rem;
    color: var(--cream-muted);
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem 0.7rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}
.swap-card-note i { color: var(--accent); margin-right: 0.3rem; }

.swap-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}
.swap-card-actions .btn { padding: 0.45rem 0.75rem; font-size: 0.8rem; min-height: 36px; }

.swap-shift-display {
    padding: 0.65rem 0.85rem;
    min-height: 42px;
    display: flex;
    align-items: center;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.swap-shift-display.is-empty { color: var(--text-muted); font-style: italic; }
.btn-primary:disabled,
.btn-primary[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(0.2);
}

.empty-state {
    text-align: center;
    color: var(--cream-muted);
    padding: 2rem 1rem;
}
.empty-state i { font-size: 2rem; color: var(--accent); opacity: 0.6; display: block; margin-bottom: 0.75rem; }

/* Payroll */
.payroll-container { padding: 1.5rem; }

.payroll-summary-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.summary-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: rgba(200, 121, 65, 0.15);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.card-info { display: flex; flex-direction: column; }
.card-info span {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--accent);
}
.card-info label { font-size: 0.78rem; color: var(--cream-muted); }

.table-wrapper { overflow-x: auto; }

.payroll-table, .settings-table, .payroll-detail-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.payroll-table th, .settings-table th, .payroll-detail-table th {
    background: rgba(0, 0, 0, 0.25);
    color: var(--cream-muted);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.payroll-table td, .settings-table td, .payroll-detail-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.payroll-table tr:hover td, .settings-table tr:hover td { background: rgba(255, 255, 255, 0.02); }

/* Settings */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.settings-card { padding: 1.5rem; }
.settings-card h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    margin-bottom: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.settings-card h3 i { color: var(--accent); }

.inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1rem;
}
.inline-form .glass-input { flex: 1; min-width: 120px; }
.inline-form select { flex: 1; min-width: 120px; }

.non-admin-msg {
    color: var(--cream-muted);
    font-size: 0.85rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    margin-bottom: 1rem;
}
.non-admin-msg i { color: var(--accent); margin-right: 0.35rem; }

.info-alert {
    background: rgba(200, 121, 65, 0.1);
    border: 1px solid rgba(200, 121, 65, 0.3);
    color: var(--cream-muted);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.83rem;
    margin-bottom: 1rem;
}
.info-alert i { color: var(--accent); margin-right: 0.35rem; }

.settings-form { display: flex; flex-direction: column; gap: 1rem; }
.form-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; flex: 1; min-width: 140px; }
.form-group label { font-size: 0.82rem; color: var(--cream-muted); }
.form-group .glass-input { width: 100%; }

.form-divider { border: none; border-top: 1px solid var(--border); margin: 0.5rem 0; }
.shift-group-title { margin: 0.25rem 0 0; font-size: 0.95rem; font-weight: 600; }

.time-range-box {
    background: rgba(96, 165, 250, 0.07);
    border: 1px solid rgba(96, 165, 250, 0.25);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
}
.time-range-title {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #93c5fd;
    margin-bottom: 0.6rem;
}
.time-range-title i { margin-right: 0.35rem; }
.time-range-box .form-row { margin-bottom: 0.4rem; }
.time-range-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--cream-muted);
}

.checkbox-group { flex-direction: row; align-items: center; gap: 0.5rem; }
.checkbox-group input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }

.row-actions { display: flex; gap: 0.4rem; }
.row-actions .btn { padding: 0.45rem 0.6rem; min-height: 34px; }

/* Modals */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal.active { display: flex; animation: fadeIn 0.2s ease; }

.modal-content {
    width: 100%;
    max-width: 480px;
    background: var(--bg-elevated) !important;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-height: 90vh;
    overflow-y: auto;
}

.detail-modal { max-width: 640px; }
.auth-modal { max-width: 420px; }

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.modal-header h3 i { color: var(--accent); }

.close-btn {
    background: none;
    border: none;
    color: var(--cream-muted);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    transition: color var(--transition-fast);
}
.close-btn:hover { color: var(--cream); }

.modal-body { padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.modal-body .form-group { width: 100%; }

.shift-info-display {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.shift-info-display strong { color: var(--cream-muted); }

/* Login screen */
.login-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    z-index: 2000;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(200, 121, 65, 0.18), transparent),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(139, 90, 43, 0.12), transparent),
        var(--bg);
}

.login-card {
    width: min(100%, 400px);
    padding: 2.25rem 1.85rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.login-brand { text-align: center; margin-bottom: 1.85rem; }
.login-brand .logo-icon { font-size: 2.6rem; color: var(--accent); }
.login-brand h1 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 0.6rem;
}
.login-brand p { color: var(--cream-muted); font-size: 0.9rem; margin-top: 0.25rem; }

.login-form { display: flex; flex-direction: column; gap: 1rem; }
.login-form .form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.login-form label { font-size: 0.85rem; color: var(--cream-muted); }
.login-form .glass-input { width: 100%; }

/* Toast */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    align-items: center;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 0.75rem 1.1rem;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    box-shadow: var(--shadow);
    min-width: 260px;
    animation: toastIn 0.3s ease;
}

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

.toast-icon { font-size: 1.1rem; }
.toast-success { border-left: 3px solid var(--success); }
.toast-success .toast-icon { color: var(--success); }
.toast-error { border-left: 3px solid var(--red); }
.toast-error .toast-icon { color: var(--red); }
.toast-info { border-left: 3px solid var(--accent); }
.toast-info .toast-icon { color: var(--accent); }
.toast-warning { border-left: 3px solid var(--amber); }
.toast-warning .toast-icon { color: var(--amber); }

.toast-message { flex: 1; }
.toast-close { cursor: pointer; color: var(--cream-muted); }
.toast-close:hover { color: var(--cream); }

/* Scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(245, 235, 224, 0.12); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(245, 235, 224, 0.22); }

/* Responsive */
@media (max-width: 900px) {
    .app-container { padding: 1rem 0.9rem 2.5rem; }
    .swap-dashboard { grid-template-columns: 1fr; }
    .settings-grid { grid-template-columns: 1fr; }
    .payroll-summary-cards { grid-template-columns: 1fr; }
    .app-header { position: static; }
    .pane-header { align-items: flex-start; }
}

@media (max-width: 520px) {
    .logo-text span { display: none; }
    .current-user-info { display: none; }
    .nav-tab { padding: 0.5rem 0.7rem; font-size: 0.8rem; }
}
