:root {
    color-scheme: dark;
    --navy-950: #050b14;
    --navy-925: #07111f;
    --navy-900: #081421;
    --navy-850: #0b1a2d;
    --navy-800: #0f2137;
    --navy-760: #142a46;
    --navy-700: #1b3556;
    --cyan-400: #38d7ff;
    --cyan-500: #13b9ee;
    --blue-500: #2878ff;
    --green-400: #62e2a2;
    --amber-400: #ffc857;
    --red-400: #ff6f82;
    --text: #edf5ff;
    --text-soft: #c7d7ee;
    --muted: #8da5c2;
    --muted-strong: #6f86a3;
    --line: rgba(148, 163, 184, .18);
    --line-strong: rgba(148, 163, 184, .28);
    --shadow: 0 22px 70px rgba(0, 0, 0, .34);
    --radius: 8px;
    --sidebar-width: 286px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        linear-gradient(135deg, rgba(8, 20, 33, .98), rgba(5, 11, 20, 1) 48%, rgba(8, 16, 29, 1)),
        var(--navy-950);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

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

button,
input {
    font: inherit;
}

.auth-page {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(0, 1.02fr) minmax(360px, .72fr);
    background:
        linear-gradient(135deg, rgba(5, 11, 20, .92), rgba(7, 17, 31, .98)),
        var(--navy-950);
}

.auth-visual {
    min-height: 100vh;
    padding: clamp(28px, 6vw, 72px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background:
        linear-gradient(145deg, rgba(40, 120, 255, .18), transparent 42%),
        linear-gradient(180deg, rgba(56, 215, 255, .12), rgba(5, 11, 20, .2)),
        var(--navy-925);
    border-right: 1px solid var(--line);
}

.auth-panel {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: clamp(22px, 5vw, 54px);
    background: rgba(5, 11, 20, .5);
}

.auth-card {
    width: min(100%, 440px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(24px, 4vw, 34px);
    background: linear-gradient(180deg, rgba(15, 33, 55, .96), rgba(8, 20, 33, .98));
    box-shadow: var(--shadow);
}

.auth-copy {
    max-width: 680px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    border: 1px solid rgba(56, 215, 255, .22);
    border-radius: 999px;
    padding: 8px 12px;
    color: #c9f4ff;
    background: rgba(56, 215, 255, .08);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.eyebrow-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--green-400);
    box-shadow: 0 0 20px rgba(98, 226, 162, .55);
}

.auth-title {
    margin: 24px 0 14px;
    max-width: 760px;
    font-size: clamp(34px, 6vw, 66px);
    line-height: 1.02;
    letter-spacing: 0;
}

.auth-lead {
    max-width: 640px;
    margin: 0;
    color: var(--text-soft);
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.65;
}

.auth-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 34px;
    max-width: 680px;
}

.auth-metric {
    min-height: 108px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    background: rgba(15, 33, 55, .54);
}

.auth-metric strong {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-size: 23px;
}

.auth-metric span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.auth-footer-note {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

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

.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    color: #04111d;
    background: linear-gradient(135deg, var(--cyan-400), var(--blue-500));
    box-shadow: 0 16px 38px rgba(19, 185, 238, .22);
    font-weight: 900;
}

.brand-text strong {
    display: block;
    font-size: 16px;
}

.brand-text span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.form-title {
    margin: 26px 0 8px;
    font-size: 25px;
}

.form-subtitle {
    margin: 0 0 24px;
    color: var(--muted);
    line-height: 1.55;
}

.form-field {
    margin-top: 16px;
}

.form-field label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 800;
}

.form-control {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 13px 14px;
    color: var(--text);
    background: rgba(5, 11, 20, .72);
    outline: none;
}

.form-control:focus {
    border-color: rgba(56, 215, 255, .72);
    box-shadow: 0 0 0 4px rgba(56, 215, 255, .08);
}

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 16px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 13px;
}

.btn-primary,
.btn-ghost,
.sidebar-logout {
    border: 0;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 900;
}

.btn-primary {
    width: 100%;
    margin-top: 22px;
    padding: 13px 16px;
    color: #04111d;
    background: linear-gradient(135deg, var(--cyan-400), var(--blue-500));
    box-shadow: 0 18px 42px rgba(19, 185, 238, .24);
}

.btn-ghost,
.sidebar-logout {
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(255, 255, 255, .04);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 14px;
}

