@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@400;500;600;700;800&display=swap");

:root {
    --blue: #075fba;
    --blue-dark: #153f91;
    --blue-deeper: #123575;
    --green: #087047;
    --ink: #162136;
    --muted: #667085;
    --line: #e8edf5;
    --surface: #ffffff;
    --soft: #f5f8fc;
    --shadow: 0 10px 24px rgba(16, 24, 40, 0.09);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: #fff;
    font-family: "Noto Sans Thai", "Segoe UI", Tahoma, sans-serif;
    line-height: 1.6;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 82px;
    padding: 0 48px;
    background: var(--blue-dark);
    color: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.16);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-width: 230px;
}

.brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 2px solid rgba(255, 255, 255, 0.82);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
}

.brand-logo {
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #fff;
    object-fit: contain;
    padding: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}

.brand strong,
.brand small {
    display: block;
    line-height: 1.15;
}

.brand strong {
    font-size: 20px;
}

.brand small {
    color: rgba(255, 255, 255, 0.8);
    font-size: 10px;
    letter-spacing: 0;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 36px;
    font-size: 19px;
    font-weight: 700;
}

.admin-link {
    padding: 10px 18px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 6px;
    font-size: 15px;
}

.hero {
    position: relative;
    min-height: 400px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        linear-gradient(rgba(0, 95, 186, 0.92), rgba(0, 95, 186, 0.9)),
        radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.16), transparent 38%),
        var(--blue);
    color: #fff;
}

.hero.has-custom-bg {
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

.hero.has-custom-bg .hero-watermark {
    display: none;
}

.hero-watermark {
    position: absolute;
    inset: -80px 0 auto;
    height: 520px;
    opacity: 0.12;
    background: url("../img/moph.png") center / 520px no-repeat;
    filter: grayscale(1) brightness(2.4);
}

.hero-inner {
    position: relative;
    width: min(980px, calc(100% - 40px));
    text-align: center;
}

.hero p {
    margin: 0;
    font-size: clamp(22px, 2.4vw, 31px);
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.22);
}

.link-section {
    padding: 68px 20px 88px;
    background: #fff;
}

.link-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(160px, 1fr));
    gap: 20px;
    max-width: 1240px;
    margin: 0 auto;
}

.link-card {
    display: flex;
    min-height: 298px;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 22px 20px 20px;
    border: 1px solid #f0f2f5;
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 3px 12px rgba(16, 24, 40, 0.08);
    text-align: center;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.link-card:hover {
    transform: translateY(-4px);
    border-color: #cfe1f7;
    box-shadow: var(--shadow);
}

.link-card img {
    width: 116px;
    height: 116px;
    object-fit: contain;
}

.link-card h2 {
    display: grid;
    min-height: 54px;
    place-items: center;
    margin: 10px 0 8px;
    color: #0060bf;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.45;
}

.link-card p {
    margin: -2px 0 12px;
    color: var(--muted);
    font-size: 13px;
}

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border: 0;
    border-radius: 5px;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.primary-button {
    width: 100%;
    padding: 0 18px;
    background: var(--blue);
    color: #fff;
}

.primary-button:hover {
    background: var(--blue-dark);
}

.ghost-button {
    padding: 0 18px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--blue);
}

.site-footer {
    background: var(--blue-dark);
    color: #eef5ff;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr 1fr 1.15fr;
    gap: 44px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 34px 20px 30px;
}

.site-footer h2 {
    width: max-content;
    margin: 0 0 16px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.25);
    color: #b7d3ff;
    font-size: 19px;
    letter-spacing: 0;
}

.counter-list {
    margin: 0;
}

.counter-list div {
    display: grid;
    grid-template-columns: 1fr 84px;
    align-items: center;
    gap: 12px;
    margin-bottom: 1px;
}

.counter-list dt,
.counter-list dd {
    margin: 0;
}

.counter-list dd {
    padding: 0;
    background: transparent;
    text-align: right;
    font-weight: 800;
}

