/* NitroCMS Unified Stylesheet - Extracted from mockup design system */

:root {
  --blue: #3260FF;
  --blue-dark: #254EDA;
  --green: #00EB66;
  --pink: #FF69B4;
  --purple: #A855F7;
  --red: #EF4444;
  --amber: #F59E0B;
  --slate-900: #0F172A;
  --slate-800: #1E293B;
  --slate-700: #334155;
  --slate-500: #64748B;
  --slate-400: #94A3B8;
  --slate-300: #CBD5E1;
  --slate-200: #E2E8F0;
  --slate-100: #F1F5F9;
  --slate-50: #F8FAFC;
  --blue-10: rgba(50, 96, 255, 0.1);
  --blue-20: rgba(50, 96, 255, 0.2);
  --green-10: rgba(0, 235, 102, 0.1);
  --green-20: rgba(0, 235, 102, 0.2);
  --purple-10: rgba(168, 85, 247, 0.1);
  --purple-20: rgba(168, 85, 247, 0.2);
  --pink-10: rgba(255, 105, 180, 0.1);
  --pink-20: rgba(255, 105, 180, 0.2);
  --red-10: rgba(239, 68, 68, 0.1);
  --amber-10: rgba(245, 158, 11, 0.1);
  --font-display: 'Poppins', sans-serif;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body { font-family: var(--font-body); background: var(--slate-50); color: var(--slate-900); font-size: 13px; line-height: 1.5; display: flex; flex-direction: column; }

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.fade-up { animation: fadeUp 0.4s ease-out both; }
.fade-up:nth-child(1) { animation-delay: 0.04s; }
.fade-up:nth-child(2) { animation-delay: 0.08s; }
.fade-up:nth-child(3) { animation-delay: 0.12s; }
.fade-up:nth-child(4) { animation-delay: 0.16s; }
.fade-up:nth-child(5) { animation-delay: 0.20s; }
.fade-up:nth-child(6) { animation-delay: 0.24s; }
.fade-up:nth-child(7) { animation-delay: 0.28s; }
.fade-up:nth-child(8) { animation-delay: 0.32s; }

/* ==================== APP LAYOUT ==================== */

#starfield-canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.app-container { display: flex; flex: 1; overflow: hidden; position: relative; z-index: 1; }
.app-footer { width: 100%; padding: 8px 0; font-size: 11px; color: var(--slate-400); text-align: center; background: transparent; flex-shrink: 0; position: relative; z-index: 1; }
.app-footer span { position: relative; z-index: 1; }
.app-container.layout-auth { justify-content: center; align-items: center; background: transparent; }
.layout-auth .app-main { background: transparent; }

/* Sidebar */
.sidebar { width: 248px; background: transparent; color: var(--slate-200); display: flex; flex-direction: column; flex-shrink: 0; height: 100%; overflow: hidden; position: relative; }
.sidebar-logo { padding: 20px 16px; border-bottom: 1px solid rgba(255,255,255,0.06); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }
.sidebar-logo .logo-row { display: flex; align-items: center; gap: 10px; }
.sidebar-logo .logo-icon { flex-shrink: 0; }
.sidebar-logo h2 { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: #fff; }
.sidebar-logo .logo-badge { font-family: var(--font-body); font-size: 9px; font-weight: 600; background: var(--blue); color: #fff; padding: 2px 6px; border-radius: 4px; letter-spacing: 0.03em; }
.sidebar-site-name { font-size: 11px; font-weight: 600; letter-spacing: 0.03em; background: linear-gradient(90deg, var(--blue), var(--purple)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; display: block; width: 100%; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidebar nav { padding: 8px 0 16px; flex: 1; overflow-y: auto; position: relative; z-index: 1; margin-bottom: 24px; }
.sidebar nav::-webkit-scrollbar { width: 4px; }
.sidebar nav::-webkit-scrollbar-thumb { background: var(--slate-700); border-radius: 2px; }

.nav-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--slate-400); padding: 16px 16px 6px; border-bottom: 1px solid rgba(255,255,255,0.08); margin: 0 16px; padding-left: 0; padding-right: 0; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 16px; font-size: 14px; font-weight: 500; color: var(--slate-300); cursor: pointer; transition: all 0.15s; border-left: 2px solid transparent; text-decoration: none; }
.nav-item:hover { background: rgba(255,255,255,0.06); color: var(--slate-200); }
.nav-item.active { background: rgba(50,96,255,0.12); color: #fff; border-left-color: var(--blue); }
.nav-item svg { flex-shrink: 0; opacity: 0.6; }
.nav-item.active svg { opacity: 1; }
.nav-count { margin-left: auto; font-size: 10px; background: var(--slate-700); padding: 1px 7px; border-radius: 99px; color: var(--slate-400); }
.nav-count.alert { background: #dc2626; color: #fff; }

/* Page tree items */
.page-nav-item { padding: 7px 16px; font-size: 14px; }
.page-nav-item.page-child { padding-left: 44px; position: relative; }
.page-nav-item.page-child::before { content: ''; position: absolute; left: 28px; top: 0; bottom: 0; width: 1px; background: var(--slate-700); }
.page-nav-item.page-child::after { content: ''; position: absolute; left: 28px; top: 50%; width: 8px; height: 1px; background: var(--slate-700); }
.page-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.dot-green { background: var(--green); }
.dot-amber { background: var(--amber); }
.dot-red { background: var(--red); }
.dot-blue { background: var(--blue); }
.page-title { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-toggle { opacity: 0.4; }

/* Sidebar footer */
.sidebar-footer { position: fixed; bottom: 0; left: 0; width: 248px; padding: 12px 16px; z-index: 10; }
.sidebar-footer .nav-item { padding: 9px 0; border-left: none; }
.sidebar-user { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; flex-shrink: 0; }
.user-info { display: flex; flex-direction: column; min-width: 0; }
.user-name { font-size: 12px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 10px; color: var(--slate-500); text-transform: capitalize; }

/* Role Switcher */
.role-switcher { margin-bottom: 12px; }
.role-switcher-label { font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--slate-500); margin-bottom: 6px; }
.role-switcher-options { display: flex; flex-direction: column; gap: 2px; }
.role-option {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 6px 10px; border-radius: 6px;
  background: transparent; border: 1px solid transparent;
  color: var(--slate-400); font-family: var(--font-body); font-size: 12px; font-weight: 500;
  cursor: pointer; transition: all 0.15s; text-align: left;
}
.role-option:hover { background: rgba(255,255,255,0.06); color: var(--slate-200); }
.role-option.active {
  background: rgba(255,255,255,0.08); color: #fff;
  border-color: var(--role-color, var(--blue));
  box-shadow: 0 0 0 1px var(--role-color, var(--blue)) inset;
}
.role-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* Main content area */
.app-main { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: var(--slate-50); position: relative; z-index: 2; }

/* Top bar */
.topbar { height: 56px; background: rgba(255,255,255,0.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--slate-200); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; flex-shrink: 0; }
.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.breadcrumb { font-size: 13px; color: var(--slate-500); display: flex; align-items: center; gap: 6px; }
.breadcrumb a { color: var(--slate-500); text-decoration: none; }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb .sep { color: var(--slate-300); }
.breadcrumb .current { font-family: var(--font-display); color: var(--slate-900); font-weight: 700; }

/* Screen content */
#screen-content { flex: 1; overflow-y: auto; }

/* ==================== BUTTONS ==================== */

.btn { padding: 7px 16px; border-radius: 6px; font-family: var(--font-body); font-size: 13px; font-weight: 600; cursor: pointer; border: none; transition: all 0.15s; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; white-space: nowrap; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-success { background: var(--green); color: var(--slate-900); }
.btn-success:hover { background: #00d45c; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-outline { background: #fff; border: 1px solid var(--slate-200); color: var(--slate-700); }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-10); }
.btn-ghost { background: transparent; color: var(--slate-500); }
.btn-ghost:hover { background: var(--slate-100); color: var(--slate-700); }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-lg { padding: 10px 24px; font-size: 14px; }
.btn-icon { width: 32px; height: 32px; padding: 0; display: flex; align-items: center; justify-content: center; border-radius: 8px; }
.btn-icon.sm { width: 28px; height: 28px; }
.btn-icon svg, .sec-act svg, [data-act] svg { pointer-events: none; }

/* ==================== CARDS ==================== */

.card { background: #fff; border: 1px solid var(--slate-200); border-radius: 8px; }
.card:hover { border-color: var(--blue); box-shadow: 0 0 0 1px rgba(50,96,255,0.1); }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--slate-100); display: flex; align-items: center; justify-content: space-between; }
.card-body { padding: 20px; }
.card-footer { padding: 12px 20px; border-top: 1px solid var(--slate-100); }

/* Stat cards */
.stat-card { background: #fff; border: 1px solid var(--slate-200); border-radius: 8px; padding: 20px; }
.stat-card .stat-label { font-size: 12px; color: var(--slate-500); font-weight: 500; margin-bottom: 8px; }
.stat-card .stat-value { font-family: var(--font-display); font-size: 28px; font-weight: 700; line-height: 1; }
.stat-card .stat-change { font-size: 12px; font-weight: 600; margin-top: 8px; display: flex; align-items: center; gap: 4px; }
.stat-change.positive { color: #10b981; }
.stat-change.negative { color: var(--red); }
.stat-row { display: grid; gap: 16px; }
.stat-row-4 { grid-template-columns: repeat(4, 1fr); }
.stat-row-3 { grid-template-columns: repeat(3, 1fr); }
.stat-row-5 { grid-template-columns: repeat(5, 1fr); }

/* ==================== BADGES ==================== */

.badge { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 99px; display: inline-block; }
.badge-green { background: var(--green-10); color: #059669; }
.badge-amber { background: var(--amber-10); color: #92400e; }
.badge-red { background: var(--red-10); color: #dc2626; }
.badge-blue { background: var(--blue-10); color: var(--blue); }
.badge-purple { background: var(--purple-10); color: #7c3aed; }
.badge-gray { background: var(--slate-100); color: var(--slate-500); }

/* Lighthouse scores */
.lh-score { font-family: var(--font-display); font-size: 13px; font-weight: 700; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.lh-green { background: var(--green-10); color: #059669; border: 2px solid var(--green); }
.lh-amber { background: var(--amber-10); color: #92400e; border: 2px solid var(--amber); }
.lh-red { background: var(--red-10); color: var(--red); border: 2px solid var(--red); }
.lh-na { background: var(--slate-100); color: var(--slate-400); border: 2px solid var(--slate-200); }

/* ==================== TABLES ==================== */

.data-table { width: 100%; border-collapse: collapse; }
.data-table th { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: var(--slate-500); padding: 10px 16px; text-align: left; background: var(--slate-50); border-bottom: 1px solid var(--slate-200); }
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--slate-100); font-size: 13px; }
.data-table tr:hover td { background: var(--slate-50); }
.data-table .table-link { color: var(--slate-900); text-decoration: none; font-weight: 500; }
.data-table .table-link:hover { color: var(--blue); }
.data-table .text-muted { color: var(--slate-500); }
.data-table .text-right { text-align: right; }

/* ==================== FORMS ==================== */

.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--slate-700); margin-bottom: 4px; }
.form-hint { font-size: 11px; color: var(--slate-500); margin-top: 2px; }
.form-input { width: 100%; padding: 8px 12px; border: 1px solid var(--slate-200); border-radius: 6px; font-family: var(--font-body); font-size: 14px; color: var(--slate-900); background: #fff; transition: all 0.15s; }
.form-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-10); }
.form-input::placeholder { color: var(--slate-400); }
textarea.form-input { resize: vertical; min-height: 80px; }
select.form-input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%2364748B' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

/* Toggle */
.toggle { position: relative; width: 36px; height: 20px; cursor: pointer; }
.toggle input { display: none; }
.toggle .track { position: absolute; inset: 0; background: var(--slate-200); border-radius: 10px; transition: 0.2s; }
.toggle input:checked + .track { background: var(--blue); }
.toggle .thumb { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.toggle input:checked ~ .thumb { left: 18px; }

/* ==================== SECTION CARDS (Editor) ==================== */

.section-list { display: flex; flex-direction: column; gap: 8px; }
.section-card { background: #fff; border: 1px solid var(--slate-100); border-radius: 12px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; cursor: pointer; transition: all 0.15s; border-top: 3px solid transparent; flex-wrap: wrap; }
.section-preview { flex-basis: 100%; cursor: default; }
.section-card:nth-child(4n+1) { border-top-color: var(--blue); }
.section-card:nth-child(4n+2) { border-top-color: var(--green); }
.section-card:nth-child(4n+3) { border-top-color: var(--purple); }
.section-card:nth-child(4n+4) { border-top-color: var(--pink); }
.section-card:hover { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue-10); }
.section-card.active { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); background: var(--blue-10); border-top-color: var(--blue); }
.section-info { flex: 1; min-width: 0; }
.section-type { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--blue); margin-bottom: 2px; }
.section-title { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.section-actions { display: flex; gap: 6px; opacity: 0; transition: opacity 0.15s; }
.section-card:hover .section-actions { opacity: 1; }
.drag-handle { color: var(--slate-300); cursor: grab; font-size: 16px; flex-shrink: 0; }

.add-section { border: 2px dashed var(--slate-200); border-radius: 12px; padding: 14px; text-align: center; color: var(--slate-400); font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.15s; }
.add-section:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-10); }

/* ==================== RIGHT PANEL (Editor) ==================== */

.panel { width: 380px; background: #fff; border-left: 1px solid var(--slate-200); overflow-y: auto; flex-shrink: 0; }
.panel-header { padding: 16px 20px; border-bottom: 1px solid var(--slate-100); display: flex; align-items: center; justify-content: space-between; }
.panel-header h3 { font-family: var(--font-display); font-size: 14px; font-weight: 700; }
.panel-body { padding: 20px; }
.panel-tabs { display: flex; border-bottom: 1px solid var(--slate-100); }
.panel-tab { padding: 10px 16px; font-size: 12px; font-weight: 600; color: var(--slate-500); cursor: pointer; border-bottom: 2px solid transparent; transition: all 0.15s; }
.panel-tab:hover { color: var(--slate-700); }
.panel-tab.active { color: var(--blue); border-bottom-color: var(--blue); }

/* ==================== THREE-COLUMN EDITOR LAYOUT ==================== */

.editor-layout { display: flex; flex: 1; overflow: hidden; }
.editor-main { flex: 1; overflow-y: auto; padding: 24px; }
.page-header { margin-bottom: 20px; }
.page-header h1 { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.page-header p { font-size: 13px; color: var(--slate-500); }

/* ==================== CONTENT LAYOUT (non-editor) ==================== */

.content-area { padding: 24px; overflow-y: auto; flex: 1; }
.content-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.content-header h1 { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.content-header p { font-size: 13px; color: var(--slate-500); margin-top: 2px; }

/* ==================== GRID LAYOUTS ==================== */

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* ==================== SITE CARDS ==================== */

.site-card { background: #fff; border: 1px solid var(--slate-200); border-radius: 8px; padding: 20px; cursor: pointer; transition: all 0.15s; text-decoration: none; color: inherit; display: block; }
.site-card:hover { border-color: var(--blue); box-shadow: 0 4px 12px rgba(50,96,255,0.1); transform: translateY(-1px); }
.site-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.site-card-name { font-family: var(--font-display); font-size: 15px; font-weight: 700; }
.site-card-meta { font-size: 12px; color: var(--slate-500); margin-bottom: 12px; }
.site-card-stats { display: flex; gap: 16px; font-size: 12px; color: var(--slate-500); }
.site-card-stats span { display: flex; align-items: center; gap: 4px; }
.site-card-lh { display: flex; gap: 4px; }
.site-card-lh .lh-score { width: 24px; height: 24px; font-size: 10px; }

/* ==================== WIZARD / STEPPER ==================== */

.stepper { display: flex; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--slate-200); background: #fff; }
.step { display: flex; align-items: center; gap: 8px; }
.step-number { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--slate-200); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--slate-400); transition: all 0.3s; }
.step.active .step-number { background: var(--blue); border-color: var(--blue); color: #fff; }
.step.completed .step-number { background: #10b981; border-color: #10b981; color: #fff; }
.step-label { font-size: 12px; font-weight: 600; color: var(--slate-400); }
.step.active .step-label { color: var(--slate-900); }
.step.completed .step-label { color: #10b981; }
.step-connector { width: 40px; height: 2px; background: var(--slate-200); margin: 0 8px; }
.step.completed + .step-connector, .step-connector.done { background: #10b981; }

.wizard-body { flex: 1; overflow-y: auto; padding: 24px; }
.wizard-footer { padding: 16px 24px; border-top: 1px solid var(--slate-200); background: #fff; display: flex; align-items: center; justify-content: space-between; }

/* ==================== TABS ==================== */

.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--slate-200); }
.tab { padding: 10px 20px; font-size: 13px; font-weight: 600; color: var(--slate-500); cursor: pointer; border-bottom: 2px solid transparent; transition: all 0.15s; }
.tab:hover { color: var(--slate-700); }
.tab.active { color: var(--blue); border-bottom-color: var(--blue); }
.tab .tab-count { font-size: 10px; background: var(--slate-100); padding: 1px 6px; border-radius: 99px; margin-left: 6px; }
.tab.active .tab-count { background: var(--blue-10); color: var(--blue); }

/* ==================== PROGRESS BAR ==================== */

.progress-bar { height: 8px; background: var(--slate-200); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--blue); border-radius: 4px; transition: width 0.5s ease; }
.progress-fill.success { background: #10b981; }
.progress-fill.warning { background: var(--amber); }
.progress-fill.danger { background: var(--red); }

.progress-inline { height: 4px; }

/* ==================== IMPORT WIZARD ==================== */

.step-panel { display: none; }
.step-panel.visible { display: block; animation: fadeUp 0.3s ease-out; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.progress-steps { display: flex; flex-direction: column; gap: 0; }
.progress-step { display: flex; align-items: flex-start; gap: 14px; padding: 12px 0; }
.progress-step-icon { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; margin-top: 1px; }
.progress-step-icon.done { background: rgba(16,185,129,0.1); color: #059947; }
.progress-step-icon.active { background: var(--blue-10); color: var(--blue); }
.progress-step-icon.pending { background: var(--slate-100); color: #94a3b8; }
.progress-step-info { flex: 1; }
.progress-step-title { font-size: 14px; font-weight: 500; }
.progress-step-title.dimmed { color: #94a3b8; }
.progress-step-detail { font-size: 12px; color: var(--slate-500); margin-top: 2px; }
.progress-step-connector { width: 2px; height: 20px; background: var(--slate-200); margin-left: 11px; }
.progress-step-connector.done { background: #10b981; }

/* ==================== EMPTY STATE ==================== */

.empty-state { text-align: center; padding: 60px 20px; }
.empty-icon { margin-bottom: 16px; color: var(--slate-300); }
.empty-icon svg { width: 48px; height: 48px; }
.empty-state h3 { font-family: var(--font-display); font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.empty-state p { font-size: 13px; color: var(--slate-500); margin-bottom: 16px; }

/* ==================== TOAST ==================== */

.toast { position: fixed; bottom: 24px; right: 24px; background: var(--slate-900); color: #fff; padding: 12px 20px; border-radius: 8px; font-size: 13px; font-weight: 500; box-shadow: 0 8px 24px rgba(0,0,0,0.2); z-index: 1000; animation: fadeUp 0.3s ease; display: flex; align-items: center; gap: 8px; }

/* ==================== MODAL ==================== */

.modal-overlay { position: fixed; inset: 0; background: rgba(15,23,42,0.5); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 100; animation: fadeIn 0.2s ease; }
.modal { background: #fff; border-radius: 12px; width: 480px; max-height: 80vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--slate-100); display: flex; align-items: center; justify-content: space-between; }
.modal-header h3 { font-family: var(--font-display); font-size: 16px; font-weight: 700; }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--slate-100); display: flex; justify-content: flex-end; gap: 8px; }

/* ==================== MEDIA GRID ==================== */

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.media-item { border-radius: 8px; overflow: hidden; border: 2px solid transparent; cursor: pointer; transition: all 0.15s; background: var(--slate-100); aspect-ratio: 4/3; position: relative; }
.media-item:hover { border-color: var(--blue); }
.media-item.selected { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue-20); }
.media-thumb { width: 100%; height: 100%; object-fit: cover; background: var(--slate-200); display: flex; align-items: center; justify-content: center; color: var(--slate-400); font-size: 11px; }
.media-overlay { position: absolute; bottom: 0; left: 0; right: 0; padding: 8px; background: linear-gradient(transparent, rgba(0,0,0,0.7)); color: #fff; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-status { position: absolute; top: 8px; right: 8px; }

/* ==================== SEARCH ==================== */

.search-box { position: relative; }
.search-box input { width: 100%; padding: 8px 12px 8px 36px; border: 1px solid var(--slate-200); border-radius: 6px; font-family: var(--font-body); font-size: 13px; }
.search-box input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-10); }
.search-box svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--slate-400); }

/* ==================== AUTH LAYOUT ==================== */

.layout-auth #screen-content { display: flex; justify-content: center; align-items: center; flex: 1; overflow: hidden; }

/* Starfield canvas */
#starfield { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; }

/* Auth card -- frosted dark glass floating in the starfield */
.auth-card {
  position: relative; z-index: 1;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(28px) saturate(1.2);
  -webkit-backdrop-filter: blur(28px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5), 0 0 80px rgba(50, 96, 255, 0.06), 0 0 160px rgba(168, 85, 247, 0.03);
  animation: authCardIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes authCardIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Gradient accent bar -- brand signature (Blue > Green > Pink) */
.auth-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--green), #FF69B4);
}

/* Login card sizing */
.auth-card-login { width: 420px; }
.auth-card-login .auth-card-inner { padding: 48px 48px 40px; text-align: center; }

/* Auth card typography */
.auth-logo { margin-bottom: 24px; }
.auth-logo img { border-radius: 14px; box-shadow: 0 4px 20px rgba(50, 96, 255, 0.15); }
.auth-title { font-family: var(--font-display); font-size: 28px; font-weight: 900; color: #fff; letter-spacing: -0.02em; margin-bottom: 6px; }
.auth-tagline { font-family: var(--font-body); font-size: 14px; color: var(--slate-400); margin-bottom: 24px; font-style: italic; }
.auth-domain { font-size: 12px; color: var(--slate-500); margin-top: 14px; letter-spacing: 0.02em; }

/* Auth form (left-aligned fields inside centered card) */
.auth-form { text-align: left; margin-bottom: 8px; }
.auth-form .form-group { margin-bottom: 14px; }
.auth-form .btn-auth { margin-top: 6px; }
.auth-forgot { font-size: 12px; color: var(--slate-500); margin-top: 12px; text-align: center; }
.auth-forgot a { color: var(--blue); text-decoration: none; font-weight: 500; transition: color 0.15s; }
.auth-forgot a:hover { color: #5b85ff; }

/* Pink CTA button (brand: "Primary CTA buttons, hero actions") */
.btn-pink { background: #FF69B4; color: #fff; border: none; transition: all 0.2s; }
.btn-pink:hover { background: #ff4da6; box-shadow: 0 4px 24px rgba(255, 105, 180, 0.3); }
.btn-auth { width: 100%; padding: 13px 20px; font-size: 14px; border-radius: 10px; font-weight: 600; justify-content: center; }

/* Auth divider */
.auth-divider { height: 1px; background: rgba(255, 255, 255, 0.06); margin: 28px 0; }

/* Auth switch link */
.auth-switch { font-size: 13px; color: var(--slate-500); margin: 0; }
.auth-switch a { color: var(--blue); text-decoration: none; font-weight: 600; transition: color 0.15s; }
.auth-switch a:hover { color: #5b85ff; }

/* Auth card form overrides (dark background context) */
.auth-card .form-label {
  font-size: 11px; font-weight: 600; color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px;
}
.auth-card .form-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff; font-size: 14px; padding: 10px 14px; border-radius: 8px;
  transition: all 0.2s;
}
.auth-card .form-input:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(50, 96, 255, 0.15);
  background: rgba(255, 255, 255, 0.07);
}
.auth-card .form-input::placeholder { color: rgba(255, 255, 255, 0.22); }
.auth-card .form-input.error { border-color: #f87171; }
.auth-card .form-input.error:focus { box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.15); }
.auth-card .form-error { font-size: 11px; color: #f87171; margin-top: 4px; display: none; }
.auth-card .form-error.visible { display: block; }
.auth-card .form-hint { font-size: 11px; color: rgba(255, 255, 255, 0.35); margin-top: 4px; }

/* Auth ghost button override */
.auth-card .btn-ghost { color: rgba(255, 255, 255, 0.5); }
.auth-card .btn-ghost:hover { background: rgba(255, 255, 255, 0.06); color: rgba(255, 255, 255, 0.8); }

/* ==================== CHART PLACEHOLDER ==================== */

.chart-placeholder { background: var(--slate-50); border: 1px solid var(--slate-200); border-radius: 8px; padding: 40px; text-align: center; color: var(--slate-400); font-size: 12px; position: relative; overflow: hidden; }
.chart-bars { display: flex; align-items: flex-end; justify-content: center; gap: 4px; height: 120px; margin-bottom: 8px; }
.chart-bar { width: 12px; background: var(--blue-20); border-radius: 2px 2px 0 0; transition: height 0.5s ease; }
.chart-bar:hover { background: var(--blue); }

/* ==================== MISC ==================== */

.divider { border: none; border-top: 1px solid var(--slate-100); margin: 16px 0; }
.text-muted { color: var(--slate-500); }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.font-display { font-family: var(--font-display); }
.font-bold { font-weight: 700; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Scrollbar styling */
#screen-content::-webkit-scrollbar { width: 6px; }
#screen-content::-webkit-scrollbar-thumb { background: var(--slate-300); border-radius: 3px; }
.editor-main::-webkit-scrollbar { width: 6px; }
.editor-main::-webkit-scrollbar-thumb { background: var(--slate-300); border-radius: 3px; }
.panel::-webkit-scrollbar { width: 4px; }
.panel::-webkit-scrollbar-thumb { background: var(--slate-200); border-radius: 2px; }

/* ==================== SIGNUP WIZARD ==================== */

/* Signup card sizing */
.auth-card-signup { width: 520px; }

/* Signup header */
.signup-header { text-align: center; padding: 40px 48px 0; }
.signup-header .auth-logo { margin-bottom: 20px; }
.signup-header h1 { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.signup-header p { font-size: 13px; color: var(--slate-400); margin-bottom: 0; }

/* Auth stepper -- precision dots with connecting lines */
.auth-stepper { display: flex; align-items: flex-start; justify-content: center; padding: 28px 48px 0; }
.auth-step { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.auth-step-dot {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: rgba(255, 255, 255, 0.25);
  transition: all 0.3s ease;
}
.auth-step.active .auth-step-dot {
  background: var(--blue); border-color: var(--blue); color: #fff;
  box-shadow: 0 0 16px rgba(50, 96, 255, 0.35);
}
.auth-step.completed .auth-step-dot { background: var(--green); border-color: var(--green); color: #fff; }
.auth-step-label {
  font-size: 10px; font-weight: 600; color: rgba(255, 255, 255, 0.25);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.auth-step.active .auth-step-label { color: rgba(255, 255, 255, 0.85); }
.auth-step.completed .auth-step-label { color: var(--green); }
.auth-step-line { width: 36px; height: 2px; background: rgba(255, 255, 255, 0.08); margin: 13px 8px 0; transition: background 0.3s; }
.auth-step-line.done { background: var(--green); }

/* Signup body */
.signup-body { padding: 28px 48px 24px; }
.signup-body .form-group { margin-bottom: 16px; }
.signup-body .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Signup footer */
.signup-footer { padding: 0 48px 32px; display: flex; align-items: center; justify-content: space-between; }
.signup-footer .btn { min-width: 100px; justify-content: center; }
.signup-footer .btn-pink { padding: 11px 28px; font-size: 14px; border-radius: 10px; }

/* Auth switch text at bottom */
.auth-card .auth-bottom { text-align: center; padding: 0 48px 28px; }
.auth-card .auth-bottom p { font-size: 12px; color: var(--slate-500); margin: 0; }
.auth-card .auth-bottom a { color: var(--blue); text-decoration: none; font-weight: 600; }
.auth-card .auth-bottom a:hover { color: #5b85ff; }

/* Competitor guidance */
.competitor-guidance {
  font-size: 13px; color: rgba(255, 255, 255, 0.45); margin-bottom: 20px; line-height: 1.7;
  padding: 14px 16px; border-radius: 10px;
  background: rgba(50, 96, 255, 0.06); border: 1px solid rgba(50, 96, 255, 0.1);
}

/* Market count pricing */
.market-price {
  font-family: var(--font-display); font-size: 22px; font-weight: 700;
  color: #FF69B4; margin-top: 10px;
}
.market-price-note { font-size: 12px; color: rgba(255, 255, 255, 0.35); margin-top: 8px; line-height: 1.5; }

/* Terms checkbox (dark context) */
.tc-label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 13px; color: rgba(255, 255, 255, 0.6); }
.tc-label input[type="checkbox"] {
  margin-top: 2px; width: 16px; height: 16px; cursor: pointer; flex-shrink: 0;
  accent-color: #FF69B4;
}
.tc-label a { color: var(--blue); text-decoration: none; font-weight: 600; }
.tc-label a:hover { color: #5b85ff; text-decoration: underline; }

/* Plan cards (unused, kept for future) */
.plan-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 8px; }
.plan-card { border: 2px solid var(--slate-200); border-radius: 10px; padding: 16px; cursor: pointer; transition: all 0.15s; text-align: center; }
.plan-card:hover { border-color: var(--blue); }
.plan-card.selected { border-color: var(--blue); background: var(--blue-10); box-shadow: 0 0 0 1px var(--blue); }
.plan-card-name { font-family: var(--font-display); font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.plan-card-price { font-size: 20px; font-weight: 700; color: var(--blue); margin-bottom: 8px; }
.plan-card-price span { font-size: 12px; font-weight: 400; color: var(--slate-500); }
.plan-card-features { list-style: none; font-size: 11px; color: var(--slate-500); text-align: left; }
.plan-card-features li { padding: 3px 0; display: flex; align-items: center; gap: 6px; }
.plan-card-features li::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--blue); flex-shrink: 0; }

/* Subdomain preview (unused, kept for future) */
.subdomain-preview { display: flex; align-items: center; gap: 0; margin-top: 6px; }
.subdomain-preview .subdomain-value { font-family: monospace; font-size: 13px; background: var(--slate-100); padding: 8px 12px; border-radius: 6px; color: var(--blue); font-weight: 600; width: 100%; }
.subdomain-preview .subdomain-suffix { font-size: 13px; color: var(--slate-500); white-space: nowrap; padding-left: 2px; }

/* Form validation (general -- dashboard context) */
.form-input.error { border-color: var(--red); }
.form-input.error:focus { box-shadow: 0 0 0 3px var(--red-10); }
.form-error { font-size: 11px; color: var(--red); margin-top: 2px; display: none; }
.form-error.visible { display: block; }

/* Step transitions */
.signup-step { display: none; }
.signup-step.active { display: block; animation: fadeUp 0.3s ease-out; }

/* Print/media */
@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stat-row-4 { grid-template-columns: repeat(2, 1fr); }
  .stat-row-5 { grid-template-columns: repeat(3, 1fr); }
}
