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

:root {
    --bg: #efeee8;
    --bg-soft: #fbf8f2;
    --panel: rgba(255, 255, 255, 0.8);
    --panel-strong: #ffffff;
    --ink: #17211f;
    --muted: #66736f;
    --line: rgba(23, 33, 31, 0.09);
    --teal: #0f766e;
    --teal-deep: #0a5752;
    --forest: #12211d;
    --sand: #c08149;
    --danger: #b42318;
    --success: #166534;
    --warn: #b45309;
    --shadow: 0 24px 80px rgba(18, 33, 29, 0.11);
    --radius-xl: 10px;
    --radius-lg: 6px;
    --radius-md: 3px;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, 0.14), transparent 28%),
        radial-gradient(circle at top right, rgba(192, 129, 73, 0.12), transparent 24%),
        linear-gradient(180deg, var(--bg-soft), var(--bg));
}

body::before,
body::after {
    content: "";
    position: fixed;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(14px);
}

body::before {
    left: -120px;
    top: 140px;
    width: 320px;
    height: 320px;
    background: rgba(15, 118, 110, 0.06);
}

body::after {
    right: -90px;
    bottom: 120px;
    width: 280px;
    height: 280px;
    background: rgba(192, 129, 73, 0.06);
}

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

.signal-value code {background: #ffffff2b;}

code {
    font-family: "IBM Plex Mono", Consolas, monospace;
    font-size: 12px;
    padding: 0.18rem 0.48rem;
    border-radius: 999px;
    background: #fff;
}

.shell {
    position: relative;
    padding: 28px 22px 64px;
}

.wrap {
    max-width: 1220px;
    margin: 0 auto;
}

.page-grid {
    display: grid;
    gap: 22px;
}

.topbar {
    position: sticky;
    top: 18px;
    z-index: 12;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(16px);
    box-shadow: 0 16px 42px rgba(18, 33, 29, 0.08);
}

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

.brand-logo {
    display: block;
    width: 86px;
    height: 24px;
    overflow: hidden;
    flex: 0 0 auto;
}

.brand-logo .load {
    display: inline-block;
    width: 165px;
    height: 45px;
    transform: scale(0.52);
    transform-origin: top left;
    background-image: url("https://retrolime.com/1/img/logo.png");
    background-repeat: no-repeat;
    animation: play 1.8s steps(43) forwards;
    transition: filter 0.2s ease;
}

.brand-logo:hover .load {
    filter: invert(27%) sepia(42%) saturate(342%) hue-rotate(71deg) brightness(95%) contrast(91%);
}

@keyframes play {
    from {
        background-position: 0 0;
    }

    to {
        background-position: -7095px 0;
    }
}

.brand-copy {
    min-width: 0;
}

.brand-copy strong {
    display: block;
    font-size: 14px;
    letter-spacing: -0.02em;
}

.brand-copy span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.nav-link,
.lang-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    transition: 0.2s ease;
}

.nav-link:hover,
.lang-link:hover {
    background: rgba(23, 33, 31, 0.05);
    color: var(--ink);
}

