@font-face {
    font-family: 'GmarketSans';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/GmarketSansLight.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'GmarketSans';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/GmarketSansMedium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'GmarketSans';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/GmarketSansBold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #060b14;
    --bg-soft: #0c1320;
    --panel: rgba(15, 23, 38, 0.88);
    --panel-strong: rgba(16, 24, 39, 0.98);
    --panel-muted: rgba(20, 31, 50, 0.9);
    --line: rgba(148, 163, 184, 0.18);
    --line-strong: rgba(148, 163, 184, 0.28);
    --text: #f8fafc;
    --text-soft: #cbd5e1;
    --text-muted: #94a3b8;
    --primary: #38bdf8;
    --primary-strong: #0ea5e9;
    --primary-glow: rgba(56, 189, 248, 0.24);
    --green: #34c759;
    --red: #ff5252;
    --success: #4ade80;
    --warn: #fbbf24;
    --danger: #fb7185;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.42);
    --radius: 20px;
    --radius-sm: 12px;
    --radius-xs: 10px;
    --font-body: 'GmarketSans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'SFMono-Regular', 'Consolas', 'Menlo', monospace;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    color-scheme: dark;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    background:
        radial-gradient(circle at top left, rgba(52, 199, 89, 0.16), transparent 24rem),
        radial-gradient(circle at top right, rgba(255, 82, 82, 0.14), transparent 24rem),
        linear-gradient(180deg, #08101d 0%, #050912 100%);
    color: var(--text);
    line-height: 1.6;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
textarea {
    font: inherit;
}

code {
    font-family: var(--font-mono);
}

a {
    color: inherit;
}

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.login-shell {
    width: min(1120px, 100%);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    align-items: stretch;
}

.login-hero,
.login-card,
.surface-card {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--panel);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.login-hero {
    padding: 42px;
    min-height: 460px;
    overflow: hidden;
}

.login-hero::before,
.surface-card::before,
.hero-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 36%),
        linear-gradient(315deg, rgba(56, 189, 248, 0.06), transparent 30%);
}

.login-lockup {
    width: min(360px, 100%);
    margin-bottom: 28px;
}

.login-kicker,
.section-kicker,
.brand-kicker,
.endpoint-kicker,
.login-card-kicker,
.stat-label {
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.74rem;
}

.login-hero h1 {
    margin: 0 0 16px;
    font-size: clamp(1.8rem, 3.6vw, 3.24rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.login-hero h1 span {
    display: block;
}

.login-copy {
    margin: 0;
    max-width: 42rem;
    color: var(--text-soft);
    font-size: 1rem;
}

.login-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 460px;
    padding: 42px;
}

.login-logo {
    display: flex;
    align-items: flex-start;
    margin-bottom: 26px;
}

.login-logo h2 {
    margin: 4px 0 0;
    font-size: 1.55rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    margin-bottom: 18px;
}

.login-support {
    margin-top: auto;
    padding: 18px 20px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 42%),
        rgba(10, 16, 28, 0.78);
}

.login-support-label,
.login-support-contact,
.login-support-copy {
    margin: 0;
}

