/* ==========================================================================
   AL-XORAZMIY — DIZAYN TIZIMI (v2)
   style.css dan keyin ulanadi va uning ustidan yoziladi: ranglar, soyalar, burchaklar,
   header/footer, kartochkalar, formalar hamda yangi bo'limlar (tadbirlar kalendari, qabul, arizalar).
   Ranglar :root dagi o'zgaruvchilarda — tungi rejim body.dark-mode da qayta belgilanadi.
   Kontrast: matn ranglari oq fon ustida WCAG AA (≥ 4.5:1) talabiga mos tanlangan.
   ========================================================================== */

:root {
    /* Asosiy ranglar */
    --primary-color: #17407A;     /* to'q ko'k — sarlavhalar, tugmalar (oq fonda 10.2:1) */
    --primary-strong: #0F2D57;    /* hover, footer */
    --primary-soft: #E8EFFA;      /* tanlangan menyu, fokus halqasi */
    --secondary-color: #B4501A;   /* terrakota — asosiy harakat tugmasi (oq matn 5.1:1) */
    --secondary-strong: #963F12;
    --accent: #E8A33D;            /* oltin — faqat bezak (chiziqlar, raqamlar), matn uchun emas */
    --topbar-bg: #0F2D57;

    /* Neytral ranglar */
    --bg-color: #F6F7FB;
    --alt-section-bg: #EEF2F8;
    --card-bg: #FFFFFF;
    --nav-bg: rgba(255, 255, 255, 0.9);
    --text-color: #1C2433;
    --text-muted: #5B6577;        /* oq fonda 5.9:1 */
    --border: #E3E7EF;
    --heading-color: var(--primary-color);

    /* Holat ranglari */
    --success: #15803D;
    --success-soft: #E7F6EC;
    --warning: #A15C07;
    --warning-soft: #FDF3E1;
    --danger: #C0352B;
    --danger-soft: #FBE9E7;
    --info: #1D5FD0;
    --info-soft: #E6EEFC;

    /* Tadbir turlari */
    --type-event: #1D5FD0;
    --type-meeting: #7A45D6;
    --type-exam: #C2410C;
    --type-holiday: #15803D;

    /* Shakl */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 18px;
    --card-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 4px 16px rgba(16, 24, 40, 0.06);
    --shadow-lg: 0 14px 36px rgba(16, 24, 40, 0.13);
    --ring: 0 0 0 3px rgba(29, 95, 208, 0.22);
    --header-h: 72px;
}

body.dark-mode {
    --bg-color: #0E1420;
    --alt-section-bg: #121A29;
    --card-bg: #172033;
    --nav-bg: rgba(14, 20, 32, 0.9);
    --text-color: #E6EAF2;
    --text-muted: #9AA6BA;
    --border: #26324A;
    --primary-soft: #1B2A45;
    --heading-color: #8FB3EE;
    --success-soft: #12301F;
    --warning-soft: #33260F;
    --danger-soft: #3A1714;
    --info-soft: #14284A;
    --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 20px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.45);
    --ring: 0 0 0 3px rgba(143, 179, 238, 0.3);
}

/* ---------- Asoslar ---------- */
html { scroll-behavior: smooth; }
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }
::selection { background: rgba(232, 163, 61, 0.35); }

.sr-only, .hp-field {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}

