/* Sheek — Warm Stone + Espresso design system */
:root {
    --color-bg: #F7F4EE;
    --color-card: #FFFEFB;
    --color-primary: #332A25;
    --color-text: #242220;
    --color-text-secondary: #746E69;
    --color-border: #DED8D1;
    --color-accent: #81766D;
    --color-success: #52705A;
    --color-warning: #B57A35;
    --color-error: #A94F47;
    --color-primary-soft: #EBE6E0;
    --color-success-soft: #E4EBE6;
    --color-warning-soft: #F3EADB;
    --color-error-soft: #F3E5E3;
    --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* Dashboard Container */
.dashboard-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top Navigation */
.top-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 72px;
    height: auto;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    overflow: visible;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.35rem;
    color: #242220;
    flex-shrink: 0;
}

.nav-brand i {
    color: #332A25;
    font-size: 1.5rem;
}

.nav-logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: block;
    object-fit: cover;
    flex-shrink: 0;
}

.nav-tabs {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.35rem;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    overflow-y: visible;
    padding: 2px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.nav-tabs::-webkit-scrollbar {
    display: none;
}

.nav-tab {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.85rem;
    border: none;
    background: transparent;
    color: #746E69;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-tab i {
    font-size: 1rem;
}

/* Unread chat indicator (red dot on Chat nav tab) */
.chat-unread-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #C53030;
    box-shadow: 0 0 0 2px #FFFEFB;
    display: none;
    pointer-events: none;
}

.chat-unread-dot.is-visible {
    display: block;
}

.nav-tab.active .chat-unread-dot {
    box-shadow: 0 0 0 2px #332A25;
}

.nav-tab:hover {
    background: rgba(51, 42, 37, 0.1);
    color: #332A25;
}

.nav-tab.active {
    background: #332A25;
    color: white;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-shrink: 0;
    font-size: 0.95rem;
}

#kk-org-switcher {
    margin-left: 0 !important;
    max-width: 200px;
}

