:root {
    --bg: #f2f7fb;
    --surface: #ffffff;
    --surface-soft: #e9fff5;
    --text: #102029;
    --muted: #586c78;
    --line: #d6e6ec;
    --primary: #039b7c;
    --primary-dark: #006b59;
    --secondary: #0b73ff;
    --secondary-dark: #0757c1;
    --accent: #ff8a3d;
    --accent-soft: #fff2e6;
    --mint: #65e4b5;
    --teal: #0a8f8a;
    --danger: #a73535;
    --success: #207245;
    --radius: 12px;
    --radius-lg: 22px;
    --shadow: 0 22px 55px rgba(16, 32, 41, 0.13);
    --shadow-soft: 0 14px 32px rgba(3, 155, 124, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: light;
}

body {
    margin: 0;
    background:
        linear-gradient(180deg, #ffffff 0, #effbf7 210px, var(--bg) 560px),
        linear-gradient(90deg, rgba(3, 155, 124, 0.05), rgba(11, 115, 255, 0.05)),
        var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.55;
}

a {
    color: var(--primary-dark);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(182, 95, 42, 0.45);
    outline-offset: 2px;
}

img,
svg {
    max-width: 100%;
}

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

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

.narrow {
    width: min(760px, calc(100% - 32px));
}

.site-header,
.admin-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(214, 230, 236, 0.8);
    box-shadow: 0 10px 32px rgba(16, 32, 41, 0.06);
    backdrop-filter: blur(14px);
}

.site-header::before,
.admin-header::before {
    content: "";
    display: block;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary), var(--primary), var(--mint));
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 700;
}

.brand:hover {
    text-decoration: none;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: #fff;
    box-shadow: 0 14px 28px rgba(11, 115, 255, 0.24);
}

img.brand-mark {
    display: block;
    object-fit: cover;
    background: transparent;
}

.main-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 14px;
}

.main-nav a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 7px 10px;
    border-radius: 999px;
    font-weight: 700;
}

.main-nav a:hover {
    background: var(--surface-soft);
    text-decoration: none;
}

.main-nav .nav-cta {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    box-shadow: 0 12px 24px rgba(3, 155, 124, 0.18);
}

.main-nav .nav-cta img,
.button.primary .button-icon {
    filter: brightness(0) invert(1);
}

.main-nav .nav-cta:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary-dark));
}

.notice {
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(135deg, #edfff8, #ffffff);
    color: var(--text);
}

.notice.emergency {
    border: 0;
    border-radius: 0;
    background: linear-gradient(90deg, #fff4e9, #fffaf2);
    color: #5d2c13;
    font-size: 14px;
}

.emergency-inline,
.hero-notice {
    margin-top: 18px;
}

.breadcrumbs {
    padding-top: 18px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 14px;
    color: var(--muted);
}

.flash-wrap {
    margin-top: 18px;
}

.flash {
    margin-bottom: 10px;
    padding: 12px 14px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
}

.flash.success {
    border-color: rgba(32, 114, 69, 0.35);
    color: var(--success);
}

.flash.error {
    border-color: rgba(167, 53, 53, 0.35);
    color: var(--danger);
}

.hero {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(11, 115, 255, 0.13) 0%, rgba(3, 155, 124, 0.17) 52%, rgba(101, 228, 181, 0.25) 100%),
        linear-gradient(180deg, #ffffff 0%, #e9fff7 100%);
    border-bottom: 1px solid var(--line);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(115deg, rgba(0, 107, 89, 0.12), transparent 42%),
        linear-gradient(285deg, rgba(11, 115, 255, 0.12), transparent 46%);
    pointer-events: none;
}

.hero::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 64px;
    background: linear-gradient(180deg, rgba(242, 247, 251, 0), var(--bg));
    pointer-events: none;
}

.hero-grid {
    position: relative;
    z-index: 1;
    min-height: 560px;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
    gap: 42px;
    align-items: center;
    padding: 64px 0 78px;
}

.hero-copy {
    max-width: 660px;
}

.hero-side {
    display: grid;
    grid-template-columns: minmax(260px, 0.78fr) minmax(240px, 1fr);
    align-items: stretch;
    gap: 18px;
}

.hero h1,
.page-section h1 {
    margin: 0 0 16px;
    line-height: 1.08;
    font-size: 58px;
}

.hero p {
    max-width: 620px;
    color: var(--muted);
    font-size: 18px;
}

.hero-notice {
    box-shadow: var(--shadow-soft);
}

.hero-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0 4px;
}