.alert-error {
    border: 1px solid rgba(255, 111, 130, .34);
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-bottom: 18px;
    color: #ffdce1;
    background: rgba(255, 111, 130, .09);
    font-size: 14px;
    line-height: 1.5;
}

.auth-security-note {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--line);
    background:
        linear-gradient(180deg, rgba(15, 33, 55, .98), rgba(5, 11, 20, .98)),
        var(--navy-925);
}

.sidebar-head {
    padding: 22px 20px 18px;
    border-bottom: 1px solid var(--line);
}

.sidebar-status {
    display: flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin-top: 18px;
    border: 1px solid rgba(98, 226, 162, .22);
    border-radius: 999px;
    padding: 7px 10px;
    color: #d9ffe9;
    background: rgba(98, 226, 162, .08);
    font-size: 12px;
    font-weight: 800;
}

.sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 14px 12px;
}

.menu-section-label {
    margin: 16px 10px 8px;
    color: var(--muted-strong);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    padding: 10px 10px;
    color: var(--text-soft);
    font-size: 14px;
}

.nav-item.is-active {
    border-color: rgba(56, 215, 255, .28);
    color: var(--text);
    background: linear-gradient(135deg, rgba(56, 215, 255, .14), rgba(40, 120, 255, .11));
}

.nav-item.is-disabled {
    color: var(--muted-strong);
    cursor: not-allowed;
}

.nav-icon {
    width: 28px;
    height: 28px;
    display: grid;
    flex: 0 0 28px;
    place-items: center;
    border-radius: var(--radius);
    color: #dff8ff;
    background: rgba(56, 215, 255, .1);
    font-size: 11px;
    font-weight: 900;
}

.nav-label {
    min-width: 0;
    flex: 1;
}

.nav-badge {
    border: 1px solid rgba(255, 200, 87, .26);
    border-radius: 999px;
    padding: 4px 7px;
    color: #ffe7a5;
    background: rgba(255, 200, 87, .08);
    font-size: 10px;
    font-weight: 900;
    white-space: nowrap;
}

.sidebar-foot {
    padding: 16px 12px 18px;
    border-top: 1px solid var(--line);
}

.user-mini {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .035);
}

.user-avatar {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    color: #04111d;
    background: linear-gradient(135deg, var(--green-400), var(--cyan-400));
    font-weight: 900;
}

.user-mini strong,
.user-mini span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-mini strong {
    font-size: 13px;
}

.user-mini span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.sidebar-logout {
    width: 100%;
    padding: 11px 14px;
}

.main-area {
    min-width: 0;
    background:
        linear-gradient(135deg, rgba(40, 120, 255, .08), transparent 34%),
        linear-gradient(180deg, rgba(8, 20, 33, .96), rgba(5, 11, 20, .98));
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    min-height: 76px;
    padding: 16px clamp(18px, 4vw, 36px);
    border-bottom: 1px solid var(--line);
    background: rgba(5, 11, 20, .78);
    backdrop-filter: blur(14px);
}

.page-kicker {
    margin: 0 0 4px;
    color: var(--cyan-400);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.page-title {
    margin: 0;
    font-size: clamp(20px, 3vw, 27px);
    letter-spacing: 0;
}

.topbar-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(98, 226, 162, .22);
    border-radius: 999px;
    padding: 8px 11px;
    color: #d8ffe8;
    background: rgba(98, 226, 162, .08);
    font-size: 12px;
    font-weight: 900;
}

.status-pill::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--green-400);
}

.content {
    padding: clamp(18px, 4vw, 36px);
}

.dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
    gap: 18px;
    margin-bottom: 18px;
}

.hero-card,
.panel-card,
.metric-card,
.module-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(15, 33, 55, .88), rgba(8, 20, 33, .92));
    box-shadow: 0 16px 46px rgba(0, 0, 0, .2);
}

.hero-card {
    padding: clamp(22px, 4vw, 34px);
    background:
        linear-gradient(135deg, rgba(56, 215, 255, .16), rgba(40, 120, 255, .08) 42%, transparent),
        linear-gradient(180deg, rgba(20, 42, 70, .94), rgba(10, 26, 45, .94));
}

.hero-card h2 {
    margin: 12px 0 12px;
    max-width: 780px;
    font-size: clamp(31px, 5vw, 52px);
    line-height: 1.06;
    letter-spacing: 0;
}