/* Dark mode: eski uslubdagi ochiq-ko'k sarlavhalar yagona rangga keltiriladi */
body.dark-mode .text-card h2, body.dark-mode .section-title, body.dark-mode .news-content h3,
body.dark-mode .teacher-info h3, body.dark-mode .student-info h3, body.dark-mode .alumni-info h3,
body.dark-mode .map-container h2, body.dark-mode .form-container h2, body.dark-mode .tab-pane h2,
body.dark-mode .login-card h2, body.dark-mode .content-form h3 {
    color: var(--heading-color);
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-nav {
    position: static;          /* eski "fixed" o'rniga — header butunlay sticky */
    background: var(--nav-bg);
    backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: none;
    padding: 0;
    height: var(--header-h);
    display: flex;
    align-items: center;
}
.main-nav .container { gap: 16px; }
/* Header kengroq: 8 ta bo'lim bir qatorga sig'ishi uchun */
.site-header .container { width: 94%; max-width: 1320px; }

/* Header sticky bo'lgani uchun eski "fixed" header bo'shliqlari kerak emas */
.hero, .page-header { margin-top: 0; }

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}
/* Maktab logotipi (images/logo-160.png — asl fayl images/logo.png) */
.logo-img {
    width: 48px; height: 48px;
    flex-shrink: 0;
    border-radius: 50%;
    object-fit: contain;
}
/* Logo chetidagi to'q ko'k halqa to'q fonda yo'qolmasligi uchun oq fon */
body.dark-mode .logo-img, .site-footer .logo-img, .login-card .logo-img { background: #fff; padding: 1px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-text strong {
    font-family: var(--font-serif);
    color: var(--heading-color);
    font-size: 1.12rem;
    letter-spacing: 0.4px;
}
.logo-text small {
    color: var(--text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.9px;
    font-weight: 600;
}

.nav-links { gap: 0; }
.nav-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    transition: background-color 0.2s, color 0.2s;
}
.nav-links a:hover { background: var(--primary-soft); color: var(--heading-color); }
.nav-links a.active { color: var(--heading-color); background: var(--primary-soft); }
/* "Qabul haqida" — oddiy menyu bandi kabi; faqat "Admin" ajralib turadigan rangli tugma */
.nav-links a.nav-admin {
    margin-left: 6px;
    background: var(--secondary-color);
    color: #fff;
}
.nav-links a.nav-admin:hover { background: var(--secondary-strong); color: #fff; }

.nav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.lang-select {
    appearance: none;
    -webkit-appearance: none;
    height: 38px;
    padding: 0 30px 0 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--card-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%235B6577' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 12px center;
    color: var(--text-color);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
}
#darkModeToggle {
    width: 38px; height: 38px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text-color);
    display: grid; place-items: center;
    transition: background-color 0.2s;
}
#darkModeToggle:hover, .lang-select:hover { background-color: var(--primary-soft); }

.menu-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 10px;
    width: 42px; height: 42px;
    color: var(--text-color);
    font-size: 1.1rem;
}
.mobile-menu-header button {
    background: none; border: 0; cursor: pointer;
    color: var(--text-color); font-size: 1.2rem;
    width: 36px; height: 36px; border-radius: 50%;
}

/* Kompyuter, lekin tor ekran: menyu bir qatorga sig'ishi uchun ixchamroq */
@media (min-width: 1200px) and (max-width: 1360px) {
    .main-nav .container { gap: 10px; }
    .logo-text small { display: none; }
    .nav-links a { padding: 8px 7px; font-size: 13.5px; }
    .nav-links a.nav-admin { margin-left: 2px; }
    .logo-text strong { font-size: 1.02rem; }
}

