:root {
    --navy-950: #04151c;
    --navy-900: #061d26;
    --navy-850: #082832;
    --navy-800: #0b3440;
    --ink: #10272d;
    --ink-soft: #405b61;
    --muted: #687e82;
    --paper: #f3f4f6;
    --paper-strong: #e8ebef;
    --white: #ffffff;
    --teal: #11a995;
    --teal-dark: #087b70;
    --teal-soft: #d9f4ef;
    --cyan: #72dbdf;
    --gold: #f0bd5e;
    --gold-soft: #fff3d8;
    --danger: #c84c43;
    --danger-dark: #a63d36;
    --danger-soft: #fde8e5;
    --success: #15836b;
    --success-soft: #def3e9;
    --line: #d8e4e2;
    --line-strong: #c5d5d2;
    --shadow-sm: 0 10px 30px rgba(7, 34, 42, 0.055);
    --shadow-md: 0 22px 60px rgba(7, 34, 42, 0.11);
    --shadow-dark: 0 28px 75px rgba(0, 9, 13, 0.3);
    --sidebar-width: 268px;
    --radius-sm: 9px;
    --radius-md: 15px;
    --radius-lg: 22px;
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: light;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: "Noto Sans Thai", "Leelawadee UI", "Thonburi", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body::selection {
    color: var(--navy-950);
    background: var(--cyan);
}

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

button,
input,
textarea,
select {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    color: inherit;
}

svg {
    stroke-width: 1.8;
}

.admin-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 95% 5%, rgba(17, 169, 149, 0.035), transparent 25%),
        var(--paper);
}

.admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    width: var(--sidebar-width);
    overflow-y: auto;
    padding: 22px 17px 18px;
    color: rgba(255, 255, 255, 0.66);
    background:
        radial-gradient(circle at 20% -10%, rgba(46, 211, 189, 0.14), transparent 29%),
        var(--navy-950);
    box-shadow: 14px 0 45px rgba(3, 20, 27, 0.08);
}

.admin-sidebar::after {
    content: "";
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    width: 1px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.04);
}

.admin-sidebar::-webkit-scrollbar {
    width: 5px;
}

.admin-sidebar::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.admin-sidebar__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    min-height: 43px;
    padding: 0 5px;
}

.admin-brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    color: var(--white);
}

.admin-brand img {
    display: block;
    width: 168px;
    max-width: 100%;
    height: auto;
}

.sidebar-close {
    position: relative;
    display: none;
    place-items: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    padding: 0;
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.06);
}

.sidebar-close::before,
.sidebar-close::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 1.5px;
    border-radius: 999px;
    background: currentColor;
}

.sidebar-close::before {
    transform: rotate(45deg);
}

.sidebar-close::after {
    transform: rotate(-45deg);
}

.sidebar-close > i,
.sidebar-close > svg {
    display: none;
}

.workspace-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 24px 0 19px;
    padding: 11px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.045);
}

.workspace-label span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.workspace-label span i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--teal);
    box-shadow: 0 0 0 4px rgba(17, 169, 149, 0.12);
}

.workspace-label small {
    color: rgba(255, 255, 255, 0.33);
    font-size: 8px;
    font-weight: 700;
}

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

.admin-nav > p {
    margin: 18px 10px 7px;
    color: rgba(255, 255, 255, 0.28);
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.14em;
}

.admin-nav > p:first-child {
    margin-top: 0;
}

.admin-nav a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 39px;
    padding: 8px 10px;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 660;
    transition: color 150ms ease, background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.admin-nav a::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -2px;
    width: 3px;
    height: 18px;
    border-radius: 999px;
    background: var(--teal);
    opacity: 0;
    transform: translateY(-50%);
}

.admin-nav a:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.055);
    transform: translateX(2px);
}

.admin-nav a.is-active {
    color: var(--white);
    border-color: rgba(46, 211, 189, 0.14);
    background: linear-gradient(90deg, rgba(17, 169, 149, 0.17), rgba(17, 169, 149, 0.07));
}

.admin-nav a.is-active::before {
    opacity: 1;
}

.admin-nav svg,
.admin-button svg,
.quick-grid svg {
    flex: 0 0 17px;
    width: 17px;
    height: 17px;
}

.admin-nav a.is-active > svg {
    color: var(--teal);
}

.admin-nav b {
    display: grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    margin-left: auto;
    padding: 0 6px;
    color: var(--navy-950);
    border-radius: 999px;
    background: var(--gold);
    font-size: 9px;
}

.admin-sidebar__footer {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 9px;
    align-items: center;
    margin-top: auto;
    padding-top: 25px;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 9px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
}