.notification-bell {
    position: relative;
    cursor: pointer;
    padding: 0.7rem;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.notification-bell:hover {
    background: rgba(51, 42, 37, 0.1);
}

.notification-bell i {
    font-size: 1.45rem;
    color: #746E69;
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #A94F47;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* ── Notification Dropdown ─────────────────────────────────────────────────── */

.notif-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 360px;
    max-height: 480px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.notif-dropdown.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.notif-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem 0.75rem;
    border-bottom: 1px solid #f0f4f8;
}

.notif-dropdown-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #242220;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notif-dropdown-header h3 i { color: #332A25; }

.notif-clear-btn {
    font-size: 0.78rem;
    color: #746E69;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}

.notif-clear-btn:hover { background: #F7F4EE; color: #4a5568; }

.notif-dropdown-list {
    overflow-y: auto;
    flex: 1;
    padding: 0.5rem 0;
}

.notif-dropdown-list::-webkit-scrollbar { width: 4px; }
.notif-dropdown-list::-webkit-scrollbar-thumb { background: #DED8D1; border-radius: 4px; }

.notif-dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #F7F4EE;
    transition: background 0.12s;
    cursor: default;
}

.notif-dropdown-item:last-child { border-bottom: none; }
.notif-dropdown-item:hover { background: #F7F4EE; }
.notif-dropdown-item.notif-read { opacity: 0.7; }

.notif-dropdown-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid #f0f4f8;
}
.notif-dropdown-footer a {
    font-size: 0.85rem;
    color: #332A25;
    text-decoration: none;
}
.notif-dropdown-footer a:hover { text-decoration: underline; }

.notif-history-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0f4f8;
}
.notif-history-item.notif-read { opacity: 0.7; }

.notif-dropdown-item .notif-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.notif-icon.high  { background: #F3E5E3; color: #A94F47; }
.notif-icon.medium { background: #F3EADB; color: #975a16; }
.notif-icon.low   { background: #E4EBE6; color: #332A25; }
.notif-icon.info  { background: #EBE6E0; color: #332A25; }

.notif-dropdown-item .notif-body { flex: 1; min-width: 0; }

.notif-dropdown-item .notif-text {
    font-size: 0.85rem;
    color: #242220;
    margin: 0 0 0.2rem;
    line-height: 1.4;
}

.notif-dropdown-item .notif-time {
    font-size: 0.75rem;
    color: #746E69;
}

.notif-dropdown-item .notif-actions {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.4rem;
}

.notif-dropdown-item .notif-approve,
.notif-dropdown-item .notif-deny {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s;
}

.notif-dropdown-item .notif-approve { background: #E4EBE6; color: #332A25; }
.notif-dropdown-item .notif-approve:hover { background: #9ae6b4; }
.notif-dropdown-item .notif-deny    { background: #F3E5E3; color: #A94F47; }
.notif-dropdown-item .notif-deny:hover    { background: #feb2b2; }

.notif-dropdown-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: #746E69;
    font-size: 0.9rem;
}

.notif-dropdown-empty i { font-size: 2rem; display: block; margin-bottom: 0.5rem; }

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 10px;
    transition: background-color 0.3s ease;
}

.user-profile:hover {
    background: rgba(0, 0, 0, 0.05);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #332A25;
    flex-shrink: 0;
}

.user-profile span {
    font-size: 1.12rem;
    font-weight: 600;
}

.nav-user .logout-btn,
.nav-user button.logout,
#logout-btn {
    font-size: 1.12rem;
    font-weight: 600;
}

/* Dashboard Main */
.dashboard-main {
    flex: 1;
    padding: 1.25rem 1.75rem 1.75rem;
    max-width: 1680px;
    margin: 0 auto;
    width: 100%;
}

.dashboard-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    margin-bottom: 1.1rem;
}

.dashboard-header h1 {
    font-size: 1.65rem;
    font-weight: 700;
    color: #242220;
    margin: 0;
}

.header-center {
    display: flex;
    justify-content: center;
}

.header-right {
    display: flex;
    justify-content: flex-end;
}

.current-date-header {
    font-size: 1.05rem;
    font-weight: 600;
    color: #332A25;
    margin: 0;
    background: rgba(51, 42, 37, 0.1);
    padding: 0.5rem 1.1rem;
    border-radius: 12px;
    border: 1px solid rgba(51, 42, 37, 0.12);
}

/* Home labor KPIs */
.home-kpi-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.1rem;
}

.home-kpi {
    background: #FFFEFB;
    border: 1px solid rgba(51, 42, 37, 0.1);
    border-radius: 14px;
    padding: 1rem 1.15rem 1.05rem;
    box-shadow: 0 3px 14px rgba(51, 42, 37, 0.05);
}

.home-kpi-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #746E69;
    margin-bottom: 0.35rem;
}

.home-kpi-value {
    font-size: 1.85rem;
    font-weight: 750;
    color: #242220;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
}

.home-kpi-sub {
    margin-top: 0.3rem;
    font-size: 0.8rem;
    color: #8A837C;
}

.current-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: #4a5568;
    font-weight: 500;
    flex: 1;
    justify-content: flex-end;
}

.current-time i {
    color: #332A25;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(340px, 1.35fr) minmax(260px, 1fr);
    gap: 1.1rem;
    align-items: start;
}

/* Tasks off: two columns — notifications + team fill the row, requests compact below */
html.kk-hide-tasks .dashboard-grid {
    grid-template-columns: minmax(280px, 0.85fr) minmax(420px, 1.35fr);
}

/* Dashboard Cards */
.dashboard-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.dashboard-card:hover {
    transform: none;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.08);
}

.card-header {
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #F7F4EE 0%, #DED8D1 100%);
}

.card-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: #242220;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-header h2 i {
    color: #332A25;
}

.card-badge {
    background: #332A25;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.shift-requests-card {
    grid-column: 1 / -1;
    max-width: 100%;
}

.card-header-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.shift-requests-history-btn {
    border: 1px solid #DED8D1;
    background: #FFFEFB;
    color: #332A25;
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.shift-requests-history-btn[aria-pressed="true"] {
    background: #332A25;
    color: #FFFEFB;
    border-color: #332A25;
}

.shift-requests-section-label {
    margin: 0.35rem 0 0.55rem;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #746E69;
}

.shift-request-status-pill {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
}

.tomorrow-positions-card {
    grid-column: 1 / -1;
    max-width: 100%;
}

.tomorrow-positions-card .card-content {
    max-height: none;
}

.tomorrow-positions-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.tomorrow-positions-empty {
    margin: 0;
    padding: 0.5rem 0.15rem;
    color: #746E69;
    font-size: 0.92rem;
}

.tomorrow-position-row {
    display: grid;
    grid-template-columns: minmax(110px, 160px) minmax(0, 1fr);
    gap: 0.75rem;
    align-items: stretch;
    background: #F7F4EE;
    border: 1px solid #EBE6E0;
    border-radius: 12px;
    padding: 0.65rem 0.85rem;
    min-width: 0;
}

.tomorrow-position-label {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #332A25;
    display: flex;
    align-items: center;
    padding-right: 0.35rem;
    border-right: 1px solid #DED8D1;
}

.tomorrow-time-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    min-width: 0;
    align-items: stretch;
}

.tomorrow-time-slot {
    flex: 1 1 140px;
    min-width: 120px;
    max-width: 220px;
    background: #fff;
    border: 1px solid #EBE6E0;
    border-radius: 10px;
    padding: 0.45rem 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.tomorrow-slot-time {
    font-size: 0.72rem;
    font-weight: 600;
    color: #746E69;
    white-space: nowrap;
}

.tomorrow-slot-name {
    font-size: 0.92rem;
    font-weight: 650;
    color: #242220;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tomorrow-slot-empty {
    font-size: 0.88rem;
    color: #746E69;
    align-self: center;
}

.tomorrow-position-row--empty {
    opacity: 0.78;
}

.tomorrow-position-row--empty .tomorrow-slot-empty {
    font-style: italic;
}

@media (max-width: 640px) {
    .tomorrow-position-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .tomorrow-position-label {
        border-right: none;
        border-bottom: 1px solid #DED8D1;
        padding-right: 0;
        padding-bottom: 0.4rem;
    }
}

.card-content {
    padding: 0.85rem 1.1rem 1rem;
    max-height: min(480px, 58vh);
    overflow-y: auto;
}

/* Notifications Styles */
.notification-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.notif-empty-state {
    text-align: center;
    padding: 0.65rem 0.35rem;
    color: #746E69;
    font-size: 0.9rem;
    line-height: 1.35;
}
.notif-empty-state i {
    display: block;
    font-size: 1.2rem;
    color: #DED8D1;
    margin-bottom: 0.3rem;
}

/* Empty shift-requests: compact horizontal strip, not a tall blank card */
.shift-requests-card .card-content {
    max-height: none;
}
.shift-requests-card .notif-empty-state {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.55rem;
    text-align: left;
    padding: 0.35rem 0.15rem;
}
.shift-requests-card .notif-empty-state i {
    display: inline;
    margin: 0;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    border-left: 4px solid #DED8D1;
    background: #F7F4EE;
    transition: all 0.3s ease;
}

.notification-item:hover {
    background: #edf2f7;
    transform: translateX(4px);
}

.notification-item.priority-high {
    border-left-color: #A94F47;
    background: #F3E5E3;
}

.notification-item.priority-medium {
    border-left-color: #f6ad55;
    background: #fef5e7;
}

.notification-item.priority-low {
    border-left-color: #52705A;
    background: #f0fff4;
}

/* Shift request rows (Employees page + Scheduling modal) — must be column layout; do not reuse .notification-item (row flex). */
.shift-request-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid #DED8D1;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    background: #fff;
}

.shift-request-card .shift-request-shift-block {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.shift-request-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-top: 2px;
}

.shift-request-actions button {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 420px) {
    .shift-request-actions {
        grid-template-columns: 1fr;
    }
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(51, 42, 37, 0.1);
    color: #332A25;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
}

.notification-content p {
    margin: 0 0 0.25rem 0;
    font-weight: 500;
    color: #242220;
}

.notification-time {
    font-size: 0.8rem;
    color: #746E69;
}

.notification-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-approve, .btn-deny {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-approve {
    background: #332A25;
    color: white;
}

.btn-approve:hover {
    background: #52705A;
    transform: translateY(-1px);
}

.btn-deny {
    background: #A94F47;
    color: white;
}

.btn-deny:hover {
    background: #A94F47;
    transform: translateY(-1px);
}

/* Shift Styles */
.shift-time {
    background: rgba(51, 42, 37, 0.1);
    color: #332A25;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.shift-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.shift-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    background: #F7F4EE;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.shift-item:hover {
    background: #EBE6E0;
    transform: none;
}

.employee-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.employee-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #332A25;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
}

.employee-details {
    display: flex;
    flex-direction: column;
}

.employee-name {
    font-weight: 600;
    color: #242220;
}

.employee-role {
    font-size: 0.8rem;
    color: #746E69;
}

.employee-task-summary {
    font-size: 0.82rem;
    color: #4a5568;
    font-weight: 600;
    margin-top: 0.2rem;
}

.shift-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.shift-status.online {
    color: #332A25;
}

.shift-status.online i {
    animation: pulse 2s infinite;
}

.shift-status.offline {
    color: #746E69;
}

.shift-status.offline i {
    animation: none;
    opacity: 0.55;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Progress Styles */
.btn-refresh {
    background: none;
    border: none;
    color: #332A25;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-refresh:hover {
    background: rgba(51, 42, 37, 0.1);
    transform: rotate(180deg);
}

.section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.progress-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.progress-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #F7F4EE;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.progress-item:hover {
    background: #edf2f7;
    transform: translateX(4px);
}

.progress-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #332A25;
    animation: pulse 2s infinite;
    flex-shrink: 0;
}

