/* ═══════════════════════════════════════════════════════════════
   NCLEX Nova Prep - Premium Visual Design System
   ═══════════════════════════════════════════════════════════════ */

/* ── Core typography and reset ──────────────────────────────── */
body {
    font-family: 'Plus Jakarta Sans', 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #f8fafc !important;
    color: #0f172a;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Scrollbars ─────────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ── Selection ──────────────────────────────────────────────── */
::selection {
    background: rgba(14, 165, 164, 0.2);
    color: #0d9488;
}

/* ── Focus ring ─────────────────────────────────────────────── */
*:focus-visible {
    outline: 2px solid #0ea5a4;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ── Premium Card & Shadow effects ──────────────────────────── */
.card, .public-stats {
    background: #ffffff !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 6px -1px rgba(2, 6, 23, 0.03), 0 2px 4px -2px rgba(2, 6, 23, 0.02) !important;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    overflow: hidden;
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -8px rgba(2, 6, 23, 0.08), 0 4px 8px -2px rgba(2, 6, 23, 0.04) !important;
}
.card-header {
    background-color: #ffffff !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8) !important;
    padding: 16px 20px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
}

/* ── Premium Buttons ────────────────────────────────────────── */
.btn {
    border-radius: 10px !important;
    padding: 10px 18px !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative;
    overflow: hidden;
}
.btn-sm {
    padding: 6px 12px !important;
    font-size: 0.8rem !important;
}
.btn-lg {
    padding: 14px 24px !important;
    font-size: 1rem !important;
}
.btn-primary, .new-color {
    background: linear-gradient(135deg, #0ea5a4 0%, #0d9488 100%) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(14, 165, 164, 0.18) !important;
}
.btn-primary:hover, .btn-primary:focus, .new-color:hover {
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%) !important;
    box-shadow: 0 6px 16px rgba(14, 165, 164, 0.28) !important;
    transform: translateY(-1px);
    color: #ffffff !important;
}
.btn-outline-primary {
    border: 1.5px solid #0ea5a4 !important;
    color: #0ea5a4 !important;
    background: transparent !important;
}
.btn-outline-primary:hover, .btn-outline-primary:focus {
    background: #0ea5a4 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 164, 0.18) !important;
}
.btn-outline-secondary {
    border: 1.5px solid #cbd5e1 !important;
    color: #475569 !important;
    background: transparent !important;
}
.btn-outline-secondary:hover {
    background: #f1f5f9 !important;
    border-color: #94a3b8 !important;
    color: #1e293b !important;
}
.btn-success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2) !important;
}
.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.3) !important;
}
.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2) !important;
}
.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.3) !important;
}