.admin-user > span {
    display: grid;
    place-items: center;
    flex: 0 0 31px;
    width: 31px;
    height: 31px;
    color: var(--navy-950);
    border-radius: 8px;
    background: var(--gold);
    font-size: 10px;
    font-weight: 850;
}

.admin-user > div {
    min-width: 0;
}

.admin-user strong,
.admin-user small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-user strong {
    color: rgba(255, 255, 255, 0.82);
    font-size: 10px;
}

.admin-user small {
    margin-top: 1px;
    color: rgba(255, 255, 255, 0.32);
    font-size: 8px;
}

.logout-form {
    margin: 0;
}

.logout-form .admin-button {
    width: 42px;
    min-height: 42px;
    padding: 0;
}

.sidebar-scrim {
    display: none;
}

.admin-main {
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    margin-left: var(--sidebar-width);
    padding: 0 38px 80px;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 25;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    min-height: 116px;
    margin: 0 -38px 30px;
    padding: 20px 38px;
    border-bottom: 1px solid rgba(197, 213, 210, 0.75);
    background: rgba(243, 244, 246, 0.9);
    backdrop-filter: blur(18px) saturate(120%);
}

.admin-topbar__title {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.admin-topbar__title > div {
    min-width: 0;
}

.sidebar-open {
    position: relative;
    display: none;
    place-items: center;
    flex: 0 0 43px;
    width: 43px;
    height: 43px;
    padding: 0;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.sidebar-open::before {
    content: "";
    width: 17px;
    height: 11px;
    border-top: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    background: linear-gradient(currentColor, currentColor) center / 17px 1.5px no-repeat;
}

.sidebar-open > i,
.sidebar-open > svg {
    display: none;
}

.admin-topbar p {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 3px;
    color: var(--teal-dark);
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.admin-topbar p svg {
    width: 12px;
    height: 12px;
}

.admin-topbar h1 {
    margin: 0;
    font-size: 29px;
    font-weight: 750;
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.admin-topbar__title > div > span {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 10px;
}

.admin-topbar__actions {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.save-state {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 11px;
    color: var(--success);
    border: 1px solid #cce5dc;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.68);
    font-size: 9px;
    font-weight: 750;
    white-space: nowrap;
}

.save-state svg {
    width: 14px;
    height: 14px;
}

.save-state.is-unsaved {
    color: #9a5a10;
    border-color: #ead8b6;
    background: var(--gold-soft);
}

.admin-language-tabs {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.admin-language-tabs a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 32px;
    padding: 5px 8px;
    color: var(--muted);
    border-radius: 7px;
    font-size: 9px;
    font-weight: 850;
}

.admin-language-tabs a.is-active {
    color: var(--white);
    background: var(--navy-850);
}

.admin-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 9px 13px;
    color: var(--ink);
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    cursor: pointer;
    font-size: 10px;
    font-weight: 780;
    line-height: 1.2;
    transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease, border-color 150ms ease;
}

.admin-button:hover {
    transform: translateY(-1px);
}

.admin-button--primary {
    color: var(--white);
    background: linear-gradient(135deg, var(--teal-dark), var(--teal));
    box-shadow: 0 10px 24px rgba(8, 123, 112, 0.18);
}

.admin-button--primary:hover {
    box-shadow: 0 13px 30px rgba(8, 123, 112, 0.26);
}

.admin-button--light {
    color: var(--ink);
    border-color: var(--line);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.admin-button--light:hover {
    border-color: var(--line-strong);
    background: #fbfdfd;
}

.admin-button--ghost {
    color: rgba(255, 255, 255, 0.72);
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.admin-button--danger {
    justify-self: end;
    color: var(--danger-dark);
    border-color: #efcbc7;
    background: var(--danger-soft);
}

.admin-button--danger:hover {
    color: var(--white);
    border-color: var(--danger);
    background: var(--danger);
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 0 0 22px;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 750;
    box-shadow: var(--shadow-sm);
}

.alert svg {
    flex: 0 0 15px;
    width: 15px;
    height: 15px;
    margin-top: 1px;
}

.alert--success {
    color: #075d49;
    border-color: #c4e5d8;
    background: var(--success-soft);
}

.alert--error {
    color: #8d312b;
    border-color: #f1c8c4;
    background: var(--danger-soft);
}

.welcome-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 35px;
    min-height: 175px;
    margin-bottom: 18px;
    padding: 30px 32px;
    overflow: hidden;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 83% 48%, rgba(46, 211, 189, 0.18), transparent 22%),
        linear-gradient(135deg, var(--navy-950), var(--navy-800));
    box-shadow: var(--shadow-md);
}

.welcome-panel::before,
.welcome-panel::after {
    content: "";
    position: absolute;
    right: 13%;
    width: 230px;
    height: 230px;
    border: 1px solid rgba(114, 219, 223, 0.1);
    border-radius: 50%;
}

.welcome-panel::before {
    top: -150px;
}

.welcome-panel::after {
    bottom: -180px;
    right: 22%;
}

.welcome-panel > div {
    position: relative;
    z-index: 1;
}

.welcome-panel p {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 9px;
    color: rgba(255, 255, 255, 0.44);
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.14em;
}

.welcome-panel p span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--teal);
    box-shadow: 0 0 0 4px rgba(17, 169, 149, 0.13);
}

.welcome-panel h2 {
    margin: 0;
    font-size: 30px;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.welcome-panel > div:first-child > span {
    display: block;
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.58);
    font-size: 10px;
}

.welcome-panel__actions {
    display: flex;
    align-items: center;
    gap: 11px;
}

.system-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: rgba(255, 255, 255, 0.61);
    font-size: 9px;
    font-weight: 700;
}

.system-status i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--teal);
    box-shadow: 0 0 0 5px rgba(17, 169, 149, 0.12);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 13px;
    margin-bottom: 18px;
}