@media (max-width: 1199px) {
    .menu-toggle { display: grid; place-items: center; order: 0; }
    .logo { order: 1; margin-right: auto; }
    .nav-actions { order: 2; }
    .nav-links {
        background: var(--card-bg);
        width: 300px;
        left: -300px;
        padding: 18px;
        gap: 2px;
        overflow-y: auto;
        border-right: 1px solid var(--border);
    }
    .nav-links { box-shadow: none; } /* yopiq menyu soyasi ekran chetida ko'rinmasin */
    .nav-links.active { transform: translateX(300px); box-shadow: 8px 0 24px rgba(0, 0, 0, 0.18); }
    .nav-links li { margin-bottom: 2px; }
    .nav-links a { width: 100%; padding: 12px 14px; font-size: 15px; }
    .nav-links a i { color: var(--heading-color); width: 20px; text-align: center; margin-right: 4px; }
    .nav-links a.nav-admin { margin: 10px 0 0; justify-content: center; }
    .nav-links a.nav-admin i { color: #fff; }
    .mobile-menu-header { border-bottom-color: var(--border); list-style: none; }
}

@media (max-width: 768px) {
    :root { --header-h: 64px; }
    .logo-text small { display: none; }
    .logo-img { width: 42px; height: 42px; }
}

/* ==========================================================================
   TUGMALAR
   ========================================================================== */
.btn, .details-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.primary-btn { background: var(--secondary-color); color: #fff; }
.primary-btn:hover { background: var(--secondary-strong); opacity: 1; }
.btn-outline {
    background: var(--card-bg);
    border-color: var(--border);
    color: var(--text-color);
}
.btn-outline:hover { border-color: var(--primary-color); color: var(--heading-color); }
.btn-ghost { background: transparent; color: var(--heading-color); }
.btn-ghost:hover { background: var(--primary-soft); }

.details-btn {
    background: var(--primary-color);
    color: #fff;
}
.details-btn:hover { background: var(--primary-strong); transform: none; opacity: 1; }
.details-btn i { transition: transform 0.2s; }
.details-btn:hover i { transform: translateX(3px); }

/* ==========================================================================
   BANNER (HERO) VA SAHIFA SARLAVHASI
   ========================================================================== */
.hero {
    background:
        linear-gradient(100deg, rgba(11, 33, 66, 0.94) 0%, rgba(23, 64, 122, 0.8) 52%, rgba(23, 64, 122, 0.35) 100%),
        url('https://images.unsplash.com/photo-1580582932707-520aed937b7b?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
    padding: 120px 0 150px;
    text-align: left;
}
.hero-content { align-items: flex-start; max-width: 1200px; }
.hero h1 {
    max-width: 720px;
    font-size: clamp(2rem, 4.2vw, 3.3rem);
    line-height: 1.12;
    letter-spacing: -0.5px;
    margin-bottom: 18px;
}
.hero h1::after {
    content: '';
    display: block;
    width: 72px; height: 4px;
    margin-top: 22px;
    border-radius: 4px;
    background: var(--accent);
}
.hero p { max-width: 620px; font-size: 1.15rem; opacity: 0.92; margin-bottom: 0; }

.page-header {
    position: relative;
    background:
        linear-gradient(120deg, rgba(11, 33, 66, 0.93), rgba(23, 64, 122, 0.82)),
        url('https://images.unsplash.com/photo-1523050854058-8df90110c9f1?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
    padding: 76px 0 70px;
}
.page-header .container { flex-direction: column; }
.page-header h1 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); letter-spacing: -0.3px; }
.page-header p { max-width: 680px; margin: 0 auto; }
.page-header::after {
    content: '';
    position: absolute;
    left: 50%; bottom: 0;
    width: 72px; height: 4px;
    transform: translateX(-50%);
    background: var(--accent);
    border-radius: 4px 4px 0 0;
}

/* Bosh sahifa: tezkor havolalar (banner ostiga chiqib turadi) */
.quick-links { position: relative; z-index: 2; margin-top: -78px; padding-bottom: 10px; }
.quick-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
}
.quick-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 22px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.2s, border-color 0.2s;
}
.quick-card:hover { transform: translateY(-3px); border-color: var(--primary-color); }
.quick-icon {
    flex-shrink: 0;
    width: 46px; height: 46px;
    border-radius: 12px;
    display: grid; place-items: center;
    background: var(--primary-soft);
    color: var(--heading-color);
    font-size: 1.15rem;
}
.quick-card.is-accent .quick-icon { background: var(--secondary-color); color: #fff; }
.quick-card h3 { font-family: var(--font-sans); font-size: 1rem; margin-bottom: 4px; color: var(--heading-color); }
.quick-card p { font-family: var(--font-sans); font-size: 0.86rem; color: var(--text-muted); line-height: 1.45; }

@media (max-width: 1024px) {
    .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .hero { padding: 72px 0 110px; }
    .quick-grid { grid-template-columns: 1fr; gap: 12px; }
    .quick-card { padding: 16px; }
}

/* ==========================================================================
   BO'LIMLAR VA KARTOCHKALAR
   ========================================================================== */
.content-section { padding: 88px 0; }
.content-section.tight { padding: 56px 0; }

.section-head { width: 100%; text-align: center; margin-bottom: 40px; }
.section-head .eyebrow, .eyebrow {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--secondary-color);
    margin-bottom: 8px;
}
body.dark-mode .eyebrow { color: var(--accent); }
.section-head h2, .section-title {
    font-size: clamp(1.6rem, 2.8vw, 2.15rem);
    color: var(--heading-color);
    letter-spacing: -0.3px;
}
.section-head p { color: var(--text-muted); max-width: 640px; margin: 10px auto 0; font-family: var(--font-sans); }
.section-title i { color: var(--accent); margin-right: 6px; }

