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

:root {
    --bg: #0f1117;
    --bg-card: #1a1d27;
    --bg-hover: #22263a;
    --border: #2a2e3f;
    --text: #e4e6ed;
    --text-muted: #8b8fa3;
    --primary: #6366f1;
    --primary-hover: #818cf8;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --radius: 10px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--primary-hover);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Navbar */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 64px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 200;
}

.app-navbar {
    background: rgba(15, 17, 26, 0.82);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(16px);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
    text-decoration: none;
    transition: color 0.15s;
}

.nav-brand:hover {
    color: var(--primary-hover);
    text-decoration: none;
}

.nav-brand-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 10px;
    color: var(--primary);
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-links a:not(.btn) {
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.nav-link-item {
    padding: 8px 12px;
    border-radius: 8px;
}

.nav-links a:not(.btn):hover,
.nav-links a:not(.btn).active {
    color: var(--text);
    background: rgba(99, 102, 241, 0.1);
}

.nav-user {
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 4px 12px;
    background: var(--bg-hover);
    border-radius: 20px;
}

.nav-user-pill {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 999px;
    margin-left: 4px;
}

/* App shell (logged-in pages) */
.page-app {
    overflow-x: hidden;
}

.app-shell {
    position: relative;
    min-height: calc(100vh - 64px);
}

.page-app .app-shell > .auth-bg {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.page-app .main {
    position: relative;
    z-index: 1;
}

.hud-panel {
    background: rgba(26, 29, 39, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

/* Main */
.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}

.main-wide {
    max-width: 1680px;
}

.main-full {
    padding: 0;
}

/* Auth */
.page-auth {
    overflow-x: hidden;
}

.auth-page {
    position: relative;
    min-height: 100vh;
}

.auth-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(99, 102, 241, 0.22) 0%, transparent 55%),
                radial-gradient(ellipse 60% 50% at 100% 100%, rgba(139, 92, 246, 0.12) 0%, transparent 50%),
                var(--bg);
}

.auth-bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.45;
}

.auth-bg-glow-1 {
    width: 420px;
    height: 420px;
    top: -120px;
    left: -80px;
    background: rgba(99, 102, 241, 0.35);
}

.auth-bg-glow-2 {
    width: 360px;
    height: 360px;
    bottom: -100px;
    right: -60px;
    background: rgba(168, 85, 247, 0.2);
}

.auth-bg-grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 75%);
}

.auth-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    gap: 20px;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 36px 32px 28px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-logo {
    width: 60px;
    height: 60px;
    background: linear-gradient(145deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.12) 100%);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    color: var(--primary);
}

.auth-logo-secure {
    color: #a78bfa;
    background: linear-gradient(145deg, rgba(167, 139, 250, 0.18) 0%, rgba(99, 102, 241, 0.1) 100%);
}

.auth-logo-secure .material-symbols-outlined {
    font-size: 30px;
}

.auth-domain-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--primary);
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.22);
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 12px;
}

.auth-header h1 {
    font-size: 1.45rem;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.auth-step-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--bg-hover);
    border: 1px solid var(--border);
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 20px;
}

.auth-alert {
    margin-bottom: 20px;
}

.auth-form .form-group {
    margin-bottom: 16px;
}

.input-icon-wrap {
    position: relative;
}

.input-icon-wrap .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--text-muted);
    opacity: 0.7;
    pointer-events: none;
}

.input-icon-wrap input {
    padding-left: 44px !important;
}

.input-icon-wrap input::placeholder {
    color: var(--text-muted);
    opacity: 0.55;
}

.auth-options {
    margin: 4px 0 22px;
}

.auth-switch {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.2s, background 0.2s;
}

.auth-switch:hover {
    border-color: rgba(99, 102, 241, 0.35);
    background: rgba(99, 102, 241, 0.06);
}

.auth-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.auth-switch-track {
    flex-shrink: 0;
    width: 44px;
    height: 26px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    position: relative;
    transition: background 0.2s, border-color 0.2s;
}

.auth-switch-track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: transform 0.2s, background 0.2s;
}

.auth-switch input:checked + .auth-switch-track {
    background: rgba(99, 102, 241, 0.25);
    border-color: var(--primary);
}

.auth-switch input:checked + .auth-switch-track::after {
    transform: translateX(18px);
    background: var(--primary);
}

.auth-switch-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.3;
}

.auth-switch-text strong {
    font-size: 0.9rem;
    font-weight: 600;
}

.auth-switch-text small {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 20px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
}

.auth-submit .material-symbols-outlined {
    font-size: 20px;
}

.auth-notice {
    display: flex;
    gap: 14px;
    margin-top: 24px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid rgba(99, 102, 241, 0.18);
    border-radius: 14px;
}

.auth-notice-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.15);
    border-radius: 10px;
    color: var(--primary);
}

.auth-notice-icon .material-symbols-outlined {
    font-size: 22px;
}

.auth-notice-body {
    flex: 1;
    min-width: 0;
}

.auth-notice-title {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin: 0 0 4px;
}

.auth-notice-price {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--text);
}

.auth-notice-price span {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.auth-notice-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0 0 10px;
    line-height: 1.45;
}

.auth-telegram-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #38bdf8;
    text-decoration: none;
    padding: 6px 12px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 8px;
    transition: background 0.2s, border-color 0.2s;
}

.auth-telegram-link:hover {
    background: rgba(56, 189, 248, 0.18);
    border-color: rgba(56, 189, 248, 0.4);
    color: #7dd3fc;
}