.footer-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-list li {
    overflow: hidden;
    padding: 6px 0;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.25);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.footer-list a {
    display: block;
    overflow: hidden;
    color: inherit;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.footer-list a:hover {
    color: #fff;
}

address {
    font-style: normal;
}

.copyright {
    margin: 0;
    padding: 16px 20px;
    background: color-mix(in srgb, var(--blue-dark) 82%, #000);
    text-align: center;
    font-size: 12px;
}

.cookie-consent {
    position: fixed;
    right: 50%;
    bottom: 24px;
    z-index: 30;
    display: flex;
    width: min(600px, calc(100% - 32px));
    align-items: center;
    gap: 20px;
    padding: 20px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
    transform: translateX(50%);
}

.cookie-consent p {
    margin: 0;
}

.cookie-consent a {
    color: var(--blue);
    font-weight: 800;
}

.cookie-consent button {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 0 18px;
    border: 0;
    border-radius: 24px;
    background: #ff7a1a;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.scroll-actions {
    position: fixed;
    right: 22px;
    bottom: 92px;
    z-index: 32;
    display: grid;
    gap: 10px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px) scale(0.96);
    transition: opacity 180ms ease, transform 180ms ease;
}

.scroll-actions.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.scroll-actions button {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.54);
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 12px 26px rgba(16, 24, 40, 0.2);
    transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.scroll-actions button:hover {
    background: var(--blue-dark);
    box-shadow: 0 16px 30px rgba(16, 24, 40, 0.26);
    transform: translateY(-3px);
}

.scroll-actions button:active {
    transform: translateY(0) scale(0.96);
}

.policy-page {
    padding: 58px 20px 76px;
    background: var(--soft);
}

.policy-content {
    max-width: 860px;
    margin: 0 auto;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(16, 24, 40, 0.07);
}

.policy-content h1 {
    margin: 0 0 18px;
    color: var(--blue-dark);
    font-size: clamp(28px, 3vw, 38px);
    line-height: 1.25;
}

.policy-content h2 {
    margin: 26px 0 8px;
    color: var(--blue);
    font-size: 20px;
}

.policy-content p {
    margin: 0 0 12px;
}

.policy-updated {
    margin-top: 28px !important;
    color: var(--muted);
    font-size: 14px;
}

.admin-body {
    min-height: 100vh;
    background:
        linear-gradient(135deg, rgba(7, 95, 186, 0.08), rgba(8, 112, 71, 0.08)),
        var(--soft);
}

.login-shell {
    position: relative;
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 22px;
    overflow: hidden;
    background:
        radial-gradient(circle at 16% 18%, rgba(15, 45, 89, 0.1), transparent 28%),
        radial-gradient(circle at 86% 10%, rgba(26, 64, 120, 0.12), transparent 32%),
        linear-gradient(135deg, #f3f7fb 0%, #e9f0f7 48%, #f8fafc 100%);
}

.login-shell::before {
    content: "";
    position: absolute;
    inset: auto -110px -170px auto;
    width: min(620px, 70vw);
    aspect-ratio: 1;
    background: url("../img/moph.png") center / contain no-repeat;
    opacity: 0.035;
    filter: grayscale(1);
    pointer-events: none;
}

.login-shell::after {
    content: "";
    position: absolute;
    inset: 10% auto auto 8%;
    width: 170px;
    aspect-ratio: 1;
    border: 1px solid rgba(15, 45, 89, 0.08);
    border-radius: 50%;
    box-shadow: 48px 34px 0 rgba(15, 45, 89, 0.04);
    pointer-events: none;
}

.login-card,
.editor-panel,
.table-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(16, 24, 40, 0.07);
}

.login-card {
    position: relative;
    z-index: 1;
    display: grid;
    width: min(820px, 100%);
    grid-template-columns: minmax(250px, 0.82fr) minmax(340px, 1.18fr);
    overflow: hidden;
    border-color: #d6e0ea;
    box-shadow: 0 18px 48px rgba(15, 45, 89, 0.14);
    animation: adminLoginEnter 520ms ease both;
}

.login-visual {
    position: relative;
    display: flex;
    min-height: 386px;
    flex-direction: column;
    justify-content: flex-end;
    padding: 28px;
    overflow: hidden;
    background: linear-gradient(145deg, #0f2d59 0%, #13426f 58%, #0b5f80 100%);
    color: #fff;
}

.login-visual::before {
    content: "";
    position: absolute;
    inset: -90px -80px auto auto;
    width: 280px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.login-visual::after {
    content: "";
    position: absolute;
    inset: 42px auto auto 50%;
    width: 238px;
    aspect-ratio: 1;
    background: url("../img/moph.png") center / contain no-repeat;
    opacity: 0.08;
    filter: brightness(0) invert(1);
    transform: translateX(-50%);
}

.login-visual img {
    position: relative;
    z-index: 1;
    width: 68px;
    height: 68px;
    margin-bottom: auto;
    border-radius: 50%;
    background: #fff;
    object-fit: contain;
    padding: 6px;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
}

.login-visual span,
.login-visual h2,
.login-visual p,
.login-visual a {
    position: relative;
    z-index: 1;
}

.login-visual span {
    margin-bottom: 8px;
    color: #d9e7f7;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.login-visual h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(22px, 2.1vw, 30px);
    line-height: 1.18;
}

.login-visual p {
    margin: 8px 0 18px;
    color: rgba(255, 255, 255, 0.82);
}

.login-visual a {
    display: inline-flex;
    width: max-content;
    min-height: 38px;
    align-items: center;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.52);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-weight: 800;
    transition: background 160ms ease, transform 160ms ease;
}

.login-visual a:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
}

.login-form {
    padding: 34px 36px;
    background: #fff;
}

.login-kicker {
    width: max-content;
    margin: 0 0 10px !important;
    padding: 5px 12px;
    border-radius: 999px;
    background: #eaf1f8;
    color: #0f2d59;
    font-size: 13px;
    font-weight: 800;
}

.login-card .login-kicker {
    color: #0f2d59;
}

.login-card h1,
.editor-panel h1,
.table-panel h2 {
    margin: 0 0 8px;
    font-size: 23px;
    line-height: 1.25;
}

.login-card h1 {
    color: #0b1f3a;
}

.login-card p {
    margin: 0 0 14px;
    color: var(--muted);
}

.login-card label,
.card-form label {
    display: grid;
    gap: 7px;
    margin-bottom: 11px;
    color: #24364f;
    font-weight: 700;
}

.login-submit {
    min-height: 50px;
    margin-top: 4px;
    background: #0f4f93;
    box-shadow: 0 12px 24px rgba(15, 79, 147, 0.22);
    transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.login-submit:hover {
    background: #0f2d59;
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(15, 45, 89, 0.28);
}

.login-submit:active {
    transform: translateY(0);
}

.card-form label small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
}

input,
textarea {
    width: 100%;
    border: 1px solid #ccd6e3;
    border-radius: 6px;
    padding: 11px 12px;
    color: var(--ink);
    font: inherit;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input:focus,
textarea:focus {
    border-color: color-mix(in srgb, var(--blue) 68%, #ccd6e3);
    background: #fff;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 12%, transparent);
    outline: 0;
}

input[type="color"] {
    min-height: 46px;
    padding: 5px;
    cursor: pointer;
}

textarea {
    resize: vertical;
}

.alert {
    margin: 12px 0;
    padding: 11px 13px;
    border-radius: 6px;
    font-weight: 700;
}

.alert.error {
    background: #fff1f0;
    color: #b42318;
}

.alert.success {
    background: #ecfdf3;
    color: #027a48;
}

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 28px;
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.admin-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: 286px 1fr;
}

.admin-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    height: 100vh;
    flex-direction: column;
    padding: 24px 18px;
    overflow-y: auto;
    background:
        linear-gradient(160deg, color-mix(in srgb, var(--blue) 92%, #000), rgba(18, 53, 117, 0.98)),
        var(--blue-dark);
    color: #fff;
    box-shadow: 16px 0 36px rgba(16, 24, 40, 0.16);
}

.admin-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 8px 22px;
}

.admin-sidebar-brand img {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #fff;
    object-fit: contain;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.admin-sidebar-brand strong,
.admin-sidebar-brand small {
    display: block;
    line-height: 1.2;
}

.admin-sidebar-brand strong {
    font-size: 16px;
}

.admin-sidebar-brand small {
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
}

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

.admin-side-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 48px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.82);
    font-weight: 800;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.admin-side-nav a span {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 11px;
}

.admin-side-nav a:hover,
.admin-side-nav a.active {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    transform: translateX(3px);
}

.admin-side-nav a.active span {
    background: #fff;
    color: var(--blue);
}

.admin-sidebar-footer {
    display: grid;
    gap: 8px;
    margin-top: auto;
    padding-top: 18px;
}

.admin-sidebar-footer a {
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.88);
    font-weight: 800;
    text-align: center;
}

.admin-workspace {
    min-width: 0;
    padding: 28px;
}

.admin-workspace-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.admin-workspace-head p {
    margin: 0 0 4px;
    color: var(--muted);
    font-weight: 700;
}

.admin-workspace-head h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.15;
}