.section-card,
.news-card, .teacher-card, .student-card, .alumni-card, .project-card,
.contact-card, .team-card, .map-container, .form-container {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
}
.news-card:hover, .teacher-card:hover, .student-card:hover, .project-card:hover,
.contact-card:hover, .team-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.section-row { gap: 36px; align-items: stretch; }
.text-card { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 48px; }
.text-card h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); color: var(--heading-color); letter-spacing: -0.3px; }
.text-card h2::after {
    content: '';
    display: block;
    width: 48px; height: 3px;
    margin-top: 14px;
    background: var(--accent);
    border-radius: 3px;
}
.text-card p { color: var(--text-muted); font-size: 1.06rem; }
.image-card { padding: 0; overflow: hidden; }
.image-card img { height: 100%; min-height: 320px; max-height: 420px; border-radius: 0; transition: transform 0.6s ease; }
.image-card:hover img { transform: scale(1.03); }

@media (max-width: 768px) {
    .content-section { padding: 60px 0; }
    .text-card { padding: 28px; align-items: center; }
    .text-card h2::after { margin-left: auto; margin-right: auto; }
    .image-card img { min-height: 220px; }
}

/* Statistika */
.stats-section {
    background: linear-gradient(120deg, var(--primary-strong), var(--primary-color));
    padding: 64px 0;
}
.stat-box h2 { color: var(--accent); font-size: clamp(2rem, 3.6vw, 2.8rem); }
.stat-box p { font-family: var(--font-sans); opacity: 0.88; }

/* Rahbariyat */
.team-card { padding: 32px 26px; }
.team-card img { border: 4px solid var(--primary-soft); box-shadow: 0 0 0 2px var(--primary-color); width: 128px; height: 128px; }
.team-card .role { color: var(--secondary-color); font-family: var(--font-sans); }
body.dark-mode .team-card .role { color: var(--accent); }
.team-card .bio { color: var(--text-muted); opacity: 1; }

