/* ── Design Tokens (Stripe Aesthetic) ──────────────────────────── */
:root {
    --glass-bg: #ffffff;
    --hover-bg: #f8fafc;
    --bg-card: #ffffff;
    /* Primary — Stripe Blurple */
    --primary: #635bff;
    --primary-dark: #524dcc;
    --primary-light: #7a73ff;
    --primary-50: #f0efff;
    --primary-100: #e0dffe;
    --primary-200: #c7c4fe;

    /* Semantic */
    --success: #0bc463;
    --success-light: #d1f4e0;
    --success-dark: #09a354;
    --warning: #f5a623;
    --warning-light: #fef3d6;
    --warning-dark: #d48b0a;
    --danger: #ed5f74;
    --danger-light: #fce4e8;
    --danger-dark: #c94055;

    /* Neutrals — Stripe Slate */
    --dark: #0a2540;
    --gray-900: #1a1f36;
    --gray-800: #2a2f45;
    --gray-700: #3c4257;
    --gray-600: #4f566b;
    --gray-500: #697386;
    --gray-400: #8792a2;
    --gray-300: #e6ebf1;
    --gray-200: #e3e8ee;
    --gray-100: #f5f7fa;
    --gray-50: #f7fafc;
    --white: #ffffff;

    /* Surfaces */
    --bg-body: #f6f9fc;
    --bg-card: #ffffff;
    --bg-sidebar: #0a2540;

    /* Effects — Stripe's Signature Shadows */
    --gradient: linear-gradient(135deg, #635bff 0%, #7a73ff 100%);
    --gradient-warm: linear-gradient(135deg, #f5a623 0%, #ed5f74 100%);
    --shadow-xs: 0 1px 1px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 4px rgba(50, 50, 93, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow: 0 4px 6px rgba(50, 50, 93, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 13px 27px -5px rgba(50, 50, 93, 0.25), 0 8px 16px -8px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 30px 60px -12px rgba(50, 50, 93, 0.25), 0 18px 36px -18px rgba(0, 0, 0, 0.3);
    --shadow-primary: 0 4px 11px rgba(99, 91, 255, 0.35);
    --shadow-success: 0 4px 11px rgba(11, 196, 99, 0.35);

    /* Borders */
    --border-color: #e6ebf1;
    --border-light: #f5f7fa;

    /* Radius */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Sidebar */
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
}

/* ── Base Reset ────────────────────────────────────────────────── */


html {
    overflow-x: hidden;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-body);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    font-feature-settings: 'cv11', 'ss01';
    font-variation-settings: 'opsz' 32;
    transition: background-color 0.2s ease, color 0.2s ease;
}

::selection {
    background: var(--primary-200);
    color: var(--gray-900);
}

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

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

.sidebar {
    width: var(--sidebar-width);
    background: #06071a;
    color: var(--white);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    transition: width 0.3s var(--ease), transform 0.3s var(--ease);
    display: flex;
    flex-direction: column;
    border-right: none;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}
.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-header {
    padding: 24px 20px 16px;
    background: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-logo {
    font-size: 1.15rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
}

.sidebar-logo .sidebar-logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; 
    height: 32px;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.sidebar-logo .logo-text {
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 0;
}

.sidebar-collapse-btn {
    background: transparent;
    border: none;
    color: #71717a;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    padding: 4px;
}
.sidebar-collapse-btn:hover { color: #ffffff; }

.sidebar-nav {
    padding: 8px 0;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

.sidebar-nav::-webkit-scrollbar {
    width: 3px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
}
.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.nav-section {
    padding: 24px 20px 8px;
    font-size: 0.75rem;
    color: #71717a;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity 0.2s, padding 0.3s;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: #a1a1aa;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s var(--ease);
    border-radius: 10px;
    margin: 4px 16px;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #e4e4e7;
}

.nav-link.active {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0%, rgba(43, 94, 167, 0.30) 100%);
    color: #ffffff;
    font-weight: 500;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.03);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    right: 0px;
    top: 50%;
    transform: translateY(-50%);
    height: 60%;
    width: 4px;
    background: #3B82F6;
    border-radius: 4px 0 0 4px;
    box-shadow: -2px 0 12px rgba(43, 94, 167, 0.8);
}

.nav-link i {
    font-size: 1.1rem;
    width: 22px;
    min-width: 22px;
    text-align: center;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.nav-link:hover i,
.nav-link.active i {
    opacity: 1;
}

.sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 24px;
    left: calc(var(--sidebar-width) - 16px);
    z-index: 1100;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-sidebar); /* Fallback */
    background: #000000;
    color: white;
    border: 3px solid var(--bg-body);
    font-size: 0.75rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--ease);
}

.sidebar-toggle:hover {
    background: #1a202c;
    transform: scale(1.15);
}

.sidebar-toggle i {
    transition: transform 0.3s var(--ease);
}

.sidebar-year {
    padding: 12px 16px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    overflow: visible;
    transition: padding 0.3s var(--ease);
}

.sidebar-year select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.06);
    color: #e2e8f0 !important;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='%2394a3b8'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    font-family: inherit;
    outline: none;
    display: block;
}