.hero-card p {
    max-width: 780px;
    margin: 0;
    color: var(--text-soft);
    line-height: 1.65;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.system-card {
    padding: 20px;
}

.system-card h3,
.panel-card h3 {
    margin: 0 0 14px;
    font-size: 17px;
}

.system-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.system-line:last-child {
    border-bottom: 0;
}

.system-line span {
    color: var(--muted);
}

.system-line strong {
    text-align: right;
}

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

.metric-card {
    min-height: 142px;
    padding: 18px;
}

.metric-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}

.metric-label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.metric-token {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: var(--radius);
    color: #dff8ff;
    background: rgba(56, 215, 255, .11);
    font-size: 12px;
    font-weight: 900;
}

.metric-value {
    font-size: 29px;
    font-weight: 900;
}

.metric-note {
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.panel-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, .48fr);
    gap: 18px;
}

.panel-card {
    padding: 20px;
}

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

.module-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    min-height: 112px;
    padding: 15px;
    box-shadow: none;
}

.module-card strong {
    display: block;
    margin-bottom: 6px;
}

.module-card p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.module-state {
    display: inline-flex;
    width: fit-content;
    margin-top: 10px;
    border: 1px solid rgba(255, 200, 87, .24);
    border-radius: 999px;
    padding: 5px 8px;
    color: #ffe7a5;
    background: rgba(255, 200, 87, .08);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.notice-card {
    border: 1px solid rgba(56, 215, 255, .24);
    border-radius: var(--radius);
    padding: 16px;
    color: #ddf8ff;
    background: rgba(56, 215, 255, .08);
    line-height: 1.55;
}

.settings-hero {
    margin-bottom: 18px;
    padding: clamp(22px, 4vw, 30px);
    background:
        linear-gradient(135deg, rgba(56, 215, 255, .14), rgba(40, 120, 255, .08) 46%, transparent),
        linear-gradient(180deg, rgba(20, 42, 70, .94), rgba(10, 26, 45, .94));
}

.settings-hero h2 {
    margin: 14px 0 10px;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: 0;
}

.settings-hero p {
    max-width: 860px;
    margin: 0;
    color: var(--text-soft);
    line-height: 1.65;
}

.page-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 18px;
    padding: clamp(22px, 4vw, 30px);
    background:
        linear-gradient(135deg, rgba(56, 215, 255, .14), rgba(40, 120, 255, .08) 46%, transparent),
        linear-gradient(180deg, rgba(20, 42, 70, .94), rgba(10, 26, 45, .94));
}

.page-hero h2 {
    margin: 14px 0 10px;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: 0;
}

.page-hero p {
    max-width: 860px;
    margin: 0;
    color: var(--text-soft);
    line-height: 1.65;
}

.flash-success {
    margin-bottom: 16px;
    border: 1px solid rgba(98, 226, 162, .3);
    border-radius: var(--radius);
    padding: 13px 15px;
    color: #d9ffe9;
    background: rgba(98, 226, 162, .09);
    font-size: 14px;
    font-weight: 800;
}

.table-card,
.resource-form {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(15, 33, 55, .88), rgba(8, 20, 33, .92));
    box-shadow: 0 14px 42px rgba(0, 0, 0, .18);
}

.table-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 18px;
    border-bottom: 1px solid var(--line);
}

.table-head h3 {
    margin: 0 0 5px;
}

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

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

