:root {
    /* CRWI Logo Palette */
    --primary: #3f63a8;
    --primary-dark: #2f4d86;
    --secondary: #6fb14a;
    --accent: #f39a27;

    --bg-body: #f4f7fb;
    --bg-card: #ffffff;
    --bg-sidebar: #1b2a4a;

    --text-main: #1c2430;
    --text-muted: #6b7a90;
    --text-light: #f8fafc;

    --success: #3ea667;
    --warning: #f39a27;

    --shadow-sm: 0 1px 2px 0 rgb(15 23 42 / 0.06);
    --shadow-md: 0 6px 16px rgba(15, 23, 42, 0.12);
    --shadow-lg: 0 18px 36px rgba(15, 23, 42, 0.16);

    --radius-lg: 1rem;
    --radius-md: 0.75rem;
    --radius-full: 9999px;

    --font-sans: 'Manrope', sans-serif;
    --font-display: 'Sora', sans-serif;

    --motion-fast: 120ms;
    --motion-med: 220ms;
    --motion-slow: 420ms;
    --easing-standard: cubic-bezier(0.2, 0, 0, 1);
    --easing-emphasized: cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-body);
    color: var(--text-main);
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    width: 100%;
    height: 100%;
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
}

/* Sidebar (Desktop) */
.sidebar {
    width: 250px;
    background-color: var(--bg-sidebar);
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    padding: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    min-height: 100vh;
    overflow: hidden;
}

.sidebar.collapsed {
    width: 70px;
    padding: 1rem 0.5rem;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.sidebar-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.2s;
}

.sidebar.collapsed .sidebar-header h2 {
    opacity: 0;
    pointer-events: none;
    width: 0;
}

.logo-circle {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.logo-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-gutter: stable;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem;
    color: #9CA3AF;
    /* Gray-400 */
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: transform var(--motion-fast) var(--easing-standard),
        background var(--motion-fast) var(--easing-standard),
        color var(--motion-fast) var(--easing-standard),
        border-color var(--motion-fast) var(--easing-standard);
    font-weight: 600;
    font-size: 0.86rem;
    overflow: hidden;
    white-space: nowrap;
    --nav-icon-bg: rgba(255, 255, 255, 0.08);
    --nav-icon-active-bg: var(--primary);
    --nav-icon-fg: #cbd5f5;
}

.sidebar.collapsed .nav-item {
    padding-left: 0.85rem;
}

.nav-item span {
    transition: opacity 0.2s;
}

.sidebar.collapsed .nav-item span {
    opacity: 0;
}

.nav-item i {
    width: 30px;
    height: 30px;
    min-width: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 10px;
    font-size: 0.9rem;
    background: var(--nav-icon-bg);
    color: var(--nav-icon-fg);
    transition: transform var(--motion-fast) var(--easing-standard),
        background var(--motion-fast) var(--easing-standard),
        color var(--motion-fast) var(--easing-standard),
        box-shadow var(--motion-fast) var(--easing-standard);
}

.nav-item:hover,
.nav-item.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-item.active {
    background-color: var(--primary);
    box-shadow: 0 12px 22px rgba(15, 23, 42, 0.32);
    animation: nav-rgb-glow 6s linear infinite;
    position: relative;
}

.nav-item:hover i {
    animation: nav-jiggle 0.45s ease-in-out;
}

.nav-item:active i {
    animation: nav-jiggle 0.45s ease-in-out;
}

.mobile-nav-item:active i {
    animation: nav-jiggle 0.45s ease-in-out;
}

.nav-item.active i {
    background: var(--nav-icon-active-bg);
    color: #fff;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.35);
}

.sidebar.collapsed .nav-item i {
    width: 34px;
    height: 34px;
    min-width: 34px;
    margin: 0 auto;
    font-size: 0.95rem;
}