/* ── Premium Inputs ─────────────────────────────────────────── */
.form-control, .form-select {
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 10px !important;
    padding: 10px 16px !important;
    font-size: 0.92rem !important;
    background-color: #ffffff !important;
    color: #0f172a !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}
.form-control:focus, .form-select:focus {
    border-color: #0ea5a4 !important;
    box-shadow: 0 0 0 3px rgba(14, 165, 164, 0.15) !important;
    outline: 0 !important;
}
.form-label {
    font-weight: 600 !important;
    color: #334155 !important;
    font-size: 0.85rem !important;
    margin-bottom: 6px !important;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.form-floating > .form-control:focus,
.form-floating > .form-control:not(:placeholder-shown) {
    padding-top: 1.5rem !important;
    padding-bottom: 0.5rem !important;
}

/* ── Sticky Headers and Topbars ─────────────────────────────── */
.student-topbar, .navbar-light.public-navbar {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(16px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.7) !important;
    z-index: 1020;
}

/* ── Sidebar Layout: CPanel Admin Sidebar ───────────────────── */
.cpanel-sidebar {
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
    overflow-y: auto;
    background: #ffffff !important;
    border-right: 1px solid rgba(226, 232, 240, 0.8) !important;
    padding-top: 20px !important;
}
.cpanel-sidebar .list-group-item {
    border: none !important;
    border-radius: 10px !important;
    margin: 4px 14px !important;
    padding: 10px 16px !important;
    color: #475569 !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    transition: all 0.2s ease !important;
    background: transparent !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.cpanel-sidebar .list-group-item:hover {
    background: rgba(14, 165, 164, 0.08) !important;
    color: #0ea5a4 !important;
    transform: translateX(2px);
}
.cpanel-sidebar .list-group-item.active {
    background: linear-gradient(135deg, #0ea5a4 0%, #0d9488 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(14, 165, 164, 0.2) !important;
}
.cpanel-sidebar .collapse .list-group-item {
    margin-left: 28px !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    padding: 8px 16px !important;
    color: #64748b !important;
}
.cpanel-sidebar .collapse .list-group-item:hover {
    color: #0ea5a4 !important;
}
.cpanel-sidebar .collapse .list-group-item.active {
    background: rgba(14, 165, 164, 0.12) !important;
    color: #0ea5a4 !important;
    box-shadow: none !important;
    font-weight: 600 !important;
}

/* ── Sidebar Layout: Student Portal Sidebar ─────────────────── */
.student-sidebar {
    width: 280px;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    background: #ffffff !important;
    border-right: 1px solid rgba(226, 232, 240, 0.8) !important;
    z-index: 1030;
    display: flex;
    flex-direction: column;
}
.student-sidebar-header {
    border-bottom: 1px solid rgba(226, 232, 240, 0.8) !important;
    padding: 24px 20px !important;
}
.student-sidebar-mark {
    width: 12px;
    height: 12px;
    border-radius: 99px;
    background: linear-gradient(135deg, #0ea5a4 0%, #0d9488 100%);
    display: inline-block;
    box-shadow: 0 0 10px rgba(14, 165, 164, 0.6);
}
.student-sidebar-nav {
    overflow-y: auto;
    height: calc(100vh - 150px);
    padding: 16px 12px !important;
}
.student-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px !important;
    margin: 4px 0 !important;
    border-radius: 10px !important;
    color: #475569 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    transition: all 0.2s ease !important;
}
.student-nav-link i {
    font-size: 1.2rem !important;
    color: #64748b !important;
    transition: color 0.2s ease;
}
.student-nav-link:hover {
    background: rgba(14, 165, 164, 0.08) !important;
    color: #0ea5a4 !important;
    transform: translateX(2px);
}
.student-nav-link:hover i {
    color: #0ea5a4 !important;
}
.student-nav-link.active {
    background: linear-gradient(135deg, #0ea5a4 0%, #0d9488 100%) !important;
    color: #ffffff !important;
}
.student-nav-link.active i {
    color: #ffffff !important;
}

/* ── Tables Styling ─────────────────────────────────────────── */
.table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    width: 100% !important;
    color: #334155 !important;
}
.table th {
    background-color: #f8fafc !important;
    color: #475569 !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    font-size: 0.75rem !important;
    letter-spacing: 0.05em !important;
    padding: 12px 16px !important;
    border-bottom: 2px solid #e2e8f0 !important;
}
.table td {
    padding: 14px 16px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    vertical-align: middle !important;
}
.table-hover tbody tr:hover {
    background-color: rgba(14, 165, 164, 0.02) !important;
}

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
    padding: 6px 10px !important;
    font-weight: 700 !important;
    border-radius: 6px !important;
    text-transform: uppercase;
    font-size: 0.72rem !important;
    letter-spacing: 0.04em !important;
}
.bg-success {
    background-color: rgba(16, 185, 129, 0.12) !important;
    color: #059669 !important;
}
.bg-danger {
    background-color: rgba(239, 68, 68, 0.12) !important;
    color: #dc2626 !important;
}
.bg-warning {
    background-color: rgba(245, 158, 11, 0.12) !important;
    color: #d97706 !important;
}
.bg-info {
    background-color: rgba(59, 130, 246, 0.12) !important;
    color: #2563eb !important;
}
.bg-secondary {
    background-color: rgba(100, 116, 139, 0.12) !important;
    color: #475569 !important;
}
.bg-primary {
    background: linear-gradient(135deg, #0ea5a4, #0d9488) !important;
    color: #fff !important;
}

/* ── Progress bars ──────────────────────────────────────────── */
.progress {
    background-color: #f1f5f9 !important;
    border-radius: 99px !important;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.03);
}
.progress-bar {
    background: linear-gradient(90deg, #0ea5a4 0%, #0d9488 100%) !important;
    border-radius: 99px !important;
    position: relative;
    overflow: hidden;
}
.progress-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    animation: progressShimmer 2s infinite;
}
@keyframes progressShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ── Alert Styling ──────────────────────────────────────────── */
.alert {
    border-radius: 12px !important;
    padding: 16px 20px !important;
    border: none !important;
    box-shadow: 0 4px 6px -1px rgba(2, 6, 23, 0.03) !important;
}
.alert-success {
    background-color: rgba(16, 185, 129, 0.08) !important;
    color: #065f46 !important;
    border-left: 4px solid #16a34a !important;
}
.alert-danger {
    background-color: rgba(239, 68, 68, 0.08) !important;
    color: #991b1b !important;
    border-left: 4px solid #dc2626 !important;
}
.alert-warning {
    background-color: rgba(245, 158, 11, 0.08) !important;
    color: #92400e !important;
    border-left: 4px solid #d97706 !important;
}
.alert-info {
    background-color: rgba(59, 130, 246, 0.08) !important;
    color: #1e40af !important;
    border-left: 4px solid #3b82f6 !important;
}

/* ── Page Headers ───────────────────────────────────────────── */
.page-header {
    margin-bottom: 2rem;
}
.page-header h1 {
    font-weight: 800;
    font-size: 1.75rem;
    color: #0f172a;
    letter-spacing: -0.02em;
    margin: 0 0 0.25rem;
}
.page-header p {
    color: #64748b;
    font-size: 0.95rem;
    margin: 0;
}

/* ── Dropdown ───────────────────────────────────────────────── */
.dropdown-menu {
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(2, 6, 23, 0.08);
    padding: 8px;
}
.dropdown-item {
    border-radius: 8px;
    padding: 8px 12px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.15s ease;
}
.dropdown-item:hover {
    background: rgba(14, 165, 164, 0.08);
    color: #0ea5a4;
}

/* ── Modal ──────────────────────────────────────────────────── */
.modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 24px 48px rgba(2, 6, 23, 0.12);
}
.modal-header {
    border-bottom: 1px solid #f1f5f9;
    padding: 1.25rem 1.5rem;
}
.modal-body {
    padding: 1.5rem;
}
.modal-footer {
    border-top: 1px solid #f1f5f9;
    padding: 1rem 1.5rem;
}

/* ── List Group ─────────────────────────────────────────────── */
.list-group-item {
    border: 1px solid #f1f5f9;
    padding: 12px 16px;
    transition: background 0.15s ease;
}
.list-group-item:first-child {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}
.list-group-item:last-child {
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

/* ── Tooltip ────────────────────────────────────────────────── */
.tooltip-inner {
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* ── Pagination ─────────────────────────────────────────────── */
.page-link {
    border: 1px solid #e2e8f0;
    color: #475569;
    padding: 8px 14px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.15s ease;
}
.page-link:hover {
    background: rgba(14, 165, 164, 0.08);
    color: #0ea5a4;
    border-color: #0ea5a4;
}
.page-item.active .page-link {
    background: linear-gradient(135deg, #0ea5a4, #0d9488);
    border-color: #0ea5a4;
    color: #fff;
}