.sidebar-year select option {
    background: #1e293b;
    color: #e2e8f0;
}

.sidebar-year select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.sidebar-year .year-label {
    font-size: 0.68rem;
    color: rgba(148,163,184,0.6);
    display: block;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity 0.2s;
}

.sidebar-profile {
    padding: 14px 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar-profile-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.071);
    overflow: hidden;
    transition: padding 0.3s, justify-content 0.3s;
}

.sidebar-profile-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    color: white;
    flex-shrink: 0;
}

.sidebar-profile-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    transition: opacity 0.2s, width 0.3s;
}

.sidebar-profile-name {
    font-weight: 600;
    font-size: 0.82rem;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-profile-role {
    font-size: 0.68rem;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-profile-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.sidebar-profile-actions a {
    color: rgba(255,255,255,0.4);
    transition: color 0.2s;
    font-size: 0.9rem;
}

.sidebar-profile-actions a:hover {
    color: var(--primary-light);
}

.sidebar-profile-actions a.logout-btn:hover {
    color: var(--danger);
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 28px 32px;
    min-height: 100vh;
    overflow-x: hidden;
    max-width: 100vw;
    transition: margin-left 0.3s var(--ease);
    animation: fadeInContent 0.4s var(--ease);
}

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

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

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.page-title i {
    color: var(--gray-500);
    font-size: 1.1rem;
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow 0.2s var(--ease);
    max-width: 100%;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 20px 24px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.02em;
    line-height: 1;
}

.card-title i {
    font-size: 0.9rem;
    color: var(--gray-500);
}

.card-description {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-top: 4px;
    line-height: 1.5;
}

.card-body {
    padding: 0 24px 24px;
}

.card-header + .card-body {
    padding-top: 0;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s var(--ease);
    position: relative;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

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

.stat-card:active {
    transform: translateY(0);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.stat-icon.primary { background: var(--primary-50); color: var(--primary); }
.stat-icon.success { background: var(--success-light); color: var(--success-dark); }
.stat-icon.warning { background: var(--warning-light); color: var(--warning-dark); }
.stat-icon.danger { background: var(--danger-light); color: var(--danger-dark); }

.stat-content h3 {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.1;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.stat-content p {
    color: var(--gray-500);
    font-size: 0.8rem;
    margin-top: 2px;
    font-weight: 500;
}

.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
    caption-side: bottom;
}

th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--gray-500);
    border-bottom: 1px solid var(--border-color);
    background: transparent;
    white-space: nowrap;
    height: 40px;
}

td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--gray-700);
    vertical-align: middle;
}