.nav-link.is-active,
.lang-link.is-active {
    background: linear-gradient(135deg, var(--forest), #213832);
    color: #fff;
    box-shadow: 0 14px 24px rgba(18, 33, 29, 0.16);
}

.nav-link.is-active:hover, .lang-link.is-active:hover {
    box-shadow: none;
	background: linear-gradient(135deg, #12211da1, #213832bd);
}

.lang-switch {
    display: flex;
    gap: 6px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(23, 33, 31, 0.04);
}

.ghost-button,
.primary-button,
.secondary-button,
.drawer-close {
    appearance: none;
    border: 0;
    cursor: pointer;
    font: inherit;
}

.ghost-button {
    padding: 11px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    color: var(--ink);
    font-weight: 800;
    box-shadow: inset 0 0 0 1px rgba(23, 33, 31, 0.08);
}

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 14px;
    font-weight: 800;
}

.primary-button {
    /*background: linear-gradient(135deg, var(--teal), var(--teal-deep));
    color: #fff;
    box-shadow: 0 18px 26px rgba(15, 118, 110, 0.18);*/
	background: linear-gradient(135deg, var(--forest), #213832);
	color: #fff;
	box-shadow: 0 14px 24px #12211d29;
}

.primary-button:hover {
    box-shadow: none;
	background: linear-gradient(135deg, #12211da1, #213832bd);
}

.secondary-button {
    background: rgba(23, 33, 31, 0.06);
    color: var(--ink);
}

.hero-board,
.panel,
.card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: var(--radius-xl);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.panel,
.card {
    padding: 24px;
}

.hero-board {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.95fr);
    gap: 22px;
    padding: 30px;
    background:
        linear-gradient(135deg, rgba(18, 33, 29, 0.98), rgba(14, 67, 62, 0.94)),
        linear-gradient(135deg, rgba(192, 129, 73, 0.2), transparent);
}

.hero-board::after {
    content: "";
    position: absolute;
    right: -70px;
    top: -60px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(192, 129, 73, 0.35), transparent 64%);
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin-bottom: 16px;
    border-radius: 999px;
    background: #304d48;
    color: rgba(240, 247, 244, 0.84);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-title {
    max-width: 16ch;
    color: #edf7f3;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 0.94;
    /*letter-spacing: -0.05em;*/
}

.hero-copy {
    max-width: 60ch;
    margin: 16px 0 0;
    color: rgba(237, 247, 243, 0.78);
    font-size: 15px;
    line-height: 1.75;
}

.hero-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.hero-tag {
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(237, 247, 243, 0.84);
    font-size: 13px;
    font-weight: 700;
}

.hero-stack {
    display: grid;
    gap: 12px;
    align-content: start;
}

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

.signal-card {
    padding: 18px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.signal-label {
    display: block;
    color: rgba(237, 247, 243, 0.6);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.signal-value {
    display: block;
    margin-top: 10px;
    color: #f8fbfa;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.45;
}

.signal-value--large {
    font-size: 30px;
    letter-spacing: -0.05em;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.section-head h2 {
    font-size: 28px;
    letter-spacing: -0.04em;
    margin: 0;
}

.section-head p {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

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

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.metric-card {
    display: grid;
    gap: 18px;
    min-height: 200px;
}

.metric-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.metric-value {
    font-size: 44px;
    /*line-height: 0.92;*/
    letter-spacing: -0.05em;
    font-weight: 800;
	padding-top: 2px;
}

.metric-notes {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    gap: 18px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

#settings_scope {
	cursor: not-allowed;
}

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

.ok {
    color: var(--success);
    font-weight: 800;
}

.bad {
    color: var(--danger);
    font-weight: 800;
}

.warn {
    color: var(--warn);
    font-weight: 800;
}

.status-ok {
    background: #edf7f3;
    color: var(--success);
}

.status-bad {
    background: rgba(180, 35, 24, 0.12);
    color: var(--danger);
}

.status-warn {
    background: rgba(180, 83, 9, 0.12);
    color: var(--warn);
}

.quiet-list,
.flow-list,
.guidance-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.quiet-list li,
.flow-list li,
.guidance-list li {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    line-height: 1.65;
}

.quiet-list li:last-child,
.flow-list li:last-child,
.guidance-list li:last-child {
	border-bottom: none;
}

.flow-index {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    margin-top: 2px;
    border-radius: 50%;
    background: rgba(15, 118, 110, 0.12);
    color: var(--teal-deep);
    font-size: 12px;
    font-weight: 800;
}

.detail-block {
    display: block;
    margin-top: 8px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(23, 33, 31, 0.05);
    word-break: break-word;
}

.notice {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border-radius: 20px;
    border: 1px solid transparent;
    background: var(--panel-strong);
    box-shadow: var(--shadow);
}

.notice.ok {
    border-color: rgba(22, 101, 52, 0.15);
}

.notice.bad {
    border-color: rgba(180, 35, 24, 0.16);
}

.notice.warn {
    border-color: rgba(180, 83, 9, 0.16);
}

.table-shell {
  overflow: hidden;
  border-radius: 2px;
  border: 1px solid var(--line);
  background: #ffffff85;
  padding-left: 10px;
  padding-right: 10px;
  padding-bottom: 10px;
}

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

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

td:last-child {
    border-bottom: none;
}	

th {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.upload-grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.84fr) minmax(0, 1.16fr);
    gap: 18px;
}

.auth-wrap {
    max-width: 980px;
}

.auth-topbar {
    margin-bottom: 30px;
}

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

.auth-card,
.auth-aside {
    min-height: 100%;
}

.auth-title {
    margin: 0;
    font-size: clamp(34px, 5vw, 54px);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.auth-copy {
    margin: 16px 0 24px;
    color: var(--muted);
    line-height: 1.8;
}

.auth-form {
    margin-top: 18px;
}

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

.template-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 22px;
    background: rgba(23, 33, 31, 0.035);
    box-shadow: inset 0 0 0 1px rgba(23, 33, 31, 0.06);
}

.template-card--compact {
    margin-top: 18px;
}

.template-meta {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

.detail-copy {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.code-sample {
    margin: 0;
    padding: 16px;
    border-radius: 18px;
    background: rgba(23, 33, 31, 0.05);
    color: var(--ink);
    font-family: "IBM Plex Mono", Consolas, monospace;
    font-size: 13px;
    line-height: 1.75;
    white-space: pre-wrap;
    overflow: auto;
}

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

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

label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 700;
}

input[type="text"],
input[type="password"],
input[type="url"],
input[type="number"],
input[type="month"],
input[type="file"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(23, 33, 31, 0.1);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--ink);
}

input:focus {
    outline: none;
    border-color: rgba(15, 118, 110, 0.38);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.08);
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 6px 0 2px;
}

.drawer-shell {
    position: fixed;
    inset: 0;
    z-index: 90;
    pointer-events: none;
}

.drawer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(9, 15, 14, 0.34);
    opacity: 0;
    transition: opacity 0.24s ease;
}

.drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(460px, 100%);
    height: 100%;
    padding: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.985), rgba(244, 248, 246, 0.985));
    box-shadow: -24px 0 60px rgba(18, 33, 29, 0.18);
    transform: translateX(104%);
    transition: transform 0.28s ease;
    display: grid;
    grid-template-rows: auto 1fr auto;
}

.settings-open .drawer-shell {
    pointer-events: auto;
}

.settings-open .drawer-overlay {
    opacity: 1;
}

.settings-open .drawer-panel {
    transform: translateX(0);
}

.drawer-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.drawer-head p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.drawer-close {
	width: 42px;
	height: 28px;
	border-radius: 14px;
	background: #fff;
	color: var(--ink);
	font-size: 28px;
	font-weight: 700;
	line-height: 0;
}

.drawer-body {
    overflow: auto;
    padding-right: 4px;
}

.drawer-foot {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

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

.empty-state {
    padding: 20px 0 6px;
    color: var(--muted);
}

@media (max-width: 1020px) {
    .topbar {
        position: static;
        border-radius: 28px;
        flex-direction: column;
        align-items: stretch;
    }

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

    .nav {
        justify-content: flex-start;
    }

    .hero-board,
    .content-grid,
    .metric-grid,
    .template-grid,
    .upload-grid,
    .auth-grid,
    .field-row,
    .hero-metric-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        max-width: none;
    }
}
