:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #475569;
    --success: #16a34a;
    --info: #0891b2;
    --warning: #d97706;
    --danger: #dc2626;
    --light: #f8fafc;
    --dark: #0f172a;
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --header-height: 60px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #f1f5f9;
    color: #334155;
    min-height: 100vh;
}

.public-page { padding-top: 56px; }

.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    min-height: 500px;
    padding: 80px 0;
}

.icon-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.feature-box {
    background: white;
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

/* Dashboard layout */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--dark);
    color: #cbd5e1;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: width 0.3s;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #1e293b;
    text-align: center;
}

.sidebar-brand {
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.sidebar-brand:hover { color: white; }

.sidebar-user {
    padding: 15px 20px;
    border-bottom: 1px solid #1e293b;
    text-align: center;
}

.sidebar-user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 auto 8px;
}

.sidebar-user-name {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.sidebar-user-role {
    font-size: 0.75rem;
    color: #94a3b8;
}

.sidebar-menu {
    list-style: none;
    padding: 10px 0;
    margin: 0;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    gap: 12px;
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    color: white;
    background: #1e293b;
    border-left-color: var(--primary);
}

.sidebar-menu li a i {
    width: 20px;
    text-align: center;
}

.sidebar-divider {
    height: 1px;
    background: #1e293b;
    margin: 10px 15px;
}

.sidebar-footer {
    padding: 15px;
    border-top: 1px solid #1e293b;
    text-align: center;
    font-size: 0.75rem;
    color: #64748b;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: var(--header-height);
    background: white;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 999;
}

.topbar-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.topbar-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: #f1f5f9;
    color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.topbar-btn:hover {
    background: var(--primary);
    color: white;
}

.content-area {
    padding: 24px;
    flex: 1;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.85rem;
    color: #64748b;
}

.card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.card-header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 20px;
    border-radius: 12px 12px 0 0 !important;
}

.card-header h5 {
    margin: 0;
    font-weight: 600;
    color: var(--dark);
}

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

.table thead th {
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
    padding: 12px 16px;
    white-space: nowrap;
}

.table tbody td {
    padding: 12px 16px;
    vertical-align: middle;
    color: #475569;
    font-size: 0.9rem;
    border-bottom: 1px solid #f1f5f9;
}

.table tbody tr:hover {
    background: #f8fafc;
}

.badge { font-weight: 500; padding: 0.4em 0.7em; }

.form-label {
    font-weight: 500;
    color: #475569;
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.form-control, .form-select {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.9rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 8px 16px;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #f1f5f9 100%);
    padding: 20px;
}

.auth-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
}

.auth-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.auth-header h3 { margin: 0; font-weight: 700; }

.auth-body { padding: 30px; }

.auth-footer {
    text-align: center;
    padding: 0 30px 30px;
    color: #64748b;
    font-size: 0.9rem;
}

.sidebar-toggle { display: none; }

@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    .sidebar.show { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .sidebar-toggle { display: inline-flex; }
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
    .sidebar-overlay.show { display: block; }
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

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

.fade-in { animation: fadeIn 0.4s ease-out; }

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #cbd5e1;
}

.activity-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e0f2fe;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-content { flex: 1; }

.activity-title {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--dark);
}

.activity-time {
    font-size: 0.75rem;
    color: #94a3b8;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 30px;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: #e2e8f0;
    z-index: 0;
}

.progress-step {
    text-align: center;
    position: relative;
    z-index: 1;
    flex: 1;
}

.progress-step .step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-size: 0.8rem;
    color: #94a3b8;
    transition: all 0.3s;
}

.progress-step.active .step-dot {
    background: var(--primary);
    color: white;
}

.progress-step.completed .step-dot {
    background: var(--success);
    color: white;
}

.progress-step .step-label {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

@media print {
    .sidebar, .topbar, .btn { display: none !important; }
    .main-content { margin-left: 0 !important; }
}
