:root {
    --blue: #0a5fb4;
    --blue-dark: #063f83;
    --cyan: #18a6c9;
    --red: #c82127;
    --ink: #172033;
    --muted: #667085;
    --line: #d9e2ef;
    --bg: #f4f7fb;
    --white: #fff;
    --shadow: 0 16px 42px rgba(16, 42, 86, 0.13);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
    line-height: 1.65;
    background: var(--bg);
}

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

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 20px rgba(20, 52, 95, 0.05);
}

.nav-wrap {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    display: block;
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    color: var(--muted);
    font-size: 12px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.main-nav a {
    padding: 26px 16px;
    color: #24324b;
    font-weight: 700;
    border-top: 3px solid transparent;
}

.main-nav a:hover {
    color: var(--blue);
    border-top-color: var(--red);
}

.main-nav a.active {
    color: var(--blue);
    border-top-color: var(--red);
}

.main-nav .lang-link {
    margin-left: 8px;
    padding: 8px 14px;
    color: var(--blue);
    border: 1px solid var(--line);
    border-radius: 6px;
}

.main-nav .admin-link {
    padding: 8px 14px;
    color: var(--white);
    background: var(--blue);
    border-radius: 6px;
    border-top: 0;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    background: var(--white);
    border-radius: 6px;
    font-size: 22px;
}

.hero {
    color: var(--white);
    background:
        linear-gradient(110deg, rgba(5, 47, 98, 0.95), rgba(10, 95, 180, 0.84)),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.26), transparent 28%),
        linear-gradient(135deg, #0b61b5, #0b3c7b);
}

.hero-grid {
    min-height: 520px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 48px;
    padding: 72px 0 84px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--red);
    font-weight: 800;
    letter-spacing: 0;
}

.hero .eyebrow {
    color: #ffd65a;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    max-width: 720px;
    margin-bottom: 22px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.16;
    letter-spacing: 0;
}

h2 {
    margin-bottom: 14px;
    font-size: 30px;
    line-height: 1.25;
    letter-spacing: 0;
}

.hero-copy p:not(.eyebrow) {
    max-width: 680px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
}

.home-hero-grid {
    grid-template-columns: 1fr;
}

.home-hero-grid .hero-copy {
    max-width: 820px;
}

.hero-actions,
.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0 22px;
    border: 0;
    border-radius: 6px;
    font-weight: 800;
    cursor: pointer;
}

.btn-primary {
    color: var(--white);
    background: var(--red);
}

.btn-light {
    color: var(--blue-dark);
    background: var(--white);
}

.btn-ghost {
    color: var(--blue);
    background: #eef6ff;
}

.btn:disabled {
    cursor: wait;
    opacity: 0.72;
}