/* Yangiliklar */
.news-card { overflow: hidden; }
.news-img { height: 210px; overflow: hidden; }
.news-img img { transition: transform 0.6s ease; }
.news-card:hover .news-img img { transform: scale(1.05); }
.news-date {
    left: 12px; bottom: 12px;
    border-radius: 999px;
    padding: 5px 12px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.8rem;
    background: rgba(15, 45, 87, 0.82);
    backdrop-filter: blur(4px);
}
.news-content h3 { color: var(--heading-color); font-size: 1.18rem; }
.news-content p { color: var(--text-muted); opacity: 1; font-family: var(--font-sans); }
.news-content .details-btn { align-self: flex-start; }
.news-modal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.share-btn { background: #229ED9; color: #fff; }
.share-btn:hover { background: #1A86BA; }

/* O'qituvchilar / o'quvchilar */
.teacher-img, .student-img { border: 4px solid var(--primary-soft); box-shadow: 0 0 0 2px var(--primary-color); }
.teacher-info p, .student-info .achievement, .alumni-info .desc, .project-card p { color: var(--text-muted); opacity: 1; }
.filter-btn { border: 1px solid var(--border); box-shadow: none; font-family: var(--font-sans); }
.filter-btn:hover, .filter-btn.active { background: var(--primary-color); border-color: var(--primary-color); color: #fff; }
.project-icon {
    width: 64px; height: 64px;
    display: inline-grid; place-items: center;
    font-size: 1.6rem;
    border-radius: 16px;
    background: var(--primary-soft);
    color: var(--heading-color);
}

/* Bog'lanish */
.contact-card i {
    width: 56px; height: 56px;
    display: inline-grid; place-items: center;
    border-radius: 16px;
    background: var(--primary-soft);
    color: var(--heading-color);
    font-size: 1.3rem;
}
.contact-card p { color: var(--text-muted); opacity: 1; }
.map-frame { border-radius: var(--radius); border: 1px solid var(--border); }
.map-frame iframe { display: block; }
.map-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
/* Telefonda xarita va forma bloklari ekran enini to'liq egallaydi */
@media (max-width: 768px) {
    .contact-section-row { align-items: stretch; gap: 24px; }
    .map-container, .form-container { width: 100%; padding: 22px; }
}

/* ==========================================================================
   FORMALAR
   ========================================================================== */
.form-group { margin-bottom: 16px; }
.form-group label, .field-label {
    display: block;
    margin-bottom: 6px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color);
}
.form-group .hint { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; font-family: var(--font-sans); }
.required-mark { color: var(--danger); margin-left: 2px; }

.form-group input,
.form-group textarea,
.form-group select,
.content-field input,
.content-field textarea,
.msg-reply-form textarea,
.admin-input {
    width: 100%;
    min-height: 46px;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card-bg);
    color: var(--text-color);
    font-family: var(--font-sans);
    font-size: 0.97rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group textarea, .content-field textarea { min-height: 110px; resize: vertical; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus,
.content-field input:focus, .content-field textarea:focus, .msg-reply-form textarea:focus, .admin-input:focus {
    outline: none;
    border-color: var(--info);
    box-shadow: var(--ring);
}
.form-group input[type="file"] { padding: 9px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

.check-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 4px 0 18px;
}
.check-row input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--primary-color); flex-shrink: 0; }
.check-row a { color: var(--heading-color); font-weight: 600; }

/* Forma natijasi (alert o'rniga sahifa ichida) */
.form-status {
    display: none;
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    font-family: var(--font-sans);
    font-size: 0.93rem;
}
.form-status.is-success { display: block; background: var(--success-soft); color: var(--success); }
.form-status.is-error { display: block; background: var(--danger-soft); color: var(--danger); }
body.dark-mode .form-status.is-success { color: #7BD69B; }
body.dark-mode .form-status.is-error { color: #F19A92; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
    background: #0B1F3D;
    color: rgba(255, 255, 255, 0.78);
    padding: 64px 0 0;
    text-align: left;
    font-family: var(--font-sans);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 36px;
    align-items: start;
}
.site-footer .logo-text strong { color: #fff; }
.site-footer .logo-text small { color: rgba(255, 255, 255, 0.6); }
.footer-brand p { font-family: var(--font-sans); margin: 16px 0 18px; font-size: 0.92rem; line-height: 1.6; }
.site-footer h4 {
    color: #fff;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 16px;
    font-family: var(--font-sans);
}
.site-footer ul { list-style: none; display: grid; gap: 10px; }
.site-footer a { color: rgba(255, 255, 255, 0.78); text-decoration: none; font-size: 0.93rem; }
.site-footer a:hover { color: var(--accent); }
.footer-contact p { font-family: var(--font-sans); font-size: 0.92rem; margin-bottom: 10px; display: flex; gap: 10px; }
.footer-contact i { color: var(--accent); margin-top: 4px; width: 16px; }
.site-footer .social-icons { display: flex; gap: 10px; }
.site-footer .social-icons a {
    width: 38px; height: 38px;
    margin: 0;
    display: grid; place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 1rem;
}
.site-footer .social-icons a:hover { background: var(--accent); color: #0B1F3D; }
/* Havolasi kiritilmagan tarmoq ikonkasi ko'rinmaydi (display: grid "hidden" ni bekor qilmasligi uchun) */
.site-footer .social-icons a[hidden] { display: none; }
.footer-bottom {
    margin-top: 48px;
    padding: 18px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    gap: 12px;
    flex-wrap: wrap;
}
.footer-bottom p { font-family: var(--font-sans); }
.footer-bottom a { font-size: 0.85rem; }

@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) {
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .footer-bottom { flex-direction: column; text-align: center; }
}

/* ==========================================================================
   NISHONLAR (badge) VA FILTR CHIPLARI
   ========================================================================== */
.status-badge, .type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}
.status-badge::before, .type-badge::before {
    content: '';
    width: 7px; height: 7px;
    border-radius: 50%;
    background: currentColor;
}
.status-new { background: var(--info-soft); color: var(--info); }
.status-in_progress { background: var(--warning-soft); color: var(--warning); }
.status-answered, .status-accepted { background: var(--success-soft); color: var(--success); }
.status-rejected { background: var(--danger-soft); color: var(--danger); }
body.dark-mode .status-new { color: #8FB3EE; }
body.dark-mode .status-in_progress { color: #F2C377; }
body.dark-mode .status-answered, body.dark-mode .status-accepted { color: #7BD69B; }
body.dark-mode .status-rejected { color: #F19A92; }

.type-event { color: var(--type-event); background: color-mix(in srgb, var(--type-event) 12%, transparent); }
.type-meeting { color: var(--type-meeting); background: color-mix(in srgb, var(--type-meeting) 12%, transparent); }
.type-exam { color: var(--type-exam); background: color-mix(in srgb, var(--type-exam) 12%, transparent); }
.type-holiday { color: var(--type-holiday); background: color-mix(in srgb, var(--type-holiday) 12%, transparent); }
body.dark-mode .type-badge { filter: brightness(1.45); }

.chip-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; }
.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text-color);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s;
}
.chip:hover { border-color: var(--primary-color); }
.chip.active { background: var(--primary-color); border-color: var(--primary-color); color: #fff; }
.chip .count {
    min-width: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--heading-color);
    font-size: 0.75rem;
    line-height: 20px;
    text-align: center;
}
.chip.active .count { background: rgba(255, 255, 255, 0.22); color: #fff; }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; }
.chip-search { margin-left: auto; min-width: 220px; }
@media (max-width: 640px) { .chip-search { margin-left: 0; width: 100%; } }

/* ==========================================================================
   TADBIRLAR KALENDARI
   ========================================================================== */
.cal-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(280px, 1fr);
    gap: 28px;
    width: 100%;
    align-items: start;
}
.cal-card, .agenda-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    padding: 22px;
}
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.cal-head h2 {
    font-size: 1.45rem;
    color: var(--heading-color);
    margin-right: auto;
    text-transform: capitalize;
}
.icon-btn {
    width: 40px; height: 40px;
    display: inline-grid; place-items: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card-bg);
    color: var(--text-color);
    cursor: pointer;
}
.icon-btn:hover { background: var(--primary-soft); color: var(--heading-color); }
.cal-weekdays, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-weekdays div {
    padding: 8px 0;
    text-align: center;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--text-muted);
}
.cal-grid { gap: 6px; }
.cal-day {
    position: relative;
    min-height: 96px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card-bg);
    color: var(--text-color);
    text-align: left;
    font-family: var(--font-sans);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: border-color 0.2s, background-color 0.2s;
}
.cal-day:hover { border-color: var(--primary-color); }
.cal-day .num { font-weight: 700; font-size: 0.9rem; }
.cal-day.is-outside { background: transparent; color: var(--text-muted); opacity: 0.55; }
.cal-day.is-weekend .num { color: var(--secondary-color); }
.cal-day.is-today .num {
    display: inline-grid; place-items: center;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
}
.cal-day.is-selected { border-color: var(--primary-color); box-shadow: var(--ring); }
.cal-pill {
    display: block;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
}
.cal-pill.event { background: var(--type-event); }
.cal-pill.meeting { background: var(--type-meeting); }
.cal-pill.exam { background: var(--type-exam); }
.cal-pill.holiday { background: var(--type-holiday); }
.cal-more { font-size: 0.72rem; color: var(--text-muted); font-weight: 600; }