.metric-card,
.admin-panel,
.edit-card,
.lead-card,
.login-panel {
    border: 1px solid var(--line);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.metric-card {
    position: relative;
    min-height: 180px;
    padding: 20px;
    overflow: hidden;
    border-radius: var(--radius-md);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.metric-card::after {
    content: "";
    position: absolute;
    right: -48px;
    bottom: -55px;
    width: 110px;
    height: 110px;
    border: 22px solid rgba(17, 169, 149, 0.045);
    border-radius: 50%;
}

.metric-card:hover {
    transform: translateY(-3px);
    border-color: #c4d9d5;
    box-shadow: var(--shadow-md);
}

.metric-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
}

.metric-card__head > svg {
    width: 17px;
    height: 17px;
    color: var(--teal-dark);
}

.metric-card__head span {
    padding: 3px 6px;
    color: var(--success);
    border-radius: 999px;
    background: var(--success-soft);
    font-size: 7px;
    font-weight: 850;
    letter-spacing: 0.08em;
}

.metric-card--attention .metric-card__head span {
    color: #9b5d16;
    background: var(--gold-soft);
}

.metric-card strong {
    position: relative;
    z-index: 1;
    display: block;
    color: var(--ink);
    font-size: 34px;
    line-height: 1;
    letter-spacing: -0.035em;
}

.metric-card p {
    position: relative;
    z-index: 1;
    margin: 7px 0 0;
    color: var(--ink);
    font-size: 11px;
    font-weight: 780;
}

.metric-card small {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 8px;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.6fr);
    gap: 18px;
    margin-bottom: 18px;
}

.admin-panel {
    padding: 25px;
    border-radius: var(--radius-md);
}

.admin-panel > h2 {
    margin: 0 0 19px;
    font-size: 19px;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 21px;
}

.panel-heading p {
    margin: 0 0 3px;
    color: var(--teal-dark);
    font-size: 7px;
    font-weight: 850;
    letter-spacing: 0.14em;
}

.panel-heading h2 {
    margin: 0;
    font-size: 18px;
    letter-spacing: -0.02em;
}

.panel-heading > span {
    color: var(--muted);
    font-size: 8px;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.quick-grid a {
    display: grid;
    grid-template-columns: 39px 1fr 15px;
    gap: 11px;
    align-items: center;
    min-height: 79px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fbfdfd;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.quick-grid a:hover {
    transform: translateY(-2px);
    border-color: #b9d7d2;
    background: var(--white);
}

.quick-grid__icon {
    display: grid;
    place-items: center;
    width: 39px;
    height: 39px;
    color: var(--teal-dark);
    border-radius: 10px;
    background: var(--teal-soft);
}

.quick-grid__icon svg {
    width: 17px;
    height: 17px;
}

.quick-grid a > span:nth-child(2) {
    min-width: 0;
}

.quick-grid strong,
.quick-grid small {
    display: block;
}

.quick-grid strong {
    font-size: 10px;
}

.quick-grid small {
    margin-top: 3px;
    overflow: hidden;
    color: var(--muted);
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quick-grid a > svg {
    width: 14px;
    height: 14px;
    color: #93a8a5;
}

.health-panel {
    min-width: 0;
}

.health-score {
    color: var(--success) !important;
    font-weight: 850;
}

.health-ring {
    position: relative;
    display: grid;
    place-items: center;
    width: 130px;
    height: 130px;
    margin: 5px auto 22px;
    border-radius: 50%;
    background: conic-gradient(var(--teal) 0 var(--health-score, 100%), var(--paper-strong) var(--health-score, 100%));
    box-shadow: inset 0 0 0 1px rgba(17, 169, 149, 0.08);
}

.health-ring::before {
    content: "";
    position: absolute;
    width: 101px;
    height: 101px;
    border-radius: 50%;
    background: var(--white);
}

.health-ring > span {
    position: relative;
    z-index: 1;
    text-align: center;
}

.health-ring strong,
.health-ring small {
    display: block;
}

.health-ring strong {
    font-size: 28px;
    line-height: 1;
    letter-spacing: -0.04em;
}

.health-ring small {
    margin-top: 5px;
    color: var(--teal-dark);
    font-size: 7px;
    font-weight: 850;
    letter-spacing: 0.12em;
}

.health-panel ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.health-panel li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
    font-size: 8px;
}

.health-panel li > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
}

.health-panel li svg {
    width: 12px;
    height: 12px;
    color: var(--teal-dark);
}

.health-panel li strong {
    font-size: 8px;
}

.content-map {
    margin-bottom: 18px;
}

.content-map .panel-heading > a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--teal-dark);
    font-size: 8px;
    font-weight: 750;
}

