/* ============================================
   Modern Minimal Dashboard Design
   Professional & Attractive Color Scheme
   ============================================ */

:root {
    /* Modern Color Palette */
    --primary: #6366F1;
    --primary-dark: #4F46E5;
    --primary-light: #818CF8;
    --primary-bg: rgba(99, 102, 241, 0.08);
    
    --secondary: #8B5CF6;
    --secondary-light: rgba(139, 92, 246, 0.1);
    
    --accent: #06B6D4;
    --accent-light: rgba(6, 182, 212, 0.1);
    
    /* Neutral Colors */
    --bg-primary: #FAFBFC;
    --bg-secondary: #F8F9FA;
    --bg-card: #FFFFFF;
    --bg-hover: #F1F3F5;
    
    /* Text Colors */
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    --text-inverse: #FFFFFF;
    
    /* Borders & Shadows */
    --border-color: #E2E8F0;
    --border-radius: 10px;
    --border-radius-lg: 14px;
    --border-radius-xl: 20px;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Status Colors */
    --success: #10B981;
    --success-light: rgba(16, 185, 129, 0.1);
    --danger: #EF4444;
    --danger-light: rgba(239, 68, 68, 0.1);
    --warning: #F59E0B;
    --info: #3B82F6;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: var(--bg-primary);
    min-height: 100vh;
    color: var(--text-primary);
    position: relative;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 0% 0%, rgba(99, 102, 241, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(139, 92, 246, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ===== Auth Page Styles ===== */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    max-height: 100vh;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    position: relative;
    overflow: hidden;
}

.auth-background::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle, rgba(99, 102, 241, 0.05) 0%, transparent 70%),
        radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.03) 0%, transparent 50%);
    animation: rotate 20s linear infinite;
    z-index: 0;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.auth-glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-xl);
    padding: 28px 32px 24px;
    box-shadow: var(--shadow-xl);
    animation: fadeIn 0.5s ease-in;
    position: relative;
    z-index: 1;
    max-width: 420px;
    width: 100%;
    max-height: calc(100vh - 40px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

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

.auth-header {
    text-align: center;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.auth-logo {
    width: 56px;
    height: auto;
    margin-bottom: 8px;
}

.auth-header h1 {
    font-size: 1.35rem;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.auth-header p,
.auth-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 400;
    margin: 0;
}

.auth-alert {
    margin-bottom: 16px;
    flex-shrink: 0;
}

.auth-sections {
    flex: 1;
    min-height: 0;
    position: relative;
}

.auth-panel {
    transition: opacity 0.2s ease;
}

.auth-panel-hidden {
    display: none !important;
}

.auth-section-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 2px 0;
    letter-spacing: 0.01em;
}

.auth-section-desc {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 0 0 12px 0;
}

.auth-form {
    margin-top: 12px;
}

.auth-form .form-group {
    margin-bottom: 16px;
}

.auth-form .form-group:last-of-type {
    margin-bottom: 14px;
}

.auth-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

.auth-switch-or {
    color: var(--text-muted);
    font-size: 0.8125rem;
    text-transform: lowercase;
    font-weight: 500;
}

.auth-switch-link {
    margin-left: auto;
    background: none;
    border: none;
    padding: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    text-decoration: none;
}

.auth-switch-link:hover {
    text-decoration: underline;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.01em;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 0.9375rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 400;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

.form-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.form-group-checkbox {
    display: flex;
    align-items: center;
}

.form-group-checkbox label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 0;
}

.form-group-checkbox input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--primary);
    color: var(--text-inverse);
    border: none;
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.01em;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.btn-block {
    width: 100%;
    text-align: center;
}

.alert {
    padding: 14px 16px;
    border-radius: var(--border-radius);
    margin-bottom: 24px;
    font-size: 0.9375rem;
}

.alert-error {
    background: var(--danger-light);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
    font-weight: 500;
}

.alert-error ul {
    list-style: none;
    margin: 0;
}

