@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

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

:root {
    --bg: #0a0a0a;
    --bg-elev: #0f0f0f;
    --bg-elev-2: #141414;
    --text: #f7f7f7;
    --muted: #b3b3b3;
    --line: #1f1f1f;
    --accent: #ffffff;
    --accent-soft: rgba(255, 255, 255, 0.12);
    --accent-1: #2dd4bf;
    --accent-2: #60a5fa;
    --accent-3: #fbbf24;
    --accent-4: #f97316;
    --accent-5: #34d399;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
    --glow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 12px 28px rgba(0, 0, 0, 0.5), 0 0 40px rgba(255, 255, 255, 0.08);
}

body.theme-light {
    --bg: #f4f5f7;
    --bg-elev: #ffffff;
    --bg-elev-2: #f0f1f4;
    --text: #121212;
    --muted: #5b5f66;
    --line: #e1e4ea;
    --accent: #0b0b0b;
    --accent-soft: rgba(11, 11, 11, 0.08);
    --accent-1: #14b8a6;
    --accent-2: #3b82f6;
    --accent-3: #f59e0b;
    --accent-4: #f97316;
    --accent-5: #10b981;
    --shadow: 0 20px 50px rgba(16, 20, 24, 0.12);
    --glow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 16px 40px rgba(0, 0, 0, 0.08);
    background-image: radial-gradient(circle at top left, rgba(59, 130, 246, 0.08), transparent 45%),
        radial-gradient(circle at 40% 20%, rgba(20, 184, 166, 0.08), transparent 55%),
        radial-gradient(circle at 85% 10%, rgba(245, 158, 11, 0.08), transparent 35%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.02), transparent 40%);
}

body.theme-light .sidebar {
    background: #fafbfc;
    border-right: 1px solid var(--line);
}

body.theme-light .toggle-btn {
    background: #111;
    border-color: #111;
}

body.theme-light .toggle-btn i {
    color: #fff;
}

body.theme-light .nav .menu ul li a {
    color: var(--text);
}

body.theme-light .nav .menu ul li a:hover,
body.theme-light .nav .menu ul li.active a {
    background: #111;
    color: #fff;
}

body.dashboard-minimal .kpi-card,
body.dashboard-minimal .panel,
body.dashboard-minimal .table-container {
    box-shadow: none;
    border: 1px solid var(--line);
    background: var(--bg-elev);
}

body.dashboard-minimal .page-header .subtitle,
body.dashboard-minimal .panel-subtitle {
    color: var(--muted);
}

body {
    font-family: 'Manrope', 'Space Grotesk', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    background-image: none;
}

.mobile-quick-nav {
    display: none;
}

.quick-links-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin: 12px 0 24px;
}

.quick-link-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #0b0b0b;
    color: var(--text);
    font-weight: 600;
    letter-spacing: 0.2px;
    transition: all 0.2s ease;
}

.quick-link-card i {
    font-size: 18px;
    transition: transform 0.2s ease;
}

.quick-link-card:hover {
    border-color: rgba(45, 212, 191, 0.4);
    background: linear-gradient(140deg, rgba(45, 212, 191, 0.12), rgba(96, 165, 250, 0.08));
    transform: translateY(-1px);
}

.quick-link-card:hover i {
    transform: translateY(-2px) scale(1.04);
}

.page-footer {
    margin-top: 28px;
    padding: 18px 10px 26px;
    text-align: center;
    color: #8a8a8a;
    font-size: 0.85rem;
    border-top: 1px solid var(--line);
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: 100%;
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 280px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #050505;
    padding: 26px 16px;
    border-right: 1px solid var(--line);
    position: sticky;
    top: 0;
    transition: width 0.3s ease;
    overflow: hidden;
}

.sidebar.collapsed {
    width: 0;
    padding: 0;
    border-right: none;
}

.head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 12px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--line);
    position: relative;
}

.toggle-btn {
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    background: var(--text);
    border: 1px solid var(--line);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.toggle-btn:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.05);
}

.toggle-btn i {
    color: #000;
    font-size: 14px;
    transition: transform 0.3s ease;
}

.sidebar.collapsed .toggle-btn i {
    transform: rotate(180deg);
}

.user-img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid var(--line);
    flex-shrink: 0;
}

.user-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
}

.user-details {
    flex: 1;
    min-width: 0;
    transition: opacity 0.3s ease, width 0.3s ease;
}