.auth-footer {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.auth-back-link:hover {
    color: var(--primary);
}

.auth-back-link .material-symbols-outlined {
    font-size: 18px;
}

.auth-tagline {
    font-size: 0.82rem;
    color: var(--text-muted);
    opacity: 0.65;
    text-align: center;
    margin: 0;
}

.auth-card-pin .auth-header {
    margin-bottom: 24px;
}

.form-group-pin {
    text-align: center;
}

.pin-input-wrap {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

.auth-form-pin .pin-input {
    width: 100%;
    max-width: 220px;
    padding: 14px 20px;
    font-size: 1.5rem;
    letter-spacing: 0.45em;
    text-align: center;
    border-radius: 14px;
    border: 2px solid var(--border);
    background: var(--bg);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-form-pin .pin-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

/* Forms */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group small {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
    text-decoration: none;
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: var(--bg-hover);
    color: var(--text);
    text-decoration: none;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 12px 28px;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.alert-success {
    background: rgba(34, 197, 94, 0.12);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.alert-error {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

/* Page header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
}

.page-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon-blue { background: rgba(99, 102, 241, 0.15); color: var(--primary); }
.stat-icon-green { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.stat-icon-purple { background: rgba(168, 85, 247, 0.15); color: #a855f7; }

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.card-header h2 {
    font-size: 1.1rem;
}

/* Table */
.table-responsive {
    overflow-x: auto;
}

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

.table th,
.table td {
    padding: 14px 20px;
    text-align: left;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
}

.table th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody tr:hover {
    background: var(--bg-hover);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--bg-hover);
    color: var(--text-muted);
}

.badge-success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.badge-purple {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
}

.badge-admin {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.badge-lg {
    padding: 5px 14px;
    font-size: 0.85rem;
}

/* URL cell */
.url-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.url-text {
    font-size: 0.8rem;
    color: var(--primary-hover);
    background: var(--bg);
    padding: 4px 8px;
    border-radius: 4px;
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.url-large {
    max-width: 500px;
    font-size: 0.9rem;
}

.btn-copy {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    font-family: inherit;
    transition: all 0.2s;
}

.btn-copy:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.action-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state svg {
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state h3 {
    color: var(--text);
    margin-bottom: 8px;
}

.empty-state p {
    margin-bottom: 24px;
}

.empty-state-sm {
    padding: 30px;
}

/* Form card */
.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
}

.form-section {
    margin-bottom: 32px;
}

.form-section h3 {
    font-size: 1rem;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.form-actions {
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

/* Template grid */
.template-count {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.template-search {
    margin-bottom: 0;
    flex: 1;
    min-width: 0;
}

.template-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
    align-items: stretch;
}

.template-category-filter {
    flex: 0 0 auto;
    min-width: 200px;
}

.template-category-filter select {
    width: 100%;
    height: 100%;
    min-height: 42px;
    padding: 10px 36px 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.template-category-filter select:focus {
    outline: none;
    border-color: var(--primary);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 560px) {
    .template-category-filter {
        flex: 1 1 100%;
        min-width: 0;
    }
}

.template-search input {
    width: 100%;
    min-height: 42px;
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.9rem;
    font-family: inherit;
}

.template-groups {
    max-height: 480px;
    overflow-y: auto;
    padding-right: 4px;
}

.template-group {
    margin-bottom: 20px;
}

.template-group-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.template-card input {
    display: none;
}

.template-card-inner {
    padding: 14px 10px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 110px;
}

.template-card input:checked + .template-card-inner {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
}

.template-card-inner:hover {
    border-color: var(--primary-hover);
}

.template-icon {
    margin-bottom: 10px;
    color: var(--primary);
}

.template-icon-letter {
    width: 36px;
    height: 36px;
    background: rgba(99, 102, 241, 0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-weight: 700;
    font-size: 1rem;
}

.template-card-inner strong {
    display: block;
    font-size: 0.8rem;
    margin-bottom: 4px;
    line-height: 1.2;
}

.template-card-inner span {
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1.3;
    display: block;
}

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

.template-picker-main {
    min-width: 0;
}

.template-preview-panel {
    position: sticky;
    top: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
}

.template-preview-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.template-preview-header h4 {
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.template-preview-header p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

.template-preview-device {
    background: #0f172a;
    border-radius: 22px;
    padding: 10px;
    border: 2px solid #334155;
    box-shadow: inset 0 0 0 2px #1e293b;
}

.template-preview-device iframe {
    display: block;
    width: 100%;
    height: 520px;
    border: 0;
    border-radius: 14px;
    background: #000;
}

.template-preview-hint {
    margin: 10px 0 0;
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.template-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(2, 6, 23, 0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.template-preview-modal[hidden] {
    display: none !important;
}

.template-preview-modal-inner {
    width: min(420px, 100%);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.template-preview-modal-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}

.template-preview-modal iframe {
    display: block;
    width: 100%;
    height: min(78vh, 720px);
    border: 0;
    background: #000;
}

/* Link detail */
.link-info-card {
    padding: 24px;
    margin-bottom: 32px;
}

.link-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.link-info-grid label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.section-title {
    font-size: 1.2rem;
    margin-bottom: 16px;
}

.results-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    align-items: center;
}

.visit-delete-form {
    margin-left: auto;
}

.visit-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

/* Visit cards */
.visit-card {
    margin-bottom: 16px;
    padding: 0;
}

.visit-time {
    font-weight: 500;
}

.visit-ip {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: monospace;
}

.visit-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
}

.visit-section {
    padding: 20px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.visit-section:nth-child(4n) {
    border-right: none;
}

.visit-section:last-child {
    border-right: none;
}

.visit-section-ip {
    background: rgba(34, 197, 94, 0.04);
}

.ip-security-badges {
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.info-list-dense div {
    font-size: 0.8rem;
    gap: 4px;
}

.info-list-dense span {
    min-width: 88px;
    flex-shrink: 0;
}

.link-inline {
    color: var(--primary-hover);
    text-decoration: none;
    font-size: 0.8rem;
}

.link-inline:hover {
    text-decoration: underline;
}

.visit-section h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    margin-bottom: 14px;
    color: var(--text-muted);
}

.visit-section-highlight {
    background: rgba(99, 102, 241, 0.05);
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-list div {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.info-list span {
    color: var(--text-muted);
}

.text-danger {
    color: var(--danger);
    font-size: 0.9rem;
}

.text-wrap {
    word-break: break-all;
    font-size: 0.8rem !important;
    max-width: 420px;
    text-align: right;
}

.mono {
    font-family: monospace;
    font-size: 0.8rem !important;
}

.visit-section-full {
    grid-column: 1 / -1;
    border-right: none;
}

.visit-section-media {
    grid-column: 1 / -1;
    background: rgba(168, 85, 247, 0.05);
}

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

.media-item label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.camera-preview {
    max-width: 100%;
    max-height: 280px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.audio-player {
    width: 100%;
    height: 40px;
}

.clip-history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.clip-item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
}

.clip-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.75rem;
}

.clip-seq {
    font-weight: 600;
    color: var(--primary);
}

.clip-type {
    color: var(--text-muted);
}

.clip-time {
    color: var(--text-muted);
    margin-left: auto;
}

.clip-player {
    width: 100%;
    max-height: 200px;
    border-radius: 8px;
    background: #000;
}

.location-timeline {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.location-log-item {
    display: flex;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
}

.location-log-index {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

.location-log-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.tag-list {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    word-break: break-word;
}

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

.permission-group-title {
    margin-bottom: 6px;
}

.permission-list {
    margin: 0 0 0 20px;
    padding: 0;
    font-size: 0.85rem;
    color: var(--text);
}

.permission-list li {
    margin-bottom: 4px;
}

/* Pagination */
.pagination-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 20px 0 8px;
    padding: 12px 0;
}

.pagination-info {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.pagination-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.pagination-current {
    pointer-events: none;
}

.pagination-ellipsis {
    color: var(--text-muted);
    padding: 0 4px;
}

/* Collapsible record lists */
.record-collapsible {
    margin-bottom: 10px;
    padding: 0;
    overflow: hidden;
}

.record-collapsible > summary {
    list-style: none;
    cursor: pointer;
}

.record-collapsible > summary::-webkit-details-marker {
    display: none;
}

.record-collapsible-summary {
    padding: 12px 16px;
    border-bottom: 1px solid transparent;
}

.record-collapsible[open] > .record-collapsible-summary {
    border-bottom-color: var(--border);
    background: var(--bg-hover);
}

.record-collapsible-body {
    padding: 0;
}

.record-collapsible-body .visit-grid {
    border-top: 1px solid var(--border);
}

.record-collapsible-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-hover);
}

.simple-record-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.simple-list-head {
    display: grid;
    gap: 10px;
    align-items: center;
    padding: 10px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 8px;
}

.simple-list-summary {
    display: grid;
    gap: 10px;
    align-items: center;
}

.traffic-summary-row,
.login-summary-row,
.visit-summary-row {
    grid-template-columns: 1.2fr 1fr 1fr 0.9fr 1.4fr 80px;
}

.login-summary-row {
    grid-template-columns: 1.1fr 0.9fr 1fr 0.9fr 1.2fr 80px;
}

.visit-summary-row {
    grid-template-columns: 1.1fr 1fr 2fr 80px;
}

.sl-col.sl-action {
    text-align: right;
}

.sl-ip.mono {
    font-family: ui-monospace, monospace;
    font-size: 0.82rem;
}

.sl-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.simple-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

@media (max-width: 900px) {
    .simple-list-head {
        display: none;
    }
    .traffic-summary-row,
    .login-summary-row,
    .visit-summary-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .sl-col.sl-action {
        text-align: left;
    }
}

@media (max-width: 1400px) {
    .visit-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .visit-section:nth-child(4n) {
        border-right: 1px solid var(--border);
    }

    .visit-section:nth-child(3n) {
        border-right: none;
    }
}

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

    .visit-section:nth-child(3n) {
        border-right: 1px solid var(--border);
    }

    .visit-section:nth-child(2n) {
        border-right: none;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }

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

    .template-preview-panel {
        position: static;
        order: -1;
    }

    .template-preview-device iframe {
        height: 420px;
    }

    .domain-add-row {
        flex-direction: column;
    }

    .domain-add-row .btn {
        width: 100%;
        justify-content: center;
    }

    .domain-panel {
        max-width: none;
    }

    .nav-links {
        gap: 10px;
    }

    .nav-user {
        display: none;
    }

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

    .visit-section {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .visit-section:nth-child(3n),
    .visit-section:nth-child(2n),
    .visit-section:nth-child(4n) {
        border-right: none;
    }

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

.pin-input {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    letter-spacing: 0.2em;
    max-width: 200px;
}

.pin-fields-grid {
    display: grid;
    gap: 0.5rem;
    margin-top: 1rem;
}

.security-status-badge {
    margin-bottom: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input {
    width: auto;
    margin-top: 0.2rem;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin: 12px 0;
}

.checkbox-grid label,
.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    cursor: pointer;
}

.checkbox-inline {
    margin-right: 16px;
    margin-bottom: 8px;
}

.section-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: -6px 0 16px;
    line-height: 1.5;
}

.control-block {
    margin-bottom: 22px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.control-block:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.control-block-title {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.45px;
    color: var(--text-muted);
    margin: 0 0 12px;
}

.option-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.option-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-hover);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.option-card:hover {
    border-color: var(--primary-hover);
}

.option-card:has(input:checked) {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
}

.option-card input {
    margin-bottom: 2px;
    flex-shrink: 0;
}

.option-card-title {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.3;
}

.option-card small {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

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

/* Domain admin */
.domain-panel {
    max-width: 960px;
}

.domain-panel-info {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(99, 102, 241, 0.06);
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.domain-panel-info .material-symbols-outlined {
    font-size: 18px;
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 1px;
}

.domain-panel-info p {
    margin: 0;
}

.domain-panel-info a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.domain-panel-info a:hover {
    text-decoration: underline;
}

.domain-panel-add {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.domain-add-form {
    max-width: 560px;
}

.domain-add-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 8px;
}

.domain-add-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.domain-add-row input {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.9rem;
    font-family: 'JetBrains Mono', monospace;
}

.domain-add-row input:focus {
    outline: none;
    border-color: var(--primary);
}

.domain-add-row .btn {
    flex-shrink: 0;
}

.domain-add-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.domain-panel-table .table th,
.domain-panel-table .table td {
    padding: 12px 20px;
}

.table-domains .col-actions {
    width: 1%;
    white-space: nowrap;
}

.table-domains td:first-child {
    min-width: 140px;
}

.domain-host {
    display: block;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.88rem;
}

.domain-tag {
    display: inline-block;
    margin-top: 2px;
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.35px;
}

.domain-url-format {
    font-size: 0.78rem;
    color: var(--text-muted);
    word-break: break-all;
}

.domain-row-primary {
    background: rgba(99, 102, 241, 0.04);
}

.domain-empty-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 12px 20px;
    font-size: 0.82rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    background: var(--bg-hover);
}

.domain-empty-note .material-symbols-outlined {
    font-size: 18px;
    opacity: 0.5;
    flex-shrink: 0;
}

.inline-form {
    display: inline;
}

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

.link-info-grid-wide {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.link-info-span2 {
    grid-column: span 2;
}

.qr-block {
    text-align: center;
}

.qr-image {
    border-radius: 8px;
    border: 1px solid var(--border);
}

.security-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
}

.filter-bar {
    margin-bottom: 16px;
    padding: 16px;
}

.filter-actions {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.analytics-card {
    margin-bottom: 20px;
    padding: 20px;
}

.analytics-card h3 {
    margin: 0 0 16px;
    font-size: 1rem;
}

.visit-map {
    height: 280px;
    border-radius: 8px;
    border: 1px solid var(--border);
    z-index: 1;
}

.api-endpoints {
    margin: 8px 0 0;
    padding-left: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.api-endpoints li {
    margin-bottom: 6px;
}

/* Public landing */
.public-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page-landing .public-main {
    position: relative;
    overflow: hidden;
}

.page-landing .public-footer {
    position: relative;
    z-index: 1;
    margin-top: 0;
    background: rgba(26, 29, 39, 0.92);
    backdrop-filter: blur(12px);
}

.landing-page {
    position: relative;
    z-index: 1;
}

.page-landing .landing-page > .auth-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
}

.landing-page .auth-bg {
    pointer-events: none;
}

.landing-hero,
.landing-stats-strip,
.landing-features,
.landing-cta {
    position: relative;
    z-index: 1;
}

.public-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 64px;
    background: rgba(15, 17, 26, 0.75);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 200;
}

.public-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

.public-brand-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 10px;
    color: var(--primary);
}

.public-brand:hover {
    text-decoration: none;
    color: var(--primary-hover);
}

.public-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.public-links a:not(.btn) {
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}

.public-links a:not(.btn):hover,
.public-links a:not(.btn).active {
    color: var(--text);
    background: rgba(99, 102, 241, 0.1);
}

.public-main {
    flex: 1;
}

.public-footer {
    border-top: 1px solid var(--border);
    background: var(--bg-card);
    padding: 32px 24px 20px;
    margin-top: 48px;
}

.public-footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
}

.public-footer-inner p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

.public-footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.public-footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.public-footer-copy {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 24px;
}

/* Landing hero */
.landing-hero {
    padding: 56px 24px 32px;
    max-width: 1180px;
    margin: 0 auto;
}

.landing-hero-inner {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: center;
}

.landing-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
}

.landing-badge .material-symbols-outlined {
    font-size: 16px;
}

.landing-title {
    font-size: clamp(2.2rem, 4.5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin: 0 0 10px;
    background: linear-gradient(135deg, #fff 0%, #c7d2fe 55%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.landing-tagline {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-hover);
    margin: 0 0 16px;
}

.landing-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0 0 28px;
    max-width: 540px;
}

.landing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.landing-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.landing-btn .material-symbols-outlined {
    font-size: 20px;
}

.landing-btn-telegram svg {
    flex-shrink: 0;
}

.landing-notice {
    max-width: 420px;
}

.landing-hero-panel {
    padding: 24px;
    border: 1px solid rgba(99, 102, 241, 0.22);
    background: linear-gradient(160deg, rgba(99, 102, 241, 0.08) 0%, rgba(26, 29, 39, 0.95) 100%);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
}

.landing-panel-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.landing-panel-head .material-symbols-outlined {
    font-size: 20px;
    color: var(--primary);
}

.landing-panel-stats {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.landing-panel-stats li {
    display: flex;
    align-items: center;
    gap: 14px;
}

.landing-stat-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.22);
}

.landing-stat-icon-green {
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.25);
}

.landing-stat-icon-purple {
    background: rgba(168, 85, 247, 0.12);
    color: #c084fc;
    border-color: rgba(168, 85, 247, 0.25);
}

.landing-stat-icon-cyan {
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.25);
}

.landing-panel-stats strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 2px;
}

.landing-stat-count {
    display: block;
    font-size: 1.45rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    color: #e9e0ff;
    line-height: 1.2;
}

.landing-panel-stats strong.landing-stat-count {
    font-size: 1.45rem;
    color: #e9e0ff;
}

.landing-feature-card .count-up {
    font-variant-numeric: tabular-nums;
}

.landing-panel-stats span {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.landing-panel-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
}

/* Stats strip */
.landing-stats-strip {
    padding: 0 24px 48px;
    max-width: 1180px;
    margin: 0 auto;
}

.landing-stats-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.landing-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.85rem;
    color: var(--text-muted);
    backdrop-filter: blur(8px);
}

.landing-stat-pill .material-symbols-outlined {
    font-size: 18px;
    color: var(--primary);
}

/* Features */
.landing-features {
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px 24px 64px;
}

.landing-section-head {
    text-align: center;
    max-width: 560px;
    margin: 0 auto 40px;
}

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

.landing-section-head h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 12px;
    letter-spacing: -0.02em;
}

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

.landing-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.landing-feature-card {
    padding: 26px 24px;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.landing-feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.landing-feature-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    margin-bottom: 16px;
    background: linear-gradient(145deg, rgba(99, 102, 241, 0.2) 0%, rgba(99, 102, 241, 0.08) 100%);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: var(--primary);
}

.landing-feature-icon .material-symbols-outlined {
    font-size: 26px;
}

.landing-feature-icon-purple {
    background: linear-gradient(145deg, rgba(168, 85, 247, 0.2) 0%, rgba(168, 85, 247, 0.08) 100%);
    border-color: rgba(168, 85, 247, 0.25);
    color: #c084fc;
}

.landing-feature-icon-cyan {
    background: linear-gradient(145deg, rgba(56, 189, 248, 0.2) 0%, rgba(56, 189, 248, 0.08) 100%);
    border-color: rgba(56, 189, 248, 0.25);
    color: #38bdf8;
}

.landing-feature-icon-amber {
    background: linear-gradient(145deg, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0.08) 100%);
    border-color: rgba(245, 158, 11, 0.25);
    color: #fbbf24;
}

.landing-feature-icon-green {
    background: linear-gradient(145deg, rgba(34, 197, 94, 0.2) 0%, rgba(34, 197, 94, 0.08) 100%);
    border-color: rgba(34, 197, 94, 0.25);
    color: #4ade80;
}

.landing-feature-icon-blue {
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0.08) 100%);
    border-color: rgba(59, 130, 246, 0.25);
    color: #60a5fa;
}

.landing-feature-card h3 {
    font-size: 1.05rem;
    margin: 0 0 8px;
}

.landing-feature-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

/* CTA */
.landing-cta {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

.landing-cta-card {
    position: relative;
    overflow: hidden;
    padding: 48px 40px;
    text-align: center;
    border: 1px solid rgba(99, 102, 241, 0.3);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.06) 100%);
}

.landing-cta-glow {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 200px;
    background: radial-gradient(ellipse, rgba(99, 102, 241, 0.35) 0%, transparent 70%);
    pointer-events: none;
}

.landing-cta-content {
    position: relative;
    z-index: 1;
}

.landing-cta-icon {
    font-size: 40px;
    color: var(--primary);
    margin-bottom: 16px;
}

.landing-cta-card h2 {
    font-size: 1.65rem;
    margin: 0 0 10px;
}

.landing-cta-card p {
    color: var(--text-muted);
    margin: 0 auto 28px;
    max-width: 480px;
    line-height: 1.6;
}

.landing-cta-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-telegram {
    background: #229ED9;
    color: #fff;
    border: none;
}

.btn-telegram:hover {
    background: #1a8bc4;
    color: #fff;
}

/* Landing template slideshow */
.landing-templates {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 72px;
}

.landing-slideshow {
    padding: 28px;
    overflow: hidden;
}

.landing-slideshow-layout {
    display: grid;
    grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
    gap: 32px;
    align-items: center;
}

.landing-slideshow-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.landing-phone-frame {
    width: 100%;
    max-width: 320px;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border-radius: 36px;
    padding: 12px 12px 16px;
    border: 2px solid rgba(148, 163, 184, 0.25);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.45),
        inset 0 0 0 2px rgba(255, 255, 255, 0.04);
}

.landing-phone-notch {
    width: 96px;
    height: 22px;
    margin: 0 auto 10px;
    border-radius: 0 0 14px 14px;
    background: #020617;
}

.landing-phone-screen {
    border-radius: 22px;
    overflow: hidden;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.landing-slideshow-frame {
    display: block;
    width: 100%;
    height: 520px;
    border: 0;
    background: #fff;
}

.landing-slideshow-frame[hidden] {
    display: none;
}

.landing-slideshow-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 520px;
    padding: 24px;
    text-align: center;
    color: #94a3b8;
    font-size: 0.82rem;
    background: #0f172a;
}

.landing-slideshow-placeholder[hidden] {
    display: none;
}

.landing-slideshow-placeholder .material-symbols-outlined {
    font-size: 2rem;
    color: #6366f1;
}

.landing-phone-home {
    width: 110px;
    height: 4px;
    margin: 12px auto 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.35);
}

.landing-slideshow-caption {
    text-align: center;
    max-width: 320px;
}

.landing-slideshow-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--primary-hover);
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.25);
    margin-bottom: 8px;
}