.premium-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.premium-table th,
.premium-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.premium-table th {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.premium-table td {
    color: var(--text-soft);
    font-size: 14px;
}

.premium-table td strong,
.premium-table td span {
    display: block;
}

.premium-table td span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.table-actions a,
.table-actions .link-button {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 7px 10px;
    color: var(--text);
    background: rgba(255, 255, 255, .04);
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    line-height: 1.2;
}

.empty-state {
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    padding: 18px;
    color: var(--muted);
    text-align: center;
}

.status-badge {
    display: inline-flex;
    width: fit-content;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px 9px;
    color: var(--text-soft);
    background: rgba(255, 255, 255, .05);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.status-active {
    border-color: rgba(98, 226, 162, .3);
    color: #d9ffe9;
    background: rgba(98, 226, 162, .1);
}

.status-inactive {
    border-color: rgba(141, 165, 194, .3);
    color: #c9d8ea;
    background: rgba(141, 165, 194, .08);
}

.status-maintenance {
    border-color: rgba(255, 200, 87, .32);
    color: #ffe7a5;
    background: rgba(255, 200, 87, .09);
}

.status-blocked {
    border-color: rgba(255, 111, 130, .34);
    color: #ffdce1;
    background: rgba(255, 111, 130, .1);
}

.status-expired {
    border-color: rgba(255, 146, 83, .34);
    color: #ffe2cf;
    background: rgba(255, 146, 83, .1);
}

.status-generated {
    border-color: rgba(56, 215, 255, .3);
    color: #ddf8ff;
    background: rgba(56, 215, 255, .08);
}

.status-simulated {
    border-color: rgba(56, 215, 255, .3);
    color: #ddf8ff;
    background: rgba(56, 215, 255, .08);
}

.status-draft {
    border-color: rgba(141, 165, 194, .3);
    color: #c9d8ea;
    background: rgba(141, 165, 194, .08);
}

.status-reviewed {
    border-color: rgba(98, 226, 162, .3);
    color: #d9ffe9;
    background: rgba(98, 226, 162, .1);
}

.status-cancelled {
    border-color: rgba(255, 111, 130, .34);
    color: #ffdce1;
    background: rgba(255, 111, 130, .1);
}

.status-converted {
    border-color: rgba(56, 215, 255, .3);
    color: #ddf8ff;
    background: rgba(56, 215, 255, .08);
}

.level-badge {
    display: inline-flex;
    width: fit-content;
    border: 1px solid rgba(56, 215, 255, .24);
    border-radius: 999px;
    padding: 5px 9px;
    color: #ddf8ff;
    background: rgba(56, 215, 255, .08);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.level-sub_reseller {
    border-color: rgba(255, 200, 87, .28);
    color: #ffe7a5;
    background: rgba(255, 200, 87, .08);
}

.inline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.table-head-stacked {
    align-items: stretch;
    flex-direction: column;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(150px, .24fr) minmax(170px, .28fr) auto;
    gap: 10px;
}

.filter-bar-wide {
    grid-template-columns: minmax(240px, 1.2fr) repeat(5, minmax(145px, .7fr)) auto;
}

.audit-filter-grid {
    grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.inline-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 9px 12px;
    color: var(--muted);
    background: rgba(255, 255, 255, .03);
    font-size: 12px;
    font-weight: 800;
}

.client-login-table {
    min-width: 1180px;
}

.reseller-checkbox {
    align-self: end;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
    background: rgba(255, 255, 255, .035);
}

.resource-form {
    padding: 18px;
}

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

.setting-field-wide {
    grid-column: 1 / -1;
}

textarea.form-control {
    min-height: 104px;
    resize: vertical;
}

select.form-control {
    appearance: none;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 18px;
    border-top: 1px solid var(--line);
    padding-top: 16px;
}

.form-actions span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, .44fr);
    gap: 18px;
    margin-bottom: 18px;
}

.detail-list {
    display: grid;
    gap: 10px;
}

.detail-list div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid var(--line);
    padding: 11px 0;
}

.detail-list div:last-child {
    border-bottom: 0;
}

.detail-list span,
.muted-copy {
    color: var(--muted);
}

.detail-list strong {
    text-align: right;
}

.status-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.status-actions form {
    margin: 0;
}

.status-actions button:disabled {
    cursor: not-allowed;
    opacity: .48;
}

.compact-list {
    display: grid;
    gap: 10px;
}

.compact-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
    background: rgba(255, 255, 255, .035);
}

.compact-row strong {
    color: var(--muted);
    font-size: 12px;
}

.ultra-compat-card {
    margin-bottom: 18px;
}

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

.ultra-item {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    background: rgba(255, 255, 255, .035);
}

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

.ultra-item strong,
.ultra-item code,
.ultra-item pre {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--text-soft);
}

.ultra-item code,
.ultra-item pre {
    margin: 0;
    border: 1px solid rgba(56, 215, 255, .18);
    border-radius: var(--radius);
    padding: 10px;
    background: rgba(5, 11, 20, .58);
    font-size: 12px;
    line-height: 1.55;
    white-space: pre-wrap;
}

.copy-button {
    margin-top: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 7px 10px;
    color: var(--text);
    background: rgba(255, 255, 255, .04);
    cursor: pointer;
    font-size: 12px;
    font-weight: 900;
}

.credential-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
    border-top: 1px solid var(--line);
    padding-top: 16px;
}

.credential-actions form {
    margin: 0;
}