.sidebar.collapsed .user-details {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar.collapsed .nav {
    opacity: 0;
    pointer-events: none;
}

.sidebar.collapsed .head > :not(.toggle-btn) {
    opacity: 0;
    pointer-events: none;
}

.user-details .title {
    font-size: 10px;
    font-weight: 600;
    color: #9a9a9a;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 4px;
}

.user-details .name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.nav::-webkit-scrollbar {
    width: 4px;
}

.nav::-webkit-scrollbar-track {
    background: transparent;
}

.nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.menu {
    margin-bottom: 32px;
}

.menu.account-section {
    margin-top: auto;
    margin-bottom: 0;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.menu .title {
    font-size: 11px;
    font-weight: 600;
    color: #8a8a8a;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0 12px;
    margin-bottom: 12px;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.sidebar.collapsed .menu .title {
    opacity: 0;
    height: 0;
    margin: 0;
    padding: 0;
}

.menu ul {
    list-style: none;
}

.menu ul li {
    margin-bottom: 4px;
}

.menu ul li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.menu ul li a:hover {
    background: linear-gradient(90deg, rgba(45, 212, 191, 0.12), rgba(96, 165, 250, 0.08));
}

.menu ul li.active a {
    background: linear-gradient(90deg, rgba(45, 212, 191, 0.22), rgba(96, 165, 250, 0.16));
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.25), 0 12px 28px rgba(45, 212, 191, 0.1);
}

.menu ul li a .icon {
    font-size: 20px;
    flex-shrink: 0;
    min-width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu ul li a .text {
    flex: 1;
    min-width: 0;
    transition: opacity 0.3s ease, width 0.3s ease;
}

.sidebar.collapsed .menu ul li a .text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar.collapsed .menu ul li a {
    justify-content: center;
    padding: 12px;
}

.sidebar.collapsed .toggle-btn {
    position: fixed;
    left: 12px;
    top: 28px;
    transform: none;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.12);
    z-index: 3000;
}

.sidebar.collapsed .toggle-btn i {
    transform: rotate(180deg);
}

.main-content {
    flex: 1;
    padding: 40px;
    color: var(--text);
    background: transparent;
}

body.dashboard-mode .main-content {
    padding-top: 56px;
}

.page-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.page-title {
    font-family: 'Space Grotesk', 'Manrope', sans-serif;
    font-size: 2.4rem;
    font-weight: 600;
    letter-spacing: -1px;
    margin-bottom: 6px;
    background: linear-gradient(120deg, var(--accent-1), var(--accent-2));
    -webkit-background-clip: text;
    color: transparent;
}

.page-subtitle {
    color: var(--muted);
    font-size: 1.05rem;
    max-width: 560px;
}

.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}

body.dashboard-mode .page-header {
    margin-top: 8px;
    margin-bottom: 34px;
}

.header-left h1 {
    font-family: 'Space Grotesk', 'Manrope', sans-serif;
    font-size: 2.2rem;
    font-weight: 600;
    letter-spacing: -0.8px;
    margin-bottom: 6px;
    background: linear-gradient(120deg, var(--accent-1), var(--accent-2));
    -webkit-background-clip: text;
    color: transparent;
}

.subtitle {
    color: var(--muted);
    font-size: 1rem;
}

.header-right {
    display: flex;
    align-items: center;
}

.datetime-display {
    text-align: right;
    font-size: 0.95rem;
    color: var(--muted);
}

.datetime-display .date {
    font-weight: 600;
    color: #dcdcdc;
    margin-bottom: 2px;
}

.datetime-display .time {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}

.action-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.action-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filters,
.filters-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    border: 1px solid transparent;
    transition: all 0.25s ease;
    cursor: pointer;
    white-space: nowrap;
}

.btn i {
    font-size: 18px;
}

.btn-primary {
    background: #fff;
    color: #000;
    border-color: #fff;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6), 0 12px 30px rgba(255, 255, 255, 0.18);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8), 0 16px 40px rgba(255, 255, 255, 0.24);
}

.btn-secondary {
    background: #fff;
    color: #000;
    border-color: #fff;
}

.btn-secondary:hover {
    border-color: rgba(255, 255, 255, 0.85);
    box-shadow: 0 0 22px rgba(255, 255, 255, 0.22);
}

.btn-outline {
    background: #fff;
    color: #000;
    border-color: #fff;
}

.btn-outline:hover {
    border-color: rgba(255, 255, 255, 0.85);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.22);
}

body.dashboard-mode .btn-primary {
    background: linear-gradient(120deg, var(--accent-1), var(--accent-2));
    color: #031314;
    border-color: transparent;
    box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.5), 0 12px 30px rgba(96, 165, 250, 0.22);
}