.landing-slideshow-caption h3 {
    margin: 0 0 6px;
    font-size: 1.25rem;
}

.landing-slideshow-caption p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.landing-slideshow-side {
    min-width: 0;
}

.landing-slideshow-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
}

.landing-slideshow-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, background 0.2s;
}

.landing-slideshow-btn:hover {
    border-color: rgba(99, 102, 241, 0.45);
    background: rgba(99, 102, 241, 0.08);
}

.landing-slideshow-dots {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.landing-slideshow-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: 0;
    padding: 0;
    background: rgba(148, 163, 184, 0.35);
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.landing-slideshow-dot.is-active {
    background: var(--primary);
    transform: scale(1.15);
}

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

.landing-slideshow-thumb {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text);
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.landing-slideshow-thumb:hover,
.landing-slideshow-thumb.is-active {
    border-color: rgba(99, 102, 241, 0.45);
    background: rgba(99, 102, 241, 0.08);
}

.landing-slideshow-thumb.is-active {
    transform: translateY(-1px);
}

.landing-slideshow-thumb-name {
    font-size: 0.88rem;
    font-weight: 600;
}

.landing-slideshow-thumb-cat {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: capitalize;
}

.landing-slideshow-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 16px 0 0;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.landing-slideshow-hint .material-symbols-outlined {
    font-size: 1rem;
    color: var(--primary-hover);
}

/* Landing demo results */
.landing-demo {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px 72px;
}

.landing-demo-shell {
    padding: 0;
    overflow: hidden;
}

.landing-demo-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(245, 158, 11, 0.1);
    border-bottom: 1px solid rgba(245, 158, 11, 0.22);
    color: #fbbf24;
    font-size: 0.85rem;
    font-weight: 600;
}