.alert-error li {
    margin: 5px 0;
}

/* ===== Dashboard Layout ===== */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    background: var(--bg-primary);
    background-image: linear-gradient(to right, var(--bg-card) 0, var(--bg-card) 260px, transparent 260px);
}

.dashboard-sidebar {
    width: 260px;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    min-height: 100vh;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: var(--shadow-md);
    padding: 0;
}

.dashboard-sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid var(--glass-border);
}

.dashboard-logo {
    width: 50px;
    height: auto;
    margin-bottom: 10px;
}

.dashboard-sidebar-header h2 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.dashboard-sidebar-header p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin: 0;
}

.dashboard-nav {
    padding: 20px 0;
}

.nav-section {
    margin-bottom: 30px;
}

.nav-section-title {
    padding: 0 20px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 600;
}

.nav-item {
    display: block;
    padding: 10px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    font-size: 0.9375rem;
    margin: 2px 8px;
    border-radius: var(--border-radius);
    position: relative;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--primary-bg);
    color: var(--primary);
    font-weight: 600;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--primary);
    border-radius: 0 2px 2px 0;
}

.nav-icon {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

.dashboard-main {
    flex: 1;
    margin-left: 260px;
    padding: 32px;
    position: relative;
    z-index: 1;
    background: var(--bg-primary);
}

.dashboard-header {
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.dashboard-header > div:first-child,
.dashboard-header-left {
    flex: 1;
    min-width: 0;
}

.dashboard-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dashboard-title {
    font-size: 1.875rem;
    color: var(--text-primary);
    margin: 8px 0 0 0;
    font-weight: 700;
    letter-spacing: -0.025em;
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
    margin-bottom: 4px;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    gap: 4px;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.breadcrumb-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.15s ease;
    font-weight: 400;
}

.breadcrumb-link:hover {
    color: var(--primary);
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 500;
}

.breadcrumb-separator {
    color: var(--text-muted);
    margin: 0 4px;
    font-weight: 300;
    user-select: none;
}

.page-status-badge {
    display: inline-block;
    margin-top: 6px;
    padding: 4px 12px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--warning);
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--border-radius);
}

.dashboard-user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.dashboard-user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashboard-user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dashboard-user-avatar-placeholder {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

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

.user-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.user-email,
.user-cnic {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.user-email {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.btn-logout {
    padding: 8px 16px;
    background: var(--danger-light);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--border-radius);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

/* ===== Notification Icon ===== */
.notification-wrapper {
    position: relative;
}

.notification-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--text-secondary);
    text-decoration: none;
    border: none;
    background: transparent;
    border-radius: var(--border-radius);
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    padding: 0;
}

.notification-icon:hover {
    background: var(--bg-hover);
    color: var(--primary);
}

.notification-icon.active {
    background: var(--primary-bg);
    color: var(--primary);
}

.notification-icon svg {
    width: 22px;
    height: 22px;
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #ff6b6b;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
}

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

/* ===== Notification Dropdown ===== */
.notification-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 380px;
    max-height: 500px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    z-index: 1000;
    display: none;
    overflow: hidden;
    animation: slideDown 0.2s ease-out;
}

.notification-dropdown.show {
    display: block;
}

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

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.notification-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.view-all-link {
    font-size: 0.875rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.view-all-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    display: block;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.15s ease;
}

.notification-item:hover {
    background: var(--bg-hover);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.notification-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    margin-left: 12px;
}

.notification-subject {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.notification-preview {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0;
}

.notification-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}

.notification-empty p {
    margin: 0;
    font-size: 0.9375rem;
}

/* Scrollbar styling for notification list */
.notification-list::-webkit-scrollbar {
    width: 6px;
}

.notification-list::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.notification-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.notification-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ===== Dashboard Cards ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.stat-card-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 12px;
}

.stat-card-icon {
    width: 44px;
    height: 44px;
    background: var(--primary-bg);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    border: none;
    color: var(--primary);
    flex-shrink: 0;
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: -0.025em;
}

