/* ================================================================
   style.css — muhamadxon.uz frontend
   Light / Dark tema qo‘llab-quvvatlaydi
   ================================================================ */

/* ---------- CSS o‘zgaruvchilar ---------- */
:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --secondary: #6b7280;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    --bg: #ffffff;
    --bg-alt: #f9fafb;
    --bg-card: #ffffff;
    --border: #e5e7eb;
    --text: #111827;
    --text-muted: #6b7280;
    --nav-bg: rgba(255, 255, 255, 0.95);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --radius: 0.75rem;
    --transition: 0.25s ease;
}

[data-theme="dark"] {
    --bg: #0f172a;
    --bg-alt: #1e293b;
    --bg-card: #1e293b;
    --border: #334155;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --nav-bg: rgba(15, 23, 42, 0.97);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family:
        "Noto Sans",
        system-ui,
        -apple-system,
        sans-serif;
    background-color: var(--bg);
    color: var(--text);
    transition:
        background-color var(--transition),
        color var(--transition);
    line-height: 1.65;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text);
    font-weight: 700;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover {
    color: var(--primary-hover);
}

/* ---------- Navbar ---------- */
#mainNav {
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
}

#mainNav .navbar-brand {
    color: var(--text) !important;
    font-weight: 700;
}

#mainNav .nav-link {
    color: var(--text-muted) !important;
    font-weight: 500;
    padding: 0.45rem 0.75rem;
    border-radius: 0.5rem;
}

#mainNav .nav-link:hover,
#mainNav .nav-link.active {
    color: var(--primary) !important;
    background: rgba(79, 70, 229, 0.08);
}

/* ---------- Cards ---------- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
}

.card-title {
    color: var(--text);
}

.card-muted,
.text-muted {
    color: var(--text-muted) !important;
}

/* ---------- Forms ---------- */
.form-control,
.form-select {
    background: var(--bg-card);
    border-color: var(--border);
    color: var(--text) !important;
}

.form-control:focus,
.form-select:focus {
    background: var(--bg-card);
    color: var(--text);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

/* ---------- Hero Section ---------- */
.hero {
    min-height: 80vh;
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg-alt) 100%);
}

.hero-title {
    color: var(--text);
}

.hero-sub {
    color: var(--text-muted);
}

/* ---------- Prose & Articles ---------- */
.prose {
    color: var(--text);
}

.prose p,
.prose li {
    color: var(--text);
    text-align: justify;
    hyphens: auto;
}

.prose blockquote {
    border-left: 4px solid var(--primary);
    background: var(--bg-alt);
    padding: 1rem;
    color: var(--text-muted);
}

[data-theme="dark"] .prose pre {
    background: #000;
    color: #e5e7eb;
}

/* ---------- Tables (Admin Paneli uchun) ---------- */
.table {
    color: var(--text);
}

[data-theme="dark"] .table {
    --bs-table-color: var(--text);
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--border);
}

.adm-table th {
    color: var(--text-muted) !important;
}

/* ---------- Custom Components ---------- */
.timeline-item::before {
    border: 2px solid var(--bg);
}

.comment-item {
    border-left: 3px solid var(--primary);
    background: var(--bg-alt);
    padding: 1rem;
    border-radius: 0 0.5rem 0.5rem 0;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}


/* ---------- Quick Fix: Majburiy ranglar ---------- */
[data-theme="dark"] .text-dark {
    color: var(--text) !important;
}

[data-theme="dark"] .bg-white {
    background-color: var(--bg-card) !important;
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: "Noto Sans", system-ui, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    transition:
        background-color var(--transition),
        color var(--transition);
    line-height: 1.65;
}

a {
    color: var(--primary);
    text-decoration: none;
}
a:hover {
    color: var(--primary-hover);
}

img {
    max-width: 100%;
    height: auto;
}

/* ---------- Navbar ---------- */
#mainNav {
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: background var(--transition);
}

#mainNav .navbar-brand {
    color: var(--text);
    font-size: 1.1rem;
}
#mainNav .nav-link {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.45rem 0.75rem;
    border-radius: 0.5rem;
    transition:
        color var(--transition),
        background var(--transition);
}
#mainNav .nav-link:hover,
#mainNav .nav-link.active {
    color: var(--primary);
    background: rgba(79, 70, 229, 0.08);
}

/* ---------- Buttons ---------- */
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    font-weight: 500;
}
.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