.admin-preview-button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border-radius: 8px;
    background: #fff;
    color: var(--blue);
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(16, 24, 40, 0.08);
}

.admin-overview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.admin-metric-card {
    padding: 22px;
    border-radius: 8px;
    color: #fff;
    box-shadow: 0 14px 30px rgba(16, 24, 40, 0.13);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.admin-metric-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 36px rgba(16, 24, 40, 0.18);
}

.admin-metric-card span,
.admin-metric-card small {
    display: block;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 700;
}

.admin-metric-card strong {
    display: block;
    margin: 8px 0 4px;
    font-size: 38px;
    line-height: 1;
}

.accent-blue {
    background: linear-gradient(135deg, #075fba, #2f7de1);
}

.accent-green {
    background: linear-gradient(135deg, #087047, #21a67a);
}

.accent-orange {
    background: linear-gradient(135deg, #f97316, #f59e0b);
}

.admin-welcome-panel {
    max-width: 760px;
}

.admin-welcome-panel h2 {
    margin: 0 0 14px;
}

.admin-quick-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(160px, 1fr));
    gap: 12px;
}

.admin-quick-actions a {
    display: grid;
    min-height: 62px;
    place-items: center;
    border: 1px solid #d7e5f8;
    border-radius: 8px;
    background: #f8fbff;
    color: var(--blue);
    font-weight: 800;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.admin-quick-actions a:hover {
    transform: translateY(-2px);
    border-color: #8bbcf2;
    background: #eef6ff;
}

.admin-section-card {
    max-width: 980px;
    animation: adminPanelIn 220ms ease both;
}

@keyframes adminPanelIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes adminLoginEnter {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.admin-topbar strong,
.admin-topbar span {
    display: block;
}

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

.admin-topbar nav {
    display: flex;
    gap: 14px;
    color: var(--blue);
    font-weight: 800;
}

.admin-layout {
    display: grid;
    grid-template-columns: minmax(320px, 430px) 1fr;
    gap: 22px;
    max-width: 1220px;
    margin: 0 auto;
    padding: 26px 20px;
}

.admin-layout-wide {
    grid-template-columns: minmax(360px, 1.1fr) minmax(320px, 0.9fr);
}

.admin-table-full {
    grid-column: 1 / -1;
}

.editor-panel,
.table-panel {
    padding: 22px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.check-field {
    align-self: end;
    display: flex !important;
    min-height: 46px;
    align-items: center;
    grid-template-columns: auto 1fr;
    gap: 9px !important;
}

.check-field input {
    width: auto;
}

.icon-upload-panel {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 16px;
    align-items: start;
    margin-bottom: 14px;
    padding: 14px;
    border: 1px dashed #b8cde8;
    border-radius: 8px;
    background: #f8fbff;
}

.icon-upload-panel img {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: #fff;
    object-fit: contain;
    padding: 6px;
    box-shadow: 0 8px 18px rgba(16, 24, 40, 0.1);
}

.icon-upload-panel label:last-child {
    margin-bottom: 0;
}

.site-image-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

.site-image-field {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px dashed #b8cde8;
    border-radius: 8px;
    background: #f8fbff;
}

.site-image-field img {
    width: 100%;
    height: 132px;
    border-radius: 8px;
    background: #fff;
    object-fit: contain;
    padding: 8px;
    box-shadow: inset 0 0 0 1px rgba(16, 24, 40, 0.06);
}

.site-image-field label {
    margin-bottom: 0;
}

.form-actions {
    display: flex;
    gap: 10px;
}

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

.table-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

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

.table-panel-head p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

table {
    width: 100%;
    border-collapse: collapse;
}

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

th {
    color: #475467;
    font-size: 13px;
}

td small {
    display: block;
    max-width: 380px;
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status {
    display: inline-flex;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.status.on {
    background: #dcfae6;
    color: #067647;
}

.status.off {
    background: #f2f4f7;
    color: #475467;
}

.row-actions {
    display: flex;
    gap: 12px;
    white-space: nowrap;
}

.row-actions a,
.row-actions button {
    border: 0;
    background: transparent;
    color: var(--blue);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.row-actions button {
    color: #b42318;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 18px;
}

.pagination a {
    display: inline-flex;
    min-width: 40px;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border: 1px solid #d7e5f8;
    border-radius: 8px;
    background: #fff;
    color: var(--blue);
    font-weight: 800;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.pagination a:hover {
    transform: translateY(-2px);
    border-color: #8bbcf2;
    background: #eef6ff;
}

.pagination a.active {
    border-color: var(--blue);
    background: var(--blue);
    color: #fff;
}

.pagination a.disabled {
    pointer-events: none;
    opacity: 0.42;
}

@media (max-width: 1040px) {
    .site-header {
        min-height: 70px;
        padding: 0 22px;
    }

    .main-nav {
        gap: 18px;
        font-size: 16px;
    }

    .link-grid {
        grid-template-columns: repeat(3, minmax(170px, 1fr));
    }

    .footer-grid,
    .admin-layout {
        grid-template-columns: 1fr 1fr;
    }

    .admin-shell {
        grid-template-columns: 230px 1fr;
    }

    .admin-workspace {
        padding: 22px;
    }

    .admin-overview-grid,
    .admin-quick-actions {
        grid-template-columns: 1fr;
    }

    .login-card {
        width: min(760px, 100%);
        grid-template-columns: minmax(220px, 0.8fr) minmax(320px, 1.2fr);
    }

    .login-visual {
        min-height: 360px;
        padding: 24px;
    }

    .login-form {
        padding: 30px;
    }
}

@media (max-width: 720px) {
    .site-header,
    .admin-topbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        min-height: 0;
        padding: 14px 18px;
    }

    .brand {
        min-width: 0;
    }

    .main-nav {
        width: 100%;
        justify-content: space-between;
        gap: 10px;
        overflow-x: auto;
        font-size: 14px;
    }

    .brand-logo {
        width: 42px;
        height: 42px;
    }

    .brand strong {
        font-size: 15px;
    }

    .brand small {
        font-size: 8px;
    }

    .admin-link {
        position: absolute;
        right: 18px;
        top: 14px;
    }

    .hero {
        min-height: 300px;
    }

    .link-section {
        padding: 32px 12px 54px;
    }

    .link-grid,
    .footer-grid,
    .admin-layout,
    .form-row {
        grid-template-columns: 1fr;
    }

    .admin-shell {
        display: block;
    }

    .admin-sidebar {
        position: static;
        height: auto;
        padding: 16px;
    }

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

    .admin-side-nav a {
        min-height: 44px;
        font-size: 13px;
    }

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

    .admin-workspace {
        padding: 18px 14px;
    }

    .admin-workspace-head {
        align-items: stretch;
        flex-direction: column;
    }

    .icon-upload-panel {
        grid-template-columns: 1fr;
    }

    .site-image-grid {
        grid-template-columns: 1fr;
    }

    .link-card {
        min-height: 270px;
    }

    .cookie-consent {
        align-items: stretch;
        flex-direction: column;
    }

    .login-shell {
        min-height: 100svh;
        padding: 16px;
        overflow: auto;
    }

    .login-card {
        width: 100%;
        grid-template-columns: 1fr;
    }

    .login-visual {
        min-height: 190px;
        padding: 24px;
    }

    .login-visual::after {
        width: 220px;
    }

    .login-form {
        padding: 24px 22px 22px;
    }

    .login-card h1 {
        font-size: 22px;
    }
}