.hero-pills a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 8px 13px;
    border: 1px solid rgba(3, 155, 124, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--primary-dark);
    font-weight: 700;
    box-shadow: 0 10px 22px rgba(16, 32, 41, 0.06);
}

.hero-pills a:hover {
    background: white;
    text-decoration: none;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--primary-dark);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
    font-size: 12px;
}

.search-panel,
.admin-card,
.info-panel,
.provider-card,
.stat-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.search-panel {
    position: relative;
    z-index: 2;
    padding: 24px;
    display: grid;
    gap: 14px;
    border-color: rgba(3, 155, 124, 0.18);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.90)),
        var(--surface);
}

.search-panel-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    color: var(--primary-dark);
}

.search-panel-title img {
    width: 32px;
    height: 32px;
    padding: 7px;
    border-radius: 10px;
    background: linear-gradient(135deg, #e5fff5, #eef6ff);
    color: var(--primary);
}

.autocomplete-menu {
    position: absolute;
    z-index: 2000;
    max-height: 320px;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid rgba(3, 155, 124, 0.22);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 20px 48px rgba(16, 32, 41, 0.20);
}

.autocomplete-menu[hidden] {
    display: none;
}

.autocomplete-menu button {
    display: block;
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.autocomplete-menu button:hover,
.autocomplete-menu button.is-active {
    background: linear-gradient(135deg, rgba(3, 155, 124, 0.12), rgba(0, 119, 255, 0.10));
    color: var(--primary-dark);
}

.hero-visual {
    position: relative;
    min-height: 100%;
    overflow: hidden;
    border: 1px solid rgba(3, 155, 124, 0.18);
    border-radius: var(--radius-lg);
    background: white;
    box-shadow: var(--shadow);
}

.hero-visual img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-visual-card {
    position: absolute;
    right: 18px;
    bottom: 18px;
    width: min(260px, calc(100% - 36px));
    display: grid;
    gap: 3px;
    padding: 15px 16px;
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 16px 34px rgba(16, 32, 41, 0.16);
    backdrop-filter: blur(10px);
}

.hero-visual-card strong {
    color: var(--primary-dark);
}

.hero-visual-card span {
    color: var(--muted);
    font-size: 13px;
}

.field-grid {
    display: grid;
    grid-template-columns: 1fr 96px;
    gap: 12px;
}

.form-stack {
    display: grid;
    gap: 16px;
}

label {
    display: grid;
    gap: 7px;
    color: var(--text);
    font-weight: 700;
}

label span {
    font-size: 14px;
}

input,
select,
textarea {
    width: 100%;
    min-height: 48px;
    border: 1px solid #c7dfe5;
    border-radius: var(--radius);
    padding: 11px 13px;
    background: white;
    color: var(--text);
    font: inherit;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(3, 155, 124, 0.1);
}

textarea {
    resize: vertical;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 12px 26px rgba(3, 155, 124, 0.13);
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.button:hover {
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(3, 155, 124, 0.2);
}

.button.primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.button.primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary-dark));
}

.button.secondary {
    background: white;
    color: var(--primary-dark);
    border-color: var(--line);
}

.button.danger {
    background: linear-gradient(135deg, #c0392b, #8f1d1d);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 12px 26px rgba(192, 57, 43, 0.16);
}

.button.danger:hover {
    box-shadow: 0 16px 32px rgba(192, 57, 43, 0.22);
}

.button-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.page-section {
    padding: 54px 0;
}

.compact-top {
    padding-top: 0;
}

.section-heading {
    position: relative;
    margin-bottom: 24px;
    padding-left: 18px;
}

.section-heading::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 5px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--secondary), var(--primary), var(--mint));
}

.guide-highlights {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 24px;
    position: relative;
    z-index: 2;
}

.guide-highlights article {
    padding: 22px;
    border: 1px solid rgba(214, 230, 236, 0.9);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 255, 249, 0.94)),
        var(--surface);
    box-shadow: var(--shadow-soft);
}