tbody tr {
    transition: background-color 0.1s;
}

tbody tr:hover {
    background: var(--gray-50);
}

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

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0;
    white-space: nowrap;
    border: 1px solid transparent;
    line-height: 1.4;
}

.badge-success { background: var(--success-light); color: var(--success-dark); border-color: rgba(11, 196, 99, 0.15); }
.badge-warning { background: var(--warning-light); color: var(--warning-dark); border-color: rgba(245, 166, 35, 0.15); }
.badge-danger { background: var(--danger-light); color: var(--danger-dark); border-color: rgba(237, 95, 116, 0.15); }
.badge-primary { background: var(--primary-50); color: var(--primary-dark); border-color: rgba(99, 91, 255, 0.15); }
.badge-outline { background: transparent; color: var(--gray-700); border-color: var(--border-color); }
.badge-secondary { background: var(--gray-100); color: var(--gray-600); border-color: var(--gray-200); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s var(--ease);
    text-decoration: none;
    font-family: inherit;
    letter-spacing: 0;
    white-space: nowrap;
    user-select: none;
    outline: none;
    height: 36px;
}

.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--bg-body), 0 0 0 4px var(--primary);
}

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

.btn:disabled {
    pointer-events: none;
    opacity: 0.5;
}

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

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

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

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

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

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

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

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

.btn-outline {
    background: var(--white);
    border: 1px solid var(--gray-300);
    color: var(--gray-800);
    box-shadow: var(--shadow-xs);
}

.btn-outline:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
    color: var(--gray-900);
}

.btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--gray-700);
}

.btn-ghost:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.btn-link {
    background: transparent;
    border-color: transparent;
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 4px;
    padding: 0;
    height: auto;
}

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

.btn-sm {
    padding: 5px 12px;
    font-size: 0.8rem;
    height: 30px;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 12px 24px;
    font-size: 0.95rem;
    height: 44px;
    border-radius: var(--radius);
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.btn-icon.btn-sm {
    width: 30px;
    height: 30px;
}

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

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--gray-900);
    letter-spacing: 0;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    transition: all 0.15s var(--ease);
    background: var(--bg-card);
    color: var(--gray-900);
    font-family: inherit;
    height: 36px;
    line-height: 1.5;
}

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

.form-control::placeholder {
    color: var(--gray-400);
}

.form-control:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--gray-100);
}

select.form-control {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238792a2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 36px;
}

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

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 4px;
}

.form-error {
    font-size: 0.8rem;
    color: var(--danger);
    margin-top: 4px;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-backdrop.active {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow: visible;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    animation: modalSlideIn 0.25s var(--ease);
    display: flex;
    flex-direction: column;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header {
    padding: 24px 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-shrink: 0;
}

.modal form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    margin: 0;
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-900);
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.modal-close {
    background: transparent;
    border: 1px solid transparent;
    font-size: 0.9rem;
    cursor: pointer;
    color: var(--gray-400);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s;
    flex-shrink: 0;
}

.modal-close:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.modal-body {
    padding: 16px 24px 24px;
    overflow-y: auto;
    overflow-x: visible;
    flex: 1;
    min-height: 0;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-shrink: 0;
    justify-content: flex-end;
    gap: 8px;
    background: transparent;
}

.alert {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.875rem;
    font-weight: 400;
    animation: alertSlideDown 0.2s var(--ease);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--gray-700);
    line-height: 1.5;
}

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

.alert-success {
    border-color: rgba(11, 196, 99, 0.3);
    color: var(--success-dark);
    background: var(--success-light);
}

.alert-danger {
    border-color: rgba(237, 95, 116, 0.3);
    color: var(--danger-dark);
    background: var(--danger-light);
}

.alert-warning {
    border-color: rgba(245, 166, 35, 0.3);
    color: var(--warning-dark);
    background: var(--warning-light);
}

