:root {
    color-scheme: light;
    --bg: #f7f8fc;
    --bg-2: #eef2ff;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --border: rgba(15, 23, 42, 0.08);
    --text: #0f172a;
    --muted: #64748b;
    --primary: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --accent: #6366f1;
    --accent-600: #4f46e5;
    --success: #22c55e;
    --success-600: #16a34a;
    --warning: #f59e0b;
    --warning-600: #d97706;
    --danger: #ef4444;
    --danger-600: #dc2626;
    --info: #06b6d4;
    --info-600: #0891b2;
    --nav-start: #0f172a;
    --nav-end: #1f2937;
    --shadow-sm: 0 8px 20px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-xl: 0 25px 60px rgba(15, 23, 42, 0.18);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.25rem;
}

* {
    transition: var(--transition);
}

body {
    background: radial-gradient(circle at top, #eef2ff 0%, var(--bg) 35%, #ffffff 100%);
    color: var(--text);
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

.animate-slide-in {
    animation: slideIn 0.3s ease-out;
}

.loading-spinner {
    animation: spin 1s linear infinite;
}

body.dark-mode {
    color-scheme: dark;
    --bg: #0b1220;
    --bg-2: #0f172a;
    --surface: #111827;
    --surface-2: #0f172a;
    --border: rgba(30, 41, 59, 0.9);
    --text: #e2e8f0;
    --muted: #94a3b8;
    --primary: #60a5fa;
    --primary-600: #3b82f6;
    --accent: #818cf8;
    --success: #34d399;
    --warning: #fbbf24;
    --danger: #f87171;
    --nav-start: #020617;
    --nav-end: #0f172a;
}

body.dark-mode {
    background: radial-gradient(circle at top, #0f172a 0%, #0b1220 45%, #05070c 100%);
}

a {
    color: var(--primary-600);
}

main.container {
    max-width: 1200px;
}

.app-navbar {
    background: linear-gradient(120deg, var(--nav-start), var(--nav-end));
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.25);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.navbar .nav-link {
    color: rgba(255, 255, 255, 0.85);
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    color: #ffffff;
}

.navbar .navbar-brand {
    font-weight: 700;
    letter-spacing: 0.3px;
}

.brand-dot {
    width: 10px;
    height: 10px;
    background: linear-gradient(120deg, #60a5fa, #22d3ee);
    border-radius: 999px;
    display: inline-block;
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.25);
}

.brand-icon {
    font-size: 1.1rem;
    opacity: 0.9;
}

.icon-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.icon {
    width: 1em;
    height: 1em;
    fill: currentColor;
    stroke: currentColor;
    display: inline-block;
    flex-shrink: 0;
}

.app-navbar .icon,
.app-subnav .icon {
    width: 1.1rem;
    height: 1.1rem;
}

.nav-chip .icon {
    margin-right: 0.2rem;
}

.app-subnav {
    background: rgba(15, 23, 42, 0.04);
    border-bottom: 1px solid var(--border);
}

.app-subnav .container {
    padding: 0.6rem 0;
}

.nav-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    border: 1px solid var(--border);
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-chip i {
    font-size: 0.95rem;
}

.nav-chip:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.card {
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.card .card-body {
    padding: 1.5rem;
}

.module-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.module-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.module-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary-600);
    font-size: 1.2rem;
}

.table {
    margin-bottom: 0;
}

.table-responsive {
    border-radius: 1rem;
    border: 1px solid var(--border);
    overflow: hidden;
}

.table thead th {
    border-bottom: 0;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
}

.table tbody tr {
    transition: background 0.2s ease;
}

.table tbody tr:hover {
    background: rgba(148, 163, 184, 0.12);
}

.btn {
    border-radius: 0.8rem;
    font-weight: 600;
}

.btn i {
    font-size: 0.95rem;
    vertical-align: -0.05rem;
}

.btn .icon {
    vertical-align: -0.1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: 0;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-600), var(--accent));
}

.btn-outline-primary {
    border-color: rgba(59, 130, 246, 0.5);
    color: var(--primary-600);
}

.btn-outline-primary:hover {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.8);
    color: var(--primary-600);
}

.btn-outline-secondary {
    border-color: #cbd5f5;
    color: #475569;
}

.btn-outline-secondary:hover {
    background: #eef2ff;
    border-color: #a5b4fc;
}

.alert {
    border-radius: 0.75rem;
}

.form-control,
.form-select {
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    padding: 0.6rem 0.9rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.18);
}

.page-title {
    font-weight: 700;
    color: var(--text);
}

.card-title {
    font-weight: 600;
    color: var(--text);
}

.badge-soft {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-600);
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-weight: 600;
    font-size: 0.75rem;
}

.charts-section {
    margin-bottom: 2rem;
}

.chart-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 0.85rem;
    padding: 1rem;
}

.chart-card canvas {
    width: 100%;
}

.page-hero {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(99, 102, 241, 0.1));
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.page-hero h1 {
    font-weight: 700;
}