.guide-highlights img {
    width: 42px;
    height: 42px;
    padding: 9px;
    border-radius: 14px;
    color: var(--primary);
    background: linear-gradient(135deg, #e5fff5, #eef6ff);
}

.guide-highlights h2 {
    margin: 14px 0 8px;
    font-size: 19px;
}

.guide-highlights p {
    margin: 0;
    color: var(--muted);
}

.section-heading h2,
.section-heading h1 {
    margin-top: 0;
    margin-bottom: 10px;
}

.section-heading p,
.muted,
.small {
    color: var(--muted);
}

.small {
    font-size: 13px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.category-tile {
    position: relative;
    overflow: hidden;
    display: grid;
    min-height: 118px;
    align-content: space-between;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 8px 22px rgba(20, 33, 41, 0.05);
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.category-tile::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary), var(--primary), var(--mint));
    opacity: 0.88;
}

.category-tile:hover {
    border-color: var(--primary);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(3, 155, 124, 0.14);
}

.category-tile-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.category-tile-head > img:first-child {
    width: 44px;
    height: 44px;
    padding: 7px;
    border-radius: 14px;
    background: linear-gradient(135deg, #effff7, #eef6ff);
}

.tile-arrow {
    width: 30px;
    height: 30px;
    padding: 6px;
    border-radius: 999px;
    color: var(--primary-dark);
    background: #f2fbf8;
    transition: transform 0.16s ease, background 0.16s ease;
}

.category-tile:hover .tile-arrow {
    background: var(--primary);
    color: #fff;
    transform: translateX(2px);
}

.category-tile .tile-title {
    font-weight: 700;
    font-size: 17px;
}

.category-tile small {
    color: var(--muted);
}

.section-footer {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

.provider-list {
    display: grid;
    gap: 14px;
}

.provider-card {
    position: relative;
    overflow: hidden;
    padding: 18px;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 26px rgba(20, 33, 41, 0.06);
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 16px;
}

.provider-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: linear-gradient(180deg, var(--secondary), var(--primary), var(--mint));
}

.provider-card:hover {
    box-shadow: 0 18px 40px rgba(16, 32, 41, 0.1);
}

.provider-card h3 {
    margin: 0 0 4px;
    font-size: 20px;
}

.provider-thumb,
.detail-thumb {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
}

.detail-thumb {
    width: 180px;
    height: 180px;
    margin: 18px 0;
}

.provider-card-body {
    min-width: 0;
}

.provider-card p {
    margin: 0;
}

.provider-meta,
.info-panel dl {
    display: grid;
    gap: 10px;
    margin: 14px 0;
}

.provider-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

dd {
    margin: 0;
}

.filter-bar {
    display: grid;
    grid-template-columns: 1.4fr 1.2fr 1fr 1fr 1fr auto;
    gap: 10px;
    align-items: end;
}

.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.card-actions.vertical {
    display: grid;
}

.call-mobile {
    display: none;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--surface-soft), #ffffff);
    color: var(--primary-dark);
    font-size: 14px;
    font-weight: 700;
}

.provider-detail {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 32px;
}

.info-panel {
    padding: 22px;
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 32px rgba(16, 32, 41, 0.08);
}

.info-panel h2 {
    margin-top: 0;
}

.content-page h1 {
    font-size: 42px;
}

.rich-text {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: 0 10px 28px rgba(16, 32, 41, 0.06);
}

.rich-text h2 {
    margin-top: 28px;
}

.ad-slot {
    width: min(1120px, calc(100% - 32px));
    margin: 24px auto;
    padding: 12px;
    border: 1px dashed #b9c6cc;
    border-radius: var(--radius);
    background: white;
}

.ad-slot span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.empty-state {
    grid-column: 1 / -1;
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--muted);
}

.site-footer {
    position: relative;
    overflow: hidden;
    padding: 42px 0;
    background:
        linear-gradient(135deg, #0d1f2a 0%, #073b45 48%, #006b59 100%);
    color: white;
}

.site-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(85, 217, 144, 0.14), transparent 46%, rgba(31, 123, 232, 0.16));
    pointer-events: none;
}

.footer-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
}

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

.footer-brand img {
    border-radius: 10px;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.footer-grid p {
    max-width: 720px;
    color: #d3dde1;
}

.footer-credit {
    margin-top: 10px;
    font-weight: 700;
}

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

.footer-grid a {
    color: white;
}

.link-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.link-grid a {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 6px;
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 8px 20px rgba(20, 33, 41, 0.05);
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.link-grid a::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--mint));
}