.nav-item[data-page="dashboard"] { --nav-icon-bg: rgba(63, 99, 168, 0.25); --nav-icon-active-bg: #3f63a8; --nav-icon-fg: #a9c1ff; }
.nav-item[data-page="staff-directory"] { --nav-icon-bg: rgba(16, 185, 129, 0.2); --nav-icon-active-bg: #10b981; --nav-icon-fg: #b7f7dd; }
.nav-item[data-page="policies"] { --nav-icon-bg: rgba(245, 158, 11, 0.2); --nav-icon-active-bg: #f59e0b; --nav-icon-fg: #fde7b0; }
.nav-item[data-page="annual-plan"] { --nav-icon-bg: rgba(99, 102, 241, 0.2); --nav-icon-active-bg: #6366f1; --nav-icon-fg: #c7c9ff; }
.nav-item[data-page="timesheet"] { --nav-icon-bg: rgba(14, 165, 233, 0.18); --nav-icon-active-bg: #0ea5e9; --nav-icon-fg: #b7e9ff; }
.nav-item[data-page="profile"] { --nav-icon-bg: rgba(236, 72, 153, 0.18); --nav-icon-active-bg: #ec4899; --nav-icon-fg: #ffc0e2; }
.nav-item[data-page="minutes"] { --nav-icon-bg: rgba(139, 92, 246, 0.2); --nav-icon-active-bg: #8b5cf6; --nav-icon-fg: #decaff; }
.nav-item[data-page="admin"] { --nav-icon-bg: rgba(249, 115, 22, 0.2); --nav-icon-active-bg: #f97316; --nav-icon-fg: #ffd2ad; }
.nav-item[data-page="master-sheet"] { --nav-icon-bg: rgba(20, 184, 166, 0.2); --nav-icon-active-bg: #14b8a6; --nav-icon-fg: #baf4ee; }
.nav-item[data-page="salary"] { --nav-icon-bg: rgba(34, 197, 94, 0.2); --nav-icon-active-bg: #22c55e; --nav-icon-fg: #c9f7d9; }
.nav-item[data-page="widget"] { --nav-icon-bg: rgba(148, 163, 184, 0.2); --nav-icon-active-bg: #64748b; --nav-icon-fg: #e2e8f0; }

@keyframes nav-jiggle {
    0% { transform: rotate(0deg) translateY(0); }
    25% { transform: rotate(-4deg) translateY(-1px); }
    50% { transform: rotate(4deg) translateY(0); }
    75% { transform: rotate(-3deg) translateY(1px); }
    100% { transform: rotate(0deg) translateY(0); }
}

@keyframes nav-rgb-glow {
    0% {
        box-shadow: 0 12px 22px rgba(15, 23, 42, 0.32),
            0 0 0 2px rgba(239, 68, 68, 0.9),
            0 0 16px rgba(239, 68, 68, 0.7);
    }
    33% {
        box-shadow: 0 12px 22px rgba(15, 23, 42, 0.32),
            0 0 0 2px rgba(34, 197, 94, 0.9),
            0 0 16px rgba(34, 197, 94, 0.7);
    }
    66% {
        box-shadow: 0 12px 22px rgba(15, 23, 42, 0.32),
            0 0 0 2px rgba(59, 130, 246, 0.9),
            0 0 16px rgba(59, 130, 246, 0.7);
    }
    100% {
        box-shadow: 0 12px 22px rgba(15, 23, 42, 0.32),
            0 0 0 2px rgba(239, 68, 68, 0.9),
            0 0 16px rgba(239, 68, 68, 0.7);
    }
}

.nav-item.has-new-msg,
.mobile-nav-item.has-new-msg {
    color: #22c55e;
    animation: navGlow 2.5s ease-in-out infinite;
}

@keyframes navGlow {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
    50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.15); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.0); }
}

.sidebar-footer {
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
    flex-shrink: 0;
}

.user-mini-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    padding: 0.4rem 0.2rem;
    border-radius: var(--radius-md);
    transition: background var(--motion-fast) var(--easing-standard);
}

.user-mini-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.user-mini-profile:hover {
    background: rgba(255, 255, 255, 0.08);
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

.sidebar.collapsed .user-mini-profile div {
    display: none;
}

.user-settings-icon {
    margin-left: auto;
    font-size: 0.9rem;
    color: #cbd5f5;
}

.sidebar.collapsed .user-settings-icon {
    display: none;
}

.user-role {
    font-size: 0.75rem;
    color: #9CA3AF;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background-color: var(--bg-body);
}

.page-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    max-width: 100%;
}

@media (max-width: 768px) {
    .page-content {
        padding: 1rem;
        padding-bottom: calc(7rem + env(safe-area-inset-bottom));
        /* Space for mobile nav with 6 items */
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* Mobile Header */
.mobile-header {
    display: none;
    padding: 1rem;
    background: var(--bg-card);
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 10;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-area h1 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
}

.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--bg-card);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    justify-content: space-around;
    padding: 0.5rem 0.1rem;
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
    z-index: 50;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.65rem;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    --nav-icon-bg: rgba(31, 41, 55, 0.08);
    --nav-icon-active-bg: var(--primary);
    --nav-icon-fg: #6b7280;
}

.mobile-nav-item i {
    font-size: 1rem;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--nav-icon-bg);
    color: var(--nav-icon-fg);
}

.mobile-nav-item.active {
    color: var(--primary);
}

.mobile-nav-item.active i {
    background: var(--nav-icon-active-bg);
    color: #fff;
}

.mobile-nav-item[data-page="dashboard"] { --nav-icon-bg: rgba(63, 99, 168, 0.2); --nav-icon-active-bg: #3f63a8; }
.mobile-nav-item[data-page="staff-directory"] { --nav-icon-bg: rgba(16, 185, 129, 0.18); --nav-icon-active-bg: #10b981; }
.mobile-nav-item[data-page="policies"] { --nav-icon-bg: rgba(245, 158, 11, 0.18); --nav-icon-active-bg: #f59e0b; }
.mobile-nav-item[data-page="annual-plan"] { --nav-icon-bg: rgba(99, 102, 241, 0.18); --nav-icon-active-bg: #6366f1; }
.mobile-nav-item[data-page="timesheet"] { --nav-icon-bg: rgba(14, 165, 233, 0.18); --nav-icon-active-bg: #0ea5e9; }
.mobile-nav-item[data-page="profile"] { --nav-icon-bg: rgba(236, 72, 153, 0.18); --nav-icon-active-bg: #ec4899; }
.mobile-nav-item[data-page="minutes"] { --nav-icon-bg: rgba(139, 92, 246, 0.18); --nav-icon-active-bg: #8b5cf6; }
.mobile-nav-item[data-page="admin"] { --nav-icon-bg: rgba(249, 115, 22, 0.18); --nav-icon-active-bg: #f97316; }
.mobile-nav-item[data-page="master-sheet"] { --nav-icon-bg: rgba(20, 184, 166, 0.18); --nav-icon-active-bg: #14b8a6; }
.mobile-nav-item[data-page="salary"] { --nav-icon-bg: rgba(34, 197, 94, 0.18); --nav-icon-active-bg: #22c55e; }

/* Responsive Logic */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 100;
        transform: translateX(-100%);
        box-shadow: 10px 0 15px -3px rgba(0, 0, 0, 0.1);
        display: flex;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .mobile-header {
        display: flex;
    }

    .mobile-nav {
        display: flex;
    }

    /* Small Phone Navigation Fix */
    @media (max-width: 360px) {
        .mobile-nav-item span {
            font-size: 0.6rem;
        }

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

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 90;
    display: none;
}

.sidebar-overlay.active {
    display: block;
}

.menu-toggle-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-main);
    cursor: pointer;
    padding: 0.5rem;
    display: none;
}

@media (max-width: 768px) {
    .menu-toggle-btn {
        display: block;
    }
}

/* Component: Card */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 0.75rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform var(--motion-med) var(--easing-standard),
        box-shadow var(--motion-med) var(--easing-standard);
    animation: fadeUp var(--motion-med) var(--easing-standard);
}

.welcome-card {
    background: linear-gradient(135deg, #1e1b4b 0%, #4338ca 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(30, 27, 75, 0.4), 0 8px 10px -6px rgba(30, 27, 75, 0.4);
    border: none;
    transition: transform 0.3s ease;
}

.welcome-card:hover {
    transform: translateY(-2px);
}

@media (max-width: 480px) {
    .welcome-card {
        flex-direction: column;
        text-align: center;
        padding: 1rem !important;
        min-height: auto !important;
    }

    .welcome-card h2 {
        font-size: 1.1rem !important;
        line-height: 1.4;
    }

    .welcome-card p {
        font-size: 0.85rem !important;
    }

    .welcome-card img,
    .welcome-card i.fa-cloud-sun {
        display: none;
    }
}

/* Component: Check In Widget */
.check-in-widget {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.timer-display {
    font-size: 2.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text-main);
    letter-spacing: -2px;
}

@media (max-width: 360px) {
    .timer-display {
        font-size: 2rem;
    }
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
}

.status-badge.in {
    background-color: #ECFDF5;
    /* Green-50 */
    color: var(--success);
}

.status-badge.out {
    background-color: #FEF2F2;
    /* Red-50 */
    color: var(--accent);
}

.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge.manual {
    background-color: #fefce8;
    color: #854d0e;
    border: 1px solid #fef08a;
}

.action-btn {
    background: linear-gradient(to right, var(--success), #059669);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.39);
    transition: transform var(--motion-fast) var(--easing-standard),
        box-shadow var(--motion-fast) var(--easing-standard),
        filter var(--motion-fast) var(--easing-standard);
}

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

.action-btn.checkout {
    background: linear-gradient(to right, var(--accent), #e11d48);
    box-shadow: 0 4px 14px 0 rgba(244, 63, 94, 0.39);
}

.location-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.75rem;
    animation: fadeUp var(--motion-med) var(--easing-standard);
}

.full-width {
    grid-column: 1 / -1;
}

/* Timesheet Table */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 0.6rem;
    text-align: left;
    border-bottom: 1px solid #E5E7EB;
}

@media (max-width: 640px) {

    .mobile-table-card table,
    .mobile-table-card thead,
    .mobile-table-card tbody,
    .mobile-table-card th,
    .mobile-table-card td,
    .mobile-table-card tr {
        display: block;
    }

    .mobile-table-card thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .mobile-table-card tr {
        border: 1px solid #E5E7EB;
        border-radius: var(--radius-md);
        margin-bottom: 1rem;
        padding: 0.5rem;
        background: white;
    }

    .mobile-table-card td {
        border: none;
        border-bottom: 1px solid #f3f4f6;
        position: relative;
        padding-left: 50% !important;
        text-align: right !important;
        min-height: 2.5rem;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    .mobile-table-card td:last-child {
        border-bottom: 0;
    }

    .mobile-table-card td:before {
        position: absolute;
        left: 0.5rem;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: 600;
        color: var(--text-muted);
        content: attr(data-label);
        font-size: 0.75rem;
    }
}

/* Chip Buttons */
.chip-btn {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.chip-btn:hover {
    background: #e5e7eb;
    color: var(--text-main);
}

.chip-btn:active {
    transform: scale(0.95);
    background: #d1d5db;
}

/* Component: Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: linear-gradient(180deg, rgba(71, 36, 12, 0.18) 0%, rgba(15, 23, 42, 0.42) 100%);
    backdrop-filter: blur(7px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    animation: fadeUp var(--motion-fast) var(--easing-standard);
}

.modal-content {
    background: linear-gradient(180deg, #fffef9 0%, #fff7ed 100%);
    padding: 1.35rem;
    border-radius: 1rem;
    border: 1px solid #f5d0a6;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 22px 36px rgba(15, 23, 42, 0.24), 0 4px 12px rgba(120, 53, 15, 0.15);
    position: relative;
    animation: scaleIn var(--motion-med) var(--easing-emphasized);
    transition: transform var(--motion-med) var(--easing-emphasized);
}

.modal-content h2,
.modal-content h3 {
    color: #7c2d12;
    letter-spacing: 0.01em;
}

.modal-content p,
.modal-content label {
    color: #78350f;
}

.modal-content input,
.modal-content select,
.modal-content textarea {
    border-color: #f5d0a6 !important;
    background: #fffefb !important;
}

.modal-content input:focus,
.modal-content select:focus,
.modal-content textarea:focus {
    border-color: #fb923c !important;
    box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.16);
}

.app-system-dialog {
    max-width: 460px;
}

.app-system-dialog-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
}

.app-system-dialog-head h3 {
    margin: 0;
}

.app-system-dialog-close {
    width: 2rem;
    height: 2rem;
    border: 1px solid #fed7aa;
    border-radius: 999px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 1.1rem;
    cursor: pointer;
}

.app-system-dialog-body p {
    margin: 0;
    line-height: 1.5;
}

.app-system-dialog-input {
    margin-top: 0.8rem;
    width: 100%;
}

.app-system-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.55rem;
    margin-top: 1rem;
}

.annual-staff-filter {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid #d6def5;
    background: #ffffff;
    border-radius: 10px;
    padding: 0.38rem 0.55rem;
    min-width: 210px;
}

.annual-staff-filter i {
    color: #6366f1;
    font-size: 0.8rem;
}

.annual-staff-filter input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    font-size: 0.82rem;
    color: #334155;
}

.timesheet-view-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.timesheet-view-mode-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid #d6def5;
    border-radius: 10px;
    background: #fff;
    padding: 0.3rem 0.45rem;
}

.timesheet-view-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
}

.timesheet-view-select {
    border: none;
    background: transparent;
    color: #1f2937;
    font-weight: 700;
    font-size: 0.8rem;
    outline: none;
    cursor: pointer;
}

.timesheet-month-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.timesheet-month-switch button {
    border: 1px solid #d6def5;
    background: #fff;
    color: #334155;
    border-radius: 8px;
    min-width: 32px;
    height: 32px;
    cursor: pointer;
}

.timesheet-month-label {
    min-width: 132px;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 700;
    color: #3730a3;
    padding: 0 0.35rem;
}

.timesheet-today-btn {
    padding: 0 0.6rem;
    min-width: auto !important;
    font-weight: 700;
}

.timesheet-calendar-wrap {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}

.timesheet-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f8fafc;
}

.timesheet-calendar-weekdays div {
    padding: 0.55rem 0.45rem;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    border-right: 1px solid #eef2f7;
}

.timesheet-calendar-weekdays div:last-child {
    border-right: none;
}

.timesheet-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0;
}

.timesheet-cal-day {
    min-height: 128px;
    border-right: 1px solid #eef2f7;
    border-top: 1px solid #eef2f7;
    padding: 0.45rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.timesheet-cal-day.empty {
    background: #f8fafc;
}

.timesheet-cal-day.today {
    background: #f8faff;
}

.timesheet-cal-day-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.35rem;
}

.timesheet-cal-date {
    font-size: 0.82rem;
    font-weight: 800;
    color: #334155;
}

.timesheet-cal-attendance {
    font-size: 0.68rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 0.15rem 0.45rem;
    border: 1px solid #e2e8f0;
    color: #64748b;
}

.timesheet-cal-attendance.present {
    background: #ecfdf3;
    color: #166534;
    border-color: #bbf7d0;
}

.timesheet-cal-attendance.late {
    background: #fff7ed;
    color: #9a3412;
    border-color: #fed7aa;
}

.timesheet-cal-plans {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.timesheet-cal-plan {
    font-size: 0.72rem;
    color: #1e293b;
    background: #eef2ff;
    border: 1px solid #dbeafe;
    border-radius: 7px;
    padding: 0.28rem 0.35rem;
    line-height: 1.25;
}

.timesheet-cal-empty,
.timesheet-cal-more {
    font-size: 0.68rem;
    color: #94a3b8;
}

.timesheet-day-detail-item {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.55rem;
    background: #fff;
    margin-bottom: 0.45rem;
}

.timesheet-day-detail-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
    font-size: 0.78rem;
    color: #334155;
    font-weight: 700;
}

.timesheet-day-status-chip {
    background: #eef2ff;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    padding: 0.12rem 0.45rem;
    font-size: 0.68rem;
}

.timesheet-day-detail-text {
    font-size: 0.8rem;
    color: #1e293b;
    margin-bottom: 0.5rem;
    line-height: 1.35;
}

.timesheet-day-plan-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.4rem 0.5rem;
    font-size: 0.78rem;
    color: #334155;
    margin-bottom: 0.35rem;
}

.timesheet-day-detail-empty {
    font-size: 0.78rem;
    color: #94a3b8;
    padding: 0.4rem 0.2rem;
}

@media (max-width: 900px) {
    .annual-staff-filter {
        width: 100%;
        min-width: 0;
        order: -1;
    }
    .timesheet-month-label {
        min-width: 104px;
        font-size: 0.74rem;
    }
    .timesheet-cal-day {
        min-height: 112px;
        padding: 0.32rem;
    }
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-avatar-container {
    position: relative;
    width: 80px;
    height: 80px;
}

.profile-avatar-container img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.2);
    object-fit: cover;
}

.timesheet-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.compact-table th,
.compact-table td {
    padding: 8px 12px;
    font-size: 0.85rem;
}

.compact-table td .time-badge {
    display: inline-flex;
    flex-direction: column;
    font-size: 0.75rem;
}

.compact-table td .time-badge span {
    font-weight: 600;
}

.compact-table td .time-badge .out {
    color: var(--accent);
}

.compact-table td .time-badge .in {
    color: var(--success);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Mention Dropdown Styling */
#mention-dropdown {
    scrollbar-width: thin;
    scrollbar-color: #e2e8f0 transparent;
}

#mention-dropdown::-webkit-scrollbar {
    width: 4px;
}

#mention-dropdown::-webkit-scrollbar-thumb {
    background-color: #e2e8f0;
    border-radius: 4px;
}

.mention-item:hover {
    background-color: #f8fafc;
}

.mention-item img {
    border: 1px solid #f1f5f9;
}

/* Annual Plan Styles */
.annual-plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    padding: 0.35rem;
    max-width: 980px;
    justify-self: start;
}

.annual-month-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 18px;
    padding: 0.85rem;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.18);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.annual-month-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.annual-month-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.12), transparent 55%);
    pointer-events: none;
}

.annual-month-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.45rem;
    margin-bottom: 0.7rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    position: relative;
    z-index: 1;
}

.annual-month-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: #1e293b;
}

.annual-month-year {
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.annual-cal-mini {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    font-size: 0.74rem;
    position: relative;
    z-index: 1;
}

.annual-weekday {
    font-weight: 700;
    color: #94a3b8;
    text-align: center;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.annual-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    font-weight: 500;
    color: #334155;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: transform var(--motion-fast) var(--easing-standard),
        box-shadow var(--motion-fast) var(--easing-standard),
        background var(--motion-fast) var(--easing-standard);
}

.annual-day:hover:not(.empty) {
    background: #e0f2fe;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(14, 116, 144, 0.18);
}

.annual-day.today {
    background: linear-gradient(135deg, var(--primary) 0%, #38bdf8 100%);
    color: white;
    font-weight: 700;
    border-color: transparent;
    box-shadow: 0 10px 18px rgba(37, 99, 235, 0.35);
}

.annual-day .dot-container {
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 3px;
}

.status-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9);
}

.dot-leave {
    background: #ef4444;
}

.dot-event {
    background: #10b981;
}

.dot-work {
    background: #6366f1;
}

.annual-day.has-work {
    border: 1.5px solid #a5b4fc;
}

.annual-day.work-overdue {
    border-color: #fca5a5;
    background: #fff1f2;
}

.annual-day.work-completed {
    border-color: #86efac;
    background: #ecfdf5;
}

.annual-day.empty {
    background: transparent;
    border: none;
    box-shadow: none;
    cursor: default;
}

.desktop-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    margin-left: auto;
    transition: background 0.2s;
}

.desktop-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
    .desktop-toggle-btn {
        display: none;
    }
}

body {
    background:
        radial-gradient(circle at 15% 10%, rgba(63, 99, 168, 0.12) 0, transparent 40%),
        radial-gradient(circle at 85% 85%, rgba(111, 177, 74, 0.12) 0, transparent 42%),
        linear-gradient(180deg, #f8fafc 0%, #eef3f9 100%);
    letter-spacing: 0.01em;
}

.app-container {
    max-width: 1540px;
    padding: 1rem;
    gap: 1rem;
}

.sidebar {
    border-radius: 1.25rem;
    background: linear-gradient(180deg, #1b2a4a 0%, #141e35 100%);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-header h2 {
    font-family: var(--font-display);
    font-size: 1.02rem;
    letter-spacing: 0.02em;
}

.nav-item {
    border: 1px solid transparent;
    border-radius: 0.9rem;
}

.nav-item:hover {
    border-color: rgba(148, 163, 184, 0.3);
    transform: translateX(2px);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-color: rgba(255, 255, 255, 0.18);
    animation: nav-rgb-glow 6s linear infinite;
    box-shadow: 0 12px 22px rgba(15, 23, 42, 0.32);
}

.nav-item:hover i {
    animation: nav-jiggle 0.45s ease-in-out;
}

.main-content {
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow-md);
}

.mobile-header {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.mobile-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.mobile-nav-item.active {
    color: var(--primary);
}

.page-content {
    padding: 1.2rem;
    gap: 1.1rem;
}

.dashboard-grid {
    gap: 1.1rem;
}

.card {
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.action-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 0.8rem;
    border: 1px solid rgba(15, 118, 110, 0.25);
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 10px 18px rgba(15, 118, 110, 0.24);
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 22px rgba(15, 118, 110, 0.28);
}

.action-btn.secondary {
    background: #ffffff;
    color: var(--text-main);
    border: 1px solid #cbd5e1;
    box-shadow: none;
}

.icon-btn {
    border-radius: 0.75rem;
    border: 1px solid #dbe3ee;
    background: rgba(255, 255, 255, 0.86);
}

input,
select,
textarea {
    border-radius: 0.75rem;
    border: 1px solid #cbd5e1;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14);
}

.table-container table {
    border-collapse: separate;
    border-spacing: 0;
}

.table-container thead th {
    position: sticky;
    top: 0;
    background: #f8fafc;
    z-index: 2;
    font-weight: 700;
    color: #334155;
}

.table-container tbody tr {
    transition: background-color 0.18s ease;
}

.table-container tbody tr:hover {
    background: #f8fbff;
}

.modal-content {
    border: 1px solid #dbe3ee;
    border-radius: 1rem;
}

#page-content>* {
    animation: fadeIn 220ms ease-out;
}

@media (max-width: 768px) {
    .app-container {
        padding: 0;
        gap: 0;
    }

    .main-content {
        border-radius: 0;
        border: none;
    }

    .card {
        border-radius: 0.9rem;
    }
}

/* Dashboard/Admin Modernization Phase */
.dashboard-modern {
    gap: 1rem;
}

.dashboard-modern .card {
    border: 1px solid #dbe3ee;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
    transition: transform var(--motion-med) var(--easing-standard),
        box-shadow var(--motion-med) var(--easing-standard);
}

.dashboard-modern .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.1);
}

.dashboard-modern .full-width {
    border-radius: 1rem;
}

.dashboard-staff-view .dashboard-summary-row,
.dashboard-admin-view .dashboard-summary-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    grid-column: 1 / -1;
    margin-bottom: 1rem;
}

.dashboard-staff-view .dashboard-stats-row,
.dashboard-admin-view .dashboard-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    align-items: start;
    grid-column: 1 / -1;
}

.dashboard-modern .check-in-widget {
    border: 1px solid #dbeafe !important;
    border-radius: 1rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
}

.dashboard-modern .check-in-widget #attendance-btn {
    min-height: 44px;
    border-radius: 0.75rem !important;
    transition: transform var(--motion-fast) var(--easing-standard),
        box-shadow var(--motion-fast) var(--easing-standard),
        background var(--motion-fast) var(--easing-standard),
        color var(--motion-fast) var(--easing-standard);
}

.dashboard-modern .check-in-widget .timer-display {
    font-size: 2.1rem !important;
    letter-spacing: -1px;
}

.dashboard-modern .check-in-widget #timer-label {
    color: #64748b !important;
    font-size: 0.68rem !important;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.dashboard-modern .check-in-widget #countdown-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    padding: 0.5rem;
}

.dashboard-modern .check-in-widget #overtime-container {
    background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%) !important;
    border-color: #fed7aa !important;
}

.dashboard-modern .check-in-widget #location-text {
    font-size: 0.7rem !important;
    color: #64748b !important;
}

.dashboard-modern .card h3,
.dashboard-modern .card h4 {
    color: var(--text-main);
    letter-spacing: 0.01em;
}

.dashboard-modern .table-container {
    border: 1px solid #e2e8f0;
    border-radius: 0.9rem;
    overflow: auto;
    background: #fff;
}

.dashboard-modern .table-container thead th {
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #475569;
}

