:root {
    --tnyx-sidebar: #1c2433;
    --tnyx-sidebar-text: #c5cdd8;
    --tnyx-accent: #0b6bcb;
    --tnyx-accent-deep: #084e94;
    --tnyx-bg: #f3efe6;
    --tnyx-paper: #fffdf8;
    --tnyx-ink: #1c1917;
    --tnyx-muted: #6b645c;
    --tnyx-line: #e6dfd2;
    --tnyx-topbar-h: 60px;
    --tnyx-radius: 14px;
}

body.tnyx {
    background:
        radial-gradient(900px 420px at 8% -10%, rgba(11, 107, 203, 0.08), transparent 55%),
        radial-gradient(700px 360px at 100% 0%, rgba(180, 120, 60, 0.08), transparent 50%),
        var(--tnyx-bg);
    min-height: 100vh;
    color: var(--tnyx-ink);
    font-family: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}

.tnyx-topbar {
    height: var(--tnyx-topbar-h);
    background: rgba(255, 253, 248, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--tnyx-line);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 22px;
    position: sticky;
    top: 0;
    z-index: 30;
}

.tnyx-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: Fraunces, Georgia, serif;
    font-weight: 650;
    font-size: 1.28rem;
    letter-spacing: -0.03em;
    color: var(--tnyx-ink);
    text-decoration: none;
}

.tnyx-brand:hover { color: var(--tnyx-accent); }

.tnyx-mark {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--tnyx-accent);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: Fraunces, Georgia, serif;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1;
}

.tnyx-topbar .who {
    color: var(--tnyx-muted);
    font-size: 0.9rem;
}

.tnyx-body {
    display: flex;
    min-height: calc(100vh - var(--tnyx-topbar-h));
}

.tnyx-sidebar {
    width: 228px;
    flex-shrink: 0;
    background: var(--tnyx-sidebar);
    padding: 22px 12px;
}

.tnyx-nav-label {
    margin: 16px 12px 8px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8b95a5;
}

.tnyx-nav-label:first-child { margin-top: 0; }

.tnyx-sidebar a {
    display: block;
    color: var(--tnyx-sidebar-text);
    text-decoration: none;
    padding: 9px 12px;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 8px;
}

.tnyx-sidebar a:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }

.tnyx-sidebar a.active {
    background: rgba(11, 107, 203, 0.28);
    color: #fff;
}

.tnyx-main {
    flex: 1;
    padding: 28px 32px 56px;
    max-width: 1120px;
}

body.is-guest .tnyx-main {
    max-width: 480px;
    margin: 48px auto;
    width: 100%;
}

body.is-landing .tnyx-main {
    max-width: 920px;
    margin: 36px auto 64px;
}

.tnyx-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.tnyx-page-head h1,
.tnyx-hero h1 {
    font-family: Fraunces, Georgia, serif;
    font-weight: 650;
    letter-spacing: -0.03em;
    font-size: 2rem;
    line-height: 1.15;
    margin: 0 0 6px;
}

.tnyx-page-head .text-secondary,
.tnyx-lede {
    color: var(--tnyx-muted) !important;
}

.tnyx-eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tnyx-accent);
}

.tnyx-hero { margin-bottom: 28px; }

.tnyx-hero .tnyx-lede {
    font-size: 1.12rem;
    max-width: 38rem;
    margin: 0;
}

.tnyx-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 22px;
}

.tnyx-card {
    margin-bottom: 20px;
    background: var(--tnyx-paper);
    border: 1px solid var(--tnyx-line);
    border-radius: var(--tnyx-radius);
    box-shadow: 0 10px 28px rgba(48, 36, 16, 0.05);
}

.tnyx-card .card-body { padding: 1.25rem 1.35rem; }

.tnyx-card h2.h5 {
    font-family: Fraunces, Georgia, serif;
    font-weight: 600;
}

.tnyx-feature .card-body { min-height: 100%; }

.tnyx-feature strong {
    display: block;
    font-family: Fraunces, Georgia, serif;
    font-size: 1.15rem;
    margin-bottom: 6px;
}

.tnyx-feature p { color: var(--tnyx-muted); margin: 0; }

.tnyx-empty {
    text-align: center;
    padding: 40px 24px;
}