.link-grid a:hover {
    border-color: var(--primary);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(3, 155, 124, 0.13);
}

.link-grid small {
    color: var(--muted);
}

.link-card-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.link-card-title img {
    width: 30px;
    height: 30px;
    padding: 6px;
    border-radius: 999px;
    color: var(--primary);
    background: linear-gradient(135deg, #e5fff5, #eef6ff);
}

.steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    padding: 0;
    list-style-position: inside;
}

.steps li {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 255, 249, 0.92)),
        var(--surface);
    box-shadow: 0 8px 20px rgba(20, 33, 41, 0.05);
    font-weight: 700;
}

.captcha-field {
    padding: 14px;
    border: 1px solid rgba(8, 127, 140, 0.18);
    border-radius: var(--radius);
    background: linear-gradient(135deg, #f1fbfc, #ffffff);
}

.form-card {
    margin-top: 18px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 255, 249, 0.94)),
        var(--surface);
    box-shadow: var(--shadow-soft);
}

.pagination {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.pagination a {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.pagination a.active {
    background: var(--primary);
    color: white;
}

.result-count {
    color: var(--muted);
}

.hp-field {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.admin-body {
    background:
        linear-gradient(135deg, rgba(11, 115, 255, 0.08), rgba(3, 155, 124, 0.1)),
        linear-gradient(180deg, #ffffff 0, #effbf7 280px, #eef4f8 100%);
    min-width: 320px;
}

.admin-body.admin-nav-open {
    overflow: hidden;
}

.admin-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-header-actions form {
    margin: 0;
}

.admin-menu-toggle {
    display: none;
    position: relative;
    width: auto;
    height: 46px;
    min-width: 46px;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
    padding: 0 14px 0 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 255, 249, 0.92)),
        var(--surface);
    color: var(--primary-dark);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(16, 32, 41, 0.08);
}

.admin-menu-toggle span[aria-hidden="true"],
.admin-menu-toggle::before,
.admin-menu-toggle::after {
    content: "";
    position: absolute;
    left: 14px;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--primary-dark);
    transition: transform 0.18s ease, opacity 0.18s ease, top 0.18s ease;
}

.admin-menu-toggle::before {
    top: 15px;
}

.admin-menu-toggle span[aria-hidden="true"] {
    top: 22px;
}

.admin-menu-toggle::after {
    top: 29px;
}

.admin-nav-open .admin-menu-toggle::before {
    top: 22px;
    transform: rotate(45deg);
}

.admin-nav-open .admin-menu-toggle span[aria-hidden="true"] {
    opacity: 0;
}

.admin-nav-open .admin-menu-toggle::after {
    top: 22px;
    transform: rotate(-45deg);
}

.admin-menu-label {
    position: relative;
    z-index: 1;
}

.admin-shell {
    width: min(1400px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    padding: 30px 0 48px;
}

.admin-sidebar {
    position: sticky;
    top: 98px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 255, 249, 0.94)),
        var(--surface);
    border: 1px solid rgba(214, 230, 236, 0.9);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    align-self: start;
    overflow: hidden;
}

.admin-sidebar-head {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 14px 10px;
    border-bottom: 1px solid var(--line);
}

.admin-sidebar-close {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: white;
    color: var(--primary-dark);
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}

.admin-sidebar::before {
    content: "";
    display: block;
    height: 5px;
    background: linear-gradient(90deg, var(--secondary), var(--primary), var(--mint));
}

.admin-sidebar nav {
    display: grid;
    padding: 10px;
}

.admin-sidebar a {
    padding: 11px 12px;
    border-radius: 12px;
    color: var(--text);
    font-weight: 700;
}

.admin-sidebar a[aria-current="page"] {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    box-shadow: 0 12px 24px rgba(3, 155, 124, 0.16);
}

.admin-sidebar a:hover {
    background: linear-gradient(135deg, var(--surface-soft), #eef6ff);
    text-decoration: none;
    color: var(--primary-dark);
}

.admin-sidebar a[aria-current="page"]:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary-dark));
    color: #fff;
}

.admin-nav-backdrop {
    display: none;
}

.admin-main {
    min-width: 0;
}

.admin-authenticated .admin-main > .container {
    width: 100%;
}

.admin-authenticated .admin-main > .page-section {
    padding: 0;
}