.dashboard-modern .table-container tbody td {
    font-size: 0.82rem;
    color: #334155;
}

.dashboard-modern .table-container tbody tr:hover {
    background: #f8fbff !important;
}

.dashboard-admin-view .action-btn,
.dashboard-staff-view .action-btn {
    font-size: 0.86rem;
    border-radius: 0.7rem;
}

.dashboard-modern .chip-btn {
    border-radius: 999px;
    font-weight: 700;
    background: #f8fafc;
}

.dashboard-modern .status-badge {
    border: 1px solid transparent;
    font-weight: 700;
    font-size: 0.76rem;
}

.dashboard-modern .status-badge.in {
    border-color: #bbf7d0;
}

.dashboard-modern .status-badge.out {
    border-color: #fecaca;
}

.dashboard-admin-view .card.full-width:nth-of-type(2) {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.dashboard-admin-view .card.full-width:nth-of-type(4) {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.dashboard-modern .text-muted {
    color: #64748b !important;
}

.dashboard-hero-card {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: #fff;
    padding: 0.72rem 1rem !important;
    position: relative;
    overflow: hidden;
    min-height: 122px;
}

.dashboard-hero-orb {
    position: absolute;
    border-radius: 50%;
}

.dashboard-hero-orb-top {
    top: -28px;
    right: -28px;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.05);
}

.dashboard-hero-orb-bottom {
    bottom: -22px;
    left: -14px;
    width: 110px;
    height: 110px;
    background: rgba(255, 255, 255, 0.03);
}

.dashboard-hero-content {
    position: relative;
    z-index: 1;
}

.dashboard-hero-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.dashboard-hero-copy {
    flex: 1;
    min-width: 240px;
}

.dashboard-hero-title {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.dashboard-hero-date {
    margin: 0.15rem 0 0 0;
    opacity: 0.9;
    font-size: 0.68rem;
}

.dashboard-hero-chip-row {
    margin-top: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.dashboard-hero-chip {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.14);
    padding: 3px 8px;
    border-radius: 999px;
    backdrop-filter: blur(10px);
    min-height: 24px;
    font-size: 0.75rem;
}

.dashboard-refresh-link {
    position: absolute;
    right: 1rem;
    bottom: 0.35rem;
    background: none;
    border: none;
    color: #ff8b8b;
    font-size: 0.66rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 2px;
    letter-spacing: 0.01em;
    z-index: 2;
}

.dashboard-refresh-link:hover {
    color: #ff5c5c;
}

@media (max-width: 640px) {
    .dashboard-refresh-link {
        position: relative;
        right: auto;
        bottom: auto;
        margin-top: 0.5rem;
        align-self: flex-end;
    }
}

.dashboard-hero-chip-label {
    font-size: 0.62rem;
    font-weight: 600;
    opacity: 0.9;
}

.dashboard-hero-chip-icon {
    color: #86efac;
    font-size: 0.9rem;
}

.dashboard-viewing-box {
    position: relative;
    z-index: 10;
    flex: 1.2;
    display: flex;
    justify-content: center;
    min-width: 190px;
}

.dashboard-viewing-inner {
    background: #f1f5f9;
    padding: 0.3rem 0.5rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    max-width: 260px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.dashboard-viewing-icon {
    color: #4f46e5;
    font-size: 0.8rem;
}

.dashboard-viewing-meta {
    flex: 1;
}

.dashboard-viewing-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2px;
}

.dashboard-viewing-label {
    font-size: 0.52rem;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dashboard-viewing-state {
    font-size: 0.55rem;
    color: #c2410c;
    background: #fff7ed;
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: 800;
    border: 1px solid #ffedd5;
}

.dashboard-viewing-select {
    width: 100%;
    background: transparent;
    color: #1e1b4b;
    border: none;
    font-size: 0.68rem;
    font-weight: 700;
    outline: none;
    cursor: pointer;
    padding: 0;
}

.dashboard-hero-weather {
    position: relative;
    z-index: 1;
}

.dashboard-hero-weather-icon {
    font-size: 1.7rem;
    color: #fbbf24;
    filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.4));
}

@media (max-width: 760px) {
    .dashboard-hero-card {
        padding: 0.62rem !important;
        min-height: auto;
    }

    .dashboard-hero-copy {
        min-width: 0;
    }

    .dashboard-hero-title {
        font-size: 0.86rem;
    }

    .dashboard-hero-date {
        font-size: 0.64rem;
    }

    .dashboard-hero-weather-icon {
        font-size: 1.45rem;
    }

    .dashboard-hero-row {
        align-items: flex-start;
    }
}

.dashboard-primary-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    grid-column: 1 / -1;
    margin-bottom: 0.75rem;
    align-items: stretch;
}

.dashboard-worklog-card {
    padding: 0.65rem !important;
    display: flex;
    flex-direction: column;
    height: 100%;
    flex: 1 1 auto;
    min-height: 0;
}

.dashboard-worklog-head {
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.35rem;
}

.dashboard-worklog-head h4 {
    margin: 0;
    font-size: 0.92rem;
    color: #1f2937;
}

.dashboard-worklog-head span {
    font-size: 0.66rem;
    color: #64748b;
}

.dashboard-worklog-staff {
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 800;
}

.dashboard-worklog-filter-row {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
    align-items: center;
}

.dashboard-worklog-date-input {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.2rem 0.3rem;
    font-size: 0.75rem;
    width: 104px;
}

.dashboard-worklog-to {
    color: #94a3b8;
    font-size: 0.75rem;
}

.dashboard-worklog-go-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.22rem 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
    font-weight: 700;
}

.dashboard-worklog-list {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    font-size: 0.75rem;
    padding-right: 5px;
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    scrollbar-gutter: stable;
    overscroll-behavior: contain;
    max-height: clamp(210px, 32vh, 260px);
}

.dashboard-team-activity-card {
    padding: 0.75rem !important;
    display: flex;
    flex-direction: column;
    height: 100%;
    flex: 1 1 auto;
    min-height: 0;
}

.dashboard-team-activity-head {
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.35rem;
}

.dashboard-team-activity-head h4 {
    margin: 0;
    color: #1f2937;
    font-size: 0.9rem;
}

.dashboard-team-activity-head span {
    font-size: 0.65rem;
    color: #6b7280;
}

.dashboard-team-activity-filters {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.dashboard-team-chip {
    font-size: 0.7rem !important;
    padding: 0.3rem 0.6rem !important;
}

.dashboard-team-activity-list {
    flex: 1;
    overflow-y: auto;
    font-size: 0.75rem;
    padding-right: 5px;
    scroll-behavior: smooth;
    min-height: 0;
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    scrollbar-gutter: stable;
    overscroll-behavior: contain;
    max-height: clamp(210px, 32vh, 260px);
}

.dashboard-staff-directory-card {
    padding: 0.75rem !important;
    display: flex;
    flex-direction: column;
    height: 100%;
    flex: 1 1 auto;
    min-height: 0;
}

.dashboard-staff-directory-head {
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.35rem;
}

.dashboard-staff-directory-head h4 {
    margin: 0;
    color: #1f2937;
    font-size: 0.9rem;
}

.dashboard-staff-directory-head span {
    font-size: 0.65rem;
    color: #6b7280;
}

.dashboard-staff-directory-list {
    flex: 1;
    overflow-y: auto;
    font-size: 0.75rem;
    padding-right: 5px;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    scrollbar-gutter: stable;
    overscroll-behavior: contain;
    max-height: clamp(210px, 32vh, 260px);
}

.dashboard-recent-activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
    min-height: 0;
    padding-bottom: 0;
    scrollbar-gutter: stable;
    overscroll-behavior: contain;
    max-height: clamp(210px, 32vh, 260px);
}

.dashboard-worklog-list,
.dashboard-team-activity-list,
.dashboard-recent-activity-list,
.dashboard-staff-directory-list {
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 116, 139, 0.5) transparent;
}

.dashboard-worklog-list::-webkit-scrollbar,
.dashboard-team-activity-list::-webkit-scrollbar,
.dashboard-recent-activity-list::-webkit-scrollbar,
.dashboard-staff-directory-list::-webkit-scrollbar {
    width: 8px;
}

.dashboard-worklog-list::-webkit-scrollbar-track,
.dashboard-team-activity-list::-webkit-scrollbar-track,
.dashboard-recent-activity-list::-webkit-scrollbar-track,
.dashboard-staff-directory-list::-webkit-scrollbar-track {
    background: transparent;
}

.dashboard-worklog-list::-webkit-scrollbar-thumb,
.dashboard-team-activity-list::-webkit-scrollbar-thumb,
.dashboard-recent-activity-list::-webkit-scrollbar-thumb,
.dashboard-staff-directory-list::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.7);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: content-box;
}

.dashboard-recent-activity-card {
    flex: 1 1 auto;
    min-height: 0;
}

.dashboard-worklog-list .dashboard-activity-date,
.dashboard-team-activity-list .dashboard-activity-date {
    margin: 0.1rem 0 0.15rem;
    padding: 2px 6px;
    font-size: 0.72rem;
}

.dashboard-worklog-list .dashboard-activity-item {
    margin-left: 0.4rem;
    padding: 2px 0 2px 0.6rem;
    margin-bottom: 0;
}

.dashboard-team-activity-list .dashboard-staff-activity-item {
    margin-left: 0.4rem;
    padding-left: 0.6rem;
    margin-bottom: 0;
}

.dashboard-worklog-list .dashboard-activity-desc,
.dashboard-team-activity-list .dashboard-activity-desc,
.dashboard-team-activity-list .dashboard-staff-activity-desc {
    font-size: 0.78rem;
    line-height: 1.2;
}

.dashboard-worklog-list .dashboard-activity-meta,
.dashboard-team-activity-list .dashboard-activity-meta {
    font-size: 0.64rem;
    margin-top: 1px;
}

.dashboard-team-activity-list .dashboard-staff-name {
    font-size: 0.75rem;
}

.dashboard-staff-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.45rem 0.5rem;
    border: 1px solid #eef2f7;
    border-radius: 10px;
    background: #ffffff;
}

.dashboard-staff-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.dashboard-staff-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    position: relative;
}

.dashboard-staff-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: block;
}

.staff-status-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: 2px solid #ffffff;
    background: #94a3b8;
}

.staff-status-dot.online {
    background: #22c55e;
}

.staff-status-dot.checkedin {
    background: #ef4444;
}

.staff-status-dot.offline {
    background: #94a3b8;
}

.dashboard-staff-text {
    min-width: 0;
}

.dashboard-staff-name {
    font-weight: 700;
    color: #1f2937;
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.dashboard-staff-role {
    color: #94a3b8;
    font-size: 0.68rem;
}

.dashboard-staff-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.dashboard-staff-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.75rem;
}

.dashboard-staff-btn:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #3730a3;
}

.dashboard-staff-btn.accept {
    background: #ecfdf5;
    border-color: #bbf7d0;
    color: #166534;
}

.dashboard-staff-btn.reject {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.dashboard-staff-pending {
    font-size: 0.65rem;
    font-weight: 700;
    color: #7c3aed;
    background: #f3e8ff;
    border-radius: 999px;
    padding: 2px 6px;
}

.dashboard-staff-row-new {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
    animation: staffGlow 2.5s ease-in-out 1;
}

@keyframes staffGlow {
    0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.45); }
    50% { box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.15); }
    100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.0); }
}

.dashboard-tagged-card {
    padding: 0.85rem;
}

.dashboard-tagged-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eef2f7;
    padding-bottom: 0.4rem;
    margin-bottom: 0.6rem;
}

.dashboard-tagged-head h4 {
    margin: 0;
    font-size: 0.95rem;
}

.dashboard-tagged-head span {
    font-size: 0.7rem;
    color: #64748b;
}

.dashboard-tagged-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.dashboard-tagged-item {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.6rem 0.75rem;
    background: #ffffff;
}

.dashboard-tagged-title {
    font-weight: 700;
    color: #0f172a;
    font-size: 0.85rem;
}

.dashboard-tagged-desc {
    color: #64748b;
    font-size: 0.75rem;
}

.dashboard-tagged-meta {
    color: #94a3b8;
    font-size: 0.7rem;
    margin-top: 0.2rem;
}

.dashboard-tagged-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
}

.dashboard-tagged-pill {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
}