.agenda-card h3 { font-size: 1.15rem; color: var(--heading-color); margin-bottom: 14px; }
.agenda-list { display: grid; gap: 12px; }
.agenda-empty { color: var(--text-muted); font-family: var(--font-sans); font-size: 0.93rem; padding: 6px 0; }

.event-item {
    display: flex;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card-bg);
}
.event-date {
    flex-shrink: 0;
    width: 58px;
    padding: 8px 0;
    border-radius: 12px;
    text-align: center;
    background: var(--primary-soft);
    color: var(--heading-color);
    font-family: var(--font-sans);
    line-height: 1.1;
}
.event-date .d { display: block; font-size: 1.35rem; font-weight: 800; }
.event-date .m { display: block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; }
.event-item h4 { font-family: var(--font-serif); font-size: 1.02rem; color: var(--text-color); margin-bottom: 4px; }
.event-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-family: var(--font-sans); font-size: 0.82rem; color: var(--text-muted); margin-bottom: 6px; }
.event-meta i { margin-right: 4px; }
.event-item p { font-family: var(--font-sans); font-size: 0.88rem; color: var(--text-muted); white-space: pre-line; }

.home-events { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; width: 100%; }
.home-events .event-item { padding: 18px; box-shadow: var(--card-shadow); }
.section-foot { width: 100%; display: flex; justify-content: center; margin-top: 28px; }
@media (max-width: 900px) {
    .cal-layout { grid-template-columns: 1fr; }
    .home-events { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .cal-card { padding: 12px; }
    .cal-grid { gap: 3px; }
    .cal-day { min-height: 54px; padding: 5px; align-items: center; }
    .cal-pill { width: 7px; height: 7px; padding: 0; border-radius: 50%; font-size: 0; display: inline-block; }
    .cal-day .pills { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; }
    .cal-more { display: none; }
}

/* ==========================================================================
   QABUL SAHIFASI
   ========================================================================== */
.notice {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    width: 100%;
    padding: 16px 18px;
    border-radius: var(--radius);
    background: var(--info-soft);
    border: 1px solid color-mix(in srgb, var(--info) 25%, transparent);
    color: var(--text-color);
    font-family: var(--font-sans);
    margin-bottom: 28px;
}
.notice i { color: var(--info); margin-top: 3px; }
body.dark-mode .notice i { color: #8FB3EE; }
.info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; width: 100%; }
.info-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    padding: 26px;
}
.info-card .quick-icon { margin-bottom: 14px; }
.info-card h3 { font-size: 1.15rem; color: var(--heading-color); margin-bottom: 10px; }
.info-card ul { list-style: none; display: grid; gap: 8px; }
.info-card li {
    position: relative;
    padding-left: 22px;
    font-family: var(--font-sans);
    font-size: 0.93rem;
    color: var(--text-muted);
}
.info-card li::before {
    content: '';
    position: absolute;
    left: 4px; top: 8px;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--accent);
}
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; width: 100%; counter-reset: step; }
.step {
    position: relative;
    padding: 22px 20px 20px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.step::before {
    counter-increment: step;
    content: counter(step);
    display: grid; place-items: center;
    width: 36px; height: 36px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-family: var(--font-sans);
    font-weight: 800;
}
.step h3 { font-size: 1rem; color: var(--heading-color); margin-bottom: 6px; }
.step p { font-family: var(--font-sans); font-size: 0.88rem; color: var(--text-muted); }
/* Onlayn ariza: tashqi portalga (ariza.piima.uz) olib boruvchi banner */
.apply-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    width: 100%;
    padding: 40px 44px;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 92% 10%, rgba(232, 163, 61, 0.25), transparent 45%),
        linear-gradient(120deg, var(--primary-strong), var(--primary-color));
    color: #fff;
    box-shadow: var(--shadow-lg);
}
.apply-cta .eyebrow { color: var(--accent); }
.apply-cta h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); color: #fff; margin-bottom: 10px; }
.apply-cta p { max-width: 620px; font-family: var(--font-sans); opacity: 0.9; }
.apply-cta-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; flex-shrink: 0; }
.apply-cta-actions small { font-family: var(--font-sans); opacity: 0.75; font-size: 0.8rem; }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 1.02rem; border-radius: 12px; }
@media (max-width: 960px) {
    .info-grid { grid-template-columns: 1fr; }
    .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .apply-cta { flex-direction: column; align-items: flex-start; padding: 28px; }
    .apply-cta-actions { align-items: flex-start; }
}
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } .btn-lg { width: 100%; white-space: normal; text-align: center; padding: 12px 18px; } }