.content-map .panel-heading > a svg {
    width: 13px;
    height: 13px;
}

.content-map__track {
    position: relative;
    display: grid;
    grid-template-columns: repeat(7, minmax(80px, 1fr));
    gap: 7px;
}

.content-map__track::before {
    content: "";
    position: absolute;
    top: 29px;
    right: 5%;
    left: 5%;
    height: 1px;
    background: var(--line);
}

.content-map__track a {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    gap: 7px;
    padding: 10px 6px;
    color: var(--muted);
    border: 1px solid transparent;
    border-radius: 10px;
    background: var(--white);
    font-size: 8px;
    font-weight: 700;
    transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}

.content-map__track a > svg {
    width: 38px;
    height: 38px;
    padding: 10px;
    color: var(--teal-dark);
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--paper);
}

.content-map__track a small {
    color: #9cafac;
    font-size: 7px;
}

.content-map__track a:hover {
    color: var(--ink);
    border-color: var(--line);
    background: #fbfdfd;
}

.editor-overview {
    display: grid;
    grid-template-columns: 168px 1fr auto;
    gap: 20px;
    align-items: center;
    margin: -8px -8px 4px;
    padding: 12px;
    color: var(--white);
    border-radius: 13px;
    background:
        radial-gradient(circle at 80% 20%, rgba(46, 211, 189, 0.12), transparent 24%),
        var(--navy-900);
}

.editor-overview__image {
    position: relative;
    display: grid;
    place-items: center;
    height: 94px;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
}

.editor-overview__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.editor-overview__image > svg {
    width: 22px;
    height: 22px;
}

.editor-overview__image > span {
    position: absolute;
    right: 7px;
    bottom: 7px;
    padding: 4px 6px;
    color: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    background: rgba(4, 21, 28, 0.7);
    font-size: 6px;
    font-weight: 850;
    letter-spacing: 0.1em;
}

.editor-overview > div:nth-child(2) {
    min-width: 0;
}

.editor-overview > div:nth-child(2) p {
    margin: 0 0 5px;
    color: var(--teal);
    font-size: 7px;
    font-weight: 850;
    letter-spacing: 0.13em;
}

.editor-overview > div:nth-child(2) h2 {
    margin: 0;
    overflow: hidden;
    color: var(--white);
    font-size: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.editor-overview > div:nth-child(2) span {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.46);
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.editor-overview > .admin-button {
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.13);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: none;
}

.admin-form {
    display: grid;
    gap: 19px;
    counter-reset: edit-item;
}

.admin-form > h2 {
    position: relative;
    margin: 8px 0 0;
    padding: 22px 0 0;
    border-top: 1px solid var(--line);
}

.admin-form > h2:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

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

.admin-form label,
.edit-card label,
.login-panel label {
    display: grid;
    gap: 7px;
    color: var(--ink-soft);
    font-size: 9px;
    font-weight: 780;
}