.dashboard-tagged-pill.pending { background: #fffbeb; color: #92400e; }
.dashboard-tagged-pill.accepted { background: #ecfdf5; color: #166534; }
.dashboard-tagged-pill.rejected { background: #fef2f2; color: #991b1b; }

.dashboard-tagged-actions {
    display: flex;
    gap: 0.35rem;
}

.dashboard-tagged-btn {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #334155;
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 0.7rem;
    cursor: pointer;
}

.dashboard-tagged-btn.accept { background: #ecfdf5; border-color: #bbf7d0; color: #166534; }
.dashboard-tagged-btn.reject { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

.dashboard-notifications-card {
    padding: 0.85rem;
    background: #fff7ed;
    border-left: 5px solid #f59e0b;
}

.dashboard-notifications-card h4 {
    margin: 0 0 0.6rem 0;
    color: #b45309;
}

.dashboard-notifications-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dashboard-notif-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.dashboard-notif-col {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.dashboard-notif-col.right {
    align-items: flex-end;
    text-align: right;
}

.dashboard-notif-close {
    border: 1px solid #fcd34d;
    background: #fff7ed;
    color: #92400e;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-bottom: 0.2rem;
}

.dashboard-notif-close:hover {
    background: #ffedd5;
}

.dashboard-notif-name {
    font-weight: 700;
    color: #92400e;
    font-size: 0.82rem;
}

.dashboard-notif-summary {
    font-size: 0.75rem;
    color: #78350f;
}

.dashboard-notif-snippet {
    font-size: 0.75rem;
    color: #92400e;
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-notif-time {
    font-size: 0.65rem;
    color: #b45309;
}

.daily-plan-reminder-modal {
    max-width: 520px;
    border: 1px solid #fde68a;
    background: linear-gradient(180deg, #fffdf4 0%, #fff7e6 100%);
}

.daily-plan-reminder-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.8rem;
}

.daily-plan-reminder-badge {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: #fef3c7;
    color: #b45309;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #fcd34d;
}

.daily-plan-reminder-head h3 {
    margin: 0;
    font-size: 1.05rem;
    color: #7c2d12;
}

.daily-plan-reminder-head p {
    margin: 0.1rem 0 0 0;
    font-size: 0.8rem;
    color: #92400e;
}

.daily-plan-reminder-note {
    margin: 0 0 0.6rem 0;
    font-size: 0.86rem;
    color: #78350f;
}

.daily-plan-reminder-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.daily-plan-reminder-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #451a03;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid #fef3c7;
    border-radius: 10px;
    padding: 0.42rem 0.55rem;
}

.daily-plan-reminder-index {
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    background: #fde68a;
    color: #92400e;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.daily-plan-reminder-more {
    font-size: 0.75rem;
    color: #92400e;
    padding-left: 0.3rem;
}

.daily-plan-reminder-empty {
    font-size: 0.85rem;
    color: #92400e;
    background: rgba(255, 255, 255, 0.65);
    border: 1px dashed #f59e0b;
    border-radius: 10px;
    padding: 0.6rem;
}

.daily-plan-reminder-actions {
    margin-top: 0.95rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.daily-plan-reminder-modal.daily-theme-morning {
    border-color: #fde68a;
    background: linear-gradient(180deg, #fffdf4 0%, #fff7e6 100%);
}

.daily-plan-reminder-modal.daily-theme-afternoon {
    border-color: #fdba74;
    background: linear-gradient(180deg, #fffbf5 0%, #ffedd5 100%);
}

.daily-plan-reminder-modal.daily-theme-evening {
    border-color: #c4b5fd;
    background: linear-gradient(180deg, #f8f7ff 0%, #ede9fe 100%);
}

.daily-plan-reminder-modal.daily-theme-night {
    border-color: #94a3b8;
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
}

.daily-plan-reminder-modal.daily-theme-afternoon .daily-plan-reminder-badge {
    background: #ffedd5;
    border-color: #fdba74;
    color: #c2410c;
}

.daily-plan-reminder-modal.daily-theme-evening .daily-plan-reminder-badge {
    background: #ede9fe;
    border-color: #c4b5fd;
    color: #6d28d9;
}

.daily-plan-reminder-modal.daily-theme-night .daily-plan-reminder-badge {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #334155;
}

.notify-combined-modal {
    width: min(760px, 94vw);
}

.notify-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.notify-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.notify-col h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: #1f2937;
}

.notify-col label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: #475569;
}

.notify-col input,
.notify-col textarea {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.6rem;
    font-family: inherit;
    font-size: 0.85rem;
}

.notify-actions {
    display: flex;
    gap: 1rem;
}

.notify-cancel-btn {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 0.6rem;
    cursor: pointer;
}

.notify-send-btn {
    flex: 1;
    padding: 0.75rem;
    border-radius: 0.6rem;
}

@media (max-width: 900px) {
    .notify-columns {
        grid-template-columns: 1fr;
    }
    .dashboard-notif-row {
        grid-template-columns: 1fr;
    }
    .dashboard-notif-col.right {
        align-items: flex-start;
        text-align: left;
    }
}

/* Staff Directory Messaging */
.staff-directory-page {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1rem;
}

.staff-directory-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    min-height: 70vh;
}

.staff-directory-panel-head h3 {
    margin: 0;
    font-size: 1rem;
    color: #0f172a;
}

.staff-directory-panel-head span {
    font-size: 0.75rem;
    color: #64748b;
}

.staff-directory-list {
    margin-top: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    overflow-y: auto;
    flex: 1;
}

.staff-directory-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.6rem;
    border-radius: 12px;
    border: 1px solid transparent;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s ease;
}

.staff-directory-item.active {
    border-color: #c7d2fe;
    background: #eef2ff;
}

.staff-directory-avatar img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
}

.staff-directory-avatar {
    position: relative;
    width: 34px;
    height: 34px;
}

.staff-directory-info {
    flex: 1;
    text-align: left;
}

.staff-directory-name {
    font-weight: 700;
    font-size: 0.82rem;
    color: #1f2937;
}

.staff-directory-role {
    font-size: 0.7rem;
    color: #94a3b8;
}

.staff-directory-badge {
    background: #22c55e;
    color: white;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 999px;
    font-weight: 700;
}

.staff-thread-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    min-height: 70vh;
}

.staff-thread-head h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #0f172a;
}

.staff-thread-head span {
    font-size: 0.75rem;
    color: #64748b;
}

.staff-thread-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.staff-thread-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.staff-thread-action-btn {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #0f172a;
    border-radius: 10px;
    padding: 0.45rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.staff-thread-action-btn.secondary {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.staff-thread-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.staff-thread-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
    flex: 1;
    min-height: 0;
}

.staff-thread-column {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 0;
}

.staff-thread-column-head {
    font-weight: 700;
    color: #1f2937;
}

.staff-message-modal {
    width: min(560px, 92vw);
}

.staff-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.8rem;
}

.staff-modal-head h3 {
    margin: 0;
    font-size: 1.1rem;
}

.staff-modal-head span {
    font-size: 0.8rem;
    color: #64748b;
}

.staff-modal-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: #64748b;
}

.staff-modal-form {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.staff-modal-form input,
.staff-modal-form textarea {
    padding: 0.65rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9rem;
}

.staff-thread-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.staff-thread-form input,
.staff-thread-form textarea {
    padding: 0.6rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.85rem;
}

.staff-thread-history {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 0.6rem;
    background: #f8fafc;
}

.staff-message {
    padding: 0.5rem 0.6rem;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.staff-message.outgoing {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.staff-message-meta {
    font-size: 0.7rem;
    color: #64748b;
    margin-bottom: 0.2rem;
}

.staff-message-body {
    font-size: 0.85rem;
    color: #0f172a;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.45;
}

.staff-message-body a {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.staff-message-link a {
    display: inline-block;
    max-width: 100%;
    font-size: 0.75rem;
    color: #2563eb;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.staff-message-empty {
    text-align: center;
    color: #94a3b8;
    padding: 1rem;
}

.staff-task-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.6rem 0.75rem;
}

.staff-task-head {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

.staff-task-title {
    font-weight: 700;
    color: #0f172a;
    font-size: 0.85rem;
}

.staff-task-meta {
    font-size: 0.7rem;
    color: #64748b;
}

.staff-task-status {
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 700;
    background: #fffbeb;
    color: #92400e;
    height: fit-content;
}

.staff-task-status.approved {
    background: #ecfdf5;
    color: #166534;
}

.staff-task-status.rejected {
    background: #fef2f2;
    color: #991b1b;
}

.staff-task-desc {
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: #475569;
}

.staff-task-actions {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.staff-task-btn {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #334155;
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 0.7rem;
    cursor: pointer;
}

.staff-task-btn.approve {
    background: #ecfdf5;
    border-color: #bbf7d0;
    color: #166534;
}

.staff-task-btn.reject {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.staff-task-reason {
    margin-top: 0.4rem;
    font-size: 0.7rem;
    color: #b91c1c;
}

.checkout-task-layout {
    display: block;
    width: 100%;
}

#checkout-task-checklist.delegate-open .checkout-task-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 34%);
    gap: 0.75rem;
    align-items: start;
}

.checkout-task-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(140px, 180px);
    gap: 0.75rem;
    align-items: start;
    padding: 0.6rem 0;
    border-bottom: 1px dashed #e5e7eb;
    width: 100%;
}

.checkout-task-copy {
    min-width: 0;
}

.checkout-task-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.35;
    word-break: normal;
    overflow-wrap: anywhere;
    hyphens: auto;
}

.postponed-source-chip {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #6b21a8;
    background: #f3e8ff;
    border: 1px solid #ddd6fe;
    white-space: nowrap;
    vertical-align: middle;
}

.checkout-task-status {
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 0.15rem;
}

.checkout-task-action-select {
    width: 100%;
    height: 2.3rem;
    background: #ffffff;
    border: 1px solid #dbe2ea;
    border-radius: 10px;
    padding: 0.35rem 0.6rem;
    font-size: 0.9rem;
    color: #0f172a;
    cursor: pointer;
}

.delegate-user-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.45rem 0.6rem;
    border: 1px solid #dbe2ea;
    background: #ffffff;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #0f172a;
    text-align: left;
}

.delegate-user-btn:hover {
    border-color: #93c5fd;
    background: #f8fbff;
}

.delegate-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.delegate-picker-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    max-height: 320px;
    overflow-y: auto;
}

.delegate-picker-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.5rem 0.65rem;
    border: 1px solid #dbe2ea;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    text-align: left;
}

.delegate-picker-item:hover {
    border-color: #93c5fd;
    background: #f8fbff;
}

.delegate-picker-item.selected {
    border-color: #8b5cf6;
    background: #f5f3ff;
}

@media (max-width: 900px) {
    .checkout-task-layout {
        grid-template-columns: 1fr;
    }

    #checkout-task-checklist.delegate-open .checkout-task-layout {
        grid-template-columns: 1fr;
    }

    .checkout-task-row {
        grid-template-columns: 1fr;
    }

    .checkout-task-action-select {
        max-width: 220px;
    }
}

@media (max-width: 1100px) {
    .staff-directory-page {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .staff-thread-columns {
        grid-template-columns: 1fr;
    }
}

.dashboard-activity-empty {
    color: #94a3b8;
    text-align: center;
    padding: 1rem;
}

.dashboard-activity-date {
    font-weight: 600;
    color: #374151;
    background: #f8fafc;
    padding: 4px 8px;
    border-radius: 6px;
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
    font-size: 0.8rem;
}

.dashboard-activity-item {
    margin-left: 0.5rem;
    padding: 4px 0 4px 0.75rem;
    border-left: 3px solid #e5e7eb;
    margin-bottom: 0.5rem;
    border-radius: 0 6px 6px 0;
}

.dashboard-activity-item-collab {
    background: #f0fdf4;
}

.dashboard-activity-desc {
    white-space: pre-wrap;
    color: #4b5563;
    font-size: 0.85rem;
}

.dashboard-activity-status-row {
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard-activity-edit-wrap {
    display: flex;
    gap: 4px;
}

.dashboard-activity-edit-btn {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 2px 4px;
    font-size: 0.62rem;
    color: #64748b;
    cursor: pointer;
}

.dashboard-activity-meta {
    font-size: 0.7rem;
    color: #9ca3af;
    margin-top: 2px;
}

.dashboard-staff-activity-item {
    margin-left: 0.5rem;
    padding-left: 0.75rem;
    border-left: 2px solid #e5e7eb;
    margin-bottom: 0.5rem;
}

.dashboard-staff-name {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.8rem;
}

.dashboard-staff-activity-desc {
    margin-top: 2px;
}

.dashboard-stats-card {
    padding: 1rem !important;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.dashboard-stats-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.dashboard-stats-card-title {
    margin: 0;
    font-size: 1rem;
    color: #1f2937;
}

.dashboard-stats-card-subtitle {
    font-size: 0.7rem;
    color: #6b7280;
    margin-top: 0.15rem;
    display: block;
}

.dashboard-penalty-badge {
    font-size: 0.65rem;
    background: #fee2e2;
    color: #991b1b;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.dashboard-stats-metric-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.dashboard-stats-metric {
    padding: 0.6rem;
    border-radius: 8px;
    text-align: center;
}

.dashboard-stats-metric-late {
    background: #fef2f2;
    border: 1px solid #fee2e2;
}

.dashboard-stats-metric-extra {
    background: #ecfdf5;
    border: 1px solid #d1fae5;
}

.dashboard-stats-metric-value {
    font-weight: 700;
    font-size: 1rem;
}

.dashboard-stats-metric-late .dashboard-stats-metric-value {
    color: #b91c1c;
}

.dashboard-stats-metric-extra .dashboard-stats-metric-value {
    color: #047857;
}

.dashboard-stats-metric-label {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dashboard-stats-metric-late .dashboard-stats-metric-label {
    color: #7f1d1d;
}

.dashboard-stats-metric-extra .dashboard-stats-metric-label {
    color: #064e3b;
}

.dashboard-breakdown-grid {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.dashboard-breakdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.4rem;
    border-radius: 8px;
    min-width: 60px;
    text-align: center;
}

.dashboard-breakdown-count {
    font-weight: 700;
    font-size: 1rem;
}

.dashboard-breakdown-label {
    font-size: 0.6rem;
    font-weight: 500;
    line-height: 1.2;
    margin-top: 1px;
}

.admin-kpi-card {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%) !important;
    color: #fff;
    border: none !important;
    padding: 1.25rem !important;
}

.admin-kpi-label {
    font-size: 0.75rem;
    opacity: 0.8;
    font-weight: 500;
}

.admin-kpi-value {
    font-size: 2rem;
    margin: 0.25rem 0;
}

.admin-kpi-grid {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.admin-kpi-pill {
    flex: 1;
    background: rgba(255, 255, 255, 0.12);
    padding: 0.6rem;
    border-radius: 0.75rem;
}

.admin-kpi-pill-value {
    font-size: 1.1rem;
    font-weight: 700;
}

.admin-kpi-pill-label {
    font-size: 0.65rem;
    opacity: 0.7;
    text-transform: uppercase;
}

.admin-section-card {
    padding: 1.5rem !important;
}

.admin-section-title {
    color: #1e1b4b;
    margin-bottom: 1rem;
}

.admin-warn-row {
    background: #fff7ed;
}

.admin-leave-type-badge {
    font-weight: 600;
    font-size: 0.8rem;
    padding: 2px 6px;
    background: #e0e7ff;
    color: #4338ca;
    border-radius: 4px;
}

.admin-leave-warning {
    color: #c2410c;
    font-size: 0.75rem;
}

.admin-leave-valid {
    color: #166534;
    font-size: 0.75rem;
}

.admin-leave-actions {
    display: flex;
    gap: 6px;
}

.admin-btn {
    border: none;
    color: #fff;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.75rem;
    cursor: pointer;
}

.admin-btn-success {
    background: #166534;
}

.admin-btn-warning {
    background: #f59e0b;
}

.admin-btn-danger {
    background: #991b1b;
}

.admin-performance-card {
    padding: 1rem !important;
}

.admin-performance-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.admin-performance-title {
    margin: 0;
}

.admin-performance-subtitle {
    font-size: 0.8rem;
    margin-top: 2px;
}

.admin-performance-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.admin-performance-bars {
    height: 80px;
    display: flex;
    align-items: flex-end;
    gap: 5px;
    margin-bottom: 6px;
}

.admin-performance-bar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: flex-end;
    align-items: center;
    gap: 3px;
}

.admin-performance-bar-val {
    font-size: 0.55rem;
    font-weight: 700;
}

.admin-performance-bar-fill {
    width: 100%;
    border-radius: 4px 4px 0 0;
    opacity: 0.8;
}

.admin-performance-labels {
    display: flex;
    gap: 6px;
    border-top: 1px solid #f3f4f6;
    padding-top: 4px;
    margin-bottom: 1rem;
}

.admin-performance-label-item {
    flex: 1;
    text-align: center;
    font-size: 0.65rem;
    color: #9ca3af;
    font-weight: 600;
}

.admin-performance-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.65rem;
    color: #6b7280;
    font-weight: 500;
}

.admin-performance-legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.admin-performance-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
}

.admin-performance-legend-dot-optimal {
    background: var(--primary);
}

.admin-performance-legend-dot-good {
    background: #f59e0b;
}

.admin-performance-legend-dot-low {
    background: #ef4444;
}

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

.admin-staff-title {
    font-size: 1.1rem;
    margin: 0;
}

.admin-staff-head-actions {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    justify-content: space-between;
}

.admin-staff-head-btn {
    flex: 1;
    padding: 0.4rem !important;
    font-size: 0.8rem !important;
}

.admin-user-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-user-avatar-wrap {
    position: relative;
}

.admin-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.admin-user-live-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background: #10b981;
    border: 2px solid #fff;
    border-radius: 50%;
}

.admin-user-name-row {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.admin-user-live-tag {
    font-size: 0.6rem;
    background: #f0fdf4;
    color: #166534;
    padding: 1px 4px;
    border-radius: 4px;
    font-weight: 700;
}

.admin-user-id {
    font-size: 0.75rem;
    color: #6b7280;
}

.admin-io-cell {
    font-size: 0.85rem;
    color: #374151;
}

.admin-io-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.admin-io-icon-in {
    color: #10b981;
    font-size: 0.7rem;
}

.admin-io-icon-out {
    color: #ef4444;
    font-size: 0.7rem;
}

.admin-role-main {
    font-weight: 500;
    font-size: 0.85rem;
}

.admin-role-sub {
    font-size: 0.75rem;
    color: #6b7280;
}

.admin-location-cell {
    font-size: 0.75rem;
}

.admin-location-link {
    color: var(--primary);
    text-decoration: none;
}

.admin-row-actions {
    display: flex;
    gap: 0.3rem;
}

.admin-icon-btn {
    padding: 0.3rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.admin-icon-btn-indigo {
    background: #eef2ff;
    color: #4338ca;
}

.admin-icon-btn-amber {
    background: #fff7ed;
    color: #c2410c;
}

.admin-icon-btn-slate {
    background: #f3f4f6;
    color: #374151;
}

.admin-icon-btn-red {
    background: #fef2f2;
    color: #b91c1c;
}

@media (max-width: 1100px) {
    .dashboard-staff-view .dashboard-summary-row,
    .dashboard-admin-view .dashboard-summary-row {
        flex-direction: column;
    }
}

/* Annual Plan Enhancements */
.annual-plan-shell {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.annual-plan-header {
    padding: 1.4rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #38bdf8 100%);
    border: none;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.annual-plan-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.25), transparent 45%);
    pointer-events: none;
}

.annual-plan-title-wrap {
    position: relative;
    z-index: 1;
}

.annual-plan-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.annual-plan-subtitle {
    margin: 0.35rem 0 0 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
}

.annual-plan-controls {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.annual-view-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.18);
    padding: 4px;
    border-radius: 12px;
    backdrop-filter: blur(6px);
}

.annual-toggle-btn {
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.annual-toggle-btn.active {
    background: #ffffff;
    color: #1e40af;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.2);
}

.annual-year-switch {
    display: flex;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
    align-items: center;
    backdrop-filter: blur(6px);
}

.annual-year-switch button {
    border: none;
    background: transparent;
    color: #e0f2fe;
    padding: 6px 10px;
    cursor: pointer;
    border-radius: 10px;
}

.annual-year-switch button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.annual-year-label {
    color: #fff;
    font-weight: 700;
    padding: 0 0.65rem;
    letter-spacing: 0.04em;
}

.annual-grid-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
    gap: 1rem;
    align-items: start;
}

.annual-plan-grid {
    width: 100%;
    min-width: 0;
}

.annual-day-detail {
    max-width: 100%;
    min-width: 0;
}

@media (max-width: 1200px) {
    .annual-grid-layout {
        grid-template-columns: 1fr;
    }
}

.annual-legend-bar {
    padding: 0.85rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 1rem;
    background: #f8fafc;
}

.annual-legend-chip {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.annual-legend-chip.active {
    border-color: var(--primary);
    color: #0369a1;
    background: #e0f2fe;
}

.annual-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.annual-dot.leave {
    background: #ef4444;
}

.annual-dot.event {
    background: #10b981;
}

.annual-dot.work {
    background: #6366f1;
}

.annual-day.selected {
    outline: 2px solid #38bdf8;
    outline-offset: 1px;
    background: #e0f2fe;
}

.annual-day.annual-day-muted {
    opacity: 0.35;
}

.annual-day-detail {
    position: sticky;
    top: 1rem;
    padding: 1rem;
}

.annual-day-detail-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.55rem;
    margin-bottom: 0.75rem;
}

.annual-day-detail-head h4 {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-main);
}