/* ---------- Cards ---------- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition:
        box-shadow var(--transition),
        transform var(--transition);
}
.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}
.card-img-top {
    border-radius: var(--radius) var(--radius) 0 0;
    object-fit: cover;
    height: 200px;
}

/* ---------- Hero section ---------- */
.about-avatar {
    width: 350px;
    height: 350px;
    object-fit: cover;
    border: 5px solid var(--primary);
}

.about-avatar-empty {
    width: 350px;
    height: 350px;
}

.hero {
    min-height: 92vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg-alt) 100%);
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(
        circle,
        rgba(79, 70, 229, 0.15) 0%,
        transparent 70%
    );
    top: -150px;
    right: -150px;
    border-radius: 50%;
}
.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
}
.hero-name {
    color: var(--primary);
}
.hero-sub {
    font-size: 1.2rem;
    color: var(--text-muted);
}
.hero-avatar {
    width: 500px;
    height: 500px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid var(--primary);
    box-shadow: var(--shadow-lg);
}

/* ---------- Section titles ---------- */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    position: relative;
    display: inline-block;
    margin-bottom: 2.5rem;
}
.section-title::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 50px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

/* ---------- Stats ---------- */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
}
.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

/* ---------- Skills ---------- */
.skill-bar {
    background: var(--border);
    border-radius: 99px;
    height: 8px;
    overflow: hidden;
}
.skill-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #818cf8);
    border-radius: 99px;
    transition: width 1s ease;
}

/* ---------- Timeline ---------- */
.timeline {
    position: relative;
    padding-left: 2rem;
}
.timeline::before {
    content: "";
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}
.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}
.timeline-item::before {
    content: "";
    position: absolute;
    left: -1.75rem;
    top: 0.35rem;
    width: 12px;
    height: 12px;
    background: var(--primary);
    border: 2px solid var(--bg);
    border-radius: 50%;
}
.timeline-period {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ---------- Badge types ---------- */
.badge-primary {
    background: rgba(79, 70, 229, 0.15);
    color: var(--primary);
}
.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}
.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}
.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

/* ---------- Announcement card ---------- */
.ann-card .badge {
    font-size: 0.75rem;
    padding: 0.35em 0.7em;
    border-radius: 0.5rem;
    font-weight: 600;
}
.ann-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
}

/* ---------- Course card ---------- */
.course-card .price-tag {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}
.course-meta span {
    font-size: 0.82rem;
    color: var(--text-muted);
}
.course-img-wrap {
    position: relative;
    overflow: hidden;
    line-height: 0;
}
.course-img-placeholder {
    width: 100%;
    height: 180px;
    background: var(--surface-alt, #f3f4f6);
}
.featured-ribbon {
    position: absolute;
    bottom: 12px;
    right: -2px;
    background: var(--warning);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.28rem 1rem 0.28rem 0.75rem;
    border-radius: 4px 0 0 4px;
    box-shadow: -2px 2px 6px rgba(0,0,0,0.22);
    line-height: 1.4;
}
.featured-ribbon::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: -5px;
    border-left: 5px solid rgba(0,0,0,0.25);
    border-bottom: 5px solid transparent;
}

/* ---------- Article card ---------- */
.article-card .category-badge {
    font-size: 0.75rem;
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
    padding: 0.2rem 0.6rem;
    border-radius: 0.4rem;
    font-weight: 600;
}

/* ---------- Comments ---------- */
.comment-item {
    border-left: 3px solid var(--primary);
    padding-left: 1rem;
    margin-bottom: 1.25rem;
}
.comment-author {
    font-weight: 600;
    font-size: 0.9rem;
}
.comment-date {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ---------- Pagination ---------- */
.page-link {
    background: var(--bg-card);
    border-color: var(--border);
    color: var(--text);
}
.page-link:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
}

/* ---------- Footer ---------- */
.footer {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    color: var(--text);
}
.footer-link {
    color: var(--text-muted);
    font-size: 0.88rem;
    transition: color var(--transition);
}
.footer-link:hover {
    color: var(--primary);
}
.footer-social {
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: color var(--transition);
}
.footer-social:hover {
    color: var(--primary);
}

/* ---------- Forms ---------- */
.form-control,
.form-select {
    background: var(--bg-card);
    border-color: var(--border);
    color: var(--text);
    border-radius: 0.5rem;
    transition:
        border-color var(--transition),
        box-shadow var(--transition);
}
.form-control:focus,
.form-select:focus {
    background: var(--bg-card);
    border-color: var(--primary);
    color: var(--text);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}