.admin-form input,
.admin-form textarea,
.admin-form select,
.edit-card input,
.edit-card textarea,
.edit-card select,
.login-panel input {
    width: 100%;
    padding: 11px 12px;
    color: var(--ink);
    border: 1px solid #cad8d5;
    border-radius: 9px;
    background: #fbfdfd;
    outline: 0;
    font-size: 11px;
    line-height: 1.55;
    transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.admin-form textarea,
.edit-card textarea {
    min-height: 105px;
    resize: vertical;
}

.admin-form input:hover,
.admin-form textarea:hover,
.edit-card input:hover,
.edit-card textarea:hover {
    border-color: #b5c9c5;
}

.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus,
.edit-card input:focus,
.edit-card textarea:focus,
.edit-card select:focus,
.login-panel input:focus {
    border-color: var(--teal);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(17, 169, 149, 0.11);
}

.admin-form > .admin-button--primary:last-child {
    justify-self: end;
    min-width: 190px;
    margin-top: 2px;
}

.span-2 {
    grid-column: span 2;
}

.panel-header {
    position: sticky;
    top: 130px;
    z-index: 12;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: -9px -9px 4px;
    padding: 10px;
    border: 1px solid rgba(216, 228, 226, 0.8);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 25px rgba(7, 34, 42, 0.055);
    backdrop-filter: blur(14px);
}

.panel-header h2 {
    margin: 0;
    font-size: 16px;
    letter-spacing: -0.02em;
}

.edit-card {
    position: relative;
    display: grid;
    gap: 14px;
    padding: 45px 18px 17px;
    border-radius: 12px;
    counter-increment: edit-item;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.edit-card::before {
    content: "ITEM " counter(edit-item, decimal-leading-zero);
    position: absolute;
    top: 14px;
    left: 18px;
    color: var(--teal-dark);
    font-size: 7px;
    font-weight: 850;
    letter-spacing: 0.13em;
}

.edit-card::after {
    content: "";
    position: absolute;
    top: 17px;
    right: 18px;
    left: 73px;
    height: 1px;
    background: var(--line);
}

.edit-card:hover {
    border-color: #c5d9d5;
    box-shadow: 0 15px 38px rgba(7, 34, 42, 0.075);
}

.edit-card--compact {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    padding-top: 42px;
}

.add-form {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px;
}

.add-form .admin-button {
    min-width: 130px;
    color: var(--teal-dark);
    border-color: #c3dcd7;
    background: var(--teal-soft);
}

.lead-list {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

.lead-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(180px, 0.42fr) minmax(260px, 1fr) 125px;
    gap: 22px;
    align-items: start;
    padding: 20px;
    border-radius: 12px;
}

.lead-card h3 {
    margin: 10px 0 2px;
    font-size: 17px;
    letter-spacing: -0.02em;
}

.lead-card p {
    margin: 0;
    color: var(--muted);
    font-size: 10px;
}

.lead-card > div:first-child > a {
    display: inline-flex;
    margin-top: 7px;
    color: var(--teal-dark);
    font-size: 9px;
    font-weight: 700;
}

.lead-card > small {
    color: var(--muted);
    font-size: 8px;
    text-align: right;
}

.lead-status {
    display: inline-flex;
    padding: 4px 7px;
    border-radius: 999px;
    font-size: 7px;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.lead-status--new {
    color: #91530d;
    background: var(--gold-soft);
}

.lead-status--done {
    color: #0d6953;
    background: var(--success-soft);
}

.lead-actions {
    display: grid;
    grid-column: 3;
    gap: 6px;
}

.lead-actions .admin-button {
    width: 100%;
}

.muted,
.empty-state {
    color: var(--muted);
}

.empty-state {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 7px;
    min-height: 220px;
    margin: 20px 0 0;
    text-align: center;
    border: 1px dashed var(--line-strong);
    border-radius: 12px;
    background: #fbfdfd;
    font-size: 10px;
}

.empty-state svg {
    width: 25px;
    height: 25px;
    margin-bottom: 5px;
    color: var(--teal-dark);
}

.empty-state span {
    color: var(--ink);
    font-weight: 750;
}

.empty-state small {
    color: var(--muted);
    font-size: 8px;
}

.security-note {
    display: grid;
    grid-template-columns: 37px 1fr;
    gap: 11px;
    align-items: center;
    padding: 13px;
    color: #075d49;
    border: 1px solid #c7e3d9;
    border-radius: 10px;
    background: var(--success-soft);
}

.security-note > svg {
    width: 37px;
    height: 37px;
    padding: 9px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.65);
}

.security-note strong,
.security-note span {
    display: block;
}

.security-note strong {
    font-size: 9px;
}

.security-note span {
    margin-top: 2px;
    color: #45766a;
    font-size: 8px;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 30px;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 90% 10%, rgba(46, 211, 189, 0.1), transparent 28%),
        var(--navy-950);
}

.login-shell {
    display: grid;
    grid-template-columns: minmax(480px, 1.18fr) minmax(350px, 0.82fr);
    width: min(1030px, 100%);
    min-height: 610px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 24px;
    background: var(--white);
    box-shadow: 0 38px 110px rgba(0, 8, 12, 0.42);
}

.login-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 610px;
    padding: 42px;
    overflow: hidden;
    color: var(--white);
    background:
        linear-gradient(rgba(114, 219, 223, 0.065) 1px, transparent 1px),
        linear-gradient(90deg, rgba(114, 219, 223, 0.065) 1px, transparent 1px),
        radial-gradient(circle at 70% 55%, rgba(17, 169, 149, 0.2), transparent 30%),
        linear-gradient(145deg, #061d26, #083843);
    background-size: 42px 42px, 42px 42px, auto, auto;
}

.login-visual::before,
.login-visual::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(114, 219, 223, 0.12);
    border-radius: 50%;
}