.annual-day-detail-head span {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 700;
}

.annual-detail-modal {
    width: min(560px, 92vw);
    background: #ffffff;
    border-radius: 16px;
    padding: 1.1rem;
    box-shadow: 0 25px 70px rgba(15, 23, 42, 0.25);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.annual-detail-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid #eef2f7;
}

.annual-detail-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-height: 420px;
    overflow-y: auto;
}

.annual-detail-item {
    border: 1px solid #e2e8f0;
    border-radius: 0.7rem;
    padding: 0.6rem;
    background: #ffffff;
}

.annual-detail-tag {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
    display: inline-flex;
}

.annual-detail-title {
    margin-top: 0.45rem;
    font-size: 0.8rem;
    line-height: 1.35;
    color: #334155;
}

.annual-detail-empty {
    color: #94a3b8;
    text-align: center;
    font-size: 0.8rem;
    padding: 1rem 0.5rem;
}

.annual-list-card {
    padding: 1rem;
}

.annual-list-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.6rem;
}

.annual-list-head h4 {
    margin: 0;
    font-size: 1rem;
}

.annual-list-head span {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 700;
}

.annual-list-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.annual-export-btn {
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 8px;
    padding: 0.4rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.annual-export-btn:hover {
    background: #dbeafe;
}

.annual-list-empty {
    text-align: center;
    padding: 2rem;
    color: #94a3b8;
}

.annual-list-table-wrap {
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.annual-list-table {
    min-width: 1180px;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.annual-list-header,
.annual-list-row {
    display: grid;
    grid-template-columns: 110px 160px 160px 160px 110px 120px 140px minmax(220px, 1fr) minmax(140px, 0.7fr);
    gap: 0.6rem;
    align-items: center;
}

.annual-list-header {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    padding: 0.4rem 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.annual-list-row {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.6rem 0.5rem;
    background: #ffffff;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.05);
}

.annual-list-cell {
    font-size: 0.78rem;
    color: #334155;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.annual-list-status {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.annual-list-comments,
.annual-list-tags {
    white-space: normal;
    line-height: 1.25;
}

.annual-list-status.status-overdue {
    background: #fee2e2;
    color: #b91c1c;
}

.annual-list-status.status-in-process,
.annual-list-status.status-in-processes {
    background: #fef9c3;
    color: #854d0e;
}

.annual-list-status.status-to-be-started,
.annual-list-status.status-pending {
    background: #e0f2fe;
    color: #0369a1;
}

.annual-list-status.status-completed {
    background: #dcfce7;
    color: #166534;
}

.annual-list-status.status-not-completed {
    background: #fef3c7;
    color: #92400e;
}

.annual-list-status.status-approved,
.annual-list-status.status-event,
.annual-list-status.status-holiday {
    background: #f1f5f9;
    color: #334155;
}

@media (max-width: 900px) {
    .annual-list-table {
        min-width: 980px;
    }
}

.annual-today-btn {
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 8px;
    padding: 0.45rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.annual-plan-header .annual-today-btn {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.35);
    color: #ffffff;
}

.annual-plan-header .annual-today-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 1200px) {
    .annual-grid-layout {
        grid-template-columns: 1fr;
    }

    .annual-day-detail {
        position: relative;
        top: 0;
    }
}

/* Day Plan Modal Refresh */
#day-plan-modal .day-plan-content {
    border: 1px solid #dbe3ee !important;
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.2) !important;
}

#day-plan-modal .day-plan-head h3 {
    font-family: var(--font-display);
    letter-spacing: 0.01em;
}

#day-plan-modal .day-plan-intro {
    border-radius: 10px !important;
}

#day-plan-modal .day-plan-context>div {
    border-radius: 9px !important;
    padding: 0.65rem !important;
}

#day-plan-modal #plans-container {
    scrollbar-width: thin;
}

#day-plan-modal .plan-block {
    border: 1px solid #dbe3ee !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06) !important;
    margin-bottom: 0.9rem !important;
}

#day-plan-modal .plan-task {
    min-height: 74px !important;
    line-height: 1.45 !important;
}

#day-plan-modal .sub-plan-input {
    font-size: 0.82rem !important;
}

#day-plan-modal .tag-chip {
    border-radius: 8px !important;
}

#day-plan-modal .day-plan-footer {
    position: sticky;
    bottom: 0;
    z-index: 3;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, #ffffff 40%);
    padding-top: 0.65rem;
}

#day-plan-modal .day-plan-add-task-btn {
    flex: 1;
    min-width: 200px;
    background: #f0fdf4;
    border: 1px dashed #22c55e;
    border-radius: 10px;
    padding: 0.85rem;
    font-size: 0.9rem;
    color: #166534;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

#day-plan-modal .day-plan-add-task-btn:hover {
    background: #dcfce7;
    border-style: solid;
}

#day-plan-modal .day-plan-discard-btn {
    flex: 1;
    padding: 0.85rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    color: #64748b;
    font-size: 0.95rem;
    transition: all 0.2s;
}

#day-plan-modal .day-plan-discard-btn:hover {
    background: #f8fafc;
}

#day-plan-modal .day-plan-save-btn {
    flex: 2;
    padding: 0.85rem;
    font-size: 0.95rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

#day-plan-modal .day-plan-remove-task-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #fff1f2;
    border: 1px solid #fecaca;
    color: #ef4444;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: all 0.2s;
}

#day-plan-modal .day-plan-remove-task-btn:hover {
    background: #fee2e2;
    transform: scale(1.08);
}

#day-plan-modal .day-plan-add-step-btn {
    background: none;
    border: 1px dashed #e2e8f0;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.8rem;
    color: #8b5cf6;
    cursor: pointer;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    width: 100%;
    justify-content: center;
    transition: all 0.2s;
}

#day-plan-modal .day-plan-add-step-btn:hover {
    background: #faf5ff;
    border-color: #8b5cf6;
    border-style: solid;
}

#day-plan-modal .day-plan-quick-add-step-btn {
    background: none;
    border: none;
    padding: 4px 0;
    font-size: 0.75rem;
    color: var(--primary);
    cursor: pointer;
    margin-top: 0.4rem;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

#day-plan-modal .day-plan-status-help-btn {
    background: #e0e7ff;
    border: none;
    color: #4338ca;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.65rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#day-plan-modal .day-plan-step-dot {
    width: 8px;
    height: 8px;
    background: #a78bfa;
    border-radius: 50%;
    flex-shrink: 0;
}

#day-plan-modal .day-plan-sub-input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.85rem;
    background: #fafafa;
    outline: none;
    transition: all 0.2s;
}

#day-plan-modal .day-plan-sub-input:focus {
    border-color: #8b5cf6;
    background: #ffffff;
}

#day-plan-modal .day-plan-remove-step-btn {
    background: none;
    border: none;
    color: #cbd5e1;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

#day-plan-modal .day-plan-remove-step-btn:hover {
    color: #ef4444;
}

#day-plan-modal .day-plan-block-shell {
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 12px;
    padding: 0;
    margin-bottom: 0.9rem;
    position: relative;
    overflow: hidden;
    display: flex;
    min-height: 180px;
    flex-direction: column;
    transition: all 0.2s;
}

#day-plan-modal .day-plan-block-body {
    display: flex;
    flex: 1;
    min-height: 180px;
}

#day-plan-modal .day-plan-left-panel {
    flex: 1.5;
    padding: 1.25rem;
    border-right: 2px solid #f1f5f9;
}

#day-plan-modal .day-plan-right-panel {
    flex: 1;
    padding: 1.25rem;
    background: linear-gradient(135deg, #faf5ff 0%, #f5f3ff 100%);
    display: flex;
    flex-direction: column;
}

#day-plan-modal .day-plan-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

#day-plan-modal .day-plan-head-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#day-plan-modal .day-plan-index-badge {
    background: #6366f1;
    color: #fff;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.7rem;
}

#day-plan-modal .day-plan-index-badge-step {
    background: #8b5cf6;
    width: 18px;
    height: 18px;
    font-size: 0.65rem;
}

#day-plan-modal .day-plan-index-badge-collab {
    background: #a78bfa;
}

#day-plan-modal .day-plan-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #334155;
    margin: 0;
}

#day-plan-modal .day-plan-help-text {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0 0 0.75rem 0;
    font-style: italic;
    line-height: 1.4;
}

#day-plan-modal .day-plan-task-input {
    width: 100%;
    height: 80px;
    padding: 0.85rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    resize: none;
    margin-bottom: 0.85rem;
    font-size: 0.95rem;
    line-height: 1.5;
    background: #fcfdfe;
    transition: border-color 0.2s, background 0.2s;
}

#day-plan-modal .day-plan-task-input:focus {
    border-color: #6366f1;
    background: #fff;
}

#day-plan-modal .day-plan-at-hint {
    background: #fef9f3;
    padding: 0.6rem;
    border-radius: 8px;
    border: 1px solid #fed7aa;
    margin-bottom: 0.75rem;
}

#day-plan-modal .day-plan-at-hint-text {
    font-size: 0.75rem;
    color: #9a3412;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