.admin-card {
    width: min(440px, calc(100% - 32px));
    margin: 0 auto;
    padding: 26px;
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 255, 249, 0.94)),
        var(--surface);
}

.admin-main > .container.admin-card {
    width: min(460px, calc(100% - 32px));
    margin: clamp(28px, 5vw, 58px) auto;
}

.admin-guest .flash-wrap {
    width: min(760px, calc(100% - 32px));
}

.admin-section {
    display: grid;
    gap: 18px;
}

.admin-grid {
    display: grid;
    grid-template-columns: minmax(320px, 0.72fr) minmax(0, 1.28fr);
    gap: 18px;
}

.admin-panel {
    padding: 22px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(247, 253, 255, 0.96)),
        var(--surface);
    border: 1px solid rgba(214, 230, 236, 0.9);
    border-radius: var(--radius-lg);
    box-shadow: 0 14px 34px rgba(16, 32, 41, 0.08);
    min-width: 0;
}

.admin-form {
    display: grid;
    gap: 14px;
}

.check-row {
    grid-template-columns: 1fr auto;
    align-items: center;
}

.table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: 0 10px 28px rgba(16, 32, 41, 0.05);
}

.table-wrap-wide {
    scrollbar-color: rgba(3, 155, 124, 0.35) rgba(214, 230, 236, 0.55);
}

.table-wrap-wide::-webkit-scrollbar {
    height: 12px;
}

.table-wrap-wide::-webkit-scrollbar-track {
    background: rgba(214, 230, 236, 0.55);
    border-radius: 999px;
}

.table-wrap-wide::-webkit-scrollbar-thumb {
    background: rgba(3, 155, 124, 0.38);
    border-radius: 999px;
}

.admin-table-scroll-note {
    display: none;
    margin: -4px 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.admin-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-message-table {
    min-width: 1480px;
    table-layout: fixed;
}

.admin-audit-table {
    min-width: 1220px;
    table-layout: fixed;
}

.admin-message-table .col-id,
.admin-audit-table .col-id {
    width: 72px;
}

.admin-message-table .col-name {
    width: 170px;
}

.admin-message-table .col-email {
    width: 230px;
}

.admin-message-table .col-message {
    width: 230px;
}

.admin-message-table .col-ip,
.admin-audit-table .col-ip {
    width: 150px;
}

.admin-message-table .col-user-agent,
.admin-audit-table .col-user-agent {
    width: 300px;
}

.admin-message-table .col-status {
    width: 135px;
}

.admin-message-table .col-created,
.admin-audit-table .col-created {
    width: 170px;
}

.admin-message-table .col-actions {
    width: 220px;
}

.admin-audit-table .col-admin {
    width: 210px;
}

.admin-audit-table .col-action {
    width: 210px;
}

.admin-audit-table .col-entity {
    width: 130px;
}

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

.admin-table th {
    background: linear-gradient(135deg, #e9fff5, #eef6ff);
    color: var(--primary-dark);
}

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

.inline-form {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin: 0;
}

.inline-form select {
    min-width: 138px;
}

.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.small-button {
    min-height: 36px;
    padding: 7px 10px;
    font-size: 14px;
}

.admin-delete-form {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.admin-card h1 {
    margin-top: 0;
}

.dashboard-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 24px 0;
}

.stat-card {
    padding: 18px;
    box-shadow: none;
}

.stat-card span {
    display: block;
    color: var(--muted);
    font-size: 14px;
}

.stat-card strong {
    display: block;
    margin-top: 8px;
    font-size: 34px;
}

.system-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 12px;
}

.system-stat-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    min-height: 190px;
    padding: 22px;
}

.resource-card-head {
    display: grid;
    gap: 8px;
}

.resource-card-head span {
    color: var(--text);
    font-size: 18px;
    font-weight: 800;
}

.resource-card-head small {
    display: block;
    color: var(--muted);
    line-height: 1.45;
}

.resource-pie {
    --pie-color: var(--primary);
    --pie-track: #dfeff3;
    position: relative;
    display: grid;
    place-items: center;
    width: 136px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 18px 34px rgba(16, 32, 41, 0.12);
}

.resource-pie-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.resource-pie-track,
.resource-pie-meter {
    fill: none;
    stroke-width: 13;
}

.resource-pie-track {
    stroke: var(--pie-track);
}

.resource-pie-meter {
    stroke: var(--pie-color);
    stroke-linecap: round;
}