.stat-card-change {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-weight: 400;
}

.stat-card .btn {
    width: 100%;
    margin-top: 0;
    font-size: 0.875rem;
    padding: 10px 16px;
}

/* ===== Content Cards ===== */
.content-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 28px 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.content-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.content-card-title {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--border-radius);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1.5px solid var(--border-color);
    font-weight: 500;
    font-size: 0.875rem;
}

/* Recent Content Section */
.recent-content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.recent-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recent-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
}

.recent-item:hover {
    background: var(--bg-hover);
    border-color: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.recent-item-content {
    flex: 1;
    min-width: 0;
}

.recent-item-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 6px 0;
    line-height: 1.4;
}

.recent-item-meta {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.btn-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--border-radius);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: 12px;
}

.btn-icon:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-inverse);
    transform: scale(1.05);
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
}

.badge-success {
    background: var(--success-light);
    color: var(--success);
}

.badge-secondary {
    background: var(--bg-hover);
    color: var(--text-secondary);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 0.9375rem;
    margin: 0;
}

/* Content Health Section */
.content-health-section {
    margin-top: 40px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 24px 0;
    letter-spacing: -0.02em;
}

.health-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.health-card {
    position: relative;
}

.health-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 10px;
    border-radius: 14px;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1;
}

.health-badge-warning {
    background: var(--warning);
    color: #FFFFFF;
}

.health-badge-success {
    background: var(--success);
    color: #FFFFFF;
}

.health-badge-secondary {
    background: var(--text-muted);
    color: #FFFFFF;
}

.draft-item {
    border-left: 3px solid var(--warning);
    background: rgba(245, 158, 11, 0.05);
}