.landing-demo-banner .material-symbols-outlined {
    font-size: 1.1rem;
}

.landing-demo-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 24px 0;
}

.landing-demo-header h3 {
    margin: 0 0 6px;
    font-size: 1.15rem;
}

.landing-demo-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 20px 24px;
}

.landing-demo-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
}

.landing-demo-stat .material-symbols-outlined {
    font-size: 1.4rem;
    color: var(--primary-hover);
}

.landing-demo-stat strong {
    display: block;
    font-size: 1.1rem;
    line-height: 1.2;
}

.landing-demo-stat span {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.landing-demo-results-title {
    margin: 0;
    padding: 0 24px 12px;
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.landing-demo-results {
    padding: 0 16px 20px;
}

.landing-demo-results .visit-card {
    margin-bottom: 10px;
}

.landing-demo-full-link .material-symbols-outlined {
    font-size: 1rem;
}

.landing-demo-lite-note {
    padding: 0 24px 20px;
    font-size: 0.85rem;
}

.landing-demo-lite-note a {
    color: var(--primary-hover);
}

.landing-demo-lite-list {
    padding: 0 16px 8px;
    display: grid;
    gap: 10px;
}

.landing-demo-lite-item {
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.landing-demo-lite-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 6px;
}

.landing-demo-lite-time {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.landing-demo-lite-ip {
    font-size: 0.82rem;
}

.landing-demo-lite-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.landing-demo-lite-meta {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.demo-media-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 160px;
    border-radius: 12px;
    border: 1px dashed rgba(139, 92, 246, 0.35);
    background: rgba(139, 92, 246, 0.08);
    color: var(--text-muted);
    font-size: 0.82rem;
}

.demo-media-photo .material-symbols-outlined {
    font-size: 2.2rem;
    color: #a78bfa;
}

.demo-media-audio {
    min-height: 72px;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 16px;
}

.demo-audio-wave {
    display: inline-block;
    width: 4px;
    height: 28px;
    border-radius: 999px;
    background: linear-gradient(180deg, #8b5cf6, #6366f1);
    animation: demo-audio-pulse 1.2s ease-in-out infinite;
}

.demo-audio-wave:nth-child(2) { animation-delay: 0.1s; height: 18px; }
.demo-audio-wave:nth-child(3) { animation-delay: 0.2s; height: 34px; }
.demo-audio-wave:nth-child(4) { animation-delay: 0.3s; height: 22px; }
.demo-audio-wave:nth-child(5) { animation-delay: 0.4s; height: 30px; }

@keyframes demo-audio-pulse {
    0%, 100% { transform: scaleY(0.65); opacity: 0.65; }
    50% { transform: scaleY(1); opacity: 1; }
}

.landing-demo-page-head {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 24px 0;
    position: relative;
    z-index: 1;
}

.landing-demo-page-cta {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 0 24px 80px;
    position: relative;
    z-index: 1;
}

.page-demo-results .landing-demo {
    position: relative;
    z-index: 1;
}

/* Legacy hero (pricing/terms) */
.hero {
    max-width: 900px;
    margin: 0 auto;
    padding: 72px 24px 48px;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-hover);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-tagline {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary-hover);
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.hero-note {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.section-heading {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 32px;
}

.features-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 24px 64px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}

.feature-icon {
    margin-bottom: 12px;
    color: var(--accent, #6366f1);
}

.feature-icon .material-symbols-outlined {
    font-size: 32px;
}

.feature-card h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.cta-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px 64px;
}

.cta-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: 16px;
    padding: 40px 32px;
    text-align: center;
}

.cta-card h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.cta-card p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.cta-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-telegram {
    background: #229ED9;
}

.btn-telegram:hover {
    background: #1a8bc4;
}

.page-hero {
    text-align: center;
    padding: 56px 24px 32px;
    max-width: 700px;
    margin: 0 auto;
}

.page-hero h1 {
    font-size: 2.25rem;
    margin-bottom: 12px;
}

.page-hero p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.legal-container {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 24px 64px;
}

.legal-card {
    padding: 32px;
}

.legal-content h2 {
    font-size: 1.1rem;
    margin: 28px 0 10px;
}

.legal-content h2:first-child {
    margin-top: 0;
}

.legal-content p,
.legal-content li {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.75;
}

.legal-content ul {
    margin: 8px 0 0 20px;
}

.legal-content li {
    margin-bottom: 6px;
}

.legal-content a {
    color: var(--primary-hover);
}

.pricing-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 48px;
}

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

.pricing-grid-decoy {
    align-items: stretch;
}

.pricing-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.pricing-entry {
    opacity: 0.92;
}

.pricing-decoy {
    opacity: 0.78;
    transform: scale(0.97);
    border-style: dashed;
}

.pricing-decoy .pricing-per-month-value {
    text-decoration: line-through;
    text-decoration-color: rgba(239, 68, 68, 0.6);
}

.pricing-target {
    transform: scale(1.04);
    z-index: 2;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.08) 0%, var(--bg-card) 40%);
}