body.dashboard-mode .btn-primary:hover {
    box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.7), 0 16px 40px rgba(45, 212, 191, 0.28);
}

body.dashboard-mode .btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.18);
}

body.dashboard-mode .btn-secondary:hover {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 22px rgba(96, 165, 250, 0.18);
}

body.dashboard-mode .btn-outline {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

body.dashboard-mode .btn-outline:hover {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.18);
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.85rem;
}

label {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.input,
.date-input,
.select-input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
    background: var(--bg-elev-2);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--text);
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.45);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.table-container,
.panel,
.card {
    background: var(--bg-elev);
    border-radius: 18px;
    padding: 20px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover,
.panel:hover,
.table-container:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

.card.large { grid-column: span 7; }
.card.small { grid-column: span 5; }
.card.full { grid-column: span 12; }

.step-list {
    display: grid;
    gap: 12px;
}

.step-card {
    background: var(--bg-elev-2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px 16px;
    display: grid;
    gap: 6px;
}

.step-card strong {
    font-size: 0.98rem;
}

.step-card span {
    color: var(--muted);
    font-size: 0.92rem;
}

.quick-list {
    display: grid;
    gap: 10px;
}

.table-container {
    padding: 0;
    overflow: hidden;
}

.table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text);
}

.table thead {
    background: #121212;
}

.table th {
    padding: 14px 18px;
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #9a9a9a;
}

.table td {
    padding: 16px 18px;
    font-size: 0.95rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.04);
}

.no-data {
    text-align: center;
    color: var(--muted);
    padding: 36px 20px !important;
    font-size: 0.95rem;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.kpi-card {
    background: linear-gradient(150deg, rgba(45, 212, 191, 0.08), rgba(96, 165, 250, 0.05) 45%, rgba(15, 15, 15, 0.0) 70%), var(--bg-elev);
    border: 1px solid rgba(45, 212, 191, 0.2);
    border-radius: 16px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.55), 0 0 30px rgba(96, 165, 250, 0.12);
}

.kpi-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.kpi-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
}

.kpi-meta {
    font-size: 12px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.kpi-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 999px;
    background: linear-gradient(120deg, rgba(45, 212, 191, 0.22), rgba(96, 165, 250, 0.18));
    color: #eafffb;
    font-weight: 600;
}

.section-grid,
.help-grid,
.grid-12 {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 18px;
}

.span-5 { grid-column: span 5; }
.span-7 { grid-column: span 7; }
.span-12 { grid-column: span 12; }

.panel-title,
.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.panel-subtitle {
    color: var(--muted);
    font-size: 0.92rem;
    margin-bottom: 16px;
}

.trend-bars {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    align-items: flex-end;
    height: 140px;
}

.trend-bar {
    background: linear-gradient(180deg, var(--accent-2) 0%, var(--accent-4) 100%);
    border-radius: 8px;
    height: 40%;
    position: relative;
    opacity: 0.8;
}

.trend-bar span {
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: var(--muted);
}

.snapshot-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-scroll {
    max-height: 120px;
    overflow-y: auto;
    padding-right: 6px;
}

.compact-activity-panel {
    padding: 14px 14px 12px;
}

.compact-activity-panel .panel-title {
    margin-bottom: 8px;
    font-size: 0.98rem;
}

.compact-activity-panel .panel-subtitle {
    margin-bottom: 10px;
    font-size: 0.82rem;
}

.compact-activity-panel .snapshot-item {
    padding: 8px 10px;
    border-radius: 10px;
}

.compact-activity-panel .snapshot-item strong {
    font-size: 0.88rem;
}

.compact-activity-panel .snapshot-meta {
    font-size: 11px;
}

.activity-scroll::-webkit-scrollbar {
    width: 8px;
}

.activity-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
}

.activity-scroll::-webkit-scrollbar-thumb {
    background: rgba(45, 212, 191, 0.5);
    border-radius: 999px;
}

.activity-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(45, 212, 191, 0.72);
}

.snapshot-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--bg-elev-2);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.snapshot-item strong {
    color: var(--text);
}

.snapshot-meta {
    color: var(--muted);
    font-size: 12px;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 600;
    border: 1px solid transparent;
}

.status-success { background: rgba(52, 211, 153, 0.2); color: #bbf7d0; border-color: rgba(52, 211, 153, 0.45); }
.status-warning { background: rgba(251, 191, 36, 0.18); color: #ffe8a3; border-color: rgba(251, 191, 36, 0.4); }
.status-danger { background: rgba(248, 113, 113, 0.18); color: #fecaca; border-color: rgba(248, 113, 113, 0.5); }

.progress-track {
    height: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2), var(--accent-3));
    width: 40%;
}

.date-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
}