.progress-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.task-assignee {
    font-weight: 600;
    color: #242220;
    font-size: 0.9rem;
}

.task-description {
    font-size: 0.8rem;
    color: #746E69;
    margin-top: 0.25rem;
}

.task-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.task-checkbox {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #332A25;
    flex-shrink: 0;
}

.task-text {
    flex: 1;
    line-height: 1.4;
    transition: all 0.3s ease;
}

.task-checkbox:checked + .task-text {
    text-decoration: line-through;
    opacity: 0.6;
}

.progress-item.task-completed {
    background: #f0fff4;
    border-left-color: #332A25;
}

.progress-item.task-completed .progress-indicator {
    background: #332A25;
    animation: none;
}

/* Read-only task status */
.task-status-readonly {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.task-status-icon {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.task-status-icon.task-status-pending {
    color: #DED8D1;
}

.task-status-icon.task-status-complete {
    color: #332A25;
}

.btn-finish {
    padding: 0.5rem 1rem;
    background: #332A25;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.btn-finish:hover {
    background: #52705A;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

/* Task Filter Dropdown */
.task-filter-select {
    padding: 0.5rem 1rem;
    border: 2px solid #DED8D1;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    background: white;
    color: #242220;
    cursor: pointer;
    transition: all 0.2s ease;
}

.task-filter-select:hover {
    border-color: #332A25;
}

.task-filter-select:focus {
    outline: none;
    border-color: #332A25;
    box-shadow: 0 0 0 3px rgba(51, 42, 37, 0.1);
}

.task-complete-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #332A25;
}

.task-complete-check i {
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .dashboard-grid,
    html.kk-hide-tasks .dashboard-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    .progress-card {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .home-kpi-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-main {
        padding: 1rem;
    }
    
    .dashboard-grid,
    html.kk-hide-tasks .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }
    
    .top-nav {
        padding: 0.65rem 1rem;
        flex-wrap: wrap;
        height: auto;
        min-height: 72px;
        gap: 0.5rem;
    }
    
    .nav-tabs {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        flex-wrap: nowrap;
        padding: 0.5rem 0;
        gap: 0.35rem;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
        overflow-x: auto;
    }
    
    .nav-tab {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .dashboard-header {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        text-align: center;
    }

    .header-right { display: none; }
    
    .dashboard-header h1 {
        font-size: 1.5rem;
    }
    
    .current-date-header {
        font-size: 1.2rem;
    }
}

/* Custom Scrollbar */
.card-content::-webkit-scrollbar {
    width: 6px;
}

.card-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.card-content::-webkit-scrollbar-thumb {
    background: #332A25;
    border-radius: 3px;
}

.card-content::-webkit-scrollbar-thumb:hover {
    background: #52705A;
}

/* Loading Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.dashboard-card {
    animation: fadeIn 0.6s ease-out forwards;
}

.dashboard-card:nth-child(1) { animation-delay: 0.1s; }
.dashboard-card:nth-child(2) { animation-delay: 0.2s; }
.dashboard-card:nth-child(3) { animation-delay: 0.3s; }

/* Clickable Employee Name */
.clickable-employee {
    cursor: pointer;
    transition: color 0.2s ease;
}

.clickable-employee:hover {
    color: #332A25;
    text-decoration: underline;
}

/* TEMP: hide task-management UI; set KK_FEATURES.taskMgmtUi = true to restore */
html.kk-hide-tasks .kk-task-ui,
html.kk-hide-tasks .progress-card,
html.kk-hide-tasks #assign-task-modal,
html.kk-hide-tasks #employee-tasks-modal,
html.kk-hide-tasks #recipe-assignment-modal,
html.kk-hide-tasks .task-warning,
html.kk-hide-tasks .shift-task-preview,
html.kk-hide-tasks .no-tasks-warning,
html.kk-hide-tasks .employee-task-summary {
    display: none !important;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #DED8D1;
    background: linear-gradient(135deg, #F7F4EE, #DED8D1);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #242220;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-header h3 i {
    color: #332A25;
}

.modal-close {
    background: none;
    border: none;
    color: #746E69;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    font-size: 1.25rem;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #242220;
}

.modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid #DED8D1;
    background: #F7F4EE;
}

/* Employee Tasks Modal Styles */
.tasks-section {
    margin-bottom: 2rem;
}

.tasks-section:last-child {
    margin-bottom: 0;
}

.tasks-section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: #242220;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #DED8D1;
}

.tasks-section-title i {
    color: #332A25;
}

.unfinished-tasks-section .tasks-section-title {
    border-bottom-color: #f6ad55;
}

.unfinished-tasks-section .tasks-section-title i {
    color: #f6ad55;
}

.finished-tasks-section .tasks-section-title {
    border-bottom-color: #332A25;
}

.finished-tasks-section .tasks-section-title i {
    color: #332A25;
}

.task-count {
    background: #DED8D1;
    color: #242220;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: auto;
}

.unfinished-tasks-section .task-count {
    background: #fef5e7;
    color: #c05621;
}

.finished-tasks-section .task-count {
    background: #f0fff4;
    color: #22543d;
}

.employee-tasks-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.employee-task-item {
    padding: 1rem;
    background: #F7F4EE;
    border-radius: 8px;
    border: 1px solid #DED8D1;
    transition: all 0.2s ease;
}

.employee-task-item:hover {
    border-color: #332A25;
    box-shadow: 0 2px 4px rgba(51, 42, 37, 0.1);
}

.employee-task-item.task-completed {
    background: #f0fff4;
    border-color: #332A25;
}

.no-tasks-message {
    padding: 1.5rem;
    text-align: center;
    color: #746E69;
    font-style: italic;
    background: #F7F4EE;
    border-radius: 8px;
    border: 1px dashed #DED8D1;
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    color: #4a5568;
    border: 2px solid #DED8D1;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #F7F4EE;
    border-color: #332A25;
    color: #332A25;
    transform: translateY(-2px);
}

/* Delete Task Button for Employee Tasks Modal */
.employee-task-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-delete-task {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: #F3E5E3;
    color: #A94F47;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: auto;
    font-size: 0.75rem;
}

.btn-delete-task:hover {
    background: #feb2b2;
    transform: scale(1.1);
}

/* ── Full-page manager login ─────────────────────────────────────────────── */
#auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: stretch;
    justify-content: center;
    background: var(--color-bg);
    padding: 36px 24px;
    overflow: auto;
    font-family: var(--font-sans);
}
#auth-overlay .auth-shell {
    width: min(1180px, 100%);
    max-width: 1180px;
    margin: auto;
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    min-height: min(820px, calc(100vh - 72px));
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 32px;
    box-shadow: 0 24px 60px rgba(51, 42, 37, 0.12);
    overflow: hidden;
}
#auth-overlay .auth-brand {
    background: #EBE6E0;
    padding: 64px 56px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