.hero-panel {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.hero-panel div {
    min-height: 128px;
    padding: 26px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 8px;
    backdrop-filter: blur(8px);
}

.hero-panel strong {
    display: block;
    margin-bottom: 8px;
    font-size: 34px;
    line-height: 1;
}

.hero-panel span {
    color: rgba(255, 255, 255, 0.86);
}

.service-band {
    margin-top: -42px;
    padding-bottom: 36px;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.service-card {
    min-height: 220px;
    padding: 28px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.service-card:hover {
    transform: translateY(-3px);
    transition: transform 0.2s ease;
}

.service-icon {
    display: grid;
    width: 46px;
    height: 46px;
    margin-bottom: 18px;
    place-items: center;
    color: var(--white);
    background: var(--blue);
    border-radius: 8px;
    font-weight: 900;
}

.service-card:nth-child(2) .service-icon {
    background: var(--cyan);
}

.service-card:nth-child(3) .service-icon {
    background: var(--red);
}

.service-card:nth-child(4) .service-icon {
    background: var(--blue-dark);
}

.service-card h2 {
    font-size: 22px;
}

.service-card p,
.section-copy p,
.content-section p,
.about-section p {
    color: var(--muted);
}

.query-section,
.content-section,
.about-section {
    padding: 72px 0;
    background: var(--white);
}

.query-grid {
    display: grid;
    grid-template-columns: 0.78fr 1.22fr;
    gap: 48px;
    align-items: start;
}

.query-box {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 20px;
}

.query-form,
.result-card,
.list-panel,
.job-grid article {
    padding: 24px;
    background: #f8fbff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.query-form label {
    display: block;
    margin-bottom: 16px;
    font-weight: 800;
}

.query-form span {
    display: block;
    margin-bottom: 8px;
}

.query-form input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid #c8d5e5;
    border-radius: 6px;
    font: inherit;
}

.query-form input:focus {
    outline: 2px solid rgba(24, 166, 201, 0.24);
    border-color: var(--cyan);
}

.result-card {
    min-height: 255px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-card.has-error {
    color: var(--red);
    background: #fff7f7;
}

.result-card.has-data {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 20px;
    align-items: start;
    justify-content: stretch;
}

.cert-photo img {
    width: 120px;
    height: 150px;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--white);
}

.cert-info {
    margin: 0;
}

.cert-info div {
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
}

.cert-info dt {
    color: var(--muted);
    font-size: 13px;
}

.cert-info dd {
    margin: 2px 0 0;
    font-weight: 800;
}

.content-section.alt {
    background: #edf4fb;
}

.split-layout,
.cooperation {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 44px;
    align-items: center;
}

.list-panel {
    display: grid;
    gap: 12px;
}

.list-panel article,
.job-grid article {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}

.list-panel article:last-child {
    border-bottom: 0;
}

.list-panel span,
.job-grid span {
    color: var(--muted);
}

.job-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.job-grid article {
    min-height: 104px;
    flex-direction: column;
    justify-content: center;
}

.cooperation {
    padding: 34px;
    color: var(--white);
    background: linear-gradient(120deg, var(--blue-dark), var(--blue));
    border-radius: 8px;
}

.cooperation .eyebrow,
.cooperation p {
    color: rgba(255, 255, 255, 0.86);
}

.about-section {
    background: var(--white);
}

.about-section .container {
    max-width: 840px;
    text-align: center;
}

.site-footer {
    padding: 26px 0;
    color: rgba(255, 255, 255, 0.78);
    text-align: center;
    background: #102b4f;
}

@media (max-width: 900px) {
    .nav-toggle {
        display: inline-grid;
        place-items: center;
    }

    .main-nav {
        position: absolute;
        top: 76px;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 8px 16px 18px;
        background: var(--white);
        border-bottom: 1px solid var(--line);
    }

    .main-nav.is-open {
        display: flex;
    }

    .main-nav a,
    .main-nav .lang-link {
        margin: 0;
        padding: 12px 10px;
        border-top: 0;
        border-bottom: 1px solid var(--line);
    }

    .hero-grid,
    .query-grid,
    .query-box,
    .split-layout,
    .cooperation {
        grid-template-columns: 1fr;
    }

    .service-grid,
    .job-grid {
        grid-template-columns: 1fr;
    }

    .hero-grid {
        min-height: auto;
        padding: 56px 0 82px;
    }
}

@media (max-width: 560px) {
    .brand small {
        display: none;
    }

    .hero-panel,
    .result-card.has-data {
        grid-template-columns: 1fr;
    }

    .hero-panel div {
        min-height: 106px;
    }

    .list-panel article {
        display: block;
    }
}

.portal-stats {
    margin-top: -42px;
    position: relative;
    z-index: 3;
}

.portal-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.portal-stats-grid article {
    min-height: 116px;
    display: grid;
    place-items: center;
    text-align: center;
    border-right: 1px solid var(--line);
}

.portal-stats-grid article:last-child {
    border-right: 0;
}

.portal-stats-grid strong {
    color: var(--blue);
    font-size: 32px;
    line-height: 1;
}

.portal-stats-grid span {
    color: var(--muted);
    font-weight: 800;
}

.portal-services {
    padding: 66px 0 72px;
    background: var(--white);
}

.section-title-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.section-title-row h2 {
    margin-bottom: 0;
}

.section-title-row > span {
    color: var(--muted);
    font-weight: 700;
}

.portal-services .service-grid {
    grid-template-columns: repeat(4, 1fr);
}

.portal-services .service-card {
    min-height: 250px;
    box-shadow: 0 10px 28px rgba(16, 42, 86, 0.08);
}

.portal-main-blocks {
    padding: 72px 0;
    background: #edf4fb;
}

.portal-two-col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}

.portal-panel {
    padding: 26px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 18px;
    border-bottom: 2px solid var(--line);
}

.panel-head h2 {
    margin-bottom: 0;
}

.panel-head > span {
    padding: 5px 10px;
    color: var(--blue);
    background: #eaf4ff;
    border-radius: 5px;
    font-weight: 900;
}

.portal-list {
    display: grid;
    gap: 0;
}

.portal-list article {
    display: grid;
    gap: 4px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}

.portal-list article:last-child {
    border-bottom: 0;
}

.portal-list strong {
    color: var(--ink);
    font-size: 17px;
}

.portal-list span {
    color: var(--muted);
}

.portal-news {
    padding: 72px 0 86px;
    background: var(--white);
}

.news-layout {
    display: grid;
    grid-template-columns: 0.95fr 1.35fr;
    gap: 22px;
}

.news-feature,
.news-list {
    background: #f8fbff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.news-feature {
    min-height: 310px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.news-feature span,
.news-list span {
    color: var(--red);
    font-weight: 900;
    font-size: 13px;
}

.news-feature h3 {
    margin: 14px 0;
    font-size: 26px;
    line-height: 1.3;
}

.news-feature p {
    color: var(--muted);
}

.news-feature time,
.news-list time {
    color: var(--muted);
    font-size: 13px;
}

.news-list {
    padding: 10px 24px;
}

.news-list article {
    display: grid;
    grid-template-columns: 86px 1fr 108px;
    align-items: center;
    gap: 16px;
    min-height: 62px;
    border-bottom: 1px solid var(--line);
}

.news-list article:last-child {
    border-bottom: 0;
}

.news-list strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .portal-stats-grid,
    .portal-services .service-grid,
    .portal-two-col,
    .news-layout {
        grid-template-columns: 1fr;
    }

    .portal-stats-grid article {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .portal-stats-grid article:last-child {
        border-bottom: 0;
    }

    .section-title-row {
        display: block;
    }
}

@media (max-width: 560px) {
    .news-list article {
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 14px 0;
    }

    .news-list strong {
        white-space: normal;
    }
}

/* Enterprise polish */
:root {
    --navy: #102b4f;
    --gold: #d7a33a;
    --surface: #ffffff;
    --soft-blue: #eef6ff;
}

body {
    background:
        linear-gradient(180deg, #f7faff 0%, #eef3f8 100%);
}

.site-header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(10, 95, 180, 0.14);
}

.brand strong {
    font-size: 18px;
    color: var(--navy);
}

.main-nav a {
    position: relative;
    border-top: 0;
}

.main-nav a::after {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 18px;
    height: 3px;
    content: "";
    background: transparent;
    border-radius: 3px;
}

.main-nav a:hover,
.main-nav a.active {
    border-top-color: transparent;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    background: linear-gradient(90deg, var(--red), var(--gold));
}

.main-nav .lang-link::after {
    display: none;
}

.hero {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(110deg, rgba(8, 36, 74, 0.96), rgba(8, 86, 164, 0.88)),
        linear-gradient(135deg, #0b61b5, #0b3c7b);
}

.hero::before {
    position: absolute;
    inset: auto -10% -32% 36%;
    height: 320px;
    content: "";
    background:
        repeating-linear-gradient(90deg, rgba(255,255,255,.18) 0 1px, transparent 1px 42px),
        repeating-linear-gradient(0deg, rgba(255,255,255,.1) 0 1px, transparent 1px 42px);
    transform: rotate(-8deg);
}

.hero-copy {
    position: relative;
    z-index: 1;
}

.hero-copy h1 {
    text-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

.btn {
    box-shadow: 0 10px 24px rgba(16, 42, 86, 0.12);
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(16, 42, 86, 0.18);
}

.btn-primary {
    background: linear-gradient(135deg, #c82127, #e34b50);
}

.portal-stats-grid,
.portal-panel,
.service-card,
.news-feature,
.news-list,
.query-form,
.result-card,
.public-form,
.admin-card,
.admin-stats article,
.admin-quick-grid a {
    border-color: rgba(10, 95, 180, 0.14);
}

.portal-stats-grid {
    overflow: hidden;
}

.portal-stats-grid article {
    background:
        linear-gradient(180deg, #ffffff, #f8fbff);
}

.portal-stats-grid strong {
    font-size: 36px;
    font-weight: 900;
}

.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    content: "";
    background: linear-gradient(90deg, var(--blue), var(--cyan), var(--red));
}

.portal-panel,
.news-feature,
.news-list {
    box-shadow: 0 18px 42px rgba(16, 42, 86, 0.08);
}

.panel-head {
    border-bottom-color: rgba(10, 95, 180, 0.14);
}

.portal-list article:hover,
.news-list article:hover {
    background: linear-gradient(90deg, rgba(10, 95, 180, 0.06), transparent);
}

.news-feature {
    background:
        linear-gradient(135deg, #f8fbff, #ffffff);
}

.site-footer {
    background: linear-gradient(135deg, #0c2444, #102b4f);
}

.login-body {
    background:
        linear-gradient(120deg, rgba(6, 34, 70, .96), rgba(8, 86, 164, .88)),
        #0b4f9a;
}

.login-shell {
    width: min(1040px, calc(100% - 32px));
    min-height: 610px;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 12px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.login-brand-panel {
    position: relative;
    padding: 54px;
    color: var(--white);
    background:
        linear-gradient(135deg, rgba(16, 43, 79, .94), rgba(10, 95, 180, .84));
}

.login-brand-panel img {
    width: 96px;
    height: 96px;
    margin-bottom: 30px;
}

.login-brand-panel p {
    color: #ffd65a;
    font-weight: 900;
    text-transform: uppercase;
}

.login-brand-panel h1 {
    max-width: 520px;
    font-size: 42px;
}

.login-feature-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 46px;
}

.login-feature-grid span {
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-weight: 800;
}

.login-panel {
    width: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px;
    border-radius: 0;
    box-shadow: none;
}

.login-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.login-title img {
    width: 58px;
    height: 58px;
    margin: 0;
}

.login-title h2 {
    margin: 0;
    font-size: 26px;
}

.captcha-row {
    display: grid;
    grid-template-columns: 1fr 128px;
    gap: 10px;
}

.captcha-button {
    padding: 0;
    border: 1px solid #c8d5e5;
    border-radius: 8px;
    background: var(--white);
    cursor: pointer;
}

.captcha-button img {
    display: block;
    width: 120px;
    height: 42px;
    margin: 0 auto;
}

.admin-body {
    background:
        linear-gradient(180deg, #f6f9fd 0%, #edf3f9 100%);
}

.admin-sidebar {
    background:
        linear-gradient(180deg, #102b4f 0%, #0c213d 100%);
    box-shadow: 16px 0 40px rgba(16, 42, 86, 0.14);
}

.admin-brand span {
    display: grid;
}

.admin-brand strong {
    color: var(--white);
}

.admin-brand small {
    color: rgba(255, 255, 255, 0.56);
    font-size: 11px;
}

.admin-sidebar nav a {
    position: relative;
    font-weight: 800;
}

.admin-sidebar nav a.active {
    background: linear-gradient(90deg, rgba(10, 95, 180, .9), rgba(24, 166, 201, .42));
}

.admin-sidebar nav a.active::before {
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 3px;
    content: "";
    background: #ffd65a;
    border-radius: 3px;
}

.admin-main {
    padding: 28px 32px;
}

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(10, 95, 180, 0.12);
    border-radius: 12px;
    box-shadow: 0 14px 36px rgba(16, 42, 86, 0.08);
}

.admin-topbar p {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.admin-topbar h1 {
    margin: 0;
}

.admin-top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-top-actions a,
.admin-top-actions span {
    padding: 8px 12px;
    background: #f4f8fd;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--navy);
    font-weight: 800;
}

.admin-stats article {
    position: relative;
    overflow: hidden;
}

.admin-quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 18px;
}

.admin-quick-grid a {
    display: grid;
    gap: 8px;
    padding: 20px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 10px 26px rgba(16, 42, 86, 0.07);
}

.admin-quick-grid strong {
    color: var(--blue);
    font-size: 18px;
}

.admin-quick-grid span {
    color: var(--muted);
    font-size: 14px;
}

.admin-card,
.admin-stats article {
    border-radius: 12px;
}

.admin-table th {
    color: var(--navy);
    background: #eef6ff;
}

.admin-table tbody tr:hover {
    background: #f8fbff;
}

@media (max-width: 1000px) {
    .login-shell,
    .admin-quick-grid {
        grid-template-columns: 1fr;
    }

    .login-brand-panel {
        padding: 34px;
    }
}

@media (max-width: 900px) {
    .admin-topbar {
        display: grid;
    }
}

@media (max-width: 560px) {
    .login-panel {
        padding: 28px;
    }

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

    .login-feature-grid {
        grid-template-columns: 1fr;
    }
}

.page-hero {
    padding: 78px 0;
    color: var(--white);
    background:
        linear-gradient(110deg, rgba(5, 47, 98, 0.95), rgba(10, 95, 180, 0.86)),
        linear-gradient(135deg, #0b61b5, #0b3c7b);
}

.page-hero h1 {
    margin-bottom: 14px;
}

.page-hero p:not(.eyebrow) {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
}

.section-head {
    margin-bottom: 28px;
}

.section-head p {
    max-width: 760px;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.course-card,
.empty-card {
    min-height: 210px;
    padding: 24px;
    background: #f8fbff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.course-card span {
    display: inline-flex;
    margin-bottom: 14px;
    padding: 4px 10px;
    color: var(--blue);
    background: #eaf4ff;
    border-radius: 5px;
    font-weight: 800;
    font-size: 13px;
}

.course-card h3 {
    margin: 0 0 10px;
    font-size: 20px;
}

.course-card p {
    color: var(--muted);
}

.course-card strong {
    color: var(--red);
}

.form-page {
    max-width: 900px;
}

.public-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    padding: 28px;
    background: #f8fbff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.public-form label,
.admin-form label,
.login-panel label {
    display: block;
    font-weight: 800;
}

.public-form label span,
.admin-form label span,
.login-panel label span {
    display: block;
    margin-bottom: 8px;
}

.public-form input,
.public-form textarea,
.admin-form input,
.admin-form textarea,
.admin-form select,
.login-panel input,
.inline-form select {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid #c8d5e5;
    border-radius: 6px;
    font: inherit;
    background: var(--white);
}

.public-form textarea,
.admin-form textarea {
    padding: 10px 12px;
    resize: vertical;
}

.public-form .full,
.admin-form .full {
    grid-column: 1 / -1;
}

.notice {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 6px;
    background: #eef8f0;
    color: #157347;
    border: 1px solid #bfe6ca;
}

.notice.error {
    background: #fff2f2;
    color: var(--red);
    border-color: #ffd2d2;
}

.about-copy {
    max-width: 840px;
    text-align: center;
}

.about-values {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 28px;
}

.about-values article {
    padding: 20px;
    background: #f8fbff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.site-footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.9);
}

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        linear-gradient(120deg, rgba(5, 47, 98, 0.92), rgba(10, 95, 180, 0.86)),
        #0b4f9a;
}

.login-panel {
    width: min(420px, 100%);
    padding: 34px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.login-panel img {
    width: 76px;
    height: 76px;
    display: block;
    margin-bottom: 14px;
}

.login-panel h1 {
    margin-bottom: 6px;
    color: var(--ink);
    font-size: 26px;
}

.login-panel p {
    color: var(--muted);
}

.login-panel label {
    margin-bottom: 14px;
}

.login-panel .btn {
    width: 100%;
}

.admin-body {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 248px 1fr;
    background: #eef3f8;
}

.admin-sidebar {
    min-height: 100vh;
    padding: 20px 16px;
    color: var(--white);
    background: #0f2d52;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 8px 22px;
    color: var(--white);
    font-weight: 900;
}

.admin-brand img {
    width: 42px;
    height: 42px;
}

.admin-sidebar nav {
    display: grid;
    gap: 8px;
}

.admin-sidebar nav a {
    padding: 12px 14px;
    color: rgba(255, 255, 255, 0.86);
    border-radius: 6px;
}

.admin-sidebar nav a:hover,
.admin-sidebar nav a.active {
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
}

.admin-main {
    padding: 24px;
}

.admin-topbar {
    margin-bottom: 20px;
}

.admin-topbar h1 {
    color: var(--ink);
    font-size: 28px;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 18px;
}

.admin-stats article,
.admin-card {
    padding: 22px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 26px rgba(16, 42, 86, 0.08);
}

.admin-stats strong {
    display: block;
    color: var(--blue);
    font-size: 34px;
}

.admin-stats span {
    color: var(--muted);
}

.admin-card {
    margin-bottom: 18px;
}

.admin-card h2 {
    font-size: 22px;
}

.admin-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.admin-form .check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.admin-form .check-row input {
    width: auto;
    min-height: auto;
}

.table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 860px;
}

.admin-table th,
.admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.admin-table th {
    color: #344054;
    background: #f7f9fc;
}

.table-photo {
    width: 48px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--line);
}

.table-actions,
.inline-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-actions form {
    margin: 0;
}

.table-actions button,
.inline-form button {
    padding: 4px 8px;
    color: var(--red);
    background: transparent;
    border: 1px solid #ffd2d2;
    border-radius: 4px;
    cursor: pointer;
}

.table-actions a {
    color: var(--blue);
    font-weight: 800;
}

.inline-form button {
    color: var(--blue);
    border-color: var(--line);
}

@media (max-width: 900px) {
    .course-grid,
    .public-form,
    .about-values,
    .admin-form,
    .admin-stats {
        grid-template-columns: 1fr;
    }

    .admin-body {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        min-height: auto;
    }

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

    .main-nav .admin-link {
        padding: 12px 10px;
    }
}

@media (max-width: 560px) {
    .site-footer .container,
    .admin-sidebar nav {
        display: grid;
        grid-template-columns: 1fr;
    }
}

/* Refined public experience */
.main-nav .lang-link {
    min-width: 104px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-left: 12px;
    padding: 6px 12px;
    color: var(--navy);
    background: linear-gradient(180deg, #ffffff, #f4f8fd);
    border: 1px solid rgba(10, 95, 180, 0.18);
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(16, 42, 86, 0.08);
}

.main-nav .lang-link span {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    color: var(--white);
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    border-radius: 50%;
    font-size: 12px;
    font-weight: 900;
}

.main-nav .lang-link strong {
    font-size: 13px;
    line-height: 1;
}

.main-nav .lang-link:hover {
    color: var(--blue-dark);
    border-color: rgba(10, 95, 180, 0.34);
    transform: translateY(-1px);
}

.main-nav .lang-link:hover::after,
.main-nav .lang-link::after {
    display: none;
}

.site-footer .container {
    justify-content: center;
}

.certificate-workspace {
    padding: 84px 0 96px;
    background:
        linear-gradient(180deg, #ffffff 0%, #f4f8fd 100%);
}

.certificate-verify-shell {
    display: grid;
    grid-template-columns: minmax(280px, 0.72fr) minmax(520px, 1.28fr);
    gap: 28px;
    align-items: stretch;
}

.certificate-guide,
.certificate-query-box {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(10, 95, 180, 0.14);
    border-radius: 14px;
    box-shadow: 0 22px 55px rgba(16, 42, 86, 0.1);
}

.certificate-guide {
    padding: 34px;
    background:
        linear-gradient(160deg, rgba(16, 43, 79, .96), rgba(10, 95, 180, .9));
    color: var(--white);
}

.certificate-guide h2 {
    margin-bottom: 12px;
    font-size: 32px;
}

.certificate-guide p {
    color: rgba(255, 255, 255, 0.82);
}

.guide-badge {
    display: inline-flex;
    margin-bottom: 18px;
    padding: 6px 12px;
    color: #ffd65a;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
}

.guide-steps {
    display: grid;
    gap: 12px;
    margin-top: 32px;
}

.guide-steps article {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.11);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
}

.guide-steps strong {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: var(--navy);
    background: #ffd65a;
    border-radius: 8px;
}

.guide-steps span {
    font-weight: 800;
}

.certificate-query-box {
    display: grid;
    grid-template-columns: minmax(280px, 0.95fr) minmax(300px, 1.05fr);
    gap: 0;
    overflow: hidden;
}

.certificate-query-box .query-form,
.certificate-query-box .result-card {
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.certificate-query-box .query-form {
    padding: 34px;
    background: var(--white);
    border-right: 1px solid rgba(10, 95, 180, 0.12);
}

.certificate-query-box .query-form label {
    margin-bottom: 20px;
}

.certificate-query-box .query-form input {
    height: 52px;
    border-radius: 10px;
    background: #fbfdff;
}

.certificate-query-box .result-card {
    min-height: 390px;
    padding: 34px;
    background:
        linear-gradient(180deg, #f8fbff, #ffffff);
}

.certificate-query-box .result-card.is-empty,
.certificate-query-box .result-card.is-loading {
    color: var(--muted);
    text-align: center;
}

.certificate-query-box .result-card.is-empty::before {
    display: block;
    width: 74px;
    height: 74px;
    margin: 0 auto 16px;
    content: "";
    background: url("../img/logo.svg") center / contain no-repeat;
    opacity: .32;
}

.certificate-query-box .result-card.has-data {
    grid-template-columns: 132px 1fr;
    gap: 24px;
    align-content: center;
}

.certificate-query-box .cert-photo img {
    width: 132px;
    height: 168px;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(16, 42, 86, 0.12);
}

.certificate-query-box .cert-info div {
    padding: 10px 0;
}

@media (max-width: 980px) {
    .certificate-verify-shell,
    .certificate-query-box {
        grid-template-columns: 1fr;
    }

    .certificate-query-box .query-form {
        border-right: 0;
        border-bottom: 1px solid rgba(10, 95, 180, 0.12);
    }
}

@media (max-width: 900px) {
    .main-nav .lang-link {
        justify-content: flex-start;
        width: 100%;
        min-width: 0;
        border-radius: 8px;
    }
}