#day-plan-modal .day-plan-at-hint-text i {
    font-size: 0.85rem;
}

#day-plan-modal .day-plan-sub-section {
    border-top: 1px dashed #e2e8f0;
    padding-top: 0.75rem;
}

#day-plan-modal .day-plan-sub-head {
    margin-bottom: 0.5rem;
}

#day-plan-modal .day-plan-sub-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
    margin: 0;
}

#day-plan-modal .day-plan-sub-optional {
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 400;
}

#day-plan-modal .day-plan-sub-help {
    font-size: 0.7rem;
    color: #64748b;
    margin: 0 0 0.5rem 0;
    font-style: italic;
}

#day-plan-modal .day-plan-sub-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

#day-plan-modal .day-plan-sub-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

#day-plan-modal .day-plan-collab-head {
    margin-bottom: 0.75rem;
}

#day-plan-modal .day-plan-collab-hint {
    font-size: 0.7rem;
    color: #6b21a8;
    margin: 0 0 0.75rem 0;
    background: #faf5ff;
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid #e9d5ff;
    line-height: 1.4;
}

#day-plan-modal .day-plan-collab-hint-bold {
    font-weight: 600;
}

#day-plan-modal .day-plan-at-badge {
    background: #8b5cf6;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.65rem;
}

#day-plan-modal .day-plan-tags-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

#day-plan-modal .day-plan-tag-chip {
    background: #fff;
    color: #334155;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    border: 1px solid #c4b5fd;
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.1);
    animation: slideInRight 0.2s ease;
}

#day-plan-modal .day-plan-tag-main {
    display: flex;
    align-items: center;
    gap: 6px;
}

#day-plan-modal .day-plan-tag-icon {
    color: #8b5cf6;
    font-size: 0.75rem;
}

#day-plan-modal .day-plan-status-pill {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}

#day-plan-modal .day-plan-tag-pending {
    font-size: 0.6rem;
    color: #f59e0b;
}

#day-plan-modal .day-plan-remove-collab-btn {
    cursor: pointer;
    font-size: 0.75rem;
    color: #94a3b8;
    transition: color 0.2s;
}

#day-plan-modal .day-plan-remove-collab-btn:hover {
    color: #ef4444;
}

#day-plan-modal .day-plan-no-tags-placeholder {
    font-size: 0.75rem;
    color: #a78bfa;
    text-align: center;
    padding: 1.5rem 1rem;
    border: 2px dashed #ddd6fe;
    border-radius: 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #fff;
}

#day-plan-modal .day-plan-no-tags-placeholder-compact {
    font-size: 0.7rem;
    color: #cbd5e1;
    padding-top: 1rem;
    border: 1px dashed #e2e8f0;
}

#day-plan-modal .day-plan-no-tags-icon-wrap {
    background: #f5f3ff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.25rem;
}

#day-plan-modal .day-plan-no-tags-icon {
    font-size: 1.2rem;
    color: #8b5cf6;
}

#day-plan-modal .day-plan-no-tags-title {
    margin: 0;
    font-weight: 600;
    color: #6b21a8;
}

#day-plan-modal .day-plan-no-tags-text {
    margin: 0;
    font-size: 0.7rem;
    color: #9333ea;
    line-height: 1.3;
}

#day-plan-modal .day-plan-bottom-controls {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 0.85rem 1.25rem;
    border-top: 2px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

#day-plan-modal .day-plan-bottom-controls-compact {
    background: #f1f5f9;
    padding: 0.5rem 1rem;
    border-top: 1px solid #e2e8f0;
    gap: 1rem;
}

#day-plan-modal .day-plan-control-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#day-plan-modal .day-plan-control-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #334155;
}

#day-plan-modal .day-plan-control-label-compact {
    font-size: 0.7rem;
    color: #64748b;
}

#day-plan-modal .day-plan-select {
    padding: 6px 10px;
    border-radius: 8px;
    border: 2px solid #d1d5db;
    font-size: 0.8rem;
    background: #fff;
    color: #374151;
    font-weight: 600;
    cursor: pointer;
}

#day-plan-modal .day-plan-select:focus {
    border-color: #6366f1;
}

#day-plan-modal .day-plan-select-compact {
    padding: 4px 8px;
    border-width: 1px;
    font-size: 0.75rem;
}

#day-plan-modal .day-plan-status-tooltip {
    position: absolute;
    bottom: 60px;
    left: 1.25rem;
    background: #1e293b;
    color: #fff;
    padding: 0.85rem;
    border-radius: 10px;
    font-size: 0.75rem;
    max-width: 280px;
    z-index: 10;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    line-height: 1.5;
}

#day-plan-modal .day-plan-status-tooltip-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

#day-plan-modal .day-plan-status-tooltip-title {
    font-size: 0.8rem;
}

#day-plan-modal .day-plan-status-tooltip-close {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 1rem;
}

#day-plan-modal .day-plan-status-tooltip-text {
    margin: 0.4rem 0;
    color: #cbd5e1;
}

#day-plan-modal .day-plan-status-tooltip-list {
    margin: 0;
    padding-left: 1.2rem;
    color: #cbd5e1;
}

#day-plan-modal .day-plan-status-tooltip-list li {
    margin: 0.25rem 0;
}

#day-plan-modal .day-plan-status-tooltip-arrow {
    position: absolute;
    bottom: -6px;
    left: 20px;
    width: 12px;
    height: 12px;
    background: #1e293b;
    transform: rotate(45deg);
}

#day-plan-modal .day-plan-mini-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 800;
    color: #94a3b8;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#day-plan-modal .day-plan-mention-item {
    padding: 8px 12px;
    font-size: 0.85rem;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 8px;
}

#day-plan-modal .day-plan-mention-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

@media (max-width: 980px) {
    #day-plan-modal .day-plan-context {
        grid-template-columns: 1fr !important;
    }

    #day-plan-modal .plan-block>div {
        flex-direction: column !important;
    }

    #day-plan-modal .plan-block>div>div {
        border-right: none !important;
        border-bottom: 1px solid #edf2f7 !important;
    }

    #day-plan-modal .plan-block>div>div:last-child {
        border-bottom: none !important;
    }
}


/* Day Plan Lean Theme */
#day-plan-modal {
    z-index: 1100 !important;
}

#day-plan-modal .day-plan-content {
    max-width: 900px !important;
    width: min(94vw, 900px) !important;
    border-radius: 12px !important;
    padding: 0.8rem !important;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.2) !important;
}

#day-plan-modal .day-plan-head {
    margin-bottom: 0.7rem !important;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid #edf2f7;
}

#day-plan-modal .day-plan-head h3 {
    font-size: 1.1rem !important;
    line-height: 1.25;
    margin-bottom: 0.05rem;
}

#day-plan-modal .day-plan-head p {
    font-size: 0.8rem !important;
    color: #64748b !important;
}

#day-plan-modal .day-plan-head button {
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px !important;
}

#day-plan-modal .day-plan-intro {
    padding: 0.6rem !important;
    margin-bottom: 0.7rem !important;
    border-radius: 10px !important;
}

#day-plan-modal .day-plan-intro h4 {
    font-size: 0.85rem !important;
}

#day-plan-modal .day-plan-intro p {
    font-size: 0.72rem !important;
    line-height: 1.25 !important;
}

#day-plan-modal .day-plan-context {
    gap: 0.45rem !important;
    margin-bottom: 0.7rem !important;
}

#day-plan-modal .day-plan-context > div {
    padding: 0.55rem !important;
    border-radius: 8px !important;
}

#day-plan-modal #plans-container {
    max-height: 52vh !important;
    padding-right: 2px !important;
}

#day-plan-modal .day-plan-block-shell {
    border: 1px solid #e6edf5 !important;
    border-radius: 10px !important;
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.06) !important;
    margin-bottom: 0.65rem !important;
    min-height: 148px !important;
}

#day-plan-modal .day-plan-block-body {
    min-height: 148px !important;
}

#day-plan-modal .day-plan-left-panel,
#day-plan-modal .day-plan-right-panel {
    padding: 0.8rem !important;
}

#day-plan-modal .day-plan-right-panel {
    background: linear-gradient(180deg, #fcfbff 0%, #f7f5ff 100%) !important;
}

#day-plan-modal .day-plan-label {
    font-size: 0.8rem !important;
}

#day-plan-modal .day-plan-help-text {
    font-size: 0.72rem !important;
    margin-bottom: 0.5rem !important;
}

#day-plan-modal .day-plan-task-input {
    height: 62px !important;
    padding: 0.62rem 0.7rem !important;
    font-size: 0.88rem !important;
    line-height: 1.35 !important;
    border-width: 1px !important;
    border-radius: 8px !important;
    margin-bottom: 0.55rem !important;
}

#day-plan-modal .day-plan-at-hint {
    padding: 0.45rem !important;
    margin-bottom: 0.55rem !important;
    border-radius: 7px !important;
}

#day-plan-modal .day-plan-sub-section {
    padding-top: 0.5rem !important;
}

#day-plan-modal .day-plan-sub-help {
    font-size: 0.68rem !important;
    margin-bottom: 0.35rem !important;
}

#day-plan-modal .day-plan-sub-row {
    gap: 0.35rem !important;
}

#day-plan-modal .day-plan-sub-input {
    padding: 0.42rem !important;
    font-size: 0.78rem !important;
    border-radius: 6px !important;
}

#day-plan-modal .day-plan-add-step-btn {
    margin-top: 0.35rem !important;
    padding: 5px 8px !important;
    font-size: 0.76rem !important;
}

#day-plan-modal .day-plan-collab-hint {
    padding: 0.45rem !important;
    font-size: 0.68rem !important;
    margin-bottom: 0.55rem !important;
}

#day-plan-modal .day-plan-tag-chip {
    padding: 6px 8px !important;
    border-radius: 8px !important;
    font-size: 0.76rem !important;
    box-shadow: none !important;
}

#day-plan-modal .day-plan-status-pill {
    font-size: 0.6rem !important;
}

#day-plan-modal .day-plan-no-tags-placeholder {
    padding: 0.55rem !important;
    min-height: 78px !important;
}

#day-plan-modal .day-plan-footer {
    margin-top: 0.65rem !important;
    gap: 0.5rem !important;
    padding-top: 0.5rem !important;
    border-top: 1px solid #edf2f7;
}

#day-plan-modal .day-plan-add-task-btn {
    min-width: 170px !important;
    padding: 0.62rem !important;
    font-size: 0.82rem !important;
    border-radius: 9px !important;
}

#day-plan-modal .day-plan-discard-btn,
#day-plan-modal .day-plan-save-btn {
    padding: 0.68rem !important;
    font-size: 0.88rem !important;
    border-radius: 9px !important;
}

@media (max-width: 980px) {
    #day-plan-modal .day-plan-content {
        width: 96vw !important;
        max-width: 96vw !important;
        padding: 0.65rem !important;
    }

    #day-plan-modal #plans-container {
        max-height: 58vh !important;
    }

#day-plan-modal .day-plan-footer > div {
        min-width: 100% !important;
    }
}

/* Policies Modern */
.policies-modern {
    --pol-bg: var(--bg-body);
    --pol-card: var(--bg-card);
    --pol-text: var(--text-main);
    --pol-muted: var(--text-muted);
    --pol-line: #dbe4f0;
}

.policies-modern .card {
    border: 1px solid var(--pol-line);
    border-radius: 16px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.policies-hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 75%) !important;
    color: #fff;
    padding: 1.6rem !important;
    margin-bottom: 1rem;
}

.policies-kicker {
    margin: 0 0 0.3rem 0;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.78;
}

.policies-hero h1 {
    margin: 0;
    font-size: clamp(1.35rem, 2.6vw, 2rem);
    line-height: 1.2;
}

.policies-hero-text {
    margin: 0.7rem 0 0 0;
    color: rgba(255, 255, 255, 0.86);
    max-width: 680px;
}

.policies-value-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 1rem;
}

.policies-value-row span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.34rem 0.62rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    font-size: 0.78rem;
    color: #f8fafc;
}

.policies-balance-card,
.policies-guidelines,
.policies-holidays {
    padding: 1.2rem !important;
}

.policies-row-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.policies-row-head h2,
.policies-row-head h3 {
    margin: 0;
    color: var(--pol-text);
}

.policies-request-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.58rem 0.9rem;
    border-radius: 10px;
    font-size: 0.86rem;
}

.policies-late-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0.72rem;
    margin-bottom: 1rem;
    border: 1px solid #fed7aa;
    background: #fff7ed;
    border-radius: 10px;
}

.policies-late-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: #ea580c;
    font-size: 0.9rem;
}

.policies-late-label {
    font-size: 0.7rem;
    color: #9a3412;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 700;
}

.policies-late-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: #9a3412;
}

.policies-late-value span {
    font-size: 0.8rem;
    font-weight: 500;
    color: #c2410c;
}

.policies-leave-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
    gap: 0.75rem;
}

.policies-leave-item {
    position: relative;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: var(--pol-bg);
    border-radius: 12px;
    padding: 0.85rem;
}

.policies-leave-bg-icon {
    position: absolute;
    right: -6px;
    top: -8px;
    font-size: 2.6rem;
    opacity: 0.08;
}

.policies-leave-item h4 {
    margin: 0 0 0.55rem 0;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
}

.policies-leave-count {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
}

.policies-leave-count span {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-main);
}

.policies-leave-count small {
    font-size: 0.75rem;
    color: #64748b;
}

.policies-leave-bar {
    margin-top: 0.45rem;
    height: 5px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.policies-leave-bar > div {
    height: 100%;
}

.policies-leave-used {
    margin-top: 0.35rem;
    text-align: right;
    font-size: 0.68rem;
    color: #64748b;
}

.policies-guidelines h3,
.policies-holidays h3 {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.policies-hours-box {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    padding: 0.8rem;
    margin-bottom: 0.9rem;
}

.policies-hours-box label,
.policies-guidelines-list label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    font-weight: 700;
}

.policies-hours-box > div {
    margin-top: 0.28rem;
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 700;
}

.policies-hours-box p {
    margin: 0.2rem 0 0 0;
    color: #64748b;
    font-size: 0.82rem;
}

.policies-guidelines-list ul {
    margin: 0.55rem 0 0 0;
    padding: 0;
    list-style: none;
}

.policies-guidelines-list li {
    display: flex;
    gap: 0.45rem;
    align-items: flex-start;
    margin-bottom: 0.42rem;
    color: #334155;
    font-size: 0.88rem;
}

.policies-guidelines-list li i {
    color: #f59e0b;
    margin-top: 0.22rem;
}

.policies-zero-box {
    margin-top: 0.7rem;
    padding: 0.78rem;
    border-radius: 12px;
    border: 1px solid #fecaca;
    background: #fff1f2;
}

.policies-zero-box h4 {
    margin: 0 0 0.3rem 0;
    color: #991b1b;
    font-size: 0.92rem;
}

.policies-zero-box p {
    margin: 0;
    color: #7f1d1d;
    font-size: 0.84rem;
    line-height: 1.45;
}

.policies-year-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem;
    border: 1px solid #dbeafe;
    background: #eff6ff;
    border-radius: 10px;
}

