/* Rasmiy kirish — davlat / kiber-xavfsizlik: chuqur ko‘k, teal, oltin, 3D kartochka */

@import url("https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,600;8..60,700&display=swap");

body:has(.login-page--official) {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Kirish sahifasida gerb faqat chap panelda — yuqori panelda takrorlanmasin */
body:has(.login-page--official) .app-global-bar__brand {
    display: none;
}

body:has(.login-page--official) .app-global-bar {
    justify-content: flex-end;
}

@media (max-width: 600px) {
    body:has(.login-page--official) .app-global-bar {
        justify-content: center;
    }
}

.login-page--official {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(380px, 1.05fr);
    font-family: "IBM Plex Sans", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.login-institution {
    position: relative;
    background:
        radial-gradient(ellipse 90% 70% at 20% 20%, rgba(34, 211, 238, 0.12), transparent 55%),
        radial-gradient(ellipse 60% 50% at 80% 60%, rgba(201, 162, 39, 0.08), transparent 45%),
        linear-gradient(165deg, #0a1628 0%, #0c4a6e 38%, #134e4a 100%);
    color: #f1f5f9;
    padding: clamp(2rem, 5vw, 3.5rem);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.login-institution::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 56px 56px;
    pointer-events: none;
    opacity: 0.65;
}

.login-institution::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(
        90deg,
        #c9a227 0%,
        #22d3ee 30%,
        #14b8a6 55%,
        #38bdf8 78%,
        #c9a227 100%
    );
    pointer-events: none;
}

.login-institution-inner {
    position: relative;
    z-index: 1;
    max-width: 36rem;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.login-seal {
    width: 100px;
    height: 100px;
    border: 3px solid rgba(251, 191, 36, 0.65);
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.75rem;
    padding: 7px;
    background:
        radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.22), transparent 52%),
        linear-gradient(155deg, rgba(255, 255, 255, 0.14), rgba(8, 145, 178, 0.14));
    box-shadow:
        0 10px 36px rgba(0, 0, 0, 0.38),
        inset 0 2px 0 rgba(255, 255, 255, 0.2),
        0 0 0 1px rgba(34, 211, 238, 0.25);
}

.login-seal__img {
    width: 100%;
    height: 100%;
    max-width: 82px;
    max-height: 82px;
    object-fit: contain;
    display: block;
    border-radius: 50%;
    background: transparent;
    padding: 0;
    box-sizing: border-box;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.28));
}

.login-republic {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.75);
    margin: 0 0 0.35rem;
}