.pricing-premium {
    border-color: rgba(245, 158, 11, 0.4);
}

.pricing-featured {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary), 0 12px 40px rgba(99, 102, 241, 0.25);
}

.pricing-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 999px;
    white-space: nowrap;
}

.pricing-badge-muted {
    background: var(--border);
    color: var(--text-muted);
}

.pricing-badge-gold {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.pricing-per-month {
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
}

.pricing-target .pricing-per-month {
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.35);
}

.pricing-per-month-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.pricing-per-month-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
}

.pricing-target .pricing-per-month-value {
    color: var(--primary-hover);
}

.pricing-per-month-unit {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.pricing-card h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.pricing-price {
    margin-bottom: 8px;
}

.pricing-currency {
    font-size: 0.9rem;
    color: var(--text-muted);
    vertical-align: top;
}

.pricing-amount {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.pricing-period {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.pricing-savings {
    font-size: 0.85rem;
    color: var(--success);
    margin-bottom: 12px;
    line-height: 1.4;
}

.pricing-savings-warn {
    display: block;
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 4px;
}

.pricing-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    min-height: 1.2em;
}

.pricing-compare {
    margin: 12px 0 16px;
    padding: 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.25);
    text-align: left;
    font-size: 0.8rem;
}

.pricing-compare-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
}