.login-visual::before {
    right: -120px;
    bottom: -170px;
    width: 470px;
    height: 470px;
    box-shadow: 0 0 0 65px rgba(114, 219, 223, 0.02), 0 0 0 130px rgba(114, 219, 223, 0.014);
}

.login-visual::after {
    top: 150px;
    right: 60px;
    width: 160px;
    height: 160px;
}

.login-visual__brand {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.login-visual__brand img {
    width: 170px;
}

.login-visual__brand span {
    padding: 6px 8px;
    color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    font-size: 7px;
    font-weight: 850;
    letter-spacing: 0.13em;
}

.login-visual__content {
    position: relative;
    z-index: 2;
    max-width: 480px;
    margin: auto 0 120px;
}

.login-kicker {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 18px;
    color: var(--gold);
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.15em;
}

.login-kicker i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--teal);
    box-shadow: 0 0 0 5px rgba(17, 169, 149, 0.12);
}

.login-visual h2 {
    margin: 0;
    font-size: clamp(38px, 4vw, 52px);
    font-weight: 730;
    line-height: 1.2;
    letter-spacing: -0.035em;
}

.login-visual__content > p:not(.login-kicker) {
    max-width: 430px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.55);
    font-size: 11px;
    line-height: 1.75;
}

.login-visual__features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 26px;
}

.login-visual__features span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 9px;
    color: rgba(255, 255, 255, 0.63);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    font-size: 8px;
    font-weight: 650;
}

.login-visual__features svg {
    width: 12px;
    height: 12px;
    color: var(--teal);
}

.login-visual__chart {
    position: absolute;
    right: 40px;
    bottom: 24px;
    left: 40px;
    z-index: 2;
    height: 120px;
    opacity: 0.78;
}

.login-visual__chart > div {
    position: absolute;
    inset: 10px 0 0;
    display: flex;
    align-items: flex-end;
    gap: 9px;
}

.login-visual__chart > div span {
    flex: 1;
    height: 32%;
    border-radius: 3px 3px 0 0;
    background: linear-gradient(180deg, rgba(46, 211, 189, 0.35), rgba(17, 169, 149, 0.05));
}

.login-visual__chart > div span:nth-child(2) { height: 48%; }
.login-visual__chart > div span:nth-child(3) { height: 42%; }
.login-visual__chart > div span:nth-child(4) { height: 67%; }
.login-visual__chart > div span:nth-child(5) { height: 59%; }
.login-visual__chart > div span:nth-child(6) { height: 84%; }

.login-visual__chart svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.login-visual__chart path {
    fill: none;
    stroke: var(--gold);
    stroke-linecap: round;
    stroke-width: 2.5;
}

.login-panel {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 58px 54px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.login-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 42px;
}

.login-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--paper);
}

.login-mark img {
    width: 23px;
    height: 23px;
}

.login-panel__head > span {
    color: #94a6a3;
    font-size: 7px;
    font-weight: 850;
    letter-spacing: 0.14em;
}