.login-support-label {
    color: var(--text-muted);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.login-support-contact {
    margin-top: 8px;
    color: var(--text-soft);
    font-size: 0.95rem;
    line-height: 1.6;
}

.login-support-contact a {
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
}

.login-support-copy {
    margin-top: 6px;
    color: #bae6fd;
    font-size: 0.88rem;
}

.page-shell {
    min-height: 100vh;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 24px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    background: rgba(8, 12, 20, 0.82);
    backdrop-filter: blur(16px);
}

.brand-block,
.brand-copy,
.topbar-actions,
.section-heading,
.endpoint-head,
.endpoint-actions,
.field-value,
.action-btns,
.create-actions,
.modal-actions {
    display: flex;
    align-items: center;
}

.brand-block {
    gap: 14px;
}

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

.brand-copy {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.brand-lockup {
    width: clamp(180px, 23vw, 240px);
}

.topbar-actions {
    gap: 12px;
}

.relay-latency-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    border-radius: 999px;
    border: 1px solid rgba(56, 189, 248, 0.2);
    background: rgba(7, 18, 31, 0.92);
    color: var(--text-soft);
    white-space: nowrap;
}

.relay-latency-chip strong {
    color: #d8f5ff;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.relay-latency-chip strong.latency-good {
    color: #86efac;
}

.relay-latency-chip strong.latency-warn {
    color: #fde68a;
}

.relay-latency-chip strong.latency-error {
    color: #fda4af;
}

.relay-latency-label {
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: -0.01em;
}

.admin-key-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, #c4a047, #e1b74f);
    color: #1f2937;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.admin-key-badge svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.user-chip,
.meta-pill,
.endpoint-badge,
.hero-badge {
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: rgba(15, 23, 38, 0.85);
    color: var(--text-soft);
}

.user-chip {
    padding: 7px 12px;
    font-size: 0.86rem;
}

.dashboard-main {
    width: min(1320px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 40px;
}

.topbar-simple {
    gap: 20px;
}

.brand-block-single {
    gap: 12px;
}

.brand-lockup-only {
    width: clamp(180px, 22vw, 236px);
}

.topbar-title {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.92rem;
    letter-spacing: -0.01em;
}

.toolbar-copy p,
.section-subcopy {
    margin: 0;
    color: var(--text-soft);
}

.hero-panel,
.surface-card {
    margin-bottom: 24px;
}

.hero-panel {
    position: relative;
    display: grid;
    grid-template-columns: 1.2fr minmax(320px, 420px);
    gap: 28px;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background:
        linear-gradient(135deg, rgba(11, 17, 30, 0.94), rgba(18, 28, 47, 0.88)),
        var(--panel);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
    overflow: hidden;
}

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

.hero-badge,
.meta-pill,
.endpoint-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 11px;
    font-size: 0.74rem;
}

.hero-badge {
    margin-bottom: 14px;
    background: rgba(14, 165, 233, 0.16);
    border-color: rgba(56, 189, 248, 0.26);
    color: #bae6fd;
}

.hero-copy h1,
.section-heading h2 {
    margin: 0;
    letter-spacing: -0.03em;
}

.hero-copy h1 {
    font-size: clamp(2rem, 3.6vw, 3rem);
    line-height: 1.1;
}

.hero-copy p {
    margin: 14px 0 0;
    max-width: 44rem;
    color: var(--text-soft);
}

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

.stat-card {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(5, 9, 18, 0.54);
}

.stat-card strong {
    display: block;
    margin-top: 8px;
    font-size: 1.08rem;
    line-height: 1.35;
}

.surface-card {
    padding: 28px;
}

.create-panel {
    padding-top: 20px;
    padding-bottom: 20px;
}

.create-panel .section-heading {
    align-items: center;
    margin-bottom: 0;
    min-height: 44px;
}

.create-panel .section-heading > div {
    gap: 2px;
    justify-content: center;
}

.create-panel .section-meta {
    display: flex;
    justify-content: flex-end;
    gap: 56px;
    align-items: center;
}

.create-panel .create-form {
    margin-top: 16px;
}

.section-heading {
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.section-heading h2 {
    font-size: 1.55rem;
}

.section-heading > div {
    display: grid;
    gap: 6px;
}

.section-meta,
.guide-grid,
.credential-grid,
.field-list,
.qr-card {
    display: grid;
}

.section-meta {
    grid-auto-flow: column;
    gap: 10px;
    justify-content: end;
}

.meta-pill-accent {
    background: rgba(56, 189, 248, 0.16);
    border-color: rgba(56, 189, 248, 0.28);
    color: #bae6fd;
}

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

.guide-card,
.endpoint-card,
.qr-card,
.create-form,
.channels-table-wrapper,
.modal-content {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(5, 10, 20, 0.5);
}

.guide-card {
    padding: 22px;
}

.guide-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-bottom: 16px;
    border-radius: 50%;
    background: rgba(56, 189, 248, 0.15);
    color: #d8f5ff;
    font-weight: 700;
}

.guide-card h3 {
    margin: 0 0 10px;
    font-size: 1.06rem;
}

.guide-card p,
.channel-meta .desc,
.time-text,
.credential-note,
.qr-text {
    margin: 0;
    color: var(--text-soft);
}

.inline-code,
.slug,
.field-value code {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 6px 10px;
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.58);
    border: 1px solid rgba(148, 163, 184, 0.12);
    color: #e2e8f0;
    font-family: var(--font-mono);
}

.inline-code,
.slug {
    min-height: auto;
    font-size: 0.84rem;
}