.page-hero .hero-actions .btn {
    min-width: 140px;
}

.home-hero {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.16), rgba(99, 102, 241, 0.12));
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
}

.home-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(59, 130, 246, 0.14);
    color: var(--primary-600);
    border-radius: 999px;
    padding: 0.4rem 0.85rem;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.home-preview {
    border-radius: 1.25rem;
}

.home-stat {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.85rem;
    border-radius: 0.9rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
}

.home-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary-600);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.home-section {
    margin-top: 2.5rem;
}

.home-section-title {
    font-weight: 700;
}

.feature-card {
    padding: 1.5rem;
    border-radius: 1.25rem;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.feature-card i {
    font-size: 1.5rem;
    color: var(--primary-600);
}

.feature-card h5 {
    margin-top: 1rem;
    font-weight: 600;
}

.feature-card p {
    color: var(--muted);
    margin-bottom: 0;
}

.cta-card {
    padding: 2rem;
    border-radius: 1.25rem;
    border: 1px solid var(--border);
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    box-shadow: var(--shadow-sm);
}

.auth-page main.container {
    padding-top: 3rem;
    padding-bottom: 4rem;
}

.auth-card {
    border-radius: 1.25rem;
    box-shadow: var(--shadow-lg);
}

.auth-card .card-body {
    padding: 2rem;
}

.auth-layout {
    margin-top: 1rem;
}

.auth-panel {
    position: relative;
    border-radius: 1.5rem;
    padding: 2.5rem;
    color: #eef2ff;
    background: linear-gradient(140deg, rgba(37, 99, 235, 0.95), rgba(79, 70, 229, 0.9));
    overflow: hidden;
    min-height: 100%;
}

.auth-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top, rgba(255, 255, 255, 0.2), transparent 60%);
    opacity: 0.9;
}

.auth-panel > * {
    position: relative;
    z-index: 1;
}

.auth-panel h2 {
    font-weight: 700;
}

.auth-panel p {
    color: rgba(238, 242, 255, 0.85);
}

.auth-panel-card {
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(15, 23, 42, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(6px);
}

.auth-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
    display: grid;
    gap: 0.75rem;
}

.auth-list li {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    font-size: 0.95rem;
}

.auth-list span {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #c7d2fe;
    display: inline-block;
}

.auth-micro {
    font-size: 0.85rem;
    color: rgba(226, 232, 240, 0.8);
}

.app-footer {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
}

body.dark-mode .table,
body.dark-mode .table td,
body.dark-mode .table th {
    color: var(--text);
}

body.dark-mode .table tbody tr {
    border-color: rgba(51, 65, 85, 0.6);
}

body.dark-mode .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(15, 23, 42, 0.6);
    color: var(--text);
}

body.dark-mode .text-muted,
body.dark-mode .navbar-text {
    color: var(--muted) !important;
}

body.dark-mode .card,
body.dark-mode .chart-card {
    color: var(--text);
}

body.dark-mode .app-subnav {
    background: rgba(2, 6, 23, 0.65);
}

body.dark-mode .nav-chip {
    background: var(--surface);
    border-color: rgba(51, 65, 85, 0.8);
}

body.dark-mode .form-control::placeholder,
body.dark-mode .form-select {
    color: var(--muted);
}

body.dark-mode .form-control,
body.dark-mode .form-select {
    border-color: rgba(51, 65, 85, 0.9);
}

body.dark-mode .alert {
    color: var(--text);
    background-color: rgba(30, 41, 59, 0.85);
    border-color: rgba(51, 65, 85, 0.9);
}

body.dark-mode a {
    color: #93c5fd;
}

/* ========================================
   MODERN COMPONENTS
   ======================================== */

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    min-width: 320px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.3s ease-out;
}

.toast.toast-success {
    border-left: 4px solid var(--success);
}

.toast.toast-error {
    border-left: 4px solid var(--danger);
}

.toast.toast-warning {
    border-left: 4px solid var(--warning);
}

.toast.toast-info {
    border-left: 4px solid var(--info);
}

.toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.toast-message {
    font-size: 0.875rem;
    color: var(--muted);
}

.toast-close {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
}

/* Search Bar */
.global-search {
    position: relative;
    max-width: 500px;
    margin: 0 auto 2rem;
}

.global-search input {
    width: 100%;
    padding: 0.875rem 3rem 0.875rem 3rem;
    border-radius: var(--radius-xl);
    border: 2px solid var(--border);
    background: var(--surface);
    font-size: 1rem;
    transition: var(--transition);
}

.global-search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    outline: none;
}

.global-search .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}

.global-search .search-clear {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 0.25rem;
}