.resource-pie::before {
    content: "";
    position: absolute;
    inset: 13px;
    border-radius: 50%;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(241, 255, 249, 0.94));
    box-shadow: inset 0 0 0 1px rgba(214, 230, 236, 0.8);
}

.resource-pie-center {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    line-height: 1.1;
}

.resource-pie-center strong {
    margin: 0;
    font-size: 26px;
}

.resource-pie-center span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.resource-pie.is-empty {
    --pie-color: #a9bbc2;
}

.system-stat-card.usage-medium .resource-pie {
    --pie-color: #f59e0b;
}

.system-stat-card.usage-high .resource-pie {
    --pie-color: #ef4444;
}

.system-stat-card.usage-normal .resource-pie {
    --pie-color: var(--secondary);
}

.ua-cell {
    max-width: 360px;
    word-break: break-word;
}

.client-data-cell {
    max-width: 380px;
    word-break: break-word;
}

.ip-cell {
    min-width: 96px;
    white-space: nowrap;
}

.message-details summary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--primary-dark);
    font-weight: 800;
    cursor: pointer;
    list-style: none;
    white-space: nowrap;
}

.message-details summary::-webkit-details-marker {
    display: none;
}

.message-toggle-icon {
    display: inline-block;
    font-size: 11px;
    line-height: 1;
    transition: transform 0.18s ease;
}

.message-details[open] .message-toggle-icon {
    transform: rotate(90deg);
}

.message-body {
    margin-top: 10px;
    max-width: 560px;
    padding: 12px 14px;
    border: 1px solid rgba(20, 184, 166, 0.2);
    border-radius: 12px;
    background: rgba(240, 253, 250, 0.75);
    color: var(--text);
    white-space: pre-wrap;
}

.admin-table small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
}

.debug-block {
    overflow: auto;
    padding: 16px;
    border-radius: var(--radius);
    background: #111820;
    color: #dbe7ef;
    font-size: 13px;
}

code {
    padding: 2px 5px;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.06);
}