.card-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.kpi-card.center {
    text-align: center;
}

.panel-row {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.form-stack {
    display: grid;
    gap: 12px;
}

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

.mb-24 { margin-bottom: 24px; }
.mb-18 { margin-bottom: 18px; }
.mb-12 { margin-bottom: 12px; }
.mb-6 { margin-bottom: 6px; }
.mt-24 { margin-top: 24px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }

.inline-muted {
    color: var(--muted);
    display: inline-flex;
    align-items: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(45, 212, 191, 0.35);
    background: linear-gradient(120deg, rgba(45, 212, 191, 0.18), rgba(96, 165, 250, 0.12));
    color: #eafffb;
}

.badge .ph {
    font-size: 14px;
    line-height: 1;
}

.danger-card {
    border-color: rgba(239, 68, 68, 0.35);
    box-shadow: 0 18px 50px rgba(239, 68, 68, 0.08);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #fecaca;
    border: 1px solid rgba(239, 68, 68, 0.6);
}

.btn-danger:hover {
    border-color: rgba(239, 68, 68, 0.9);
    box-shadow: 0 0 22px rgba(239, 68, 68, 0.2);
}

.toast-container {
    position: fixed;
    top: 24px;
    left: 24px;
    transform: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10050;
    pointer-events: none;
}

.toast {
    min-width: 220px;
    max-width: 420px;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 200ms ease, transform 200ms ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    border-color: rgba(34, 197, 94, 0.6);
}

.toast.error {
    border-color: rgba(239, 68, 68, 0.5);
}

.toast.warn {
    border-color: rgba(245, 158, 11, 0.7);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.contact-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px;
}

.contact-card .label {
    color: #8a8a8a;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-card .value {
    font-weight: 600;
    margin-top: 6px;
}

.note {
    margin-top: 14px;
    color: var(--muted);
    font-size: 0.92rem;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 4, 4, 0.86);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    padding: 24px;
}

.modal-card {
    width: min(1040px, 94vw);
    max-height: 88vh;
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--glow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-card.modal-full {
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
}

.modal-card.modal-full .modal-body {
    max-height: calc(100vh - 140px);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
}

.modal-title {
    font-family: 'Space Grotesk', 'Manrope', sans-serif;
    font-size: 1.35rem;
    margin: 0;
}

.modal-sub {
    color: var(--muted);
    font-size: 0.85rem;
}

.modal-body {
    padding: 20px 22px;
    overflow: auto;
    display: grid;
    gap: 16px;
}

.modal-footer {
    padding: 16px 22px 20px;
    border-top: 1px solid var(--line);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-section {
    display: grid;
    gap: 10px;
}

.modal-section-title {
    font-size: 0.95rem;
    font-weight: 600;
}

.modal-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.segmented {
    display: inline-flex;
    gap: 6px;
    padding: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.segmented button {
    border: none;
    background: transparent;
    color: var(--muted);
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.segmented button.active {
    color: #000;
    background: #fff;
    box-shadow: 0 8px 18px rgba(255, 255, 255, 0.15);
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.modal-table-wrap {
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: auto;
    max-height: 60vh;
}

.modal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    min-width: 1100px;
}

.modal-table thead {
    background: rgba(255, 255, 255, 0.04);
}

.modal-table th,
.modal-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    vertical-align: middle;
}

.modal-table th {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.7rem;
    color: var(--muted);
}

.modal-table input[type="text"],
.modal-table input[type="number"],
.modal-table select {
    width: 100%;
    min-width: 110px;
}

.modal-table .emp-total,
.modal-table .manual-total {
    font-weight: 600;
}

.icon-btn {
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: transparent;
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    border-color: rgba(255, 255, 255, 0.6);
}

.icon-btn.danger {
    border-color: rgba(239, 68, 68, 0.5);
    color: #fca5a5;
}

.icon-btn.danger:hover {
    border-color: rgba(239, 68, 68, 0.9);
}

.is-hidden {
    display: none !important;
}

.auth-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 4, 4, 0.86);
    backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 2000;
}

.auth-overlay.active {
    opacity: 1;
    visibility: visible;
}

.auth-panel {
    width: min(420px, 92vw);
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 28px 26px;
    text-align: center;
    box-shadow: var(--glow);
}

.auth-orb {
    width: 68px;
    height: 68px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, var(--accent-3), rgba(96, 165, 250, 0.3));
    box-shadow: 0 0 35px rgba(96, 165, 250, 0.35), 0 0 60px rgba(45, 212, 191, 0.25);
    animation: pulse 1.4s infinite ease-in-out;
}

