/* ── Reset & Base ─────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: #0f0f0f; color: #ccc; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 14px; min-height: 100vh; }
a { color: inherit; text-decoration: none; }

/* ── Forms ────────────────────────────────────────────────────── */
input, select, textarea { background: #1a1a1a; border: 1px solid #2a2a2a; border-radius: 6px; color: #eee; font-size: 14px; padding: 10px 12px; width: 100%; outline: none; transition: border-color .15s; font-family: inherit; }
input:focus, select:focus, textarea:focus { border-color: #555; }
textarea { resize: vertical; min-height: 100px; }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: 6px; border: none; font-size: 13px; font-weight: 500; cursor: pointer; transition: opacity .15s; font-family: inherit; }
.btn:hover { opacity: .85; }
.btn-primary { background: #fff; color: #000; }
.btn-secondary { background: #1a1a1a; border: 1px solid #333; color: #aaa; border-radius: 8px; }
.btn-secondary:hover { border-color: #555; color: #ccc; }
.btn-ghost { background: transparent; border: 1px solid #2a2a2a; color: #aaa; }
.btn-danger { background: #3a1010; border: 1px solid #5a2020; color: #e05050; }
.btn-resume { background: #1a1a0a; border: 1px solid #4a4a1a; color: #c0a040; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ── Cards ────────────────────────────────────────────────────── */
.card { background: #141414; border: 1px solid #1e1e1e; border-radius: 10px; padding: 24px; }
.card + .card { margin-top: 16px; }

/* ── Labels & Fields ──────────────────────────────────────────── */
.label { font-size: 11px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: #555; margin-bottom: 6px; }
.field { margin-bottom: 16px; }

/* ── Messages ─────────────────────────────────────────────────── */
.msg { padding: 10px 14px; border-radius: 6px; font-size: 13px; margin-bottom: 16px; }
.msg-ok  { background: #0d2a1a; border: 1px solid #1a5a30; color: #5adb8a; }
.msg-err { background: #2a0d0d; border: 1px solid #5a2020; color: #e05050; }

/* ── Navigation ───────────────────────────────────────────────── */
nav { background: #0a0a0a; border-bottom: 1px solid #1a1a1a; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; height: 52px; }
nav .logo { font-size: 15px; font-weight: 600; color: #fff; letter-spacing: -.02em; }
nav .nav-links { display: flex; align-items: center; gap: 24px; }
nav .nav-links a { font-size: 13px; color: #666; transition: color .15s; }
nav .nav-links a:hover { color: #ccc; }
nav .nav-links a.active { color: #fff; }
.burger { display: none; background: none; border: none; cursor: pointer; padding: 4px; flex-direction: column; gap: 4px; }
.burger span { display: block; width: 18px; height: 2px; background: #888; border-radius: 2px; transition: transform 0.2s, opacity 0.2s; }
.burger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.mobile-menu { display: none; background: #0a0a0a; border-bottom: 1px solid #1a1a1a; padding: 0 16px; overflow: hidden; max-height: 0; transition: max-height 0.25s ease, padding 0.25s ease; }
.mobile-menu.open { display: flex; flex-direction: column; max-height: 240px; padding: 12px 16px; }
.mobile-menu a { font-size: 14px; color: #666; padding: 10px 0; border-bottom: 1px solid #141414; text-decoration: none; transition: color 0.15s; }
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover, .mobile-menu a.active { color: #fff; }

/* ── Layout ───────────────────────────────────────────────────── */
.page { max-width: 960px; margin: 0 auto; padding: 48px 24px; }
.page-narrow { max-width: 440px; margin: 0 auto; padding: 80px 24px; }
.page-mid { max-width: 640px; margin: 0 auto; padding: 48px 24px; }

/* ── Typography ───────────────────────────────────────────────── */
h1 { font-size: 22px; font-weight: 600; color: #fff; margin-bottom: 6px; }
h2 { font-size: 16px; font-weight: 600; color: #fff; margin-bottom: 16px; }
h3 { font-size: 14px; font-weight: 600; color: #eee; margin-bottom: 8px; }
.sub { font-size: 13px; color: #555; margin-bottom: 32px; }

/* ── Tables ───────────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; }
th { font-size: 10px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: #444; text-align: left; padding: 10px 12px; border-bottom: 1px solid #1a1a1a; }
td { padding: 12px; border-bottom: 1px solid #141414; font-size: 13px; color: #aaa; vertical-align: middle; }
tr:last-child td { border-bottom: none; }

/* ── Badges ───────────────────────────────────────────────────── */
.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 10px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; }
.badge-admin  { background: #1a1a2a; color: #7070e0; border: 1px solid #2a2a4a; }
.badge-owner  { background: #2a2a1a; color: #c0a040; border: 1px solid #4a4a2a; }
.badge-member { background: #1a1a1a; color: #555; border: 1px solid #2a2a2a; }

/* ── Avatar ───────────────────────────────────────────────────── */
.avatar { border-radius: 50%; background: #1a1a2a; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: #7070e0; flex-shrink: 0; border: 1px solid #2a2a4a; }
.avatar-img { border-radius: 50%; object-fit: cover; }
.profile-avatar { border-radius: 50%; background: #1a1a2a; display: flex; align-items: center; justify-content: center; font-weight: 600; color: #7070e0; flex-shrink: 0; border: 2px solid #2a2a4a; }

/* ── Markdown Content ─────────────────────────────────────────── */
.md-content { font-size: 14px; color: #ccc; line-height: 1.7; }
.md-content p { margin-bottom: 12px; }
.md-content p:last-child { margin-bottom: 0; }
.md-content strong { color: #eee; }
.md-content a { color: #7070e0; }
.md-content a:hover { color: #9090ff; }
.md-content ul, .md-content ol { margin: 8px 0 12px 20px; }
.md-content li { margin-bottom: 4px; }
.md-content code { background: #1a1a1a; border: 1px solid #2a2a2a; border-radius: 3px; padding: 1px 6px; font-size: 13px; color: #e0a040; }
.md-content pre { background: #0a0a0a; border: 1px solid #1e1e1e; border-radius: 4px; padding: 14px; margin: 12px 0; overflow-x: auto; }
.md-content pre code { background: none; border: none; padding: 0; color: #ccc; }
.md-content blockquote { border-left: 3px solid #2a2a4a; margin: 12px 0; padding: 8px 16px; color: #999; }
.md-content img { max-width: 100%; border-radius: 4px; margin: 8px 0; }
.md-content h1, .md-content h2, .md-content h3 { color: #fff; margin: 16px 0 8px; }
.md-content h1 { font-size: 20px; }
.md-content h2 { font-size: 17px; }
.md-content h3 { font-size: 15px; }
.md-content hr { border: none; border-top: 1px solid #1e1e1e; margin: 16px 0; }
.md-content table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.md-content th, .md-content td { border: 1px solid #1e1e1e; padding: 8px 12px; text-align: left; }
.md-content th { background: #111; color: #eee; }

/* ── Item Cards (for CRUD lists) ─────────────────────────────── */
.card-list { display: flex; flex-direction: column; gap: 8px; }
.item-card { display: block; background: #141414; border: 1px solid #1e1e1e; border-radius: 10px; padding: 18px 20px; transition: border-color .15s; text-decoration: none; color: inherit; }
.item-card:hover { border-color: #333; }
.item-card-title { font-size: 15px; font-weight: 600; color: #eee; margin-bottom: 4px; }
.item-card-meta { font-size: 12px; color: #555; margin-bottom: 4px; }
.item-card-preview { font-size: 13px; color: #777; line-height: 1.4; }

/* ── Empty State ──────────────────────────────────────────────── */
.empty { text-align: center; padding: 48px 24px; color: #444; font-size: 13px; }
.empty-state { text-align: center; padding: 48px 24px; }
.empty-state-icon { font-size: 48px; color: #1e1e1e; margin-bottom: 16px; }
.empty-state h2 { color: #fff; margin-bottom: 8px; }
.empty-state p { font-size: 13px; color: #555; }

/* ── Landing Page ─────────────────────────────────────────────── */
.landing-hero { text-align: center; padding: 100px 24px 60px; max-width: 640px; margin: 0 auto; }
.landing-title { font-size: 40px; font-weight: 700; color: #fff; margin-bottom: 16px; letter-spacing: -.02em; }
.landing-sub { font-size: 16px; color: #777; line-height: 1.6; margin-bottom: 32px; }
.landing-actions { display: flex; gap: 12px; justify-content: center; }
.landing-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 60px; }
.feature-card { background: #141414; border: 1px solid #1e1e1e; border-radius: 10px; padding: 24px; text-align: center; }
.feature-icon { font-size: 24px; margin-bottom: 12px; }
.feature-card h3 { color: #fff; margin-bottom: 8px; }
.feature-card p { font-size: 13px; color: #777; line-height: 1.5; }

.landing-section { margin-bottom: 60px; }
.landing-section-title { font-size: 22px; color: #fff; text-align: center; margin-bottom: 28px; }
.landing-benefits { max-width: 600px; margin: 0 auto; }
.benefit-row { display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid #1e1e1e; }
.benefit-row:first-child { border-top: none; }
.benefit-icon { width: 24px; height: 24px; border-radius: 50%; background: #0d2a1a; border: 1px solid #1a5a30; color: #5adb8a; display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; margin-top: 2px; }
.benefit-row strong { color: #eee; font-size: 14px; }
.benefit-row p { color: #666; font-size: 13px; margin-top: 2px; }
.landing-cta { text-align: center; padding: 40px 24px; margin-bottom: 40px; background: #141414; border: 1px solid #1e1e1e; border-radius: 12px; }
.landing-cta h2 { color: #fff; font-size: 22px; margin-bottom: 8px; }
.landing-cta p { color: #666; font-size: 14px; }

/* ── Admin Bar ────────────────────────────────────────────────── */
.admin-bar { background: linear-gradient(90deg, #1a1000 0%, #201800 100%); border-bottom: 1px solid #3a3000; padding: 0 24px; height: 36px; display: flex; align-items: center; justify-content: space-between; font-size: 12px; }
.ab-left { display: flex; align-items: center; gap: 16px; }
.ab-pulse { width: 6px; height: 6px; background: #c0a040; border-radius: 50%; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.ab-label { font-size: 10px; font-weight: 700; letter-spacing: 1.5px; color: #c0a040; }
.ab-link { color: #888; transition: color .15s; display: flex; align-items: center; gap: 4px; }
.ab-link:hover { color: #c0a040; }
.ab-icon { font-size: 13px; }
.ab-text { }

/* ── Impersonate Banner ──────────────────────────────────────── */
.impersonate-banner { background: #2a0d0d; border-bottom: 1px solid #5a2020; padding: 8px 24px; font-size: 13px; color: #e05050; text-align: center; }

/* ── Verify Banner ───────────────────────────────────────────── */
.verify-banner { background: #1a1400; border: 1px solid #3a3000; border-radius: 6px; padding: 12px 16px; font-size: 13px; color: #c0a040; }

/* ── Admin Dashboard ─────────────────────────────────────────── */
.adm-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.adm-title { font-size: 26px; font-weight: 700; color: #fff; letter-spacing: -.02em; margin-bottom: 2px; }
.adm-subtitle { font-size: 13px; color: #555; }
.adm-pulse { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #5adb8a; font-weight: 500; }
.adm-pulse-dot { width: 8px; height: 8px; background: #5adb8a; border-radius: 50%; animation: pulse 2s ease-in-out infinite; }

.adm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 24px; }
.adm-stat { background: #111; border: 1px solid #1e1e1e; border-radius: 4px; padding: 16px; display: flex; align-items: center; gap: 12px; position: relative; overflow: hidden; }
.adm-stat-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.adm-stat-blue { background: #0a1a2a; color: #4090e0; border: 1px solid #1a2a4a; }
.adm-stat-green { background: #0d2a1a; color: #5adb8a; border: 1px solid #1a5a30; }
.adm-stat-orange { background: #2a1a0a; color: #D97757; border: 1px solid #4a2a1a; }
.adm-stat-value { font-size: 24px; font-weight: 700; color: #fff; }
.adm-stat-label { font-size: 11px; color: #555; text-transform: uppercase; letter-spacing: .5px; }
.adm-stat-delta { position: absolute; top: 8px; right: 10px; font-size: 10px; font-weight: 500; }
.adm-delta-up { color: #5adb8a; }

.adm-tabs { display: flex; gap: 4px; margin-bottom: 20px; }
.adm-tab { display: flex; align-items: center; gap: 6px; padding: 10px 18px; font-size: 13px; color: #555; background: #111; border: 1px solid #1e1e1e; border-radius: 4px 4px 0 0; transition: all .12s; }
.adm-tab:hover { color: #ccc; border-color: #2a2a2a; }
.adm-tab.active { color: #fff; background: #141414; border-color: #2a2a2a; border-bottom-color: #141414; }
.adm-tab-icon { font-size: 14px; }

.adm-panel { background: #141414; border: 1px solid #2a2a2a; border-radius: 0 4px 4px 4px; overflow: hidden; }
.adm-panel-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid #1e1e1e; }
.adm-panel-header h2 { margin: 0; font-size: 15px; }
.adm-count { font-size: 12px; color: #555; background: #1a1a1a; padding: 2px 10px; border-radius: 10px; }
.adm-empty { padding: 48px 20px; text-align: center; color: #444; font-size: 13px; }

.adm-activity-row { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid #1a1a1a; transition: background .1s; }
.adm-activity-row:last-child { border-bottom: none; }
.adm-activity-row:hover { background: #181818; }
.adm-activity-icon { width: 28px; height: 28px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.adm-ai-signup { background: #0d2a1a; color: #5adb8a; border: 1px solid #1a5a30; }
.adm-activity-body { flex: 1; font-size: 13px; color: #ccc; min-width: 0; }
.adm-activity-body strong { color: #fff; }
.adm-activity-time { font-size: 11px; color: #444; flex-shrink: 0; white-space: nowrap; }

.adm-user-list { }
.adm-user-row { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid #1a1a1a; transition: background .1s; }
.adm-user-row:last-child { border-bottom: none; }
.adm-user-row:hover { background: #181818; }
.adm-user-avatar { width: 32px; height: 32px; border-radius: 6px; background: #1a1a2a; border: 1px solid #2a2a4a; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #7070e0; flex-shrink: 0; }
.adm-user-info { flex: 1; min-width: 0; }
.adm-user-name { font-size: 13px; font-weight: 600; color: #eee; }
.adm-user-email { font-size: 11px; color: #555; }
.adm-user-meta { flex-shrink: 0; }
.adm-user-date { font-size: 11px; color: #444; flex-shrink: 0; }
.adm-user-actions { display: flex; gap: 4px; flex-shrink: 0; }

.adm-action-btn { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; background: #1a1a1a; border: 1px solid #2a2a2a; border-radius: 4px; color: #666; font-size: 13px; cursor: pointer; transition: all .12s; font-family: inherit; text-decoration: none; }
.adm-action-btn:hover { background: #222; border-color: #333; color: #ccc; }
.adm-action-view:hover { background: #1a1a2a; border-color: #2a2a4a; color: #7070e0; }
.adm-action-danger:hover { background: #2a0d0d; border-color: #5a2020; color: #e05050; }

.adm-inline-form { display: flex; gap: 8px; align-items: center; padding: 16px 20px; }
.adm-inline-form input, .adm-inline-form select { flex: 1; background: #1a1a1a; border: 1px solid #2a2a2a; border-radius: 6px; color: #eee; font-size: 13px; padding: 8px 12px; outline: none; font-family: inherit; }
.adm-inline-form input:focus, .adm-inline-form select:focus { border-color: #555; }

.adm-reassign-form { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.adm-reassign-form select { background: #1a1a1a; border: 1px solid #2a2a2a; border-radius: 6px; color: #eee; font-size: 12px; padding: 6px 10px; outline: none; font-family: inherit; min-width: 180px; }

.adm-ws-owner-row { display: flex; align-items: center; gap: 12px; padding: 16px 20px; }

.adm-panel-danger { border-color: #3a1010; }
.adm-danger-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; }

.adm-panel + .adm-panel { margin-top: 16px; }

.badge-viewer { background: #1a1a1a; border: 1px solid #2a2a2a; color: #666; font-size: 11px; padding: 2px 8px; border-radius: 4px; }
.badge-healthy, .badge-up { background: #0d2a1a; border: 1px solid #1a5a30; color: #5adb8a; font-size: 11px; padding: 2px 8px; border-radius: 4px; }
.badge-down, .badge-unhealthy { background: #2a0d0d; border: 1px solid #5a2020; color: #e05050; font-size: 11px; padding: 2px 8px; border-radius: 4px; }
.badge-unknown { background: #1a1a1a; border: 1px solid #2a2a2a; color: #666; font-size: 11px; padding: 2px 8px; border-radius: 4px; }
.badge-suspended { background: #2a0d0d; border: 1px solid #5a2020; color: #e05050; font-size: 10px; padding: 1px 6px; border-radius: 4px; margin-left: 6px; vertical-align: 1px; }

/* ── Stats Grid ──────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.stat-card { background: #141414; border: 1px solid #1e1e1e; border-radius: 10px; padding: 20px; text-align: center; }
.stat-value { font-size: 28px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.stat-label { font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: #555; }

/* ── Footer ──────────────────────────────────────────────────── */
.platform-footer { text-align: center; padding: 32px 24px; font-size: 12px; color: #333; border-top: 1px solid #1a1a1a; }
.platform-footer a { color: #444; }
.platform-footer a:hover { color: #888; }
.footer-sep { margin: 0 8px; }

/* ── Cookie Banner ───────────────────────────────────────────── */
.cookie-banner { position: fixed; bottom: 0; left: 0; right: 0; background: #1a1a1a; border-top: 1px solid #2a2a2a; padding: 14px 24px; display: flex; align-items: center; justify-content: center; gap: 16px; font-size: 13px; color: #888; z-index: 1000; }

/* ── Onboarding ────────────────────────────────────────────── */
.onboarding-card { background: #141414; border: 1px solid #1e1e1e; border-radius: 12px; padding: 32px; margin-top: 16px; }
.onboarding-header { margin-bottom: 28px; }
.onboarding-header h2 { font-size: 20px; color: #fff; margin-bottom: 4px; }
.onboarding-header p { font-size: 14px; color: #666; }
.onboarding-steps { display: flex; flex-direction: column; gap: 0; }
.onboarding-step { display: flex; gap: 16px; padding: 20px 0; border-top: 1px solid #1e1e1e; }
.onboarding-step:first-child { border-top: none; }
.step-number { width: 32px; height: 32px; border-radius: 50%; background: #1a1a1a; border: 1px solid #333; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #555; flex-shrink: 0; }
.step-content h4 { font-size: 14px; color: #aaa; margin-bottom: 4px; }
.step-content p { font-size: 13px; color: #555; }
.onboarding-step.done .step-number { background: #0d2a1a; border-color: #1a5a30; color: #5adb8a; }
.onboarding-step.done .step-content h4 { color: #5adb8a; }
.onboarding-step.active .step-number { background: #1a1a2a; border-color: #D97757; color: #D97757; }
.onboarding-step.active .step-content h4 { color: #fff; }
.onboarding-step.active .step-content p { color: #888; }

/* ── Toast Notifications ─────────────────────────────────────── */
.toast-container { position: fixed; top: 16px; right: 16px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 12px 16px; border-radius: 8px; font-size: 13px; display: flex; align-items: center; gap: 12px; transform: translateX(120%); transition: transform .3s ease; box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.toast-show { transform: translateX(0); }
.toast-success { background: #0d2a1a; border: 1px solid #1a5a30; color: #5adb8a; }
.toast-error { background: #2a0d0d; border: 1px solid #5a2020; color: #e05050; }
.toast-close { background: none; border: none; color: inherit; cursor: pointer; font-size: 16px; padding: 0; opacity: 0.5; }
.toast-close:hover { opacity: 1; }

/* ── Back to Top ─────────────────────────────────────────────── */
.back-to-top { position: fixed; bottom: 24px; right: 24px; width: 36px; height: 36px; border-radius: 50%; background: #1a1a1a; border: 1px solid #2a2a2a; color: #666; font-size: 14px; cursor: pointer; opacity: 0; transition: opacity .2s; z-index: 100; display: flex; align-items: center; justify-content: center; }
.btt-show { opacity: 1; }
.back-to-top:hover { background: #222; color: #fff; }

/* ── Utilities ────────────────────────────────────────────────── */
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.text-right { text-align: right; }

/* ── Hub Dashboard ───────────────────────────────────────────── */
.hub-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; gap: 16px; flex-wrap: wrap; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.stat-card { background: #161616; border: 1px solid #222; border-radius: 8px; padding: 16px; }
.stat-label { font-size: 12px; color: #666; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.stat-value { font-size: 22px; font-weight: 600; color: #eee; }
.stat-sub { font-size: 11px; color: #555; margin-top: 4px; }
.stat-bar { background: #222; border-radius: 4px; height: 6px; margin-top: 8px; overflow: hidden; }
.stat-bar-fill { height: 100%; background: #D97757; border-radius: 4px; transition: width 0.3s; }
.stat-bar-warn { background: #e6a700; }
.stat-bar-danger { background: #e05050; }
.mini-stat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 5px; }
.mini-stat { background: #161616; border: 1px solid #222; border-radius: 6px; padding: 8px 14px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; }
.mini-stat-label { color: #555; }
.mini-stat-value { color: #aaa; font-weight: 500; }
.claude-links { display: flex; justify-content: flex-end; gap: 14px; margin-top: 8px; }
.claude-links a { font-size: 11px; color: #555; text-decoration: none; display: flex; align-items: center; gap: 4px; transition: color 0.15s; }
.claude-links a:hover { color: #D97757; }

.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.section-header h2 { font-size: 16px; color: #aaa; }
.mt-32 { margin-top: 32px; }

.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.app-card { display: block; background: #161616; border: 1px solid #222; border-radius: 8px; padding: 16px; transition: border-color 0.15s, background 0.15s; text-decoration: none; color: inherit; }
.app-card:hover { border-color: #444; background: #1a1a1a; }
.app-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.app-card-status { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.status-online { background: #22c55e; box-shadow: 0 0 6px rgba(34,197,94,0.4); }
.status-offline { background: #e05050; box-shadow: 0 0 6px rgba(224,80,80,0.4); }
.status-unknown { background: #555; }
.app-card-name { font-weight: 600; color: #eee; font-size: 15px; flex: 1; }
.app-card-badge { font-size: 11px; padding: 2px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.3px; }
.badge-online { background: rgba(34,197,94,0.15); color: #22c55e; }
.badge-offline { background: rgba(224,80,80,0.15); color: #e05050; }
.badge-unknown { background: rgba(85,85,85,0.3); color: #888; }
.app-card-desc { font-size: 13px; color: #888; margin-bottom: 8px; line-height: 1.4; }
.app-card-meta { font-size: 12px; color: #555; display: flex; gap: 12px; }
.app-card-stats { font-size: 11px; color: #666; display: flex; gap: 12px; margin-top: 8px; border-top: 1px solid #1e1e1e; padding-top: 8px; }
.text-warn { color: #e6a700; }
.claude-badge { position: absolute; bottom: 15px; right: 10px; display: flex; align-items: center; gap: 5px; font-size: 10px; opacity: 0.25; color: #fff; }
.claude-badge img { filter: brightness(0) invert(1); }
.claude-badge.claude-active { opacity: 1; color: #D97757; }
.claude-badge.claude-active img { filter: none; }
.claude-badge.claude-resume { opacity: 0.75; color: #e0a040; }
.claude-badge.claude-resume img { filter: none; opacity: 0.8; }
.app-actions-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.app-actions-grid .btn, .app-actions-grid .claude-connect-btn { text-align: center; justify-content: center; }
.claude-connect-btn { display: flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 6px; font-size: 13px; font-weight: 600; text-decoration: none; border: 1px solid #333; color: #555; background: transparent; transition: all 0.15s; }
.claude-connect-btn img { filter: brightness(0.3) grayscale(1); transition: filter 0.15s; }
.claude-connect-btn:hover { border-color: #555; color: #888; }
.claude-connect-btn.active { border-color: #D97757; color: #D97757; }
.claude-connect-btn.active img { filter: none; }
.claude-connect-btn.active:hover { background: rgba(217,119,87,0.1); }
/* ── Remote Session ─────────────────────────────────────────── */
.btn-remote { background: #1a1a1a; border: 1px solid #333; color: #aaa; border-radius: 8px; text-decoration: none; }
.btn-remote:hover { border-color: #D97757; color: #D97757; }
.remote-panel { display: grid; grid-template-columns: 220px 1fr; gap: 16px; }
.remote-sidebar { display: flex; flex-direction: column; gap: 10px; }
.remote-terminal { min-width: 0; }
.remote-qr-card { background: #141414; border: 1px solid #1e1e1e; border-radius: 10px; padding: 16px; text-align: center; }
.remote-qr-label { font-size: 11px; color: #666; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; }
.remote-qr { display: flex; justify-content: center; margin-bottom: 8px; }
.remote-qr-sub { font-size: 10px; color: #444; }
.remote-timer-card { background: #141414; border: 1px solid #1e1e1e; border-radius: 10px; padding: 16px; text-align: center; position: relative; }
.remote-timer-label { font-size: 11px; color: #666; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.remote-timer { font-size: 24px; font-weight: 600; color: #D97757; font-family: monospace; letter-spacing: 2px; }
.remote-timer-pulse { width: 8px; height: 8px; background: #D97757; border-radius: 50%; position: absolute; top: 16px; right: 16px; animation: remotePulse 2s infinite; }
@keyframes remotePulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.remote-info-card { background: #141414; border: 1px solid #1e1e1e; border-radius: 10px; padding: 14px; }

.terminal-window { border-radius: 10px; overflow: hidden; border: 1px solid #333; background: #000; box-shadow: 0 8px 32px rgba(0,0,0,0.5); }
.terminal-titlebar { display: flex; align-items: center; justify-content: space-between; background: #1e1e1e; padding: 10px 14px; border-bottom: 1px solid #2a2a2a; }
.terminal-dots { display: flex; gap: 7px; }
.terminal-dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-red { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green { background: #28c840; }
.terminal-title { font-size: 12px; color: #777; font-weight: 500; }
.btn-mobile-terminal { background: #000; border: 1px solid #333; color: #aaa; border-radius: 8px; text-decoration: none; }
.btn-mobile-terminal:hover { border-color: #D97757; color: #D97757; }
.btn-force-reload { background: #000; border: 1px solid #333; color: #aaa; border-radius: 8px; }
.btn-force-reload:hover { border-color: #D97757; color: #D97757; }
.upload-panel { background: #141414; border: 1px solid #1e1e1e; border-radius: 10px; padding: 16px; }
.upload-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.upload-drop { border: 1px dashed #333; border-radius: 8px; padding: 24px; text-align: center; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.upload-drop:hover, .upload-drop.drag-over { border-color: #D97757; background: rgba(217,119,87,0.05); }
.upload-drop-text { font-size: 12px; color: #555; }
.upload-list { display: flex; flex-direction: column; gap: 6px; }
.upload-item { background: #1a1a1a; border: 1px solid #252525; border-radius: 6px; padding: 10px 12px; }
.upload-item-info { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.upload-item-name { font-size: 12px; color: #ccc; font-weight: 500; }
.upload-item-size { font-size: 11px; color: #555; }
.upload-item-path { font-size: 11px; color: #D97757; font-family: monospace; margin-bottom: 6px; word-break: break-all; }
.upload-item-actions { display: flex; align-items: center; gap: 8px; }
.upload-copy-btn { background: #222; border: 1px solid #333; color: #aaa; font-size: 11px; padding: 3px 10px; border-radius: 4px; cursor: pointer; transition: all 0.15s; }
.upload-copy-btn:hover { border-color: #D97757; color: #D97757; }
.upload-copied { font-size: 11px; color: #D97757; opacity: 0; transition: opacity 0.3s; }
.upload-delete-btn { background: none; border: none; color: #555; font-size: 13px; cursor: pointer; margin-left: auto; padding: 2px 6px; transition: color 0.15s; }
.upload-delete-btn:hover { color: #e05050; }
.terminal-toggle-wrap { display: flex; align-items: center; }
.terminal-toggle { position: relative; display: inline-block; width: 80px; height: 22px; cursor: pointer; }
.terminal-toggle input { opacity: 0; width: 0; height: 0; }
.terminal-toggle-slider { position: absolute; inset: 0; background: #333; border-radius: 4px; transition: background 0.2s; }
.terminal-toggle-slider::before { content: ''; position: absolute; width: 36px; height: 16px; left: 3px; top: 3px; background: #222; border-radius: 3px; transition: transform 0.2s, background 0.2s, box-shadow 0.2s; }
.terminal-toggle-slider .toggle-icon { position: absolute; top: 50%; left: 12px; transform: translateY(-50%); width: 10px; height: 10px; opacity: 0.1; filter: brightness(0); transition: all 0.2s; }
.terminal-toggle input:checked + .terminal-toggle-slider { background: rgba(217,119,87,0.3); }
.terminal-toggle input:checked + .terminal-toggle-slider::before { transform: translateX(38px); background: #D97757; box-shadow: 0 0 8px rgba(217,119,87,0.6); }
.terminal-toggle input:checked + .terminal-toggle-slider .toggle-icon { left: 50px; opacity: 1; filter: brightness(0); }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card-title { font-size: 14px; color: #aaa; margin-bottom: 12px; font-weight: 600; }
.detail-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid #1a1a1a; }
.detail-label { font-size: 13px; color: #666; }
.detail-value { font-size: 13px; color: #ccc; }
.detail-value code { background: #1a1a1a; padding: 2px 6px; border-radius: 3px; font-size: 12px; }

.quick-link { display: block; padding: 8px 0; color: #4a9eff; font-size: 13px; border-bottom: 1px solid #1a1a1a; }
.quick-link:hover { color: #6bb5ff; }
.quick-link span { margin-right: 6px; }
.quick-link code { color: #ccc; background: #1a1a1a; padding: 2px 6px; border-radius: 3px; font-size: 12px; }

.log-viewer { background: #0a0a0a; border: 1px solid #222; border-radius: 6px; padding: 12px; max-height: 400px; overflow-y: auto; font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace; font-size: 12px; line-height: 1.6; }
.log-viewer-full { max-height: 70vh; }
.log-line { padding: 1px 4px; white-space: pre-wrap; word-break: break-all; color: #999; border-radius: 2px; }
.log-line:hover { background: #151515; }
.log-error { color: #e05050; }
.log-warn { color: #e6a700; }
.log-redirect { color: #4a9eff; }

.log-controls { display: flex; gap: 12px; align-items: flex-end; }
.log-stats-bar { display: flex; gap: 24px; font-size: 13px; color: #666; }
.log-stats-bar strong { color: #ccc; }

.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; }
.hint { font-size: 11px; color: #555; margin-top: 4px; }

.btn-warn { background: #e6a700; color: #000; border: none; }
.btn-warn:hover { background: #ffc107; }
.btn-danger { background: transparent; color: #e05050; border: 1px solid #e05050; }
.btn-danger:hover { background: rgba(224,80,80,0.1); }
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* ── Deploy Progress ─────────────────────────────────────────── */
.deploy-steps { display: flex; flex-direction: column; gap: 0; }
.deploy-step { display: flex; align-items: center; gap: 12px; font-size: 14px; color: #aaa; padding: 10px 0; border-bottom: 1px solid #1e1e1e; }
.deploy-step:last-child { border-bottom: none; }
.deploy-icon { font-size: 16px; width: 22px; text-align: center; flex-shrink: 0; color: #555; transition: color .2s; }

.empty-state { text-align: center; padding: 60px 20px; }
.empty-state-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h3 { color: #ccc; margin-bottom: 8px; }
.empty-state p { color: #666; }

/* ── Pricing ─────────────────────────────────────────────────── */
.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 60px; }
.pricing-card { background: #141414; border: 1px solid #1e1e1e; border-radius: 12px; padding: 28px 24px; display: flex; flex-direction: column; position: relative; }
.pricing-featured { border-color: #333; background: #181818; }
.pricing-badge { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: #fff; color: #000; font-size: 11px; font-weight: 600; padding: 3px 12px; border-radius: 20px; white-space: nowrap; }
.pricing-name { font-size: 16px; font-weight: 600; color: #fff; margin-bottom: 12px; }
.pricing-price { margin-bottom: 8px; }
.pricing-currency { font-size: 16px; color: #888; vertical-align: super; }
.pricing-amount { font-size: 42px; font-weight: 700; color: #fff; letter-spacing: -.02em; }
.pricing-period { font-size: 14px; color: #555; }
.pricing-specs { font-size: 12px; color: #666; margin-bottom: 6px; font-family: monospace; }
.pricing-slots { font-size: 14px; color: #aaa; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #1e1e1e; }
.pricing-slots strong { color: #fff; }
.pricing-features { list-style: none; margin-bottom: 24px; flex: 1; }
.pricing-features li { font-size: 13px; color: #888; padding: 5px 0; padding-left: 18px; position: relative; }
.pricing-features li::before { content: "\2713"; position: absolute; left: 0; color: #5adb8a; font-size: 12px; }

/* ── Slot Usage ──────────────────────────────────────────────── */
.slot-bar { background: #1a1a1a; border-radius: 6px; height: 8px; overflow: hidden; margin-top: 6px; }
.slot-bar-fill { height: 100%; border-radius: 6px; background: #5adb8a; transition: width .3s; }
.slot-bar-fill.warning { background: #e0a030; }
.slot-bar-fill.critical { background: #e05050; }
.slot-info { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.slot-info .label { margin-bottom: 0; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  nav { padding: 0 16px; }
  nav .nav-links { display: none; }
  .burger { display: flex; }
  .page, .page-narrow, .page-mid { padding-left: 16px; padding-right: 16px; }
  .landing-features { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr 1fr; }
  .landing-title { font-size: 28px; }
  .landing-hero { padding: 60px 16px 40px; }
  .adm-stats { grid-template-columns: 1fr; }
  .adm-tabs { flex-wrap: wrap; }
  .adm-user-row { flex-wrap: wrap; gap: 8px; }
  .adm-user-date { display: none; }
  .admin-bar .ab-text { display: none; }
  .detail-grid { grid-template-columns: 1fr; }
  .remote-panel { grid-template-columns: 1fr; }
  .remote-sidebar { flex-direction: row; flex-wrap: wrap; }
  .remote-qr-card, .remote-timer-card, .remote-info-card { flex: 1; min-width: 150px; }
  .app-grid { grid-template-columns: 1fr; }
  .field-row { flex-direction: column; gap: 0; }
  .log-controls { flex-direction: column; }
  .hub-header { flex-direction: column; }
  .app-actions-grid { grid-template-columns: 1fr 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .mini-stat-grid { grid-template-columns: 1fr 1fr; }
  .claude-links { flex-wrap: wrap; justify-content: center; }
  .adm-inline-form { flex-wrap: wrap; }
  .adm-reassign-form { flex-wrap: wrap; margin-left: 0; margin-top: 8px; }
  .adm-ws-owner-row { flex-wrap: wrap; }
  .adm-danger-row { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* ── Mobile Input Bar ────────────────────────────────────────── */
.mobile-input-bar { display: none; background: #111; border-top: 1px solid #333; }
.mobile-input-bar.visible { display: block; }
.mobile-key-row { display: flex; gap: 0; border-bottom: 1px solid #222; }
.mobile-key-btn { background: #111; border: none; border-right: 1px solid #222; color: #777; padding: 7px 0; cursor: pointer; font-size: 11px; font-family: 'SF Mono', 'Fira Code', monospace; font-weight: 600; display: flex; align-items: center; justify-content: center; flex: 1; -webkit-tap-highlight-color: transparent; }
.mobile-key-btn:last-child { border-right: none; }
.mobile-key-btn:active, .mobile-key-btn.flash { background: #D97757; color: #fff; }
.mobile-key-wide { flex: 1.3; }
.mobile-input-row { display: flex; align-items: center; gap: 0; }
.mobile-input-row input { flex: 1; background: #000; border: none; color: #eee; font-size: 12px; padding: 8px 10px; outline: none; font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace; }
.mobile-input-row input::placeholder { color: #444; }
.mobile-input-row input:focus { background: #0a0a0a; }
.mobile-prompt-send { background: #D97757; border: none; color: #fff; padding: 8px 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mobile-prompt-send:active { opacity: 0.7; }
.mobile-ws-status { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; margin-right: 8px; background: #333; }
.mobile-ws-status.connected { background: #28c840; }
.mobile-ws-status.disconnected { background: #e05050; }