#auth-overlay .auth-brand-logo {
    width: 96px;
    height: 96px;
    border-radius: 26px;
    background: var(--color-card);
    padding: 12px;
    box-shadow: 0 8px 20px rgba(51, 42, 37, 0.12);
}
#auth-overlay .auth-brand-name {
    margin: 28px 0 14px;
    font-size: 56px;
    line-height: 1.05;
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: -0.03em;
}
#auth-overlay .auth-brand-tagline {
    margin: 0 0 28px;
    font-size: 24px;
    line-height: 1.4;
    color: var(--color-text-secondary);
    max-width: 18ch;
}
#auth-overlay .auth-brand-price {
    margin: 0;
    font-size: 18px;
    font-weight: 650;
    color: var(--color-primary);
}
#auth-overlay .auth-card {
    padding: 64px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
#auth-overlay .auth-card-header {
    display: none;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}
#auth-overlay .auth-card-mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #EBE6E0;
    padding: 6px;
}
#auth-overlay .auth-card-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--color-text);
}
#auth-overlay .auth-card-sub {
    font-size: 15px;
    color: var(--color-text-secondary);
    margin-bottom: 18px;
}
#auth-overlay .auth-banner {
    display: none;
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 16px;
    line-height: 1.45;
}
#auth-overlay .auth-banner-error {
    background: #F3E5E3;
    color: var(--color-error);
}
#auth-overlay .auth-banner-info {
    background: var(--color-success-soft);
    color: var(--color-success);
}
#auth-overlay .auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
    background: #F7F4EE;
    border-radius: 18px;
    padding: 7px;
}
#auth-overlay .auth-tab {
    flex: 1;
    border: 0;
    border-radius: 14px;
    padding: 16px 18px;
    font-size: 19px;
    font-weight: 650;
    cursor: pointer;
    background: transparent;
    color: var(--color-text-secondary);
}
#auth-overlay .auth-tab.is-active {
    background: var(--color-card);
    color: var(--color-text);
    box-shadow: 0 1px 3px rgba(51, 42, 37, 0.12);
}
#auth-overlay .auth-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
#auth-overlay #auth-panel-signup {
    display: none;
}
#auth-overlay .auth-label {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text);
    margin-top: 10px;
}
#auth-overlay .auth-label-sm {
    font-size: 15px;
    color: var(--color-text-secondary);
    font-weight: 500;
    margin-top: 0;
}
#auth-overlay .auth-input {
    width: 100%;
    border-radius: 16px;
    border: 1px solid var(--color-border);
    padding: 20px 22px;
    font-size: 20px;
    line-height: 1.3;
    outline: none;
    background: #FFFEFB;
    color: var(--color-text);
}
#auth-overlay .auth-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(51, 42, 37, 0.12);
}
#auth-overlay .auth-submit {
    margin-top: 18px;
    border: none;
    border-radius: 999px;
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
    font-size: 20px;
    padding: 18px 22px;
    min-height: 58px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