.draft-item:hover {
    background: rgba(245, 158, 11, 0.1);
    border-left-color: var(--warning);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.badge-featured {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
}

.card-footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

/* Breakdown Stats */
.breakdown-stats {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
}

.breakdown-item:hover {
    background: var(--bg-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.breakdown-item.breakdown-success {
    border-left: 3px solid var(--success);
}

.breakdown-item.breakdown-secondary {
    border-left: 3px solid var(--text-muted);
}

.breakdown-label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.breakdown-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.breakdown-success .breakdown-value {
    color: var(--success);
}

.breakdown-secondary .breakdown-value {
    color: var(--text-muted);
}
    padding: 10px 20px;
    border-radius: var(--border-radius);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

/* ===== Tables ===== */
.table-container {
    overflow-x: auto;
}

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

.table thead {
    background: rgba(135, 206, 250, 0.2);
    backdrop-filter: blur(10px);
    color: var(--accent-color);
}

.table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
}

.table td {
    padding: 15px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

.table td:last-child {
    white-space: nowrap;
}

.table tbody tr:hover {
    background: var(--bg-hover);
}

.table-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: nowrap;
}

.table-actions form {
    display: inline-flex;
    margin: 0;
    padding: 0;
    vertical-align: middle;
}

.table-actions .btn-icon {
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8125rem;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    min-width: 70px;
    margin: 0;
    line-height: 1.4;
    height: 36px;
    box-sizing: border-box;
}

.table-actions .btn-icon.active,
.table-actions .btn-icon.inactive {
    min-width: 90px;
}

.table-actions .btn-icon:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.table-actions .btn-icon.edit {
    background: rgba(76, 175, 80, 0.1);
    border-color: rgba(76, 175, 80, 0.3);
    color: #4CAF50;
}

.table-actions .btn-icon.edit:hover {
    background: #4CAF50;
    border-color: #4CAF50;
    color: #FFFFFF;
}

.table-actions .btn-icon.delete {
    background: rgba(255, 107, 107, 0.1);
    border-color: rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
}

.table-actions .btn-icon.delete:hover {
    background: #ff6b6b;
    border-color: #ff6b6b;
    color: #FFFFFF;
}

.table-actions .btn-icon.active {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: #10B981;
}

.table-actions .btn-icon.active:hover {
    background: #10B981;
    border-color: #10B981;
    color: #FFFFFF;
}

.table-actions .btn-icon.inactive {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: #F59E0B;
}

.table-actions .btn-icon.inactive:hover {
    background: #F59E0B;
    border-color: #F59E0B;
    color: #FFFFFF;
}

/* ===== Forms ===== */
.form-container {
    max-width: 800px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group-full {
    grid-column: 1 / -1;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.01em;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 0.9375rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    font-weight: 400;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.form-help {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 6px;
    margin-bottom: 0;
}

.form-error {
    font-size: 0.875rem;
    color: var(--danger);
    margin-top: 6px;
    margin-bottom: 0;
}

.text-danger {
    color: var(--danger);
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.btn-danger {
    background: var(--danger-light);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
    font-weight: 600;
    font-size: 0.875rem;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

/* ===== Sidebar toggle (mobile) ===== */
.sidebar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-height: 44px;
    padding: 0;
    margin: 0;
    margin-right: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    cursor: pointer;
    touch-action: manipulation;
}

.sidebar-close {
    display: none;
    position: absolute;
    top: 16px;
    right: 16px;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: var(--bg-hover);
    border: none;
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    cursor: pointer;
    touch-action: manipulation;
}

.sidebar-close:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
}

.dashboard-sidebar-header {
    position: relative;
}

/* ===== Table scroll container (dashboard) ===== */
.dashboard-main .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    min-width: 0;
}

/* ===== Responsive: sidebar overlay from 992px down ===== */
@media (max-width: 992px) {
    .dashboard-wrapper {
        background-image: none;
        flex-direction: column;
        min-width: 0;
    }

    .dashboard-sidebar {
        position: fixed !important;
        left: 0;
        top: 0;
        bottom: 0;
        width: 260px;
        max-width: 85vw;
        height: 100vh;
        min-height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        z-index: 1050;
        box-shadow: var(--shadow-xl);
    }

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

    .sidebar-backdrop {
        display: block;
    }

    body.sidebar-open .sidebar-backdrop {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .sidebar-toggle {
        display: flex !important;
    }

    .sidebar-close {
        display: flex !important;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    .dashboard-main {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0;
        flex: 1 1 auto;
    }

    /* Header: stack in two rows so user menu gets full width */
    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .dashboard-header-left {
        flex: 0 0 auto;
        min-width: 0;
    }
    .dashboard-user-menu {
        flex: 0 0 auto;
        width: 100%;
        justify-content: flex-end;
    }
}

/* ===== Responsive: mobile tweaks at 768px ===== */
@media (max-width: 768px) {
    .dashboard-main {
        padding: 16px;
    }

    .breadcrumb-list {
        flex-wrap: wrap;
        font-size: 0.75rem;
    }

    .breadcrumb-item {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* User menu: one row when header is stacked (has full width), touch targets */
    .dashboard-user-menu {
        flex-wrap: wrap;
        align-items: center;
        gap: 10px;
    }

    .dashboard-user-menu .notification-icon,
    .dashboard-user-menu .btn-logout {
        min-height: 44px;
        min-width: 44px;
        padding: 10px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        touch-action: manipulation;
    }

    .dashboard-user-menu .user-info {
        min-width: 0;
        flex: 0 1 auto;
    }

    @media (max-width: 480px) {
        .dashboard-user-menu .user-name {
            display: none;
        }

        .dashboard-user-menu .user-email {
            font-size: 0.8125rem;
        }
    }

    /* Cards: reduce padding on mobile */
    .card {
        padding: 16px;
    }

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

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

    /* Students (and similar) filter grids: single column on mobile */
    .students-filters-row {
        grid-template-columns: 1fr;
    }
    .students-filter-actions {
        grid-column: span 1;
    }
    .students-filters-card {
        padding: 16px;
    }
}

/* ===== Enhanced Semester Voucher Styles ===== */
.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

.alert {
    padding: 16px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 4px solid;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--success);
    color: #059669;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
    color: #DC2626;
}

.alert i {
    font-size: 1.125rem;
}

/* ===== Base Card (used by dashboard pages) ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

/* ===== Students Page — Modern List View ===== */
.students-page {
    max-width: 1280px;
}

.students-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.students-page-header-content {
    flex: 1;
    min-width: 0;
}

.students-page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    margin: 0 0 6px 0;
    line-height: 1.2;
}

.students-page-subtitle {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.45;
}

.students-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.students-add-btn .students-btn-icon,
.students-empty-btn .students-btn-icon {
    flex-shrink: 0;
    display: block;
    color: inherit;
}

.students-add-btn:hover {
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.45);
}

.students-add-dropdown {
    position: relative;
    display: inline-block;
}

.students-add-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.students-dropdown-caret {
    flex-shrink: 0;
    opacity: 0.9;
}

.students-add-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 6px;
    min-width: 180px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 6px 0;
    z-index: 50;
    display: none;
}

.students-add-menu.show {
    display: block;
}

.students-add-menu-item {
    display: block;
    padding: 10px 16px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.15s ease;
}

.students-add-menu-item:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

.students-empty-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.students-empty-actions .students-empty-btn {
    min-width: 140px;
}

/* Filters bar */
.students-filters-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.students-filters-row {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr)) auto;
    gap: 16px 20px;
    align-items: end;
}