.pricing-compare-decoy {
    color: var(--text-muted);
    text-decoration: line-through;
    opacity: 0.7;
}

.pricing-compare-target {
    color: var(--success);
    font-weight: 600;
}

.pricing-card .btn {
    margin-top: auto;
}

.pricing-decoy-hint {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    max-width: 640px;
    margin: 28px auto 0;
    padding: 14px 16px;
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.pricing-decoy-hint svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--primary-hover);
}

.pricing-features-section {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 24px 48px;
}

.pricing-features-list {
    list-style: none;
    display: grid;
    gap: 12px;
}

.pricing-features-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.pricing-features-list svg {
    color: var(--success);
    flex-shrink: 0;
}

@media (max-width: 1024px) {
    .landing-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .landing-hero-inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }

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

    .landing-slideshow-side {
        order: 2;
    }
}

@media (max-width: 768px) {
    .public-links a:not(.btn) {
        display: none;
    }

    .landing-hero-inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .landing-hero-panel {
        order: -1;
    }

    .landing-features-grid {
        grid-template-columns: 1fr;
    }

    .landing-actions {
        flex-direction: column;
    }

    .landing-actions .landing-btn {
        width: 100%;
        justify-content: center;
    }

    .landing-notice {
        max-width: none;
    }

    .landing-slideshow-thumbs {
        grid-template-columns: 1fr;
    }

    .landing-slideshow-frame {
        height: 460px;
    }

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

    .landing-demo-header {
        flex-direction: column;
    }

    .landing-cta-card {
        padding: 32px 24px;
    }

    .hero {
        padding-top: 48px;
    }

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

    .pricing-target {
        transform: none;
        order: -1;
    }

    .pricing-decoy {
        transform: none;
    }

    .pricing-grid-decoy {
        grid-template-columns: 1fr;
    }
}

.url-preview-box {
    display: block;
    padding: 12px 14px;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.85rem;
    word-break: break-all;
}

/* === Themes === */
[data-theme="light"] {
    --bg: #f4f6fb;
    --bg-card: #ffffff;
    --bg-hover: #eef1f8;
    --border: #d8dde8;
    --text: #1a1f2e;
    --text-muted: #5c6478;
    --primary: #4f46e5;
    --primary-hover: #6366f1;
    --shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
}

[data-theme="cyber"] {
    --bg: #060a12;
    --bg-card: #0a101c;
    --bg-hover: #0f1728;
    --border: rgba(0, 212, 255, 0.28);
    --text: #c5e4f7;
    --text-muted: #6b8fa8;
    --primary: #00d4ff;
    --primary-hover: #33ddff;
    --success: #00e676;
    --danger: #ff4d6d;
    --warning: #ffc107;
    --radius: 2px;
    --shadow: none;
    font-family: 'Inter', system-ui, sans-serif;
}