#auth-overlay .auth-submit:hover {
    background: #242220;
}
#auth-overlay .auth-or {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 8px 0 6px;
    color: var(--color-text-secondary);
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
#auth-overlay .auth-or::before,
#auth-overlay .auth-or::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--color-border);
}
#auth-overlay .auth-oauth-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
#auth-overlay .auth-oauth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 16px 18px;
    min-height: 56px;
    background: #FFFEFB;
    cursor: pointer;
    font-size: 19px;
    font-weight: 600;
    color: var(--color-text);
}
#auth-overlay .auth-oauth-btn:hover {
    background: #F7F4EE;
}
#auth-overlay .auth-oauth-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}
#auth-overlay .auth-help-link {
    display: block;
    margin-top: 12px;
    text-align: center;
    font-size: 17px;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-decoration: underline;
    text-underline-offset: 3px;
}
#auth-overlay .auth-help-link:hover {
    color: var(--color-text);
}
#auth-overlay .auth-secondary {
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 12px 16px;
    background: #fff;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
}
#auth-overlay .auth-pricing {
    padding: 14px 16px;
    border: 1px solid #C9D6CC;
    border-radius: 12px;
    background: var(--color-success-soft);
}
#auth-overlay #auth-pricing-rate {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-success);
}
#auth-overlay #auth-pricing-blurb {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.4;
    margin-top: 4px;
}
#auth-overlay .auth-name-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
#auth-overlay .auth-fineprint {
    font-size: 13px;
    color: var(--color-text-secondary);
    margin: 8px 0 0;
    line-height: 1.45;
}
#auth-overlay .auth-unauthorized {
    display: none;
    margin-top: 8px;
    font-size: 15px;
    color: var(--color-primary);
    background: var(--color-warning-soft);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 16px 18px;
    line-height: 1.5;
}
#auth-overlay .auth-unauthorized-actions {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

@media (max-width: 880px) {
    #auth-overlay {
        padding: 16px;
        align-items: flex-start;
    }
    #auth-overlay .auth-shell {
        grid-template-columns: 1fr;
        min-height: auto;
        border-radius: 22px;
    }
    #auth-overlay .auth-brand {
        padding: 28px 24px 20px;
    }
    #auth-overlay .auth-brand-logo {
        width: 56px;
        height: 56px;
        border-radius: 16px;
    }
    #auth-overlay .auth-brand-name {
        font-size: 28px;
        margin-top: 14px;
    }
    #auth-overlay .auth-brand-tagline {
        font-size: 16px;
        margin-bottom: 0;
        max-width: none;
    }
    #auth-overlay .auth-brand-price {
        display: none;
    }
    #auth-overlay .auth-card {
        padding: 24px 22px 32px;
    }
    #auth-overlay .auth-card-header {
        display: none;
    }
    #auth-overlay .auth-name-row {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════════════
   App shell — left sidebar (Today + Schedule; reusable page-shell)
   ═══════════════════════════════════════════════════════════════ */

.page-shell {
    --today-bg: #F4F3EE;
    --today-ink: #111111;
    --today-muted: #8A8780;
    --today-line: #E6E4DE;
    --today-card: #FFFFFF;
    background: var(--today-bg);
    color: var(--today-ink);
}

.page-shell .dashboard-container.has-side-nav {
    flex-direction: row;
    align-items: stretch;
    min-height: 100vh;
    background: var(--today-bg);
}

.page-shell .side-nav.top-nav {
    position: sticky;
    top: 0;
    align-self: flex-start;
    width: 248px;
    min-width: 248px;
    height: 100vh;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 18px 14px 16px;
    background: var(--today-bg);
    border-bottom: none;
    border-right: 1px solid var(--today-line);
    box-shadow: none;
    backdrop-filter: none;
    overflow: hidden;
}

.page-shell .side-nav-org-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 12px;
    margin-bottom: 18px;
    background: #ECEBE6;
    border-radius: 14px;
    min-height: 56px;
}

.page-shell .side-nav-org-text {
    flex: 1;
    min-width: 0;
}

.page-shell .side-nav-org-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--today-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-shell .side-nav-org-sub {
    font-size: 12px;
    color: var(--today-muted);
    margin-top: 1px;
}

.page-shell .side-nav-org-chevron {
    color: var(--today-muted);
    font-size: 11px;
}

.page-shell .side-nav-org-card #kk-org-switcher {
    width: 100%;
    max-width: none;
    margin: 0 !important;
}