.alert i {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.quick-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.amount {
    font-weight: 700;
    font-family: 'JetBrains Mono', 'SF Mono', monospace;
    font-size: 0.85rem;
    letter-spacing: -0.02em;
}

.amount-positive { color: var(--success); }
.amount-negative { color: var(--danger); }

.empty-state {
    text-align: center;
    padding: 56px 24px;
    color: var(--gray-400);
}

.empty-state i {
    font-size: 2.8rem;
    margin-bottom: 16px;
    opacity: 0.4;
    display: block;
}

.chart-container {
    position: relative;
    height: 300px;
}

.action-btns {
    display: flex;
    gap: 6px;
}

.search-box {
    position: relative;
}

.search-box input {
    padding-left: 42px;
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 0.9rem;
}

.filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.filters .form-control {
    width: auto;
    min-width: 150px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1100;
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: var(--bg-sidebar);
    color: white;
    border: 1px solid rgba(255,255,255,0.1);
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    align-items: center;
    justify-content: center;
    transition: all 0.25s var(--ease);
}

.mobile-menu-btn:hover {
    background: var(--primary);
    transform: scale(1.08);
    box-shadow: var(--shadow-primary);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s var(--ease);
}

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

/* ── Desktop: Sidebar toggle ───────────────────────────────────── */
@media (min-width: 769px) {
    .sidebar-toggle {
        display: flex;
    }

    .sidebar.collapsed {
        transform: translateX(-100%);
    }

    .sidebar.collapsed ~ .main-content {
        margin-left: 0;
    }

    .sidebar.collapsed ~ .sidebar-toggle {
        left: 16px;
    }

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

/* ── Tablet (769px–1024px) ──────────────────────────────────────── */
@media (max-width: 1024px) and (min-width: 769px) {
    .main-content {
        padding: 24px;
    }

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

    .stat-content h3 {
        font-size: 1.35rem;
    }

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

/* ── Mobile (≤768px) ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

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

    .sidebar {
        width: 280px;
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
        box-shadow: 8px 0 30px rgba(0,0,0,0.3);
    }

    .sidebar .logo-text,
    .sidebar .sidebar-profile-info,
    .sidebar .sidebar-profile-actions,
    .sidebar .sidebar-year .year-label {
        opacity: 1 !important;
        width: auto !important;
    }

    .sidebar .nav-section {
        opacity: 1 !important;
        padding: 20px 20px 8px !important;
        height: auto !important;
    }

    .sidebar .nav-link {
        padding: 10px 20px !important;
        justify-content: flex-start !important;
    }

    .main-content {
        margin-left: 0;
        padding: 16px;
        padding-top: 68px;
    }

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

    .page-title {
        font-size: 1.3rem;
    }

    .page-title i {
        padding: 8px;
        font-size: 1.1rem;
    }

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

    .stat-card {
        padding: 16px;
        gap: 12px;
    }

    .stat-card::before { display: none; }

    .stat-icon {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }

    .stat-content h3 {
        font-size: 1.15rem;
    }

    .stat-content p {
        font-size: 0.68rem;
    }

    .card-header {
        padding: 14px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .card-body {
        padding: 16px;
    }

    table {
        font-size: 0.8rem;
    }

    th, td {
        padding: 10px 8px;
    }

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

    .form-control {
        padding: 10px 13px;
        font-size: 0.88rem;
    }

    .btn {
        padding: 9px 16px;
        font-size: 0.82rem;
    }

    .quick-actions {
        flex-direction: column;
    }

    .quick-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .modal {
        max-width: 95vw;
        max-height: 85vh;
        border-radius: var(--radius-lg);
    }

    .modal-header { padding: 14px 16px; }
    .modal-body { padding: 16px; }
    .modal-footer {
        padding: 12px 16px;
        flex-direction: column;
    }
    .modal-footer .btn {
        width: 100%;
        justify-content: center;
    }

    .filters {
        flex-direction: column;
    }

    .filters .form-control {
        width: 100%;
        min-width: unset;
    }

    .action-btns {
        flex-wrap: wrap;
    }

    .alert {
        font-size: 0.83rem;
        padding: 10px 14px;
    }

    .profile-grid { grid-template-columns: 1fr; }
    .profile-hero {
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }
    .profile-avatar { width: 80px; height: 80px; font-size: 1.6rem; }
    .profile-info h1 { font-size: 1.4rem; }
    .profile-info .meta { justify-content: center; }

    [style*="display: grid"] {
        grid-template-columns: 1fr !important;
    }

    [style*="display: flex"][style*="gap"] {
        flex-wrap: wrap !important;
    }

    select[style],
    input[style*="width"] {
        max-width: 100% !important;
        min-width: unset !important;
    }

    .search-box, .search-box input {
        width: 100% !important;
    }

    table {
        min-width: 600px;
    }

    .card [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    .chart-container {
        height: 220px !important;
    }

    [style*="padding: 24px"],
    [style*="padding: 32px"],
    [style*="padding: 40px"] {
        padding: 16px !important;
    }

    .main-content > * {
        max-width: 100%;
        overflow-x: hidden;
    }

    .main-content > .card {
        overflow-x: auto;
    }
}

/* ── Small Mobile (≤480px) ─────────────────────────────────────── */
@media (max-width: 480px) {
    .main-content {
        padding: 12px;
        padding-top: 58px;
    }

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

    .stat-card {
        padding: 14px;
    }

    .page-title {
        font-size: 1.1rem;
    }

    .card-title {
        font-size: 0.9rem;
    }

    th, td {
        padding: 8px 6px;
        font-size: 0.75rem;
    }

    .color-picker-grid {
        grid-template-columns: repeat(5, 1fr) !important;
    }
}

/* ── Utility: Smooth transitions on all interactive elements ───── */
a, button, input, select, textarea {
    transition: all 0.2s var(--ease);
}

/* ── Focus ring for accessibility ──────────────────────────────── */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ── Scrollbar styling ─────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}
::-webkit-scrollbar-track {
    background: transparent;
}

.badge-outline {
    background: transparent;
    border: 1.5px solid var(--gray-300);
    color: var(--gray-600);
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.text-danger { color: var(--danger) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-primary { color: var(--primary) !important; }
.text-muted { color: var(--gray-500) !important; }

.header-btns {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-info {
    background: #3b82f6;
    color: var(--white);
}

.btn-info:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.btn-outline-danger {
    background: transparent;
    border: 1.5px solid var(--danger);
    color: var(--danger);
}

.btn-outline-danger:hover {
    background: var(--danger-light);
}

.progress {
    height: 8px;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: var(--radius-full);
    background: var(--gradient);
    transition: width 0.6s var(--ease);
    min-width: 2px;
}

.progress-bar.bg-success { background: var(--success); }
.progress-bar.bg-warning { background: var(--warning); }
.progress-bar.bg-danger { background: var(--danger); }

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.profile-hero {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 32px;
    background: var(--gradient);
    border-radius: var(--radius-lg);
    color: white;
}

.profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    flex-shrink: 0;
    backdrop-filter: blur(8px);
}

.profile-info h1 {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.3px;
}

.profile-info .meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 8px;
    font-size: 0.88rem;
    opacity: 0.85;
}

/* ── Textarea ──────────────────────────────────────────────────── */
textarea.form-control {
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
}

.color-picker-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
}

.color-picker-grid .color-swatch {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    border: 2px solid transparent;
}

.color-picker-grid .color-swatch:hover {
    transform: scale(1.15);
    box-shadow: var(--shadow-md);
}

.color-picker-grid .color-swatch.active {
    border-color: var(--gray-900);
    transform: scale(1.15);
}

.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--gray-200);
}