.form-control::placeholder {
    color: var(--text-muted);
}

/* ---------- Alert / Flash ---------- */
.flash-msg {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    min-width: 280px;
    animation: slideIn 0.3s ease;
}
@keyframes slideIn {
    from {
        transform: translateX(120%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ---------- Verify page ---------- */
.verify-box {
    max-width: 520px;
    margin: 4rem auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .hero {
        min-height: auto;
        padding: 4rem 0;
    }
    .hero-avatar {
        width: 200px;
        height: 200px;
    }
    .section-title {
        font-size: 1.5rem;
    }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ---------- Selection ---------- */
::selection {
    background: rgba(79, 70, 229, 0.25);
}

/* ---------- Prose (article detail) ---------- */
.prose {
    line-height: 1.8;
}
.prose h1,
.prose h2,
.prose h3 {
    margin-top: 1.8rem;
    font-weight: 700;
}
.prose pre {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
}
.prose code {
    background: var(--bg-alt);
    padding: 0.15em 0.4em;
    border-radius: 0.3rem;
    font-size: 0.9em;
}
.prose blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 1rem;
    color: var(--text-muted);
    margin: 1.5rem 0;
}
.prose img {
    border-radius: var(--radius);
}

/* Profil rasm tahrirlagichi */
.profile-photo-wrapper {
    width: 200px;
    margin: 0 auto;
}

.profile-preview-img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 15px;
    display: block;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.placeholder-preview {
    display: none; /* Rasm yo‘q bo‘lsa ko‘rsatmaslik */
}

.extra-small {
    font-size: 10px;
}


/* Jadvallar uchun maxsus ustunlar */
.col-order {
    width: 50px;
    text-align: center;
}

.col-action {
    width: 80px;
    text-align: right;
}

/* Admin badge va inputlar */
.adm-form-control {
    font-size: 0.9rem;
}

.adm-table th {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

/* ================================================================
   Accessibility — shrift o‘lchami va kontrast
   ================================================================ */

/* Shrift o‘lchamlari */
html[data-font-size="small"] {
    font-size: 14px;
}
html[data-font-size="normal"] {
    font-size: 16px;
}
html[data-font-size="large"] {
    font-size: 19px;
}

/* Yuqori kontrast rejimi */
body.high-contrast,
body.high-contrast *,
body.high-contrast *::before,
body.high-contrast *::after {
    /* background shorthand ishlatamiz — background-image (gradient) ham o‘chadi */
    background: #000 !important;
    color: #fff !important;
    border-color: #fff !important;
}
body.high-contrast a {
    color: #ff0 !important;
}
body.high-contrast .btn-primary,
body.high-contrast .badge.bg-primary {
    background: #00f !important;
    border: 2px solid #fff !important;
}
body.high-contrast img {
    filter: grayscale(30%) contrast(1.2);
}
body.high-contrast .card,
body.high-contrast .navbar,
body.high-contrast #mainNav {
    border: 1px solid #fff !important;
}

/* High-contrast + Dark theme header fix */
body.high-contrast.dark-theme #mainNav .navbar-brand {
    color: #ffff00 !important;
    font-weight: 900;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

body.high-contrast.dark-theme #mainNav .nav-link,
body.high-contrast.dark-theme #mainNav .nav-link:hover {
    color: #ffff00 !important;
    background: transparent !important;
}

body.high-contrast.dark-theme #mainNav .navbar-toggler {
    border-color: #ffff00 !important;
}

body.high-contrast.dark-theme #mainNav .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23ffff00' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

body.high-contrast.dark-theme .btn-outline-secondary {
    color: #ffff00 !important;
    border-color: #ffff00 !important;
}

body.high-contrast.dark-theme .btn-outline-secondary:hover {
    background: #ffff00 !important;
    color: #000 !important;
}

body.high-contrast.dark-theme .dropdown-menu,
body.high-contrast.dark-theme .dropdown-item {
    color: #000 !important;
    background: #ffff00 !important;
}

body.high-contrast.dark-theme .a11y-btn {
    color: #000 !important;
    border-color: #ffff00 !important;
    background: #ffff00 !important;
}

/* Accessibility bar */
.a11y-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
}
.a11y-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all var(--transition);
    line-height: 1.4;
}
.a11y-btn:hover,
.a11y-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Comment scroll box */
.comment-scroll-box {
    scrollbar-width: thin;
}
.comment-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.comment-author {
    color: var(--text);
}
.comment-date {
    font-size: 0.8rem;
}