.page-shell .side-nav-org-card #kk-org-switcher select {
    width: 100%;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--today-ink) !important;
    max-width: none !important;
}

.page-shell .side-nav-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.page-shell .side-nav .nav-tabs {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    overflow: visible;
    flex: none;
    width: 100%;
}

.page-shell .side-nav-label {
    margin: 16px 10px 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--today-muted);
}

.page-shell .side-nav .nav-tab {
    justify-content: flex-start;
    width: 100%;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 12px;
    color: #3A3935;
    font-size: 15px;
    font-weight: 600;
    box-shadow: none;
}

.page-shell .side-nav .nav-tab i {
    width: 18px;
    text-align: center;
    color: inherit;
    opacity: 0.9;
}

.page-shell .side-nav .nav-tab:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--today-ink);
}

.page-shell .side-nav .nav-tab.active {
    background: #111111;
    color: #FFFFFF;
    box-shadow: none;
}

.page-shell .side-nav .nav-tab.active .chat-unread-dot {
    box-shadow: 0 0 0 2px #111;
}

.page-shell .side-nav-badge {
    margin-left: auto;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #FFFFFF;
    color: #111;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.page-shell .side-nav .nav-tab.active .side-nav-badge {
    background: #FFFFFF;
    color: #111;
}

.page-shell .side-nav-chat {
    margin-top: 14px;
}

.page-shell .side-nav-footer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--today-line);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.page-shell .side-nav-footer .nav-tab {
    justify-content: flex-start;
    width: 100%;
}

.page-shell .side-nav-user.nav-user {
    margin-top: 4px;
    padding-top: 8px;
    border-top: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-shell .side-nav-user .notification-bell {
    padding: 8px;
}

.page-shell .side-nav-user .user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
    cursor: pointer;
}

.page-shell .side-nav-user .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: #D9D7D1;
}

.page-shell .user-profile-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.page-shell .user-profile-copy span {
    font-size: 14px;
    font-weight: 700;
    color: var(--today-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-shell .user-profile-role {
    font-style: normal;
    font-size: 12px;
    color: var(--today-muted);
}

.page-shell:not(.page-today):not(.page-schedule) .dashboard-main {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    margin: 0;
    padding: 28px 32px 40px;
    background: var(--today-bg);
}

.page-shell.page-chat .chat-main {
    height: 100vh;
    max-height: 100vh;
    max-width: none;
    flex: 1 1 auto;
}

#kk-support-banner.page-shell-support-banner {
    margin: -28px -32px 20px;
}

/* Today-specific content below */
.page-today .today-main.dashboard-main {
    flex: 1;
    max-width: none;
    margin: 0;
    padding: 28px 32px 40px;
    background: var(--today-bg);
}

.page-today .today-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.page-today .today-eyebrow {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--today-muted);
}

.page-today .today-date {
    margin: 0;
    font-size: 34px;
    line-height: 1.1;
    font-weight: 750;
    letter-spacing: -0.03em;
    color: var(--today-ink);
}

.page-today .today-header-right {
    font-size: 15px;
    font-weight: 500;
    color: var(--today-muted);
    padding-bottom: 6px;
    white-space: nowrap;
}

.page-today .home-kpi-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin-bottom: 18px;
    background: var(--today-card);
    border: 1px solid var(--today-line);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: none;
}

.page-today .home-kpi-strip .home-kpi {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 18px 20px 16px;
    border-right: 1px solid var(--today-line);
}

.page-today .home-kpi-strip .home-kpi:last-child {
    border-right: none;
}

.page-today .home-kpi-strip .home-kpi-label {
    text-transform: none;
    letter-spacing: 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--today-muted);
    margin-bottom: 8px;
}

.page-today .home-kpi-strip .home-kpi-value {
    font-size: 32px;
    font-weight: 750;
    letter-spacing: -0.03em;
    color: var(--today-ink);
}

.page-today .home-kpi-strip .home-kpi-sub {
    margin-top: 6px;
    font-size: 13px;
    color: var(--today-muted);
}

.page-today .today-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.page-today .today-panel {
    background: var(--today-card);
    border: 1px solid var(--today-line);
    border-radius: 16px;
    box-shadow: none;
}

.page-today .today-card-header {
    background: transparent;
    border-bottom: 1px solid var(--today-line);
    padding: 16px 18px;
}

.page-today .today-card-header h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--today-ink);
}

.page-today .today-card-header h2 i {
    display: none;
}

.page-today .quiet-badge {
    background: #F0EFEA;
    color: #5C5A54;
    font-weight: 600;
}

.page-today .needs-you-card {
    grid-column: 1;
    grid-row: 1;
    max-width: none;
}

.page-today .today-shifts-card {
    grid-column: 2;
    grid-row: 1;
}

.page-today .today-secondary-card,
.page-today .tomorrow-positions-card {
    grid-column: 1 / -1;
}

.page-today .needs-you-card .card-content,
.page-today .today-shifts-card .card-content {
    max-height: none;
    padding: 0;
}

.page-today .needs-you-list {
    display: flex;
    flex-direction: column;
}

.page-today .needs-you-list .notif-empty-state,
.page-today .today-shift-list .no-tasks-message {
    padding: 28px 18px;
    color: var(--today-muted);
}

.page-today .needs-you-row,
.page-today .shift-request-card {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 16px 18px;
    margin: 0;
    border: none;
    border-bottom: 1px solid var(--today-line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.page-today .needs-you-row:last-child,
.page-today .shift-request-card:last-child {
    border-bottom: none;
}

.page-today .needs-you-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #E2A05A;
}

.page-today .needs-you-dot.is-urgent {
    background: #C45B4A;
}

.page-today .needs-you-copy {
    min-width: 0;
}

.page-today .needs-you-kind {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--today-muted);
    margin-bottom: 2px;
}