.tab {
    padding: 10px 24px;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    color: var(--gray-500);
    margin-bottom: -2px;
    transition: all 0.2s;
    cursor: pointer;
}

.tab:hover {
    color: var(--gray-700);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* ── Datalist styling fix ──────────────────────────────────────── */
input[list]::-webkit-calendar-picker-indicator {
    opacity: 0.5;
}

/* ── Print Styles ──────────────────────────────────────────────── */
@media print {
    .sidebar,
    .mobile-menu-btn,
    .sidebar-overlay {
        display: none !important;
    }
    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    .btn, .quick-actions, .header-btns, .action-btns {
        display: none !important;
    }
    .card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

.ux-table-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--bg-card);
}

.ux-table-controls.top {
    border-bottom: 1px solid var(--border-color);
}

.ux-table-controls.bottom {
    border-top: 1px solid var(--border-color);
}

.ux-table-search {
    max-width: 300px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23697386' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 12px center;
    padding-left: 36px;
}

.ux-table-info {
    font-size: 0.85rem;
    color: var(--gray-600);
}

.ux-pagination {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ux-page-text {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-700);
}

/* ── Enhanced Select Dropdowns (Global) ─────────────────── */
select.form-control, select.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    padding-right: 36px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

select.form-control:hover, select.form-select:hover {
    border-color: #000000 !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

select.form-control:focus, select.form-select:focus {
    border-color: #000000 !important;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.1) !important;
}

.shadcn-select-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.shadcn-select-trigger {
    display: flex;
    height: 40px;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    padding: 8px 12px;
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--text-color);
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    transition: all 0.2s;
}