/* ==========================================================================
   MATN SAHIFASI (maxfiylik siyosati)
   ========================================================================== */
.prose { max-width: 780px; margin: 0 auto; font-family: var(--font-sans); color: var(--text-color); }
.prose h2 { font-family: var(--font-serif); color: var(--heading-color); font-size: 1.35rem; margin: 34px 0 12px; }
.prose p, .prose li { color: var(--text-muted); font-family: var(--font-sans); line-height: 1.75; }
.prose ul { padding-left: 20px; display: grid; gap: 6px; }
.prose .updated { font-size: 0.88rem; color: var(--text-muted); }

/* ==========================================================================
   OYNA (modal)
   ========================================================================== */
.modal-overlay { background: rgba(8, 15, 30, 0.62); backdrop-filter: blur(3px); }
.modal-box { border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }

/* ==========================================================================
   LOGIN
   ========================================================================== */
.login-body {
    background:
        radial-gradient(circle at 20% 15%, rgba(232, 163, 61, 0.18), transparent 40%),
        linear-gradient(135deg, var(--primary-strong), var(--primary-color));
    min-height: 100vh;
    height: auto;
}
.login-card { border-radius: var(--radius-lg); padding: 44px 34px; }
.login-card .logo { justify-content: center; margin-bottom: 18px; }

/* ==========================================================================
   ADMIN PANELI
   ========================================================================== */