.students-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.students-filter-group.students-filter-search {
    min-width: 0;
}

.students-filter-actions {
    align-self: end;
}

@media (max-width: 899px) {
    .students-filters-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .students-filter-actions {
        grid-column: span 2;
    }
}

.students-filter-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.students-filter-select,
.students-filter-input {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.9375rem;
    color: var(--text-primary);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

.students-filter-select:focus,
.students-filter-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

.students-search-wrap {
    position: relative;
}

.students-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.students-filter-input {
    padding-left: 40px;
}

.students-filter-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.students-filter-btn {
    padding: 10px 18px;
    font-size: 0.9375rem;
}

.students-clear-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.students-clear-link:hover {
    color: var(--primary);
}

/* Table card */
.students-table-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

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

.students-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.students-table thead {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.students-table th {
    padding: 14px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
}

.students-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    vertical-align: middle;
}

.students-table tbody tr {
    transition: background 0.15s ease;
}

.students-table tbody tr:hover {
    background: var(--primary-bg);
}

.students-table tbody tr:last-child td {
    border-bottom: none;
}

.students-cell-name {
    font-weight: 600;
    color: var(--text-primary);
}

.students-cell-email {
    color: var(--text-secondary);
}

.students-cell-mono {
    font-variant-numeric: tabular-nums;
    color: var(--text-secondary);
}

.students-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.students-badge-active {
    background: var(--success-light);
    color: var(--success);
}

.students-badge-inactive {
    background: var(--danger-light);
    color: var(--danger);
}

.students-view-link {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.students-view-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.students-delete-link {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--danger);
    text-decoration: none;
    transition: color 0.2s ease;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.students-delete-link:hover {
    color: #DC2626;
    text-decoration: underline;
}

.students-pagination {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.students-pagination nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.students-pagination nav a,
.students-pagination nav span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.students-pagination nav a:hover {
    background: var(--primary-bg);
    border-color: var(--primary);
    color: var(--primary);
}

.students-pagination nav span[aria-current="page"] {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-inverse);
}

.students-pagination nav span[aria-disabled="true"] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Empty state */
.students-empty {
    text-align: center;
    padding: 64px 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
}

.students-empty-icon {
    color: var(--text-muted);
    opacity: 0.7;
    margin-bottom: 24px;
}

.students-empty-icon svg {
    stroke-width: 1.25;
}

.students-empty-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.students-empty-text {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin: 0 0 24px 0;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.students-empty-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