[data-theme="cyber"] body {
    background: radial-gradient(ellipse at top, #0a1428 0%, #060a12 55%);
}

[data-theme="cyber"] .card,
[data-theme="cyber"] .hud-panel,
[data-theme="cyber"] .stat-card,
[data-theme="cyber"] .form-card,
[data-theme="cyber"] .auth-card {
    border: 1px solid rgba(0, 212, 255, 0.32);
    box-shadow: none;
    background: linear-gradient(160deg, #0c1424 0%, #080e18 100%);
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

[data-theme="cyber"] .auth-bg {
    background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(0, 212, 255, 0.12) 0%, transparent 55%), var(--bg);
}

[data-theme="cyber"] .auth-bg-glow-1 {
    background: rgba(0, 212, 255, 0.2);
}

[data-theme="cyber"] .auth-bg-glow-2 {
    background: rgba(0, 230, 118, 0.08);
}

[data-theme="cyber"] .auth-switch input:checked + .auth-switch-track {
    background: rgba(0, 212, 255, 0.2);
    border-color: var(--primary);
}

[data-theme="cyber"] .auth-notice {
    border-color: rgba(0, 212, 255, 0.22);
    background: rgba(0, 212, 255, 0.05);
}

[data-theme="cyber"] .navbar {
    background: #080e18;
    border-bottom: 1px solid rgba(0, 212, 255, 0.25);
}

[data-theme="cyber"] .nav-brand svg,
[data-theme="cyber"] .stat-icon {
    color: var(--primary);
}

[data-theme="cyber"] .btn-primary {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    box-shadow: inset 0 0 12px rgba(0, 212, 255, 0.08);
}

[data-theme="cyber"] .btn-primary:hover {
    background: rgba(0, 212, 255, 0.12);
    color: #fff;
}

[data-theme="cyber"] .table th {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--primary);
    border-bottom-color: rgba(0, 212, 255, 0.2);
}

[data-theme="cyber"] .badge-success {
    border: 1px solid rgba(0, 230, 118, 0.4);
    background: rgba(0, 230, 118, 0.08);
    color: #00e676;
}

.material-symbols-outlined {
    font-size: 1.15rem;
    vertical-align: middle;
    line-height: 1;
}

/* Dashboard enhanced */
.dash-page {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dash-hero {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 340px);
    gap: 20px;
    align-items: stretch;
}

.dash-hero-main {
    padding: 28px 28px 24px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(26, 29, 39, 0.85) 55%);
    border-color: rgba(99, 102, 241, 0.22);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dash-badge {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dash-badge .material-symbols-outlined {
    font-size: 16px;
}

.dash-greeting h1 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.dash-username {
    background: linear-gradient(135deg, #fff 0%, #c7d2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dash-greeting p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

.dash-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
    padding-top: 8px;
}

.dash-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.dash-action-btn .material-symbols-outlined {
    font-size: 20px;
}

.dash-eyebrow {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--primary);
    font-weight: 600;
}

.account-status-card {
    padding: 22px 22px 20px;
    border-color: rgba(99, 102, 241, 0.18);
}

.account-status-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.account-status-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.22);
}

.account-status-header h3 {
    font-size: 0.95rem;
    margin: 0 0 2px;
}

.account-status-header small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.account-status-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.85rem;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.account-status-row:last-of-type {
    border-bottom: none;
}

.account-status-row span {
    color: var(--text-muted);
}

.account-email {
    text-align: right;
    word-break: break-all;
    max-width: 58%;
}

.account-renew-btn {
    width: 100%;
    margin-top: 12px;
    justify-content: center;
}

.account-progress {
    height: 6px;
    background: var(--bg-hover);
    border-radius: 999px;
    margin-top: 4px;
    overflow: hidden;
}

.account-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #4ade80);
    border-radius: 999px;
    transition: width 0.4s ease;
}

.text-success { color: var(--success); }

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

.stats-grid-dash .stat-card {
    border-radius: 16px;
    padding: 22px 20px;
}

.stats-grid-dash .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.stats-grid-dash .stat-value {
    font-size: 1.65rem;
    letter-spacing: -0.02em;
}

.stat-sub {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.stat-icon-cyan {
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.2);
}

.stat-card-interactive {
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.stat-card-interactive.is-hovered,
.stat-card-interactive:hover {
    transform: translateY(-3px);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

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

.dash-panel {
    overflow: hidden;
}

.dash-panel-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px !important;
}

.dash-panel-header h2 {
    font-size: 1.05rem;
    margin: 0 0 2px;
}

.dash-panel-header p {
    margin: 0;
    font-size: 0.82rem;
}

.dash-panel-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.22);
    flex-shrink: 0;
}

.dash-panel-icon-purple {
    background: rgba(168, 85, 247, 0.12);
    color: #c084fc;
    border-color: rgba(168, 85, 247, 0.25);
}

.dash-panel-icon-green {
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.25);
}

.dash-panel-icon-blue {
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.25);
}

.dash-panel-table {
    margin-bottom: 0;
}

.dash-panel-table .card-header {
    border-bottom: 1px solid var(--border);
}

.dash-table thead th {
    background: rgba(255, 255, 255, 0.02);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.dash-empty-inline {
    padding: 24px;
    margin: 0;
}

.dash-empty-state {
    text-align: center;
    padding: 48px 32px;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    border-radius: 16px;
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary);
}

.empty-state-icon .material-symbols-outlined {
    font-size: 32px;
}

.dash-visit-count {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
}

.visit-trend-chart {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    min-height: 160px;
    padding: 8px 24px 16px;
}

.trend-bar-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 130px;
    justify-content: flex-end;
    gap: 6px;
}