.commercial-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, .34fr);
    gap: 18px;
    align-items: start;
}

.commercial-hero {
    position: relative;
    overflow: hidden;
}

.commercial-hero::after {
    position: absolute;
    inset: auto 26px 22px auto;
    width: 140px;
    height: 140px;
    border: 1px solid rgba(56, 215, 255, .14);
    border-radius: 999px;
    background: radial-gradient(circle, rgba(56, 215, 255, .13), transparent 64%);
    content: "";
    pointer-events: none;
}

.commercial-hero-tags,
.commercial-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.commercial-hero-tags {
    margin-top: 16px;
}

.commercial-hero-tags span,
.pricing-tier-note {
    border: 1px solid rgba(56, 215, 255, .18);
    border-radius: 999px;
    padding: 7px 10px;
    color: var(--text-soft);
    background: rgba(56, 215, 255, .07);
    font-size: 12px;
    font-weight: 900;
}

.commercial-action-bar {
    position: sticky;
    top: 12px;
    z-index: 4;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    border: 1px solid rgba(56, 215, 255, .22);
    border-radius: var(--radius);
    padding: 14px;
    background: linear-gradient(135deg, rgba(12, 28, 48, .96), rgba(8, 18, 31, .96));
    box-shadow: 0 16px 48px rgba(0, 0, 0, .22);
    backdrop-filter: blur(12px);
}

.commercial-action-bar strong,
.pricing-tier-head span {
    display: block;
    color: var(--text);
    font-weight: 900;
}

.commercial-action-bar span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.commercial-rule-form {
    min-width: 0;
}

.commercial-side {
    display: grid;
    gap: 18px;
}

.commercial-section {
    margin-top: 24px;
    border-top: 1px solid var(--line);
    padding-top: 18px;
}

.commercial-section h3 {
    margin: 0 0 6px;
}

.pricing-tier-group {
    margin-top: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: linear-gradient(180deg, rgba(15, 33, 55, .72), rgba(8, 20, 33, .78));
    box-shadow: 0 14px 38px rgba(0, 0, 0, .14);
}

.pricing-tier-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    border-bottom: 1px solid var(--line);
    padding: 16px;
}

.pricing-tier-head h3 {
    margin: 4px 0 6px;
}

.pricing-tier-head p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.pricing-tier-note {
    border-radius: var(--radius);
}

.compact-premium-table {
    min-width: 980px;
}

.compact-premium-table .form-control {
    min-width: 110px;
    padding: 10px;
    font-size: 12px;
}

.money-input {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(5, 11, 20, .42);
}

.money-input > span {
    align-self: stretch;
    display: grid;
    place-items: center;
    min-width: 46px;
    border-right: 1px solid var(--line);
    color: var(--accent);
    background: rgba(56, 215, 255, .07);
    font-size: 12px;
    font-weight: 900;
}

.money-input .form-control {
    border: 0;
    border-radius: 0;
    background: transparent;
}

.money-input-table {
    min-width: 148px;
}

.commercial-simulator-card {
    border-color: rgba(56, 215, 255, .22);
}

.commercial-result {
    margin-top: 18px;
    border-color: rgba(56, 215, 255, .24);
    background: linear-gradient(135deg, rgba(13, 34, 58, .94), rgba(7, 16, 27, .94));
}

.commercial-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.commercial-summary-card {
    min-height: 132px;
    border: 1px solid rgba(56, 215, 255, .17);
    border-radius: var(--radius);
    padding: 16px;
    background: rgba(5, 11, 20, .34);
}

.commercial-summary-card span,
.commercial-summary-card small {
    display: block;
}

.commercial-summary-card span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.commercial-summary-card strong {
    display: block;
    margin-top: 8px;
    color: var(--text);
    font-size: 25px;
    line-height: 1.1;
}