.page-today .needs-you-title {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--today-ink);
    line-height: 1.3;
}

.page-today .needs-you-meta {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    color: var(--today-muted);
}

.page-today .needs-you-actions,
.page-today .shift-request-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.page-today .needs-you-actions button,
.page-today .shift-request-actions button {
    border-radius: 10px !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    cursor: pointer;
}

.page-today .btn-needs-secondary {
    background: #fff !important;
    color: var(--today-ink) !important;
    border: 1px solid var(--today-line) !important;
}

.page-today .btn-needs-primary {
    background: #111 !important;
    color: #fff !important;
    border: 1px solid #111 !important;
}

.page-today .today-shift-list {
    display: flex;
    flex-direction: column;
    overflow-x: auto;
}

.page-today .today-shift-legend {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--today-muted);
}

.page-today .today-shift-legend > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.page-today .today-shift-key {
    width: 12px;
    height: 8px;
    border-radius: 3px;
    display: inline-block;
}

.page-today .today-shift-key.is-clocked,
.page-today .today-shift-bar.is-clocked {
    background: #238252;
}

.page-today .today-shift-key.is-scheduled,
.page-today .today-shift-bar.is-scheduled {
    background: #DDDAD2;
}

.page-today .today-shift-timeline {
    min-width: 470px;
    padding: 10px 14px 14px;
    --today-person-width: 130px;
}

.page-today .today-shift-axis,
.page-today .today-shift-timeline-row {
    display: grid;
    grid-template-columns: var(--today-person-width) minmax(0, 1fr);
}

.page-today .today-shift-axis {
    align-items: end;
    min-height: 26px;
}

.page-today .today-shift-axis-track,
.page-today .today-shift-track {
    position: relative;
}

.page-today .today-shift-axis-track {
    height: 24px;
}

.page-today .today-shift-tick {
    position: absolute;
    left: var(--tick-left);
    bottom: 6px;
    transform: translateX(-50%);
    color: var(--today-muted);
    font-size: 10px;
    font-weight: 650;
    white-space: nowrap;
}

.page-today .today-shift-tick:first-child {
    transform: none;
}

.page-today .today-shift-tick:last-child {
    transform: translateX(-100%);
}

.page-today .today-shift-timeline-row {
    min-height: 44px;
}

.page-today .today-shift-person {
    min-width: 0;
    padding: 6px 12px 6px 0;
}

.page-today .today-shift-person .today-shift-name {
    display: inline;
    font-size: 12px;
    line-height: 1.2;
}

.page-today .today-shift-person .today-shift-role {
    display: inline;
    margin-left: 3px;
    font-size: 10px;
}

.page-today .today-shift-person .today-shift-role::before {
    content: "· ";
}

.page-today .today-shift-person .today-shift-status {
    display: block;
    margin-top: 3px;
    font-size: 10px;
    line-height: 1.2;
}

.page-today .today-shift-track {
    min-height: 44px;
}

.page-today .today-shift-gridline {
    position: absolute;
    z-index: 0;
    top: 0;
    bottom: 0;
    left: var(--tick-left);
    width: 1px;
    background: #EEECE7;
}

.page-today .today-shift-now-line {
    display: none;
    position: absolute;
    z-index: 3;
    top: 0;
    bottom: 0;
    left: var(--today-now-left);
    width: 1px;
    background: #238252;
}

.page-today .today-shift-timeline.is-now-visible .today-shift-now-line {
    display: block;
}

.page-today .today-shift-bar {
    position: absolute;
    z-index: 2;
    top: 10px;
    left: var(--shift-left);
    width: var(--shift-width);
    height: 23px;
    border-radius: 7px;
    min-width: 7px;
}

.page-today .today-shift-bar.is-due {
    background: #FBF2D8;
    border: 1px dashed #D4A74D;
}

.page-today .today-shift-name.clickable-employee {
    cursor: pointer;
}

.page-today .today-shift-name.clickable-employee:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.page-today .on-clock-card {
    margin: 12px 14px;
    padding: 16px 18px 14px;
    border-radius: 18px;
    background: #1F5C3A;
    color: #FFFFFF;
}

.page-today .on-clock-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.page-today .on-clock-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #FFFFFF;
    flex-shrink: 0;
}

.page-today .on-clock-label {
    font-size: 13px;
    font-weight: 650;
    opacity: 0.95;
}

.page-today .on-clock-name {
    margin-left: auto;
    font-size: 13px;
    font-weight: 700;
    opacity: 0.9;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.page-today .on-clock-elapsed {
    font-size: 2.35rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 8px;
}

.page-today .on-clock-unit {
    font-size: 1.15rem;
    font-weight: 700;
    margin-right: 2px;
}

.page-today .on-clock-meta {
    font-size: 13px;
    font-weight: 600;
    opacity: 0.9;
    margin-bottom: 10px;
}

.page-today .on-clock-break {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    opacity: 0.92;
}

.page-today .on-clock-break i {
    font-size: 12px;
}

.page-today .today-shift-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--today-line);
}

.page-today .today-shift-row:last-child {
    border-bottom: none;
}

.page-today .today-shift-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--today-ink);
}

.page-today .today-shift-role {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: var(--today-muted);
    font-weight: 500;
}

.page-today .today-shift-status {
    font-size: 13px;
    font-weight: 600;
    color: var(--today-muted);
    white-space: nowrap;
}