.trend-count {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.trend-bar {
    width: 100%;
    max-width: 40px;
    background: linear-gradient(180deg, #818cf8, var(--primary));
    border-radius: 6px 6px 2px 2px;
    min-height: 8px;
    transition: height 0.3s ease;
    box-shadow: 0 -4px 12px rgba(99, 102, 241, 0.25);
}

.trend-label {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.top-links-list {
    list-style: none;
    padding: 4px 0 8px;
    margin: 0;
}

.top-links-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.15s;
}

.top-links-list li:hover {
    background: rgba(99, 102, 241, 0.06);
}

.top-links-list li:last-child {
    border-bottom: none;
}

.top-rank {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    min-width: 28px;
}

.top-link-info {
    flex: 1;
    min-width: 0;
}

.top-link-info a {
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
}

.top-link-info a:hover {
    color: var(--primary-hover);
}

.top-link-info small {
    display: block;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.top-visits {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    padding: 4px 10px;
    border-radius: 8px;
}

.top-visits {
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--primary);
}

.table-compact td,
.table-compact th {
    padding: 10px 14px;
    font-size: 0.85rem;
}

.table-row-hover {
    transition: background 0.15s;
}

.table-row-hover:hover {
    background: var(--bg-hover);
}

.card-header h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}

.empty-icon {
    font-size: 3rem !important;
    color: var(--text-muted);
    opacity: 0.5;
}

/* Theme picker */
.theme-picker {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 12px;
}

.theme-option {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color 0.2s;
}

.theme-option input {
    display: none;
}

.theme-option.active,
.theme-option:hover {
    border-color: var(--primary);
}

.theme-preview {
    height: 48px;
    border-radius: 4px;
    border: 1px solid var(--border);
}

.theme-preview-dark { background: linear-gradient(135deg, #0f1117, #1a1d27); }
.theme-preview-light { background: linear-gradient(135deg, #f4f6fb, #fff); }
.theme-preview-cyber { background: linear-gradient(135deg, #060a12, #0a101c); border-color: rgba(0,212,255,0.4); }

.theme-option small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.notify-telegram-panel {
    margin-top: 16px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-hover);
}

.notify-telegram-panel h4 {
    margin: 0 0 8px;
    font-size: 0.95rem;
}

.settings-flow-list {
    margin: 8px 0 0 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.8;
}

.btn-copy .material-symbols-outlined {
    font-size: 1rem;
}

.analytics-rank-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 8px;
}

.rank-list {
    list-style: none;
    margin: 0;
    padding: 12px 16px 16px;
}

.rank-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
}

.rank-list li:last-child {
    border-bottom: none;
}

.rank-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
}

.rank-count {
    flex-shrink: 0;
    font-weight: 600;
    color: var(--accent);
}

.rank-empty {
    color: var(--text-muted);
    justify-content: center;
}

.tab-bar {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
}

.tab-link {
    display: inline-block;
    padding: 10px 16px;
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    font-weight: 500;
    font-size: 0.92rem;
}

.tab-link:hover {
    color: var(--text);
}

.tab-link.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.analytics-filter {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.table-compact td,
.table-compact th {
    font-size: 0.86rem;
    vertical-align: top;
}

@media (max-width: 1100px) {
    .analytics-rank-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .stats-grid-dash {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .dash-grid-2 {
        grid-template-columns: 1fr;
    }

    .theme-picker {
        grid-template-columns: 1fr;
    }
}

.api-docs-card .form-section + .form-section {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

/* === API Docs Page === */
.api-docs-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.api-docs-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 28px 32px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.api-docs-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary);
    margin-bottom: 10px;
}

.api-docs-eyebrow .material-symbols-outlined {
    font-size: 18px;
}

.api-docs-hero h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

.api-docs-hero p {
    color: var(--text-muted);
    margin: 0 0 16px;
    max-width: 520px;
}

.api-docs-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.api-docs-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    align-items: start;
}

.api-docs-sidebar {
    position: sticky;
    top: 20px;
    padding: 20px 16px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.api-docs-nav-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin: 0 0 12px;
    padding: 0 10px;
}

.api-docs-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.api-docs-nav-group {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    padding: 14px 10px 6px;
    opacity: 0.75;
}

.api-docs-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.86rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.api-docs-nav-link:hover,
.api-docs-nav-link.active {
    background: rgba(99, 102, 241, 0.12);
    color: var(--text);
}

.api-docs-nav-link .method-get,
.api-docs-nav-link .method-post,
.api-docs-nav-link .method-patch,
.api-docs-nav-link .method-delete {
    font-size: 0.62rem;
    padding: 2px 5px;
    border-radius: 4px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    flex-shrink: 0;
}

.api-docs-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.api-section,
.api-endpoint {
    padding: 24px 28px;
}

.api-section-head {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.api-section-icon {
    font-size: 28px;
    color: var(--primary);
    background: rgba(99, 102, 241, 0.12);
    padding: 10px;
    border-radius: 12px;
    flex-shrink: 0;
}

.api-section-head h2 {
    font-size: 1.2rem;
    margin: 0 0 6px;
}

.api-section-head p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.api-key-box {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.api-key-box-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
}

.api-key-value {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    word-break: break-all;
    color: var(--primary);
    line-height: 1.5;
}

.api-auth-hints {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.api-auth-hint {
    padding: 12px 14px;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.82rem;
}

.api-auth-hint strong {
    display: block;
    margin-bottom: 6px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.api-auth-hint code {
    font-size: 0.78rem;
    word-break: break-all;
}

.api-base-url-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.api-base-url-box code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--primary);
    word-break: break-all;
}

.api-endpoint-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.api-method {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.04em;
}

.method-get {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.method-post {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.method-patch {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.method-delete {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.api-path {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    color: var(--text);
}

.api-endpoint-title {
    font-size: 1.1rem;
    margin: 0 0 8px;
}

.api-endpoint-desc {
    margin: 0 0 16px;
    font-size: 0.9rem;
    line-height: 1.55;
}

.api-endpoint-featured {
    border-color: rgba(99, 102, 241, 0.35);
    background: linear-gradient(160deg, rgba(99, 102, 241, 0.06) 0%, transparent 60%);
}

.api-endpoint-public {
    border-left: 3px solid #22c55e;
}

.api-badge-public {
    margin-left: auto;
}

.api-code-block {
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    overflow: hidden;
    margin: 12px 0;
    background: #0b1120;
}

.api-code-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.api-code-block .api-code {
    margin: 0;
    border-radius: 0;
    border: none;
    padding: 16px 18px;
    font-size: 0.8rem;
    line-height: 1.6;
    background: transparent;
}

.api-details {
    margin-top: 12px;
}

.api-details summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--primary);
    padding: 8px 0;
    list-style: none;
}

.api-details summary::-webkit-details-marker {
    display: none;
}

.api-details summary .material-symbols-outlined {
    font-size: 18px;
}

.api-details[open] summary {
    margin-bottom: 4px;
}

.api-subheading {
    font-size: 0.95rem;
    margin: 20px 0 12px;
}

.api-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 16px;
}

.api-field-table {
    margin: 0;
}

.api-field-table th {
    background: var(--bg-hover);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-sm {
    font-size: 0.7rem;
    padding: 2px 6px;
}

.api-callout-list {
    margin: 16px 0 0;
    padding: 14px 16px 14px 36px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.18);
    border-radius: 10px;
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
}

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

.api-error-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.9rem;
}

.api-error-code {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 1rem;
    color: #f87171;
    min-width: 36px;
}

.api-workflow-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.api-workflow-steps li {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.api-step-num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary);
    font-weight: 700;
    border-radius: 8px;
    font-size: 0.9rem;
}

.api-workflow-steps strong {
    display: block;
    margin-bottom: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.88rem;
}

.api-workflow-steps p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.api-copy-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    padding: 12px 20px;
    background: var(--bg-card);
    border: 1px solid var(--primary);
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
}

.api-copy-toast.show {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1024px) {
    .api-docs-layout {
        grid-template-columns: 1fr;
    }

    .api-docs-sidebar {
        position: static;
        max-height: none;
    }

    .api-docs-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }

    .api-docs-nav-group {
        width: 100%;
        padding-top: 8px;
    }

    .api-auth-hints {
        grid-template-columns: 1fr;
    }

    .api-error-grid {
        grid-template-columns: 1fr;
    }

    .api-docs-hero {
        flex-direction: column;
    }
}

.api-docs-highlight {
    background: var(--surface-2, rgba(59, 130, 246, 0.06));
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
}

.api-code {
    display: block;
    background: var(--code-bg, #0f172a);
    color: var(--code-fg, #e2e8f0);
    padding: 1rem 1.25rem;
    border-radius: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    line-height: 1.55;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0.75rem 0;
}

.api-details summary {
    cursor: pointer;
    font-weight: 600;
    margin: 0.5rem 0;
}

.api-docs-block {
    margin-top: 0.75rem;
}

.api-field-table {
    width: 100%;
    font-size: 0.9rem;
}

.api-field-table code {
    font-size: 0.85em;
}

.api-notes {
    margin: 0.75rem 0 0;
    padding-left: 1.25rem;
    color: var(--text-muted);
}

.api-notes li {
    margin-bottom: 0.35rem;
}