.card-key {
    color: var(--text-muted);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.credentials-panel {
    overflow: hidden;
}

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

.endpoint-card {
    padding: 22px;
}

.endpoint-head {
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.endpoint-head h3 {
    margin: 4px 0 0;
    font-size: 1.25rem;
}

.endpoint-badge {
    background: rgba(52, 199, 89, 0.12);
    border-color: rgba(52, 199, 89, 0.24);
    color: #bbf7d0;
}

.field-list {
    gap: 10px;
}

.field-row {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.field-row-compact .field-value code {
    white-space: nowrap;
}

.field-label {
    padding-top: 8px;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.field-value {
    min-width: 0;
}

.field-value code {
    width: 100%;
    justify-content: flex-start;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

.address-field-list {
    gap: 12px;
}

.address-field-row {
    grid-template-columns: 96px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
}

.field-copy-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.qr-card {
    grid-template-columns: minmax(0, 1fr) 168px;
    gap: 16px;
    align-items: center;
    margin-top: 18px;
    padding: 16px;
}

.qr-title {
    margin: 0 0 6px;
    font-size: 1rem;
}

.qr-image {
    width: 168px;
    height: 168px;
    padding: 10px;
    border-radius: 18px;
    background: #ffffff;
    justify-self: end;
}

.credential-note {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(251, 191, 36, 0.24);
    background: rgba(251, 191, 36, 0.08);
    color: #fde68a;
}

.create-form {
    padding: 18px;
}

.channels-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.channel-card {
    display: grid;
    gap: 18px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(5, 10, 20, 0.54);
}

.channel-card-disabled {
    opacity: 0.62;
}

.card-header,
.card-tags,
.card-actions,
.address-head,
.address-actions,
.card-foot,
.qr-modal-head {
    display: flex;
    align-items: center;
}

.card-header {
    justify-content: space-between;
    gap: 14px;
}

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

.card-heading strong {
    font-size: 1.16rem;
    line-height: 1.25;
}

.card-tags {
    gap: 8px;
    flex-wrap: wrap;
}

.card-actions {
    gap: 8px;
    flex-wrap: nowrap;
    justify-content: flex-end;
    white-space: nowrap;
}

.card-actions form {
    margin: 0;
    flex: 0 0 auto;
}

.card-description {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.95rem;
}

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

.address-panel {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 20px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.03), transparent 42%),
        rgba(2, 6, 23, 0.4);
}

.address-head {
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
}

.address-head > div {
    display: grid;
    gap: 4px;
}

.address-label {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.address-target {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.signal-status {
    gap: 8px;
    padding: 7px 11px;
    white-space: nowrap;
}

.signal-status::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.04);
}

.address-code,
.qr-url-code {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 10px 13px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(2, 6, 23, 0.72);
    color: #e2e8f0;
    font-family: var(--font-mono);
    font-size: 0.86rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

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

.card-foot {
    justify-content: space-between;
    gap: 14px;
    padding-top: 2px;
    color: var(--text-muted);
    font-size: 0.8rem;
    flex-wrap: wrap;
}

.card-foot code {
    display: inline-flex;
    padding: 2px 7px;
    border-radius: 8px;
    background: rgba(15, 23, 38, 0.72);
}

.qr-modal-content {
    width: min(520px, 100%);
}

.qr-modal-head {
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.qr-modal-body {
    display: grid;
    gap: 16px;
}

.qr-image-large {
    width: min(320px, 100%);
    height: auto;
    margin: 0 auto;
}

.qr-url-code {
    text-align: center;
}

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

.form-group {
    margin-bottom: 14px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    color: var(--text-soft);
    font-size: 0.92rem;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group textarea {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.55);
    color: var(--text);
    padding: 12px 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #64748b;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(56, 189, 248, 0.58);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14);
    background: rgba(6, 10, 18, 0.82);
}

.form-group-wide {
    grid-column: span 1;
}

.create-actions {
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 14px;
    cursor: pointer;
    font-size: 0.92rem;
    font-weight: 500;
    text-decoration: none;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

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

.btn:disabled {
    opacity: 0.55;
    cursor: default;
    transform: none;
}

.btn-primary {
    background: var(--primary-strong);
    color: #04121d;
    box-shadow: none;
    font-weight: 700;
}

.btn-primary:hover {
    background: #38bdf8;
    box-shadow: none;
}

.btn-ghost {
    background: rgba(15, 23, 38, 0.82);
    color: var(--text-soft);
    border-color: rgba(148, 163, 184, 0.2);
}

.btn-ghost:hover {
    color: var(--text);
    background: rgba(22, 33, 52, 0.92);
}

.btn-warn {
    background: rgba(251, 191, 36, 0.12);
    color: #fde68a;
    border-color: rgba(251, 191, 36, 0.22);
}

.btn-success {
    background: rgba(74, 222, 128, 0.12);
    color: #bbf7d0;
    border-color: rgba(74, 222, 128, 0.22);
}

.btn-danger {
    background: rgba(244, 63, 94, 0.12);
    color: #fecdd3;
    border-color: rgba(251, 113, 133, 0.22);
}

.btn-add-channel {
    min-width: 126px;
    font-size: 1.2rem;
    line-height: 1;
    letter-spacing: -0.02em;
}

.btn-full {
    width: 100%;
}

.btn-sm {
    min-height: 38px;
    padding: 0 13px;
    font-size: 0.86rem;
}

.btn-xs {
    min-height: 34px;
    padding: 0 12px;
    font-size: 0.8rem;
    border-radius: 12px;
}

.alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(15, 23, 38, 0.72);
}

.alert-success {
    border-color: rgba(74, 222, 128, 0.24);
    background: rgba(34, 197, 94, 0.12);
    color: #bbf7d0;
}

.alert-error {
    border-color: rgba(251, 113, 133, 0.24);
    background: rgba(244, 63, 94, 0.12);
    color: #fecdd3;
}

.alert-close {
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 1.15rem;
}

.channels-table-wrapper {
    overflow: hidden;
}

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

.channels-table th,
.channels-table td {
    padding: 16px 18px;
    text-align: left;
    vertical-align: top;
}

.channels-table th {
    color: var(--text-muted);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border-bottom: 1px solid var(--line);
}

.channels-table td {
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.channels-table tr:last-child td {
    border-bottom: 0;
}

.channels-table tbody tr:hover {
    background: rgba(15, 23, 38, 0.46);
}

.row-disabled {
    opacity: 0.56;
}

.channel-name {
    display: grid;
    gap: 6px;
}

.channel-name strong {
    font-size: 1rem;
}

.status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 11px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.status-on {
    border-color: rgba(74, 222, 128, 0.22);
    background: rgba(34, 197, 94, 0.12);
    color: #bbf7d0;
}

.status-off {
    border-color: rgba(251, 113, 133, 0.24);
    background: rgba(244, 63, 94, 0.12);
    color: #fecdd3;
}

.status-neutral {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(51, 65, 85, 0.22);
    color: #cbd5e1;
}

.action-btns {
    gap: 8px;
    flex-wrap: wrap;
}

.action-btns form {
    margin: 0;
}

.empty-state {
    padding: 46px 18px;
    text-align: center;
    color: var(--text-soft);
    border: 1px dashed rgba(148, 163, 184, 0.2);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.24);
}

.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(2, 6, 23, 0.65);
    backdrop-filter: blur(10px);
    z-index: 80;
}

.modal-content {
    width: min(520px, 100%);
    padding: 24px;
}

.confirm-modal-content {
    width: min(420px, 100%);
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 42%),
        rgba(8, 12, 20, 0.94);
}

.modal-content h3 {
    margin: 0 0 18px;
    font-size: 1.3rem;
}

.modal-actions {
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%) translateY(120%);
    min-width: 220px;
    max-width: calc(100% - 24px);
    padding: 12px 16px;
    border-radius: 16px;
    border: 1px solid rgba(56, 189, 248, 0.28);
    background: rgba(7, 11, 20, 0.95);
    color: var(--text);
    box-shadow: 0 16px 30px rgba(2, 6, 23, 0.32);
    transition: transform 0.22s ease;
    z-index: 120;
    text-align: center;
    pointer-events: none;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #060c16;
}

::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

@media (max-width: 1080px) {
    .login-shell,
    .hero-panel,
    .credential-grid,
    .toolbar-panel {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .guide-grid {
        grid-template-columns: 1fr;
    }

    .channels-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .topbar,
    .section-heading,
    .endpoint-head,
    .topbar-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-main {
        width: min(100% - 20px, 1320px);
        padding-top: 20px;
    }

    .surface-card,
    .hero-panel,
    .login-card,
    .login-hero {
        padding: 22px;
        border-radius: 24px;
    }

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

    .section-meta {
        grid-auto-flow: row;
        justify-content: start;
    }

    .create-panel .section-meta {
        gap: 16px;
        justify-content: flex-start;
    }

    .form-row,
    .field-row,
    .qr-card,
    .address-grid {
        grid-template-columns: 1fr;
    }

    .qr-image {
        justify-self: start;
    }

    .card-header,
    .card-foot,
    .qr-modal-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .card-actions {
        align-items: center;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: flex-start;
    }

    .channels-table-wrapper {
        overflow-x: auto;
    }
}

@media (max-width: 560px) {
    .login-page {
        padding: 20px 12px;
    }

    .dashboard-main {
        width: calc(100% - 12px);
    }

    .topbar {
        padding: 16px 14px;
    }

    .relay-latency-chip {
        white-space: normal;
    }

    .brand-lockup {
        width: 170px;
    }

    .hero-copy h1 {
        font-size: 1.85rem;
    }

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

    .endpoint-actions,
    .create-actions,
    .modal-actions,
    .action-btns,
    .address-actions,
    .field-copy-actions {
        width: 100%;
    }

    .endpoint-actions .btn,
    .create-actions .btn,
    .modal-actions .btn,
    .action-btns .btn,
    .address-actions .btn,
    .field-copy-actions .btn {
        width: 100%;
    }

    .action-btns form {
        width: 100%;
    }

    .action-btns form .btn {
        width: 100%;
    }

    .card-actions {
        width: auto;
        max-width: 100%;
        overflow-x: auto;
        padding-bottom: 2px;
    }
}
