@import url('/assets/fonts/fonts.css');
:root {
  --bg-deep: #07070a;
  --bg-surface: #0c0c12;
  --bg-elevated: #111118;
  --bg-card: #16161e;
  --bg-input: #0e0e14;
  --border: #1e1e30;
  --border-light: #2a2a40;
  --border-accent: #3b82f6;
  --text-primary: #e8e8f0;
  --text-secondary: #7a7a95;
  --text-muted: #4a4a60;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-dim: rgba(59, 130, 246, 0.08);
  --accent-glow: rgba(59, 130, 246, 0.2);
  --gold: #f0b429;
  --green: #22c55e;
  --red: #ef4444;
  --sidebar-width: 250px;
  --header-height: 60px;
}

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

html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  overscroll-behavior-y: none;
}

body.app-active {
  height: 100vh;
  overflow: hidden;
}

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ========== BOOT / LOADING — HUD ========== */
#boot-screen {
  position: fixed; inset: 0; z-index: 10001;
  display: none; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 50% 46%, rgba(8, 47, 73, 0.5) 0%, transparent 58%),
    var(--bg-deep);
  overflow: hidden;
  opacity: 1;
}
html.portal-booting #boot-screen { display: flex; }
html.portal-booting #login-screen,
html.portal-booting #register-screen { display: none; }
#boot-screen.is-leaving {
  display: flex; opacity: 0; pointer-events: none;
  transition: opacity 0.18s ease;
}
#boot-screen::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.055) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: radial-gradient(circle at 50% 46%, #000 0%, transparent 72%);
  mask-image: radial-gradient(circle at 50% 46%, #000 0%, transparent 72%);
  animation: bootGrid 14s linear infinite;
}
#boot-screen::after {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 150px; z-index: 1;
  background: linear-gradient(to bottom, transparent, rgba(56, 189, 248, 0.05) 60%, rgba(125, 211, 252, 0.14));
  transform: translateY(-150px);
  animation: bootScan 5.8s cubic-bezier(0.45, 0, 0.55, 1) infinite;
  pointer-events: none;
}
@keyframes bootGrid { to { background-position: 52px 52px, 52px 52px; } }
@keyframes bootScan {
  0% { transform: translateY(-150px); opacity: 0; }
  12% { opacity: 1; }
  86% { opacity: 1; }
  100% { transform: translateY(100vh); opacity: 0; }
}
.boot-glow {
  position: absolute; z-index: 0;
  width: 46vmax; height: 46vmax; border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.14) 0%, transparent 65%);
  filter: blur(40px); pointer-events: none;
}
.boot-frame {
  position: absolute; inset: 22px; z-index: 1; pointer-events: none; opacity: 0.4;
}
.boot-frame::before, .boot-frame::after {
  content: ''; position: absolute; width: 26px; height: 26px;
}
.boot-frame::before {
  top: 0; left: 0;
  border-top: 1px solid rgba(125, 211, 252, 0.4);
  border-left: 1px solid rgba(125, 211, 252, 0.4);
}
.boot-frame::after {
  right: 0; bottom: 0;
  border-right: 1px solid rgba(125, 211, 252, 0.4);
  border-bottom: 1px solid rgba(125, 211, 252, 0.4);
}
.boot-inner {
  position: relative; z-index: 2; display: flex; flex-direction: column;
  align-items: center; gap: 24px; padding: 24px; text-align: center;
}
.boot-logo {
  width: 158px; max-width: 58vw; height: auto; opacity: 0.92;
  filter: drop-shadow(0 0 18px rgba(56, 189, 248, 0.12));
}
.boot-loader { position: relative; width: 108px; height: 108px; }
.boot-loader-ticks {
  position: absolute; inset: -14px; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(125, 211, 252, 0.55) 0deg 0.6deg, transparent 0.6deg 7.5deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
  opacity: 0.55;
  animation: spin 36s linear infinite;
}
.boot-loader-arc {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid rgba(125, 211, 252, 0.2);
  box-shadow: inset 0 0 30px rgba(56, 189, 248, 0.1);
}
.boot-loader-arc::before {
  content: ''; position: absolute; inset: -2px; border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: #e0f2fe;
  border-right-color: rgba(56, 189, 248, 0.45);
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.75));
  animation: spin 1.25s cubic-bezier(0.55, 0.1, 0.45, 0.9) infinite;
}
.boot-loader-arc::after {
  content: ''; position: absolute; inset: 7px; border-radius: 50%;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  animation: spin 9s linear infinite reverse;
}
.boot-loader-sweep {
  position: absolute; inset: 16px; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(56, 189, 248, 0.32), rgba(56, 189, 248, 0.04) 22%, transparent 34%);
  opacity: 0.85;
  animation: spin 3.2s linear infinite;
}
.boot-loader-core {
  position: absolute; top: 50%; left: 50%;
  width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%;
  background: #e0f2fe;
  box-shadow: 0 0 12px rgba(125, 211, 252, 0.9), 0 0 30px rgba(56, 189, 248, 0.5);
  animation: bootCore 1.8s ease-in-out infinite;
}
@keyframes bootCore {
  0%, 100% { opacity: 0.55; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.15); }
}
.boot-status { display: flex; flex-direction: column; align-items: center; gap: 13px; }
.boot-text {
  display: flex; align-items: center; gap: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 10px; font-weight: 600; letter-spacing: 2.2px;
  text-transform: uppercase; color: rgba(186, 230, 253, 0.78);
}
.boot-caret {
  width: 6px; height: 11px; background: rgba(125, 211, 252, 0.85);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.7);
  animation: bootCaret 1.1s steps(2, start) infinite;
}
@keyframes bootCaret { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.boot-track {
  position: relative; width: 190px; max-width: 60vw; height: 2px;
  background: rgba(56, 189, 248, 0.12); overflow: hidden;
}
.boot-track::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 44%;
  background: linear-gradient(90deg, transparent, rgba(125, 211, 252, 0.9), transparent);
  animation: bootTrack 1.5s ease-in-out infinite;
}
@keyframes bootTrack {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(340%); }
}
@media (max-height: 560px) {
  .boot-inner { gap: 14px; padding: 16px; }
  .boot-logo { width: 118px; }
  .boot-loader { width: 78px; height: 78px; }
  .boot-loader-ticks { inset: -10px; }
  .boot-loader-arc::after { inset: 5px; }
  .boot-loader-sweep { inset: 12px; }
  .boot-status { gap: 9px; }
  .boot-frame { inset: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  #boot-screen::before, #boot-screen::after { animation: none; }
  #boot-screen::after { display: none; }
  .boot-loader-ticks,
  .boot-loader-arc::before,
  .boot-loader-arc::after,
  .boot-loader-sweep,
  .boot-loader-core,
  .boot-caret,
  .boot-track::after { animation-duration: 4s; }
}

/* ========== LOGIN ========== */
#login-screen, #register-screen {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-deep);
  overflow: hidden;
}
#login-screen.hidden, #register-screen.hidden { display: none; }

/* Animated particle network canvas */
.login-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0; opacity: 0.85;
}

/* Aurora gradient blobs drifting in the background */
#login-screen::before, #register-screen::before,
#login-screen::after, #register-screen::after {
  content: ''; position: absolute; width: 46vmax; height: 46vmax;
  pointer-events: none; z-index: 0; opacity: 0.3; filter: blur(90px);
}
#login-screen::before, #register-screen::before {
  top: -18vmax; left: -12vmax;
  background: radial-gradient(circle, rgba(59,130,246,0.55) 0%, transparent 65%);
  animation: auroraDrift 18s ease-in-out infinite;
}
#login-screen::after, #register-screen::after {
  bottom: -20vmax; right: -14vmax;
  background: radial-gradient(circle, rgba(96,165,250,0.4) 0%, transparent 65%);
  animation: auroraDrift 24s ease-in-out infinite reverse;
}
@keyframes auroraDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(5vmax, -3vmax) scale(1.18); }
}

.login-bg-grid {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px; opacity: 0.12;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black 30%, transparent 70%);
  animation: gridDrift 60s linear infinite;
}
@keyframes gridDrift {
  from { background-position: 0 0; }
  to { background-position: 60px 60px; }
}

.login-glow {
  position: absolute; width: 520px; height: 520px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  top: 50%; left: 50%; transform: translate(-50%, -50%); pointer-events: none;
  animation: glowPulse 8s ease-in-out infinite;
}
@keyframes glowPulse {
  0%, 100% { opacity: 0.7; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); }
}

.login-card {
  position: relative; z-index: 2; width: 400px; padding: 40px 36px;
  background: rgba(13, 13, 20, 0.62);
  border: 1px solid rgba(120, 150, 255, 0.14);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  overflow: hidden;
  animation: cardIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .login-card { background: rgba(13, 13, 20, 0.94); }
}
.login-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent) 30%, rgba(255,255,255,0.85) 50%, var(--accent) 70%, transparent);
  opacity: 0.9;
}
.login-card::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), transparent 42%);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.login-card.shake { animation: cardShake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97); }
@keyframes cardShake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-7px); }
  40%, 60% { transform: translateX(7px); }
}

.login-logo { text-align: center; margin-bottom: 24px; }
.login-logo img { height: 32px; animation: logoPulse 4s ease-in-out infinite; }
@keyframes logoPulse {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.3)); }
  50% { filter: drop-shadow(0 0 18px rgba(59, 130, 246, 0.6)); }
}

.login-title {
  text-align: center; font-size: 20px; font-weight: 700;
  letter-spacing: -0.3px; margin-bottom: 4px;
}
.login-subtitle {
  text-align: center; color: var(--text-secondary);
  font-size: 13px; margin-bottom: 28px;
}

.login-status {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--text-muted); margin: -14px 0 26px;
}
.login-status .status-dot {
  width: 7px; height: 7px; border-radius: 50% !important;
  background: var(--green);
  animation: dotPulse 2.2s ease-out infinite;
}
@keyframes dotPulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45); }
  70% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; font-size: 11px; font-weight: 600;
  color: var(--text-secondary); text-transform: uppercase;
  letter-spacing: 0.5px; margin-bottom: 6px;
}

.form-input {
  width: 100%; padding: 10px 14px;
  background: var(--bg-input); border: 1px solid var(--border);
  color: var(--text-primary); font-size: 14px; font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s; outline: none;
}
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-glow); }
.form-input::placeholder { color: var(--text-muted); }

/* Glass inputs on the auth screens */
.input-wrap { position: relative; }
.input-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  font-size: 18px; color: var(--text-muted); pointer-events: none; transition: color 0.2s;
}
.input-wrap:focus-within .input-icon { color: var(--accent); }
#login-screen .form-input.has-icon, #register-screen .form-input.has-icon { padding-left: 40px; }
#login-pass, #register-pass { padding-right: 40px; }

#login-screen .form-input, #register-screen .form-input {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.09);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
#login-screen .form-input:hover, #register-screen .form-input:hover { border-color: rgba(120, 150, 255, 0.28); }
#login-screen .form-input:focus, #register-screen .form-input:focus {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.06);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.13);
}

.pass-toggle {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; padding: 2px;
  background: none; border: none; color: var(--text-secondary); cursor: pointer;
  transition: color 0.15s;
}
.pass-toggle:hover { color: var(--accent-hover); }

.form-options {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px;
}
.checkbox-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-secondary); cursor: pointer;
}
.checkbox-label input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }
.forgot-link { font-size: 13px; color: var(--accent); text-decoration: none; }
.forgot-link:hover { text-decoration: underline; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 10px 20px; border: none;
  font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.15s ease;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.btn-primary {
  width: 100%; background: var(--accent); color: white;
  box-shadow: 0 2px 10px var(--accent-glow);
}
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 4px 15px var(--accent-glow); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg-elevated); color: var(--text-primary); }
.btn-danger { background: transparent; color: var(--red); border: 1px solid var(--red); }
.btn-danger:hover { background: var(--red); color: white; }

/* Gradient + sheen auth buttons */
#login-screen .btn-primary, #register-screen .btn-primary {
  position: relative; overflow: hidden; height: 44px; letter-spacing: 1px;
  background-image: linear-gradient(120deg, #1d4ed8 0%, #3b82f6 45%, #60a5fa 100%);
  background-size: 200% 100%; background-position: 0% 0;
  transition: background-position 0.4s ease, transform 0.15s ease;
}
#login-screen .btn-primary:hover, #register-screen .btn-primary:hover {
  background-image: linear-gradient(120deg, #1d4ed8 0%, #3b82f6 45%, #60a5fa 100%);
  background-position: 100% 0;
  transform: translateY(-1px);
}
#login-screen .btn-primary:active, #register-screen .btn-primary:active { transform: translateY(0) scale(0.99); }
#login-screen .btn-primary::after, #register-screen .btn-primary::after {
  content: ''; position: absolute; top: 0; left: -80%; width: 45%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transform: skewX(-20deg); pointer-events: none;
}
#login-screen .btn-primary:hover::after, #register-screen .btn-primary:hover::after { animation: btnSheen 0.9s ease; }
@keyframes btnSheen { to { left: 130%; } }

.login-error {
  color: var(--red); font-size: 13px; text-align: center;
  margin-top: 12px; display: none;
  padding: 8px 10px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.login-footer { text-align: center; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-secondary); }
.login-footer a { color: var(--accent); text-decoration: none; font-weight: 600; }
.login-footer a:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  .login-card, .login-logo img, .login-glow, .login-bg-grid, .login-status .status-dot,
  #login-screen::before, #register-screen::before, #login-screen::after, #register-screen::after {
    animation: none !important;
  }
  #login-screen .btn-primary::after, #register-screen .btn-primary::after { display: none; }
}

/* ========== REGISTER — COD VERIFICARE ========== */
.reg-code-panel {
  margin: -6px 0 16px;
  padding: 20px 18px 16px;
  background: var(--bg-input);
  border: 1px solid var(--accent);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.06), 0 0 24px rgba(59, 130, 246, 0.07);
  text-align: center;
  animation: regCodeIn 0.25s cubic-bezier(0, 0, 0.2, 1);
}
@keyframes regCodeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.reg-code-icon {
  width: 42px; height: 42px; margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-dim); color: var(--accent);
  border: 1px solid rgba(59, 130, 246, 0.35);
}
.reg-code-icon .material-icons-round { font-size: 22px; }
.reg-code-title { font-size: 15px; font-weight: 700; letter-spacing: -0.2px; margin-bottom: 6px; }
.reg-code-desc {
  font-size: 12px; color: var(--text-secondary); line-height: 1.55; margin-bottom: 14px;
}
.reg-code-desc strong { color: var(--text-primary); font-weight: 600; }
.reg-code-input {
  text-align: center;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 10px;
  padding: 12px 8px 12px 18px;
  font-family: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace;
  caret-color: var(--accent);
}
.reg-code-input::placeholder { letter-spacing: 10px; font-weight: 500; font-size: 22px; }
.reg-code-actions {
  margin-top: 12px; display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 12px;
}
.reg-resend { color: var(--accent); text-decoration: none; font-weight: 600; cursor: pointer; }
.reg-resend:hover { text-decoration: underline; }
.reg-resend.disabled { color: var(--text-muted); pointer-events: none; text-decoration: none; }
.reg-resend-timer { color: var(--text-muted); font-size: 11px; }

/* ========== APP ========== */
#app-screen { display: none; height: 100vh; width: 100vw; }
#app-screen.active { display: flex; }

.app-bg {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.03) 0%, transparent 50%),
              radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.02) 0%, transparent 40%),
              radial-gradient(circle at 100% 100%, rgba(59, 130, 246, 0.02) 0%, transparent 40%);
  pointer-events: none; z-index: 0;
}
.app-bg::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 80px 80px; opacity: 0.05;
}

/* ========== SIDEBAR ========== */
.sidebar {
  width: var(--sidebar-width); min-width: var(--sidebar-width);
  background: var(--bg-surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; z-index: 200; height: 100vh;
}

.sidebar-header {
  padding: 24px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.sidebar-header img { height: 28px; }

.sidebar-close {
  display: none;
  position: absolute; right: 10px; top: 50%;
  width: 36px; height: 36px; padding: 0;
  align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border);
  color: var(--text-secondary); cursor: pointer;
  transform: translateY(-50%);
}
.sidebar-close:hover { background: var(--bg-elevated); color: var(--text-primary); }
.sidebar-close .material-icons-round { font-size: 20px; }

.sidebar-nav { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }

.nav-section-label {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--text-muted);
  padding: 20px 12px 8px;
}

.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; margin: 2px 0;
  color: var(--text-secondary); text-decoration: none;
  font-size: 14px; font-weight: 500; cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); position: relative;
  border-radius: 8px;
}
.nav-item:hover { background: var(--bg-elevated); color: var(--text-primary); }
.nav-item.active {
  background: var(--accent-dim); color: var(--accent);
}
.nav-item.active::before {
  content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px;
  background: var(--accent); border-radius: 0 4px 4px 0;
}
.nav-item .material-icons-round { font-size: 20px; width: 24px; text-align: center; }
.nav-item .nav-badge {
  margin-left: auto; background: var(--red); color: white;
  font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 10px; min-width: 20px; text-align: center;
}

.nav-dropdown { position: relative; }
.nav-dropdown-toggle { justify-content: flex-start; }
.nav-dropdown-toggle .nav-arrow {
  margin-left: auto; font-size: 18px; transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-muted);
}
.nav-dropdown.open > .nav-dropdown-toggle .nav-arrow { transform: rotate(180deg); color: var(--accent); }
.nav-dropdown.open > .nav-dropdown-toggle { color: var(--text-primary); }

.nav-dropdown-items {
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
  opacity: 0;
}
.nav-dropdown.open > .nav-dropdown-items { max-height: 500px; opacity: 1; }

.nav-item.nav-sub {
  padding-left: 28px; font-size: 13px; margin: 1px 0;
  border-left: 2px solid var(--border); margin-left: 22px; border-radius: 0 8px 8px 0;
}
.nav-item.nav-sub .material-icons-round { font-size: 17px; }
.nav-item.nav-sub:hover { border-left-color: var(--accent); }
.nav-item.nav-sub.active { border-left-color: var(--accent); }
.nav-item.nav-sub.active::before { display: none; }

.nav-item.nav-mail {
  background: linear-gradient(135deg, rgba(240, 180, 41, 0.16), rgba(59, 130, 246, 0.10));
  border: 1px solid rgba(240, 180, 41, 0.35);
  color: var(--gold);
  font-weight: 600;
}
.nav-item.nav-mail .material-icons-round { color: var(--gold); }
.nav-item.nav-mail:hover {
  background: linear-gradient(135deg, rgba(240, 180, 41, 0.28), rgba(59, 130, 246, 0.18));
  color: var(--gold);
  border-color: rgba(240, 180, 41, 0.6);
}
.nav-item.nav-mail.active {
  background: linear-gradient(135deg, rgba(240, 180, 41, 0.30), rgba(59, 130, 246, 0.22));
  color: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 14px rgba(240, 180, 41, 0.25);
}
.nav-item.nav-mail.active::before { background: var(--gold); }
.nav-mail-tag {
  margin-left: auto; font-size: 9px; font-weight: 800;
  letter-spacing: 0.8px; text-transform: uppercase;
  background: rgba(240, 180, 41, 0.18); color: var(--gold);
  padding: 2px 7px; border-radius: 8px; border: 1px solid rgba(240, 180, 41, 0.35);
}

.sidebar-footer { padding: 12px; border-top: 1px solid var(--border); }

/* Mobile sidebar backdrop */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  z-index: 150;
  opacity: 0;
  transition: opacity 0.25s ease;
}

/* ========== MAIN ========== */
.main-area { flex: 1; display: flex; flex-direction: column; z-index: 1; overflow: hidden; }

/* ========== TOPBAR ========== */
.topbar {
  height: var(--header-height); min-height: var(--header-height);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  background: rgba(12, 12, 18, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  position: sticky;
  top: 0;
}
.topbar-title { font-size: 18px; font-weight: 700; letter-spacing: -0.4px; color: var(--text-primary); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-left { display: flex; align-items: center; gap: 12px; flex: 1 1 auto; min-width: 0; }

.menu-toggle {
  display: none;
  width: 38px; height: 38px; padding: 0;
  flex: 0 0 auto;
}
.menu-toggle .material-icons-round { font-size: 22px; }

.topbar-actions { display: flex; align-items: center; gap: 16px; flex: 0 0 auto; }
.topbar-help { height: 38px; padding: 0 12px; gap: 7px; font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.topbar-help:hover { color: #25d366; border-color: rgba(37, 211, 102, 0.45); background: rgba(37, 211, 102, 0.08); }
@media (max-width: 768px) {
  .topbar-help { width: 38px; padding: 0; justify-content: center; }
  .topbar-help-label { display: none; }
}

.notif-btn {
  position: relative; width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); cursor: pointer; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border); background: var(--bg-elevated);
  border-radius: 8px;
}
.notif-btn:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); transform: translateY(-1px); }
.notif-btn .notif-dot {
  position: absolute; top: 8px; right: 8px; width: 8px; height: 8px;
  background: var(--red); display: none; border: 2px solid var(--bg-surface);
  border-radius: 50%;
}
.notif-btn .notif-dot.active { display: block; animation: pulse 2s infinite; }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.user-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 12px 5px 6px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); color: var(--text-primary);
}
.user-btn:hover { border-color: var(--accent); background: var(--bg-card); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }

.user-avatar {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent) 0%, #1d4ed8 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: white; border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.user-info-text { text-align: left; display: flex; flex-direction: column; }
.user-name { font-size: 13px; font-weight: 600; line-height: 1.2; color: var(--text-primary); }
.user-role { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700; }

/* ========== VIEW ========== */
.view-container { flex: 1; overflow-y: auto; padding: 24px; z-index: 1; overscroll-behavior-y: contain; }

/* ========== NOTIF DROPDOWN ========== */
.notif-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0;
  width: 360px; max-height: 480px;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 0 1px var(--border-light);
  display: none; flex-direction: column; z-index: 1000; overflow: hidden;
  animation: dropdownIn 0.2s cubic-bezier(0, 0, 0.2, 1);
}
.notif-dropdown.active { display: flex; }

@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-10px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.notif-header {
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg-elevated);
}
.notif-header span { font-size: 14px; font-weight: 700; color: var(--text-primary); }

.notif-list { overflow-y: auto; flex: 1; }
.notif-item { padding: 14px 18px; border-bottom: 1px solid var(--border); cursor: default; transition: background 0.2s; }
.notif-item:hover { background: var(--bg-elevated); }
.notif-item.unread { border-left: 3px solid var(--accent); background: var(--accent-dim); }
.notif-item-title { font-size: 13px; font-weight: 600; margin-bottom: 3px; color: var(--text-primary); }
.notif-item-msg { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.notif-item-time { font-size: 11px; color: var(--text-muted); margin-top: 6px; display: flex; align-items: center; gap: 4px; }
.notif-empty { padding: 48px 18px; text-align: center; color: var(--text-muted); font-size: 14px; }

/* ========== USER DROPDOWN ========== */
.user-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0; width: 220px;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 0 1px var(--border-light);
  display: none; flex-direction: column; z-index: 1000; padding: 6px;
  animation: dropdownIn 0.2s cubic-bezier(0, 0, 0.2, 1);
}
.user-dropdown.active { display: flex; }
.user-dropdown-item {
  padding: 10px 12px; font-size: 13px; color: var(--text-secondary);
  cursor: pointer; display: flex; align-items: center; gap: 10px; border-radius: 8px; transition: all 0.2s;
  text-decoration: none;
}
.user-dropdown-item:hover { background: var(--bg-elevated); color: var(--text-primary); }
.user-dropdown-item .material-icons-round { font-size: 20px; color: var(--text-muted); transition: color 0.2s; }
.user-dropdown-item:hover .material-icons-round { color: var(--accent); }
.user-dropdown-item.logout { color: var(--red); margin-top: 2px; }
.user-dropdown-item.logout:hover { background: rgba(239, 68, 68, 0.08); }
.user-dropdown-item.logout .material-icons-round { color: var(--red); }

/* ========== PAGE ========== */
.page-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px;
}
.page-header h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; }
.page-header p { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.page-actions { display: flex; gap: 8px; }

/* ========== STATS ========== */
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-surface); border: 1px solid var(--border);
  padding: 20px; position: relative; overflow: hidden; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 12px;
}
.stat-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
.stat-card .stat-top-border { height: 3px; position: absolute; top: 0; left: 0; right: 0; }
.stat-card.blue .stat-top-border { background: linear-gradient(90deg, var(--accent), #60a5fa); }
.stat-card.gold .stat-top-border { background: linear-gradient(90deg, var(--gold), #fbbf24); }
.stat-card.green .stat-top-border { background: linear-gradient(90deg, var(--green), #4ade80); }
.stat-card.purple .stat-top-border { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }

.stat-icon {
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px;
  border-radius: 10px;
}
.stat-card.blue .stat-icon { background: var(--accent-dim); color: var(--accent); }
.stat-card.gold .stat-icon { background: rgba(240,180,41,0.12); color: var(--gold); }
.stat-card.green .stat-icon { background: rgba(34,197,94,0.12); color: var(--green); }
.stat-card.purple .stat-icon { background: rgba(139,92,246,0.12); color: #8b5cf6; }
.stat-icon .material-icons-round { font-size: 20px; }

.stat-value { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; line-height: 1.1; color: var(--text-primary); }
.stat-label { font-size: 12px; color: var(--text-secondary); font-weight: 600; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }

/* ========== CARDS ========== */
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.card {
  background: var(--bg-surface); border: 1px solid var(--border); overflow: hidden; border-radius: 12px;
  transition: border-color 0.2s;
}
.card:hover { border-color: var(--border-light); }
.card-header {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(255,255,255,0.02);
}
.card-header h3 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-primary); }
.card-header a { font-size: 12px; color: var(--accent); cursor: pointer; font-weight: 600; text-decoration: none; }
.card-header a:hover { color: var(--accent-hover); }
.card-body { padding: 20px; }
.hidden { display: none; }
.card.full { grid-column: 1 / -1; }
.card + .card { margin-top: 20px; }

/* ========== ACTIVITY ========== */
.activity-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }

.activity-dot {
  width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%;
}
.activity-dot.blue { background: var(--accent); }
.activity-dot.gold { background: var(--gold); }
.activity-dot.green { background: var(--green); }
.activity-dot.red { background: var(--red); }

.activity-text { font-size: 12px; line-height: 1.4; flex: 1; }
.activity-text strong { font-weight: 600; color: var(--text-primary); }
.activity-time { font-size: 10px; color: var(--text-muted); white-space: nowrap; }

/* ========== TABLE ========== */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
table th {
  text-align: left; padding: 10px 12px; font-size: 10px; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
table td { padding: 12px; border-bottom: 1px solid var(--border); color: var(--text-secondary); }
table tr:hover td { background: var(--bg-elevated); }
table tr:last-child td { border-bottom: none; }

/* ========== BADGES ========== */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.3px;
  border: 1px solid transparent;
}
.badge-blue { border-color: var(--accent); color: var(--accent); }
.badge-blue { background: var(--accent-dim); border-color: transparent; color: var(--accent); }
.badge-green { background: rgba(34,197,94,0.12); color: var(--green); }
.badge-gold { background: rgba(240,180,41,0.12); color: var(--gold); }
.badge-red { background: rgba(239,68,68,0.12); color: var(--red); }
.badge-gray { background: var(--bg-elevated); color: var(--text-muted); }

/* ========== EMPTY ========== */
.empty-state { text-align: center; padding: 40px 16px; }
.empty-state .material-icons-round { font-size: 40px; color: var(--text-muted); margin-bottom: 12px; }
.empty-state h3 { font-size: 15px; margin-bottom: 4px; color: var(--text-secondary); }
.empty-state p { font-size: 13px; color: var(--text-muted); max-width: 320px; margin: 0 auto 16px; }

/* ========== MODAL ========== */
.modal-backdrop {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.75);
  backdrop-filter: blur(3px); z-index: 1000;
  display: none; align-items: center; justify-content: center;
}
.modal-backdrop.active { display: flex; }

.modal-card {
  width: 500px; max-width: 90vw; max-height: 80vh;
  background: var(--bg-surface); border: 1px solid var(--border);
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
  display: flex; flex-direction: column;
}
.modal-header {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.modal-header h3 { font-size: 15px; font-weight: 700; }
.modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 18px; padding: 4px; }
.modal-close:hover { color: var(--text-primary); background: var(--bg-elevated); }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 8px; }
.modal-footer .btn { width: auto; flex: 0 1 auto; max-width: 100%; }

/* ========== APP INSTALL MODAL ========== */
.modal-client-app { width: min(640px, calc(100vw - 24px)); max-height: min(88vh, 780px); }
.modal-client-app .modal-body { padding: 20px; }
.modal-client-app .modal-footer { padding: 12px 20px; }

.client-app-hero { display: flex; align-items: flex-start; gap: 16px; }
.client-app-icon {
  width: 78px; height: 78px; flex: 0 0 auto;
  display: grid; place-items: center;
  border: 1px solid var(--border); background: var(--bg-input);
}
.client-app-icon img { width: 60px; height: 60px; object-fit: contain; }
.client-app-copy { min-width: 0; flex: 1; }
.client-app-copy h4 { font-size: 16px; font-weight: 800; margin-bottom: 5px; color: var(--text-primary); }
.client-app-copy p { margin: 0; font-size: 13px; line-height: 1.65; color: var(--text-secondary); }
.client-app-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.client-app-note {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 16px; padding: 12px 14px;
  border: 1px solid var(--border); background: var(--bg-input);
  color: var(--text-secondary); font-size: 12.5px; line-height: 1.6;
}
.client-app-note .material-icons-round { flex: 0 0 auto; margin-top: 1px; font-size: 18px; color: var(--accent); }
.client-app-note p { margin: 0; }

.client-app-download {
  display: flex; align-items: center; gap: 14px;
  margin-top: 14px; padding: 14px;
  border: 1px solid var(--border); background: var(--bg-card);
}
.client-app-download img { width: 92px; height: 92px; flex: 0 0 auto; background: #fff; padding: 5px; }
.client-app-download b { display: block; margin-bottom: 3px; font-size: 13px; color: var(--text-primary); }
.client-app-download p { margin: 0 0 7px; font-size: 11.5px; line-height: 1.55; color: var(--text-muted); }
.client-app-link {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 700; color: var(--accent); text-decoration: none;
}
.client-app-link .material-icons-round { font-size: 15px; }
.client-app-link:hover { color: var(--accent-hover); }

@media (max-width: 640px) {
  .modal-client-app { width: calc(100vw - 16px); max-height: 92dvh; }
  .modal-client-app .modal-header { padding: 14px 16px; }
  .modal-client-app .modal-body { padding: 16px; }
  .modal-client-app .modal-footer {
    flex-direction: column-reverse; align-items: stretch;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  }
  .modal-client-app .modal-footer .btn { width: 100%; }
  .client-app-hero { gap: 12px; }
  .client-app-icon { width: 64px; height: 64px; }
  .client-app-icon img { width: 48px; height: 48px; }
  .client-app-copy h4 { font-size: 15px; }
  .client-app-download { align-items: flex-start; gap: 12px; padding: 12px; }
  .client-app-download img { width: 78px; height: 78px; }
}

/* ========== FORM ========== */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
textarea.form-input { resize: vertical; min-height: 90px; font-family: inherit; }
select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%237a7a95' d='M5 7L1 3h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px;
}
/* Opțiunile native ale <select> trebuie să aibă fundal închis, altfel textul
   deschis devine invizibil pe lista albă a browserului. */
select.form-input option,
.portal-lang-switch select option {
  background: #0b0d14;
  color: #e8e8f0;
}

/* ========== SERVICES ========== */
.services-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px;
}
.service-card { background: var(--bg-card); border: 1px solid var(--border); padding: 16px; transition: all 0.15s; }
.service-card:hover { border-color: var(--border-light); }
.service-card .service-icon { width: 36px; height: 36px; background: var(--accent-dim); display: flex; align-items: center; justify-content: center; color: var(--accent); margin-bottom: 12px; }
.service-card .service-icon .material-icons-round { font-size: 16px; }
.service-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.service-card p { font-size: 12px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 12px; }
.service-card .service-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 10px; border-top: 1px solid var(--border); }
.service-card .service-price { font-size: 16px; font-weight: 800; letter-spacing: -0.3px; }
.service-card .service-price small { font-size: 10px; font-weight: 500; color: var(--text-muted); }

/* ========== TICKETS ========== */
.ticket-item { background: var(--bg-card); border: 1px solid var(--border); padding: 14px; margin-bottom: 8px; cursor: pointer; transition: all 0.12s; }
.ticket-item:hover { border-color: var(--border-light); background: var(--bg-elevated); }
.ticket-item .ticket-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 4px; }
.ticket-item .ticket-title { font-size: 13px; font-weight: 600; }
.ticket-item .ticket-date { font-size: 10px; color: var(--text-muted); white-space: nowrap; }
.ticket-item .ticket-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ticket-item .ticket-footer { display: flex; gap: 6px; margin-top: 8px; }

/* ========== LOADING — HUD ========== */
.loading-state { display: flex; align-items: center; justify-content: center; padding: 48px; }
.spinner {
  position: relative; flex: 0 0 auto;
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid rgba(125, 211, 252, 0.2);
  background: radial-gradient(circle, rgba(224, 242, 254, 0.9) 0 1.5px, transparent 2px);
  box-shadow: inset 0 0 8px rgba(56, 189, 248, 0.14), 0 0 10px rgba(56, 189, 248, 0.12);
  animation: hudBreath 2.8s ease-in-out infinite;
}
.spinner::before, .spinner::after {
  content: ''; position: absolute; border-radius: 50%;
}
.spinner::before {
  inset: -1px;
  border: 1.5px solid transparent;
  border-top-color: #bae6fd;
  border-right-color: rgba(56, 189, 248, 0.5);
  filter: drop-shadow(0 0 3px rgba(56, 189, 248, 0.65));
  animation: spin 1s cubic-bezier(0.55, 0.15, 0.45, 0.85) infinite;
}
.spinner::after {
  inset: 6px;
  border: 1px dashed rgba(148, 163, 184, 0.4);
  animation: spin 3.4s linear infinite reverse;
}
@keyframes hudBreath {
  0%, 100% { box-shadow: inset 0 0 8px rgba(56, 189, 248, 0.12), 0 0 9px rgba(56, 189, 248, 0.1); }
  50% { box-shadow: inset 0 0 13px rgba(56, 189, 248, 0.24), 0 0 16px rgba(56, 189, 248, 0.22); }
}
@keyframes spin { to { transform: rotate(360deg); } }
.icon-spin { display: inline-block; vertical-align: middle; animation: spin 1s linear infinite; }
@media (prefers-reduced-motion: reduce) {
  .spinner, .spinner::before, .spinner::after { animation-duration: 4s; }
}

/* ========== TOAST ========== */
.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column-reverse; gap: 6px; }
.toast {
  padding: 10px 16px; font-size: 13px; font-weight: 500; color: white;
  box-shadow: 0 6px 24px rgba(0,0,0,0.3);
  display: flex; align-items: center; gap: 8px; backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
}
.toast.success { background: rgba(34,197,94,0.92); }
.toast.error { background: rgba(239,68,68,0.92); }
.toast.info { background: rgba(59,130,246,0.92); }

@keyframes toastIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 992px) {
  .sidebar {
    position: fixed; top: 0; left: 0;
    height: 100vh; height: 100dvh;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 200;
  }
  .sidebar.open { transform: translateX(0); box-shadow: 8px 0 32px rgba(0,0,0,0.5); }
  .sidebar-overlay { display: block; pointer-events: none; }
  .sidebar-overlay.active { opacity: 1; pointer-events: auto; }
  .sidebar-close { display: inline-flex; }
  .menu-toggle { display: inline-flex; }
  .view-container { padding: 16px; }
  body.sidebar-open .view-container { overflow: hidden; }
}
@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr; }
  .login-card { width: 100%; margin: 12px; padding: 28px 20px; }
  .form-row { grid-template-columns: 1fr; }
  .topbar { padding: 0 12px; }
  .topbar-left { gap: 8px; }
  .topbar-actions { gap: 8px; }
  .topbar-title { font-size: 16px; }
  .user-btn { gap: 0; padding: 4px; }
  .user-btn > .material-icons-round { display: none; }
  .view-container { padding: 12px; }
  .user-info-text { display: none; }
  .notif-dropdown { width: calc(100vw - 24px); right: -50px; }
}

/* ========== VPS ========== */
.vps-layout { align-items: start; }
@media (max-width: 992px) {
  .vps-layout { grid-template-columns: 1fr !important; }
}
.vps-slider-row { margin-bottom: 18px; }
.vps-slider-row label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }
.vps-slider-row input[type="range"] { width: 100%; accent-color: var(--accent); }
.vps-range-hints { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.vps-panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
@media (max-width: 480px) { .vps-panel-grid { grid-template-columns: 1fr; } }
.vps-panel-card { border: 1px solid var(--border); border-radius: 8px; padding: 12px; cursor: pointer; transition: all 0.15s ease; }
.vps-panel-card:hover { border-color: var(--accent); }
.vps-panel-card.selected { border-color: var(--accent); background: var(--accent-dim); box-shadow: 0 0 12px var(--accent-glow); }
.vps-summary-line { display: flex; justify-content: space-between; font-size: 14px; padding: 6px 0; color: var(--text-secondary); }

/* ========== VPS Nodes ========== */
.vps-node-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.vps-node-card { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--bg-surface); transition: all 0.15s ease; }
.vps-node-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.vps-node-card.selected { border-color: var(--accent); box-shadow: 0 0 18px var(--accent-glow); }
.vps-chip { background: var(--accent-dim); color: var(--accent); border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: 600; }
.vps-cap-row { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-secondary); margin-top: 6px; }
.vps-cap-bar { height: 5px; background: var(--bg-card); border-radius: 999px; overflow: hidden; margin-top: 2px; }
.vps-cap-bar > div { height: 100%; border-radius: 999px; transition: width 0.3s ease; }
.vps-node-card.full { opacity: 0.55; cursor: not-allowed; }
.vps-node-card.full:hover { transform: none; border-color: var(--border); }

/* ========== PALANTIR STYLE — colturi drepte, plat, dens ========== */
* {
  border-radius: 0 !important;
}
.btn {
  box-shadow: none !important;
  text-shadow: none;
}
.card {
  box-shadow: none;
}
.stat-card,
.service-card,
.vps-node-card,
.vps-panel-card {
  box-shadow: none !important;
}
.vps-node-card.selected {
  border: 1px solid var(--accent) !important;
  box-shadow: none !important;
  background: var(--bg-elevated);
}
.vps-panel-card.selected {
  border: 1px solid var(--accent) !important;
  box-shadow: none !important;
}
.vps-node-card:hover { transform: none !important; }
.badge { box-shadow: none; }
.toast { box-shadow: 0 0 0 1px var(--border) !important; }
.login-card, .login-glow, .login-bg-grid { box-shadow: none !important; }
.form-input, select.form-input {
  background: var(--bg-input);
  border: 1px solid var(--border);
}
.nav-item.active { box-shadow: none !important; }
.modal-backdrop.active .modal { box-shadow: 0 0 0 1px var(--border) !important; }
table { border-collapse: collapse; }
th { letter-spacing: 0.4px; }
.vps-ip-toggle { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); padding: 10px 12px; margin-top: 10px; cursor: pointer; background: var(--bg-input); }
.vps-ip-toggle input { accent-color: var(--accent); width: 16px; height: 16px; }
.vps-ip-toggle:has(input:checked) { border-color: var(--accent); background: var(--accent-dim); }

/* ========== PROFILE (Palantir) ========== */
.profile-hero {
  position: relative; overflow: hidden;
  display: flex; align-items: stretch; justify-content: space-between; gap: 24px;
  background: var(--bg-surface); border: 1px solid var(--border);
  padding: 24px 28px; margin-bottom: 20px;
  transition: border-color 0.2s;
}
.profile-hero:hover { border-color: var(--border-light); }
.profile-hero::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent 65%);
}

.profile-hero-main { display: flex; align-items: center; gap: 20px; min-width: 0; }

.profile-avatar {
  width: 76px; height: 76px; flex-shrink: 0;
  background: linear-gradient(135deg, #1d4ed8 0%, var(--accent) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 800; letter-spacing: 1px; color: #fff;
  border: 1px solid rgba(255,255,255,0.08);
  position: relative; overflow: hidden; padding: 0;
  font-family: inherit; cursor: pointer;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-inner {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.profile-avatar-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(2, 6, 23, 0.68); color: #fff;
  opacity: 0; transition: opacity 0.18s ease;
}
.profile-avatar-overlay .material-icons-round { font-size: 24px; }
.profile-avatar:hover .profile-avatar-overlay,
.profile-avatar:focus-visible .profile-avatar-overlay,
.profile-avatar.is-loading .profile-avatar-overlay { opacity: 1; }
.profile-avatar.is-loading .profile-avatar-overlay .material-icons-round { opacity: 0; }
.profile-avatar.is-loading .profile-avatar-overlay::after {
  content: ''; position: absolute; width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff;
  border-radius: 50%; animation: avatarSpin 0.8s linear infinite;
}
@keyframes avatarSpin { to { transform: rotate(360deg); } }
.profile-avatar-wrap {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; flex-shrink: 0;
}
.profile-avatar-remove {
  background: none; border: none; padding: 0;
  font-family: inherit; font-size: 10px; font-weight: 600;
  color: var(--text-muted); cursor: pointer;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.profile-avatar-remove:hover { color: var(--red); }

.account-type-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.account-type-option {
  position: relative; display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border: 1px solid var(--border);
  background: var(--bg-elevated); cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
}
.account-type-option:hover { border-color: var(--border-light); }
.account-type-option input {
  position: absolute; opacity: 0; pointer-events: none;
}
.account-type-option .material-icons-round {
  font-size: 22px; color: var(--text-muted); transition: color 0.18s;
}
.account-type-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.account-type-copy strong { font-size: 12px; font-weight: 700; color: var(--text-primary); }
.account-type-copy small { font-size: 11px; color: var(--text-muted); line-height: 1.4; }
.account-type-option:has(input:checked) {
  border-color: var(--accent); background: var(--accent-dim);
}
.account-type-option:has(input:checked) .material-icons-round { color: var(--accent); }
.account-type-option:focus-within { outline: 1px solid var(--accent); outline-offset: 1px; }

@media (hover: none) {
  .profile-avatar-overlay {
    opacity: 1; background: transparent;
    align-items: flex-end; justify-content: flex-end; padding: 3px;
  }
  .profile-avatar-overlay .material-icons-round {
    font-size: 15px; padding: 4px; border-radius: 50%;
    background: rgba(2, 6, 23, 0.85);
  }
}

.profile-id { min-width: 0; }
.profile-id-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-id-top h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.4px; }
.profile-handle {
  margin-top: 4px; font-size: 13px; color: var(--text-secondary);
  font-family: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace;
  letter-spacing: 0.3px;
}

.profile-meta { display: flex; align-items: stretch; }
.profile-meta-item {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  padding: 0 26px; min-width: 130px;
}
.profile-meta-item + .profile-meta-item { border-left: 1px solid var(--border); }
.profile-meta-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.2px; color: var(--text-muted);
}
.profile-meta-value { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.profile-meta-value.mono {
  font-family: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace;
  font-weight: 500; letter-spacing: 0.4px; word-break: break-all;
}

.status-dot {
  display: inline-block; width: 6px; height: 6px;
  background: var(--green); margin-right: 5px; vertical-align: middle;
}

.profile-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  margin-bottom: 20px; align-items: start;
}

.pf-card { transition: border-color 0.2s; }
.pf-card:hover { border-color: var(--border-light); }
.pf-tick { display: inline-block; width: 8px; height: 8px; background: var(--accent); margin-right: 9px; vertical-align: middle; }

.pf-inline { display: flex; gap: 10px; }
.pf-inline .form-input { flex: 1; }
.pf-inline-btn { white-space: nowrap; flex-shrink: 0; height: 38px; padding: 0 18px; }
.pf-hint { margin-top: 5px; font-size: 11px; color: var(--text-muted); line-height: 1.45; }

.pf-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

.form-input:disabled { opacity: 0.55; cursor: not-allowed; }

.pw-strength { margin: -4px 0 2px; }
.pw-strength-track {
  height: 4px; background: var(--bg-input);
  border: 1px solid var(--border); overflow: hidden;
}
.pw-strength-bar {
  height: 100%; width: 0;
  background: var(--text-muted);
  transition: width 0.25s ease, background 0.25s ease;
}
.pw-strength-bar.s1 { background: var(--red); }
.pw-strength-bar.s2 { background: #f97316; }
.pw-strength-bar.s3 { background: var(--gold); }
.pw-strength-bar.s4 { background: #84cc16; }
.pw-strength-bar.s5 { background: var(--green); }
.pw-strength-label {
  display: block; margin-top: 5px; text-align: right;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.2px; color: var(--text-muted);
}

.billing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.billing-grid .form-group.span-2 { grid-column: 1 / -1; }
.pf-actions { margin-top: 6px; }
.pf-actions .btn, .pf-card .card-body > .btn { width: 100%; }

@media (max-width: 900px) {
  .profile-hero { flex-direction: column; }
  .profile-meta { border-top: 1px solid var(--border); }
  .profile-meta-item { flex: 1; padding: 14px 26px 0 0; }
  .profile-meta-item + .profile-meta-item { border-left: 1px solid var(--border); padding-left: 26px; }
}
@media (max-width: 600px) {
  .profile-grid { grid-template-columns: 1fr; }
  .pf-row-2 { grid-template-columns: 1fr; }
  .billing-grid { grid-template-columns: 1fr; }
  .billing-grid .form-group.span-2 { grid-column: auto; }
  .account-type-grid { grid-template-columns: 1fr; }
  .profile-meta { flex-direction: column; }
  .profile-meta-item { padding: 12px 0; min-width: 0; }
  .profile-meta-item + .profile-meta-item { border-left: none !important; border-top: 1px solid var(--border); padding-left: 0; }
  .profile-hero { padding: 20px; }
}

/* ========== VPS ACCESS MODAL ========== */
.vps-access { display: flex; flex-direction: column; }
.vps-access .btn { width: auto; text-transform: none; letter-spacing: 0; }
.vps-access-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
}
.vps-access-title { font-size: 18px; font-weight: 800; letter-spacing: -0.3px; }
.vps-access-sub { margin-top: 3px; font-size: 11.5px; color: var(--text-secondary); }
.vps-access-warning {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 12px; margin-bottom: 10px;
  border: 1px solid rgba(240, 180, 41, 0.35);
  background: rgba(240, 180, 41, 0.08);
  color: var(--gold); font-size: 11.5px; line-height: 1.5;
}
.vps-access-warning .material-icons-round { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.vps-access-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vps-access-box {
  padding: 10px 12px; margin-bottom: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.vps-access-label {
  display: block; font-size: 9.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--text-muted);
}
.vps-access-value {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-top: 4px; min-width: 0;
}
.vps-access-value code {
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  color: var(--text-primary); overflow-wrap: anywhere;
}
.vps-access-copy {
  width: 26px; height: 26px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 6px;
  background: transparent; color: var(--text-muted);
  cursor: pointer; transition: all 0.15s;
}
.vps-access-copy .material-icons-round { font-size: 15px; }
.vps-access-copy:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }
.vps-access-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 8px 0 14px;
  color: var(--text-muted); font-size: 9.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1.1px;
}
.vps-access-divider::before, .vps-access-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.vps-access-section {
  padding: 12px; margin-bottom: 10px;
  border: 1px solid var(--border); border-radius: 8px;
  background: rgba(255, 255, 255, 0.012);
}
.vps-access-section-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 700; color: var(--text-primary);
}
.vps-access-section-title .material-icons-round { font-size: 16px; color: var(--accent); }
.vps-access-hint {
  margin: 4px 0 8px; font-size: 11px; line-height: 1.5;
  color: var(--text-muted);
}
.vps-access-hint code { font-family: 'JetBrains Mono', monospace; color: var(--text-secondary); }
.vps-access-inline { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.vps-access-inline .btn { height: 38px; padding: 0 12px; font-size: 12px; }
.vps-access-section textarea.form-input {
  min-height: 68px; font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px; line-height: 1.5;
}
.vps-ports-list { display: flex; flex-direction: column; gap: 6px; }
.vps-ports-empty {
  padding: 9px 10px; border: 1px dashed var(--border); border-radius: 6px;
  font-size: 11px; color: var(--text-muted); line-height: 1.5;
}
.vps-port-row {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg-input); min-width: 0;
}
.vps-port-row.is-off { opacity: 0.55; }
.vps-port-map {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px; color: var(--text-primary);
}
.vps-port-label {
  flex: 0 1 auto; max-width: 110px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; font-size: 10.5px; color: var(--text-muted);
}
.vps-port-btn {
  width: 24px; height: 24px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 5px;
  background: transparent; color: var(--text-muted); cursor: pointer;
  transition: all 0.15s;
}
.vps-port-btn .material-icons-round { font-size: 14px; }
.vps-port-btn:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }
.vps-port-btn.danger:hover { color: var(--red); border-color: var(--red); background: rgba(239, 68, 68, 0.08); }
.vps-domain-auto-hint {
  display: flex; align-items: flex-start; gap: 5px;
  padding: 6px 8px; border-radius: 6px;
  background: rgba(56, 189, 248, 0.06);
  border: 1px solid rgba(56, 189, 248, 0.16);
}
.vps-domain-auto-hint .material-icons-round {
  font-size: 14px; color: var(--accent); margin-top: 1px;
}
.vps-domain-item { display: flex; flex-direction: column; gap: 4px; }
.vps-domain-badge {
  flex-shrink: 0; padding: 2px 6px; border-radius: 4px;
  font-size: 9px; font-weight: 800; letter-spacing: 0.4px;
  text-transform: uppercase; color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
}
.vps-domain-badge.ok { color: #22c55e; background: rgba(34, 197, 94, 0.1); }
.vps-domain-badge.pending { color: #f59e0b; background: rgba(245, 158, 11, 0.1); }
.vps-domain-badge.error { color: #ef4444; background: rgba(239, 68, 68, 0.1); }
.vps-domain-note {
  padding-left: 4px; font-size: 10.5px; line-height: 1.45;
  color: var(--text-muted); word-break: break-word;
}
@media (max-width: 600px) {
  .vps-access-grid { grid-template-columns: 1fr; }
  .vps-access-head { flex-direction: column; }
  .vps-access-inline .btn { flex: 1; }
  .vps-access-inline input { flex-basis: 100%; }
}

/* ========== VPS FREE VS PAID ========== */
.vps-free-panel {
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid rgba(34, 197, 94, 0.28);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.09), rgba(34, 197, 94, 0.025));
}
.vps-free-panel.is-empty {
  border-color: var(--border);
  background: var(--bg-input);
}
.vps-free-head { display: flex; align-items: center; gap: 10px; }
.vps-free-icon {
  width: 32px; height: 32px; flex: 0 0 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.14);
  color: var(--green);
}
.vps-free-panel.is-empty .vps-free-icon { background: var(--bg-elevated); color: var(--text-muted); }
.vps-free-icon .material-icons-round { font-size: 18px; }
.vps-free-copy { flex: 1; min-width: 0; }
.vps-free-title { font-size: 12.5px; font-weight: 800; color: var(--text-primary); }
.vps-free-sub { margin-top: 2px; font-size: 10.5px; line-height: 1.45; color: var(--text-secondary); }
.vps-free-badge {
  padding: 3px 8px; border-radius: 999px;
  border: 1px solid rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.12);
  color: var(--green);
  font-size: 9px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.5px;
  white-space: nowrap;
}
.vps-free-panel.is-empty .vps-free-badge {
  border-color: var(--border); background: var(--bg-elevated); color: var(--text-muted);
}
.vps-free-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.vps-free-item {
  padding: 8px 9px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.14);
}
.vps-free-item-top { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; }
.vps-free-item-top span {
  font-size: 9px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.6px; color: var(--text-muted);
}
.vps-free-item-top b { font-size: 15px; font-weight: 800; color: var(--green); }
.vps-free-item-top b small { font-size: 8.5px; font-weight: 600; color: var(--text-muted); margin-left: 2px; }
.vps-free-bar {
  height: 4px; margin: 6px 0 4px;
  border-radius: 999px; background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.vps-free-bar > span {
  display: block; height: 100%;
  border-radius: 999px;
  background: var(--green);
  transition: width 0.3s ease;
}
.vps-free-item.is-empty .vps-free-bar > span { background: var(--text-muted); }
.vps-free-item-foot { font-size: 9.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.vps-cost-box {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg-input);
}
.vps-cost-box.is-free {
  border-color: rgba(34, 197, 94, 0.32);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.02));
}
.vps-cost-box.is-paid {
  border-color: rgba(240, 180, 41, 0.38);
  background: linear-gradient(135deg, rgba(240, 180, 41, 0.1), rgba(240, 180, 41, 0.02));
}
.vps-cost-head { display: flex; align-items: center; gap: 9px; }
.vps-cost-icon {
  width: 30px; height: 30px; flex: 0 0 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; font-size: 18px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}
.vps-cost-box.is-free .vps-cost-icon { background: rgba(34, 197, 94, 0.14); color: var(--green); }
.vps-cost-box.is-paid .vps-cost-icon { background: rgba(240, 180, 41, 0.15); color: var(--gold); }
.vps-cost-copy { flex: 1; min-width: 0; }
.vps-cost-title { font-size: 11.5px; font-weight: 800; color: var(--text-primary); line-height: 1.35; }
.vps-cost-box.is-free .vps-cost-title { color: var(--green); }
.vps-cost-box.is-paid .vps-cost-title { color: var(--gold); }
.vps-cost-sub { margin-top: 2px; font-size: 10.5px; line-height: 1.45; color: var(--text-secondary); }
.vps-cost-badge {
  padding: 3px 8px; border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 9px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.5px;
  white-space: nowrap;
}
.vps-cost-box.is-free .vps-cost-badge {
  border-color: rgba(34, 197, 94, 0.35); background: rgba(34, 197, 94, 0.12); color: var(--green);
}
.vps-cost-box.is-paid .vps-cost-badge {
  border-color: rgba(240, 180, 41, 0.4); background: rgba(240, 180, 41, 0.14); color: var(--gold);
}
.vps-cost-lines { margin-top: 10px; padding-top: 9px; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.vps-cost-line {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 3px 0;
  font-size: 11px; color: var(--text-secondary);
}
.vps-cost-line strong { font-size: 11.5px; color: var(--text-primary); text-align: right; }
.vps-cost-line.is-zero { opacity: 0.55; }
.vps-total-line {
  margin-top: 10px; padding-top: 12px;
  border-top: 1px solid var(--border);
  font-weight: 700; color: var(--text-primary);
}
.vps-total-line #vps-sum-total { font-size: 19px; font-weight: 800; letter-spacing: -0.3px; }
.vps-total-line #vps-sum-total.is-free { color: var(--green); }
.vps-total-line #vps-sum-total.is-paid { color: var(--gold); }
.vps-order-btn { height: 46px; border-radius: 8px; font-weight: 800; letter-spacing: 0.2px; }
.vps-order-btn.is-free {
  background: var(--green); color: #06140a;
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.22);
}
.vps-order-btn.is-free:hover { background: #4ade80; box-shadow: 0 6px 20px rgba(34, 197, 94, 0.3); }
.vps-order-btn.is-paid {
  background: var(--gold); color: #191200;
  box-shadow: 0 4px 16px rgba(240, 180, 41, 0.22);
}
.vps-order-btn.is-paid:hover { background: #f7c548; box-shadow: 0 6px 20px rgba(240, 180, 41, 0.3); }
.vps-order-btn:disabled { opacity: 0.65; cursor: wait; transform: none; }
.vps-order-note {
  margin: 8px 0 0; text-align: center;
  font-size: 11px; line-height: 1.45; color: var(--text-muted);
}
@media (max-width: 480px) {
  .vps-free-grid { grid-template-columns: 1fr; }
  .vps-free-head, .vps-cost-head { flex-wrap: wrap; }
  .vps-free-badge, .vps-cost-badge { margin-left: 42px; }
}

.vps-free-item.is-empty .vps-free-item-top b { color: var(--text-muted); }

/* ================= DASHBOARD — COMMAND CENTER ================= */
.dash-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(290px, 0.85fr);
  margin-bottom: 20px;
  overflow: hidden;
  background:
    linear-gradient(115deg, rgba(59, 130, 246, 0.10), transparent 42%),
    var(--bg-surface);
  border: 1px solid var(--border);
}
.dash-hero.is-new-account { grid-template-columns: 1fr; }
.dash-hero::before {
  content: '';
  position: absolute; top: 0; left: 0; width: 220px; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  z-index: 2;
}
.dash-hero::after {
  content: '';
  position: absolute; top: 0; bottom: 0; left: 0; width: 1px;
  background: linear-gradient(180deg, transparent, rgba(59, 130, 246, 0.5), transparent);
  z-index: 2;
}
.dash-hero-grid {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.6;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 36px 36px;
  -webkit-mask-image: linear-gradient(90deg, #000 0%, transparent 78%);
  mask-image: linear-gradient(90deg, #000 0%, transparent 78%);
}
.dash-hero-main {
  position: relative; z-index: 1;
  min-width: 0;
  padding: 28px 30px 24px;
}
.dash-kicker {
  display: flex; align-items: center; gap: 8px;
  font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--text-secondary);
}
.dash-kicker-slash { color: var(--text-muted); }
.dash-kicker-muted { color: var(--text-muted); font-weight: 500; letter-spacing: 1px; }
.dash-live-dot {
  width: 6px; height: 6px; flex: 0 0 6px;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
  animation: dashPulse 2.4s ease-out infinite;
}
@keyframes dashPulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45); }
  70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
.dash-hero-title {
  margin: 15px 0 9px;
  font-size: 34px; font-weight: 800; line-height: 1.05;
  letter-spacing: -1.2px; color: var(--text-primary);
}
.dash-hero-title span { color: var(--accent); }
.dash-hero-sub {
  max-width: 560px;
  font-size: 13px; line-height: 1.6;
  color: var(--text-secondary);
}
.dash-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.dash-hero-actions .btn,
.dash-empty-actions .btn,
.dash-support-actions .btn { width: auto; height: 38px; padding: 0 14px; font-size: 10px; letter-spacing: 0.7px; }
.dash-btn { white-space: nowrap; }
.dash-btn-primary {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #fff;
  box-shadow: none;
}
.dash-btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.dash-btn-primary .material-icons-round { font-size: 16px; }
.dash-hero-actions .btn-ghost .material-icons-round,
.dash-empty-actions .btn-ghost .material-icons-round,
.dash-support-actions .btn-ghost .material-icons-round { font-size: 16px; }
.dash-hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.dash-tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 7px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.12);
  font-size: 9px; font-weight: 600; letter-spacing: 0.4px;
  text-transform: uppercase; color: var(--text-muted);
}
.dash-tag .material-icons-round { font-size: 12px; color: var(--text-secondary); }
.dash-hero-side {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; gap: 14px;
  min-width: 0;
  padding: 22px 22px 20px;
  border-left: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.14);
}
.dash-panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 9px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1.4px;
  color: var(--text-muted);
}
.dash-live-label {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--green); font-size: 8.5px; letter-spacing: 1px;
}
.dash-live-label .dash-live-dot { width: 5px; height: 5px; flex-basis: 5px; }
.dash-clock {
  font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 32px; font-weight: 700; line-height: 1;
  letter-spacing: -1px; color: var(--text-primary);
}
.dash-clock-date {
  margin-top: -6px;
  font-size: 10px; color: var(--text-muted);
  letter-spacing: 0.2px;
}
.dash-readouts { display: flex; flex-direction: column; gap: 0; }
.dash-readout {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  font-size: 10px; color: var(--text-muted);
}
.dash-readout:last-child { border-bottom: none; }
.dash-readout b { font-size: 10.5px; font-weight: 700; color: var(--text-primary); text-align: right; }
.dash-spark { margin-top: auto; padding-top: 4px; }
.dash-spark-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 8.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.1px;
  color: var(--text-muted);
}
.dash-spark-head b { font-size: 11px; color: var(--text-primary); letter-spacing: 0; }
.dash-spark-bars { display: flex; align-items: flex-end; gap: 2px; height: 42px; margin-top: 7px; }
.dash-spark-bar {
  flex: 1; height: 100%; min-width: 2px;
  display: flex; align-items: flex-end;
  background: rgba(255, 255, 255, 0.028);
}
.dash-spark-bar > span {
  display: block; width: 100%;
  background: rgba(59, 130, 246, 0.55);
  transition: height 0.5s ease;
}
.dash-spark-bar.is-today > span { background: var(--accent); }
.dash-spark-bar:hover > span { background: var(--accent-hover); }

/* KPI */
.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.dash-kpi {
  --kpi: var(--accent);
  --kpi-dim: rgba(59, 130, 246, 0.10);
  position: relative;
  padding: 15px 16px 13px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.dash-kpi::before {
  content: '';
  position: absolute; top: 0; left: 0; width: 36px; height: 2px;
  background: var(--kpi);
}
.dash-kpi:hover { border-color: var(--kpi); background: var(--bg-elevated); }
.dash-kpi:focus-visible { outline: 1px solid var(--kpi); outline-offset: 2px; }
.dash-kpi.blue { --kpi: var(--accent); --kpi-dim: rgba(59, 130, 246, 0.10); }
.dash-kpi.gold { --kpi: var(--gold); --kpi-dim: rgba(240, 180, 41, 0.11); }
.dash-kpi.green { --kpi: var(--green); --kpi-dim: rgba(34, 197, 94, 0.11); }
.dash-kpi.purple { --kpi: #a78bfa; --kpi-dim: rgba(139, 92, 246, 0.13); }
.dash-kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.dash-kpi-index {
  font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 8.5px; font-weight: 700; letter-spacing: 1.2px; color: var(--text-muted);
}
.dash-kpi-icon {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: var(--kpi-dim); color: var(--kpi);
}
.dash-kpi-icon .material-icons-round { font-size: 17px; }
.dash-kpi-value {
  font-size: 30px; font-weight: 800; line-height: 1;
  letter-spacing: -1px; color: var(--text-primary);
}
.dash-kpi-value .dash-unit { font-size: 13px; font-weight: 600; letter-spacing: 0; color: var(--text-muted); }
.dash-kpi-value .dash-kpi-na { font-size: 15px; font-weight: 700; letter-spacing: 1px; color: var(--text-muted); }
.dash-kpi-label {
  margin-top: 7px;
  font-size: 9.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-secondary);
}
.dash-kpi-meta {
  margin-top: 4px; min-height: 14px;
  font-size: 10px; line-height: 1.45; color: var(--text-muted);
}
.dash-kpi-bar {
  height: 3px; margin-top: 11px;
  background: var(--bg-input);
  border: 1px solid rgba(255, 255, 255, 0.03);
  overflow: hidden;
}
.dash-kpi-bar > span {
  display: block; height: 100%;
  background: var(--kpi);
  transition: width 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Main grid */
.dash-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}
.dash-main-grid .card { min-width: 0; }
.dash-main-grid .card + .card { margin-top: 0; }
.dash-card { background: var(--bg-surface); }
.dash-card-head { padding: 14px 18px; }
.dash-card-head > div { min-width: 0; }
.dash-card-head h3 { letter-spacing: 0.8px; }
.dash-card-sub {
  margin-top: 3px;
  font-size: 10px; font-weight: 500;
  text-transform: none; letter-spacing: 0;
  color: var(--text-muted);
}
.dash-card-body { padding: 15px 18px 17px; }
.dash-link {
  display: inline-flex; align-items: center; gap: 3px;
  flex-shrink: 0;
  font-size: 9px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--accent); cursor: pointer; text-decoration: none;
}
.dash-link .material-icons-round { font-size: 13px; }
.dash-card-head .dash-link { font-size: 9px; font-weight: 800; letter-spacing: 0.8px; }
.dash-link:hover { color: var(--accent-hover); }

/* Filters */
.dash-filter-bar { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.dash-filter {
  padding: 4px 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 8.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.7px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.dash-filter:hover { color: var(--text-primary); border-color: var(--border-light); }
.dash-filter.active { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }

/* Resources */
.dash-resource {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s ease;
  animation: dashFadeIn 0.35s ease both;
}
.dash-resource:hover { background: rgba(59, 130, 246, 0.045); }
.dash-resource:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
.dash-resource:last-child { border-bottom: none; padding-bottom: 2px; }
.dash-resource[hidden] { display: none !important; }
.dash-res-icon {
  width: 32px; height: 32px; flex: 0 0 32px;
  display: flex; align-items: center; justify-content: center;
  background: var(--tone-dim, var(--accent-dim));
  color: var(--tone, var(--accent));
  border: 1px solid rgba(255, 255, 255, 0.045);
}
.dash-res-icon .material-icons-round { font-size: 16px; }
.dash-res-main { flex: 1; min-width: 0; }
.dash-res-name {
  display: flex; align-items: center; gap: 7px;
  font-size: 11.5px; font-weight: 700; line-height: 1.35;
  color: var(--text-primary);
}
.dash-res-title {
  min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.dash-res-meta {
  margin-top: 2px;
  font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 9px; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dash-res-open {
  width: 26px; height: 26px; flex: 0 0 26px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  background: transparent; color: var(--text-muted);
  cursor: pointer; transition: all 0.15s ease;
}
.dash-res-open .material-icons-round { font-size: 14px; }
.dash-res-open:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }

/* Tone helpers */
.dash-tone-blue { --tone: var(--accent); --tone-dim: rgba(59, 130, 246, 0.10); }
.dash-tone-gold { --tone: var(--gold); --tone-dim: rgba(240, 180, 41, 0.11); }
.dash-tone-green { --tone: var(--green); --tone-dim: rgba(34, 197, 94, 0.11); }
.dash-tone-purple { --tone: #a78bfa; --tone-dim: rgba(139, 92, 246, 0.13); }
.dash-tone-red { --tone: var(--red); --tone-dim: rgba(239, 68, 68, 0.11); }

/* Empty states */
.dash-inline-empty {
  padding: 24px 16px;
  text-align: center;
  border: 1px dashed var(--border);
  background: rgba(255, 255, 255, 0.012);
}
.dash-inline-empty[hidden] { display: none; }
.dash-inline-empty .material-icons-round { font-size: 28px; color: var(--text-muted); }
.dash-inline-empty b { display: block; margin-top: 7px; font-size: 12px; color: var(--text-secondary); }
.dash-inline-empty p {
  max-width: 320px; margin: 4px auto 0;
  font-size: 10.5px; line-height: 1.5; color: var(--text-muted);
}
.dash-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 13px; }

/* Timeline */
.dash-timeline { display: flex; flex-direction: column; }
.dash-tl-item {
  position: relative;
  display: flex; align-items: flex-start; gap: 11px;
  padding: 8px 0;
  cursor: pointer;
}
.dash-tl-item[data-nav]:hover .dash-tl-title { color: var(--accent-hover); }
.dash-tl-item:not(:last-child)::before {
  content: '';
  position: absolute; left: 14px; top: 34px; bottom: -8px;
  width: 1px; background: var(--border);
}
.dash-tl-icon {
  width: 29px; height: 29px; flex: 0 0 29px;
  display: flex; align-items: center; justify-content: center;
  background: var(--tone-dim, var(--bg-elevated));
  color: var(--tone, var(--text-secondary));
  border: 1px solid rgba(255, 255, 255, 0.045);
  z-index: 1;
}
.dash-tl-icon .material-icons-round { font-size: 14px; }
.dash-tl-main { flex: 1; min-width: 0; }
.dash-tl-title {
  font-size: 11px; font-weight: 600; line-height: 1.45;
  color: var(--text-primary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: color 0.15s;
}
.dash-tl-meta {
  margin-top: 2px;
  font-size: 9.5px; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dash-tl-time { margin-top: 2px; flex-shrink: 0; font-size: 9px; color: var(--text-muted); }

/* Usage / ring */
.dash-usage-top { display: flex; align-items: center; gap: 16px; }
.dash-ring { width: 104px; height: 104px; flex: 0 0 104px; }
.dash-ring svg { display: block; width: 100%; height: 100%; overflow: visible; }
.dash-ring-bg { fill: none; stroke: var(--bg-input); stroke-width: 7; }
.dash-ring-fg {
  fill: none; stroke: var(--accent); stroke-width: 7;
  stroke-dasharray: 100;
  animation: dashRing 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.dash-ring-value {
  fill: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 20px; font-weight: 800; letter-spacing: -0.6px;
}
.dash-ring-label {
  fill: var(--text-muted);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 7px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase;
}
.dash-usage-copy { flex: 1; min-width: 0; }
.dash-usage-plan {
  font-size: 14px; font-weight: 800; letter-spacing: -0.2px;
  color: var(--text-primary);
}
.dash-usage-sub { margin-top: 2px; font-size: 9.5px; color: var(--text-muted); }
.dash-usage-lines { margin-top: 6px; }
.dash-usage-line {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.035);
  font-size: 10px; color: var(--text-secondary);
}
.dash-usage-line:last-child { border-bottom: none; }
.dash-usage-line b { font-size: 10px; font-weight: 700; color: var(--text-primary); text-align: right; }
.dash-section-sep { height: 1px; margin: 14px 0; background: var(--border); }

/* Payment chart */
.dash-mini-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.dash-mini-label {
  font-size: 8.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1.1px;
  color: var(--text-muted);
}
.dash-mini-value {
  margin-top: 3px;
  font-size: 16px; font-weight: 800; letter-spacing: -0.4px;
  color: var(--text-primary);
}
.dash-mini-value small { font-size: 8.5px; font-weight: 600; letter-spacing: 0.3px; color: var(--text-muted); }
.dash-delta {
  display: inline-flex; align-items: center; gap: 2px;
  flex-shrink: 0;
  padding: 2px 5px;
  border: 1px solid var(--border);
  font-size: 8.5px; font-weight: 700;
  color: var(--text-muted);
}
.dash-delta .material-icons-round { font-size: 11px; }
.dash-delta.is-up { color: var(--green); border-color: rgba(34, 197, 94, 0.32); background: rgba(34, 197, 94, 0.07); }
.dash-delta.is-down { color: var(--red); border-color: rgba(239, 68, 68, 0.32); background: rgba(239, 68, 68, 0.07); }
.dash-delta.is-count { color: var(--text-secondary); background: var(--bg-input); }
.dash-chart { display: flex; align-items: stretch; gap: 6px; height: 108px; margin-top: 6px; }
.dash-chart-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dash-chart-track {
  flex: 1;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0 3px;
  border-bottom: 1px solid var(--border);
}
.dash-chart-bar {
  width: 100%; min-height: 2px;
  background: linear-gradient(180deg, var(--accent), rgba(59, 130, 246, 0.18));
  transform-origin: bottom;
  animation: dashGrow 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  transition: filter 0.15s;
}
.dash-chart-bar:hover { filter: brightness(1.35); }
.dash-chart-bar.is-current { background: linear-gradient(180deg, #60a5fa, var(--accent)); }
.dash-chart.is-empty .dash-chart-bar { background: var(--bg-elevated); }
.dash-chart-label {
  padding-top: 5px;
  text-align: center;
  font-size: 8px; color: var(--text-muted);
  text-transform: capitalize;
  white-space: nowrap;
}
.dash-chart-note { margin-top: 7px; font-size: 9.5px; line-height: 1.45; color: var(--text-muted); }

/* Support */
.dash-support-summary {
  padding: 13px 14px;
  border: 1px solid var(--border);
  background: var(--bg-input);
}
.dash-support-big {
  font-size: 28px; font-weight: 800; line-height: 1;
  letter-spacing: -0.8px; color: var(--text-primary);
}
.dash-support-big small {
  margin-left: 6px;
  font-size: 9px; font-weight: 600;
  letter-spacing: 0; color: var(--text-muted);
}
.dash-status-bar {
  display: flex;
  height: 5px;
  margin: 12px 0 9px;
  background: var(--bg-deep);
  overflow: hidden;
}
.dash-status-seg { display: block; height: 100%; }
.dash-status-seg.open { background: var(--accent); }
.dash-status-seg.working { background: var(--gold); }
.dash-status-seg.resolved { background: var(--green); }
.dash-status-seg.cancelled { background: var(--red); }
.dash-status-legend { display: flex; flex-wrap: wrap; gap: 5px 12px; }
.dash-status-legend span { display: inline-flex; align-items: center; gap: 4px; font-size: 8.5px; color: var(--text-muted); }
.dash-status-legend i { display: inline-block; width: 5px; height: 5px; font-style: normal; }
.dash-status-legend i.open { background: var(--accent); }
.dash-status-legend i.working { background: var(--gold); }
.dash-status-legend i.resolved { background: var(--green); }
.dash-status-legend i.cancelled { background: var(--red); }
.dash-ticket-list { margin-top: 5px; }
.dash-ticket-row {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.dash-ticket-row:last-child { border-bottom: none; }
.dash-ticket-row:hover .dash-ticket-title { color: var(--accent-hover); }
.dash-ticket-id {
  flex: 0 0 30px;
  font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 8.5px; color: var(--text-muted);
}
.dash-ticket-main { flex: 1; min-width: 0; }
.dash-ticket-title {
  font-size: 10.5px; font-weight: 600; color: var(--text-primary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: color 0.15s;
}
.dash-ticket-meta {
  margin-top: 2px;
  font-size: 9px; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dash-support-actions { display: flex; gap: 8px; margin-top: 13px; }
.dash-support-actions .btn { flex: 1; }

/* Admin-specific */
.dash-revenue-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.dash-revenue-total {
  margin-top: 3px;
  font-size: 27px; font-weight: 800; line-height: 1;
  letter-spacing: -0.9px; color: var(--text-primary);
}
.dash-revenue-total small { font-size: 9px; font-weight: 600; color: var(--text-muted); }
.dash-split-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  margin-top: 14px;
  border: 1px solid var(--border);
  background: var(--border);
}
.dash-split-stat { padding: 9px 11px; background: var(--bg-input); }
.dash-split-stat span {
  display: block;
  font-size: 8px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--text-muted);
}
.dash-split-stat b { display: block; margin-top: 4px; font-size: 12px; font-weight: 700; color: var(--text-primary); }
.dash-split-stat b.is-warning { color: var(--gold); }
.dash-queue { display: flex; flex-direction: column; gap: 6px; }
.dash-queue-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: inherit; text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.dash-queue-item:hover { border-color: var(--tone, var(--accent)); background: var(--bg-elevated); }
.dash-queue-icon {
  width: 29px; height: 29px; flex: 0 0 29px;
  display: flex; align-items: center; justify-content: center;
  background: var(--tone-dim, var(--accent-dim));
  color: var(--tone, var(--accent));
  border: 1px solid rgba(255, 255, 255, 0.045);
}
.dash-queue-icon .material-icons-round { font-size: 15px; }
.dash-queue-main { flex: 1; min-width: 0; }
.dash-queue-main b { display: block; font-size: 11px; font-weight: 700; color: var(--text-primary); }
.dash-queue-main small {
  display: block; margin-top: 1px;
  font-size: 9px; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dash-queue-count {
  min-width: 22px;
  font-size: 17px; font-weight: 800; line-height: 1;
  text-align: right; color: var(--tone, var(--accent));
}
.dash-queue-arrow { font-size: 15px; color: var(--text-muted); }
.dash-queue-item.is-zero { opacity: 0.5; }
.dash-queue-item.is-zero:hover { opacity: 1; }

/* Admin feed */
.dash-feed-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}
.dash-feed-item:last-child { border-bottom: none; }
.dash-feed-item:hover { background: rgba(59, 130, 246, 0.045); }
.dash-avatar {
  width: 29px; height: 29px; flex: 0 0 29px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-dim);
  border: 1px solid rgba(59, 130, 246, 0.22);
  color: var(--accent);
  font-size: 10px; font-weight: 800;
}
.dash-feed-main { flex: 1; min-width: 0; }
.dash-feed-title {
  font-size: 10.5px; font-weight: 700; color: var(--text-primary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dash-feed-meta {
  margin-top: 1px;
  font-size: 9px; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dash-feed-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.dash-feed-time { font-size: 8.5px; color: var(--text-muted); white-space: nowrap; }
.dash-ticket-table { width: 100%; }
.dash-ticket-table td { font-size: 11px; }
.dash-ticket-table tr { cursor: pointer; }

@keyframes dashFadeIn {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes dashGrow {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}
@keyframes dashRing {
  from { stroke-dashoffset: 100; }
}

@media (max-width: 1200px) {
  .dash-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1050px) {
  .dash-hero { grid-template-columns: 1fr; }
  .dash-hero-side { border-left: none; border-top: 1px solid var(--border); }
  .dash-hero-grid {
    -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 75%);
    mask-image: linear-gradient(180deg, #000 0%, transparent 75%);
  }
  .dash-main-grid { grid-template-columns: 1fr; }
  .dash-spark-bars { height: 34px; }
}
@media (max-width: 700px) {
  .dash-hero-main { padding: 21px 18px 19px; }
  .dash-hero-side { padding: 16px 18px; }
  .dash-hero-title { font-size: 27px; letter-spacing: -0.8px; }
  .dash-hero-sub { font-size: 12px; }
  .dash-kpi-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .dash-kpi { padding: 13px 12px 11px; }
  .dash-kpi-value { font-size: 25px; }
  .dash-card-head { padding: 12px 14px; }
  .dash-card-body { padding: 13px 14px 15px; }
  .dash-usage-top { gap: 12px; }
  .dash-ring { width: 88px; height: 88px; flex-basis: 88px; }
  .dash-chart { height: 96px; }
  .dash-hero-actions .btn { flex: 1 1 auto; }
}
@media (max-width: 480px) {
  .dash-kpi-grid { grid-template-columns: 1fr; }
  .dash-hero-tags { display: none; }
  .dash-split-stats { grid-template-columns: 1fr; }
  .dash-usage-top { align-items: flex-start; }
  .dash-support-actions { flex-direction: column; }
  .dash-support-actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .dash-live-dot, .dash-chart-bar, .dash-ring-fg, .dash-resource { animation: none !important; }
}

/* ========== DASHBOARD — PRIMII PAȘI ========== */
.dash-onboard {
  display: flex; flex-direction: column; gap: 16px;
  padding: 20px 22px; margin-bottom: 20px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(59,130,246,0.06), rgba(139,92,246,0.04) 55%, transparent);
}
.dash-onboard-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.dash-onboard-head { flex: 0 1 320px; min-width: 220px; }
.dash-onboard-kicker {
  font-size: 10px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 6px;
}
.dash-onboard-head h3 { font-size: 16px; font-weight: 700; letter-spacing: -0.2px; margin-bottom: 6px; }
.dash-onboard-head p { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.dash-onboard-progress { height: 4px; margin-top: 12px; background: var(--bg-deep); border: 1px solid var(--border); overflow: hidden; }
.dash-onboard-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #8b5cf6); transition: width 0.6s ease; }
.dash-onboard-count { font-size: 11px; color: var(--text-muted); margin-top: 8px; }
.dash-onboard-free-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.dash-onboard-free-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border: 1px solid rgba(59,130,246,0.28);
  background: rgba(59,130,246,0.08); color: var(--text-secondary);
  font-size: 11px; font-weight: 600; white-space: nowrap;
}
.dash-onboard-free-pill .material-icons-round { font-size: 14px; color: var(--accent); }
.dash-onboard-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.dash-onboard-actions .btn { height: 32px; padding: 0 12px; font-size: 12px; }
.dash-onboard-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; flex: 1; }
.dash-onboard-step {
  display: flex; align-items: flex-start; gap: 8px; min-width: 0;
  padding: 10px 12px; border: 1px solid var(--border); background: var(--bg-elevated);
}
.dash-onboard-step > .material-icons-round { font-size: 18px; color: var(--text-muted); flex: 0 0 auto; margin-top: 1px; }
.dash-onboard-step b { display: block; font-size: 12px; font-weight: 700; color: var(--text-primary); margin-bottom: 2px; }
.dash-onboard-step > div > span { display: block; font-size: 11px; color: var(--text-secondary); line-height: 1.4; }
.dash-onboard-step .btn { margin-top: 8px; width: 100%; height: 28px; padding: 0 8px; font-size: 11px; }
.dash-onboard-step.done { border-color: rgba(34,197,94,0.3); background: rgba(34,197,94,0.06); }
.dash-onboard-step.done > .material-icons-round { color: var(--green); }
.dash-onboard-goals { display: flex; flex-direction: column; gap: 10px; }
.dash-onboard-goals-label {
  font-size: 10px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--text-muted);
}
.dash-onboard-goals-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.dash-onboard-goal {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  min-width: 0; padding: 13px 14px; text-align: left; cursor: pointer;
  font-family: inherit; color: inherit;
  border: 1px solid var(--border); background: var(--bg-elevated);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.dash-onboard-goal:hover {
  border-color: rgba(59,130,246,0.5); background: rgba(59,130,246,0.08);
  transform: translateY(-1px);
}
.dash-onboard-goal:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dash-onboard-goal .material-icons-round { font-size: 20px; color: var(--accent); }
.dash-onboard-goal b { font-size: 12px; font-weight: 700; color: var(--text-primary); line-height: 1.3; }
.dash-onboard-goal > span:last-child { font-size: 11px; color: var(--text-secondary); line-height: 1.4; }
@media (max-width: 1100px) {
  .dash-onboard-top { flex-direction: column; align-items: stretch; gap: 16px; }
  .dash-onboard-head { flex: 1 1 auto; }
  .dash-onboard-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-onboard-goals-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .dash-onboard-steps { grid-template-columns: 1fr; }
  .dash-onboard-goals-grid { grid-template-columns: 1fr; }
  .dash-onboard-actions .btn { width: 100%; }
}

.dash-quick-support { margin-bottom: 20px; }
.dash-quick-support-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
}
.dash-quick-support-copy {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.dash-quick-support-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border: 1px solid rgba(59, 130, 246, 0.28);
  color: var(--accent);
}
.dash-quick-support-icon .material-icons-round { font-size: 20px; }
.dash-quick-support-copy h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
}
.dash-quick-support-copy p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
}
.dash-quick-support-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.dash-quick-support-actions .btn {
  width: auto;
  height: 38px;
  padding: 0 14px;
  font-size: 10px;
  letter-spacing: 0.7px;
  text-decoration: none;
}
.dash-quick-support-actions .btn .material-icons-round { font-size: 16px; }
@media (max-width: 768px) {
  .dash-quick-support-body { flex-direction: column; align-items: stretch; padding: 16px 18px; }
  .dash-quick-support-actions { flex-wrap: wrap; }
  .dash-quick-support-actions .btn { flex: 1 1 auto; }
}

/* ================= VPS ORDER EXPERIENCE ================= */
.vps-page { display: flex; flex-direction: column; gap: 16px; }
.vps-page [hidden] { display: none !important; }

/* Hub tabs: my VPS / new VPS */
.vps-hub { display: flex; flex-direction: column; gap: 12px; }
.vps-hub-tabs {
  position: sticky; top: 0; z-index: 25;
  display: flex; border: 1px solid var(--border); background: var(--bg-surface);
}
.vps-hub-tab {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 0; padding: 13px 16px; border: none; border-right: 1px solid var(--border);
  background: transparent; color: var(--text-secondary); font-family: inherit;
  font-size: 12px; font-weight: 700; cursor: pointer; position: relative;
}
.vps-hub-tab:last-child { border-right: none; }
.vps-hub-tab:hover { background: var(--bg-elevated); color: var(--text-primary); }
.vps-hub-tab.is-active { background: var(--accent-dim); color: var(--accent); }
.vps-hub-tab.is-active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 2px; background: var(--accent);
}
.vps-hub-tab .material-icons-round { font-size: 18px; }
.vps-hub-badge {
  min-width: 18px; padding: 1px 6px; text-align: center;
  background: var(--accent); color: #fff; font-size: 9px; font-weight: 800;
}
.vps-hub-panel { display: flex; flex-direction: column; gap: 16px; }
.vps-my-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 14px; border: 1px solid var(--border); background: var(--bg-surface);
}
.vps-my-toolbar p { font-size: 12px; font-weight: 700; color: var(--text-secondary); }
.vps-new-btn { width: auto; height: 38px; padding: 0 14px; font-size: 11px; flex: 0 0 auto; }
.vps-my-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 48px 20px; border: 1px dashed var(--border); background: var(--bg-surface);
}
.vps-my-empty > .material-icons-round { font-size: 40px; color: var(--text-muted); margin-bottom: 12px; }
.vps-my-empty h3 { font-size: 16px; margin-bottom: 4px; color: var(--text-primary); }
.vps-my-empty p { font-size: 12px; line-height: 1.5; color: var(--text-secondary); max-width: 440px; margin-bottom: 16px; }
.vps-my-empty .btn { width: auto; height: 40px; padding: 0 16px; }
.vps-orders-card { margin-top: 0; }
.vps-page-header { align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.vps-header-stats { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vps-header-pill {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--border); background: var(--bg-elevated);
  padding: 7px 11px; font-size: 9.5px; font-weight: 800;
  letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-secondary);
}
.vps-header-pill i {
  width: 7px; height: 7px; display: block; background: var(--green);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}
.vps-header-pill.is-off { color: var(--red); border-color: rgba(239, 68, 68, 0.3); }
.vps-header-pill.is-off i { background: var(--red); box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12); }
.vps-header-count {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); background: var(--bg-elevated); padding: 6px 10px;
}
.vps-header-count b { font-size: 20px; line-height: 1; color: var(--text-primary); }
.vps-header-count span {
  font-size: 9px; font-weight: 800; letter-spacing: 0.7px;
  text-transform: uppercase; color: var(--text-muted);
}


/* Hero */
.vps-hero {
  position: relative; display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.8fr);
  gap: 24px; align-items: stretch; padding: 26px 28px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), transparent 55%), var(--bg-surface);
  overflow: hidden;
}
.vps-hero::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent 65%);
}
.vps-hero-copy { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.vps-hero-kicker {
  font-size: 9.5px; font-weight: 800; letter-spacing: 1.6px;
  text-transform: uppercase; color: var(--accent); margin-bottom: 8px;
}
.vps-hero-title {
  font-size: 26px; line-height: 1.12; letter-spacing: -0.8px;
  font-weight: 800; margin-bottom: 8px;
}
.vps-hero-sub { font-size: 12.5px; line-height: 1.6; color: var(--text-secondary); max-width: 560px; }
.vps-hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.vps-hero-badges > span {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; color: var(--text-secondary);
  border: 1px solid var(--border); background: rgba(255, 255, 255, 0.02); padding: 5px 9px;
}
.vps-hero-badges .material-icons-round { font-size: 14px; color: var(--green); }

/* Free resources widget */
.vps-free-widget {
  border: 1px solid var(--border); background: var(--bg-elevated);
  padding: 14px 16px; display: flex; flex-direction: column;
  justify-content: center; min-width: 0;
}
.vps-free-widget.is-empty { opacity: 0.9; }
.vps-free-widget-head { display: flex; align-items: flex-start; gap: 10px; }
.vps-free-widget-icon {
  width: 34px; height: 34px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: rgba(34, 197, 94, 0.1); color: var(--green);
  border: 1px solid rgba(34, 197, 94, 0.3); overflow: hidden;
}
.vps-free-widget.is-empty .vps-free-widget-icon {
  background: var(--bg-card); color: var(--text-muted); border-color: var(--border);
}
.vps-free-widget-icon .material-icons-round { font-size: 18px; }
.vps-free-widget-head b { display: block; font-size: 12px; color: var(--text-primary); margin-bottom: 2px; }
.vps-free-widget-head p { font-size: 10.5px; line-height: 1.45; color: var(--text-secondary); }
.vps-free-widget-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }

/* Pending / provisioning banner */
.vps-pending-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--border); background: var(--bg-elevated);
}
.vps-pending-banner.is-pending {
  border-color: rgba(240, 180, 41, 0.38);
  background: linear-gradient(135deg, rgba(240, 180, 41, 0.1), rgba(240, 180, 41, 0.02));
}
.vps-pending-banner.is-paid {
  border-color: rgba(59, 130, 246, 0.38);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.02));
}
.vps-pending-banner.is-provisioning {
  border-color: rgba(34, 197, 94, 0.32);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.09), rgba(34, 197, 94, 0.02));
}
.vps-pending-icon {
  width: 38px; height: 38px; flex: 0 0 38px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: var(--bg-card); color: var(--accent);
  overflow: hidden;
}
.vps-pending-banner.is-pending .vps-pending-icon { color: var(--gold); border-color: rgba(240, 180, 41, 0.35); }
.vps-pending-banner.is-provisioning .vps-pending-icon { color: var(--green); border-color: rgba(34, 197, 94, 0.3); }
.vps-pending-icon .material-icons-round { font-size: 20px; }
.vps-pending-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.vps-pending-copy b { font-size: 12.5px; color: var(--text-primary); }
.vps-pending-copy small { font-size: 10.5px; line-height: 1.45; color: var(--text-secondary); }
.vps-pending-banner .btn { margin-left: auto; flex: 0 0 auto; }

/* Wizard shell */
.vps-wizard { border: 1px solid var(--border); background: var(--bg-surface); }
.vps-stepper {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--border); background: rgba(255, 255, 255, 0.015);
}
.vps-step {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; background: transparent; border: none;
  border-right: 1px solid var(--border); color: var(--text-secondary);
  font-family: inherit; text-align: left; cursor: pointer;
}
.vps-step:last-child { border-right: none; }
.vps-step:hover { background: var(--bg-elevated); color: var(--text-primary); }
.vps-step.is-active { background: var(--accent-dim); color: var(--text-primary); }
.vps-step.is-active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 2px; background: var(--accent);
}
.vps-step-num {
  width: 28px; height: 28px; flex: 0 0 28px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-light); background: var(--bg-elevated);
  font-size: 12px; font-weight: 800; color: var(--text-secondary);
}
.vps-step.is-active .vps-step-num { border-color: var(--accent); background: var(--accent); color: #fff; }
.vps-step.is-done .vps-step-num {
  border-color: rgba(34, 197, 94, 0.5); color: var(--green); background: rgba(34, 197, 94, 0.1);
}
.vps-step-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vps-step-copy b { font-size: 12px; color: inherit; }
.vps-step-copy small { font-size: 10px; color: var(--text-muted); }

.vps-wizard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.vps-wizard-main { padding: 22px 24px 26px; min-width: 0; }
.vps-step-head { margin-bottom: 18px; }
.vps-step-head + .vps-block-label { margin-top: 0; }
.vps-step-kicker {
  display: block; font-size: 9px; font-weight: 800; letter-spacing: 1.3px;
  text-transform: uppercase; color: var(--accent); margin-bottom: 5px;
}
.vps-step-head h3 { font-size: 19px; font-weight: 800; letter-spacing: -0.4px; margin-bottom: 4px; }
.vps-step-head p { font-size: 12px; line-height: 1.5; color: var(--text-secondary); max-width: 720px; }
.vps-block-label {
  font-size: 9.5px; font-weight: 800; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--text-muted); margin: 20px 0 8px;
}

/* Server picker */
.vps-server-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 8px; }
.vps-loc-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.vps-loc-chip {
  border: 1px solid var(--border); background: var(--bg-input); color: var(--text-sec);
  border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: border-color .15s, background .15s, color .15s;
}
.vps-loc-chip:hover { border-color: var(--accent); color: var(--text); }
.vps-loc-chip.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.vps-server-card {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px; border: 1px solid var(--border); background: var(--bg-elevated);
  color: var(--text-primary); font-family: inherit; text-align: left; cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.vps-server-card:hover { border-color: var(--accent); }
.vps-server-card.selected { border-color: var(--accent); background: var(--accent-dim); }
.vps-server-card.is-disabled { opacity: 0.55; cursor: not-allowed; }
.vps-server-card.is-preview { opacity: 0.7; border-style: dashed; cursor: default; }
.vps-server-card.is-preview:hover { border-color: var(--border); }
.vps-server-thumb-wrap {
  width: 56px; height: 56px; flex: 0 0 56px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card); border: 1px solid var(--border); overflow: hidden;
}
.vps-server-thumb-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vps-server-thumb-wrap .material-icons-round { display: none; font-size: 24px; color: var(--accent); }
.vps-server-thumb-wrap.is-fallback .material-icons-round { display: block; }
.vps-server-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.vps-server-name {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  font-size: 13px; font-weight: 800; color: var(--text-primary);
}
.vps-server-loc {
  display: flex; align-items: center; gap: 3px;
  font-size: 10.5px; color: var(--text-muted);
}
.vps-server-loc .material-icons-round { font-size: 13px; }
.vps-server-desc { font-size: 10.5px; color: var(--text-secondary); line-height: 1.4; }
.vps-server-free { font-size: 10px; color: var(--green); font-weight: 600; margin-top: 2px; }
.vps-server-card > .badge { margin-left: auto; flex: 0 0 auto; }

/* Presets */
.vps-preset-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.vps-preset {
  position: relative; display: flex; flex-direction: column; align-items: flex-start;
  gap: 5px; min-width: 0; padding: 14px 15px; border: 1px solid var(--border);
  background: var(--bg-elevated); color: var(--text-primary);
  font-family: inherit; text-align: left; cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.vps-preset:hover { border-color: var(--accent); }
.vps-preset.is-featured::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent 75%);
}
.vps-preset.is-selected { border-color: var(--accent); background: var(--accent-dim); }
.vps-preset.is-disabled { opacity: 0.55; cursor: not-allowed; }
.vps-preset-top { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 8px; }
.vps-preset-icon {
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(59, 130, 246, 0.3);
  overflow: hidden;
}
.vps-preset-icon .material-icons-round { font-size: 17px; }
.vps-preset-badge {
  font-size: 8.5px; font-weight: 800; letter-spacing: 0.8px;
  text-transform: uppercase; color: var(--gold);
  border: 1px solid rgba(240, 180, 41, 0.35); background: rgba(240, 180, 41, 0.1);
  padding: 2px 6px;
}
.vps-preset-name { font-size: 14px; font-weight: 800; }
.vps-preset-desc { font-size: 10.5px; line-height: 1.4; color: var(--text-secondary); min-height: 29px; }
.vps-preset-specs { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.vps-preset-specs > span {
  font-size: 9.5px; color: var(--text-muted);
  border: 1px solid var(--border); background: rgba(255, 255, 255, 0.02); padding: 2px 6px;
}
.vps-preset-specs b { color: var(--text-primary); font-weight: 700; }
.vps-preset-price {
  margin-top: auto; padding-top: 6px;
  font-size: 18px; font-weight: 800; letter-spacing: -0.3px; color: var(--text-primary);
}
.vps-preset-price small { display: block; font-size: 9.5px; font-weight: 600; color: var(--text-muted); letter-spacing: 0; }
.vps-preset-price.is-free { color: var(--green); }
.vps-preset.is-selected .vps-preset-price { color: var(--accent-hover); }
.vps-preset-hint { font-size: 9.5px; color: var(--red); margin-top: 2px; }

/* Custom resources */
.vps-custom-toggle {
  display: flex; align-items: center; gap: 8px; width: 100%;
  margin-top: 10px; padding: 10px 12px;
  border: 1px dashed var(--border-light); background: transparent;
  color: var(--accent); font-family: inherit; font-size: 11.5px; font-weight: 700;
  cursor: pointer;
}
.vps-custom-toggle:hover, .vps-custom-toggle.is-open { border-style: solid; border-color: var(--accent); background: var(--accent-dim); }
.vps-custom-toggle .material-icons-round { font-size: 17px; }
.vps-custom-toggle .vps-custom-arrow { margin-left: auto; font-size: 18px; transition: transform 0.2s; }
.vps-custom-toggle.is-active { border-color: var(--accent); }
.vps-custom-config { margin-top: 10px; border: 1px solid var(--border); background: var(--bg-elevated); padding: 14px; }
.vps-custom-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.vps-custom-head b { display: block; font-size: 12px; color: var(--text-primary); }
.vps-custom-head small { display: block; font-size: 10px; color: var(--text-muted); margin-top: 2px; }
.vps-custom-head button {
  background: none; border: none; padding: 0; color: var(--accent);
  font-family: inherit; font-size: 10.5px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.vps-custom-head button:hover { text-decoration: underline; }
.vps-range-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.vps-range-card { border: 1px solid var(--border); background: var(--bg-card); padding: 11px 12px; }
.vps-range-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.vps-range-head label {
  font-size: 9.5px; font-weight: 800; letter-spacing: 1px;
  text-transform: uppercase; color: var(--text-muted);
}
.vps-range-head output { font-size: 18px; font-weight: 800; color: var(--accent-hover); line-height: 1; }
.vps-range-card input[type="range"] { width: 100%; accent-color: var(--accent); height: 24px; cursor: pointer; }
.vps-range-hints { display: flex; justify-content: space-between; gap: 6px; font-size: 9.5px; color: var(--text-muted); }

/* Template tabs and cards */
.vps-template-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.vps-template-tab {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px;
  border: 1px solid var(--border); background: var(--bg-elevated);
  color: var(--text-secondary); font-family: inherit; text-align: left; cursor: pointer;
}
.vps-template-tab:hover { border-color: var(--accent); }
.vps-template-tab.is-active { border-color: var(--accent); background: var(--accent-dim); color: var(--text-primary); }
.vps-template-tab > .material-icons-round { font-size: 20px; color: var(--text-muted); }
.vps-template-tab.is-active > .material-icons-round { color: var(--accent); }
.vps-template-tab > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.vps-template-tab b { font-size: 12px; }
.vps-template-tab small { font-size: 9.5px; color: var(--text-muted); }
.vps-hint-line {
  display: flex; align-items: flex-start; gap: 8px; margin-bottom: 10px;
  padding: 9px 11px; border: 1px solid rgba(59, 130, 246, 0.22); background: var(--accent-dim);
  font-size: 10.5px; line-height: 1.45; color: var(--text-secondary);
}
.vps-hint-line .material-icons-round { font-size: 16px; color: var(--accent); flex: 0 0 auto; margin-top: 1px; }
.vps-hint-line b { color: var(--text-primary); }
.vps-template-search { position: relative; margin-bottom: 10px; }
.vps-template-search .material-icons-round {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  font-size: 17px; color: var(--text-muted); pointer-events: none;
}
.vps-template-search .form-input { height: 36px; padding-left: 34px; font-size: 12px; }
.vps-template-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.vps-template-card {
  position: relative; display: flex; align-items: flex-start; gap: 10px;
  min-width: 0; padding: 11px 74px 11px 11px;
  border: 1px solid var(--border); background: var(--bg-elevated);
  color: var(--text-primary); font-family: inherit; text-align: left; cursor: pointer;
}
.vps-template-card.vps-panel-card { padding: 11px 74px 11px 11px; margin: 0; }
.vps-template-card:hover { border-color: var(--accent); }
.vps-template-card.selected { border-color: var(--accent); background: var(--accent-dim); }
.vps-template-card.is-disabled { opacity: 0.55; cursor: not-allowed; }
.vps-template-icon {
  width: 34px; height: 34px; flex: 0 0 34px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card); border: 1px solid var(--border); overflow: hidden;
}
.vps-template-icon img { width: 26px; height: 26px; object-fit: contain; display: block; }
.vps-template-icon .material-icons-round { display: none; font-size: 18px; color: var(--accent); }
.vps-template-icon.is-fallback img { display: none; }
.vps-template-icon.is-fallback .material-icons-round { display: block; }
.vps-template-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vps-template-name {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 12px; font-weight: 800; color: var(--text-primary);
}
.vps-template-name .badge { font-size: 8px; padding: 1px 5px; }
.vps-template-desc { font-size: 10px; line-height: 1.4; color: var(--text-secondary); }
.vps-template-meta { font-size: 9px; color: var(--text-muted); margin-top: 1px; }
.vps-template-price {
  position: absolute; top: 10px; right: 10px;
  font-size: 10px; font-weight: 800; color: var(--accent-hover); white-space: nowrap;
}
.vps-template-check {
  position: absolute; bottom: 9px; right: 9px;
  font-size: 18px; color: var(--accent); line-height: 1;
}
.vps-template-unavailable {
  position: absolute; bottom: 9px; right: 9px;
  font-size: 8.5px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--red);
}
.vps-search-empty { padding: 18px 12px; border: 1px dashed var(--border); text-align: center; font-size: 11px; color: var(--text-muted); }

/* Review */
.vps-review { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.vps-review-card { border: 1px solid var(--border); background: var(--bg-elevated); padding: 13px 14px; }
.vps-review-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.vps-review-kicker {
  display: block; font-size: 8.5px; font-weight: 800; letter-spacing: 1px;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 3px;
}
.vps-review-card-head b { display: block; font-size: 13px; color: var(--text-primary); }
.vps-review-card-head button {
  background: none; border: none; padding: 0; color: var(--accent);
  font-family: inherit; font-size: 10.5px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.vps-review-card-head button:hover { text-decoration: underline; }
.vps-review-meta { margin-top: 5px; font-size: 10.5px; color: var(--text-secondary); }
.vps-review-os { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.vps-review-os-icon {
  width: 32px; height: 32px; flex: 0 0 32px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card); border: 1px solid var(--border); overflow: hidden;
}
.vps-review-os-icon img { width: 24px; height: 24px; object-fit: contain; display: block; }
.vps-review-os-icon .material-icons-round { display: none; font-size: 17px; color: var(--accent); }
.vps-review-os-icon.is-fallback img { display: none; }
.vps-review-os-icon.is-fallback .material-icons-round { display: block; }
.vps-review-os > div { display: flex; flex-direction: column; gap: 2px; }
.vps-review-os b { font-size: 11px; color: var(--text-primary); }
.vps-review-os span:last-child { font-size: 10px; color: var(--text-secondary); }

/* Dedicated IP */
.vps-ip-toggle { display: flex; align-items: center; gap: 10px; padding: 12px 13px; margin-top: 0; cursor: pointer; background: var(--bg-input); }
.vps-ip-toggle.is-on { border-color: var(--accent); background: var(--accent-dim); }
.vps-ip-toggle input { width: 16px; height: 16px; accent-color: var(--accent); flex: 0 0 auto; }
.vps-ip-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.vps-ip-copy b { font-size: 11.5px; color: var(--text-primary); }
.vps-ip-copy small { font-size: 10px; line-height: 1.4; color: var(--text-secondary); }
.vps-ip-price { margin-left: auto; text-align: right; font-size: 13px; font-weight: 800; color: var(--accent-hover); white-space: nowrap; }
.vps-ip-price small { display: block; font-size: 8.5px; font-weight: 600; color: var(--text-muted); }
.vps-trust {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border);
  font-size: 10px; color: var(--text-muted);
}
.vps-trust > span { display: inline-flex; align-items: center; gap: 4px; }
.vps-trust .material-icons-round { font-size: 14px; color: var(--green); }

/* Checkout summary */
.vps-checkout {
  position: sticky; top: 48px; align-self: start;
  max-height: calc(100vh - 72px); overflow-y: auto;
  padding: 18px; border-left: 1px solid var(--border); background: var(--bg-surface);
}
.vps-checkout-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.vps-checkout-head > div { display: flex; flex-direction: column; gap: 2px; }
.vps-checkout-head span { font-size: 11px; font-weight: 800; letter-spacing: 0.4px; color: var(--text-primary); }
.vps-checkout-head b { font-size: 9.5px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.7px; }
.vps-checkout-live { display: inline-flex; align-items: center; gap: 5px; font-size: 8.5px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase; color: var(--green); }
.vps-checkout-live i { width: 6px; height: 6px; background: var(--green); display: block; box-shadow: 0 0 0 3px rgba(34,197,94,.12); }
.vps-summary-group { padding: 11px 0; border-bottom: 1px solid var(--border); }
.vps-summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; font-size: 11.5px; color: var(--text-secondary); }
.vps-summary-row b { color: var(--text-primary); text-align: right; font-weight: 600; max-width: 62%; }
.vps-summary-row b.is-green { color: var(--green); }
.vps-summary-group.vps-cost-lines { margin-top: 0; padding-top: 11px; border-top: none; }
.vps-cost-line span small { display: block; font-size: 9.5px; color: var(--text-muted); margin-top: 1px; }
.vps-cost-line.is-free, .vps-cost-line.is-free strong { color: var(--green); }
.vps-summary-status {
  display: flex; align-items: flex-start; gap: 9px;
  margin-top: 12px; padding: 10px 11px; border: 1px solid var(--border); background: var(--bg-elevated);
}
.vps-summary-status .material-icons-round { font-size: 18px; flex: 0 0 auto; margin-top: 1px; color: var(--text-muted); }
.vps-summary-status > div { display: flex; flex-direction: column; gap: 2px; }
.vps-summary-status b { font-size: 10.5px; color: var(--text-primary); }
.vps-summary-status small { font-size: 9.5px; line-height: 1.4; color: var(--text-secondary); }
.vps-summary-status.is-free { border-color: rgba(34, 197, 94, 0.3); background: rgba(34, 197, 94, 0.07); }
.vps-summary-status.is-free .material-icons-round { color: var(--green); }
.vps-summary-status.is-free b { color: var(--green); }
.vps-summary-status.is-paid { border-color: rgba(240, 180, 41, 0.3); background: rgba(240, 180, 41, 0.06); }
.vps-summary-status.is-paid .material-icons-round { color: var(--gold); }
.vps-summary-status.is-paid b { color: var(--gold); }
.vps-total-line {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border);
}
.vps-total-line > div { display: flex; flex-direction: column; gap: 2px; }
.vps-total-line span { font-size: 11px; font-weight: 700; color: var(--text-secondary); }
.vps-total-line small { font-size: 9px; color: var(--text-muted); }
.vps-total-line #vps-sum-total { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; line-height: 1; }
.vps-total-line #vps-sum-total.is-free { color: var(--green); }
.vps-total-line #vps-sum-total.is-paid { color: var(--gold); }
.vps-order-btn { width: 100%; height: 48px; margin-top: 14px; font-size: 12px; font-weight: 800; }
.vps-order-note { margin: 8px 0 0; text-align: center; font-size: 10px; line-height: 1.5; color: var(--text-muted); }
.vps-secure-note {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border);
  font-size: 9px; color: var(--text-muted);
}
.vps-secure-note .material-icons-round { font-size: 13px; color: var(--green); }

/* Mobile checkout bar */
.vps-mobile-bar { display: none; }

/* Keyboard focus */
.vps-step:focus-visible,
.vps-server-card:focus-visible,
.vps-preset:focus-visible,
.vps-template-card:focus-visible,
.vps-template-tab:focus-visible,
.vps-custom-toggle:focus-visible,
.vps-ip-toggle:focus-within,
.vps-order-btn:focus-visible,
.vps-mobile-bar .btn:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

/* Existing machines / orders sections */
.vps-orders-card { margin-top: 0; }
.vps-orders-card .card-header h3 { font-size: 13px; }
.badge-ghost { background: var(--bg-elevated); color: var(--text-muted); }

@media (max-width: 1200px) {
  .vps-hero { grid-template-columns: 1fr; }
  .vps-wizard-grid { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (max-width: 1100px) {
  .vps-wizard-grid { grid-template-columns: 1fr; }
  .vps-checkout {
    position: static; max-height: none; overflow: visible;
    border-left: none; border-top: 1px solid var(--border);
  }
}
@media (max-width: 992px) {
  .vps-mobile-bar {
    position: sticky; bottom: 0; z-index: 30;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 14px; border-top: 1px solid var(--border);
    background: rgba(12, 12, 18, 0.97);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
  .vps-mobile-total { display: flex; flex-direction: column; gap: 2px; }
  .vps-mobile-total span { font-size: 8.5px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-muted); }
  .vps-mobile-total b { font-size: 18px; font-weight: 800; color: var(--text-primary); line-height: 1; }
  .vps-mobile-total b.is-free { color: var(--green); }
  .vps-mobile-total b.is-paid { color: var(--gold); }
  .vps-mobile-bar .btn { width: auto; height: 42px; padding: 0 16px; font-size: 11.5px; }
  .vps-mobile-bar .btn.is-free { background: var(--green); color: #06140a; }
  .vps-mobile-bar .btn.is-paid { background: var(--gold); color: #191200; }
  .vps-checkout .vps-order-btn,
  .vps-checkout .vps-order-note,
  .vps-checkout .vps-secure-note { display: none; }
}
@media (max-width: 760px) {
  .vps-step { padding: 11px 10px; gap: 8px; }
  .vps-step-num { width: 24px; height: 24px; flex-basis: 24px; font-size: 11px; }
  .vps-step-copy b { font-size: 11px; }
  .vps-step-copy small { display: none; }
  .vps-wizard-main { padding: 18px 16px 20px; }
  .vps-checkout { padding: 16px; }
  .vps-hero { padding: 20px; }
  .vps-hub-tab { padding: 11px 8px; font-size: 11px; gap: 5px; }
  .vps-hub-tab .material-icons-round { font-size: 16px; }
  .vps-my-toolbar { flex-direction: column; align-items: flex-start; gap: 12px; padding: 14px 16px; }
  .vps-new-btn { width: 100%; }
  .vps-hero-title { font-size: 23px; }
  .vps-preset-grid { grid-template-columns: 1fr; }
  .vps-template-grid { grid-template-columns: 1fr; }
  .vps-range-grid { grid-template-columns: 1fr; }
  .vps-custom-head { flex-direction: column; }
  .vps-server-card { flex-wrap: wrap; }
  .vps-server-card > .badge { margin-left: 0; }
  .vps-ip-toggle { flex-wrap: wrap; }
  .vps-ip-copy { flex-basis: calc(100% - 30px); }
  .vps-ip-price { margin-left: 26px; text-align: left; }
}
@media (max-width: 560px) {
  .vps-hero { padding: 16px; }
  .vps-hero-title { font-size: 21px; letter-spacing: -0.5px; }
  .vps-hero-sub { font-size: 11.5px; }
  .vps-hero-badges { display: none; }
  .vps-free-widget { padding: 12px; }
  .vps-free-widget-grid { gap: 5px; }
  .vps-free-item { padding: 6px; }
  .vps-free-item-top b { font-size: 13px; }
  .vps-pending-banner { align-items: flex-start; flex-wrap: wrap; }
  .vps-pending-banner .btn { margin-left: 50px; }
  .vps-template-tabs { grid-template-columns: 1fr; }
  .vps-template-card, .vps-template-card.vps-panel-card { padding-right: 62px; }
  .vps-trust { gap: 8px 12px; }
  .vps-mobile-bar .btn { padding: 0 12px; }
}
@media (max-width: 430px) {
  .vps-hub-tab { padding: 10px 6px; font-size: 10px; gap: 4px; }
  .vps-step { padding: 9px 6px; gap: 5px; }
  .vps-step-num { width: 20px; height: 20px; flex-basis: 20px; font-size: 10px; }
  .vps-step-copy { min-width: 0; }
  .vps-step-copy b {
    font-size: 9px; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
  }
  .vps-free-widget-head p { display: none; }
  .vps-free-widget-grid { margin-top: 9px; }
  .vps-server-thumb-wrap { width: 44px; height: 44px; flex-basis: 44px; }
  .vps-preset-desc { min-height: 0; }
}


/* ========== PROMO BAR ========== */
.promo-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  min-height: 42px;
  padding: 7px 48px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(240, 180, 41, 0.2);
  background:
    radial-gradient(circle at 18% 50%, rgba(240, 180, 41, 0.16), transparent 34%),
    radial-gradient(circle at 82% 50%, rgba(239, 68, 68, 0.12), transparent 34%),
    linear-gradient(90deg, rgba(240, 180, 41, 0.06), rgba(239, 68, 68, 0.045));
  z-index: 90;
}
.promo-bar.is-hidden { display: none; }
.promo-bar-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 2px;
  color: #fbbf24;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 1.1px;
}
.promo-bar-label .material-icons-round { font-size: 14px; color: #f97316; }
.promo-bar-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.1px;
}
.promo-countdown { display: inline-flex; align-items: center; gap: 3px; }
.promo-cd-unit {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  min-width: 28px;
  justify-content: center;
  padding: 2px 4px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(240, 180, 41, 0.26);
}
.promo-cd-unit b {
  font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.2;
  color: #fff;
  letter-spacing: -0.2px;
}
.promo-cd-unit small {
  font-size: 7.5px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.3px;
}
.promo-cd-sep { color: rgba(240, 180, 41, 0.55); font-size: 11px; font-weight: 700; }
.promo-bar-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 2px;
  color: #fbbf24;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  text-decoration: none;
  border-bottom: 1px solid rgba(251, 191, 36, 0.4);
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}
.promo-bar-cta .material-icons-round { font-size: 13px; }
.promo-bar-cta:hover { color: #fff; border-color: #fff; }
.promo-bar-close {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}
.promo-bar-close:hover { color: var(--text-primary); border-color: var(--border-light); background: rgba(255,255,255,0.04); }
.promo-bar-close .material-icons-round { font-size: 16px; }

.nav-badge-referral {
  background: linear-gradient(135deg, #f59e0b, #ef4444) !important;
  color: #fff !important;
  letter-spacing: 0.2px;
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.18);
}
.nav-item.nav-referral .material-icons-round { color: var(--gold); }
.nav-item.nav-referral.active .material-icons-round { color: var(--accent); }
.nav-badge-ai {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6) !important;
  color: #fff !important;
  font-size: 8px !important;
  letter-spacing: 0.5px;
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.18);
}
.nav-item.nav-ai .material-icons-round { color: #60a5fa; }
.nav-item.nav-ai.active .material-icons-round { color: var(--accent); }

/* ========== DASHBOARD REFERRAL ========== */
.dash-referral {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
  gap: 0;
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid rgba(240, 180, 41, 0.22);
  background:
    radial-gradient(circle at 8% 25%, rgba(240, 180, 41, 0.15), transparent 35%),
    radial-gradient(circle at 92% 90%, rgba(59, 130, 246, 0.14), transparent 36%),
    var(--bg-surface);
}
.dash-referral::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
  background-image:
    linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(90deg, #000, transparent 78%);
  -webkit-mask-image: linear-gradient(90deg, #000, transparent 78%);
}
.dash-referral-main {
  position: relative;
  z-index: 1;
  min-width: 0;
  padding: 21px 24px 20px;
}
.dash-referral-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}
.dash-referral-spark { font-size: 14px; }
.dash-referral h3 {
  margin: 8px 0 5px;
  font-size: 23px;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.75px;
  color: var(--text-primary);
}
.dash-referral h3 span { color: var(--gold); }
.dash-referral p {
  max-width: 610px;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--text-secondary);
}
.dash-referral-link {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 4px 4px 4px 10px;
  border: 1px solid var(--border-light);
  background: rgba(0, 0, 0, 0.26);
}
.dash-referral-link > .material-icons-round { font-size: 15px; color: var(--text-muted); flex: 0 0 auto; }
.dash-referral-link input {
  flex: 1;
  min-width: 0;
  padding: 6px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 9.5px;
}
.dash-referral-copy {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  height: 28px;
  padding: 0 9px;
  border: 1px solid var(--border-light);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.dash-referral-copy:hover { color: var(--gold); border-color: var(--gold); background: rgba(240,180,41,0.08); }
.dash-referral-copy .material-icons-round { font-size: 13px; }
.dash-referral-side {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: 18px 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.055);
  background: rgba(0, 0, 0, 0.16);
}
.dash-referral-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: rgba(255,255,255,0.055); }
.dash-referral-stats > div { padding: 8px 7px; background: var(--bg-surface); }
.dash-referral-stats b {
  display: block;
  font-size: 15px;
  line-height: 1.1;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-referral-stats span {
  display: block;
  margin-top: 3px;
  font-size: 7.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-muted);
  white-space: nowrap;
}
.dash-referral-open { width: 100%; height: 34px; font-size: 9px; letter-spacing: 0.7px; margin: 0; }
.dash-referral-open .material-icons-round { font-size: 14px; }

/* ========== REFERRAL PAGE ========== */
.ref-page { max-width: 1280px; margin: 0 auto; }
.ref-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 9px 12px;
  border: 1px solid rgba(240, 180, 41, 0.28);
  background: rgba(240, 180, 41, 0.07);
  color: var(--gold);
  font-size: 10.5px;
}
.ref-notice .material-icons-round { font-size: 16px; }
.ref-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(290px, 0.5fr);
  overflow: hidden;
  border: 1px solid rgba(240, 180, 41, 0.23);
  background:
    radial-gradient(circle at 14% 12%, rgba(240, 180, 41, 0.15), transparent 34%),
    radial-gradient(circle at 88% 90%, rgba(59, 130, 246, 0.16), transparent 36%),
    var(--bg-surface);
}
.ref-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 260px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
}
.ref-hero-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(90deg, #000, transparent 78%);
  -webkit-mask-image: linear-gradient(90deg, #000, transparent 78%);
}
.ref-hero-main { position: relative; z-index: 1; min-width: 0; padding: 30px 32px 28px; }
.ref-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--gold);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.ref-kicker-dot {
  width: 6px;
  height: 6px;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(240, 180, 41, 0.45);
  animation: refPulse 2.4s ease-out infinite;
}
@keyframes refPulse {
  0% { box-shadow: 0 0 0 0 rgba(240, 180, 41, 0.45); }
  70% { box-shadow: 0 0 0 7px rgba(240, 180, 41, 0); }
  100% { box-shadow: 0 0 0 0 rgba(240, 180, 41, 0); }
}
.ref-title {
  margin: 14px 0 8px;
  font-size: clamp(28px, 3.2vw, 43px);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -1.5px;
  color: var(--text-primary);
}
.ref-title span { color: var(--gold); }
.ref-sub {
  max-width: 650px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text-secondary);
}
.ref-link-box {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 20px;
  padding: 5px 5px 5px 12px;
  border: 1px solid var(--border-light);
  background: rgba(0, 0, 0, 0.26);
}
.ref-link-box > .material-icons-round { font-size: 17px; color: var(--text-muted); flex: 0 0 auto; }
.ref-link-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 10.5px;
  padding: 7px 0;
}
.ref-copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(240, 180, 41, 0.55);
  background: rgba(240, 180, 41, 0.12);
  color: var(--gold);
  font-family: inherit;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.ref-copy:hover { background: var(--gold); color: #111; }
.ref-copy .material-icons-round { font-size: 15px; }
.ref-share-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.ref-share {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 33px;
  padding: 0 12px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 9.5px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.ref-share:hover { color: var(--text-primary); border-color: var(--border-light); }
.ref-share.whatsapp { color: #4ade80; border-color: rgba(37, 211, 102, 0.28); background: rgba(37, 211, 102, 0.06); }
.ref-share.whatsapp:hover { border-color: #25d366; color: #25d366; }
.ref-share .material-icons-round { font-size: 15px; }
.ref-code-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 13px;
  font-size: 9.5px;
  color: var(--text-muted);
}
.ref-code-line b {
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  letter-spacing: 0.4px;
}
.ref-hero-side {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 26px 26px;
  border-left: 1px solid rgba(255,255,255,0.06);
  background: rgba(0, 0, 0, 0.17);
}
.ref-reward-label {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.ref-reward-value {
  margin-top: 6px;
  font-size: 48px;
  line-height: 0.95;
  font-weight: 800;
  letter-spacing: -2px;
  color: var(--gold);
}
.ref-reward-note { margin-top: 7px; font-size: 10px; color: var(--text-secondary); }
.ref-reward-rule { height: 1px; margin: 17px 0 9px; background: var(--border); }
.ref-reward-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 9.5px;
  color: var(--text-muted);
}
.ref-reward-stat b { color: var(--text-primary); font-size: 10.5px; text-align: right; }
.ref-payout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 36px;
  margin-top: 15px;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: #111;
  font-family: inherit;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  cursor: pointer;
  transition: filter 0.15s;
}
.ref-payout-btn:hover:not(:disabled) { filter: brightness(1.1); }
.ref-payout-btn:disabled { background: transparent; border-color: var(--border); color: var(--text-muted); cursor: default; }
.ref-payout-btn .material-icons-round { font-size: 15px; }

.ref-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0 20px; }
.ref-stat {
  position: relative;
  padding: 14px 15px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  overflow: hidden;
}
.ref-stat::before { content: ''; position: absolute; top: 0; left: 0; width: 32px; height: 2px; background: var(--gold); opacity: 0.65; }
.ref-stat-top { display: flex; align-items: center; gap: 6px; font-size: 8.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); }
.ref-stat-top .material-icons-round { font-size: 14px; color: var(--gold); }
.ref-stat-value { margin-top: 8px; font-size: 25px; line-height: 1; font-weight: 800; letter-spacing: -0.7px; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ref-stat-meta { margin-top: 5px; font-size: 9px; line-height: 1.45; color: var(--text-muted); }

.ref-main-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.75fr); gap: 20px; align-items: start; }
.ref-card { background: var(--bg-surface); }
.ref-card-head { padding: 14px 18px; }
.ref-card-head h3 { letter-spacing: 0.8px; }
.ref-card-sub { margin-top: 3px; font-size: 10px; color: var(--text-muted); }
.ref-card-body { padding: 16px 18px 18px; }
.ref-count { min-width: 24px; padding: 2px 6px; border: 1px solid var(--border-light); background: var(--bg-input); color: var(--text-secondary); font-size: 10px; font-weight: 700; text-align: center; }

.ref-table-wrap { overflow-x: auto; }
.ref-table { width: 100%; border-collapse: collapse; min-width: 540px; }
.ref-table th {
  padding: 8px 8px;
  border-bottom: 1px solid var(--border);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  text-align: left;
  color: var(--text-muted);
}
.ref-table td { padding: 10px 8px; border-bottom: 1px solid var(--border); font-size: 10.5px; color: var(--text-secondary); vertical-align: middle; }
.ref-table tr:last-child td { border-bottom: none; }
.ref-person { display: flex; align-items: center; gap: 9px; }
.ref-person-avatar {
  width: 29px; height: 29px; flex: 0 0 29px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(240, 180, 41, 0.09);
  border: 1px solid rgba(240, 180, 41, 0.2);
  color: var(--gold);
  font-size: 15px;
}
.ref-person b { display: block; font-size: 10.5px; font-weight: 600; color: var(--text-primary); }
.ref-person span { display: block; margin-top: 1px; font-size: 8.5px; color: var(--text-muted); }
.ref-date { font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 8.5px; color: var(--text-muted); }
.ref-reward { color: var(--gold); font-weight: 700; white-space: nowrap; }

.ref-empty { padding: 30px 16px; text-align: center; border: 1px dashed var(--border); background: rgba(255,255,255,0.012); }
.ref-empty-icon { width: 46px; height: 46px; margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; background: rgba(240,180,41,0.08); border: 1px solid rgba(240,180,41,0.2); color: var(--gold); }
.ref-empty-icon .material-icons-round { font-size: 22px; }
.ref-empty b { display: block; font-size: 12px; color: var(--text-secondary); }
.ref-empty p { max-width: 340px; margin: 5px auto 14px; font-size: 10px; line-height: 1.5; color: var(--text-muted); }
.ref-empty-copy { width: auto; height: 34px; padding: 0 13px; font-size: 9px; gap: 5px; }
.ref-empty-copy .material-icons-round { font-size: 14px; }

.ref-step { display: flex; align-items: flex-start; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.ref-step:last-of-type { border-bottom: none; }
.ref-step-num { flex: 0 0 27px; width: 27px; height: 27px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(240,180,41,0.28); background: rgba(240,180,41,0.07); color: var(--gold); font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 9px; font-weight: 700; }
.ref-step b { display: block; font-size: 10.5px; color: var(--text-primary); }
.ref-step span { display: block; margin-top: 2px; font-size: 9px; line-height: 1.5; color: var(--text-muted); }
.ref-terms { display: flex; align-items: flex-start; gap: 8px; margin-top: 13px; padding: 10px; border: 1px solid var(--border); background: var(--bg-input); }
.ref-terms .material-icons-round { font-size: 15px; color: var(--green); flex: 0 0 auto; }
.ref-terms p { font-size: 8.7px; line-height: 1.5; color: var(--text-muted); }

@media (max-width: 1050px) {
  .ref-hero { grid-template-columns: 1fr; }
  .ref-hero-side { border-left: none; border-top: 1px solid rgba(255,255,255,0.06); }
  .ref-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ref-main-grid { grid-template-columns: 1fr; }
  .dash-referral { grid-template-columns: 1fr; }
  .dash-referral-side { border-left: none; border-top: 1px solid rgba(255,255,255,0.055); flex-direction: row; align-items: center; justify-content: space-between; }
  .dash-referral-stats { flex: 1; }
  .dash-referral-open { width: auto; min-width: 160px; padding: 0 14px; }
}
@media (max-width: 768px) {
  .promo-bar { justify-content: flex-start; padding: 7px 38px 7px 12px; gap: 5px 8px; }
  .promo-bar-text { display: none; }
  .promo-bar-cta { margin-left: 0; }
  .promo-bar-label { font-size: 8.5px; }
  .promo-cd-unit { min-width: 24px; padding: 1px 3px; }
  .ref-hero-main { padding: 22px 18px 20px; }
  .ref-hero-side { padding: 18px; }
  .ref-reward-value { font-size: 40px; }
  .ref-link-box { flex-wrap: wrap; padding: 6px; }
  .ref-link-box > .material-icons-round { margin-left: 5px; }
  .ref-link-box input { flex: 1 1 calc(100% - 40px); }
  .ref-copy { width: 100%; justify-content: center; }
  .ref-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ref-stat-value { font-size: 21px; }
  .dash-referral-main { padding: 18px; }
  .dash-referral h3 { font-size: 21px; }
  .dash-referral-side { flex-direction: column; align-items: stretch; padding: 14px 18px; }
  .dash-referral-open { width: 100%; }
  .dash-referral-link { flex-wrap: wrap; }
  .dash-referral-link input { flex: 1 1 100%; }
  .dash-referral-copy { width: 100%; justify-content: center; }
}
@media (max-width: 480px) {
  .promo-countdown { display: none; }
  .promo-bar-cta { margin-left: auto; }
  .ref-stats { grid-template-columns: 1fr; }
}

/* ========== AI SITE BUILDER ========== */
.ai-page { max-width: 1320px; margin: 0 auto; }
.ai-page.is-focus .ai-hero { display: none; }
.ai-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.45fr);
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid rgba(96, 165, 250, 0.22);
  background:
    radial-gradient(circle at 12% 10%, rgba(59, 130, 246, 0.18), transparent 34%),
    radial-gradient(circle at 88% 90%, rgba(139, 92, 246, 0.16), transparent 38%),
    var(--bg-surface);
}
.ai-hero::before {
  content: '';
  position: absolute; top: 0; left: 0; width: 280px; height: 2px;
  background: linear-gradient(90deg, #60a5fa, transparent);
}
.ai-hero-grid {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.45;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(90deg, #000, transparent 78%);
  -webkit-mask-image: linear-gradient(90deg, #000, transparent 78%);
}
.ai-hero-copy { position: relative; z-index: 1; padding: 28px 30px 25px; min-width: 0; }
.ai-kicker {
  display: flex; align-items: center; gap: 7px;
  font-size: 9px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase;
  color: #60a5fa;
}
.ai-kicker-dot {
  width: 6px; height: 6px; background: #60a5fa;
  box-shadow: 0 0 0 0 rgba(96,165,250,0.45);
  animation: aiPulse 2.4s ease-out infinite;
}
@keyframes aiPulse {
  0% { box-shadow: 0 0 0 0 rgba(96,165,250,0.45); }
  70% { box-shadow: 0 0 0 7px rgba(96,165,250,0); }
  100% { box-shadow: 0 0 0 0 rgba(96,165,250,0); }
}
.ai-hero h2 {
  margin: 12px 0 8px;
  font-size: clamp(29px, 3.1vw, 43px);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -1.5px;
  color: var(--text-primary);
}
.ai-hero h2 span { color: #60a5fa; }
.ai-hero p { max-width: 690px; font-size: 12.5px; line-height: 1.65; color: var(--text-secondary); }
.ai-hero-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 15px; }
.ai-hero-tags > span {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 7px; border: 1px solid var(--border);
  background: rgba(0,0,0,0.14);
  color: var(--text-muted);
  font-size: 8.5px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase;
}
.ai-hero-tags .material-icons-round { font-size: 12px; color: #60a5fa; }
.ai-hero-side {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; justify-content: center;
  padding: 24px 26px;
  border-left: 1px solid rgba(255,255,255,0.06);
  background: rgba(0, 0, 0, 0.16);
}
.ai-hero-side-label { margin-top: 14px; font-size: 8px; font-weight: 800; letter-spacing: 1.3px; text-transform: uppercase; color: var(--text-muted); }
.ai-hero-side-value { margin-top: 3px; font-size: 21px; font-weight: 800; letter-spacing: -0.6px; color: var(--text-primary); }
.ai-hero-side-note { margin-top: 3px; font-size: 9.5px; color: var(--text-muted); }
.ai-orb {
  width: 54px; height: 54px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(96,165,250,0.4);
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.2), transparent 36%),
    linear-gradient(135deg, rgba(59,130,246,0.35), rgba(139,92,246,0.22));
  color: #93c5fd;
  box-shadow: 0 0 30px rgba(59,130,246,0.16);
}
.ai-orb .material-icons-round { font-size: 25px; }
.ai-orb-small { width: 42px; height: 42px; flex: 0 0 42px; }
.ai-orb-small .material-icons-round { font-size: 20px; }
.ai-hero-meter { display: flex; gap: 3px; margin-top: 14px; }
.ai-hero-meter span { height: 3px; flex: 1; background: rgba(96,165,250,0.18); }
.ai-hero-meter span:nth-child(1) { background: #60a5fa; }
.ai-hero-meter span:nth-child(2) { background: rgba(96,165,250,0.7); }
.ai-hero-meter span:nth-child(3) { background: rgba(96,165,250,0.4); }

.ai-landing { display: flex; flex-direction: column; gap: 16px; }
.ai-create-card, .ai-side-card, .ai-sites-section {
  border: 1px solid var(--border);
  background: var(--bg-surface);
}
.ai-create-card { padding: 20px 22px 18px; }
.ai-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.ai-card-kicker { font-size: 8.5px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-muted); }
.ai-card-head h3, .ai-section-head h3 { margin-top: 4px; font-size: 19px; letter-spacing: -0.5px; color: var(--text-primary); }
.ai-beta { padding: 3px 7px; border: 1px solid rgba(96,165,250,0.35); background: rgba(59,130,246,0.1); color: #60a5fa; font-size: 8px; font-weight: 800; letter-spacing: 1px; }
.ai-form { display: flex; flex-direction: column; gap: 12px; }
.ai-form-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 12px; }
.ai-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ai-field label { font-size: 9.5px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.6px; }
.ai-field .form-input { border-radius: 0; font-size: 12px; padding: 10px 12px; }
.ai-field textarea.form-input { min-height: 110px; resize: vertical; line-height: 1.55; }
.ai-field-hint { font-size: 8.5px; color: var(--text-muted); text-align: right; }
.ai-form-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.ai-field-inline { width: 170px; flex: 0 0 170px; }
.ai-generate-btn { height: 40px; padding: 0 18px; font-size: 10px; letter-spacing: 0.7px; gap: 7px; white-space: nowrap; }
.ai-generate-btn .material-icons-round { font-size: 17px; }
.ai-idea-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--border); }
.ai-idea-row > span { font-size: 8.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.7px; font-weight: 700; }
.ai-idea-row button {
  padding: 4px 8px; border: 1px solid var(--border); background: var(--bg-input);
  color: var(--text-secondary); font-family: inherit; font-size: 9px; cursor: pointer;
}
.ai-idea-row button:hover { color: #60a5fa; border-color: rgba(96,165,250,0.45); }
.ai-beta-note { margin-top: 9px; font-size: 8.5px; color: var(--text-muted); }

.ai-landing-grid { display: grid; grid-template-columns: 1.35fr 0.65fr; gap: 16px; }
.ai-side-card { padding: 16px 18px; }
.ai-side-card-head { display: flex; align-items: center; gap: 7px; font-size: 9px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 12px; }
.ai-side-card-head .material-icons-round { font-size: 15px; color: #60a5fa; }
.ai-mini-step { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.ai-mini-step:last-child { border-bottom: none; padding-bottom: 0; }
.ai-mini-step > b { flex: 0 0 24px; height: 24px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(96,165,250,0.25); background: rgba(59,130,246,0.07); color: #60a5fa; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 8.5px; }
.ai-mini-step strong { display: block; font-size: 10.5px; color: var(--text-primary); }
.ai-mini-step span { display: block; margin-top: 2px; font-size: 9px; color: var(--text-muted); }
.ai-side-stats { display: flex; flex-direction: column; justify-content: center; }
.ai-side-big { font-size: 40px; line-height: 1; font-weight: 800; letter-spacing: -1.4px; color: #60a5fa; }
.ai-side-muted { margin-top: 4px; font-size: 9.5px; color: var(--text-secondary); }
.ai-side-muted-small { margin-top: 9px; font-size: 9px; line-height: 1.5; color: var(--text-muted); }

.ai-section-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.ai-section-head p { margin-top: 3px; font-size: 10px; color: var(--text-muted); }
.ai-site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; padding: 16px 18px 18px; }
.ai-site-card { display: flex; flex-direction: column; border: 1px solid var(--border); background: var(--bg-input); overflow: hidden; }
.ai-site-card:hover { border-color: rgba(96,165,250,0.45); }
.ai-site-thumb { position: relative; height: 78px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(139,92,246,0.08)); }
.ai-site-thumb .material-icons-round { font-size: 30px; color: rgba(147,197,253,0.7); z-index: 1; }
.ai-site-thumb-glow { position: absolute; width: 120px; height: 120px; border-radius: 50%; background: rgba(96,165,250,0.18); filter: blur(32px); }
.ai-site-body { padding: 12px 13px; }
.ai-site-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ai-site-top h4 { font-size: 12px; color: var(--text-primary); }
.ai-site-url { margin-top: 3px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 8.5px; color: #60a5fa; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-site-date { margin-top: 3px; font-size: 8.5px; color: var(--text-muted); }
.ai-site-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.ai-small-btn { height: 28px; padding: 0 8px; font-size: 8px; letter-spacing: 0.4px; gap: 4px; text-decoration: none; }
.ai-small-btn .material-icons-round { font-size: 13px; }
.ai-public-btn { color: var(--green); border-color: rgba(34,197,94,0.3); }

/* Working view */
.ai-working { display: grid; grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr); border: 1px solid var(--border); background: var(--bg-surface); min-height: 530px; }
.ai-work-main { padding: 20px 22px; border-right: 1px solid var(--border); min-width: 0; }
.ai-work-top { display: flex; align-items: center; gap: 11px; }
.ai-work-top h3 { margin-top: 2px; font-size: 18px; letter-spacing: -0.5px; }
.ai-cancel { margin-left: auto; border: 1px solid var(--border); background: transparent; color: var(--text-muted); font-family: inherit; font-size: 9px; font-weight: 700; padding: 6px 9px; cursor: pointer; }
.ai-cancel:hover { color: var(--red); border-color: rgba(239,68,68,0.4); }
.ai-status-line { margin-top: 18px; min-height: 18px; font-size: 10.5px; color: var(--text-secondary); }
.ai-progress { height: 4px; margin-top: 9px; background: var(--bg-input); overflow: hidden; }
.ai-progress span { display: block; height: 100%; background: linear-gradient(90deg, #3b82f6, #a78bfa); transition: width 0.35s ease; }
.ai-live-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 7px; font-size: 8.5px; color: var(--text-muted); }
.ai-live-meta span { display: inline-flex; align-items: center; gap: 4px; }
.ai-live-meta .material-icons-round { font-size: 12px; }
.ai-live-meta b { color: var(--text-secondary); }
.ai-code-window { margin-top: 17px; border: 1px solid var(--border); background: #08080c; overflow: hidden; }
.ai-code-head { display: flex; align-items: center; gap: 5px; padding: 8px 10px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,0.02); }
.ai-code-head span { width: 6px; height: 6px; border-radius: 50%; background: var(--border-light); }
.ai-code-head span:nth-child(1) { background: #ef4444; }
.ai-code-head span:nth-child(2) { background: var(--gold); }
.ai-code-head span:nth-child(3) { background: var(--green); }
.ai-code-head em { margin-left: 6px; font-style: normal; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 8px; color: var(--text-muted); }
.ai-code-window pre { height: 240px; overflow: auto; padding: 11px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 8px; line-height: 1.55; color: #93c5fd; white-space: pre-wrap; word-break: break-word; scrollbar-width: thin; }
.ai-work-tip { display: flex; align-items: center; gap: 5px; margin-top: 11px; font-size: 8.5px; color: var(--text-muted); }
.ai-work-tip .material-icons-round { font-size: 13px; }
.ai-work-preview { min-width: 0; display: flex; flex-direction: column; background: rgba(0,0,0,0.14); }
.ai-browser-bar { height: 34px; display: flex; align-items: center; gap: 9px; padding: 0 12px; border-bottom: 1px solid var(--border); background: var(--bg-elevated); }
.ai-browser-dots { display: flex; gap: 4px; }
.ai-browser-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--border-light); }
.ai-browser-dots i:nth-child(1) { background: #ef4444; }
.ai-browser-dots i:nth-child(2) { background: var(--gold); }
.ai-browser-dots i:nth-child(3) { background: var(--green); }
.ai-browser-bar > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 8px; color: var(--text-muted); }
.ai-browser-bar > .material-icons-round { font-size: 13px; color: var(--text-muted); }
.ai-browser-open { color: var(--text-muted); display: flex; }
.ai-browser-open:hover { color: #60a5fa; }
.ai-browser-open .material-icons-round { font-size: 14px; }
.ai-preview-frame-wrap { position: relative; flex: 1; min-height: 0; background: #fff; }
.ai-preview-frame-wrap iframe { width: 100%; height: 100%; min-height: 480px; border: 0; background: #fff; }
.ai-preview-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #0b0b11; color: var(--text-muted); text-align: center; padding: 20px; }
.ai-preview-empty.is-hidden { display: none; }
.ai-preview-empty b { margin-top: 15px; font-size: 11px; color: var(--text-secondary); }
.ai-preview-empty p { max-width: 250px; margin-top: 4px; font-size: 9px; line-height: 1.5; }
.ai-preview-skeleton { width: 170px; display: flex; flex-direction: column; gap: 6px; }
.ai-preview-skeleton span { display: block; height: 8px; background: linear-gradient(90deg, var(--border), var(--border-light), var(--border)); background-size: 200% 100%; animation: aiShimmer 1.5s linear infinite; }
.ai-preview-skeleton span:nth-child(1) { width: 100%; height: 38px; }
.ai-preview-skeleton span:nth-child(2) { width: 80%; }
.ai-preview-skeleton span:nth-child(3) { width: 55%; }
@keyframes aiShimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Studio */
.ai-studio-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 14px 17px; border: 1px solid var(--border); border-bottom: none; background: var(--bg-surface); }
.ai-studio-title { display: flex; align-items: center; gap: 11px; min-width: 0; }
.ai-studio-title h3 { margin-top: 2px; font-size: 18px; letter-spacing: -0.5px; }
.ai-studio-sub { margin-top: 2px; font-size: 9px; color: var(--text-muted); }
.ai-studio-sub a { color: #60a5fa; text-decoration: none; display: inline-flex; align-items: center; gap: 3px; }
.ai-studio-sub .material-icons-round { font-size: 12px; }
.ai-studio-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.ai-studio-actions .btn-primary, .ai-app-deploy-actions .btn-primary { width: auto; }
.ai-studio-actions .btn { height: 34px; padding: 0 11px; font-size: 9px; letter-spacing: 0.4px; gap: 5px; }
.ai-studio-actions .material-icons-round { font-size: 15px; }
.ai-icon-btn { width: 34px; height: 34px; border: 1px solid var(--border); background: transparent; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ai-icon-btn:hover { color: var(--red); border-color: rgba(239,68,68,0.35); }
.ai-icon-btn .material-icons-round { font-size: 17px; }
.ai-studio-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(290px, 0.4fr); border: 1px solid var(--border); background: var(--bg-surface); min-height: 570px; }
.ai-preview-card { min-width: 0; display: flex; flex-direction: column; border-right: 1px solid var(--border); }
.ai-preview-card .ai-preview-frame-wrap { min-height: 500px; }
.ai-refine-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(5,5,10,0.66); backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.ai-refine-overlay.is-visible { opacity: 1; pointer-events: auto; }
.ai-refine-box { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 24px; border: 1px solid rgba(96,165,250,0.35); background: rgba(12,12,18,0.92); color: var(--text-secondary); font-size: 10px; text-align: center; }
.ai-refine-box b { color: var(--text-primary); font-size: 11px; }
.ai-refine-box span#ai-refine-bytes { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 8.5px; color: var(--text-muted); }
.ai-refine-cancel { margin-top: 6px; padding: 5px 10px; border: 1px solid var(--border-light); background: transparent; color: var(--text-muted); font-family: inherit; font-size: 8.5px; cursor: pointer; }
.ai-refine-cancel:hover { color: var(--red); border-color: rgba(239,68,68,0.4); }
.ai-spinner { width: 20px; height: 20px; border: 2px solid rgba(96,165,250,0.2); border-top-color: #60a5fa; border-radius: 50%; animation: aiSpin 0.8s linear infinite; }
@keyframes aiSpin { to { transform: rotate(360deg); } }

.ai-chat-card { display: flex; flex-direction: column; min-width: 0; background: var(--bg-surface); }
.ai-chat-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.ai-chat-head > div { display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 700; color: var(--text-primary); }
.ai-chat-head .material-icons-round { font-size: 16px; color: #60a5fa; }
.ai-live-pill { display: inline-flex; align-items: center; gap: 4px; font-size: 8px; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase; color: var(--green); }
.ai-live-pill i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); animation: aiPulse 2s ease-out infinite; }
.ai-chat-body { flex: 1; min-height: 230px; max-height: 390px; overflow-y: auto; padding: 13px 14px; display: flex; flex-direction: column; gap: 11px; scrollbar-width: thin; }
.ai-chat-empty { margin: auto; text-align: center; padding: 20px 10px; color: var(--text-muted); }
.ai-chat-empty .material-icons-round { font-size: 27px; color: rgba(96,165,250,0.5); }
.ai-chat-empty b { display: block; margin-top: 8px; font-size: 11px; color: var(--text-secondary); }
.ai-chat-empty p { margin-top: 4px; font-size: 9px; line-height: 1.5; }
.ai-msg { display: flex; gap: 8px; align-items: flex-start; }
.ai-msg.user { flex-direction: row-reverse; }
.ai-msg-avatar { width: 24px; height: 24px; flex: 0 0 24px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); background: var(--bg-input); color: var(--text-muted); font-size: 9px; font-weight: 700; }
.ai-msg.user .ai-msg-avatar { background: var(--accent-dim); color: var(--accent); border-color: rgba(59,130,246,0.3); }
.ai-msg.assistant .ai-msg-avatar { background: rgba(96,165,250,0.08); color: #60a5fa; border-color: rgba(96,165,250,0.22); }
.ai-msg-avatar .material-icons-round { font-size: 14px; }
.ai-msg-body { padding: 8px 10px; border: 1px solid var(--border); background: var(--bg-input); font-size: 9.5px; line-height: 1.55; color: var(--text-secondary); white-space: pre-wrap; word-break: break-word; }
.ai-msg.user .ai-msg-body { background: rgba(59,130,246,0.07); border-color: rgba(59,130,246,0.2); color: var(--text-primary); }
.ai-suggestions { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px 12px 0; }
.ai-suggestions button { border: 1px solid var(--border); background: transparent; color: var(--text-muted); font-family: inherit; font-size: 8px; padding: 3px 6px; cursor: pointer; }
.ai-suggestions button:hover { color: #60a5fa; border-color: rgba(96,165,250,0.35); }
.ai-chat-form { position: relative; display: flex; align-items: flex-end; gap: 6px; padding: 10px 12px 12px; }
.ai-chat-form textarea { flex: 1; min-height: 48px; max-height: 110px; resize: none; border-radius: 0; font-size: 10px; line-height: 1.45; padding: 8px 34px 8px 10px; }
.ai-send-btn { position: absolute; right: 18px; bottom: 17px; width: 27px; height: 27px; border: 1px solid #3b82f6; background: #3b82f6; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ai-send-btn:hover { background: #60a5fa; border-color: #60a5fa; }
.ai-send-btn:disabled { opacity: 0.4; cursor: default; }
.ai-send-btn .material-icons-round { font-size: 15px; }
.ai-studio-foot { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 10px 15px; border: 1px solid var(--border); border-top: none; background: var(--bg-surface); }
.ai-studio-foot span { display: inline-flex; align-items: center; gap: 4px; font-size: 8.5px; color: var(--text-muted); }
.ai-studio-foot .material-icons-round { font-size: 12px; }

/* Publish modal */
.ai-publish-copy p { font-size: 11px; line-height: 1.55; color: var(--text-secondary); }
.ai-domain-input { display: flex; align-items: center; border: 1px solid var(--border); background: var(--bg-input); }
.ai-domain-input input { border: 0; background: transparent; flex: 1; min-width: 0; }
.ai-domain-input span { padding: 0 10px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 9px; color: var(--text-muted); border-left: 1px solid var(--border); white-space: nowrap; }
.ai-publish-note { display: flex; align-items: flex-start; gap: 6px; margin-top: 10px; font-size: 9px; line-height: 1.5; color: var(--text-muted); }
.ai-publish-note .material-icons-round { font-size: 14px; color: #60a5fa; flex: 0 0 auto; }
.ai-publish-error { min-height: 16px; margin-top: 8px; font-size: 9.5px; color: var(--red); }
.ai-delete-copy { display: flex; align-items: flex-start; gap: 10px; }
.ai-delete-copy .material-icons-round { font-size: 23px; color: var(--red); }
.ai-delete-copy b { display: block; font-size: 12px; color: var(--text-primary); }
.ai-delete-copy p { margin-top: 4px; font-size: 10px; line-height: 1.55; color: var(--text-muted); }

@media (max-width: 1100px) {
  .ai-hero { grid-template-columns: 1fr; }
  .ai-hero-side { border-left: none; border-top: 1px solid rgba(255,255,255,0.06); flex-direction: row; align-items: center; gap: 14px; flex-wrap: wrap; }
  .ai-hero-side .ai-hero-meter { margin-top: 0; margin-left: auto; width: 100px; }
  .ai-working { grid-template-columns: 1fr; }
  .ai-work-main { border-right: none; border-bottom: 1px solid var(--border); }
  .ai-studio-grid { grid-template-columns: 1fr; }
  .ai-preview-card { border-right: none; border-bottom: 1px solid var(--border); }
  .ai-chat-body { max-height: 300px; }
}
@media (max-width: 760px) {
  .ai-hero-copy { padding: 22px 18px; }
  .ai-create-card { padding: 16px; }
  .ai-form-grid, .ai-landing-grid { grid-template-columns: 1fr; }
  .ai-form-bottom { flex-direction: column; align-items: stretch; }
  .ai-field-inline { width: 100%; flex: 1 1 auto; }
  .ai-generate-btn { width: 100%; }
  .ai-studio-head { flex-direction: column; align-items: stretch; }
  .ai-studio-actions { justify-content: flex-start; }
  .ai-studio-actions .btn { flex: 1; justify-content: center; }
  .ai-preview-frame-wrap iframe { min-height: 380px; }
  .ai-code-window pre { height: 180px; }
  .ai-site-grid { grid-template-columns: 1fr; }
}

/* AI usage */
.ai-usage-card { border: 1px solid var(--border); background: var(--bg-surface); padding: 18px 20px; }
.ai-usage-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.ai-usage-head h3 { margin-top: 3px; font-size: 17px; letter-spacing: -0.4px; }
.ai-usage-head p { max-width: 650px; margin-top: 4px; font-size: 10px; line-height: 1.55; color: var(--text-muted); }
.ai-usage-today { flex: 0 0 auto; padding: 6px 9px; border: 1px solid rgba(96,165,250,0.25); background: rgba(59,130,246,0.07); font-size: 8.5px; color: var(--text-muted); }
.ai-usage-today b { color: #60a5fa; font-size: 11px; }
.ai-usage-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-top: 14px; border: 1px solid var(--border); background: var(--border); }
.ai-usage-stat { padding: 11px 13px; background: var(--bg-input); }
.ai-usage-stat span { display: block; font-size: 8px; font-weight: 800; letter-spacing: 0.9px; text-transform: uppercase; color: var(--text-muted); }
.ai-usage-stat b { display: block; margin-top: 4px; font-size: 17px; letter-spacing: -0.4px; color: var(--text-primary); }
.ai-usage-stat-main b { color: #60a5fa; }
.ai-usage-table-wrap { overflow-x: auto; margin-top: 14px; }
.ai-usage-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.ai-usage-table th { padding: 7px 7px; border-bottom: 1px solid var(--border); text-align: left; font-size: 8px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-muted); }
.ai-usage-table td { padding: 8px 7px; border-bottom: 1px solid var(--border); font-size: 9.5px; color: var(--text-secondary); }
.ai-usage-table tr:last-child td { border-bottom: none; }
.ai-usage-mode { display: inline-block; padding: 2px 5px; border: 1px solid var(--border); background: var(--bg-input); color: var(--text-muted); font-size: 8px; text-transform: uppercase; letter-spacing: 0.4px; }
.ai-usage-total { color: #60a5fa !important; font-weight: 700; }
.ai-usage-empty { margin-top: 12px; padding: 14px; border: 1px dashed var(--border); text-align: center; font-size: 9.5px; color: var(--text-muted); }
.ai-msg-usage { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 9px; margin-top: 7px; padding-top: 6px; border-top: 1px solid var(--border); font-size: 8px; color: var(--text-muted); }
.ai-msg-usage span { white-space: nowrap; }
.ai-msg-usage b { margin-left: auto; color: #60a5fa; font-size: 8.5px; white-space: nowrap; }
@media (max-width: 760px) {
  .ai-usage-head { flex-direction: column; }
  .ai-usage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ai-usage-today { width: 100%; text-align: center; }
}
.ai-hero-usage { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; padding-top: 9px; border-top: 1px solid rgba(255,255,255,0.06); }
.ai-hero-usage span { font-size: 8px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-muted); }
.ai-hero-usage b { font-size: 9.5px; color: #60a5fa; white-space: nowrap; }
.ai-usage-mode.is-error { color: var(--red); border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.06); }
.ai-quota-card { margin-top: 12px; padding: 11px 13px; border: 1px solid rgba(96,165,250,0.22); background: rgba(59,130,246,0.04); }
.ai-quota-card.is-blocked { border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.04); }
.ai-quota-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.ai-quota-head span { display: block; font-size: 8px; font-weight: 800; letter-spacing: 0.7px; text-transform: uppercase; color: var(--text-muted); }
.ai-quota-head b { display: block; margin-top: 3px; font-size: 17px; letter-spacing: -0.4px; color: #60a5fa; }
.ai-quota-head b em { font-style: normal; font-size: 10px; color: var(--text-muted); }
.ai-quota-percent { font-size: 8.5px; color: var(--text-muted); white-space: nowrap; }
.ai-quota-bar { height: 4px; margin-top: 8px; background: var(--bg-input); overflow: hidden; }
.ai-quota-bar span { display: block; height: 100%; background: linear-gradient(90deg, #3b82f6, #a78bfa); }
.ai-quota-card.is-blocked .ai-quota-bar span { background: var(--red); }
.ai-quota-card p { margin-top: 7px; font-size: 8.5px; line-height: 1.5; color: var(--text-muted); }
.ai-quota-card .btn { margin-top: 8px; }

/* ========== AI APPS ========== */
.ai-app-vps-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; border: 1px solid rgba(245,158,11,0.28);
  background: rgba(245,158,11,0.05);
}
.ai-app-vps-banner > .material-icons-round { font-size: 24px; color: var(--gold); }
.ai-app-vps-banner > div { flex: 1; min-width: 0; }
.ai-app-vps-banner b { display: block; font-size: 11px; color: var(--text-primary); }
.ai-app-vps-banner p { margin-top: 3px; font-size: 9.5px; line-height: 1.5; color: var(--text-muted); }
.ai-app-thumb { background: linear-gradient(135deg, rgba(96,165,250,0.22), rgba(16,185,129,0.1)); }
.ai-app-version {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  padding: 2px 6px; border: 1px solid rgba(255,255,255,0.16);
  background: rgba(0,0,0,0.3); color: #bfdbfe;
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 8px;
}
.ai-app-work-side { background: rgba(0,0,0,0.14); }
.ai-app-build-preview {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 480px; padding: 28px; text-align: center; background: #0b0b11;
  color: var(--text-muted);
}
.ai-app-build-preview > b { margin-top: 15px; font-size: 11px; color: var(--text-secondary); }
.ai-app-build-preview > p { max-width: 260px; margin-top: 4px; font-size: 9px; line-height: 1.5; }
.ai-app-file-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 18px; }
.ai-app-file-pills span {
  padding: 3px 6px; border: 1px solid rgba(96,165,250,0.22);
  background: rgba(96,165,250,0.06); color: #93c5fd;
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 7.5px;
}
.ai-app-update-banner {
  display: flex; align-items: center; gap: 10px;
  margin: 0; padding: 10px 14px;
  border: 1px solid rgba(96,165,250,0.3); border-top: none;
  background: rgba(59,130,246,0.07);
}
.ai-app-update-banner > .material-icons-round { font-size: 20px; color: #60a5fa; }
.ai-app-update-banner > div { flex: 1; min-width: 0; }
.ai-app-update-banner b { display: block; font-size: 9.5px; color: var(--text-primary); }
.ai-app-update-banner p { margin-top: 2px; font-size: 8.5px; line-height: 1.45; color: var(--text-muted); }
.ai-app-update-banner .btn { flex: 0 0 auto; }
.ai-app-studio-grid {
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
  border: 1px solid var(--border); background: var(--bg-surface); min-height: 620px;
}
.ai-app-code-card { min-width: 0; display: flex; flex-direction: column; border-right: 1px solid var(--border); }
.ai-app-code-head {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px;
  border-bottom: 1px solid var(--border); background: var(--bg-elevated);
}
.ai-app-file-list { flex: 1; display: flex; gap: 5px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
.ai-app-file {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 7px; border: 1px solid var(--border); background: transparent;
  color: var(--text-muted); font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 7.5px; cursor: pointer; white-space: nowrap;
}
.ai-app-file:hover { color: #93c5fd; border-color: rgba(96,165,250,0.35); }
.ai-app-file.active { color: #93c5fd; border-color: rgba(96,165,250,0.45); background: rgba(96,165,250,0.08); }
.ai-app-file .material-icons-round { font-size: 12px; }
.ai-app-file-empty { font-size: 9px; color: var(--text-muted); }
.ai-app-code-meta { flex: 0 0 auto; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 8px; color: var(--text-muted); }
.ai-app-code-window { margin: 11px; flex: 1; display: flex; flex-direction: column; }
.ai-app-code-window pre { height: auto; flex: 1; min-height: 450px; max-height: 620px; }
.ai-app-side { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.ai-app-deploy-card { padding: 13px 14px; border-bottom: 1px solid var(--border); }
.ai-app-side-head { display: flex; align-items: center; gap: 6px; font-size: 9px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); }
.ai-app-side-head .material-icons-round { font-size: 15px; color: #60a5fa; }
.ai-app-deploy-info { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 10px; border: 1px solid var(--border); background: var(--border); }
.ai-app-deploy-info > div { padding: 7px 8px; background: var(--bg-input); min-width: 0; }
.ai-app-deploy-info span { display: block; font-size: 7px; font-weight: 800; letter-spacing: 0.7px; text-transform: uppercase; color: var(--text-muted); }
.ai-app-deploy-info b { display: block; margin-top: 2px; font-size: 9px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-app-deploy-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.ai-app-deploy-actions .btn { height: 30px; padding: 0 9px; font-size: 8px; letter-spacing: 0.3px; gap: 4px; }
.ai-app-deploy-actions .material-icons-round { font-size: 13px; }
.ai-app-deploy-hint { margin-top: 9px; font-size: 8px; line-height: 1.5; color: var(--text-muted); }
.ai-app-chat-card { flex: 1; border: 0; border-top: 0; }
.ai-app-chat-card .ai-chat-body { max-height: none; min-height: 200px; }
.ai-app-overlay {
  position: absolute; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(5,5,10,0.78); backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.ai-app-studio { position: relative; }
.ai-app-overlay.is-visible { opacity: 1; pointer-events: auto; }
.ai-app-overlay-box {
  width: min(720px, 100%); max-height: 80vh; display: flex; flex-direction: column;
  border: 1px solid rgba(96,165,250,0.35); background: rgba(12,12,18,0.97);
  padding: 16px 18px; box-shadow: 0 24px 70px rgba(0,0,0,0.5);
}
.ai-app-overlay-head { display: flex; align-items: center; gap: 11px; }
.ai-app-overlay-head > div { display: flex; flex-direction: column; gap: 3px; }
.ai-app-overlay-head b { font-size: 12px; color: var(--text-primary); }
.ai-app-overlay-head span { font-size: 9px; color: var(--text-muted); }
.ai-app-overlay-log {
  display: none; flex: 1; min-height: 120px; max-height: 46vh; overflow: auto;
  margin-top: 12px; padding: 10px; border: 1px solid var(--border); background: #07070b;
  color: #93c5fd; font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 8px; line-height: 1.55; white-space: pre-wrap; word-break: break-word;
  scrollbar-width: thin;
}
.ai-app-overlay-box .ai-refine-cancel { align-self: flex-end; margin-top: 11px; }
.ai-app-overlay-box .ai-refine-cancel:disabled { opacity: 0.35; cursor: default; }

/* ========== AI CHAT ========== */
.ai-chat-page .ai-chat-shell {
  border: 1px solid var(--border); background: var(--bg-surface);
  display: flex; flex-direction: column; min-height: 640px;
}
.ai-chat-shell-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 15px; border-bottom: 1px solid var(--border);
}
.ai-chat-shell-title { display: flex; align-items: center; gap: 9px; }
.ai-chat-shell-title > .material-icons-round { font-size: 21px; color: #60a5fa; }
.ai-chat-shell-title b { display: block; font-size: 12px; color: var(--text-primary); }
.ai-chat-shell-title span { display: block; margin-top: 1px; font-size: 8.5px; color: var(--text-muted); }
.ai-chat-shell-actions { display: flex; align-items: center; gap: 10px; }
.ai-chat-thread {
  flex: 1; min-height: 420px; max-height: 58vh; overflow-y: auto;
  padding: 18px 18px 10px; display: flex; flex-direction: column; gap: 14px;
  scrollbar-width: thin;
}
.ai-chat-thread .ai-msg-body { max-width: min(760px, 84%); font-size: 10.5px; line-height: 1.65; }
.ai-chat-welcome { margin: auto; max-width: 430px; text-align: center; padding: 30px 16px; }
.ai-chat-welcome .ai-orb { margin: 0 auto; }
.ai-chat-welcome b { display: block; margin-top: 14px; font-size: 14px; color: var(--text-primary); }
.ai-chat-welcome p { margin-top: 6px; font-size: 10px; line-height: 1.6; color: var(--text-muted); }
.ai-chat-suggestions { display: flex; flex-wrap: wrap; gap: 5px; padding: 8px 15px 0; border-top: 1px solid var(--border); }
.ai-chat-suggestions button {
  border: 1px solid var(--border); background: transparent; color: var(--text-muted);
  font-family: inherit; font-size: 8.5px; padding: 4px 8px; cursor: pointer;
}
.ai-chat-suggestions button:hover { color: #60a5fa; border-color: rgba(96,165,250,0.4); }
.ai-chat-shell-form { padding: 10px 15px 14px; }
.ai-chat-shell-form textarea {
  width: 100%; min-height: 64px; max-height: 180px; resize: vertical;
  border-radius: 0; font-size: 11px; line-height: 1.55; padding: 10px 12px;
}
.ai-chat-form-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.ai-chat-form-bottom > span { font-size: 8px; color: var(--text-muted); }
.ai-chat-send { height: 34px; padding: 0 14px; font-size: 9px; gap: 5px; }
.ai-chat-send .material-icons-round { font-size: 15px; }
.ai-chat-send .ai-spinner { width: 13px; height: 13px; border-width: 2px; }
.ai-chat-code {
  margin: 7px 0; padding: 9px 10px; overflow-x: auto;
  border: 1px solid var(--border); background: #07070b;
  color: #bfdbfe; font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 8.5px; line-height: 1.55; white-space: pre; scrollbar-width: thin;
}
.ai-typing { display: inline-flex; gap: 3px; margin-left: 4px; vertical-align: middle; }
.ai-typing i { width: 4px; height: 4px; border-radius: 50%; background: #60a5fa; animation: aiTyping 1.1s ease-in-out infinite; }
.ai-typing i:nth-child(2) { animation-delay: 0.15s; }
.ai-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes aiTyping { 0%, 60%, 100% { opacity: 0.25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-2px); } }

@media (max-width: 1100px) {
  .ai-app-studio-grid { grid-template-columns: 1fr; }
  .ai-app-code-card { border-right: none; border-bottom: 1px solid var(--border); }
  .ai-app-code-window pre { min-height: 320px; }
  .ai-app-chat-card .ai-chat-body { max-height: 280px; }
}
@media (max-width: 760px) {
  .ai-app-vps-banner { flex-wrap: wrap; }
  .ai-app-vps-banner .btn { width: 100%; justify-content: center; }
  .ai-app-studio-grid { min-height: 0; }
  .ai-app-deploy-info { grid-template-columns: 1fr; }
  .ai-app-overlay { padding: 10px; }
  .ai-chat-thread { max-height: 52vh; }
  .ai-chat-thread .ai-msg-body { max-width: 88%; }
}

/* ========== AI CHAT WORKSPACE ========== */
.ai-chat-page { max-width: 1480px; }
.ai-chat-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 15px; margin-bottom: 12px;
  border: 1px solid rgba(96,165,250,0.22);
  background:
    radial-gradient(circle at 8% 20%, rgba(59,130,246,0.14), transparent 32%),
    var(--bg-surface);
}
.ai-chat-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ai-chat-brand b { display: block; font-size: 14px; letter-spacing: -0.3px; color: var(--text-primary); }
.ai-chat-brand span { display: block; margin-top: 1px; font-size: 9px; color: var(--text-muted); }
.ai-chat-topmeta { display: flex; align-items: center; gap: 12px; }
.ai-chat-usage-mini { text-align: right; }
.ai-chat-usage-mini span { display: block; font-size: 7.5px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-muted); }
.ai-chat-usage-mini b { display: block; font-size: 11px; color: #60a5fa; white-space: nowrap; }
.ai-chat-new-btn { height: 34px; padding: 0 12px; font-size: 9px; gap: 5px; white-space: nowrap; }
.ai-chat-workspace {
  display: grid; grid-template-columns: minmax(250px, 0.32fr) minmax(0, 1fr);
  border: 1px solid var(--border); background: var(--bg-surface);
  min-height: 700px;
}
.ai-thread-sidebar {
  display: flex; flex-direction: column; min-width: 0;
  border-right: 1px solid var(--border); background: rgba(0,0,0,0.10);
}
.ai-thread-sidebar-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 13px 8px; font-size: 9px; font-weight: 800;
  letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted);
}
.ai-thread-search {
  display: flex; align-items: center; gap: 6px; margin: 0 11px 9px;
  padding: 6px 8px; border: 1px solid var(--border); background: var(--bg-input);
}
.ai-thread-search .material-icons-round { font-size: 14px; color: var(--text-muted); }
.ai-thread-search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  color: var(--text-primary); font-family: inherit; font-size: 9.5px;
}
.ai-thread-list { flex: 1; overflow-y: auto; padding: 0 8px 8px; scrollbar-width: thin; }
.ai-thread-item {
  width: 100%; display: flex; flex-direction: column; gap: 3px;
  padding: 9px 9px 8px; margin-bottom: 4px; border: 1px solid transparent;
  background: transparent; text-align: left; font-family: inherit; cursor: pointer;
}
.ai-thread-item:hover { background: rgba(255,255,255,0.03); border-color: var(--border); }
.ai-thread-item.active { background: rgba(59,130,246,0.09); border-color: rgba(96,165,250,0.35); }
.ai-thread-item-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.ai-thread-badge {
  padding: 1px 5px; border: 1px solid var(--border); background: var(--bg-input);
  font-size: 7px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; color: var(--text-muted);
}
.ai-thread-badge.site { color: #93c5fd; border-color: rgba(96,165,250,0.3); background: rgba(96,165,250,0.07); }
.ai-thread-badge.app { color: #6ee7b7; border-color: rgba(16,185,129,0.3); background: rgba(16,185,129,0.07); }
.ai-thread-date { font-size: 7px; color: var(--text-muted); white-space: nowrap; }
.ai-thread-item b { font-size: 10px; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-thread-preview { font-size: 8px; line-height: 1.4; color: var(--text-muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ai-thread-project { font-size: 7.5px; color: #60a5fa; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-thread-empty { padding: 24px 10px; text-align: center; font-size: 9px; line-height: 1.6; color: var(--text-muted); }
.ai-thread-sidebar-foot {
  padding: 10px 12px; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 5px;
  font-size: 7.5px; color: var(--text-muted);
}
.ai-thread-sidebar-foot > span { display: inline-flex; align-items: center; gap: 4px; }
.ai-thread-sidebar-foot .material-icons-round { font-size: 11px; }
.ai-thread-sidebar-foot a { color: #60a5fa; text-decoration: none; font-size: 8px; }
.ai-thread-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.ai-thread-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 11px 15px; border-bottom: 1px solid var(--border); background: var(--bg-surface);
}
.ai-thread-head-copy { min-width: 0; }
.ai-thread-kicker { font-size: 7.5px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: #60a5fa; }
.ai-thread-head-copy b { display: block; margin-top: 2px; font-size: 14px; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-thread-head-copy > span { display: block; margin-top: 2px; font-size: 8.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-thread-head-actions { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.ai-thread-head-actions .ai-icon-btn { width: 30px; height: 30px; }
.ai-thread-head-actions .ai-icon-btn .material-icons-round { font-size: 15px; }
.ai-thread-body {
  flex: 1; min-height: 300px; max-height: 54vh; overflow-y: auto;
  padding: 16px 17px 8px; display: flex; flex-direction: column; gap: 13px;
  scrollbar-width: thin;
}
.ai-thread-body .ai-msg-body { max-width: min(820px, 86%); font-size: 10.5px; line-height: 1.65; }
.ai-thread-welcome { margin: auto; max-width: 480px; text-align: center; padding: 30px 16px; }
.ai-thread-welcome .ai-orb { margin: 0 auto; }
.ai-thread-welcome b { display: block; margin-top: 14px; font-size: 15px; color: var(--text-primary); }
.ai-thread-welcome p { margin-top: 6px; font-size: 10px; line-height: 1.65; color: var(--text-muted); }
.ai-thread-suggestions { display: flex; flex-wrap: wrap; gap: 5px; padding: 7px 16px 0; border-top: 1px solid var(--border); }
.ai-thread-suggestions button {
  border: 1px solid var(--border); background: transparent; color: var(--text-muted);
  font-family: inherit; font-size: 8px; padding: 3px 7px; cursor: pointer;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ai-thread-suggestions button:hover { color: #60a5fa; border-color: rgba(96,165,250,0.4); }
.ai-thread-form { padding: 9px 15px 13px; }
.ai-thread-form textarea {
  width: 100%; min-height: 58px; max-height: 170px; resize: vertical;
  border-radius: 0; font-size: 11px; line-height: 1.55; padding: 9px 11px;
}
.ai-thread-form-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 7px; }
.ai-thread-form-bottom .btn, .ai-chat-form-bottom .btn { width: auto; }
.ai-thread-form-bottom > span { font-size: 8px; color: var(--text-muted); }
.ai-chat-quota-banner {
  display: flex; align-items: center; gap: 10px;
  margin: 10px 15px 0; padding: 9px 11px;
  border: 1px solid rgba(245,158,11,0.28); background: rgba(245,158,11,0.05);
}
.ai-chat-quota-banner > .material-icons-round { font-size: 20px; color: var(--gold); }
.ai-chat-quota-banner > div { flex: 1; min-width: 0; }
.ai-chat-quota-banner b { display: block; font-size: 9.5px; color: var(--text-primary); }
.ai-chat-quota-banner p { margin-top: 2px; font-size: 8.5px; line-height: 1.45; color: var(--text-muted); }
.ai-chat-quota-banner .btn { flex: 0 0 auto; }
@media (max-width: 1100px) {
  .ai-chat-workspace { grid-template-columns: 1fr; }
  .ai-thread-sidebar { border-right: none; border-bottom: 1px solid var(--border); max-height: 300px; }
  .ai-thread-body { max-height: 48vh; }
}
@media (max-width: 760px) {
  .ai-chat-topbar { flex-direction: column; align-items: stretch; }
  .ai-chat-topmeta { justify-content: space-between; }
  .ai-chat-new-btn { flex: 1; justify-content: center; }
  .ai-thread-head { flex-direction: column; align-items: stretch; }
  .ai-thread-head-actions { justify-content: flex-start; }
  .ai-thread-head-actions .btn { flex: 1; justify-content: center; }
  .ai-chat-quota-banner { flex-wrap: wrap; }
  .ai-chat-quota-banner .btn { width: 100%; justify-content: center; }
  .ai-thread-body { max-height: 44vh; }
}

/* ========== GIT PAGE ========== */
.git-page-shell { max-width: none; width: 100%; }
.git-page { display: flex; flex-direction: column; gap: 16px; }
.git-orb {
  border-color: rgba(110, 231, 183, 0.35);
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.18), transparent 36%),
    linear-gradient(135deg, rgba(16,185,129,0.28), rgba(59,130,246,0.22));
  color: #a7f3d0;
  box-shadow: 0 0 30px rgba(16,185,129,0.14);
}

/* Account workspace */
.git-account-card {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  overflow: hidden;
  border: 1px solid var(--border);
  background:
    linear-gradient(135deg, rgba(59,130,246,0.055), transparent 42%),
    var(--bg-surface);
}
.git-account-main { display: flex; align-items: flex-start; gap: 16px; padding: 20px 22px; min-width: 0; }
.git-account-avatar {
  width: 58px; height: 58px; flex: 0 0 58px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(96,165,250,0.35);
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,0.16), transparent 38%),
    linear-gradient(135deg, rgba(59,130,246,0.28), rgba(16,185,129,0.16));
  color: #dbeafe; font-size: 23px; font-weight: 800; letter-spacing: -0.5px;
  box-shadow: 0 0 24px rgba(59,130,246,0.12);
}
.git-account-copy { flex: 1; min-width: 0; }
.git-account-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 8px; font-weight: 800; letter-spacing: 1.1px; text-transform: uppercase;
  color: #6ee7b7;
}
.git-status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(34,197,94,0.12); }
.git-account-copy h3 { margin-top: 5px; font-size: 24px; letter-spacing: -0.8px; color: var(--text-primary); overflow-wrap: anywhere; }
.git-account-copy p { margin-top: 5px; max-width: 620px; font-size: 11px; line-height: 1.6; color: var(--text-muted); }
.git-account-copy p b { color: var(--text-secondary); }
.git-account-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 9px; }
.git-account-facts span { display: inline-flex; align-items: center; gap: 4px; font-size: 8.5px; color: var(--text-muted); }
.git-account-facts .material-icons-round { font-size: 12px; color: rgba(96,165,250,0.75); }
.git-credentials {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px; max-width: 640px; margin-top: 12px;
  border: 1px solid var(--border); background: var(--border);
}
.git-cred {
  display: flex; align-items: center; gap: 6px; min-width: 0;
  padding: 7px 8px; background: var(--bg-input);
}
.git-cred-label {
  display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto;
  font-size: 8px; font-weight: 800; letter-spacing: 0.7px; text-transform: uppercase;
  color: var(--text-muted);
}
.git-cred-label .material-icons-round { font-size: 12px; color: #60a5fa; }
.git-cred-value {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 9.5px;
  color: #93c5fd; user-select: all;
}
.git-cred-btn {
  width: 24px; height: 24px; flex: 0 0 24px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid transparent; background: transparent; color: var(--text-muted);
  cursor: pointer;
}
.git-cred-btn:hover { color: #bfdbfe; border-color: rgba(96,165,250,0.3); background: rgba(59,130,246,0.08); }
.git-cred-btn:disabled { opacity: 0.5; cursor: default; }
.git-cred-btn .material-icons-round { font-size: 13px; }
.git-cred-note {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 5px;
  padding: 5px 8px; background: rgba(0,0,0,0.16);
  font-size: 8px; color: var(--text-muted);
}
.git-cred-note .material-icons-round { font-size: 12px; color: #60a5fa; }
.git-account-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.git-account-actions .btn { width: auto; height: 34px; padding: 0 11px; font-size: 9px; gap: 5px; }
.git-account-actions .material-icons-round { font-size: 15px; }
.git-account-side {
  display: flex; flex-direction: column; justify-content: center;
  padding: 18px 20px;
  border-left: 1px solid var(--border);
  background: rgba(0,0,0,0.16);
}
.git-account-side-head {
  display: flex; align-items: center; gap: 6px;
  font-size: 8px; font-weight: 800; letter-spacing: 1.1px; text-transform: uppercase;
  color: var(--text-muted);
}
.git-account-side-head .material-icons-round { font-size: 14px; color: #60a5fa; }
.git-account-steps { list-style: none; margin-top: 10px; }
.git-account-steps li {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 0; border-bottom: 1px solid var(--border);
  font-size: 10px; color: var(--text-secondary);
}
.git-account-steps li:last-child { border-bottom: none; }
.git-account-steps b {
  flex: 0 0 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(96,165,250,0.22); background: rgba(59,130,246,0.07);
  color: #60a5fa; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 8px;
}
.git-account-steps code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 8.5px; color: #93c5fd; }
.git-guide-btn {
  display: flex; align-items: center; gap: 6px; width: 100%;
  margin-top: 11px; padding: 8px 10px;
  border: 1px solid rgba(96,165,250,0.25); background: rgba(59,130,246,0.06);
  color: #bfdbfe; font-family: inherit; font-size: 9px; font-weight: 700;
  text-align: left; cursor: pointer;
}
.git-guide-btn:hover { border-color: rgba(96,165,250,0.5); background: rgba(59,130,246,0.1); color: #fff; }
.git-guide-btn .material-icons-round { font-size: 14px; }
.git-guide-arrow { margin-left: auto; }

/* Repository section */
.git-repos-section { border: 1px solid var(--border); background: var(--bg-surface); overflow: hidden; }
.git-section-head { align-items: flex-start; gap: 16px; }
.git-section-meta { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.git-section-sync { display: inline-flex; align-items: center; gap: 4px; font-size: 9px; color: var(--text-muted); }
.git-section-sync .material-icons-round { font-size: 12px; color: #60a5fa; }

/* Toolbar */
.git-toolbar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  padding: 11px 16px; border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.12);
}
.git-search { position: relative; flex: 1 1 250px; min-width: 180px; display: flex; align-items: center; }
.git-search > .material-icons-round { position: absolute; left: 10px; font-size: 16px; color: var(--text-muted); pointer-events: none; }
.git-search input {
  width: 100%; height: 34px; padding: 0 34px 0 33px;
  border: 1px solid var(--border); background: var(--bg-input);
  color: var(--text-primary); font-family: inherit; font-size: 11px;
}
.git-search input::-webkit-search-cancel-button { display: none; }
.git-search input::placeholder { color: var(--text-muted); }
.git-search input:focus { outline: none; border-color: rgba(96,165,250,0.55); box-shadow: 0 0 0 2px rgba(59,130,246,0.12); }
.git-search-clear {
  position: absolute; right: 4px; width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border: 0; background: transparent; color: var(--text-muted); cursor: pointer;
}
.git-search-clear[hidden] { display: none; }
.git-search-clear:hover { color: var(--text-primary); }
.git-search-clear .material-icons-round { font-size: 14px; }
.git-filters {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 2px; border: 1px solid var(--border); background: var(--bg-input);
}
.git-filter-btn {
  display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 9px;
  border: 0; background: transparent; color: var(--text-muted);
  font-family: inherit; font-size: 9.5px; font-weight: 700; white-space: nowrap; cursor: pointer;
}
.git-filter-btn b { padding: 1px 4px; background: rgba(255,255,255,0.05); color: var(--text-muted); font-size: 8px; font-weight: 800; }
.git-filter-btn:hover { color: var(--text-secondary); }
.git-filter-btn.is-active { background: rgba(59,130,246,0.12); color: #bfdbfe; }
.git-filter-btn.is-active b { background: rgba(59,130,246,0.2); color: #dbeafe; }
.git-sort { margin-left: auto; display: flex; align-items: center; gap: 5px; }
.git-sort > .material-icons-round { font-size: 15px; color: var(--text-muted); }
.git-sort select {
  width: 170px; height: 32px; min-width: 150px; padding: 0 28px 0 8px;
  border: 1px solid var(--border); background-color: var(--bg-input);
  color: var(--text-secondary); font-family: inherit; font-size: 9px;
}
.git-sort select:focus { outline: none; border-color: rgba(96,165,250,0.45); }
.git-results-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px 0; }
#git-results-count { font-size: 9px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; color: var(--text-muted); }
.git-results-hint { display: inline-flex; align-items: center; gap: 4px; font-size: 8px; color: var(--text-muted); opacity: 0.75; }
.git-results-hint .material-icons-round { font-size: 11px; }

/* Repository cards */
.git-repo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; padding: 12px 16px 17px; }
.git-repo-card {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  padding: 13px 14px 12px; border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.018), transparent 34%), var(--bg-input);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.git-repo-card::before {
  content: ''; position: absolute; top: -1px; left: -1px; right: -1px; height: 2px;
  background: linear-gradient(90deg, rgba(96,165,250,0.7), rgba(16,185,129,0.45), transparent 75%);
  opacity: 0; transition: opacity 0.18s ease;
}
.git-repo-card:hover { border-color: rgba(96,165,250,0.4); transform: translateY(-2px); box-shadow: 0 14px 30px rgba(0,0,0,0.28); }
.git-repo-card:hover::before { opacity: 1; }
.git-repo-top { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.git-repo-icon {
  width: 36px; height: 36px; flex: 0 0 36px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(96,165,250,0.26); background: rgba(59,130,246,0.09); color: #93c5fd;
}
.git-repo-icon.app { border-color: rgba(16,185,129,0.28); background: rgba(16,185,129,0.08); color: #6ee7b7; }
.git-repo-icon.hosting { border-color: rgba(45,212,191,0.28); background: rgba(20,184,166,0.08); color: #5eead4; }
.git-repo-icon .material-icons-round { font-size: 19px; }
.ai-thread-badge.hosting { color: #5eead4; border-color: rgba(45,212,191,0.3); background: rgba(20,184,166,0.07); }
.git-repo-heading { flex: 1; min-width: 0; }
.git-repo-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.git-repo-heading h4 { margin-top: 5px; font-size: 13px; font-weight: 700; letter-spacing: -0.2px; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.git-repo-full { margin-top: 2px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 8.5px; color: #60a5fa; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.git-repo-external { flex: 0 0 26px; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; border: 1px solid transparent; color: var(--text-muted); text-decoration: none; }
.git-repo-external:hover { color: #93c5fd; border-color: rgba(96,165,250,0.3); background: rgba(59,130,246,0.07); }
.git-repo-external .material-icons-round { font-size: 14px; }
.git-repo-meta {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px;
  margin-top: 12px; border: 1px solid var(--border); background: var(--border);
}
.git-repo-meta-item { min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 7px 8px; background: var(--bg-surface); }
.git-repo-meta-label { display: inline-flex; align-items: center; gap: 3px; font-size: 8px; font-weight: 800; letter-spacing: 0.65px; text-transform: uppercase; color: var(--text-muted); }
.git-repo-meta-label .material-icons-round { font-size: 10px; }
.git-branch-pill, .git-commit-pill {
  align-self: flex-start; max-width: 100%; padding: 1px 5px;
  border: 1px solid rgba(96,165,250,0.2); background: rgba(59,130,246,0.06);
  color: #93c5fd; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 9px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.git-commit-pill { border-color: rgba(148,163,184,0.18); background: rgba(148,163,184,0.05); color: var(--text-secondary); cursor: pointer; }
.git-commit-pill:hover { color: #bfdbfe; border-color: rgba(96,165,250,0.4); }
.git-commit-pill.is-copied { color: var(--green); border-color: rgba(34,197,94,0.4); }
.git-sync-value { font-size: 9px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.git-meta-empty { font-size: 8.5px; color: var(--text-muted); font-style: italic; }
.git-repo-domain {
  display: flex; align-items: center; gap: 5px;
  margin-top: 9px; padding: 5px 7px;
  border: 1px solid rgba(34,197,94,0.18); background: rgba(34,197,94,0.04);
  color: #86efac; font-size: 8.5px; text-decoration: none;
}
.git-repo-domain > span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.git-repo-domain .material-icons-round { font-size: 12px; }
.git-repo-domain:hover { border-color: rgba(34,197,94,0.4); background: rgba(34,197,94,0.08); }
.git-repo-domain.is-offline { border-color: var(--border); background: rgba(255,255,255,0.02); color: var(--text-muted); }
.git-repo-error { display: flex; align-items: flex-start; gap: 6px; margin-top: 9px; padding: 7px 8px; border: 1px solid rgba(239,68,68,0.25); background: rgba(239,68,68,0.05); color: var(--red); }
.git-repo-error > .material-icons-round { flex: 0 0 auto; font-size: 14px; }
.git-repo-error div { min-width: 0; }
.git-repo-error b { display: block; font-size: 8.5px; }
.git-repo-error div > span { display: block; max-height: 72px; overflow: auto; scrollbar-width: thin; margin-top: 2px; font-size: 8px; line-height: 1.5; color: rgba(252,165,165,0.85); overflow-wrap: anywhere; }
.git-clone-box { margin-top: 10px; border: 1px solid var(--border); background: #07070b; }
.git-clone-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 5px 8px; border-bottom: 1px solid rgba(255,255,255,0.045);
  font-size: 7.5px; font-weight: 800; letter-spacing: 0.85px; text-transform: uppercase; color: var(--text-muted);
}
.git-clone-head > span:first-child { display: inline-flex; align-items: center; gap: 4px; }
.git-clone-head .material-icons-round { font-size: 11px; color: #60a5fa; }
.git-clone-branch { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 7.5px; color: var(--text-muted); text-transform: none; letter-spacing: 0; }
.git-clone-row { display: flex; align-items: center; gap: 5px; padding: 5px 5px 5px 8px; }
.git-clone-row code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 8.5px; color: #93c5fd; }
.git-copy-btn {
  width: 25px; height: 25px; flex: 0 0 25px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid transparent; background: transparent; color: var(--text-muted); cursor: pointer;
}
.git-copy-btn:hover { color: #bfdbfe; border-color: rgba(96,165,250,0.3); background: rgba(59,130,246,0.08); }
.git-copy-btn .material-icons-round { font-size: 13px; }
.git-copy-btn.is-copied { color: var(--green); border-color: rgba(34,197,94,0.35); background: rgba(34,197,94,0.07); }
.git-repo-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.git-repo-actions .btn { height: 29px; padding: 0 8px; font-size: 8.5px; gap: 4px; }
.git-repo-actions .material-icons-round { font-size: 13px; }
.git-open-btn { color: #bfdbfe; border-color: rgba(96,165,250,0.28); }
.git-open-btn:hover { border-color: rgba(96,165,250,0.5); background: rgba(59,130,246,0.08); }
.git-live-btn { color: var(--green); border-color: rgba(34,197,94,0.28); }
.git-live-btn:hover { border-color: rgba(34,197,94,0.5); background: rgba(34,197,94,0.06); }
.git-ai-btn { margin-left: auto; }
.git-repo-actions .git-ai-label { font-weight: 800; letter-spacing: 0.5px; }
.git-btn-spinner { width: 12px; height: 12px; border: 1.5px solid rgba(96,165,250,0.25); border-top-color: #60a5fa; border-radius: 50%; animation: gitSpin 0.7s linear infinite; }
@keyframes gitSpin { to { transform: rotate(360deg); } }
.git-repo-actions .btn.is-busy { color: #93c5fd; border-color: rgba(96,165,250,0.4); }
.git-section-meta .btn.is-spinning .material-icons-round,
.git-empty .btn.is-spinning .material-icons-round,
.git-load-error .btn.is-spinning .material-icons-round { animation: gitSpin 0.8s linear infinite; }

/* Empty and error states */
.git-empty {
  position: relative; overflow: hidden;
  padding: 28px 26px 24px;
  border: 1px dashed rgba(96,165,250,0.28);
  background:
    radial-gradient(circle at 8% 0%, rgba(59,130,246,0.12), transparent 36%),
    var(--bg-surface);
}
.git-empty-compact { padding: 26px; }
.git-empty-top { display: flex; align-items: flex-start; gap: 16px; }
.git-empty-orb {
  width: 54px; height: 54px; flex: 0 0 54px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(96,165,250,0.3);
  background: linear-gradient(135deg, rgba(59,130,246,0.25), rgba(139,92,246,0.12));
  color: #93c5fd; box-shadow: 0 0 28px rgba(59,130,246,0.14);
}
.git-empty-orb.is-muted { border-color: var(--border-light); background: rgba(255,255,255,0.03); color: var(--text-muted); box-shadow: none; }
.git-empty-orb .material-icons-round { font-size: 26px; }
.git-empty-copy { min-width: 0; }
.git-empty-copy b { display: block; margin-top: 4px; font-size: 16px; letter-spacing: -0.3px; color: var(--text-primary); }
.git-empty-copy p { max-width: 560px; margin-top: 5px; font-size: 10.5px; line-height: 1.6; color: var(--text-muted); }
.git-empty-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 18px; border: 1px solid var(--border); background: var(--border); }
.git-empty-steps > div { display: flex; align-items: center; gap: 8px; padding: 9px 10px; background: var(--bg-input); font-size: 9.5px; color: var(--text-secondary); }
.git-empty-steps b {
  flex: 0 0 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(96,165,250,0.22); background: rgba(59,130,246,0.07);
  color: #60a5fa; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 7.5px;
}
.git-empty-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.git-empty-actions .btn { width: auto; height: 34px; padding: 0 11px; font-size: 9px; gap: 5px; }
.git-empty-actions .material-icons-round { font-size: 15px; }
.git-no-results {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 38px 16px; border: 1px dashed var(--border); background: rgba(0,0,0,0.08);
  text-align: center;
}
.git-no-results > .material-icons-round { font-size: 28px; color: rgba(96,165,250,0.45); }
.git-no-results b { margin-top: 8px; font-size: 12px; color: var(--text-primary); }
.git-no-results p { max-width: 340px; margin-top: 4px; font-size: 9px; line-height: 1.55; color: var(--text-muted); }
.git-no-results .btn { margin-top: 11px; }
.git-load-error {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 44px 20px; text-align: center;
  border: 1px solid rgba(239,68,68,0.25);
  background: radial-gradient(circle at 50% 0%, rgba(239,68,68,0.07), transparent 60%), var(--bg-surface);
}
.git-load-error > .material-icons-round { font-size: 34px; color: rgba(239,68,68,0.65); }
.git-load-error b { margin-top: 10px; font-size: 14px; color: var(--text-primary); }
.git-load-error p { max-width: 420px; margin-top: 5px; font-size: 10px; line-height: 1.55; color: var(--text-muted); }
.git-load-error .btn { width: auto; margin-top: 14px; }

/* Loading skeleton */
.git-loading { display: flex; flex-direction: column; gap: 14px; }
.git-skeleton {
  border: 1px solid var(--border);
  background: linear-gradient(90deg, var(--bg-surface), var(--bg-card), var(--bg-surface));
  background-size: 200% 100%;
  animation: gitShimmer 1.5s linear infinite;
}
.git-skeleton-account { height: 150px; }
.git-skeleton-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.git-skeleton-card { height: 270px; }
@keyframes gitShimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Guide modal */
.git-guide { display: flex; flex-direction: column; gap: 14px; }
.git-guide-intro { font-size: 11px; line-height: 1.6; color: var(--text-secondary); }
.git-guide-intro b { color: var(--text-primary); }
.git-guide-flow { display: flex; flex-direction: column; gap: 1px; border: 1px solid var(--border); background: var(--border); }
.git-guide-step { display: flex; gap: 11px; padding: 11px 12px; background: var(--bg-input); }
.git-guide-num {
  flex: 0 0 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(96,165,250,0.25); background: rgba(59,130,246,0.07);
  color: #60a5fa; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 8.5px;
}
.git-guide-step-body { flex: 1; min-width: 0; }
.git-guide-step-body > b { display: block; font-size: 11px; color: var(--text-primary); }
.git-guide-step-body > p { margin-top: 3px; font-size: 9.5px; line-height: 1.5; color: var(--text-muted); }
.git-guide-step-body > p code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 8.5px; color: #93c5fd; }
.git-guide-code { display: flex; align-items: center; gap: 6px; margin-top: 7px; padding: 4px 4px 4px 8px; border: 1px solid var(--border); background: #07070b; }
.git-guide-code code { flex: 1; min-width: 0; overflow-x: auto; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 8.5px; color: #93c5fd; white-space: nowrap; }
.git-guide-code button { width: 25px; height: 25px; flex: 0 0 25px; display: flex; align-items: center; justify-content: center; border: 0; background: transparent; color: var(--text-muted); cursor: pointer; }
.git-guide-code button:hover { color: #fff; background: rgba(59,130,246,0.12); }
.git-guide-code button.is-copied { color: var(--green); }
.git-guide-code .material-icons-round { font-size: 13px; }
.git-guide-note { display: flex; align-items: flex-start; gap: 7px; padding: 9px 10px; border: 1px solid rgba(96,165,250,0.2); background: rgba(59,130,246,0.05); }
.git-guide-note .material-icons-round { flex: 0 0 auto; font-size: 15px; color: #60a5fa; }
.git-guide-note p { font-size: 9.5px; line-height: 1.55; color: var(--text-muted); }
.git-guide-note b { color: var(--text-secondary); }
.git-guide-cta { width: auto; }

/* Focus */
.git-guide-btn:focus-visible,
.git-cred-btn:focus-visible,
.git-filter-btn:focus-visible,
.git-copy-btn:focus-visible,
.git-repo-external:focus-visible,
.git-commit-pill:focus-visible,
.git-search input:focus-visible,
.git-sort select:focus-visible,
.git-account-actions .btn:focus-visible,
.git-repo-actions .btn:focus-visible,
.git-empty-actions .btn:focus-visible {
  outline: 2px solid rgba(96,165,250,0.65);
  outline-offset: 2px;
}

@media (max-width: 1100px) {
  .git-account-card { grid-template-columns: 1fr; }
  .git-account-side { border-left: none; border-top: 1px solid var(--border); }
  .git-account-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 10px; border: 1px solid var(--border); background: var(--border); }
  .git-account-steps li { border-bottom: none; background: var(--bg-input); padding: 7px 8px; }
  .git-guide-btn { width: auto; align-self: flex-start; }
}
@media (max-width: 760px) {
  .git-account-main { flex-direction: column; gap: 12px; padding: 17px; }
  .git-account-avatar { width: 46px; height: 46px; flex-basis: 46px; font-size: 18px; }
  .git-account-copy h3 { font-size: 20px; }
  .git-credentials { grid-template-columns: 1fr; max-width: none; }
  .git-account-actions .btn { flex: 1 1 auto; justify-content: center; }
  .git-account-steps { grid-template-columns: 1fr; }
  .git-toolbar { padding: 10px 12px; }
  .git-search { flex-basis: 100%; }
  .git-filters { width: 100%; overflow-x: auto; }
  .git-filter-btn { flex: 1; justify-content: center; }
  .git-sort { margin-left: 0; width: 100%; }
  .git-sort select { flex: 1; width: 100%; }
  .git-results-bar { padding: 10px 12px 0; }
  .git-results-hint { display: none; }
  .git-repo-grid, .git-skeleton-grid { grid-template-columns: 1fr; padding: 12px; }
  .git-section-head { flex-direction: column; align-items: stretch; }
  .git-section-meta { justify-content: space-between; }
  .git-empty { padding: 20px 16px; }
  .git-empty-top { flex-direction: column; gap: 11px; }
  .git-empty-steps { grid-template-columns: 1fr; }
  .git-empty-actions .btn { flex: 1 1 auto; justify-content: center; }
  .git-repo-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .git-repo-meta-item:last-child { grid-column: 1 / -1; }
  .git-ai-btn { margin-left: 0; }
}
@media (max-width: 480px) {
  .git-repo-actions .btn { flex: 1 1 calc(50% - 3px); justify-content: center; }
  .git-repo-actions .git-ai-btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .git-repo-card, .git-repo-card::before { transition: none; }
  .git-repo-card:hover { transform: none; }
  .git-skeleton { animation: none; }
}

/* AI quota cost line */
.ai-quota-cost { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; padding-top: 7px; border-top: 1px solid var(--border); }
.ai-quota-cost span { font-size: 8px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.6px; }
.ai-quota-cost b { font-size: 10px; color: var(--green); }

/* ==========================================================================
   AI SITE BUILDER 2.0
   ========================================================================== */
.aib-page { max-width: 1420px; margin: 0 auto; }
.aib-page.is-focus { max-width: 1580px; }
.aib-page.is-focus .aib-header { display: none; }

/* ---------- Header ---------- */
.aib-header {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  gap: 26px;
  align-items: stretch;
  margin-bottom: 16px;
  padding: 26px 28px;
  border: 1px solid rgba(96, 165, 250, 0.2);
  background:
    radial-gradient(circle at 12% 18%, rgba(59, 130, 246, 0.16), transparent 36%),
    radial-gradient(circle at 88% 88%, rgba(124, 58, 237, 0.14), transparent 40%),
    var(--bg-surface);
}
.aib-header::before {
  content: '';
  position: absolute; top: 0; left: 0; width: 340px; height: 2px;
  background: linear-gradient(90deg, #60a5fa, #8b5cf6, transparent);
}
.aib-header-glow {
  position: absolute; width: 260px; height: 260px; right: 80px; top: -150px;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.16), transparent 68%);
  pointer-events: none;
}
.aib-header-grid {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.35;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(90deg, #000, transparent 72%);
  -webkit-mask-image: linear-gradient(90deg, #000, transparent 72%);
}
.aib-header-main { position: relative; z-index: 1; display: flex; align-items: center; gap: 18px; min-width: 0; }
.aib-orb {
  width: 58px; height: 58px; flex: 0 0 58px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(96, 165, 250, 0.42);
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.22), transparent 38%),
    linear-gradient(135deg, rgba(59,130,246,0.34), rgba(124,58,237,0.22));
  color: #bfdbfe;
  box-shadow: 0 0 38px rgba(59, 130, 246, 0.18);
}
.aib-header-copy { min-width: 0; }
.aib-kicker {
  display: flex; align-items: center; gap: 7px;
  font-size: 9px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase;
  color: #60a5fa;
}
.aib-kicker-sep { color: var(--text-muted); }
.aib-kicker-dot {
  width: 6px; height: 6px; background: #60a5fa;
  animation: aiPulse 2.4s ease-out infinite;
}
.aib-header h2 {
  margin: 9px 0 7px;
  font-size: clamp(24px, 2.4vw, 33px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -1.1px;
}
.aib-header h2 span { color: #93c5fd; }
.aib-header p { max-width: 690px; font-size: 12px; line-height: 1.65; color: var(--text-secondary); }
.aib-header-side {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; justify-content: center;
  padding-left: 24px;
  border-left: 1px solid rgba(255,255,255,0.07);
}
.aib-header-side-label { font-size: 8px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-muted); }
.aib-header-side-value { margin-top: 4px; font-size: 27px; line-height: 1; font-weight: 800; letter-spacing: -0.8px; color: #93c5fd; }
.aib-header-side-value.is-blocked { color: var(--red); }
.aib-header-side-note { margin-top: 4px; font-size: 9.5px; color: var(--text-muted); }
.aib-header-meter { height: 4px; margin-top: 10px; background: rgba(255,255,255,0.06); overflow: hidden; }
.aib-header-meter span { display: block; height: 100%; background: linear-gradient(90deg, #3b82f6, #8b5cf6); }
.aib-header-meter.is-blocked span { background: var(--red); }
.aib-header-side-foot { margin-top: 8px; font-size: 8.5px; line-height: 1.5; color: var(--text-muted); }

/* ---------- Landing layout ---------- */
.aib-landing { display: flex; flex-direction: column; gap: 16px; }
.aib-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
.aib-main-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.aib-rail { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

/* ---------- Composer ---------- */
.aib-composer {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-surface);
}
.aib-composer::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6 46%, transparent 86%);
}
.aib-composer-top { display: flex; align-items: center; gap: 11px; padding: 18px 20px 0; }
.aib-composer-orb { width: 38px; height: 38px; flex: 0 0 38px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(96,165,250,0.32); background: rgba(59,130,246,0.08); }
.aib-composer-orb .mira-orb { width: 28px; height: 28px; }
.aib-composer-heading h3 { margin-top: 2px; font-size: 20px; letter-spacing: -0.5px; }
.aib-card-kicker { font-size: 8.5px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-muted); }
.aib-pill {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 8px; border: 1px solid rgba(34,197,94,0.25);
  background: rgba(34,197,94,0.06); color: var(--green);
  font-size: 8px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase;
}
.aib-pill-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); animation: aiPulse 2s ease-out infinite; }
.aib-form { padding: 16px 20px 20px; }
.aib-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.aib-field label { font-size: 10px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.6px; }
.aib-field .form-input { font-size: 12.5px; padding: 10px 12px; background: var(--bg-input); }
.aib-field textarea.form-input { min-height: 148px; resize: vertical; line-height: 1.64; font-size: 13px; padding: 13px 14px; }
.aib-field .form-input.is-invalid { border-color: rgba(239,68,68,0.65); box-shadow: 0 0 0 2px rgba(239,68,68,0.08); }
.aib-field-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-top: 1px; }
.aib-field-foot > span:first-child { font-size: 9px; line-height: 1.5; color: var(--text-muted); }
.aib-counter { flex: 0 0 auto; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 9px; color: var(--text-muted); }
.aib-counter b { color: var(--text-secondary); }
.aib-field-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.92fr) 150px; gap: 10px; margin-top: 14px; }
.aib-form-error { min-height: 0; margin-top: 8px; font-size: 10.5px; color: var(--red); }
.aib-form-error:not(:empty) { min-height: 18px; }
.aib-block-banner {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 12px; padding: 11px 12px;
  border: 1px solid rgba(239,68,68,0.3); background: rgba(239,68,68,0.05);
}
.aib-block-banner .material-icons-round { font-size: 19px; color: var(--red); }
.aib-block-banner > div { flex: 1; min-width: 0; }
.aib-block-banner b { display: block; font-size: 10.5px; color: var(--text-primary); }
.aib-block-banner p { margin-top: 2px; font-size: 9.5px; line-height: 1.5; color: var(--text-muted); }
.aib-composer-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border);
}
.aib-quota-inline { display: flex; align-items: center; gap: 9px; min-width: 0; flex-wrap: wrap; }
.aib-quota-inline > .material-icons-round { font-size: 17px; color: #60a5fa; }
.aib-quota-inline > div:not(.aib-quota-inline-bar) { display: flex; flex-direction: column; }
.aib-quota-inline b { font-size: 11px; color: var(--text-primary); }
.aib-quota-inline span { font-size: 8.5px; color: var(--text-muted); }
.aib-quota-inline-bar { width: 84px; height: 3px; background: var(--bg-input); overflow: hidden; }
.aib-quota-inline-bar span { display: block; height: 100%; background: linear-gradient(90deg, #3b82f6, #8b5cf6); }
.aib-quota-inline.is-blocked > .material-icons-round,
.aib-quota-inline.is-blocked b { color: var(--red); }
.aib-quota-inline.is-blocked .aib-quota-inline-bar span { background: var(--red); }
.aib-generate-btn {
  height: 46px; padding: 0 20px;
  font-size: 11px; letter-spacing: 0.6px; gap: 8px; white-space: nowrap;
  background-image: linear-gradient(120deg, #1d4ed8 0%, #3b82f6 52%, #7c3aed 100%);
  background-size: 180% 100%;
  box-shadow: 0 8px 28px rgba(59,130,246,0.22);
  transition: background-position 0.35s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.aib-generate-btn:hover { background-position: 100% 0; transform: translateY(-1px); box-shadow: 0 10px 34px rgba(59,130,246,0.3); }
.aib-generate-btn:active { transform: translateY(0); }
.aib-generate-btn .material-icons-round { font-size: 18px; }
.aib-kbd { padding: 2px 5px; border: 1px solid rgba(255,255,255,0.22); font-size: 8px; font-weight: 700; letter-spacing: 0.2px; opacity: 0.8; }
.aib-idea-row { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; padding: 0 20px 14px; }
.aib-idea-row > span { font-size: 8.5px; font-weight: 700; letter-spacing: 0.7px; text-transform: uppercase; color: var(--text-muted); }
.aib-idea-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.aib-idea-chips button {
  padding: 4px 8px; border: 1px solid var(--border); background: var(--bg-input);
  color: var(--text-secondary); font-family: inherit; font-size: 9px; cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.aib-idea-chips button:hover { color: #93c5fd; border-color: rgba(96,165,250,0.45); background: rgba(59,130,246,0.06); }
.aib-beta-note { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 9px 20px; border-top: 1px solid var(--border); background: rgba(0,0,0,0.12); }
.aib-beta-note span { display: inline-flex; align-items: center; gap: 4px; font-size: 8.5px; color: var(--text-muted); }
.aib-beta-note .material-icons-round { font-size: 12px; color: #60a5fa; }

/* ---------- Rail ---------- */
.aib-rail-card { border: 1px solid var(--border); background: var(--bg-surface); padding: 15px 16px; }
.aib-rail-head { display: flex; align-items: center; gap: 7px; margin-bottom: 11px; font-size: 8.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); }
.aib-rail-head .material-icons-round { font-size: 15px; color: #60a5fa; }
.aib-rail-head b { margin-left: auto; padding: 1px 6px; border: 1px solid var(--border); background: var(--bg-input); color: var(--text-secondary); font-size: 8.5px; }
.aib-usage-mini-value { font-size: 26px; line-height: 1; font-weight: 800; letter-spacing: -0.8px; color: #93c5fd; }
.aib-usage-mini-value small { font-size: 11px; font-weight: 600; color: var(--text-muted); letter-spacing: 0; }
.aib-usage-mini-label { margin-top: 4px; font-size: 9px; color: var(--text-muted); }
.aib-usage-mini-bar { height: 4px; margin-top: 11px; background: var(--bg-input); overflow: hidden; }
.aib-usage-mini-bar span { display: block; height: 100%; background: linear-gradient(90deg, #3b82f6, #8b5cf6); }
.aib-usage-mini-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 8.5px; color: var(--text-muted); }
.aib-usage-mini-foot a { color: #60a5fa; text-decoration: none; }
.aib-usage-mini-foot a:hover { text-decoration: underline; }
.aib-usage-mini.is-blocked .aib-usage-mini-value { color: var(--red); }
.aib-usage-mini.is-blocked .aib-usage-mini-bar span { background: var(--red); }
.aib-recent-list { display: flex; flex-direction: column; }
.aib-recent-item {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 0; border-top: 1px solid var(--border);
  background: transparent; border-left: 0; border-right: 0; border-bottom: 0;
  color: var(--text-primary); font-family: inherit; text-align: left; cursor: pointer; min-width: 0;
}
.aib-recent-item:first-child { border-top: 0; padding-top: 2px; }
.aib-recent-item:hover .aib-recent-copy b { color: #93c5fd; }
.aib-recent-thumb { position: relative; width: 54px; height: 38px; flex: 0 0 54px; overflow: hidden; border: 1px solid var(--border); }
.aib-recent-thumb .aib-thumb-browser { display: none; }
.aib-recent-thumb .aib-thumb-canvas { padding: 6px; }
.aib-recent-thumb .aib-thumb-brand { width: 15px; height: 15px; font-size: 7px; }
.aib-recent-thumb .aib-thumb-line { height: 3px; margin-top: 3px; }
.aib-recent-thumb .aib-thumb-line.is-title { width: 55%; }
.aib-recent-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.aib-recent-copy b { font-size: 10.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 0.15s; }
.aib-recent-copy span { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 8px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aib-recent-state { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; }
.aib-recent-state.is-live { background: var(--green); }
.aib-recent-state.is-draft { background: var(--gold); }
.aib-recent-empty { padding: 4px 0 8px; text-align: center; }
.aib-recent-empty .material-icons-round { font-size: 23px; color: rgba(96,165,250,0.5); }
.aib-recent-empty b { display: block; margin-top: 5px; font-size: 10.5px; color: var(--text-secondary); }
.aib-recent-empty p { margin-top: 3px; font-size: 9px; line-height: 1.5; color: var(--text-muted); }
.aib-how { padding-bottom: 12px; }
.aib-how-step { display: flex; gap: 9px; padding: 8px 0; border-top: 1px solid var(--border); }
.aib-how-step:first-of-type { border-top: 0; }
.aib-how-step > b { flex: 0 0 24px; height: 22px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(96,165,250,0.22); background: rgba(59,130,246,0.06); color: #60a5fa; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 8px; }
.aib-how-step strong { display: block; font-size: 10px; color: var(--text-primary); }
.aib-how-step span { display: block; margin-top: 1px; font-size: 8.5px; line-height: 1.45; color: var(--text-muted); }

/* ---------- Projects ---------- */
.aib-projects { border: 1px solid var(--border); background: var(--bg-surface); overflow: hidden; }
.aib-projects-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 17px 18px; border-bottom: 1px solid var(--border); }
.aib-projects-head h3 { margin-top: 3px; font-size: 18px; letter-spacing: -0.45px; }
.aib-projects-head p { margin-top: 3px; font-size: 9.5px; color: var(--text-muted); }
.aib-filters { display: flex; align-items: center; gap: 3px; padding: 3px; border: 1px solid var(--border); background: var(--bg-input); flex: 0 0 auto; }
.aib-filters button {
  padding: 5px 8px; border: 0; background: transparent;
  color: var(--text-muted); font-family: inherit; font-size: 8.5px; font-weight: 700;
  letter-spacing: 0.3px; cursor: pointer; white-space: nowrap;
}
.aib-filters button b { margin-left: 3px; color: var(--text-muted); font-weight: 700; }
.aib-filters button:hover { color: var(--text-secondary); }
.aib-filters button.is-active { background: var(--bg-surface); color: #93c5fd; box-shadow: 0 0 0 1px var(--border); }
.aib-filters button.is-active b { color: #60a5fa; }
.aib-site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 13px; padding: 15px 18px 18px; }
.aib-site-card { display: flex; flex-direction: column; border: 1px solid var(--border); background: var(--bg-input); overflow: hidden; transition: border-color 0.18s, background 0.18s; }
.aib-site-card:hover { border-color: rgba(96,165,250,0.42); background: var(--bg-elevated); }
.aib-site-thumb { position: relative; height: 150px; overflow: hidden; border-bottom: 1px solid var(--border); background: #0a0a10; }
.aib-site-thumb iframe { display: block; width: 1200px; height: 820px; border: 0; background: #fff; transform-origin: 0 0; pointer-events: none; opacity: 0; transition: opacity 0.35s ease; }
.aib-site-thumb iframe.is-loaded { opacity: 1; }
.aib-site-thumb-shade { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 -36px 44px -28px rgba(0,0,0,0.7); }
.aib-site-status {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 6px; border: 1px solid transparent;
  font-size: 7.5px; font-weight: 800; letter-spacing: 0.7px; text-transform: uppercase;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.aib-site-thumb > .aib-site-status { position: absolute; top: 8px; left: 8px; z-index: 2; }
.aib-site-status i { width: 4px; height: 4px; border-radius: 50%; }
.aib-site-status.is-live { color: #86efac; background: rgba(6, 30, 18, 0.72); border-color: rgba(34,197,94,0.35); }
.aib-site-status.is-live i { background: var(--green); }
.aib-site-status.is-draft { color: #fcd34d; background: rgba(35, 25, 4, 0.72); border-color: rgba(240,180,41,0.3); }
.aib-site-status.is-draft i { background: var(--gold); }
.aib-site-body { display: flex; flex-direction: column; flex: 1; padding: 11px 12px 12px; }
.aib-site-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.aib-site-head h4 { font-size: 12px; line-height: 1.3; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aib-site-updated { flex: 0 0 auto; font-size: 7.5px; color: var(--text-muted); white-space: nowrap; }
.aib-site-url { margin-top: 3px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 8.5px; color: #60a5fa; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aib-site-actions { display: flex; align-items: center; gap: 5px; margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--border); }
.aib-card-open {
  flex: 1; display: inline-flex; align-items: center; justify-content: space-between; gap: 6px;
  height: 29px; padding: 0 9px; border: 1px solid rgba(96,165,250,0.28);
  background: rgba(59,130,246,0.07); color: #93c5fd;
  font-family: inherit; font-size: 8.5px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase;
  cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.aib-card-open:hover { background: rgba(59,130,246,0.14); border-color: rgba(96,165,250,0.55); color: #dbeafe; }
.aib-card-open .material-icons-round { font-size: 13px; }
.aib-icon-btn {
  width: 29px; height: 29px; flex: 0 0 29px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: transparent; color: var(--text-muted);
  cursor: pointer; text-decoration: none; transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.aib-icon-btn:hover { color: #93c5fd; border-color: rgba(96,165,250,0.42); background: rgba(59,130,246,0.06); }
.aib-icon-btn.is-live { color: var(--green); border-color: rgba(34,197,94,0.3); }
.aib-icon-btn.is-live:hover { color: #86efac; border-color: rgba(34,197,94,0.55); background: rgba(34,197,94,0.07); }
.aib-icon-btn .material-icons-round { font-size: 15px; }
.aib-projects-empty { padding: 32px 20px 36px; text-align: center; }
.aib-projects-empty .material-icons-round { font-size: 30px; color: rgba(96,165,250,0.45); }
.aib-projects-empty b { display: block; margin-top: 8px; font-size: 12px; color: var(--text-secondary); }
.aib-projects-empty p { margin-top: 3px; font-size: 9.5px; color: var(--text-muted); }

/* Thumbnail fallback */
.aib-thumb-fallback {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  background:
    radial-gradient(circle at 75% 22%, hsla(var(--thumb-hue), 62%, 48%, 0.26), transparent 38%),
    linear-gradient(140deg, hsl(var(--thumb-hue), 44%, 13%), #08080d 72%);
}
.aib-thumb-browser { display: flex; align-items: center; gap: 3px; height: 19px; padding: 0 6px; border-bottom: 1px solid rgba(255,255,255,0.07); background: rgba(0,0,0,0.3); }
.aib-thumb-browser i { width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,0.24); }
.aib-thumb-browser i:first-child { background: #ef4444; }
.aib-thumb-browser i:nth-child(2) { background: var(--gold); }
.aib-thumb-browser i:nth-child(3) { background: var(--green); }
.aib-thumb-browser em { margin-left: 4px; font-style: normal; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 6px; color: rgba(255,255,255,0.38); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aib-thumb-canvas { flex: 1; position: relative; padding: 14px; overflow: hidden; }
.aib-thumb-brand {
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; margin-bottom: 9px;
  border: 1px solid hsla(var(--thumb-hue), 70%, 66%, 0.45);
  background: hsla(var(--thumb-hue), 60%, 40%, 0.18);
  color: hsl(var(--thumb-hue), 80%, 78%);
  font-size: 11px; font-weight: 800;
}
.aib-thumb-line { display: block; height: 4px; width: 74%; margin-top: 6px; background: rgba(255,255,255,0.16); }
.aib-thumb-line.is-title { width: 48%; height: 7px; background: rgba(255,255,255,0.3); }
.aib-thumb-line.is-short { width: 42%; }
.aib-thumb-button { display: block; width: 46px; height: 13px; margin-top: 10px; background: hsl(var(--thumb-hue), 65%, 46%); opacity: 0.75; }

/* ---------- Usage details ---------- */
.aib-usage-details { border: 1px solid var(--border); background: var(--bg-surface); }
.aib-usage-details > summary {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 15px; cursor: pointer; list-style: none;
}
.aib-usage-details > summary::-webkit-details-marker { display: none; }
.aib-usage-details > summary .material-icons-round { font-size: 16px; color: #60a5fa; }
.aib-usage-details > summary > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.aib-usage-details > summary b { font-size: 10.5px; color: var(--text-secondary); }
.aib-usage-details > summary span { font-size: 8.5px; color: var(--text-muted); }
.aib-usage-summary-value { color: #93c5fd !important; font-family: 'JetBrains Mono', ui-monospace, monospace; }
.aib-summary-chevron { transition: transform 0.2s ease; }
.aib-usage-details[open] .aib-summary-chevron { transform: rotate(180deg); }
.aib-usage-details[open] > summary { border-bottom: 1px solid var(--border); background: rgba(59,130,246,0.03); }
.aib-usage-body { padding: 15px; }
.aib-usage-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--border); background: var(--border); }
.aib-usage-stat { padding: 10px 11px; background: var(--bg-input); }
.aib-usage-stat span { display: block; font-size: 7.5px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-muted); }
.aib-usage-stat b { display: block; margin-top: 4px; font-size: 15px; letter-spacing: -0.3px; color: var(--text-primary); }
.aib-usage-stat.is-main b { color: #93c5fd; }
.aib-quota-card { margin-top: 12px; padding: 12px 13px; border: 1px solid rgba(96,165,250,0.22); background: rgba(59,130,246,0.04); }
.aib-quota-card.is-blocked { border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.04); }
.aib-quota-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.aib-quota-head span { display: block; font-size: 8px; font-weight: 800; letter-spacing: 0.7px; text-transform: uppercase; color: var(--text-muted); }
.aib-quota-head b { display: block; margin-top: 3px; font-size: 17px; letter-spacing: -0.4px; color: #93c5fd; }
.aib-quota-head b em { font-style: normal; font-size: 10px; color: var(--text-muted); }
.aib-quota-percent { font-size: 8.5px; color: var(--text-muted); white-space: nowrap; }
.aib-quota-bar { height: 4px; margin-top: 8px; background: var(--bg-input); overflow: hidden; }
.aib-quota-bar span { display: block; height: 100%; background: linear-gradient(90deg, #3b82f6, #8b5cf6); }
.aib-quota-card.is-blocked .aib-quota-bar span { background: var(--red); }
.aib-quota-card p { margin-top: 7px; font-size: 8.5px; line-height: 1.55; color: var(--text-muted); }
.aib-quota-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--border); font-size: 8.5px; color: var(--text-muted); }
.aib-quota-foot b { color: var(--green); font-size: 9.5px; }
.aib-usage-table-wrap { overflow-x: auto; margin-top: 13px; }
.aib-usage-table { width: 100%; border-collapse: collapse; min-width: 540px; }
.aib-usage-table th { padding: 7px; border-bottom: 1px solid var(--border); text-align: left; font-size: 7.5px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-muted); }
.aib-usage-table td { padding: 8px 7px; border-bottom: 1px solid var(--border); font-size: 9.5px; color: var(--text-secondary); }
.aib-usage-table tr:last-child td { border-bottom: none; }
.aib-usage-mode { display: inline-block; padding: 2px 5px; border: 1px solid var(--border); background: var(--bg-input); color: var(--text-muted); font-size: 7.5px; text-transform: uppercase; letter-spacing: 0.4px; }
.aib-usage-mode.is-error { color: var(--red); border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.06); }
.aib-usage-total { color: #93c5fd !important; font-weight: 700; }
.aib-usage-empty { margin-top: 12px; padding: 14px; border: 1px dashed var(--border); text-align: center; font-size: 9.5px; color: var(--text-muted); }

/* ---------- Working / building ---------- */
.aib-building {
  display: grid;
  grid-template-columns: 356px minmax(0, 1fr);
  height: clamp(620px, calc(100vh - 150px), 920px);
  min-height: 620px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
}
.aib-build-side { display: flex; flex-direction: column; padding: 20px 20px 17px; border-right: 1px solid var(--border); min-width: 0; }
.aib-build-top { display: flex; align-items: center; gap: 10px; }
.aib-build-orb { width: 36px; height: 36px; flex: 0 0 36px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(96,165,250,0.3); background: rgba(59,130,246,0.07); }
.aib-build-top h3 { margin-top: 2px; font-size: 17px; letter-spacing: -0.45px; }
.aib-cancel { margin-left: auto; border: 1px solid var(--border); background: transparent; color: var(--text-muted); font-family: inherit; font-size: 8.5px; font-weight: 700; padding: 6px 8px; cursor: pointer; white-space: nowrap; }
.aib-cancel:hover { color: var(--red); border-color: rgba(239,68,68,0.4); }
.aib-build-status { margin-top: 20px; min-height: 30px; font-size: 11px; line-height: 1.5; color: var(--text-secondary); }
.aib-build-progress { height: 4px; margin-top: 9px; background: var(--bg-input); overflow: hidden; }
.aib-build-progress span { display: block; height: 100%; background: linear-gradient(90deg, #3b82f6, #8b5cf6); transition: width 0.35s ease; }
.aib-build-meta { display: flex; align-items: center; gap: 12px; margin-top: 8px; font-size: 8.5px; color: var(--text-muted); }
.aib-build-meta span { display: inline-flex; align-items: center; gap: 4px; }
.aib-build-meta .material-icons-round { font-size: 12px; }
.aib-build-meta b { color: var(--text-secondary); }
.aib-build-meta span:last-child { margin-left: auto; color: #93c5fd; }
.aib-build-steps { margin-top: 22px; display: flex; flex-direction: column; }
.aib-build-step { position: relative; display: flex; gap: 10px; padding: 10px 0; opacity: 0.42; transition: opacity 0.25s; }
.aib-build-step.is-active, .aib-build-step.is-done { opacity: 1; }
.aib-build-step:not(:last-child)::before { content: ''; position: absolute; left: 10px; top: 33px; bottom: -1px; width: 1px; background: var(--border); }
.aib-build-step.is-done:not(:last-child)::before { background: rgba(34,197,94,0.32); }
.aib-build-step-dot { width: 21px; height: 21px; flex: 0 0 21px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); background: var(--bg-input); color: var(--text-muted); }
.aib-build-step-dot .material-icons-round { font-size: 13px; }
.aib-build-step.is-active .aib-build-step-dot { border-color: rgba(96,165,250,0.5); background: rgba(59,130,246,0.1); color: #60a5fa; }
.aib-build-step.is-active .aib-build-step-dot .material-icons-round { animation: aiSpin 1.8s linear infinite; }
.aib-build-step.is-done .aib-build-step-dot { border-color: rgba(34,197,94,0.38); background: rgba(34,197,94,0.08); color: var(--green); }
.aib-build-step b { display: block; font-size: 10.5px; color: var(--text-secondary); }
.aib-build-step.is-active b { color: var(--text-primary); }
.aib-build-step span:not(.aib-build-step-dot) { display: block; margin-top: 2px; font-size: 8.5px; line-height: 1.45; color: var(--text-muted); }
.aib-code-details { margin-top: 16px; border: 1px solid var(--border); background: #08080c; }
.aib-code-details summary { display: flex; align-items: center; gap: 6px; padding: 8px 10px; cursor: pointer; list-style: none; font-size: 8.5px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; color: var(--text-muted); }
.aib-code-details summary::-webkit-details-marker { display: none; }
.aib-code-details summary .material-icons-round { font-size: 14px; }
.aib-code-details summary .aib-summary-chevron { margin-left: auto; font-size: 15px; }
.aib-code-details[open] summary { border-bottom: 1px solid var(--border); }
.aib-code-details pre { height: 170px; overflow: auto; padding: 10px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 7.5px; line-height: 1.55; color: #93c5fd; white-space: pre-wrap; word-break: break-word; scrollbar-width: thin; }
.aib-work-tip { display: flex; align-items: flex-start; gap: 5px; margin-top: auto; padding-top: 14px; font-size: 8.5px; line-height: 1.5; color: var(--text-muted); }
.aib-work-tip .material-icons-round { font-size: 13px; flex: 0 0 auto; }
.aib-build-preview { display: flex; flex-direction: column; min-width: 0; background: rgba(0,0,0,0.16); }
.aib-browser-bar { height: 36px; flex: 0 0 36px; display: flex; align-items: center; gap: 9px; padding: 0 12px; border-bottom: 1px solid var(--border); background: var(--bg-elevated); }
.aib-browser-dots { display: flex; gap: 4px; }
.aib-browser-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--border-light); }
.aib-browser-dots i:nth-child(1) { background: #ef4444; }
.aib-browser-dots i:nth-child(2) { background: var(--gold); }
.aib-browser-dots i:nth-child(3) { background: var(--green); }
.aib-browser-bar > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 8px; color: var(--text-muted); }
.aib-live-chip { flex: 0 0 auto !important; display: inline-flex; align-items: center; gap: 4px; color: var(--green) !important; font-family: inherit !important; font-size: 8px !important; font-weight: 800; letter-spacing: 0.7px; text-transform: uppercase; }
.aib-live-chip i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); animation: aiPulse 2s ease-out infinite; }
.aib-build-frame { position: relative; flex: 1; min-height: 0; background: #fff; }
.aib-build-frame iframe { width: 100%; height: 100%; min-height: 560px; border: 0; background: #fff; }
.aib-preview-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; background: #0a0a10; text-align: center; color: var(--text-muted); }
.aib-preview-empty.is-hidden { display: none; }
.aib-preview-empty b { margin-top: 15px; font-size: 11px; color: var(--text-secondary); }
.aib-preview-empty p { margin-top: 4px; max-width: 240px; font-size: 9px; line-height: 1.5; }
.aib-preview-skeleton { width: 180px; display: flex; flex-direction: column; gap: 7px; }
.aib-preview-skeleton span { display: block; height: 8px; background: linear-gradient(90deg, var(--border), var(--border-light), var(--border)); background-size: 200% 100%; animation: aibShimmer 1.5s linear infinite; }
.aib-preview-skeleton span:nth-child(1) { height: 42px; }
.aib-preview-skeleton span:nth-child(2) { width: 84%; }
.aib-preview-skeleton span:nth-child(3) { width: 65%; }
.aib-preview-skeleton span:nth-child(4) { width: 44%; height: 16px; margin-top: 4px; }
@keyframes aibShimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- Studio ---------- */
.aib-studio { display: flex; flex-direction: column; gap: 10px; }
.aib-studio-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 10px 12px; border: 1px solid var(--border); background: var(--bg-surface);
}
.aib-studio-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.aib-back-btn { width: 32px; height: 32px; flex: 0 0 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); background: transparent; color: var(--text-secondary); cursor: pointer; }
.aib-back-btn:hover { color: #93c5fd; border-color: rgba(96,165,250,0.4); background: rgba(59,130,246,0.06); }
.aib-back-btn .material-icons-round { font-size: 17px; }
.aib-site-avatar { width: 36px; height: 36px; flex: 0 0 36px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(96,165,250,0.32); background: linear-gradient(135deg, rgba(59,130,246,0.24), rgba(124,58,237,0.16)); color: #bfdbfe; font-size: 14px; font-weight: 800; }
.aib-studio-copy { min-width: 0; }
.aib-studio-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.aib-studio-name h3 { font-size: 15px; letter-spacing: -0.35px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aib-studio-url { margin-top: 2px; font-size: 8.5px; color: var(--text-muted); }
.aib-studio-url a { display: inline-flex; align-items: center; gap: 3px; color: #60a5fa; text-decoration: none; font-family: 'JetBrains Mono', ui-monospace, monospace; }
.aib-studio-url a:hover { text-decoration: underline; }
.aib-studio-url .material-icons-round { font-size: 11px; }
.aib-studio-actions { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; }
.aib-action-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 11px; border: 1px solid var(--border); background: transparent; color: var(--text-secondary); font-family: inherit; font-size: 9px; font-weight: 700; letter-spacing: 0.3px; cursor: pointer; white-space: nowrap; }
.aib-action-btn:hover { color: #93c5fd; border-color: rgba(96,165,250,0.44); background: rgba(59,130,246,0.06); }
.aib-action-btn:disabled { opacity: 0.5; cursor: wait; }
.aib-action-btn .material-icons-round { font-size: 16px; }
.aib-publish-btn { width: auto !important; height: 34px; padding: 0 13px; font-size: 9px; letter-spacing: 0.4px; gap: 6px; white-space: nowrap; }
.aib-publish-btn .material-icons-round { font-size: 15px; }
.aib-more { position: relative; }
.aib-more-btn { width: 34px; height: 34px; flex: 0 0 34px; }
.aib-more-menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 30;
  width: 240px; padding: 4px; border: 1px solid var(--border-light); background: var(--bg-surface);
  box-shadow: 0 18px 50px rgba(0,0,0,0.55); display: none;
}
.aib-more-menu.is-open { display: flex; flex-direction: column; }
.aib-more-menu a, .aib-more-menu button {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 8px 9px; border: 0; background: transparent; color: var(--text-secondary);
  font-family: inherit; font-size: 10px; text-align: left; text-decoration: none; cursor: pointer;
}
.aib-more-menu a:hover, .aib-more-menu button:hover { background: var(--bg-elevated); color: var(--text-primary); }
.aib-more-menu .material-icons-round { font-size: 15px; color: var(--text-muted); }
.aib-more-menu .is-danger { color: var(--red); }
.aib-more-menu .is-danger .material-icons-round { color: var(--red); }
.aib-menu-sep { height: 1px; margin: 4px 2px; background: var(--border); }
.aib-device-tabs { display: none; }

.aib-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 352px;
  height: clamp(520px, calc(100vh - 222px), 920px);
  min-height: 520px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  overflow: hidden;
}
.aib-preview-pane { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--border); }
.aib-preview-toolbar { height: 39px; flex: 0 0 39px; display: flex; align-items: center; gap: 10px; padding: 0 10px; border-bottom: 1px solid var(--border); background: var(--bg-elevated); }
.aib-preview-domain { display: flex; align-items: center; gap: 5px; flex: 1; min-width: 0; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 8px; color: var(--text-muted); }
.aib-preview-domain .material-icons-round { font-size: 12px; color: var(--green); }
.aib-preview-domain span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aib-preview-tools { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.aib-device-toggle { display: flex; align-items: center; gap: 1px; padding: 2px; margin-right: 3px; border: 1px solid var(--border); background: var(--bg-input); }
.aib-device-toggle button { width: 25px; height: 23px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; color: var(--text-muted); cursor: pointer; }
.aib-device-toggle button:hover { color: var(--text-secondary); }
.aib-device-toggle button.is-active { background: var(--bg-surface); color: #93c5fd; box-shadow: 0 0 0 1px var(--border); }
.aib-device-toggle .material-icons-round { font-size: 14px; }
.aib-tool-btn { width: 25px; height: 25px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; background: transparent; color: var(--text-muted); cursor: pointer; text-decoration: none; }
.aib-tool-btn:hover { color: #93c5fd; border-color: var(--border); }
.aib-tool-btn .material-icons-round { font-size: 15px; }
.aib-preview-stage { flex: 1; min-height: 0; display: flex; align-items: stretch; justify-content: center; padding: 13px; background: #07070b; }
.aib-frame-shell { position: relative; width: 100%; height: 100%; max-width: 100%; margin: 0 auto; border: 1px solid var(--border); background: #fff; overflow: hidden; transition: max-width 0.25s ease; }
.aib-preview-stage[data-device="tablet"] .aib-frame-shell { max-width: 820px; }
.aib-preview-stage[data-device="mobile"] .aib-frame-shell { max-width: 390px; }
.aib-frame-shell iframe { width: 100%; height: 100%; border: 0; background: #fff; display: block; }
.aib-refine-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(4,4,9,0.7); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); opacity: 0; pointer-events: none; transition: opacity 0.2s; z-index: 3; }
.aib-refine-overlay.is-visible { opacity: 1; pointer-events: auto; }
.aib-refine-box { display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 22px 26px; border: 1px solid rgba(96,165,250,0.35); background: rgba(10,10,16,0.94); color: var(--text-secondary); font-size: 10px; text-align: center; max-width: 300px; }
.aib-refine-box b { color: var(--text-primary); font-size: 11.5px; line-height: 1.4; }
.aib-refine-box #ai-refine-bytes { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 8.5px; color: var(--text-muted); }
.aib-refine-cancel { margin-top: 5px; padding: 5px 10px; border: 1px solid var(--border-light); background: transparent; color: var(--text-muted); font-family: inherit; font-size: 8.5px; cursor: pointer; }
.aib-refine-cancel:hover { color: var(--red); border-color: rgba(239,68,68,0.4); }
.aib-spinner { width: 21px; height: 21px; border: 2px solid rgba(96,165,250,0.2); border-top-color: #60a5fa; border-radius: 50%; animation: aiSpin 0.8s linear infinite; }

.aib-chat-pane { display: flex; flex-direction: column; min-width: 0; background: var(--bg-surface); }
.aib-chat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.aib-chat-identity { display: flex; align-items: center; gap: 8px; min-width: 0; }
.aib-chat-orb { width: 28px; height: 28px; flex: 0 0 28px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(96,165,250,0.3); background: rgba(59,130,246,0.07); }
.aib-chat-identity b { display: block; font-size: 10.5px; color: var(--text-primary); }
.aib-chat-identity span { display: block; font-size: 8px; color: var(--text-muted); }
.aib-chat-live { display: inline-flex; align-items: center; gap: 4px; font-size: 7.5px; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase; color: var(--green); }
.aib-chat-live i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); animation: aiPulse 2s ease-out infinite; }
.aib-chat-context { display: flex; align-items: flex-start; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--border); background: rgba(59,130,246,0.03); font-size: 8.5px; line-height: 1.5; color: var(--text-muted); }
.aib-chat-context .material-icons-round { font-size: 13px; color: #60a5fa; flex: 0 0 auto; margin-top: 1px; }
.aib-chat-body { flex: 1; min-height: 160px; overflow-y: auto; padding: 13px 12px; display: flex; flex-direction: column; gap: 12px; scrollbar-width: thin; background: linear-gradient(180deg, rgba(255,255,255,0.006), transparent 80px); }
.aib-chat-empty { margin: auto; padding: 20px 14px; text-align: center; }
.aib-chat-empty-icon { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border: 1px solid rgba(96,165,250,0.22); background: rgba(59,130,246,0.06); }
.aib-chat-empty b { display: block; margin-top: 10px; font-size: 11px; color: var(--text-secondary); }
.aib-chat-empty p { margin-top: 5px; font-size: 9px; line-height: 1.55; color: var(--text-muted); }
.aib-msg { display: flex; align-items: flex-start; gap: 7px; }
.aib-msg.is-user { flex-direction: row-reverse; }
.aib-msg-avatar { width: 24px; height: 24px; flex: 0 0 24px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); background: var(--bg-input); color: var(--text-muted); font-size: 9px; font-weight: 700; }
.aib-msg.is-user .aib-msg-avatar { background: var(--accent-dim); color: var(--accent); border-color: rgba(59,130,246,0.3); }
.aib-msg.is-assistant .aib-msg-avatar { background: rgba(96,165,250,0.08); color: #60a5fa; border-color: rgba(96,165,250,0.22); }
.aib-msg-content { min-width: 0; max-width: calc(100% - 32px); }
.aib-msg-body { padding: 8px 10px; border: 1px solid var(--border); background: var(--bg-input); font-size: 9.5px; line-height: 1.58; color: var(--text-secondary); white-space: pre-wrap; word-break: break-word; }
.aib-msg.is-user .aib-msg-body { background: rgba(59,130,246,0.08); border-color: rgba(59,130,246,0.22); color: var(--text-primary); }
.aib-msg.is-error .aib-msg-body { border-color: rgba(239,68,68,0.32); background: rgba(239,68,68,0.05); color: #fca5a5; }
.aib-msg-usage { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 9px; margin-top: 5px; padding-top: 5px; border-top: 1px solid var(--border); font-size: 7.5px; color: var(--text-muted); }
.aib-msg-usage b { margin-left: auto; color: #60a5fa; font-size: 8px; }
.aib-msg.is-user .aib-msg-usage { display: none; }
.aib-typing { display: inline-flex; align-items: center; gap: 4px; padding: 10px 11px; border: 1px solid var(--border); background: var(--bg-input); }
.aib-typing span { width: 5px; height: 5px; border-radius: 50%; background: var(--text-muted); animation: aibTyping 1.2s ease-in-out infinite; }
.aib-typing span:nth-child(2) { animation-delay: 0.16s; }
.aib-typing span:nth-child(3) { animation-delay: 0.32s; }
@keyframes aibTyping { 0%, 60%, 100% { transform: translateY(0); opacity: 0.45; } 30% { transform: translateY(-3px); opacity: 1; } }
.aib-suggestions { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px 11px 0; }
.aib-suggestions button { padding: 4px 7px; border: 1px solid var(--border); background: transparent; color: var(--text-muted); font-family: inherit; font-size: 8px; cursor: pointer; }
.aib-suggestions button:hover:not(:disabled) { color: #93c5fd; border-color: rgba(96,165,250,0.38); background: rgba(59,130,246,0.05); }
.aib-suggestions button:disabled { opacity: 0.4; cursor: default; }
.aib-chat-form { padding: 9px 11px 11px; }
.aib-chat-form textarea { width: 100%; min-height: 48px; max-height: 150px; resize: none; font-size: 10px; line-height: 1.5; padding: 9px 10px; background: var(--bg-input); }
.aib-chat-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.aib-chat-form-foot > span { font-size: 7.5px; color: var(--text-muted); }
.aib-chat-form-foot b { color: var(--text-secondary); font-weight: 700; }
.aib-send-btn { width: 32px; height: 32px; flex: 0 0 32px; border: 1px solid #3b82f6; background: #3b82f6; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.15s, border-color 0.15s; }
.aib-send-btn:hover { background: #60a5fa; border-color: #60a5fa; }
.aib-send-btn:disabled { opacity: 0.35; cursor: default; }
.aib-send-btn .material-icons-round { font-size: 17px; }
.aib-workbench.is-busy .aib-suggestions button { opacity: 0.45; }
.aib-studio-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 8px 11px; border: 1px solid var(--border); background: var(--bg-surface); }
.aib-studio-foot > span { display: inline-flex; align-items: center; gap: 4px; font-size: 8px; color: var(--text-muted); }
.aib-studio-foot .material-icons-round { font-size: 12px; }
.aib-studio-foot .aib-foot-note { margin-left: auto; color: var(--text-muted); }

/* ---------- Publish modal ---------- */
.aib-publish-preview { display: flex; align-items: center; gap: 11px; margin-bottom: 15px; padding: 12px 13px; border: 1px solid rgba(96,165,250,0.24); background: rgba(59,130,246,0.05); }
.aib-publish-preview > .material-icons-round { font-size: 23px; color: #60a5fa; }
.aib-publish-preview > div { flex: 1; min-width: 0; }
.aib-publish-preview > div > span { display: block; font-size: 7.5px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-muted); }
.aib-domain-preview { display: flex; align-items: center; margin-top: 3px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aib-domain-preview em { font-style: normal; color: var(--text-muted); }
.aib-domain-preview b { color: #93c5fd; font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.aib-publish-https { display: inline-flex; align-items: center; gap: 3px; padding: 3px 6px; border: 1px solid rgba(34,197,94,0.25); background: rgba(34,197,94,0.05); color: var(--green); font-size: 7.5px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; white-space: nowrap; }
.aib-publish-https .material-icons-round { font-size: 11px; }
.aib-domain-input { border-radius: 0; }
.aib-domain-input input { font-size: 12px; }
.aib-publish-notes { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 10px; }
.aib-publish-notes span { display: inline-flex; align-items: center; gap: 4px; font-size: 8.5px; color: var(--text-muted); }
.aib-publish-notes .material-icons-round { font-size: 12px; color: #60a5fa; }
.aib-publish-error { min-height: 18px; margin-top: 8px; font-size: 9.5px; color: var(--red); }
.aib-delete-copy { display: flex; align-items: flex-start; gap: 10px; }
.aib-delete-copy .material-icons-round { font-size: 23px; color: var(--red); }
.aib-delete-copy b { display: block; font-size: 12px; color: var(--text-primary); }
.aib-delete-copy p { margin-top: 4px; font-size: 10px; line-height: 1.55; color: var(--text-muted); }

/* ---------- Visual editor ---------- */
.aib-editor {
  position: fixed; inset: 0; z-index: 9500;
  display: flex; flex-direction: column;
  background: var(--bg-deep);
  color: var(--text-primary);
}
.aib-editor-top {
  flex: 0 0 56px; height: 56px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 0 12px; border-bottom: 1px solid var(--border-light); background: var(--bg-surface);
  position: relative; z-index: 5;
}
.aib-editor-left { display: flex; align-items: center; gap: 9px; min-width: 0; }
.aib-editor-back { width: 32px; height: 32px; flex: 0 0 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); background: transparent; color: var(--text-secondary); cursor: pointer; }
.aib-editor-back:hover { color: #93c5fd; border-color: rgba(96,165,250,0.4); }
.aib-editor-back .material-icons-round { font-size: 18px; }
.aib-editor-orb { width: 30px; height: 30px; flex: 0 0 30px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(96,165,250,0.3); background: rgba(59,130,246,0.07); }
.aib-editor-title { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.aib-editor-title b { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aib-editor-title span { display: flex; align-items: center; gap: 4px; font-size: 8px; color: var(--text-muted); }
.aib-editor-title span i { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.aib-editor.is-saved .aib-editor-title span i { background: var(--green); }
.aib-editor.is-dirty .aib-editor-title span i { background: var(--gold); animation: aiPulse 2s ease-out infinite; }
.aib-editor-devices { display: flex; align-items: center; gap: 1px; padding: 2px; border: 1px solid var(--border); background: var(--bg-input); }
.aib-editor-devices button { width: 32px; height: 27px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; color: var(--text-muted); cursor: pointer; }
.aib-editor-devices button:hover { color: var(--text-secondary); }
.aib-editor-devices button.is-active { background: var(--bg-surface); color: #93c5fd; box-shadow: 0 0 0 1px var(--border); }
.aib-editor-devices .material-icons-round { font-size: 16px; }
.aib-editor-actions { display: flex; align-items: center; gap: 4px; }
.aib-editor-tool { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; background: transparent; color: var(--text-secondary); cursor: pointer; }
.aib-editor-tool:hover { color: #93c5fd; border-color: var(--border); background: var(--bg-elevated); }
.aib-editor-tool .material-icons-round { font-size: 18px; }
.aib-editor-divider { width: 1px; height: 23px; margin: 0 4px; background: var(--border); }
.aib-editor-save { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border: 1px solid #3b82f6; background: #3b82f6; color: #fff; font-family: inherit; font-size: 9px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; cursor: pointer; }
.aib-editor-save:hover { background: #60a5fa; border-color: #60a5fa; }
.aib-editor-save:disabled { opacity: 0.5; cursor: wait; }
.aib-editor-save .material-icons-round { font-size: 16px; }
.aib-editor-hint { flex: 0 0 28px; height: 28px; display: flex; align-items: center; justify-content: center; gap: 5px; border-bottom: 1px solid var(--border); background: rgba(59,130,246,0.04); color: var(--text-muted); font-size: 8.5px; }
.aib-editor-hint .material-icons-round { font-size: 13px; color: #60a5fa; }
.aib-editor-hint b { color: var(--text-secondary); }
.aib-editor-canvas { flex: 1; min-height: 0; position: relative; overflow: hidden; background: var(--bg-deep); }
.aib-editor-feedback {
  position: fixed; left: 50%; bottom: 22px; z-index: 9998;
  transform: translate(-50%, 14px); opacity: 0; pointer-events: none;
  max-width: min(540px, calc(100vw - 32px));
  padding: 10px 14px; border: 1px solid var(--border-light); background: rgba(12,12,18,0.97);
  font-size: 10px; line-height: 1.5; color: var(--text-secondary); text-align: center;
  transition: opacity 0.2s, transform 0.2s;
}
.aib-editor-feedback.is-visible { opacity: 1; transform: translate(-50%, 0); }
.aib-editor-feedback.is-error { border-color: rgba(239,68,68,0.45); color: #fca5a5; }
.aib-editor-feedback.is-success { border-color: rgba(34,197,94,0.4); color: #86efac; }
body.aib-editor-open #mira-guide-root { display: none !important; }
body.aib-editor-open #modal-backdrop.active { z-index: 9700; }
body.aib-editor-open .toast-container { z-index: 9800; }

/* GrapesJS skin */
.aib-editor {
  --gjs-main-color: #0c0c12;
  --gjs-primary-color: #0e0e14;
  --gjs-secondary-color: #e8e8f0;
  --gjs-tertiary-color: #3b82f6;
  --gjs-quaternary-color: #60a5fa;
  --gjs-font-color: #7a7a95;
  --gjs-font-color-active: #e8e8f0;
  --gjs-main-dark-color: rgba(0, 0, 0, 0.28);
  --gjs-secondary-dark-color: rgba(0, 0, 0, 0.16);
  --gjs-main-light-color: rgba(255, 255, 255, 0.07);
  --gjs-secondary-light-color: rgba(255, 255, 255, 0.55);
  --gjs-soft-light-color: rgba(255, 255, 255, 0.02);
  --gjs-color-blue: #3b82f6;
  --gjs-color-red: #ef4444;
  --gjs-color-yellow: #f0b429;
  --gjs-color-green: #22c55e;
  --gjs-color-highlight: #60a5fa;
  --gjs-left-width: 330px;
  --gjs-canvas-top: 40px;
  --gjs-main-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --gjs-font-size: 0.71rem;
}
.aib-editor .gjs-editor,
.aib-editor .gjs-editor-cont { background: var(--bg-deep); color: var(--text-secondary); }
.aib-editor .gjs-one-bg { background-color: var(--bg-surface); }
.aib-editor .gjs-two-color { color: var(--text-secondary); }
.aib-editor .gjs-three-bg { background-color: var(--bg-elevated); }
.aib-editor .gjs-four-color, .aib-editor .gjs-four-color-h:hover { color: #93c5fd; }
.aib-editor .gjs-pn-commands, .aib-editor .gjs-pn-options { display: none !important; }
.aib-editor .gjs-pn-views {
  right: 0; width: var(--gjs-left-width);
  padding: 4px 5px; border-bottom: 1px solid var(--border); background: var(--bg-surface);
}
.aib-editor .gjs-pn-views-container {
  right: 0; width: var(--gjs-left-width);
  padding: 42px 0 0; border-left: 1px solid var(--border);
  background: var(--bg-surface); box-shadow: none;
}
.aib-editor .gjs-cv-canvas { width: calc(100% - var(--gjs-left-width)); background: #07070b; }
.aib-editor .gjs-cv-canvas-bg { background-color: #07070b; }
.aib-editor .gjs-frame-wrapper { background: #fff; }
.aib-editor .gjs-pn-btn { min-height: 29px; min-width: 29px; color: var(--text-muted); border: 1px solid transparent; }
.aib-editor .gjs-pn-btn:hover { color: #93c5fd; background: var(--bg-elevated); }
.aib-editor .gjs-pn-btn.gjs-pn-active { color: #93c5fd; background: rgba(59,130,246,0.1); border-color: var(--border); box-shadow: none; }
.aib-editor .gjs-pn-btn svg { fill: currentColor; }
.aib-editor .gjs-block-category { border-bottom: 1px solid var(--border); }
.aib-editor .gjs-block-category .gjs-title { background: var(--bg-elevated); border-bottom: 1px solid var(--border); color: var(--text-muted); font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; font-size: 8px; }
.aib-editor .gjs-category-open { border-left: 2px solid #3b82f6; }
.aib-editor .gjs-blocks-c { padding: 7px; gap: 6px; }
.aib-editor .gjs-block {
  width: calc(50% - 3px); min-height: 54px;
  margin: 0 !important;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 7px 4px; border: 1px solid var(--border); background: var(--bg-input);
  color: var(--text-secondary); box-shadow: none;
}
.aib-editor .gjs-block:hover { border-color: rgba(96,165,250,0.45); background: var(--bg-elevated); color: #93c5fd; }
.aib-editor .gjs-block .material-icons-round { font-size: 20px; color: #60a5fa; }
.aib-editor .gjs-block-label { font-size: 8.5px; font-weight: 600; }
.aib-editor .gjs-block__media { display: flex; align-items: center; justify-content: center; }
.aib-editor .gjs-sm-sectors { background: var(--bg-surface); }
.aib-editor .gjs-sm-sector .gjs-sm-sector-title { background: var(--bg-elevated); border-bottom: 1px solid var(--border); color: var(--text-secondary); font-size: 9px; font-weight: 700; }
.aib-editor .gjs-sm-sector-title .gjs-sm-sector-caret { color: #60a5fa; }
.aib-editor .gjs-sm-property { border-bottom: 1px solid var(--border); }
.aib-editor .gjs-sm-label { color: var(--text-muted); }
.aib-editor .gjs-field { background: var(--bg-input); border: 1px solid var(--border); color: var(--text-primary); }
.aib-editor .gjs-field input, .aib-editor .gjs-field select, .aib-editor .gjs-field textarea { color: var(--text-primary); background: transparent; font-family: inherit; }
.aib-editor .gjs-field-arrow-u, .aib-editor .gjs-field-arrow-d { border-bottom-color: var(--text-muted); }
.aib-editor .gjs-input, .aib-editor .gjs-clm-tags { background: var(--bg-input); border-color: var(--border); color: var(--text-primary); }
.aib-editor .gjs-clm-tag { background: var(--bg-elevated); border: 1px solid var(--border); color: var(--text-secondary); }
.aib-editor .gjs-clm-tag.gjs-clm-tag-status { background: rgba(59,130,246,0.13); border-color: rgba(96,165,250,0.4); color: #93c5fd; }
.aib-editor .gjs-clm-sel, .aib-editor .gjs-clm-sel-id { color: var(--text-muted); }
.aib-editor .gjs-layer { border-bottom: 1px solid var(--border); color: var(--text-secondary); }
.aib-editor .gjs-layer:hover { background: var(--bg-elevated); }
.aib-editor .gjs-layer.gjs-selected { background: rgba(59,130,246,0.12); color: #93c5fd; }
.aib-editor .gjs-layer-title { font-size: 9px; }
.aib-editor .gjs-trt-trait { border-bottom: 1px solid var(--border); }
.aib-editor .gjs-trt-traits, .aib-editor .gjs-trt-header { background: var(--bg-surface); color: var(--text-secondary); }
.aib-editor .gjs-trt-header { font-weight: 700; }
.aib-editor .gjs-mdl-container { background: rgba(4,4,9,0.82); backdrop-filter: blur(4px); }
.aib-editor .gjs-mdl-dialog { background: var(--bg-surface); border: 1px solid var(--border-light); color: var(--text-secondary); box-shadow: 0 24px 70px rgba(0,0,0,0.65); }
.aib-editor .gjs-mdl-header { border-bottom: 1px solid var(--border); }
.aib-editor .gjs-mdl-title { color: var(--text-primary); font-size: 12px; }
.aib-editor .gjs-btn-prim { background: #3b82f6; border-color: #3b82f6; color: #fff; }
.aib-editor .gjs-btn-close { color: var(--text-muted); }
.aib-editor .gjs-btn-close:hover { color: var(--text-primary); }
.aib-editor .CodeMirror { background: #08080c; color: #93c5fd; border: 1px solid var(--border); }
.aib-editor .CodeMirror-gutters { background: #0b0b12; border-right-color: var(--border); }
.aib-editor .CodeMirror-linenumber { color: var(--text-muted); }
.aib-editor .gjs-am-asset { background: var(--bg-input); border-color: var(--border); }
.aib-editor .gjs-am-preview { background: #08080c; }
.aib-editor .gjs-rte-toolbar { background: var(--bg-surface); border: 1px solid var(--border-light); }
.aib-editor .gjs-rte-action { color: var(--text-muted); border-right-color: var(--border); }
.aib-editor .gjs-rte-action:hover { color: #93c5fd; }
.aib-editor .gjs-toolbar { background: #3b82f6; }
.aib-editor .gjs-toolbar-item { color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 1220px) {
  .aib-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .aib-field-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr) 130px; }
  .aib-workbench { grid-template-columns: minmax(0, 1fr) 330px; }
}
@media (max-width: 1080px) {
  .aib-header { grid-template-columns: 1fr; gap: 16px; }
  .aib-header-side { border-left: 0; border-top: 1px solid rgba(255,255,255,0.07); padding-left: 0; padding-top: 14px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 12px; }
  .aib-header-side-label { grid-column: 1; }
  .aib-header-side-value { grid-column: 1; font-size: 22px; }
  .aib-header-side-note, .aib-header-side-foot { grid-column: 2; margin-top: 0; }
  .aib-header-meter { grid-column: 1 / -1; margin-top: 6px; }
  .aib-layout { grid-template-columns: 1fr; }
  .aib-rail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .aib-how { grid-column: 1 / -1; }
  .aib-building { grid-template-columns: 320px minmax(0, 1fr); }
  .aib-studio-bar { flex-wrap: wrap; }
  .aib-workbench { gap: 0; }
}
@media (max-width: 900px) {
  .aib-workbench { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .aib-preview-pane { border-right: 0; }
  .aib-preview-stage { min-height: 480px; }
  .aib-chat-pane { display: none; border-top: 1px solid var(--border); min-height: 500px; }
  .aib-workbench[data-aib-tab="chat"] .aib-preview-pane { display: none; }
  .aib-workbench[data-aib-tab="chat"] .aib-chat-pane { display: flex; }
  .aib-device-tabs { display: flex; align-items: center; gap: 3px; padding: 3px; border: 1px solid var(--border); background: var(--bg-surface); }
  .aib-device-tabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 32px; border: 0; background: transparent; color: var(--text-muted); font-family: inherit; font-size: 9px; font-weight: 700; letter-spacing: 0.4px; cursor: pointer; }
  .aib-device-tabs button.is-active { background: rgba(59,130,246,0.1); color: #93c5fd; box-shadow: 0 0 0 1px var(--border); }
  .aib-device-tabs .material-icons-round { font-size: 15px; }
  .aib-chat-body { min-height: 300px; }
  .aib-building { grid-template-columns: 1fr; height: auto; }
  .aib-build-side { border-right: 0; border-bottom: 1px solid var(--border); }
  .aib-build-frame iframe { min-height: 420px; }
  .aib-build-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
  .aib-build-step:not(:last-child)::before { display: none; }
  .aib-work-tip { margin-top: 0; }
}
@media (max-width: 760px) {
  .aib-header { padding: 20px 17px; }
  .aib-header-main { align-items: flex-start; gap: 12px; }
  .aib-orb { width: 44px; height: 44px; flex-basis: 44px; }
  .aib-header h2 { font-size: 24px; }
  .aib-header p { font-size: 11px; }
  .aib-form { padding: 14px 15px 16px; }
  .aib-composer-top { padding: 15px 15px 0; }
  .aib-idea-row { padding: 0 15px 13px; }
  .aib-beta-note { padding: 9px 15px; }
  .aib-field-grid { grid-template-columns: 1fr; }
  .aib-field-foot { flex-direction: column; gap: 4px; align-items: flex-start; }
  .aib-composer-foot { flex-direction: column; align-items: stretch; }
  .aib-generate-btn { width: 100%; }
  .aib-kbd { display: none; }
  .aib-rail { grid-template-columns: 1fr; }
  .aib-how { grid-column: auto; }
  .aib-projects-head { flex-direction: column; }
  .aib-filters { width: 100%; }
  .aib-filters button { flex: 1; }
  .aib-site-grid { grid-template-columns: 1fr; }
  .aib-usage-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aib-usage-stat.is-main { grid-column: 1 / -1; }
  .aib-studio-name h3 { font-size: 13px; }
  .aib-studio-actions { width: 100%; justify-content: flex-end; }
  .aib-studio-actions .aib-publish-btn { flex: 1; }
  .aib-studio-foot .aib-foot-note { margin-left: 0; }
  .aib-preview-stage { padding: 8px; }
  .aib-preview-stage[data-device="tablet"] .aib-frame-shell { max-width: 100%; }
  .aib-preview-stage[data-device="mobile"] .aib-frame-shell { max-width: 360px; }
  .aib-preview-domain { display: none; }
  .aib-preview-toolbar { justify-content: space-between; }
  .aib-build-steps { grid-template-columns: 1fr; }
  .aib-build-preview { min-height: 380px; }
  .aib-build-frame iframe { min-height: 380px; }
  .aib-usage-summary-value { display: none; }
  .aib-usage-details > summary > div span { display: none; }
  .aib-editor-top { padding: 0 8px; gap: 8px; }
  .aib-editor-title b { max-width: 120px; }
  .aib-editor-title span { display: none; }
  .aib-editor-hint { font-size: 7.5px; padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .aib-editor-devices { display: none; }
  .aib-editor-tool[data-aib-editor-action="undo"],
  .aib-editor-tool[data-aib-editor-action="redo"],
  .aib-editor-tool[data-aib-editor-action="code"] { display: none; }
  .aib-editor { --gjs-left-width: 280px; }
}
@media (max-width: 520px) {
  .aib-studio-identity { width: 100%; }
  .aib-studio-actions { flex-wrap: wrap; }
  .aib-action-btn { width: auto; padding: 0 9px; }
  .aib-publish-btn span:last-child { display: inline; }
  .aib-preview-stage[data-device="mobile"] .aib-frame-shell { max-width: 100%; }
  .aib-suggestions button:nth-child(n+4) { display: none; }
  .aib-editor-left .aib-editor-orb { display: none; }
  .aib-editor-title b { max-width: 90px; }
  .aib-editor-actions .aib-editor-tool[data-aib-editor-action="preview"] { display: none; }
  .aib-editor-save span:last-child { display: none; }
  .aib-editor-save { width: 34px; padding: 0; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .aib-site-card, .aib-generate-btn, .aib-frame-shell, .aib-editor-feedback { transition: none; }
  .aib-kicker-dot, .aib-pill-dot, .aib-live-chip i, .aib-chat-live i, .aib-build-step.is-active .aib-build-step-dot .material-icons-round, .aib-preview-skeleton span, .aib-typing span { animation: none; }
}

/* AI builder accessibility + orb polish */
.aib-page button:focus-visible,
.aib-page a:focus-visible,
.aib-editor button:focus-visible,
.aib-editor a:focus-visible { outline: 2px solid #60a5fa; outline-offset: 2px; }
.aib-chat-form .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;
}
.aib-msg-avatar.has-mira-orb,
.aib-chat-orb.has-mira-orb,
.aib-chat-empty-icon.has-mira-orb {
  border-color: transparent;
  background: transparent;
}
.aib-chat-orb .mira-orb-anim { width: 22px; height: 22px; }
.aib-msg-avatar.has-mira-orb .mira-orb-anim { width: 20px; height: 20px; }
.aib-chat-empty-icon .mira-orb-anim { width: 30px; height: 30px; }

/* AI builder refinements after visual QA */
.aib-page .mira-orb-anim,
.aib-editor .mira-orb-anim { border-radius: 50% !important; }
.aib-editor .gjs-pn-devices-c { display: none !important; }
.aib-header p { font-size: 12.5px; }
.aib-generate-btn { width: auto; min-width: 250px; }
.aib-recent-copy b { font-size: 11px; }
.aib-how-step strong { font-size: 10.5px; }
.aib-how-step span { font-size: 9px; }
.aib-site-head h4 { font-size: 12.5px; }
.aib-msg-body { font-size: 10.5px; }
.aib-chat-context { font-size: 9px; }
.aib-chat-form textarea { font-size: 10.5px; }
.aib-suggestions button { font-size: 8.5px; }
.aib-chat-identity b { font-size: 11px; }
.aib-chat-identity span { font-size: 8.5px; }
.aib-chat-empty p { font-size: 9.5px; }
.aib-studio-url { font-size: 9px; }
.aib-studio-foot > span { font-size: 8.5px; }
.aib-preview-domain { font-size: 8.5px; }
.aib-build-meta { font-size: 9px; }
.aib-build-step b { font-size: 11px; }
.aib-build-step span:not(.aib-build-step-dot) { font-size: 9px; }
@media (max-width: 760px) {
  .aib-generate-btn { width: 100%; min-width: 0; }
}

.aib-site-new {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  min-height: 238px; padding: 20px; border: 1px dashed var(--border-light);
  background: transparent; color: var(--text-muted); font-family: inherit; cursor: pointer;
  transition: border-color 0.16s, background 0.16s, color 0.16s;
}
.aib-site-new:hover { border-color: rgba(96,165,250,0.45); background: rgba(59,130,246,0.035); color: var(--text-secondary); }
.aib-site-new-icon { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); background: var(--bg-input); color: #60a5fa; margin-bottom: 3px; }
.aib-site-new-icon .material-icons-round { font-size: 21px; }
.aib-site-new b { font-size: 11.5px; color: var(--text-secondary); }
.aib-site-new > span:last-child { font-size: 9px; color: var(--text-muted); }
.aib-site-new:hover b { color: #93c5fd; }

.aib-editor-title span i { background: #60a5fa; }
.aib-action-btn.is-loading .material-icons-round { animation: aiSpin 1s linear infinite; }

.aib-editor-hint-mobile { display: none; }
@media (max-width: 760px) {
  .aib-editor { --gjs-left-width: 0px; --gjs-canvas-top: 0px; }
  .aib-editor .gjs-pn-views,
  .aib-editor .gjs-pn-views-container { display: none !important; }
  .aib-editor .gjs-cv-canvas { width: 100%; }
  .aib-editor-hint-desktop { display: none; }
  .aib-editor-hint-mobile { display: inline; }
}

/* ---------- AI Builder full width + live build theatre ---------- */
.aib-page,
.aib-page.is-focus {
  max-width: none;
  width: 100%;
}
.aib-build-side { overflow: hidden; }
.aib-build-orb-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.aib-build-orb-ring {
  position: absolute;
  inset: 0;
  border-radius: 50% !important;
  background: conic-gradient(#60a5fa calc(var(--pct, 0) * 1%), rgba(255,255,255,0.08) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 0);
  mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 0);
  box-shadow: 0 0 18px rgba(59,130,246,0.2);
  transition: background 0.35s ease;
}
.aib-build-orb {
  position: absolute;
  inset: 6px;
  width: auto;
  height: auto;
  flex: none;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}
.aib-build-orb .mira-orb-anim { width: 100%; height: 100%; }
.aib-build-progress { position: relative; overflow: hidden; }
.aib-build-progress span { position: relative; overflow: hidden; }
.aib-build-progress span::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
  animation: aibProgressShine 1.8s linear infinite;
}
@keyframes aibProgressShine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

.aib-live-activity {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 120px;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  overflow: hidden;
}
.aib-live-activity-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.aib-live-activity-head b {
  margin-left: auto;
  padding: 1px 5px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 7.5px;
}
.aib-live-activity-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50% !important;
  background: #60a5fa;
  box-shadow: 0 0 0 0 rgba(96,165,250,0.45);
  animation: aiPulse 2s ease-out infinite;
}
.aib-live-activity-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  padding-right: 2px;
}
.aib-log-item {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.035);
}
.aib-log-item.is-active { animation: aibLogIn 0.25s ease both; }
.aib-log-item:last-child { border-bottom: 0; }
@keyframes aibLogIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.aib-log-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-muted);
}
.aib-log-icon .material-icons-round { font-size: 10px; }
.aib-log-item.is-active .aib-log-icon { color: #60a5fa; border-color: rgba(96,165,250,0.4); background: rgba(59,130,246,0.09); }
.aib-log-item.is-active .aib-log-icon .material-icons-round { animation: aiSpin 1.8s linear infinite; }
.aib-log-item.is-done .aib-log-icon { color: var(--green); border-color: rgba(34,197,94,0.3); background: rgba(34,197,94,0.06); }
.aib-log-text { flex: 1; min-width: 0; font-size: 9.5px; line-height: 1.45; color: var(--text-muted); }
.aib-log-item.is-active .aib-log-text { color: var(--text-primary); }
.aib-log-item.is-done .aib-log-text { color: var(--text-secondary); }
.aib-log-time { flex: 0 0 auto; padding-top: 2px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 7px; color: var(--text-muted); }
.aib-log-empty { padding: 6px 0; font-size: 9px; color: var(--text-muted); }
.aib-build-side .aib-work-tip { margin-top: 10px; padding-top: 0; }

.aib-build-frame { overflow: hidden; }
.aib-build-scan {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}
.aib-build-scan::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 28%;
  top: -30%;
  background: linear-gradient(180deg, transparent 0%, rgba(59,130,246,0.07) 35%, rgba(96,165,250,0.22) 52%, transparent 100%);
  animation: aibScan 5.2s ease-in-out infinite;
}
@keyframes aibScan {
  0%, 12% { top: -30%; }
  70%, 100% { top: 112%; }
}

.aib-stream-panel {
  flex: 0 0 176px;
  height: 176px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-top: 1px solid var(--border);
  background: #07070b;
  transition: flex-basis 0.2s ease, height 0.2s ease;
}
.aib-stream-panel.is-collapsed { flex-basis: 34px; height: 34px; }
.aib-stream-panel.is-collapsed .aib-stream-code { display: none; }
.aib-stream-head {
  flex: 0 0 34px;
  height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}
.aib-stream-dots { display: flex; gap: 3px; }
.aib-stream-dots i { width: 4px; height: 4px; border-radius: 50% !important; background: var(--border-light); }
.aib-stream-file { display: inline-flex; align-items: center; gap: 4px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 8px; color: var(--text-secondary); white-space: nowrap; }
.aib-stream-file .material-icons-round { font-size: 12px; color: #60a5fa; }
.aib-stream-writing { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 7.5px; font-weight: 800; letter-spacing: 0.7px; text-transform: uppercase; color: #93c5fd; white-space: nowrap; }
.aib-stream-writing i { width: 5px; height: 5px; border-radius: 50% !important; background: #60a5fa; animation: aiPulse 2s ease-out infinite; }
.aib-stream-size { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 7.5px; color: var(--text-muted); white-space: nowrap; }
.aib-stream-toggle { width: 22px; height: 22px; flex: 0 0 22px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; background: transparent; color: var(--text-muted); cursor: pointer; }
.aib-stream-toggle:hover { color: #93c5fd; border-color: var(--border); }
.aib-stream-toggle .material-icons-round { font-size: 15px; }
.aib-stream-code {
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 9px 11px;
  overflow: auto;
  scrollbar-width: thin;
  background: #07070b;
  color: #9ecbff;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 8.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.aib-stream-code code { padding: 0; background: transparent; font-family: inherit; font-size: inherit; }
.aib-stream-code code.hljs { display: block; padding: 0 !important; background: transparent !important; }
.aib-stream-code::after { content: '▍'; margin-left: 1px; color: #60a5fa; animation: aibBlink 1s step-end infinite; }
@keyframes aibBlink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

@media (max-width: 900px) {
  .aib-live-activity { min-height: 100px; max-height: 210px; }
  .aib-stream-panel { flex-basis: 140px; height: 140px; }
  .aib-stream-panel.is-collapsed { flex-basis: 34px; height: 34px; }
}
@media (max-width: 760px) {
  .aib-stream-size { display: none; }
  .aib-stream-writing { font-size: 7px; }
  .aib-live-activity { max-height: 180px; }
  .aib-stream-panel { flex-basis: 120px; height: 120px; }
  .aib-stream-panel.is-collapsed { flex-basis: 34px; height: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .aib-build-progress span::after,
  .aib-build-scan::before,
  .aib-live-activity-pulse,
  .aib-stream-writing i,
  .aib-log-item,
  .aib-stream-code::after { animation: none; }
}

.aib-build-frame { min-height: 0; }
.aib-build-frame iframe { min-height: 0; height: 100%; }
@media (max-width: 900px) {
  .aib-build-preview { min-height: 540px; }
}
@media (max-width: 760px) {
  .aib-build-preview { min-height: 500px; }
}

@media (max-width: 900px) {
  .aib-building { display: flex; flex-direction: column; }
  .aib-build-side { display: contents; }
  .aib-build-top { order: 1; padding: 16px 15px 0; }
  .aib-build-status { order: 2; margin: 13px 15px 0; }
  .aib-build-progress { order: 3; margin: 9px 15px 0; }
  .aib-build-meta { order: 4; margin: 8px 15px 14px; }
  .aib-build-preview {
    order: 5;
    width: 100%;
    min-height: 520px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }
  .aib-build-steps { order: 6; margin: 0; padding: 14px 15px 0; }
  .aib-live-activity { order: 7; margin: 14px 15px 0; }
  .aib-build-side .aib-work-tip { order: 8; margin: 0; padding: 12px 15px 16px; }
  .aib-build-top h3 { font-size: 16px; }
}

/* ==========================================================================
   AI APPS 2.0
   ========================================================================== */
.aia-page { width: 100%; max-width: none; margin: 0; }
.aia-page.is-focus .aia-header { display: none; }

/* ---------- Header ---------- */
.aia-header {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 324px;
  gap: 28px;
  align-items: stretch;
  margin-bottom: 16px;
  padding: 26px 28px;
  border: 1px solid rgba(52, 211, 153, 0.18);
  background:
    radial-gradient(circle at 10% 12%, rgba(16, 185, 129, 0.15), transparent 34%),
    radial-gradient(circle at 88% 90%, rgba(59, 130, 246, 0.16), transparent 42%),
    var(--bg-surface);
}
.aia-header::before {
  content: '';
  position: absolute; top: 0; left: 0; width: 380px; height: 2px;
  background: linear-gradient(90deg, #34d399, #22d3ee 46%, #3b82f6 76%, transparent);
}
.aia-header-glow {
  position: absolute; width: 300px; height: 300px; right: 110px; top: -180px;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.18), transparent 68%);
  pointer-events: none;
}
.aia-header-grid {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.34;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(90deg, #000, transparent 74%);
  -webkit-mask-image: linear-gradient(90deg, #000, transparent 74%);
}
.aia-header-main { position: relative; z-index: 1; display: flex; align-items: center; gap: 18px; min-width: 0; }
.aia-orb {
  width: 60px; height: 60px; flex: 0 0 60px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(52, 211, 153, 0.4);
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.2), transparent 38%),
    linear-gradient(135deg, rgba(16,185,129,0.32), rgba(59,130,246,0.2));
  color: #a7f3d0;
  box-shadow: 0 0 42px rgba(16, 185, 129, 0.18);
}
.aia-header-copy { min-width: 0; }
.aia-kicker {
  display: flex; align-items: center; gap: 7px;
  font-size: 9px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase;
  color: #34d399;
}
.aia-kicker-sep { color: var(--text-muted); }
.aia-kicker-dot { width: 6px; height: 6px; background: #34d399; animation: aiPulse 2.4s ease-out infinite; }
.aia-header h2 {
  margin: 9px 0 7px;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -1.15px;
}
.aia-header h2 span { color: #a7f3d0; }
.aia-header p { max-width: 720px; font-size: 12px; line-height: 1.65; color: var(--text-secondary); }
.aia-header-tags { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 13px; }
.aia-header-tags span { display: inline-flex; align-items: center; gap: 5px; font-size: 8.5px; color: var(--text-muted); }
.aia-header-tags .material-icons-round { font-size: 13px; color: rgba(52, 211, 153, 0.78); }
.aia-header-side {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; justify-content: center;
  padding-left: 24px;
  border-left: 1px solid rgba(255,255,255,0.07);
}
.aia-head-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--border); background: var(--border); gap: 1px;
}
.aia-head-stats > div { min-width: 0; padding: 9px 10px; background: rgba(8, 12, 18, 0.72); }
.aia-head-stats span { display: block; font-size: 7.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); }
.aia-head-stats b { display: block; margin-top: 3px; font-size: 21px; line-height: 1; letter-spacing: -0.6px; color: var(--text-primary); }
.aia-head-stats b.is-green { color: #6ee7b7; }
.aia-head-quota { margin-top: 10px; padding: 10px 11px; border: 1px solid rgba(52, 211, 153, 0.2); background: rgba(16, 185, 129, 0.035); }
.aia-head-quota-copy { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px; }
.aia-head-quota-copy span { width: 100%; font-size: 7.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); }
.aia-head-quota-copy b { font-size: 19px; line-height: 1; letter-spacing: -0.5px; color: #a7f3d0; }
.aia-head-quota-copy em { font-style: normal; font-size: 8.5px; color: var(--text-muted); }
.aia-head-quota-bar { height: 4px; margin-top: 8px; background: var(--bg-input); overflow: hidden; }
.aia-head-quota-bar span { display: block; height: 100%; background: linear-gradient(90deg, #10b981, #22d3ee); }
.aia-head-quota-foot { margin-top: 7px; font-size: 8px; line-height: 1.45; color: var(--text-muted); }
.aia-head-quota.is-blocked { border-color: rgba(239, 68, 68, 0.32); background: rgba(239, 68, 68, 0.04); }
.aia-head-quota.is-blocked .aia-head-quota-copy b { color: var(--red); }
.aia-head-quota.is-blocked .aia-head-quota-bar span { background: var(--red); }

/* ---------- Landing ---------- */
.aia-landing { display: flex; flex-direction: column; }
.aia-layout { display: grid; grid-template-columns: minmax(0, 1fr) clamp(310px, 23vw, 370px); gap: 16px; align-items: start; }
.aia-main-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.aia-rail { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

/* ---------- Composer ---------- */
.aia-composer {
  position: relative; overflow: hidden;
  border: 1px solid var(--border); background: var(--bg-surface);
}
.aia-composer::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, #10b981, #22d3ee 42%, #3b82f6 78%, transparent 92%);
}
.aia-card-kicker { font-size: 8.5px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-muted); }
.aia-composer-top { display: flex; align-items: center; gap: 11px; padding: 18px 20px 0; }
.aia-composer-orb { width: 38px; height: 38px; flex: 0 0 38px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(52,211,153,0.3); background: rgba(16,185,129,0.07); }
.aia-composer-orb .mira-orb { width: 28px; height: 28px; }
.aia-composer-heading h3 { margin-top: 2px; font-size: 20px; letter-spacing: -0.5px; }
.aia-live-pill {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 8px; border: 1px solid rgba(34,197,94,0.25);
  background: rgba(34,197,94,0.06); color: var(--green);
  font-size: 8px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase;
}
.aia-live-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); animation: aiPulse 2s ease-out infinite; }
.aia-form { padding: 16px 20px 18px; }
.aia-field-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr) 132px; gap: 10px; }
.aia-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.aia-field label { font-size: 9.5px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--text-secondary); }
.aia-field .form-input { font-size: 12.5px; padding: 10px 12px; background: var(--bg-input); }
.aia-field-brief { margin-top: 13px; }
.aia-field textarea.form-input { min-height: 150px; resize: vertical; line-height: 1.64; font-size: 13px; padding: 13px 14px; }
.aia-field-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-top: 1px; }
.aia-field-foot > span:first-child { font-size: 9px; line-height: 1.5; color: var(--text-muted); }
.aia-counter { flex: 0 0 auto; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 9px; color: var(--text-muted); }
.aia-counter b { color: var(--text-secondary); }
.aia-form-error { min-height: 0; margin-top: 8px; font-size: 10.5px; color: var(--red); }
.aia-form-error:not(:empty) { min-height: 18px; }
.aia-block-banner {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 11px; padding: 11px 12px;
  border: 1px solid rgba(239,68,68,0.3); background: rgba(239,68,68,0.05);
}
.aia-block-banner .material-icons-round { font-size: 19px; color: var(--red); }
.aia-block-banner > div { flex: 1; min-width: 0; }
.aia-block-banner b { display: block; font-size: 10.5px; color: var(--text-primary); }
.aia-block-banner p { margin-top: 2px; font-size: 9.5px; line-height: 1.5; color: var(--text-muted); }
.aia-composer-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border);
}
.aia-quota-inline { display: flex; align-items: center; gap: 9px; min-width: 0; flex-wrap: wrap; }
.aia-quota-inline > .material-icons-round { font-size: 17px; color: #34d399; }
.aia-quota-inline > div:not(.aia-quota-inline-bar) { display: flex; flex-direction: column; }
.aia-quota-inline b { font-size: 11px; color: var(--text-primary); }
.aia-quota-inline span { font-size: 8.5px; color: var(--text-muted); }
.aia-quota-inline-bar { width: 86px; height: 3px; background: var(--bg-input); overflow: hidden; }
.aia-quota-inline-bar span { display: block; height: 100%; background: linear-gradient(90deg, #10b981, #22d3ee); }
.aia-quota-inline.is-blocked > .material-icons-round,
.aia-quota-inline.is-blocked b { color: var(--red); }
.aia-quota-inline.is-blocked .aia-quota-inline-bar span { background: var(--red); }
.aia-generate-btn {
  height: 46px; padding: 0 19px;
  font-size: 11px; letter-spacing: 0.5px; gap: 8px; white-space: nowrap;
  background-image: linear-gradient(120deg, #047857 0%, #10b981 48%, #0ea5e9 100%);
  background-size: 180% 100%;
  box-shadow: 0 8px 28px rgba(16, 185, 129, 0.2);
  transition: background-position 0.35s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.aia-generate-btn:hover { background-position: 100% 0; transform: translateY(-1px); box-shadow: 0 10px 34px rgba(16, 185, 129, 0.28); }
.aia-generate-btn:active { transform: translateY(0); }
.aia-generate-btn .material-icons-round { font-size: 18px; }
.aia-kbd { padding: 2px 5px; border: 1px solid rgba(255,255,255,0.22); font-size: 8px; font-weight: 700; letter-spacing: 0.2px; opacity: 0.8; }
.aia-idea-row { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; padding: 0 20px 14px; }
.aia-idea-row > span { font-size: 8.5px; font-weight: 700; letter-spacing: 0.7px; text-transform: uppercase; color: var(--text-muted); }
.aia-idea-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.aia-idea-chips button {
  padding: 4px 8px; border: 1px solid var(--border); background: var(--bg-input);
  color: var(--text-secondary); font-family: inherit; font-size: 9px; cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.aia-idea-chips button:hover { color: #6ee7b7; border-color: rgba(52,211,153,0.44); background: rgba(16,185,129,0.06); }
.aia-note-row { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 9px 20px; border-top: 1px solid var(--border); background: rgba(0,0,0,0.12); }
.aia-note-row span { display: inline-flex; align-items: center; gap: 4px; font-size: 8.5px; color: var(--text-muted); }
.aia-note-row .material-icons-round { font-size: 12px; color: #34d399; }

/* ---------- Projects ---------- */
.aia-projects { border: 1px solid var(--border); background: var(--bg-surface); overflow: hidden; }
.aia-projects-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 17px 18px; border-bottom: 1px solid var(--border); }
.aia-projects-head h3 { margin-top: 3px; font-size: 18px; letter-spacing: -0.45px; }
.aia-projects-head p { margin-top: 3px; font-size: 9.5px; color: var(--text-muted); }
.aia-projects-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.aia-search { position: relative; display: flex; align-items: center; width: 230px; }
.aia-search > .material-icons-round { position: absolute; left: 9px; font-size: 15px; color: var(--text-muted); pointer-events: none; }
.aia-search input {
  width: 100%; height: 32px; padding: 0 10px 0 31px;
  border: 1px solid var(--border); background: var(--bg-input);
  color: var(--text-primary); font-family: inherit; font-size: 10px;
}
.aia-search input::-webkit-search-cancel-button { display: none; }
.aia-search input::placeholder { color: var(--text-muted); }
.aia-search input:focus { outline: none; border-color: rgba(52,211,153,0.55); box-shadow: 0 0 0 2px rgba(16,185,129,0.1); }
.aia-filters { display: flex; align-items: center; gap: 3px; padding: 3px; border: 1px solid var(--border); background: var(--bg-input); flex: 0 0 auto; }
.aia-filters button {
  padding: 5px 8px; border: 0; background: transparent;
  color: var(--text-muted); font-family: inherit; font-size: 8.5px; font-weight: 700;
  letter-spacing: 0.3px; cursor: pointer; white-space: nowrap;
}
.aia-filters button b { margin-left: 3px; color: var(--text-muted); font-weight: 700; }
.aia-filters button:hover { color: var(--text-secondary); }
.aia-filters button.is-active { background: var(--bg-surface); color: #6ee7b7; box-shadow: 0 0 0 1px var(--border); }
.aia-filters button.is-active b { color: #34d399; }
.aia-app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(284px, 1fr)); gap: 13px; padding: 15px 18px 18px; }
.aia-app-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--border); background: var(--bg-input); overflow: hidden; transition: border-color 0.18s, background 0.18s, transform 0.18s; }
.aia-app-card:hover { border-color: rgba(52,211,153,0.38); background: var(--bg-elevated); transform: translateY(-2px); }
.aia-app-thumb { position: relative; height: 150px; overflow: hidden; border-bottom: 1px solid var(--border); background: #08080d; }
.aia-app-thumb::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 82% 8%, hsla(var(--hue), 70%, 52%, 0.2), transparent 40%);
}
.aia-thumb-browser { display: flex; align-items: center; gap: 3px; height: 20px; padding: 0 7px; border-bottom: 1px solid rgba(255,255,255,0.07); background: rgba(0,0,0,0.35); }
.aia-thumb-browser i { width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,0.24); }
.aia-thumb-browser i:first-child { background: #ef4444; }
.aia-thumb-browser i:nth-child(2) { background: var(--gold); }
.aia-thumb-browser i:nth-child(3) { background: var(--green); }
.aia-thumb-browser em { margin-left: 4px; font-style: normal; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 6px; color: rgba(255,255,255,0.36); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aia-thumb-canvas {
  position: absolute; inset: 20px 0 0 0; display: flex; gap: 8px; padding: 13px;
  background:
    radial-gradient(circle at 78% 18%, hsla(var(--hue), 58%, 46%, 0.22), transparent 38%),
    linear-gradient(140deg, hsl(var(--hue), 38%, 11%), #07070c 74%);
}
.aia-thumb-side { width: 38px; flex: 0 0 38px; border: 1px solid rgba(255,255,255,0.07); background: rgba(0,0,0,0.24); }
.aia-thumb-side::before {
  content: ''; display: block; width: 18px; height: 18px; margin: 7px auto;
  border: 1px solid hsla(var(--hue), 70%, 68%, 0.42);
  background: hsla(var(--hue), 64%, 46%, 0.2);
}
.aia-thumb-main { flex: 1; min-width: 0; padding-top: 3px; }
.aia-thumb-brand {
  display: flex; align-items: center; justify-content: center;
  width: 23px; height: 23px; margin-bottom: 8px;
  border: 1px solid hsla(var(--hue), 70%, 68%, 0.45);
  background: hsla(var(--hue), 60%, 42%, 0.18);
  color: hsl(var(--hue), 80%, 80%);
  font-size: 9px; font-weight: 800;
}
.aia-thumb-line { display: block; height: 4px; width: 76%; margin-top: 5px; background: rgba(255,255,255,0.15); }
.aia-thumb-line.is-title { width: 48%; height: 6px; background: rgba(255,255,255,0.28); }
.aia-thumb-row { display: flex; gap: 4px; margin-top: 8px; }
.aia-thumb-row i { flex: 1; height: 18px; border: 1px solid rgba(255,255,255,0.06); background: rgba(255,255,255,0.035); }
.aia-thumb-button { display: block; width: 48px; height: 11px; margin-top: 8px; background: hsl(var(--hue), 66%, 48%); opacity: 0.72; }
.aia-status-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 6px; border: 1px solid transparent;
  font-size: 7.5px; font-weight: 800; letter-spacing: 0.7px; text-transform: uppercase;
  white-space: nowrap;
}
.aia-app-thumb > .aia-status-pill { position: absolute; top: 8px; left: 8px; z-index: 3; }
.aia-status-pill i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.aia-status-pill.is-live { color: #86efac; background: rgba(6, 30, 18, 0.78); border-color: rgba(34,197,94,0.35); }
.aia-status-pill.is-ready { color: #bfdbfe; background: rgba(10, 22, 44, 0.78); border-color: rgba(96,165,250,0.34); }
.aia-status-pill.is-deploying { color: #fcd34d; background: rgba(35, 25, 4, 0.78); border-color: rgba(240,180,41,0.3); }
.aia-status-pill.is-draft, .aia-status-pill.is-stopped { color: #fcd34d; background: rgba(35, 25, 4, 0.72); border-color: rgba(240,180,41,0.28); }
.aia-status-pill.is-error { color: #fca5a5; background: rgba(38, 8, 8, 0.76); border-color: rgba(239,68,68,0.32); }
.aia-thumb-version {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  padding: 2px 6px; border: 1px solid rgba(255,255,255,0.15);
  background: rgba(0,0,0,0.34); color: #a7f3d0;
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 8px;
}
.aia-app-body { display: flex; flex-direction: column; flex: 1; padding: 11px 12px 12px; }
.aia-app-body h4 { font-size: 12.5px; line-height: 1.3; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aia-app-url { margin-top: 3px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 8px; color: #34d399; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aia-app-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 9px; border: 1px solid var(--border); background: var(--border); }
.aia-app-meta > span { min-width: 0; padding: 6px 7px; background: var(--bg-surface); }
.aia-app-meta b { display: block; font-size: 9.5px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aia-app-meta em { display: block; margin-top: 1px; font-style: normal; font-size: 7px; letter-spacing: 0.4px; text-transform: uppercase; color: var(--text-muted); }
.aia-app-git {
  display: flex; align-items: center; gap: 5px; min-width: 0;
  margin-top: 8px; padding: 5px 7px;
  border: 1px solid var(--border); background: rgba(0,0,0,0.12);
  font-size: 8px; color: var(--text-muted);
}
.aia-app-git .material-icons-round { font-size: 12px; flex: 0 0 auto; }
.aia-app-git > span:nth-child(2) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aia-app-git code { margin-left: auto; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 8px; color: var(--text-secondary); }
.aia-app-git.is-linked { border-color: rgba(52,211,153,0.2); background: rgba(16,185,129,0.04); }
.aia-app-git.is-linked .material-icons-round, .aia-app-git.is-linked code { color: #6ee7b7; }
.aia-app-git.is-pending { border-color: rgba(240,180,41,0.2); background: rgba(240,180,41,0.035); }
.aia-app-git.is-pending .material-icons-round { color: var(--gold); }
.aia-app-actions { display: flex; align-items: center; gap: 5px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--border); }
.aia-card-open {
  flex: 1; display: inline-flex; align-items: center; justify-content: space-between; gap: 6px;
  height: 29px; padding: 0 9px; border: 1px solid rgba(52,211,153,0.3);
  background: rgba(16,185,129,0.07); color: #6ee7b7;
  font-family: inherit; font-size: 8.5px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase;
  cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.aia-card-open:hover { background: rgba(16,185,129,0.14); border-color: rgba(52,211,153,0.58); color: #d1fae5; }
.aia-card-open .material-icons-round { font-size: 13px; }
.aia-card-icon {
  width: 29px; height: 29px; flex: 0 0 29px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: transparent; color: var(--text-muted);
  cursor: pointer; text-decoration: none; transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.aia-card-icon:hover { color: #6ee7b7; border-color: rgba(52,211,153,0.42); background: rgba(16,185,129,0.06); }
.aia-card-icon.is-live { color: var(--green); border-color: rgba(34,197,94,0.3); }
.aia-card-icon.is-live:hover { color: #86efac; border-color: rgba(34,197,94,0.55); background: rgba(34,197,94,0.07); }
.aia-card-icon .material-icons-round { font-size: 15px; }
.aia-new-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  min-height: 310px; padding: 22px; border: 1px dashed rgba(52,211,153,0.28);
  background: rgba(16,185,129,0.025); color: var(--text-muted); font-family: inherit; cursor: pointer;
  text-align: center; transition: border-color 0.15s, background 0.15s;
}
.aia-new-card:hover { border-color: rgba(52,211,153,0.55); background: rgba(16,185,129,0.06); }
.aia-new-card-icon { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(52,211,153,0.28); background: rgba(16,185,129,0.07); color: #6ee7b7; }
.aia-new-card-icon .material-icons-round { font-size: 20px; }
.aia-new-card b { font-size: 11.5px; color: var(--text-secondary); }
.aia-new-card > span:last-child { max-width: 210px; font-size: 9px; line-height: 1.5; }
.aia-no-results {
  grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 36px 16px; border: 1px dashed var(--border); background: rgba(0,0,0,0.08); text-align: center;
}
.aia-no-results .material-icons-round { font-size: 28px; color: rgba(52,211,153,0.45); }
.aia-no-results b { margin-top: 8px; font-size: 12px; color: var(--text-primary); }
.aia-no-results p { margin-top: 4px; font-size: 9px; color: var(--text-muted); }

/* ---------- Rail ---------- */
.aia-rail-card { border: 1px solid var(--border); background: var(--bg-surface); padding: 14px 15px; }
.aia-rail-head { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; font-size: 8.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); }
.aia-rail-head .material-icons-round { font-size: 15px; color: #34d399; }
.aia-rail-head b { margin-left: auto; padding: 1px 6px; border: 1px solid var(--border); background: var(--bg-input); color: var(--text-secondary); font-size: 8px; font-weight: 700; letter-spacing: 0.3px; text-transform: none; }
.aia-rail-copy { font-size: 9px; line-height: 1.55; color: var(--text-muted); }
.aia-vps-live { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border: 1px solid rgba(34,197,94,0.22); background: rgba(34,197,94,0.045); }
.aia-vps-live > i { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(34,197,94,0.11); }
.aia-vps-live b { display: block; font-size: 10px; color: var(--text-primary); }
.aia-vps-live span { display: block; margin-top: 1px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 8px; color: #6ee7b7; }
.aia-vps-live + .aia-rail-copy { margin-top: 8px; }
.aia-vps-empty { padding: 12px 10px; border: 1px dashed rgba(240,180,41,0.28); background: rgba(240,180,41,0.035); text-align: center; }
.aia-vps-empty .material-icons-round { font-size: 22px; color: var(--gold); }
.aia-vps-empty b { display: block; margin-top: 5px; font-size: 10.5px; color: var(--text-secondary); }
.aia-vps-empty p { margin-top: 3px; font-size: 8.5px; line-height: 1.5; color: var(--text-muted); }
.aia-rail-btn {
  display: flex; align-items: center; justify-content: center; gap: 5px; width: 100%;
  margin-top: 10px; height: 30px; padding: 0 9px;
  border: 1px solid rgba(96,165,250,0.28); background: rgba(59,130,246,0.06);
  color: #bfdbfe; font-family: inherit; font-size: 8.5px; font-weight: 700; letter-spacing: 0.3px; cursor: pointer;
}
.aia-rail-btn:hover { border-color: rgba(96,165,250,0.5); background: rgba(59,130,246,0.1); color: #fff; }
.aia-rail-btn:disabled { opacity: 0.55; cursor: wait; }
.aia-rail-btn.is-warn { border-color: rgba(240,180,41,0.3); background: rgba(240,180,41,0.05); color: #fcd34d; }
.aia-rail-btn .material-icons-round { font-size: 13px; }
.aia-rail-link {
  display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%;
  margin-top: 9px; padding: 0; border: 0; background: transparent;
  color: #60a5fa; font-family: inherit; font-size: 8.5px; text-align: left; cursor: pointer;
}
.aia-rail-link:hover { color: #bfdbfe; text-decoration: underline; }
.aia-rail-link .material-icons-round { font-size: 12px; }
.aia-git-latest { display: flex; align-items: center; gap: 8px; margin-top: 9px; padding: 8px 9px; border: 1px solid rgba(52,211,153,0.2); background: rgba(16,185,129,0.04); min-width: 0; }
.aia-git-latest > .material-icons-round { font-size: 16px; color: #6ee7b7; flex: 0 0 auto; }
.aia-git-latest > div { min-width: 0; flex: 1; }
.aia-git-latest b { display: block; font-size: 9.5px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aia-git-latest code { display: block; margin-top: 1px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 8px; color: #6ee7b7; }
.aia-git-latest span { display: block; margin-top: 1px; font-size: 7.5px; color: var(--text-muted); }
.aia-git-latest > a { flex: 0 0 26px; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; border: 1px solid transparent; color: var(--text-muted); }
.aia-git-latest > a:hover { color: #6ee7b7; border-color: rgba(52,211,153,0.3); background: rgba(16,185,129,0.06); }
.aia-git-latest > a .material-icons-round { font-size: 14px; }
.aia-git-empty { display: flex; align-items: center; gap: 6px; margin-top: 9px; padding: 8px 9px; border: 1px dashed var(--border); font-size: 8.5px; line-height: 1.5; color: var(--text-muted); }
.aia-git-empty .material-icons-round { font-size: 14px; color: var(--gold); flex: 0 0 auto; }
.aia-how-step { display: flex; gap: 9px; padding: 8px 0; border-top: 1px solid var(--border); }
.aia-how-step:first-of-type { border-top: 0; }
.aia-how-step > b { flex: 0 0 24px; height: 22px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(52,211,153,0.22); background: rgba(16,185,129,0.06); color: #34d399; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 8px; }
.aia-how-step strong { display: block; font-size: 10px; color: var(--text-primary); }
.aia-how-step span { display: block; margin-top: 1px; font-size: 8.5px; line-height: 1.45; color: var(--text-muted); }

/* ---------- Working ---------- */
.aia-building {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  height: clamp(620px, calc(100vh - 146px), 940px);
  min-height: 620px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
}
.aia-build-side { display: flex; flex-direction: column; padding: 20px 20px 17px; border-right: 1px solid var(--border); min-width: 0; }
.aia-build-top { display: flex; align-items: center; gap: 10px; }
.aia-build-orb { width: 36px; height: 36px; flex: 0 0 36px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(52,211,153,0.3); background: rgba(16,185,129,0.07); }
.aia-build-top h3 { margin-top: 2px; font-size: 17px; letter-spacing: -0.45px; }
.aia-cancel { margin-left: auto; border: 1px solid var(--border); background: transparent; color: var(--text-muted); font-family: inherit; font-size: 8.5px; font-weight: 700; padding: 6px 8px; cursor: pointer; white-space: nowrap; }
.aia-cancel:hover { color: var(--red); border-color: rgba(239,68,68,0.4); }
.aia-build-status { margin-top: 20px; min-height: 30px; font-size: 11px; line-height: 1.5; color: var(--text-secondary); }
.aia-build-progress { height: 4px; margin-top: 9px; background: var(--bg-input); overflow: hidden; }
.aia-build-progress span { display: block; height: 100%; background: linear-gradient(90deg, #10b981, #22d3ee); transition: width 0.35s ease; }
.aia-build-meta { display: flex; align-items: center; gap: 12px; margin-top: 8px; font-size: 8.5px; color: var(--text-muted); }
.aia-build-meta span { display: inline-flex; align-items: center; gap: 4px; }
.aia-build-meta .material-icons-round { font-size: 12px; }
.aia-build-meta b { color: var(--text-secondary); }
.aia-build-meta span:last-child { margin-left: auto; color: #6ee7b7; }
.aia-build-steps { margin-top: 20px; display: flex; flex-direction: column; }
.aia-build-step { position: relative; display: flex; gap: 10px; padding: 9px 0; opacity: 0.42; transition: opacity 0.25s; }
.aia-build-step.is-active, .aia-build-step.is-done { opacity: 1; }
.aia-build-step:not(:last-child)::before { content: ''; position: absolute; left: 10px; top: 32px; bottom: -1px; width: 1px; background: var(--border); }
.aia-build-step.is-done:not(:last-child)::before { background: rgba(34,197,94,0.32); }
.aia-build-step-dot { width: 21px; height: 21px; flex: 0 0 21px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); background: var(--bg-input); color: var(--text-muted); }
.aia-build-step-dot .material-icons-round { font-size: 13px; }
.aia-build-step.is-active .aia-build-step-dot { border-color: rgba(52,211,153,0.5); background: rgba(16,185,129,0.1); color: #34d399; }
.aia-build-step.is-active .aia-build-step-dot .material-icons-round { animation: aiSpin 1.8s linear infinite; }
.aia-build-step.is-done .aia-build-step-dot { border-color: rgba(34,197,94,0.38); background: rgba(34,197,94,0.08); color: var(--green); }
.aia-build-step b { display: block; font-size: 10.5px; color: var(--text-secondary); }
.aia-build-step.is-active b { color: var(--text-primary); }
.aia-build-step span:not(.aia-build-step-dot) { display: block; margin-top: 2px; font-size: 8.5px; line-height: 1.45; color: var(--text-muted); }
.aia-build-log-box { margin-top: 15px; border: 1px solid var(--border); background: rgba(0,0,0,0.14); }
.aia-build-log-head { display: flex; align-items: center; gap: 6px; padding: 7px 9px; border-bottom: 1px solid var(--border); font-size: 8px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-muted); }
.aia-build-log-head b { margin-left: auto; padding: 0 5px; border: 1px solid var(--border); color: var(--text-secondary); font-size: 7.5px; }
.aia-build-pulse { width: 5px; height: 5px; background: #34d399; animation: aiaPulse 1.8s ease-out infinite; }
.aia-build-log { max-height: 118px; overflow-y: auto; padding: 5px 8px; scrollbar-width: thin; }
.aia-log-item { display: flex; align-items: center; gap: 6px; padding: 4px 0; font-size: 8px; color: var(--text-muted); }
.aia-log-icon { width: 14px; height: 14px; flex: 0 0 14px; display: flex; align-items: center; justify-content: center; color: #34d399; }
.aia-log-icon .material-icons-round { font-size: 11px; }
.aia-log-item.is-active .aia-log-icon .material-icons-round { animation: aiSpin 2s linear infinite; }
.aia-log-text { flex: 1; min-width: 0; line-height: 1.45; }
.aia-log-item.is-active .aia-log-text { color: var(--text-secondary); }
.aia-log-time { flex: 0 0 auto; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 7px; opacity: 0.6; }
.aia-log-empty { padding: 9px 2px; font-size: 8.5px; color: var(--text-muted); }
.aia-build-tip { display: flex; align-items: flex-start; gap: 5px; margin-top: auto; padding-top: 14px; font-size: 8.5px; line-height: 1.5; color: var(--text-muted); }
.aia-build-tip .material-icons-round { font-size: 13px; flex: 0 0 auto; }
.aia-build-main { display: flex; flex-direction: column; min-width: 0; background: rgba(0,0,0,0.16); }
.aia-build-toolbar { height: 38px; flex: 0 0 38px; display: flex; align-items: center; gap: 9px; padding: 0 12px; border-bottom: 1px solid var(--border); background: var(--bg-elevated); }
.aia-browser-dots { display: flex; gap: 4px; }
.aia-browser-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--border-light); }
.aia-browser-dots i:nth-child(1) { background: #ef4444; }
.aia-browser-dots i:nth-child(2) { background: var(--gold); }
.aia-browser-dots i:nth-child(3) { background: var(--green); }
.aia-build-path { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 8px; color: var(--text-muted); }
.aia-live-chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; color: var(--green); font-size: 8px; font-weight: 800; letter-spacing: 0.7px; text-transform: uppercase; }
.aia-live-chip i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); animation: aiaPulse 2s ease-out infinite; }
.aia-build-terminal { flex: 1; min-height: 0; padding: 14px 16px; overflow: hidden; background: #07070b; }
.aia-build-terminal pre { height: 100%; margin: 0; overflow: auto; color: #a7f3d0; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 8.5px; line-height: 1.58; white-space: pre-wrap; word-break: break-word; scrollbar-width: thin; }
.aia-build-files { flex: 0 0 auto; border-top: 1px solid var(--border); background: var(--bg-surface); padding: 10px 12px 12px; }
.aia-files-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 8px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-muted); }
.aia-files-head > span { display: inline-flex; align-items: center; gap: 5px; }
.aia-files-head .material-icons-round { font-size: 13px; color: #34d399; }
.aia-files-head b { padding: 0 5px; border: 1px solid var(--border); color: var(--text-secondary); font-size: 7.5px; }
.aia-file-pills { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; max-height: 76px; overflow-y: auto; scrollbar-width: thin; }
.aia-file-pills > span:not(.aia-file-empty) {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 6px; border: 1px solid rgba(52,211,153,0.22);
  background: rgba(16,185,129,0.05); color: #6ee7b7;
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 7.5px;
}
.aia-file-pills .material-icons-round { font-size: 10px; }
.aia-file-empty { font-size: 8.5px; color: var(--text-muted); }

/* ---------- Studio ---------- */
.aia-studio { display: flex; flex-direction: column; gap: 10px; }
.aia-studio-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; border: 1px solid var(--border); background: var(--bg-surface); }
.aia-studio-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.aia-back-btn { width: 32px; height: 32px; flex: 0 0 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); background: transparent; color: var(--text-secondary); cursor: pointer; }
.aia-back-btn:hover { color: #6ee7b7; border-color: rgba(52,211,153,0.4); background: rgba(16,185,129,0.06); }
.aia-back-btn .material-icons-round { font-size: 17px; }
.aia-app-avatar { width: 36px; height: 36px; flex: 0 0 36px; display: flex; align-items: center; justify-content: center; border: 1px solid hsla(var(--hue), 70%, 65%, 0.4); background: linear-gradient(135deg, hsla(var(--hue), 64%, 44%, 0.28), rgba(59,130,246,0.14)); color: hsl(var(--hue), 82%, 82%); font-size: 14px; font-weight: 800; }
.aia-studio-copy { min-width: 0; }
.aia-studio-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.aia-studio-name h3 { font-size: 15px; letter-spacing: -0.35px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aia-studio-url { margin-top: 2px; font-size: 8.5px; color: var(--text-muted); }
.aia-studio-url a { display: inline-flex; align-items: center; gap: 3px; color: #34d399; text-decoration: none; font-family: 'JetBrains Mono', ui-monospace, monospace; }
.aia-studio-url a:hover { text-decoration: underline; }
.aia-studio-url .material-icons-round { font-size: 11px; }
.aia-studio-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; }
.aia-action-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 10px; border: 1px solid var(--border); background: transparent; color: var(--text-secondary); font-family: inherit; font-size: 9px; font-weight: 700; letter-spacing: 0.3px; cursor: pointer; white-space: nowrap; text-decoration: none; }
.aia-action-btn:hover { color: #6ee7b7; border-color: rgba(52,211,153,0.44); background: rgba(16,185,129,0.06); }
.aia-action-btn .material-icons-round { font-size: 16px; }
.aia-deploy-btn { width: auto !important; height: 34px; padding: 0 13px; font-size: 9px; letter-spacing: 0.4px; gap: 6px; white-space: nowrap; }
.aia-deploy-btn .material-icons-round { font-size: 15px; }
.aia-icon-danger { width: 34px; height: 34px; flex: 0 0 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); background: transparent; color: var(--text-muted); cursor: pointer; }
.aia-icon-danger:hover { color: var(--red); border-color: rgba(239,68,68,0.42); background: rgba(239,68,68,0.05); }
.aia-icon-danger .material-icons-round { font-size: 17px; }
.aia-update-banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid rgba(96,165,250,0.3); border-top: none; background: rgba(59,130,246,0.07); }
.aia-update-banner > .material-icons-round { font-size: 20px; color: #60a5fa; }
.aia-update-banner > div { flex: 1; min-width: 0; }
.aia-update-banner b { display: block; font-size: 9.5px; color: var(--text-primary); }
.aia-update-banner p { margin-top: 2px; font-size: 8.5px; line-height: 1.45; color: var(--text-muted); }
.aia-update-banner .btn { flex: 0 0 auto; }
.aia-small-btn { height: 30px; padding: 0 9px; font-size: 8px; letter-spacing: 0.3px; gap: 4px; }
.aia-small-btn .material-icons-round { font-size: 13px; }
.aia-mobile-tabs { display: none; }
.aia-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  height: clamp(620px, calc(100vh - 166px), 940px);
  min-height: 620px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  overflow: hidden;
}
.aia-stage { position: relative; display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--border); }
.aia-stage-toolbar { height: 42px; flex: 0 0 42px; display: flex; align-items: center; gap: 10px; padding: 0 10px; border-bottom: 1px solid var(--border); background: var(--bg-elevated); }
.aia-stage-tabs { display: flex; align-items: center; gap: 1px; padding: 2px; border: 1px solid var(--border); background: var(--bg-input); flex: 0 0 auto; }
.aia-stage-tabs button { display: inline-flex; align-items: center; gap: 4px; height: 25px; padding: 0 8px; border: 0; background: transparent; color: var(--text-muted); font-family: inherit; font-size: 8.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.aia-stage-tabs button:hover { color: var(--text-secondary); }
.aia-stage-tabs button.is-active { background: var(--bg-surface); color: #6ee7b7; box-shadow: 0 0 0 1px var(--border); }
.aia-stage-tabs .material-icons-round { font-size: 13px; }
.aia-stage-domain { display: flex; align-items: center; gap: 5px; flex: 1; min-width: 0; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 8px; color: var(--text-muted); }
.aia-stage-domain .material-icons-round { font-size: 12px; color: var(--green); flex: 0 0 auto; }
.aia-stage-domain span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aia-stage-tools { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.aia-device-toggle { display: flex; align-items: center; gap: 1px; padding: 2px; margin-right: 3px; border: 1px solid var(--border); background: var(--bg-input); }
.aia-device-toggle button { width: 25px; height: 23px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; color: var(--text-muted); cursor: pointer; }
.aia-device-toggle button:hover { color: var(--text-secondary); }
.aia-device-toggle button.is-active { background: var(--bg-surface); color: #6ee7b7; box-shadow: 0 0 0 1px var(--border); }
.aia-device-toggle .material-icons-round { font-size: 14px; }
.aia-tool-btn { width: 25px; height: 25px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; background: transparent; color: var(--text-muted); cursor: pointer; text-decoration: none; }
.aia-tool-btn:hover { color: #6ee7b7; border-color: var(--border); }
.aia-tool-btn .material-icons-round { font-size: 15px; }
.aia-stage-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.aia-stage-body[data-tab="preview"] .aia-code-pane,
.aia-stage-body[data-tab="code"] .aia-preview-pane { display: none; }
.aia-preview-pane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.aia-preview-stage { flex: 1; min-height: 0; display: flex; align-items: stretch; justify-content: center; padding: 13px; background: #07070b; }
.aia-frame-shell { width: 100%; height: 100%; max-width: 100%; margin: 0 auto; border: 1px solid var(--border); background: #fff; overflow: hidden; transition: max-width 0.25s ease; }
.aia-preview-stage[data-device="tablet"] .aia-frame-shell { max-width: 820px; }
.aia-preview-stage[data-device="mobile"] .aia-frame-shell { max-width: 390px; }
.aia-frame-shell iframe { width: 100%; height: 100%; border: 0; background: #fff; display: block; }
.aia-preview-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px; background: radial-gradient(circle at 50% 32%, rgba(16,185,129,0.05), transparent 44%), #08080d; text-align: center; }
.aia-preview-empty-icon { width: 54px; height: 54px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(52,211,153,0.3); background: rgba(16,185,129,0.08); color: #6ee7b7; }
.aia-preview-empty-icon .material-icons-round { font-size: 26px; }
.aia-preview-empty b { margin-top: 13px; font-size: 13px; color: var(--text-primary); }
.aia-preview-empty p { max-width: 380px; margin-top: 5px; font-size: 9.5px; line-height: 1.6; color: var(--text-muted); }
.aia-preview-empty .btn { margin-top: 14px; width: auto; }
.aia-code-pane { flex: 1; min-height: 0; display: grid; grid-template-columns: 210px minmax(0, 1fr); }
.aia-file-rail { min-height: 0; overflow-y: auto; padding: 8px; border-right: 1px solid var(--border); background: rgba(0,0,0,0.14); scrollbar-width: thin; }
.aia-file-group { margin-bottom: 9px; }
.aia-file-group-label { padding: 3px 5px 5px; font-size: 7px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-muted); }
.aia-file-item { display: flex; align-items: center; gap: 5px; width: 100%; padding: 5px 6px; border: 1px solid transparent; background: transparent; color: var(--text-muted); font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 8px; text-align: left; cursor: pointer; min-width: 0; }
.aia-file-item:hover { color: #a7f3d0; border-color: var(--border); background: rgba(255,255,255,0.02); }
.aia-file-item.is-active { color: #a7f3d0; border-color: rgba(52,211,153,0.35); background: rgba(16,185,129,0.07); }
.aia-file-item .material-icons-round { font-size: 12px; flex: 0 0 auto; }
.aia-file-item > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aia-code-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #08080c; }
.aia-code-head { height: 35px; flex: 0 0 35px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 10px; border-bottom: 1px solid var(--border); background: var(--bg-surface); }
.aia-code-file { display: flex; align-items: center; gap: 6px; min-width: 0; }
.aia-code-file .material-icons-round { font-size: 14px; color: #34d399; flex: 0 0 auto; }
.aia-code-file b { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 8.5px; font-weight: 500; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aia-code-meta { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.aia-code-meta > span { font-size: 7.5px; color: var(--text-muted); }
.aia-code-meta button { width: 25px; height: 25px; display: flex; align-items: center; justify-content: center; border: 1px solid transparent; background: transparent; color: var(--text-muted); cursor: pointer; }
.aia-code-meta button:hover { color: #6ee7b7; border-color: rgba(52,211,153,0.3); background: rgba(16,185,129,0.06); }
.aia-code-meta .material-icons-round { font-size: 14px; }
.aia-code-pre { flex: 1; min-height: 0; margin: 0; padding: 12px 14px; overflow: auto; color: #c7f9e5; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 9px; line-height: 1.6; white-space: pre; scrollbar-width: thin; }
.aia-code-pre code { font-family: inherit; }
.aia-refine-overlay { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(4,4,9,0.72); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.aia-refine-overlay.is-visible { opacity: 1; pointer-events: auto; }
.aia-refine-box { display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 330px; padding: 23px 27px; border: 1px solid rgba(52,211,153,0.35); background: rgba(10,10,16,0.95); color: var(--text-secondary); font-size: 9.5px; text-align: center; }
.aia-refine-box b { font-size: 12px; line-height: 1.4; color: var(--text-primary); }
.aia-refine-box > span:not(.aia-spinner) { font-size: 8.5px; color: var(--text-muted); }
.aia-refine-bar { width: 180px; height: 3px; margin-top: 2px; background: var(--bg-input); overflow: hidden; }
.aia-refine-bar span { display: block; height: 100%; background: linear-gradient(90deg, #10b981, #22d3ee); transition: width 0.3s ease; }
.aia-refine-box .aia-btn-ghost { margin-top: 5px; }
.aia-spinner { width: 21px; height: 21px; border: 2px solid rgba(52,211,153,0.2); border-top-color: #34d399; border-radius: 50%; animation: aiSpin 0.8s linear infinite; }
.aia-rail-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow-y: auto; background: var(--bg-surface); scrollbar-width: thin; }
.aia-deploy-card, .aia-git-card { padding: 13px 14px; border-bottom: 1px solid var(--border); }
.aia-deploy-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 8px; border: 1px solid var(--border); background: var(--border); }
.aia-deploy-stats > div { min-width: 0; padding: 7px 8px; background: var(--bg-input); }
.aia-deploy-stats span { display: block; font-size: 7px; font-weight: 800; letter-spacing: 0.7px; text-transform: uppercase; color: var(--text-muted); }
.aia-deploy-stats b { display: block; margin-top: 2px; font-size: 9px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aia-deploy-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.aia-deploy-actions .btn { width: auto; }
.aia-mini-btn { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 8px; border: 1px solid var(--border); background: transparent; color: var(--text-muted); font-family: inherit; font-size: 8px; font-weight: 700; cursor: pointer; }
.aia-mini-btn:hover { color: #6ee7b7; border-color: rgba(52,211,153,0.4); background: rgba(16,185,129,0.05); }
.aia-mini-btn .material-icons-round { font-size: 13px; }
.aia-deploy-hint { margin-top: 8px; font-size: 8px; line-height: 1.5; color: var(--text-muted); }
.aia-git-repo { margin-top: 8px; border: 1px solid var(--border); background: rgba(0,0,0,0.14); }
.aia-git-repo-head { display: flex; align-items: center; gap: 4px; padding: 5px 7px; border-bottom: 1px solid var(--border); font-size: 7px; font-weight: 800; letter-spacing: 0.7px; text-transform: uppercase; color: var(--text-muted); }
.aia-git-repo-head .material-icons-round { font-size: 10px; color: #6ee7b7; }
.aia-git-repo > a { display: block; padding: 6px 8px; color: #6ee7b7; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 8px; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aia-git-repo > a:hover { text-decoration: underline; }
.aia-git-commit { display: flex; align-items: center; gap: 7px; margin-top: 7px; padding: 6px 8px; border: 1px solid var(--border); background: var(--bg-input); min-width: 0; }
.aia-git-commit > .material-icons-round { font-size: 15px; color: #6ee7b7; flex: 0 0 auto; }
.aia-git-commit > div { flex: 1; min-width: 0; }
.aia-git-commit span { display: block; font-size: 7px; letter-spacing: 0.6px; text-transform: uppercase; color: var(--text-muted); }
.aia-git-commit code { display: block; margin-top: 1px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 8.5px; color: var(--text-secondary); }
.aia-git-commit > button { width: 24px; height: 24px; flex: 0 0 24px; display: flex; align-items: center; justify-content: center; border: 1px solid transparent; background: transparent; color: var(--text-muted); cursor: pointer; }
.aia-git-commit > button:hover { color: #6ee7b7; border-color: rgba(52,211,153,0.3); }
.aia-git-commit > button .material-icons-round { font-size: 13px; }
.aia-chat-card { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.aia-chat-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.aia-chat-identity { display: flex; align-items: center; gap: 8px; min-width: 0; }
.aia-chat-orb { width: 28px; height: 28px; flex: 0 0 28px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(52,211,153,0.3); background: rgba(16,185,129,0.07); }
.aia-chat-identity b { display: block; font-size: 10.5px; color: var(--text-primary); }
.aia-chat-identity span { display: block; font-size: 8px; color: var(--text-muted); }
.aia-chat-live { display: inline-flex; align-items: center; gap: 4px; font-size: 7.5px; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase; color: var(--green); }
.aia-chat-live i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); animation: aiaPulse 2s ease-out infinite; }
.aia-chat-context { display: flex; align-items: flex-start; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--border); background: rgba(16,185,129,0.025); font-size: 8.5px; line-height: 1.5; color: var(--text-muted); }
.aia-chat-context .material-icons-round { font-size: 13px; color: #34d399; flex: 0 0 auto; margin-top: 1px; }
.aia-chat-body { flex: 1; min-height: 150px; max-height: 310px; overflow-y: auto; padding: 12px 11px; display: flex; flex-direction: column; gap: 11px; scrollbar-width: thin; background: linear-gradient(180deg, rgba(255,255,255,0.006), transparent 80px); }
.aia-chat-empty { margin: auto; padding: 18px 14px; text-align: center; }
.aia-chat-empty-icon { display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; border: 1px solid rgba(52,211,153,0.22); background: rgba(16,185,129,0.06); }
.aia-chat-empty b { display: block; margin-top: 9px; font-size: 11px; color: var(--text-secondary); }
.aia-chat-empty p { margin-top: 4px; font-size: 9px; line-height: 1.55; color: var(--text-muted); }
.aia-chat-msg { display: flex; align-items: flex-start; gap: 7px; }
.aia-chat-msg.is-user { flex-direction: row-reverse; }
.aia-chat-avatar { width: 24px; height: 24px; flex: 0 0 24px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); background: var(--bg-input); color: var(--text-muted); font-size: 9px; font-weight: 700; }
.aia-chat-avatar.is-user { background: var(--accent-dim); color: var(--accent); border-color: rgba(59,130,246,0.3); }
.aia-chat-avatar:not(.is-user) { background: rgba(52,211,153,0.08); color: #34d399; border-color: rgba(52,211,153,0.22); }
.aia-chat-msg-content { min-width: 0; max-width: calc(100% - 32px); }
.aia-chat-msg-body { padding: 8px 10px; border: 1px solid var(--border); background: var(--bg-input); font-size: 9.5px; line-height: 1.58; color: var(--text-secondary); word-break: break-word; }
.aia-chat-msg.is-user .aia-chat-msg-body { background: rgba(59,130,246,0.08); border-color: rgba(59,130,246,0.22); color: var(--text-primary); }
.aia-chat-msg.is-error .aia-chat-msg-body { border-color: rgba(239,68,68,0.32); background: rgba(239,68,68,0.05); color: #fca5a5; }
.aia-msg-usage { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 9px; margin-top: 5px; padding-top: 5px; border-top: 1px solid var(--border); font-size: 7.5px; color: var(--text-muted); }
.aia-msg-usage b { margin-left: auto; color: #34d399; font-size: 8px; }
.aia-chat-msg.is-user .aia-msg-usage { display: none; }
.aia-chat-code { margin: 7px 0; padding: 8px 9px; overflow-x: auto; border: 1px solid var(--border); background: #07070b; color: #a7f3d0; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 8px; line-height: 1.55; white-space: pre; scrollbar-width: thin; }
.aia-typing { display: inline-flex; align-items: center; gap: 4px; padding: 9px 10px; border: 1px solid var(--border); background: var(--bg-input); }
.aia-typing span { width: 5px; height: 5px; border-radius: 50%; background: var(--text-muted); animation: aiaTyping 1.2s ease-in-out infinite; }
.aia-typing span:nth-child(2) { animation-delay: 0.16s; }
.aia-typing span:nth-child(3) { animation-delay: 0.32s; }
@keyframes aiaTyping { 0%, 60%, 100% { transform: translateY(0); opacity: 0.45; } 30% { transform: translateY(-3px); opacity: 1; } }
.aia-chat-suggestions { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px 11px 0; border-top: 1px solid var(--border); }
.aia-chat-suggestions button { padding: 4px 7px; border: 1px solid var(--border); background: transparent; color: var(--text-muted); font-family: inherit; font-size: 8px; cursor: pointer; }
.aia-chat-suggestions button:hover { color: #6ee7b7; border-color: rgba(52,211,153,0.38); background: rgba(16,185,129,0.05); }
.aia-chat-form { padding: 9px 11px 11px; }
.aia-chat-form textarea { width: 100%; min-height: 48px; max-height: 150px; resize: none; font-size: 10px; line-height: 1.5; padding: 9px 10px; background: var(--bg-input); }
.aia-chat-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.aia-chat-form-foot > span { font-size: 7.5px; color: var(--text-muted); }
.aia-chat-form-foot b { color: var(--text-secondary); font-weight: 700; }
.aia-chat-form .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; }
.aia-send-btn { width: 32px; height: 32px; flex: 0 0 32px; border: 1px solid #10b981; background: #10b981; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.15s, border-color 0.15s; }
.aia-send-btn:hover { background: #34d399; border-color: #34d399; }
.aia-send-btn:disabled { opacity: 0.35; cursor: default; }
.aia-send-btn .material-icons-round { font-size: 17px; }
.aia-studio-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 8px 11px; border: 1px solid var(--border); background: var(--bg-surface); }
.aia-studio-foot > span { display: inline-flex; align-items: center; gap: 4px; font-size: 8px; color: var(--text-muted); }
.aia-studio-foot .material-icons-round { font-size: 12px; }
.aia-studio-foot .aia-foot-note { margin-left: auto; }

/* ---------- Overlay ---------- */
.aia-overlay {
  position: fixed; inset: 0; z-index: 9400;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(5,5,10,0.78); backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.aia-overlay.is-visible { opacity: 1; pointer-events: auto; }
.aia-overlay-box {
  width: min(760px, 100%); max-height: 80vh; display: flex; flex-direction: column;
  border: 1px solid rgba(52,211,153,0.35); background: rgba(12,12,18,0.97);
  padding: 16px 18px; box-shadow: 0 24px 70px rgba(0,0,0,0.5);
}
.aia-overlay-head { display: flex; align-items: center; gap: 11px; }
.aia-overlay-head > div { display: flex; flex-direction: column; gap: 3px; }
.aia-overlay-head b { font-size: 12px; color: var(--text-primary); }
.aia-overlay-head span { font-size: 9px; color: var(--text-muted); }
.aia-overlay-log {
  display: none; flex: 1; min-height: 120px; max-height: 46vh; overflow: auto;
  margin-top: 12px; padding: 10px; border: 1px solid var(--border); background: #07070b;
  color: #a7f3d0; font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 8px; line-height: 1.55; white-space: pre-wrap; word-break: break-word;
  scrollbar-width: thin;
}
.aia-btn-ghost { align-self: flex-end; margin-top: 11px; padding: 5px 10px; border: 1px solid var(--border-light); background: transparent; color: var(--text-muted); font-family: inherit; font-size: 8.5px; cursor: pointer; }
.aia-btn-ghost:hover { color: #6ee7b7; border-color: rgba(52,211,153,0.4); }
.aia-btn-ghost:disabled { opacity: 0.35; cursor: default; }

/* ---------- Publish modal ---------- */
.aia-publish-preview { display: flex; align-items: center; gap: 11px; margin-bottom: 15px; padding: 12px 13px; border: 1px solid rgba(52,211,153,0.24); background: rgba(16,185,129,0.05); }
.aia-publish-preview > .material-icons-round { font-size: 23px; color: #34d399; }
.aia-publish-preview > div { flex: 1; min-width: 0; }
.aia-publish-preview > div > span { display: block; font-size: 7.5px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-muted); }
.aia-publish-preview b { display: block; margin-top: 2px; font-size: 12px; color: var(--text-primary); }
.aia-publish-preview em { display: block; margin-top: 2px; font-style: normal; font-size: 8.5px; color: var(--text-muted); }
.aia-publish-https { display: inline-flex; align-items: center; gap: 3px; padding: 3px 6px; border: 1px solid rgba(34,197,94,0.25); background: rgba(34,197,94,0.05); color: var(--green); font-size: 7.5px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; white-space: nowrap; }
.aia-publish-https .material-icons-round { font-size: 11px; }
.aia-publish-notes { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 10px; }
.aia-publish-notes span { display: inline-flex; align-items: center; gap: 4px; font-size: 8.5px; color: var(--text-muted); }
.aia-publish-notes .material-icons-round { font-size: 12px; color: #34d399; }
.aia-publish-note { display: flex; align-items: flex-start; gap: 6px; margin-top: 11px; padding: 9px 10px; border: 1px solid rgba(52,211,153,0.18); background: rgba(16,185,129,0.04); font-size: 8.5px; line-height: 1.55; color: var(--text-muted); }
.aia-publish-note .material-icons-round { font-size: 14px; color: #34d399; flex: 0 0 auto; }
.aia-publish-note b { color: var(--text-secondary); }
.aia-publish-error { min-height: 18px; margin-top: 8px; font-size: 9.5px; color: var(--red); }

/* Focus */
.aia-card-open:focus-visible,
.aia-card-icon:focus-visible,
.aia-new-card:focus-visible,
.aia-rail-btn:focus-visible,
.aia-rail-link:focus-visible,
.aia-idea-chips button:focus-visible,
.aia-filters button:focus-visible,
.aia-stage-tabs button:focus-visible,
.aia-file-item:focus-visible,
.aia-mini-btn:focus-visible,
.aia-action-btn:focus-visible,
.aia-back-btn:focus-visible,
.aia-icon-danger:focus-visible,
.aia-tool-btn:focus-visible,
.aia-device-toggle button:focus-visible,
.aia-chat-suggestions button:focus-visible {
  outline: 2px solid rgba(52,211,153,0.62);
  outline-offset: 2px;
}

/* Responsive */
@media (max-width: 1500px) {
  .aia-layout { grid-template-columns: minmax(0, 1fr) 318px; }
  .aia-workbench { grid-template-columns: minmax(0, 1fr) 360px; }
}
@media (max-width: 1240px) {
  .aia-header { grid-template-columns: minmax(0, 1fr) 286px; gap: 22px; padding: 23px 24px; }
  .aia-layout { grid-template-columns: 1fr; }
  .aia-rail { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
  .aia-workbench { grid-template-columns: minmax(0, 1fr) 330px; }
  .aia-code-pane { grid-template-columns: 178px minmax(0, 1fr); }
}
@media (max-width: 1050px) {
  .aia-header { grid-template-columns: 1fr; }
  .aia-header-side { padding: 15px 0 0; border-left: 0; border-top: 1px solid rgba(255,255,255,0.07); }
  .aia-head-stats { max-width: 480px; }
  .aia-head-quota { max-width: 480px; }
  .aia-workbench { display: flex; flex-direction: column; height: auto; min-height: 0; }
  .aia-stage { min-height: 600px; border-right: 0; border-bottom: 1px solid var(--border); }
  .aia-rail-pane { overflow: visible; }
  .aia-chat-body { max-height: 290px; }
}
@media (max-width: 900px) {
  .aia-rail { grid-template-columns: 1fr; }
  .aia-building { height: auto; min-height: 0; grid-template-columns: 1fr; }
  .aia-build-side { border-right: 0; border-bottom: 1px solid var(--border); }
  .aia-build-main { min-height: 430px; }
  .aia-build-log { max-height: 86px; }
}
@media (max-width: 760px) {
  .aia-header { padding: 18px 16px; gap: 16px; }
  .aia-header-main { align-items: flex-start; gap: 12px; }
  .aia-orb { width: 46px; height: 46px; flex-basis: 46px; }
  .aia-header h2 { font-size: 24px; letter-spacing: -0.8px; }
  .aia-header p { font-size: 11px; }
  .aia-header-tags { gap: 5px 10px; }
  .aia-composer-top { padding: 15px 14px 0; }
  .aia-form { padding: 14px; }
  .aia-field-grid { grid-template-columns: 1fr; }
  .aia-field-language { max-width: 180px; }
  .aia-composer-foot { flex-direction: column; align-items: stretch; }
  .aia-generate-btn { width: 100%; justify-content: center; }
  .aia-idea-row { padding: 0 14px 13px; }
  .aia-note-row { padding: 9px 14px; }
  .aia-projects-head { flex-direction: column; align-items: stretch; padding: 14px; }
  .aia-projects-tools { justify-content: flex-start; }
  .aia-search { width: 100%; }
  .aia-filters { width: 100%; overflow-x: auto; }
  .aia-filters button { flex: 1; justify-content: center; }
  .aia-app-grid { grid-template-columns: 1fr; padding: 13px 14px 15px; }
  .aia-new-card { min-height: 160px; }
  .aia-studio-bar { flex-direction: column; align-items: stretch; gap: 10px; }
  .aia-studio-actions { justify-content: flex-start; }
  .aia-studio-actions .aia-action-btn, .aia-studio-actions .aia-deploy-btn { flex: 1 1 auto; justify-content: center; }
  .aia-studio-actions .aia-icon-danger { flex: 0 0 34px; }
  .aia-mobile-tabs { display: flex; gap: 1px; padding: 3px; border: 1px solid var(--border); background: var(--bg-input); }
  .aia-mobile-tabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 32px; border: 0; background: transparent; color: var(--text-muted); font-family: inherit; font-size: 9px; font-weight: 700; cursor: pointer; }
  .aia-mobile-tabs button.is-active { background: var(--bg-surface); color: #6ee7b7; box-shadow: 0 0 0 1px var(--border); }
  .aia-mobile-tabs .material-icons-round { font-size: 15px; }
  .aia-workbench[data-mobile-tab="stage"] .aia-rail-pane { display: none; }
  .aia-workbench[data-mobile-tab="chat"] .aia-stage { display: none; }
  .aia-stage { min-height: 560px; }
  .aia-stage-toolbar { height: auto; min-height: 42px; flex-wrap: wrap; padding: 6px 8px; gap: 6px; }
  .aia-stage-domain { order: 3; flex-basis: 100%; }
  .aia-stage-tools { margin-left: auto; }
  .aia-code-pane { display: flex; flex-direction: column; }
  .aia-file-rail { flex: 0 0 auto; max-height: 130px; border-right: 0; border-bottom: 1px solid var(--border); }
  .aia-file-group { margin-bottom: 5px; }
  .aia-file-item { display: inline-flex; width: auto; margin: 1px; }
  .aia-code-main { min-height: 420px; }
  .aia-rail-pane { border-top: 0; }
  .aia-deploy-card, .aia-git-card { padding: 12px; }
  .aia-studio-foot .aia-foot-note { margin-left: 0; }
  .aia-building { min-height: 0; }
  .aia-build-side { padding: 16px 15px 15px; }
  .aia-build-main { min-height: 380px; }
  .aia-build-terminal { padding: 11px 12px; }
  .aia-overlay-box { max-height: 86vh; }
}
@media (max-width: 480px) {
  .aia-head-stats b { font-size: 18px; }
  .aia-head-stats > div { padding: 8px; }
  .aia-app-actions .aia-card-icon { flex: 0 0 29px; }
  .aia-update-banner { flex-wrap: wrap; }
  .aia-update-banner .btn { width: 100%; justify-content: center; }
  .aia-stage-tabs button span:last-child { display: none; }
  .aia-code-meta > span { display: none; }
  .aia-live-pill { display: none; }
  .aia-chat-form-foot > span { display: none; }
  .aia-chat-form-foot { justify-content: flex-end; }
}
@media (prefers-reduced-motion: reduce) {
  .aia-app-card, .aia-frame-shell, .aia-refine-bar span, .aia-build-progress span { transition: none; }
  .aia-app-card:hover { transform: none; }
  .aia-kicker-dot, .aia-live-dot, .aia-live-chip i, .aia-chat-live i, .aia-build-pulse { animation: none; }
}

@keyframes aiaPulse {
  0% { box-shadow: 0 0 0 0 rgba(52,211,153,0.4); }
  70% { box-shadow: 0 0 0 5px rgba(52,211,153,0); }
  100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); }
}
.aia-auto-deploy { display: flex; align-items: center; gap: 5px; margin-top: 8px; padding: 5px 7px; border: 1px solid var(--border); background: rgba(0,0,0,0.12); font-size: 8px; color: var(--text-muted); }
.aia-auto-deploy .material-icons-round { font-size: 12px; color: var(--text-muted); }
.aia-auto-deploy b { margin-left: auto; font-size: 7.5px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; color: var(--text-muted); }
.aia-auto-deploy.is-on { border-color: rgba(52,211,153,0.22); background: rgba(16,185,129,0.04); }
.aia-auto-deploy.is-on .material-icons-round, .aia-auto-deploy.is-on b { color: #6ee7b7; }

/* ========== SAVED PAYMENT METHODS ========== */
.pm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}
.pm-card {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 140px;
}
.pm-card.is-default {
  border-color: rgba(59, 130, 246, 0.45);
  background: linear-gradient(160deg, rgba(59, 130, 246, 0.08), var(--bg-elevated));
}
.pm-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.pm-brand {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent-hover);
}
.pm-number {
  font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--text-primary);
  margin-top: 4px;
}
.pm-meta {
  font-size: 11px;
  color: var(--text-secondary);
}
.pm-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.pm-action {
  background: none;
  border: none;
  padding: 0;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease;
}
.pm-action:hover { color: var(--accent-hover); }
.pm-action.is-danger:hover { color: var(--red); }
.pm-empty {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px dashed var(--border-light);
  background: rgba(255, 255, 255, 0.015);
}
.pm-empty > .material-icons-round {
  font-size: 26px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.pm-empty b {
  display: block;
  font-size: 13px;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.pm-empty p {
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}
.pm-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 14px 0 0;
  font-size: 11px;
  line-height: 1.55;
  color: var(--text-muted);
}
.pm-note .material-icons-round {
  font-size: 14px;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-top: 1px;
}