.search-results {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

.search-result-item {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
}

.search-result-item:hover {
    background: var(--surface-2);
}

.search-result-item:last-child {
    border-bottom: none;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card-icon.primary {
    background: rgba(59, 130, 246, 0.12);
    color: var(--primary-600);
}

.stat-card-icon.success {
    background: rgba(34, 197, 94, 0.12);
    color: var(--success-600);
}

.stat-card-icon.warning {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning-600);
}

.stat-card-icon.danger {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger-600);
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-card-label {
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 500;
}

.stat-card-trend {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    margin-top: 0.5rem;
}

.stat-card-trend.up {
    background: rgba(34, 197, 94, 0.12);
    color: var(--success-600);
}

.stat-card-trend.down {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger-600);
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 50%, var(--surface-2) 75%);
    background-size: 200% 100%;
    animation: pulse 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-title {
    height: 1.5rem;
    width: 60%;
    margin-bottom: 1rem;
}

.skeleton-card {
    height: 200px;
    border-radius: var(--radius-xl);
}

/* Progress Bar */
.progress-modern {
    height: 8px;
    background: var(--surface-2);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.progress-modern-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 999px;
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}

.progress-modern-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Badge Modern */
.badge-modern {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid;
}

.badge-modern.primary {
    background: rgba(59, 130, 246, 0.12);
    color: var(--primary-600);
    border-color: rgba(59, 130, 246, 0.2);
}

.badge-modern.success {
    background: rgba(34, 197, 94, 0.12);
    color: var(--success-600);
    border-color: rgba(34, 197, 94, 0.2);
}

.badge-modern.warning {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning-600);
    border-color: rgba(245, 158, 11, 0.2);
}

.badge-modern.danger {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger-600);
    border-color: rgba(239, 68, 68, 0.2);
}

.badge-modern.info {
    background: rgba(6, 182, 212, 0.12);
    color: var(--info-600);
    border-color: rgba(6, 182, 212, 0.2);
}

/* Dropdown Modern */
.dropdown-modern {
    position: relative;
}

.dropdown-modern-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 200px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 0.5rem;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
}

.dropdown-modern.active .dropdown-modern-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-modern-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    color: var(--text);
    text-decoration: none;
    transition: var(--transition);
}

.dropdown-modern-item:hover {
    background: var(--surface-2);
}

/* Modal Modern */
.modal-modern {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-modern.active {
    opacity: 1;
    visibility: visible;
}

.modal-modern-content {
    background: var(--surface);
    border-radius: var(--radius-xl);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    transform: scale(0.9);
    transition: var(--transition);
}

.modal-modern.active .modal-modern-content {
    transform: scale(1);
}

.modal-modern-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-modern-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.modal-modern-close {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.modal-modern-close:hover {
    background: var(--surface-2);
}

.modal-modern-body {
    padding: 1.5rem;
}

.modal-modern-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* File Upload Modern */
.file-upload-modern {
    border: 2px dashed var(--border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--surface-2);
}

.file-upload-modern:hover,
.file-upload-modern.dragover {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.05);
}

.file-upload-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: var(--radius-lg);
    background: rgba(59, 130, 246, 0.12);
    color: var(--primary-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.file-upload-text {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.file-upload-hint {
    font-size: 0.875rem;
    color: var(--muted);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 0.25rem;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: var(--primary);
    border: 3px solid var(--surface);
    box-shadow: 0 0 0 2px var(--border);
}

.timeline-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem;
}

.timeline-date {
    font-size: 0.75rem;
    color: var(--muted);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Quick Actions */
.quick-actions {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

.quick-action-btn {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border: none;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: var(--transition);
}

.quick-action-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
}

/* Responsive Tables */
@media (max-width: 768px) {
    .table-responsive-modern {
        border: none;
    }
    
    .table-responsive-modern table {
        border: 0;
    }
    
    .table-responsive-modern thead {
        display: none;
    }
    
    .table-responsive-modern tr {
        display: block;
        margin-bottom: 1rem;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        padding: 1rem;
    }
    
    .table-responsive-modern td {
        display: flex;
        justify-content: space-between;
        padding: 0.5rem 0;
        border: none;
    }
    
    .table-responsive-modern td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--muted);
    }
}

/* Dark Mode Improvements */
body.dark-mode {
    --bg: #0b1220;
    --bg-2: #0f172a;
    --surface: #111827;
    --surface-2: #0f172a;
    --border: rgba(30, 41, 59, 0.9);
    --text: #e2e8f0;
    --muted: #94a3b8;
    --primary: #60a5fa;
    --primary-600: #3b82f6;
    --primary-700: #2563eb;
    --accent: #818cf8;
    --accent-600: #6366f1;
    --success: #34d399;
    --success-600: #10b981;
    --warning: #fbbf24;
    --warning-600: #f59e0b;
    --danger: #f87171;
    --danger-600: #ef4444;
    --info: #22d3ee;
    --info-600: #06b6d4;
    --nav-start: #020617;
    --nav-end: #0f172a;
}

body.dark-mode .toast {
    background: var(--surface);
    border-color: var(--border);
}

body.dark-mode .file-upload-modern {
    background: var(--surface);
}

/* Print Styles */
@media print {
    .app-navbar,
    .app-subnav,
    .quick-actions,
    .toast-container,
    .btn,
    .app-footer {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