.page-today .today-shift-status.is-in {
    color: #2F6B45;
}

.page-today .today-shift-status.is-late {
    color: #B57A35;
}

.page-today .shift-requests-section-label {
    padding: 12px 18px 4px;
    margin: 0;
}

@media (max-width: 1100px) {
    .page-today .today-grid {
        grid-template-columns: 1fr;
    }
    .page-today .needs-you-card,
    .page-today .today-shifts-card {
        grid-column: 1;
        grid-row: auto;
    }
}

@media (max-width: 900px) {
    .page-shell .dashboard-container.has-side-nav {
        flex-direction: column;
    }
    .page-shell .side-nav.top-nav {
        width: 100%;
        min-width: 0;
        height: auto;
        position: relative;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        border-right: none;
        border-bottom: 1px solid var(--today-line);
    }
    .page-shell .side-nav-org-card,
    .page-shell .side-nav-label,
    .page-shell .side-nav-user.nav-user {
        display: none;
    }
    .page-shell .side-nav-scroll {
        overflow-x: auto;
        flex: 1;
        min-width: 0;
    }
    .page-shell .side-nav .nav-tabs {
        flex-direction: row;
        flex-wrap: nowrap;
        min-width: max-content;
    }
    .page-shell .side-nav .nav-tab {
        width: auto;
        white-space: nowrap;
    }
    .page-shell .side-nav-footer {
        margin: 0;
        padding: 0;
        border: none;
        flex-direction: row;
        flex-shrink: 0;
    }
    .page-shell .side-nav-footer .nav-tab {
        width: auto;
    }
    .page-shell .side-nav-chat {
        margin-top: 0;
    }
    .page-shell:not(.page-today):not(.page-schedule) .dashboard-main {
        padding: 20px 16px 32px;
    }
    #kk-support-banner.page-shell-support-banner {
        margin: -20px -16px 16px;
    }
    .page-today .home-kpi-strip {
        grid-template-columns: 1fr 1fr;
    }
    .page-today .home-kpi-strip .home-kpi:nth-child(2) {
        border-right: none;
    }
    .page-today .home-kpi-strip .home-kpi:nth-child(1),
    .page-today .home-kpi-strip .home-kpi:nth-child(2) {
        border-bottom: 1px solid var(--today-line);
    }
    .page-today .today-date {
        font-size: 28px;
    }
    .page-today .today-main.dashboard-main {
        padding: 20px 16px 32px;
    }
}

/* ── Position department (FOH / BOH) ───────────────────────────── */
.position-dept-required { color: #A94F47; font-weight: 700; }
.position-dept-choice {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    border-radius: 12px;
}
.position-dept-choice--error .position-dept-option span {
    border-color: #A94F47;
    box-shadow: 0 0 0 3px rgba(169, 79, 71, 0.12);
}
.position-dept-option { position: relative; cursor: pointer; margin: 0; }
.position-dept-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.position-dept-option span {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 14px;
    border: 1.5px solid #DED8D1;
    border-radius: 12px;
    background: #FFFEFB;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.position-dept-option strong { font-size: 15px; color: #332A25; letter-spacing: 0.04em; }
.position-dept-option small { font-size: 12px; color: #746E69; }
.position-dept-option:hover span { border-color: #B8AEA4; }
.position-dept-option input:focus-visible + span { box-shadow: 0 0 0 3px rgba(51, 42, 37, 0.18); }
.position-dept-option input:checked + span {
    border-color: #332A25;
    background: #F3EEE7;
    box-shadow: inset 0 0 0 1px #332A25;
}

.position-dept-pill {
    margin-left: auto;
    flex-shrink: 0;
    border: none;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: filter 0.15s ease;
}
.position-dept-pill:hover { filter: brightness(0.94); }
.position-dept-pill--foh { background: #E6EEF7; color: #2F5379; }
.position-dept-pill--boh { background: #F5E9DC; color: #8A5426; }

/* ── Basic 24-color palette (Create Position + Color Code) ───── */
.position-color-picker {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}
.position-color-palette,
.schedule-color-palette-popover {
    display: grid;
    grid-template-columns: repeat(6, 28px);
    gap: 6px;
}
.position-color-chip {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1.5px solid rgba(0, 0, 0, 0.14);
    padding: 0;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.position-color-chip.is-light {
    border-color: rgba(0, 0, 0, 0.22);
}
.position-color-chip.is-selected,
.position-color-chip[aria-selected="true"] {
    outline: 2px solid #332A25;
    outline-offset: 2px;
}
.position-color-chip:hover {
    transform: scale(1.06);
}
.position-color-reset {
    border: none;
    background: none;
    padding: 0;
    font-size: 12px;
    font-weight: 600;
    color: #746E69;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.position-color-reset:hover { color: #332A25; }

/* ── Employee FOH / BOH calendar sides ───────────────────────── */
.employee-side-choice {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.employee-side-option { position: relative; cursor: pointer; margin: 0; }
.employee-side-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.employee-side-option span {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 14px;
    border: 1.5px solid #DED8D1;
    border-radius: 12px;
    background: #FFFEFB;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.employee-side-option strong { font-size: 15px; color: #332A25; letter-spacing: 0.04em; }
.employee-side-option small { font-size: 12px; color: #746E69; }
.employee-side-option:hover span { border-color: #B8AEA4; }
.employee-side-option input:checked + span {
    border-color: #332A25;
    background: #F3EEE7;
    box-shadow: inset 0 0 0 1px #332A25;
}
.employee-side-choice--error .employee-side-option span {
    border-color: #A94F47;
    box-shadow: 0 0 0 3px rgba(169, 79, 71, 0.12);
}