.login-org {
    font-family: "Source Serif 4", "Times New Roman", serif;
    font-size: clamp(1.05rem, 2.2vw, 1.25rem);
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 1.25rem;
    color: #fff;
    max-width: 28rem;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.login-system-title {
    font-family: "Source Serif 4", "Times New Roman", serif;
    font-size: clamp(1.15rem, 2.5vw, 1.45rem);
    font-weight: 600;
    line-height: 1.45;
    margin: 0 0 1.5rem;
    color: rgba(255, 255, 255, 0.96);
    max-width: 32rem;
    border-left: 4px solid transparent;
    border-image: linear-gradient(180deg, #fbbf24, #14b8a6) 1;
    padding-left: 1rem;
}

.login-classification {
    font-size: 0.8125rem;
    color: rgba(203, 213, 225, 0.85);
    margin: 0;
    padding: 0.65rem 0.85rem;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 10px;
    max-width: 22rem;
    line-height: 1.5;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.login-institution-foot {
    position: relative;
    z-index: 1;
    font-size: 0.75rem;
    color: rgba(148, 163, 184, 0.65);
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(56, 189, 248, 0.15);
}

/* O‘ng panel */
.login-access {
    background:
        radial-gradient(ellipse 80% 60% at 100% 0%, rgba(14, 165, 233, 0.08), transparent 50%),
        linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 45%, #f8fafc 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 4vw, 3rem);
}

.login-access-card {
    width: 100%;
    max-width: 420px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid color-mix(in srgb, #0e7490 22%, #cbd5e1);
    border-radius: 16px;
    box-shadow:
        0 4px 6px -1px rgba(15, 39, 68, 0.06),
        0 20px 50px -12px rgba(14, 116, 144, 0.18),
        inset 0 1px 0 #fff;
    padding: clamp(1.75rem, 4vw, 2.5rem) clamp(1.5rem, 4vw, 2.25rem);
}

.login-access-card.login-official {
    border-top: 4px solid #0d9488;
}

.login-access-title {
    font-family: "Source Serif 4", serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.35rem;
    letter-spacing: -0.02em;
}

.login-access-sub {
    font-size: 0.8125rem;
    color: #64748b;
    margin: 0 0 1.75rem;
    line-height: 1.5;
}

.login-official .form-group {
    margin-bottom: 1.25rem;
}

.login-official .form-group label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #334155;
    margin-bottom: 0.45rem;
}

.login-official .form-group input {
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    padding: 0.85rem 1rem;
    font-size: 0.9375rem;
    box-shadow: inset 0 2px 4px rgba(15, 23, 42, 0.04);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-official .form-group input:focus {
    border-color: #0d9488;
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.2);
}

.login-btn--official {
    margin-top: 0.5rem;
    padding: 0.95rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 10px;
    background: linear-gradient(145deg, #0d9488 0%, #0f766e 45%, #0e7490 100%);
    border: none;
    box-shadow:
        0 4px 16px rgba(13, 148, 136, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
    color: #f8fafc;
    cursor: pointer;
    transition: transform 0.15s, filter 0.15s, box-shadow 0.15s;
}

.login-btn--official:hover {
    filter: brightness(1.06);
    transform: translateY(-2px);
    box-shadow:
        0 8px 24px rgba(13, 148, 136, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.login-2fa-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 0 0 1rem;
    padding: 0.65rem 0.85rem;
    background: linear-gradient(135deg, #ecfeff, #f0fdfa);
    border: 1px solid #99f6e4;
    border-radius: 10px;
    font-size: 0.8125rem;
    color: #0f766e;
    line-height: 1.5;
}

.login-2fa-notice i {
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.login-error--official {
    display: block;
    padding: 0.65rem 0.85rem;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border: 1px solid #fecaca;
    border-radius: 10px;
    color: #991b1b;
    font-weight: 600;
    font-size: 0.8125rem;
    margin-bottom: 1.25rem;
}

.login-secure-note {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e2e8f0;
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.5;
}

.login-secure-note i {
    color: #0d9488;
    margin-top: 0.1rem;
}

.login-dev-hint {
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: #94a3b8;
}

.login-dev-hint summary {
    cursor: pointer;
    color: #475569;
    font-weight: 500;
}

.login-dev-hint[open] summary {
    margin-bottom: 0.5rem;
}

.login-dev-hint code {
    font-size: 0.7rem;
    background: #e0f2fe;
    color: #0c4a6e;
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
}

html[data-theme="light"] body:has(.login-page--official) {
    background: #dbeafe;
}

html[data-theme="dark"] body:has(.login-page--official) {
    background: #020617;
}

html[data-theme="dark"] .login-access {
    background:
        radial-gradient(ellipse 70% 50% at 0% 100%, rgba(45, 212, 191, 0.06), transparent 45%),
        linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
}

html[data-theme="dark"] .login-access-card.login-official {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border-color: #334155;
    border-top-color: #2dd4bf;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .login-access-title,
html[data-theme="dark"] .login-access-sub {
    color: #f1f5f9;
}

html[data-theme="dark"] .login-access-sub {
    color: #94a3b8;
}

html[data-theme="dark"] .login-access .form-group label {
    color: #cbd5e1;
}

html[data-theme="dark"] .login-access input {
    background: #0f172a;
    border-color: #475569;
    color: #f1f5f9;
}

html[data-theme="dark"] .login-btn--official {
    background: linear-gradient(145deg, #2dd4bf, #0d9488);
    color: #0f172a;
    box-shadow: 0 4px 20px rgba(45, 212, 191, 0.35);
}

html[data-theme="dark"] .login-secure-note {
    border-top-color: #334155;
    color: #94a3b8;
}

html[data-theme="dark"] .login-2fa-notice {
    background: linear-gradient(135deg, #134e4a, #0f172a);
    border-color: #2dd4bf;
    color: #99f6e4;
}

html[data-theme="dark"] .login-dev-hint code {
    background: #134e4a;
    color: #99f6e4;
}

@media (max-width: 900px) {
    .login-page--official {
        grid-template-columns: 1fr;
    }

    .login-institution {
        min-height: auto;
        padding: 1.75rem 1.5rem;
    }

    .login-institution-foot {
        margin-top: 1.25rem;
        padding-top: 1rem;
    }

    .login-seal {
        width: 80px;
        height: 80px;
        margin-bottom: 1.25rem;
        padding: 6px;
    }

    .login-seal__img {
        max-width: 66px;
        max-height: 66px;
        padding: 0;
    }
}