@media (max-width: 1180px) {
    .admin-shell {
        grid-template-columns: 220px minmax(0, 1fr);
        gap: 18px;
    }

    .admin-sidebar a {
        padding: 10px;
        font-size: 14px;
    }

    .system-stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .hero-grid,
    .hero-side,
    .provider-detail,
    .footer-grid,
    .guide-highlights {
        grid-template-columns: 1fr;
    }

    .category-grid,
    .stats-grid,
    .link-grid,
    .steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-bar {
        grid-template-columns: 1fr 1fr;
    }

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

    .admin-menu-toggle {
        display: inline-flex;
        order: 2;
    }

    .admin-header-actions {
        order: 3;
        margin-left: auto;
        justify-content: flex-end;
    }

    .admin-shell {
        width: min(100% - 24px, 760px);
        padding: 18px 0 38px;
    }

    .admin-sidebar {
        position: fixed;
        z-index: 80;
        inset: 0 auto 0 0;
        width: min(330px, calc(100vw - 44px));
        max-width: 100%;
        border-radius: 0 24px 24px 0;
        transform: translateX(-110%);
        transition: transform 0.2s ease;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .admin-nav-open .admin-sidebar {
        transform: translateX(0);
    }

    .admin-sidebar-head {
        display: flex;
    }

    .admin-sidebar::before {
        height: 6px;
    }

    .admin-sidebar nav {
        padding: 12px;
    }

    .admin-sidebar a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .admin-nav-backdrop {
        display: block;
        position: fixed;
        z-index: 70;
        inset: 0;
        background: rgba(10, 32, 41, 0.42);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    .admin-nav-open .admin-nav-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .admin-panel {
        padding: 18px;
    }

    .admin-table-scroll-note {
        display: block;
    }

    .admin-table {
        min-width: 720px;
    }
}

@media (max-width: 700px) {
    .stacked-table-wrap {
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .admin-stacked-table,
    .admin-stacked-table tbody,
    .admin-stacked-table tr,
    .admin-stacked-table td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .admin-stacked-table {
        border-collapse: separate;
        border-spacing: 0;
    }

    .admin-stacked-table colgroup,
    .admin-stacked-table thead {
        display: none;
    }

    .admin-stacked-table tbody {
        display: grid;
        gap: 14px;
    }

    .admin-stacked-table tr {
        overflow: hidden;
        padding: 8px 14px;
        border: 1px solid rgba(214, 230, 236, 0.95);
        border-radius: var(--radius-lg);
        background:
            linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(247, 253, 255, 0.96)),
            var(--surface);
        box-shadow: 0 12px 26px rgba(16, 32, 41, 0.08);
    }

    .admin-stacked-table td {
        display: grid;
        grid-template-columns: minmax(96px, 34%) minmax(0, 1fr);
        gap: 12px;
        align-items: start;
        padding: 11px 0;
        border-bottom: 1px solid rgba(214, 230, 236, 0.82);
    }

    .admin-stacked-table td:last-child {
        border-bottom: 0;
    }

    .admin-stacked-table td::before {
        content: attr(data-label);
        color: var(--primary-dark);
        font-size: 12px;
        font-weight: 800;
        text-transform: uppercase;
    }

    .admin-stacked-table .stacked-empty-cell {
        display: block;
        padding: 16px 0;
        color: var(--muted);
    }

    .admin-stacked-table .stacked-empty-cell::before {
        content: none;
    }

    .admin-stacked-table .client-data-cell,
    .admin-stacked-table .ua-cell,
    .admin-stacked-table .ip-cell,
    .admin-stacked-table .message-body {
        max-width: none;
        min-width: 0;
        white-space: normal;
        word-break: break-word;
    }

    .admin-stacked-table .message-details {
        min-width: 0;
    }

    .admin-stacked-table .message-details summary {
        white-space: normal;
    }

    .admin-stacked-table .inline-actions,
    .admin-stacked-table .inline-form {
        align-items: stretch;
    }

    .admin-stacked-table .inline-actions {
        flex-direction: column;
    }

    .admin-stacked-table .inline-actions form,
    .admin-stacked-table .inline-form select,
    .admin-stacked-table .inline-form .button,
    .admin-stacked-table .inline-actions .button {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .dashboard-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .header-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
        padding: 10px 0;
    }

    .admin-body .header-inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px;
        min-height: 64px;
    }

    .admin-body .brand {
        min-width: 0;
    }

    .admin-body .brand span:last-child {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .admin-body .admin-menu-toggle {
        order: 0;
        justify-self: end;
    }

    .admin-header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .admin-body .admin-header-actions {
        grid-column: 1 / -1;
        justify-content: space-between;
        gap: 8px;
    }

    .admin-body .admin-header-actions > span {
        max-width: 44%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .main-nav {
        width: 100%;
        overflow-x: visible;
        flex-wrap: wrap;
        gap: 8px;
    }

    .main-nav a {
        flex: 1 1 calc(50% - 8px);
        justify-content: center;
    }

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

    .hero h1,
    .page-section h1 {
        font-size: 34px;
    }

    .hero-pills {
        gap: 8px;
    }

    .category-grid,
    .stats-grid,
    .filter-bar,
    .provider-meta,
    .field-grid,
    .link-grid,
    .steps,
    .provider-card {
        grid-template-columns: 1fr;
    }

    .card-actions .button,
    .admin-form .button.primary {
        width: 100%;
    }

    .inline-actions,
    .inline-form {
        align-items: stretch;
    }

    .inline-actions {
        flex-direction: column;
    }

    .inline-form select,
    .inline-form .button,
    .inline-actions .button,
    .inline-actions form {
        width: 100%;
    }

    .provider-thumb {
        width: 100%;
        height: 140px;
    }

    .hero-visual {
        min-height: 300px;
    }

    .hero-visual-card {
        position: static;
        width: auto;
        margin: 0 16px 16px;
    }

    .call-mobile {
        display: inline-flex;
    }

    .system-stat-card {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .page-section {
        padding: 38px 0;
    }

    .admin-authenticated .admin-main > .page-section {
        padding: 0;
    }
}

@media (max-width: 430px) {
    .container,
    .narrow {
        width: min(100% - 24px, 1120px);
    }

    .hero h1,
    .page-section h1 {
        font-size: 30px;
    }

    .brand-mark {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .admin-shell {
        width: calc(100% - 20px);
    }

    .admin-panel,
    .form-card,
    .rich-text,
    .provider-card {
        padding: 16px;
    }

    .admin-card {
        width: calc(100% - 24px);
        padding: 20px;
    }

    .stat-card strong {
        font-size: 28px;
    }
}