.tnyx-empty h2 {
    font-family: Fraunces, Georgia, serif;
    font-size: 1.45rem;
    margin-bottom: 8px;
}

.tnyx-empty p {
    color: var(--tnyx-muted);
    max-width: 28rem;
    margin: 0 auto 18px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.stat-grid .card-body { padding: 14px 16px; }
.stat-grid strong { display: block; font-size: 1.15rem; }
.stat-grid span { color: var(--tnyx-muted); font-size: 0.8rem; }

.tnyx-daybars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 88px;
    margin: 0 0 1.1rem;
    padding: 8px 4px 0;
    border-bottom: 1px solid var(--tnyx-line);
}

.tnyx-daybar {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: flex-end;
}

.tnyx-daybar span {
    display: block;
    width: 100%;
    min-height: 2px;
    background: var(--tnyx-accent);
    opacity: 0.85;
    border-radius: 2px 2px 0 0;
}

.qr-preview { text-align: center; }
.qr-preview img {
    width: min(240px, 100%);
    height: auto;
    background: #fff;
    border: 1px solid var(--tnyx-line);
    border-radius: 10px;
}

.form-control-color { width: 100%; height: 42px; }

.form-control,
.form-select {
    border-color: #ddd4c6;
    border-radius: 10px;
    padding: 0.55rem 0.75rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--tnyx-accent);
    box-shadow: 0 0 0 0.2rem rgba(11, 107, 203, 0.15);
}

.btn { border-radius: 10px; font-weight: 600; padding: 0.5rem 0.95rem; }

.btn-primary { background: var(--tnyx-accent); border-color: var(--tnyx-accent); }
.btn-primary:hover,
.btn-primary:focus { background: var(--tnyx-accent-deep); border-color: var(--tnyx-accent-deep); }

.btn-outline-secondary {
    border-color: #cfc6b8;
    color: var(--tnyx-ink);
}

.table { --bs-table-bg: transparent; }
.table thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--tnyx-muted);
    font-weight: 700;
}

.tnyx-auth-switch {
    margin-top: 1rem;
    color: var(--tnyx-muted);
}

.tnyx-auth-advanced summary {
    cursor: pointer;
    color: var(--tnyx-muted);
    font-weight: 600;
}

.tnyx-auth-advanced[open] summary {
    margin-bottom: 0.25rem;
}

.tnyx-footer {
    padding: 16px 22px 28px;
    color: var(--tnyx-muted);
    font-size: 0.9rem;
}

.tnyx-footer a {
    color: var(--tnyx-muted);
    font-weight: 600;
    text-decoration: none;
    margin-right: 1.1rem;
}

.tnyx-footer a:hover { color: var(--tnyx-accent); }

body.has-sidebar .tnyx-footer { padding-left: 250px; }

.tnyx-trust h2 {
    font-family: Fraunces, Georgia, serif;
    font-size: 1.2rem;
    margin: 1.4rem 0 0.4rem;
}

.tnyx-trust h2:first-child { margin-top: 0; }

.tnyx-trust p { color: var(--tnyx-muted); }

.tnyx-dns-steps {
    margin: 0 0 0.85rem;
    padding-left: 1.15rem;
    color: var(--tnyx-muted);
}

.tnyx-dns-steps li { margin-bottom: 0.35rem; }

.tnyx-dns-live {
    display: inline-block;
    margin-left: 0.35rem;
    font-size: 0.86rem;
}

.tnyx-dns-table {
    --bs-table-bg: transparent;
    font-size: 0.86rem;
}

.tnyx-dns-table th {
    color: var(--tnyx-muted);
    font-weight: 600;
    border-bottom-color: var(--tnyx-line);
}

.tnyx-dns-table td {
    vertical-align: middle;
    border-color: var(--tnyx-line);
}

.tnyx-dns-table code {
    font-size: 0.82rem;
    word-break: break-all;
}

@media (max-width: 767.98px) {
    .tnyx-sidebar { display: none; }
    .tnyx-main { padding: 18px 16px 40px; }
    body.has-sidebar .tnyx-footer { padding-left: 22px; }
    .tnyx-feature-grid { grid-template-columns: 1fr; }
    .tnyx-page-head h1,
    .tnyx-hero h1 { font-size: 1.7rem; }
}