.login-panel h1 {
    margin: 0;
    font-size: 29px;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.login-panel__copy {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 10px;
}

.login-panel form {
    display: grid;
    gap: 16px;
    margin-top: 30px;
}

.login-panel label > span {
    color: var(--ink-soft);
}

.input-with-icon {
    position: relative;
    display: block;
}

.input-with-icon > svg {
    position: absolute;
    top: 50%;
    left: 13px;
    z-index: 1;
    width: 15px;
    height: 15px;
    color: #91a4a1;
    transform: translateY(-50%);
}

.input-with-icon input {
    min-height: 47px;
    padding-left: 40px;
}

.login-panel .admin-button--primary {
    justify-content: space-between;
    min-height: 47px;
    margin-top: 3px;
    padding-right: 15px;
    padding-left: 15px;
}

.login-security {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 25px 0 0;
    color: #91a4a1;
    font-size: 8px;
}

.login-security svg {
    width: 12px;
    height: 12px;
    color: var(--teal-dark);
}

.login-panel .alert {
    margin: 17px 0 -5px;
}

/* Readable admin type scale */
.admin-page,
.login-page {
    font-size: 16px;
}

.workspace-label span {
    font-size: 11px;
}

.workspace-label small {
    font-size: 10px;
}

.admin-nav > p {
    font-size: 10px;
}

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

.admin-nav b {
    min-width: 22px;
    height: 22px;
    font-size: 10px;
}

.admin-user strong {
    font-size: 12px;
}

.admin-user small {
    font-size: 10px;
}

.admin-topbar p {
    font-size: 10px;
}

.admin-topbar__title > div > span {
    font-size: 13px;
}

.save-state,
.admin-language-tabs a {
    font-size: 11px;
}

.admin-button {
    min-height: 43px;
    font-size: 12px;
}

.alert {
    font-size: 12px;
    line-height: 1.6;
}

.welcome-panel p {
    font-size: 10px;
}

.welcome-panel > div:first-child > span,
.welcome-panel__description {
    max-width: 680px;
    color: rgba(255, 255, 255, 0.88) !important;
    font-size: 22px !important;
    font-weight: 650 !important;
    line-height: 1.75 !important;
}

.system-status {
    font-size: 13px;
}

.metric-card__head span {
    font-size: 9px;
}

.metric-card p {
    font-size: 14px;
}

.metric-card small {
    font-size: 11px;
    line-height: 1.55;
}

.panel-heading p {
    font-size: 9px;
}

.panel-heading h2,
.admin-panel > h2 {
    font-size: 21px;
}

.panel-heading > span,
.content-map .panel-heading > a {
    font-size: 11px;
}

.quick-grid strong {
    font-size: 13px;
}

.quick-grid small {
    font-size: 10px;
}

.health-ring small,
.health-panel li,
.health-panel li strong {
    font-size: 10px;
}

.content-map__track a {
    font-size: 11px;
}

.content-map__track a small {
    font-size: 9px;
}

.editor-overview__image > span,
.editor-overview > div:nth-child(2) p {
    font-size: 9px;
}

.editor-overview > div:nth-child(2) span {
    font-size: 11px;
}

.admin-form label,
.edit-card label,
.login-panel label {
    font-size: 12px;
}

.admin-form input,
.admin-form textarea,
.admin-form select,
.edit-card input,
.edit-card textarea,
.edit-card select,
.login-panel input {
    font-size: 14px;
    line-height: 1.6;
}

.edit-card::before {
    font-size: 9px;
}

.lead-card h3 {
    font-size: 19px;
}

.lead-card p {
    font-size: 13px;
    line-height: 1.7;
}

.lead-card > div:first-child > a,
.lead-card > small {
    font-size: 11px;
}

.lead-status {
    font-size: 9px;
}

.empty-state {
    font-size: 13px;
}

.empty-state small,
.security-note span {
    font-size: 11px;
}

.security-note strong {
    font-size: 12px;
}

.login-visual__brand span,
.login-kicker {
    font-size: 10px;
}

.login-visual__content > p:not(.login-kicker) {
    font-size: 14px;
}

.login-visual__features span {
    font-size: 11px;
}

.login-panel__head > span {
    font-size: 9px;
}

.login-panel__copy {
    font-size: 13px;
}

.login-security {
    font-size: 11px;
}

@media (max-width: 1220px) {
    .admin-main {
        padding-right: 25px;
        padding-left: 25px;
    }

    .admin-topbar {
        margin-right: -25px;
        margin-left: -25px;
        padding-right: 25px;
        padding-left: 25px;
    }

    .dashboard-layout {
        grid-template-columns: minmax(0, 1.35fr) minmax(255px, 0.65fr);
    }

    .save-state {
        display: none;
    }
}

@media (max-width: 1080px) {
    .admin-sidebar {
        width: min(290px, calc(100% - 42px));
        transform: translateX(-105%);
        transition: transform 220ms ease;
    }

    .admin-sidebar::after {
        display: none;
    }

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

    .sidebar-close {
        display: grid;
    }

    .sidebar-scrim {
        position: fixed;
        inset: 0;
        z-index: 35;
        display: block;
        border: 0;
        background: rgba(2, 16, 22, 0.58);
        opacity: 0;
        pointer-events: none;
        transition: opacity 200ms ease;
        backdrop-filter: blur(4px);
    }

    .sidebar-is-open {
        overflow: hidden;
    }

    .sidebar-is-open .sidebar-scrim {
        opacity: 1;
        pointer-events: auto;
    }

    .admin-main {
        width: 100%;
        margin-left: 0;
    }

    .sidebar-open {
        display: grid;
    }

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

    .metric-card {
        min-height: 165px;
    }
}

@media (max-width: 860px) {
    .admin-topbar {
        align-items: flex-start;
        min-height: 130px;
    }

    .admin-topbar__actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .admin-topbar__title > div > span {
        max-width: 480px;
    }

    .welcome-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    .welcome-panel__actions {
        width: 100%;
        justify-content: space-between;
    }

    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .health-panel {
        display: grid;
        grid-template-columns: 1fr 150px 1fr;
        gap: 24px;
        align-items: center;
    }

    .health-panel .panel-heading {
        align-self: start;
        flex-direction: column;
        align-items: flex-start;
    }

    .health-ring {
        margin: 0 auto;
    }

    .content-map {
        overflow: hidden;
    }

    .content-map__track {
        grid-template-columns: repeat(7, 100px);
        padding-bottom: 8px;
        overflow-x: auto;
    }

    .content-map__track::before {
        display: none;
    }

    .lead-card {
        grid-template-columns: 1fr 1fr;
    }

    .lead-card > p {
        grid-column: 2;
        grid-row: 1;
    }

    .lead-card > small {
        grid-column: 1;
        text-align: left;
    }

    .lead-actions {
        grid-column: 2;
        display: flex;
        justify-content: flex-end;
    }

    .lead-actions .admin-button {
        width: auto;
    }

    .login-shell {
        grid-template-columns: minmax(390px, 1fr) minmax(330px, 0.8fr);
    }

    .login-visual {
        padding: 34px;
    }

    .login-panel {
        padding: 45px 38px;
    }
}

@media (max-width: 720px) {
    .admin-main {
        padding: 0 15px 60px;
    }

    .admin-topbar {
        display: grid;
        min-height: 0;
        margin: 0 -15px 22px;
        padding: 15px;
    }

    .admin-topbar__title {
        align-items: flex-start;
    }

    .admin-topbar h1 {
        font-size: 24px;
    }

    .admin-topbar__title > div > span {
        font-size: 11px;
    }

    .admin-topbar__actions {
        display: grid;
        grid-template-columns: 1fr auto;
        width: 100%;
    }

    .admin-language-tabs {
        justify-self: start;
    }

    .admin-topbar__actions > .admin-button {
        min-width: 120px;
    }

    .welcome-panel {
        min-height: 210px;
        padding: 24px;
        border-radius: 16px;
    }

    .welcome-panel h2 {
        font-size: 25px;
    }

    .welcome-panel__description {
        font-size: 20px !important;
    }

    .welcome-panel__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .welcome-panel__actions .admin-button {
        width: 100%;
    }

    .dashboard-grid,
    .quick-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .metric-card {
        min-height: 150px;
    }

    .admin-panel {
        padding: 18px;
    }

    .health-panel {
        display: block;
    }

    .health-panel .panel-heading {
        flex-direction: row;
        align-items: center;
    }

    .health-ring {
        margin: 7px auto 22px;
    }

    .span-2 {
        grid-column: auto;
    }

    .editor-overview {
        grid-template-columns: 120px 1fr;
    }

    .editor-overview > .admin-button {
        grid-column: 1 / -1;
        width: 100%;
    }

    .panel-header {
        top: 160px;
        margin-right: -3px;
        margin-left: -3px;
    }

    .edit-card {
        padding-right: 14px;
        padding-left: 14px;
    }

    .edit-card--compact {
        grid-template-columns: 1fr;
    }

    .admin-button--danger {
        justify-self: stretch;
    }

    .admin-form > .admin-button--primary:last-child {
        justify-self: stretch;
        width: 100%;
    }

    .lead-card {
        grid-template-columns: 1fr;
    }

    .lead-card > p,
    .lead-card > small,
    .lead-actions {
        grid-column: auto;
        grid-row: auto;
    }

    .lead-actions {
        justify-content: stretch;
    }

    .lead-actions form {
        flex: 1;
    }

    .lead-actions .admin-button {
        width: 100%;
    }

    .login-page {
        padding: 18px;
    }

    .login-shell {
        display: block;
        width: min(440px, 100%);
        min-height: auto;
        border-radius: 19px;
    }

    .login-visual {
        display: none;
    }

    .login-panel {
        min-height: 570px;
        padding: 38px 27px;
    }
}

@media (max-width: 440px) {
    .admin-sidebar {
        width: calc(100% - 24px);
    }

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

    .admin-language-tabs {
        width: 100%;
    }

    .admin-language-tabs a {
        flex: 1;
    }

    .admin-topbar__actions > .admin-button {
        width: 100%;
    }

    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .metric-card {
        min-height: 150px;
        padding: 15px;
    }

    .metric-card strong {
        font-size: 29px;
    }

    .metric-card small {
        line-height: 1.4;
    }

    .panel-heading {
        align-items: flex-start;
    }

    .editor-overview {
        grid-template-columns: 1fr;
    }

    .editor-overview__image {
        height: 128px;
    }

    .editor-overview > .admin-button {
        grid-column: auto;
    }

    .quick-grid a {
        grid-template-columns: 36px 1fr 14px;
        padding: 11px;
    }

    .quick-grid__icon {
        width: 36px;
        height: 36px;
    }

    .login-page {
        padding: 10px;
    }

    .login-panel {
        min-height: calc(100svh - 20px);
        padding: 30px 21px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