.commercial-summary-card small {
    margin-top: 10px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.commercial-total-card {
    border-color: rgba(56, 215, 255, .42);
    background: linear-gradient(135deg, rgba(56, 215, 255, .16), rgba(20, 184, 166, .08));
}

.commercial-total-card strong {
    color: var(--accent);
    font-size: 32px;
}

.commercial-message-box {
    min-height: 300px;
    resize: vertical;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    line-height: 1.55;
}

.commercial-copy-button {
    padding: 10px 14px;
    border-color: rgba(56, 215, 255, .3);
    color: var(--text);
    background: rgba(56, 215, 255, .09);
}

.audit-detail-grid {
    display: grid;
    gap: 12px;
}

.audit-json {
    overflow: auto;
    max-height: 520px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 18px;
    color: #dff7ff;
    background: rgba(4, 12, 26, .72);
    font-size: 13px;
    line-height: 1.65;
    white-space: pre-wrap;
}

.audit-user-agent {
    overflow-wrap: anywhere;
}

.pagination-shell {
    margin-top: 16px;
}

.pagination-shell nav {
    color: var(--muted);
}

.commercial-bottom-actions {
    border-top: 1px solid var(--line);
    padding-top: 18px;
}

.settings-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, .42fr);
    gap: 18px;
    align-items: start;
}

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

.settings-aside {
    display: grid;
    gap: 14px;
}

.settings-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    background: linear-gradient(180deg, rgba(15, 33, 55, .88), rgba(8, 20, 33, .92));
    box-shadow: 0 14px 42px rgba(0, 0, 0, .18);
}

.settings-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.settings-card-head h3 {
    margin: 0 0 5px;
    font-size: 17px;
}

.settings-card-head p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

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

.setting-field {
    display: grid;
    gap: 8px;
}

.setting-field span {
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 900;
}

.setting-field small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.settings-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    background: rgba(255, 255, 255, .035);
}

.settings-submit {
    width: auto;
    min-width: 240px;
    margin-top: 0;
}

.settings-actions span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.readonly-list {
    display: grid;
    gap: 10px;
}

.readonly-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
    background: rgba(255, 255, 255, .035);
}

.readonly-row strong,
.readonly-row span {
    display: block;
}

.readonly-row strong {
    margin-bottom: 4px;
    font-size: 13px;
}

.readonly-row div span {
    color: var(--muted);
    font-size: 11px;
}

.badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.variable-group {
    border-top: 1px solid var(--line);
    margin-top: 16px;
    padding-top: 16px;
}

.variable-group:first-of-type {
    border-top: 0;
    margin-top: 0;
    padding-top: 0;
}

.checkbox-field {
    align-items: center;
    display: flex;
    flex-direction: row;
    gap: 10px;
    min-height: 56px;
}

.checkbox-field input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--cyan-500);
}

.sticky-action-bar {
    position: sticky;
    bottom: 16px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(56, 215, 255, .22);
    border-radius: var(--radius);
    margin-top: 18px;
    padding: 14px;
    background: rgba(5, 11, 20, .9);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.btn-primary {
    border: 0;
    border-radius: var(--radius);
    padding: 12px 16px;
    color: #04111d;
    background: linear-gradient(135deg, var(--cyan-400), var(--blue-500));
    font-weight: 900;
    cursor: pointer;
}

.status-generated {
    border-color: rgba(56, 215, 255, .3);
    color: #c9f4ff;
    background: rgba(56, 215, 255, .1);
}

.footer {
    padding: 0 clamp(18px, 4vw, 36px) 26px;
    color: var(--muted-strong);
    font-size: 12px;
}

@media (max-width: 1180px) {
    .metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

@media (max-width: 960px) {
    .auth-page {
        grid-template-columns: 1fr;
    }

    .auth-visual {
        min-height: auto;
    }

    .auth-panel {
        min-height: auto;
    }

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

    .sidebar {
        position: static;
        height: auto;
    }

    .sidebar-scroll {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        overflow: visible;
    }

    .menu-section-label {
        grid-column: 1 / -1;
    }

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

    .topbar-meta {
        justify-content: flex-start;
    }

    .dashboard-hero,
    .panel-grid,
    .settings-layout,
    .commercial-layout,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .page-hero {
        flex-direction: column;
    }
}

@media (max-width: 620px) {
    .auth-metrics,
    .metrics-grid,
    .commercial-summary-grid,
    .module-grid,
    .sidebar-scroll,
    .settings-fields,
    .ultra-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .settings-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .settings-submit {
        width: 100%;
        min-width: 0;
    }

    .form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .commercial-action-bar,
    .sticky-action-bar,
    .pricing-tier-head {
        align-items: stretch;
        flex-direction: column;
    }

    .commercial-action-buttons {
        flex-direction: column;
    }

    .auth-card,
    .hero-card,
    .panel-card,
    .metric-card {
        padding: 18px;
    }

    .hero-card h2 {
        font-size: 32px;
    }

    .nav-badge {
        display: none;
    }

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