/* ---------- Service card ---------- */
/* ── Service kartalar ────────────────────────────────────────────────────── */
.service-card {
    border: 1px solid var(--border);
    border-radius: 1rem;
    overflow: visible; /* badge rasm chegarasidan chiqib turishi uchun */
    transition:
        box-shadow var(--transition),
        transform var(--transition);
}
.service-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* Rasm wrapper — position: relative, icon absolute joylashadi */
.svc-img-wrap {
    position: relative;
    border-radius: 1rem 1rem 0 0;
    overflow: hidden; /* rasmni yuqori burchakda qirqish */
}
.svc-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.service-card:hover .svc-img {
    transform: scale(1.04);
}
/* Rasm bo‘lmasa — gradient placeholder */
.svc-img-placeholder {
    height: 200px;
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
}

/* Icon badge — rasm ichida chap-pastda */
.svc-icon-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 52px;
    height: 52px;
    background: var(--primary);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.35rem;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.45);
    border: 3px solid var(--bg-card);
    transition:
        transform var(--transition),
        box-shadow var(--transition);
    z-index: 1;
}
.service-card:hover .svc-icon-badge {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.55);
}

/* Card body — icon badge uchun yuqoridan joy qoldirish */
.svc-body {
    padding-top: 2rem !important;
}

/* Narx */
.svc-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
}

/* ---------- Dark mode: Bootstrap override ---------- */
/* Form inputs dark mode fix (Bootstrap default overrides CSS vars) */
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select,
[data-theme="dark"] .input-group-text {
    background-color: var(--bg-card) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
}
[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
    background-color: var(--bg-card) !important;
    color: var(--text) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2) !important;
}
[data-theme="dark"] .form-control::placeholder {
    color: var(--text-muted) !important;
}
[data-theme="dark"] .table {
    --bs-table-color: var(--text);
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--border);
    --bs-table-striped-bg: var(--bg-alt);
    --bs-table-hover-bg: var(--bg-alt);
}
[data-theme="dark"] .modal-content {
    background-color: var(--bg-card);
    border-color: var(--border);
    color: var(--text);
}
[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer {
    border-color: var(--border);
}
[data-theme="dark"] .dropdown-menu {
    background-color: var(--bg-card);
    border-color: var(--border);
}
[data-theme="dark"] .dropdown-item {
    color: var(--text);
}
[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .dropdown-item:focus {
    background-color: var(--bg-alt);
    color: var(--text);
}
[data-theme="dark"] .btn-close {
    filter: invert(1);
}
[data-theme="dark"] .alert {
    --bs-alert-bg: var(--bg-alt);
    --bs-alert-border-color: var(--border);
    --bs-alert-color: var(--text);
}
[data-theme="dark"] .card-header,
[data-theme="dark"] .card-footer {
    background-color: rgba(255, 255, 255, 0.04);
    border-color: var(--border);
}
[data-theme="dark"] .table-light {
    --bs-table-bg: var(--bg-alt);
    --bs-table-color: var(--text);
    --bs-table-border-color: var(--border);
}
[data-theme="dark"] .badge.bg-secondary {
    background-color: #475569 !important;
}
[data-theme="dark"] .text-dark {
    color: var(--text) !important;
}
[data-theme="dark"] .bg-white,
[data-theme="dark"] .bg-light {
    background-color: var(--bg-alt) !important;
}
[data-theme="dark"] .border,
[data-theme="dark"] .border-top,
[data-theme="dark"] .border-bottom {
    border-color: var(--border) !important;
}
[data-theme="dark"] hr {
    border-color: var(--border);
    opacity: 1;
}

/* ── student.php ─────────────────────────────────────────────────────────── */
.std-container {
    max-width: 900px;
}
.std-login-card {
    max-width: 500px;
    margin: 0 auto;
}
.std-avatar {
    width: 52px;
    height: 52px;
    background: var(--primary, #6d28d9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.std-uuid-code {
    word-break: break-all;
}
.std-progress {
    height: 18px;
    border-radius: 9px;
}
.std-progress-bar {
    border-radius: 9px;
}
.std-course-thumb {
    height: 130px;
    object-fit: cover;
}

/* ── pages/courses-detail.php ────────────────────────────────────────────── */
.crs-hero-img {
    max-height: 400px;
    object-fit: cover;
}
.crs-sticky-card {
    top: 80px;
}
.crs-container {
    max-width: 860px;
}
.comment-scroll-box {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}