.policies-year-switch button {
    width: 24px;
    height: 24px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #fff;
    color: #2563eb;
    cursor: pointer;
}

.policies-year-switch span {
    min-width: 44px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e40af;
}

.policies-holidays-table {
    max-height: 320px;
    overflow-y: auto;
}

.policies-holiday-name {
    font-weight: 600;
    color: #334155;
}

.policies-holiday-chip {
    display: inline-block;
    margin-top: 0.2rem;
    font-size: 0.64rem;
    font-weight: 700;
    color: #991b1b;
    background: #fee2e2;
    border-radius: 999px;
    padding: 2px 7px;
}

.policies-holiday-date {
    text-align: right;
    color: #64748b;
    font-weight: 600;
}

.policies-empty-holiday {
    text-align: center;
    color: #94a3b8;
    padding: 1rem;
}

.text-right {
    text-align: right;
}

@media (max-width: 768px) {
    .policies-hero {
        padding: 1rem !important;
    }

    .policies-balance-card,
    .policies-guidelines,
    .policies-holidays {
        padding: 0.9rem !important;
    }

    .policies-row-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .policies-leave-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Timesheet Modern */
.timesheet-modern {
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06) !important;
    border-radius: 16px !important;
    padding: 1rem !important;
}

.timesheet-modern-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.9rem;
}

.timesheet-modern-head h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-main);
}

.timesheet-modern-head p {
    margin: 0.2rem 0 0 0;
    font-size: 0.82rem;
    color: #64748b;
}

.timesheet-modern-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.timesheet-modern-btn-secondary,
.timesheet-modern-btn-primary {
    padding: 0.52rem 0.86rem !important;
    font-size: 0.8rem !important;
    border-radius: 10px !important;
}

.timesheet-modern-btn-secondary {
    border-color: #fecdd3 !important;
    color: #be123c !important;
    background: #fff1f2 !important;
}

.timesheet-modern-stats {
    margin-top: 0.85rem;
    margin-bottom: 0.85rem;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 0.55rem !important;
}

.timesheet-modern-stats .stat-card {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 10px;
    padding: 0.55rem 0.65rem;
    min-width: 0;
}

.timesheet-modern-stats .stat-card .label {
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 700;
}

.timesheet-modern-stats .stat-card .value {
    margin-top: 0.14rem;
    font-size: 1rem;
    line-height: 1.2;
    color: var(--text-main);
    font-weight: 700;
}

.timesheet-stat-sub {
    font-size: 0.7rem;
    color: #64748b;
}

.timesheet-modern-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.7rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.58rem 0.72rem;
    margin-bottom: 0.85rem;
}

.timesheet-modern-toolbar .filter-group {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.timesheet-modern-toolbar .filter-group i {
    color: #64748b;
    font-size: 0.78rem;
}

.timesheet-modern-toolbar .filter-group select {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-main);
}

.timesheet-export-btn {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #475569;
    border-radius: 8px;
    padding: 0.34rem 0.62rem;
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
}

.timesheet-modern-table-wrap {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.timesheet-modern-table thead {
    background: #f1f5f9;
}

.timesheet-modern-table thead th {
    color: #334155;
    font-size: 0.75rem;
}

.timesheet-modern-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
}

.timesheet-log-date {
    font-weight: 700;
    color: var(--text-main);
}

.timesheet-log-id {
    font-size: 0.68rem;
    color: #94a3b8;
}

.time-badge i {
    font-size: 0.6rem;
}

.timesheet-status-col {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.timesheet-status-col .badge {
    width: fit-content;
    font-size: 0.68rem;
}

.timesheet-duration {
    font-size: 0.68rem;
    font-weight: 700;
    color: #334155;
}

.timesheet-summary-cell {
    max-width: 320px;
}

.timesheet-summary-wrap {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.timesheet-summary-text {
    font-size: 0.8rem;
    color: #334155;
    line-height: 1.4;
    white-space: pre-wrap;
}

.timesheet-empty-summary {
    color: #94a3b8;
    font-style: italic;
}

.timesheet-location {
    margin-top: 0.25rem;
    font-size: 0.66rem;
    color: #94a3b8;
}

.timesheet-edit-btn {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.2rem;
}

.timesheet-edit-btn:hover {
    color: #334155;
}

.timesheet-detail-btn {
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px !important;
    border: 1px solid #e2e8f0 !important;
    background: #f8fafc !important;
    color: #64748b !important;
}

.timesheet-live {
    font-size: 0.7rem;
    color: #15803d;
    font-weight: 700;
    animation: pulse 2s infinite;
}

.timesheet-empty-row {
    text-align: center;
    padding: 2.2rem !important;
    color: #94a3b8;
}

@media (max-width: 768px) {
    .timesheet-modern {
        padding: 0.75rem !important;
    }

    .timesheet-modern-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .timesheet-modern-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .timesheet-export-btn {
        width: 100%;
    }

    .timesheet-modern-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* Profile Modern */
.profile-modern-shell {
    border: 1px solid #e2e8f0 !important;
    border-radius: 18px !important;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.07) !important;
    overflow: hidden;
}

.profile-modern-header {
    padding: 1rem 1.1rem !important;
    background: linear-gradient(140deg, var(--primary-dark) 0%, var(--primary) 60%, #4b6fb2 100%) !important;
}

.profile-avatar-upload-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid var(--primary-dark);
    background: var(--primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.profile-avatar-upload-btn i {
    font-size: 0.72rem;
}

.profile-name {
    margin: 0 !important;
    color: #fff !important;
    font-size: 1.45rem !important;
    font-weight: 700 !important;
}

.profile-roleline {
    margin: 0.2rem 0 0 0 !important;
    color: rgba(255, 255, 255, 0.84) !important;
}

.profile-roleline span {
    margin: 0 0.45rem;
    opacity: 0.5;
}

.profile-signout-btn {
    background: rgba(255, 241, 242, 0.95) !important;
    color: #9f1239 !important;
    border: 1px solid #fda4af !important;
    box-shadow: none !important;
    font-size: 0.76rem !important;
    padding: 0.42rem 0.72rem !important;
    border-radius: 10px !important;
}

.profile-presence-wrap {
    margin-top: 0.5rem;
}

.profile-presence-badge {
    background: rgba(255, 255, 255, 0.14) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.24) !important;
}

.profile-info-grid {
    padding: 1rem !important;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem;
    background: #fff;
}

.profile-stats-col {
    border-right: 1px solid #f1f5f9;
    padding-right: 0.9rem;
}

.profile-section-title {
    margin: 0 0 0.65rem 0 !important;
    font-size: 0.76rem !important;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #64748b !important;
}

.profile-stat-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.5rem !important;
}

.profile-stat-grid .stat-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    padding: 0.6rem 0.7rem;
}

.profile-stat-grid .stat-card .value {
    font-size: 1rem;
}

.profile-stat-sub {
    font-size: 0.72rem;
    color: #64748b;
}

.profile-star {
    color: #eab308;
    font-size: 0.72rem;
}

.profile-detail-list {
    display: flex;
    flex-direction: column;
    gap: 0.62rem;
}

.profile-detail-row {
    display: flex;
    align-items: center;
    gap: 0.62rem;
}

.profile-detail-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: #f1f5f9;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.profile-detail-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    font-weight: 700;
}

.profile-detail-value {
    font-size: 0.86rem;
    color: var(--text-main);
    font-weight: 600;
}

.profile-leave-card {
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    padding: 1rem !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05) !important;
}

.profile-leave-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.profile-leave-head h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-main);
}

.profile-leave-request-btn {
    font-size: 0.74rem !important;
    padding: 0.36rem 0.65rem !important;
    border-radius: 9px !important;
}

.profile-leave-table {
    max-height: 230px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.profile-leave-thead {
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 1;
}

.profile-leave-range {
    font-size: 0.8rem;
    font-weight: 600;
}

.profile-leave-type {
    font-size: 0.72rem;
    color: #475569;
    background: #f1f5f9;
    padding: 2px 7px;
    border-radius: 999px;
}

.profile-leave-reason {
    font-size: 0.75rem;
    color: #64748b;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-leave-empty {
    text-align: center;
    color: #94a3b8;
    padding: 1.5rem !important;
}

@media (max-width: 860px) {
    .profile-top-row {
        flex-direction: column;
        gap: 0.55rem;
    }

    .profile-info-grid {
        grid-template-columns: 1fr;
    }

    .profile-stats-col {
        border-right: none;
        padding-right: 0;
        border-bottom: 1px solid #f1f5f9;
        padding-bottom: 0.8rem;
    }
}

/* Minutes Modern */
.minutes-modern-shell {
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    padding: 1rem !important;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06) !important;
}

.minutes-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.minutes-head h2 {
    margin: 0;
    color: var(--text-main);
    font-size: 1.35rem;
}

.minutes-head p {
    margin: 0.2rem 0 0 0;
    font-size: 0.82rem;
    color: #64748b;
}

.minutes-add-btn {
    padding: 0.58rem 0.9rem !important;
    font-size: 0.82rem !important;
    border-radius: 10px !important;
}

.minutes-form-wrap {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 0.9rem;
    margin-bottom: 1rem;
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}

.minutes-form-wrap h4 {
    margin: 0 0 0.25rem 0;
    color: var(--text-main);
    font-size: 0.96rem;
}

.minutes-form-subtitle {
    margin: 0 0 0.75rem 0;
    color: #64748b;
    font-size: 0.78rem;
}

.minutes-form-wrap form {
    display: grid;
    gap: 0.65rem;
}

.minutes-attendee-picker {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.minutes-attendee-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #dbe4f0;
    border-radius: 10px;
    background: #ffffff;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.minutes-attendee-search input {
    border: none;
    outline: none;
    flex: 1;
    font-size: 0.9rem;
    background: transparent;
    color: var(--text-main);
}

.minutes-attendee-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.minutes-attendee-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: rgba(63, 99, 168, 0.12);
    color: var(--primary-dark);
    font-size: 0.75rem;
    font-weight: 700;
}

.minutes-attendee-chip button {
    border: none;
    background: rgba(63, 99, 168, 0.15);
    color: var(--primary-dark);
    width: 18px;
    height: 18px;
    border-radius: 999px;
    cursor: pointer;
}

.minutes-attendee-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.5rem;
    max-height: 220px;
    overflow: auto;
    padding-right: 4px;
}

.minutes-attendee-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.6rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    font-size: 0.8rem;
}

.minutes-attendee-item input {
    accent-color: var(--primary);
}

.minutes-attendee-name {
    font-weight: 700;
    color: var(--text-main);
}

.minutes-attendee-role {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.72rem;
}

.minutes-detail-modal .modal-body-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    height: 100%;
}

@media (max-width: 900px) {
    .minutes-detail-modal .modal-body-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .minutes-attendee-list {
        grid-template-columns: 1fr;
        max-height: 180px;
    }
    .minutes-detail-modal .modal-body-grid {
        grid-template-columns: 1fr !important;
    }
    .minutes-detail-modal .modal-body-grid > div {
        padding: 1rem !important;
    }
    .minutes-detail-modal .action-item-row {
        grid-template-columns: 1fr !important;
        gap: 0.6rem !important;
    }
    .minutes-detail-modal .action-item-row input,
    .minutes-detail-modal .action-item-row select {
        width: 100% !important;
    }
}

#new-minute-form {
    max-height: 78vh;
    overflow-y: auto;
}

.minutes-grid-two {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 0.6rem;
}

.minutes-field {
    margin-top: 0;
}

.minutes-form-wrap label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    font-weight: 700;
}

.minutes-form-wrap input,
.minutes-form-wrap textarea,
.minutes-multi {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 0.58rem 0.62rem;
    font: inherit;
    font-size: 0.9rem;
    background: #fff;
}

.minutes-form-wrap input,
.minutes-multi {
    min-height: 40px;
}

.minutes-form-wrap textarea {
    min-height: 120px;
    line-height: 1.45;
}

.minutes-multi {
    height: 96px;
}

.minutes-help {
    margin: 0.3rem 0 0 0;
    font-size: 0.68rem;
    color: #94a3b8;
}

.minutes-actions-box {
    margin-top: 0.1rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 12px;
    padding: 0.75rem;
}

.minutes-actions-box > label {
    margin-bottom: 0.55rem !important;
}

.minutes-add-task-btn {
    margin-top: 0.55rem;
    border: none;
    background: none;
    color: #334155;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.minutes-form-actions {
    margin-top: 0.2rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    position: sticky;
    bottom: 0;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.1) 0%, #f8fafc 40%);
    padding-top: 0.45rem;
}

.minutes-cancel-btn {
    border: 1px solid #cbd5e1;
    background: #fff;
    border-radius: 10px;
    padding: 0.62rem 1rem;
    cursor: pointer;
    font-weight: 600;
}

.minutes-save-btn {
    padding: 0.56rem 0.95rem !important;
    border-radius: 10px !important;
    font-size: 0.8rem !important;
}

.minutes-form-wrap .action-item-row {
    display: grid !important;
    grid-template-columns: 2fr 1fr 1fr auto !important;
    gap: 0.4rem !important;
    align-items: center;
    padding: 0.45rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    margin-bottom: 0.4rem !important;
}

.minutes-form-wrap .action-item-row input,
.minutes-form-wrap .action-item-row select {
    margin: 0;
    width: 100% !important;
    min-height: 38px !important;
    border-radius: 8px !important;
    font-size: 0.84rem !important;
    padding: 0.45rem 0.5rem !important;
}

.minutes-remove-task-btn {
    color: #ef4444;
    background: #fff1f2;
    border: 1px solid #fecaca;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
}