.shadcn-select-trigger:focus,
.shadcn-select-trigger:hover {
    outline: none;
    border-color: #000;
}

.shadcn-select-value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shadcn-select-icon {
    font-size: 10px;
    color: var(--gray-500);
    opacity: 0.7;
    margin-left: 8px;
}

.shadcn-select-popover {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    min-width: 8rem;
    z-index: 50;
    max-height: 250px;
    overflow-y: auto;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    color: var(--text-color);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.shadcn-select-popover.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.shadcn-select-item {
    position: relative;
    display: flex;
    width: 100%;
    cursor: pointer;
    user-select: none;
    align-items: center;
    border-radius: 4px;
    padding: 8px 12px;
    padding-left: 32px;
    font-size: 0.875rem;
    outline: none;
    transition: background-color 0.15s;
}

.shadcn-select-item:hover,
.shadcn-select-item.focused {
    background-color: #000000 !important;
    color: #ffffff !important;
}

.shadcn-item-check {
    position: absolute;
    left: 10px;
    display: none;
    font-size: 10px;
    color: inherit;
}

.shadcn-select-item.selected .shadcn-item-check {
    display: block;
}

/* ══════════════════════════════════════════════════════════════════
   STUDENT CARD-BASED UI (SaaS / Stripe / shadcn inspired)
   ══════════════════════════════════════════════════════════════════ */

.student-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

.student-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-card);
    border-radius: 16px;
    border: 2px dashed var(--border-color);
}
.student-empty-state i {
    font-size: 3rem;
    color: var(--gray-400);
    margin-bottom: 12px;
}
.student-empty-state h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
}
.student-empty-state p {
    color: var(--gray-500);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.student-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    position: relative;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.2s;
    cursor: default;
    overflow: visible;
}
.student-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(50, 50, 93, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
    border-color: var(--primary-200);
}

.sc-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.sc-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

.sc-info {
    flex: 1;
    min-width: 0;
}

.sc-name {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-color);
    text-decoration: none;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sc-name:hover {
    color: var(--primary);
}