.auth-title {
    font-family: 'Space Grotesk', 'Manrope', sans-serif;
    font-size: 1.25rem;
    margin-bottom: 6px;
}

.auth-sub {
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 18px;
}

.auth-bar {
    position: relative;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.auth-bar span {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, #fff, transparent);
    transform: translateX(-100%);
    animation: slide 1.2s infinite ease-in-out;
}

@keyframes slide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.08); opacity: 1; }
}

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

.page-header,
.quick-links-panel,
.kpi-card,
.panel,
.card,
.table-container {
    animation: riseIn 600ms ease both;
}

.kpi-card:nth-child(1) { animation-delay: 0.05s; }
.kpi-card:nth-child(2) { animation-delay: 0.08s; }
.kpi-card:nth-child(3) { animation-delay: 0.11s; }
.kpi-card:nth-child(4) { animation-delay: 0.14s; }
.kpi-card:nth-child(5) { animation-delay: 0.17s; }
.kpi-card:nth-child(6) { animation-delay: 0.2s; }
.kpi-card:nth-child(7) { animation-delay: 0.23s; }
.kpi-card:nth-child(8) { animation-delay: 0.26s; }

.section-grid .panel:nth-child(1) { animation-delay: 0.08s; }
.section-grid .panel:nth-child(2) { animation-delay: 0.12s; }
.section-grid .panel:nth-child(3) { animation-delay: 0.16s; }
.section-grid .panel:nth-child(4) { animation-delay: 0.2s; }
.section-grid .panel:nth-child(5) { animation-delay: 0.24s; }

.grid-12 .card:nth-child(1) { animation-delay: 0.06s; }
.grid-12 .card:nth-child(2) { animation-delay: 0.1s; }
.grid-12 .card:nth-child(3) { animation-delay: 0.14s; }
.grid-12 .card:nth-child(4) { animation-delay: 0.18s; }
.grid-12 .card:nth-child(5) { animation-delay: 0.22s; }
.grid-12 .card:nth-child(6) { animation-delay: 0.26s; }
.grid-12 .card:nth-child(7) { animation-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
    .page-header,
    .quick-links-panel,
    .kpi-card,
    .panel,
    .card,
    .table-container,
    .quick-link-card {
        animation: none !important;
        transition: none !important;
    }
}

@media (max-width: 1100px) {
    .card.large,
    .card.small,
    .span-5,
    .span-7 {
        grid-column: span 12;
    }

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

    .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .section-grid,
    .grid-12 {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    body {
        padding-bottom: 78px;
    }

    .mobile-quick-nav {
        position: fixed;
        left: 16px;
        right: 16px;
        bottom: 16px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        padding: 10px 12px;
        background: rgba(10, 10, 10, 0.92);
        border: 1px solid var(--line);
        border-radius: 18px;
        box-shadow: var(--shadow);
        backdrop-filter: blur(12px);
        z-index: 999;
    }

    .mobile-quick-nav .quick-link {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        padding: 10px 6px;
        border-radius: 14px;
        color: var(--muted);
        font-size: 0.72rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.6px;
        transition: all 0.2s ease;
    }

    .mobile-quick-nav .quick-link i {
        font-size: 20px;
        color: inherit;
    }

    .mobile-quick-nav .quick-link.active,
    .mobile-quick-nav .quick-link:hover {
        color: var(--text);
        background: var(--accent-soft);
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        z-index: 1000;
        transform: translateX(-100%);
    }

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

    .toggle-btn {
        position: fixed;
        left: 16px;
        top: 18px;
        z-index: 1200;
    }

    .main-content {
        padding: 28px 20px 60px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-right {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 12px;
    }

    .datetime-display {
        text-align: left;
    }

    .kpi-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }

    .card-grid-3 {
        grid-template-columns: 1fr;
    }

    .action-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .action-buttons {
        width: 100%;
        flex-direction: column;
    }

    .action-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .filters,
    .filters-bar {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .filters > *,
    .filters-bar > * {
        width: 100%;
    }
}

.table {
    min-width: 720px;
}

/* Theme guard: ensure text/headers are visible even if external styles override colors */
html,
body {
    background-color: #0a0a0a !important;
    color: #f7f7f7 !important;
}

h1, h2, h3, h4, h5, h6 {
    color: #ffffff !important;
}

.page-title,
.header-left h1 {
    color: transparent !important;
    -webkit-text-fill-color: transparent;
}

.card,
.panel,
.table-container,
.sidebar,
.main-content {
    background-color: inherit;
}