.minutes-table-wrap {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.minutes-table thead tr {
    background: #f8fafc;
}

.minutes-table th {
    color: #475569;
    font-size: 0.74rem;
}

.minutes-row {
    cursor: pointer;
}

.minutes-date-cell {
    font-weight: 600;
    color: #475569;
}

.minutes-title-cell {
    font-weight: 700;
    color: #1e293b;
    font-size: 0.95rem;
}

.minutes-meta-cell {
    font-size: 0.74rem;
    color: #94a3b8;
}

.minutes-status-locked {
    background: #f0fdf4 !important;
    color: #166534 !important;
    border: 1px solid #dcfce7 !important;
}

.minutes-status-open {
    background: #fff7ed !important;
    color: #c2410c !important;
    border: 1px solid #ffedd5 !important;
}

.minutes-action-cell {
    text-align: right;
}

.minutes-delete-btn {
    color: #ef4444 !important;
}

.minutes-open-btn {
    color: var(--primary) !important;
}

.minutes-empty-cell {
    text-align: center;
    color: #94a3b8;
    padding: 2.2rem !important;
}

.minutes-empty-cell i {
    font-size: 2rem;
    opacity: 0.35;
    display: block;
    margin-bottom: 0.45rem;
}

.minutes-empty-cell p {
    margin: 0;
}

@media (max-width: 860px) {
    .minutes-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .minutes-grid-two {
        grid-template-columns: 1fr;
    }

    .minutes-form-wrap .action-item-row {
        grid-template-columns: 1fr;
    }

    #new-minute-form {
        max-height: 84vh;
    }

    .minutes-form-actions {
        flex-direction: column;
        position: static;
        background: transparent;
        padding-top: 0;
    }

    .minutes-cancel-btn,
    .minutes-save-btn {
        width: 100%;
    }
}

/* Day Plan Premium Minimal Palette + Typography */
#day-plan-modal {
    --dp-text-strong: var(--text-main);
    --dp-text-main: var(--text-main);
    --dp-text-soft: var(--text-muted);
    --dp-line: #dbe4f0;
    --dp-line-soft: #edf2f7;
    --dp-surface: var(--bg-card);
    --dp-surface-muted: #f6f9fc;
    --dp-surface-accent: #eef3f9;
    --dp-brand: var(--primary);
    --dp-brand-soft: #e8eef8;
}

#day-plan-modal .day-plan-content {
    background: var(--dp-surface) !important;
}

#day-plan-modal .day-plan-head {
    border-bottom-color: var(--dp-line-soft) !important;
}

#day-plan-modal .day-plan-head h3 {
    color: var(--dp-text-strong) !important;
    font-weight: 650 !important;
    letter-spacing: -0.01em;
}

#day-plan-modal .day-plan-head p {
    color: var(--dp-text-soft) !important;
    font-weight: 500;
    letter-spacing: 0.01em;
}

#day-plan-modal .day-plan-intro {
    background: linear-gradient(180deg, #fbfdff 0%, #f6f9fc 100%) !important;
    border-color: #d7e4f2 !important;
}

#day-plan-modal .day-plan-intro h4,
#day-plan-modal .day-plan-intro p {
    color: #334155 !important;
}

#day-plan-modal .day-plan-context > div {
    background: var(--dp-surface-muted) !important;
    border-color: var(--dp-line) !important;
}

#day-plan-modal .day-plan-block-shell {
    background: var(--dp-surface) !important;
    border-color: #e8eef5 !important;
}

#day-plan-modal .day-plan-right-panel {
    background: linear-gradient(180deg, #fbfbff 0%, var(--dp-surface-accent) 100%) !important;
}

#day-plan-modal .day-plan-label {
    color: var(--dp-text-main) !important;
    font-weight: 650 !important;
}

#day-plan-modal .day-plan-help-text,
#day-plan-modal .day-plan-sub-help {
    color: var(--dp-text-soft) !important;
    font-style: normal !important;
    letter-spacing: 0.005em;
}

#day-plan-modal .day-plan-task-input,
#day-plan-modal .day-plan-sub-input,
#day-plan-modal .day-plan-select {
    color: var(--dp-text-main) !important;
    background: #fff !important;
    border-color: var(--dp-line) !important;
}

#day-plan-modal .day-plan-task-input::placeholder,
#day-plan-modal .day-plan-sub-input::placeholder {
    color: #94a3b8 !important;
}

#day-plan-modal .day-plan-task-input:focus,
#day-plan-modal .day-plan-sub-input:focus,
#day-plan-modal .day-plan-select:focus {
    border-color: #94a3b8 !important;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.16) !important;
}

#day-plan-modal .day-plan-at-hint {
    background: #fffaf2 !important;
    border-color: #f9d9ad !important;
}

#day-plan-modal .day-plan-at-hint-text {
    color: #9a4a15 !important;
}

#day-plan-modal .day-plan-collab-hint {
    background: #f8f7ff !important;
    border-color: #ddd6fe !important;
    color: #5b21b6 !important;
}

#day-plan-modal .day-plan-tag-chip {
    border-color: #d8d4fe !important;
    background: #fff !important;
    color: var(--dp-text-main) !important;
}

#day-plan-modal .day-plan-tag-icon {
    color: #6366f1 !important;
}

#day-plan-modal .day-plan-no-tags-title {
    color: var(--dp-text-main) !important;
    font-weight: 650 !important;
}

#day-plan-modal .day-plan-no-tags-text,
#day-plan-modal .day-plan-mini-label {
    color: var(--dp-text-soft) !important;
}

#day-plan-modal .day-plan-footer {
    border-top-color: var(--dp-line-soft) !important;
}

#day-plan-modal .day-plan-add-task-btn {
    background: #f6fdf8 !important;
    border-color: #86efac !important;
    color: #166534 !important;
}

#day-plan-modal .day-plan-discard-btn {
    color: #475569 !important;
    border-color: var(--dp-line) !important;
    background: #fff !important;
}

#day-plan-modal .day-plan-save-btn {
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    color: #fff !important;
    border: none !important;
}

/* Day Plan Premium Minimal Micro-Pass */
#day-plan-modal .day-plan-head h3 {
    font-size: clamp(1.18rem, 1.7vw, 1.35rem) !important;
    line-height: 1.2 !important;
}

#day-plan-modal .day-plan-head p {
    font-size: 0.9rem !important;
}

#day-plan-modal .day-plan-label {
    letter-spacing: 0.01em !important;
}

#day-plan-modal .day-plan-mini-label {
    font-weight: 560 !important;
}

#day-plan-modal .day-plan-save-btn i,
#day-plan-modal .day-plan-add-task-btn i,
#day-plan-modal .day-plan-add-step-btn i {
    font-size: 0.86em !important;
    opacity: 0.92;
}

#day-plan-modal .day-plan-task-input,
#day-plan-modal .day-plan-sub-input,
#day-plan-modal .day-plan-select,
#day-plan-modal .day-plan-tag-chip,
#day-plan-modal .day-plan-add-task-btn,
#day-plan-modal .day-plan-discard-btn,
#day-plan-modal .day-plan-save-btn {
    transition: background-color 170ms ease, border-color 170ms ease, color 170ms ease, box-shadow 170ms ease, transform 170ms ease;
}

#day-plan-modal .day-plan-tag-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08) !important;
}

#day-plan-modal .day-plan-add-task-btn:hover,
#day-plan-modal .day-plan-discard-btn:hover,
#day-plan-modal .day-plan-save-btn:hover {
    transform: translateY(-1px);
}

#day-plan-modal .day-plan-add-task-btn:active,
#day-plan-modal .day-plan-discard-btn:active,
#day-plan-modal .day-plan-save-btn:active {
    transform: translateY(0);
}

#day-plan-modal .day-plan-add-task-btn:focus-visible,
#day-plan-modal .day-plan-discard-btn:focus-visible,
#day-plan-modal .day-plan-save-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.24) !important;
}

/* Day Plan Footer/Scroll Fix */
#day-plan-modal #plans-container {
    overflow-y: auto !important;
    max-height: 56vh !important;
    padding-bottom: 0.35rem !important;
}

#day-plan-modal .day-plan-footer {
    position: static !important;
    bottom: auto !important;
    z-index: 1 !important;
    background: transparent !important;
}

/* Day Plan Auto-Fit Window (Desktop + Mobile) */
#day-plan-modal .day-plan-content {
    width: min(92vw, 760px) !important;
    max-height: min(88vh, 760px) !important;
    padding: 0.65rem !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}

#day-plan-modal .day-plan-head {
    margin-bottom: 0.5rem !important;
    padding-bottom: 0.45rem !important;
    flex-shrink: 0;
}

#day-plan-modal .day-plan-content form {
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    flex: 1 1 auto !important;
}

#day-plan-modal #plans-container {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    padding-right: 2px !important;
}

#day-plan-modal .plan-block {
    margin-bottom: 0.55rem !important;
}

#day-plan-modal .day-plan-block-body {
    min-height: 120px !important;
}

#day-plan-modal .day-plan-left-panel,
#day-plan-modal .day-plan-right-panel {
    padding: 0.62rem !important;
}

#day-plan-modal .day-plan-task-input {
    height: 54px !important;
    margin-bottom: 0.45rem !important;
}

#day-plan-modal .day-plan-sub-section {
    padding-top: 0.4rem !important;
}

#day-plan-modal .day-plan-collab-hint {
    margin-bottom: 0.45rem !important;
    padding: 0.38rem !important;
}

#day-plan-modal .day-plan-footer {
    margin-top: 0.4rem !important;
    padding-top: 0.4rem !important;
    flex-shrink: 0 !important;
    background: #fff !important;
    border-top: 1px solid #edf2f7 !important;
}

#day-plan-modal .day-plan-add-task-btn,
#day-plan-modal .day-plan-discard-btn,
#day-plan-modal .day-plan-save-btn {
    padding: 0.58rem !important;
    font-size: 0.84rem !important;
}

@media (max-width: 768px) {
    #day-plan-modal .day-plan-content {
        width: 96vw !important;
        max-height: 90vh !important;
        padding: 0.5rem !important;
        border-radius: 10px !important;
    }

    #day-plan-modal .day-plan-head h3 {
        font-size: 1rem !important;
    }

    #day-plan-modal .day-plan-head p {
        font-size: 0.74rem !important;
    }

    #day-plan-modal .day-plan-block-body {
        grid-template-columns: 1fr !important;
        min-height: auto !important;
    }

    #day-plan-modal .day-plan-left-panel,
    #day-plan-modal .day-plan-right-panel {
        padding: 0.52rem !important;
    }

    #day-plan-modal .day-plan-label {
        font-size: 0.76rem !important;
    }

    #day-plan-modal .day-plan-help-text,
    #day-plan-modal .day-plan-sub-help,
    #day-plan-modal .day-plan-collab-hint {
        font-size: 0.66rem !important;
    }

    #day-plan-modal .day-plan-task-input {
        height: 48px !important;
        font-size: 0.82rem !important;
    }

    #day-plan-modal .day-plan-footer {
        gap: 0.4rem !important;
    }

    #day-plan-modal .day-plan-footer > div {
        min-width: 100% !important;
    }
}

/* Day Plan compact single-column layout */
#day-plan-modal .day-plan-block-body {
    flex-direction: column !important;
    min-height: 0 !important;
}

#day-plan-modal .day-plan-block-shell {
    min-height: 0 !important;
}

#day-plan-modal .day-plan-left-panel {
    border-right: none !important;
    width: 100%;
    padding: 0.9rem !important;
}

#day-plan-modal .day-plan-task-input {
    height: 64px !important;
}

#day-plan-modal .day-plan-collab-inline {
    margin: 0 0 0.5rem 0;
    padding: 0.4rem 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

#day-plan-modal .day-plan-collab-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.3rem;
}

#day-plan-modal .day-plan-collab-hint {
    font-size: 0.64rem !important;
    color: #64748b;
}

#day-plan-modal .day-plan-tags-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    min-height: 26px;
}

#day-plan-modal .day-plan-no-tags-placeholder {
    width: 100%;
    padding: 0.3rem 0.4rem !important;
    border-radius: 8px !important;
    border: 1px dashed #cbd5e1 !important;
    background: #ffffff !important;
}

#day-plan-modal .day-plan-no-tags-icon-wrap {
    width: 20px !important;
    height: 20px !important;
    margin-bottom: 0.2rem !important;
}

#day-plan-modal .day-plan-no-tags-title {
    font-size: 0.7rem !important;
    margin-bottom: 0.1rem !important;
}

#day-plan-modal .day-plan-no-tags-text {
    font-size: 0.64rem !important;
}

@media (max-width: 700px) {
    #day-plan-modal .day-plan-collab-head {
        flex-direction: column;
        align-items: flex-start;
    }

    #day-plan-modal .day-plan-content {
        padding: 0.7rem !important;
    }
}

/* Global Modal Refresh: warm, fresh, professional */
.annual-detail-modal,
.notify-combined-modal,
#day-plan-modal .day-plan-content,
#task-details-modal .modal-content,
#manual-admin-log-modal .modal-content,
#cell-override-modal .modal-content,
#staff-message-modal .modal-content,
#staff-task-modal .modal-content {
    background: linear-gradient(180deg, #fffef8 0%, #fff7ec 100%) !important;
    border: 1px solid #f4d2ae !important;
    box-shadow: 0 24px 44px rgba(15, 23, 42, 0.22), 0 4px 12px rgba(120, 53, 15, 0.12) !important;
}

.annual-detail-modal .annual-detail-item,
#day-plan-modal .plan-block,
#day-plan-modal .day-plan-block-shell {
    background: rgba(255, 255, 255, 0.84) !important;
    border-color: #f6d8b9 !important;
}

.modal-content button:not(.action-btn),
.annual-detail-modal button:not(.action-btn),
#day-plan-modal button:not(.action-btn):not(.day-plan-save-btn):not(.day-plan-discard-btn):not(.day-plan-add-task-btn) {
    border-color: #f4d2ae !important;
    background: #fff8f0 !important;
    color: #7c2d12 !important;
}

.modal-content button:not(.action-btn):hover,
.annual-detail-modal button:not(.action-btn):hover,
#day-plan-modal button:not(.action-btn):not(.day-plan-save-btn):not(.day-plan-discard-btn):not(.day-plan-add-task-btn):hover {
    background: #ffedd5 !important;
}