.admin-body { background: var(--bg-color); }
.admin-header {
    background: linear-gradient(90deg, var(--primary-strong), var(--primary-color));
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}
.admin-header .logo h2 { font-family: var(--font-sans); font-weight: 700; letter-spacing: 0.3px; }
.admin-profile { font-family: var(--font-sans); font-size: 0.9rem; }
.logout-btn {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    padding: 7px 14px;
    border-radius: 999px;
}
.logout-btn:hover { background: rgba(255, 255, 255, 0.22); opacity: 1; }
.admin-sidebar { background: var(--card-bg); border-right: 1px solid var(--border); box-shadow: none; }
.admin-tabs .tab-group {
    padding: 14px 12px 6px;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--text-muted);
}
.tab-link { font-family: var(--font-sans); font-size: 0.93rem; padding: 10px 12px; color: var(--text-color); }
.tab-link i { width: 18px; text-align: center; color: var(--text-muted); }
.tab-link:hover { background: var(--primary-soft); color: var(--heading-color); }
.tab-link:hover i { color: var(--heading-color); }
.tab-link.active { background: var(--primary-color); color: #fff; }
.tab-link.active i { color: #fff; }
.badge-count { background: var(--secondary-color); font-family: var(--font-sans); font-weight: 700; }
.badge-count:empty, .badge-count[data-zero] { display: none; }
.admin-content { background: var(--bg-color); }
.tab-pane h2 { font-size: 1.55rem; color: var(--heading-color); }
.admin-stats-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.admin-stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
}
.admin-stat-card i {
    width: 48px; height: 48px;
    display: grid; place-items: center;
    border-radius: 14px;
    background: var(--primary-soft);
    color: var(--heading-color);
    font-size: 1.2rem;
}
.admin-stat-card h3 { font-family: var(--font-sans); font-size: 1.7rem; font-weight: 800; }
.admin-stat-card p { font-family: var(--font-sans); color: var(--text-muted); opacity: 1; }
a.admin-stat-card { text-decoration: none; color: inherit; transition: border-color 0.2s; }
a.admin-stat-card:hover { border-color: var(--primary-color); }

.admin-form-box, .admin-settings-form, .content-form {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}
.admin-settings-form { max-width: 520px; }
.admin-form-box h3 { font-family: var(--font-sans); font-size: 1.1rem; margin-bottom: 16px; color: var(--heading-color); }
.admin-form-box .form-actions, .form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.radio-row { display: flex; flex-wrap: wrap; gap: 18px; font-family: var(--font-sans); margin-bottom: 16px; }
.radio-row label { display: inline-flex; gap: 8px; align-items: center; font-weight: 500; }

.table-responsive {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.admin-table th {
    background: transparent;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}
.admin-table td { font-family: var(--font-sans); border-bottom: 1px solid var(--border); }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover td { background: color-mix(in srgb, var(--primary-soft) 45%, transparent); }
.action-btn { width: 34px; height: 34px; border-radius: 8px; }
.action-btn.edit { color: var(--info); }
.action-btn.delete { color: var(--danger); }
.action-btn:hover { background: var(--primary-soft); }

/* Murojaat / ariza kartochkalari */
.message-card-admin {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-left: 4px solid var(--border);
    border-radius: var(--radius);
    box-shadow: none;
    padding: 18px 20px;
    margin-bottom: 12px;
}
.message-card-admin.status-border-new { border-left-color: var(--info); }
.message-card-admin.status-border-in_progress { border-left-color: var(--warning); }
.message-card-admin.status-border-answered { border-left-color: var(--success); }
.message-card-admin.is-read { opacity: 1; }
.msg-header { gap: 10px; flex-wrap: wrap; }
.msg-header h4 { font-family: var(--font-sans); font-size: 1.02rem; margin-right: auto; }
.msg-date { font-family: var(--font-sans); color: var(--text-muted); opacity: 1; }
.msg-phone, .msg-email { font-family: var(--font-sans); }
.msg-phone { color: var(--text-color); font-weight: 500; }
.msg-text { font-family: var(--font-sans); color: var(--text-color); white-space: pre-line; }
.msg-actions { align-items: center; }
.msg-actions button, .msg-actions select, .content-image-reset {
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-color);
    font-family: var(--font-sans);
    font-size: 0.88rem;
    cursor: pointer;
}
.msg-actions button.primary { background: var(--primary-color); border-color: var(--primary-color); color: #fff; }
.msg-actions button.danger { border-color: color-mix(in srgb, var(--danger) 40%, transparent); color: var(--danger); }
.msg-actions .spacer { flex: 1; }
.list-empty {
    padding: 36px 20px;
    text-align: center;
    color: var(--text-muted);
    font-family: var(--font-sans);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
}