.sc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 3px;
}
.sc-meta span {
    font-size: 0.75rem;
    color: var(--gray-500);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.sc-meta span i {
    font-size: 0.65rem;
    color: var(--gray-400);
}

.sc-badges {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.sc-badge-program {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    background: var(--primary-50);
    color: var(--primary);
    letter-spacing: 0.3px;
    text-transform: uppercase;
}
.sc-badge-sem {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    background: #f0fdf4;
    color: #15803d;
    letter-spacing: 0.3px;
}

.sc-finance {
    background: var(--gray-50);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 14px;
}
.sc-finance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
}
.sc-finance-label {
    font-size: 0.8rem;
    color: var(--gray-600);
    font-weight: 500;
}
.sc-finance-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
    font-variant-numeric: tabular-nums;
}
.sc-pending-highlight {
    color: var(--danger) !important;
    font-weight: 700;
}

.sc-progress-bar {
    width: 100%;
    height: 4px;
    background: var(--gray-200);
    border-radius: 4px;
    margin-top: 8px;
    overflow: hidden;
}
.sc-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.sc-progress-paid { background: var(--success); }
.sc-progress-partial { background: var(--warning); }
.sc-progress-unpaid { background: var(--danger); }

.sc-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sc-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}
.sc-status-paid {
    background: #dcfce7;
    color: #15803d;
}
.sc-status-partial {
    background: #fef3c7;
    color: #b45309;
}
.sc-status-unpaid {
    background: #fce4e8;
    color: #c94055;
}

.sc-pay-btn {
    font-weight: 600;
    font-size: 0.78rem !important;
    border-radius: 8px !important;
    padding: 6px 14px !important;
    transition: all 0.2s !important;
}
.sc-pay-btn:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 10px rgba(99, 91, 255, 0.3);
}

.sc-kebab {
    position: relative;
    flex-shrink: 0;
}
.sc-kebab-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    color: var(--gray-500);
    transition: all 0.15s;
}
.sc-kebab-btn:hover {
    background: var(--gray-100);
    color: var(--text-color);
}

.sc-kebab-menu {
    position: absolute;
    right: 0;
    top: 100%;
    min-width: 180px;
    z-index: 50;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1), 0 4px 8px rgba(0,0,0,0.04);
    padding: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(0.96);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.sc-kebab-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.sc-kebab-menu a, .sc-kebab-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 14px;
    border: none;
    background: none;
    font-size: 0.85rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.12s;
}
.sc-kebab-menu a:hover, .sc-kebab-menu button:not(.sc-kebab-danger):hover {
    background: #000;
    color: #fff;
}
.sc-kebab-menu a i, .sc-kebab-menu button i {
    width: 16px;
    text-align: center;
    font-size: 0.8rem;
}
.sc-kebab-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 6px;
}
.sc-kebab-danger {
    color: var(--danger) !important;
}
.sc-kebab-danger:hover {
    background: var(--danger-light) !important;
    color: var(--danger-dark) !important;
}

/* ── Responsive: Student Cards ─────────────────────────────── */
@media (max-width: 768px) {
    .student-cards-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .student-card {
        padding: 16px;
    }
}
@media (min-width: 1400px) {
    .student-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.shadcn-dropdown { position: relative; display: inline-block; }
.shadcn-dropdown-content { display: none; position: absolute; right: 0; background-color: #fff; min-width: 160px; box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1); border-radius: 8px; border: 1px solid #e2e8f0; z-index: 50; top: 100%; margin-top: 5px; }
.shadcn-dropdown-content::before { content: ''; position: absolute; top: -5px; left: 0; right: 0; height: 5px; }
.shadcn-dropdown:hover .shadcn-dropdown-content { display: block; animation: popup 0.2s ease-in-out; }
@keyframes popup { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
.shadcn-dropdown-item { color: #0f172a; padding: 10px 16px; text-decoration: none; display: flex; align-items: center; gap: 8px; font-size: 0.875rem; border-bottom: 1px solid #f8fafc; transition: all 0.2s; }
.shadcn-dropdown-item:hover { background-color: #0f172a; color: #fff; }
.shadcn-dropdown-item:hover i { color: #fff !important; }


