/* ═══════════════════════════════════════════════════
   NeoReno GenTab — Design System
   ═══════════════════════════════════════════════════ */

:root {
  --bg: #edf1f5;
  --bg-card: #ffffff;
  --bg-input: #f0f0f2;
  --bg-hover: #e8e8ed;
  --border: #e5e5ea;
  --border-light: #f0f0f2;

  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #aeaeb2;
  --text-inverse: #ffffff;

  --accent: #007aff;
  --accent-hover: #0063d1;
  --accent-bg: #007aff12;
  --success: #34c759;
  --warning: #ff9f0a;
  --error: #ff3b30;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --topbar-h: 34px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }

/* ═══════════════════════════════════════════════════
   Auth
   ═══════════════════════════════════════════════════ */
.auth-screen {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f5f5f7 0%, #e8e8ed 100%);
}
.auth-card {
  width: 340px;
  padding: 36px;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.auth-logo {
  width: 52px; height: 52px;
  margin: 0 auto 14px;
  background: var(--accent);
  color: var(--text-inverse);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700;
}
.auth-title { font-size: 20px; font-weight: 700; margin-bottom: 2px; }
.auth-subtitle { font-size: 13px; color: var(--text-secondary); margin-bottom: 24px; }
#auth-form { display: flex; flex-direction: column; gap: 10px; }
#auth-form input {
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px; font-family: var(--font);
  background: var(--bg-input); color: var(--text-primary);
  outline: none; transition: border-color 0.2s;
}
#auth-form input:focus { border-color: var(--accent); background: var(--bg-card); }
.btn-primary {
  padding: 11px; background: var(--accent); color: var(--text-inverse);
  border: none; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; font-family: var(--font);
  cursor: pointer; transition: background 0.15s;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.auth-error { margin-top: 10px; font-size: 13px; color: var(--error); min-height: 18px; }

/* ═══════════════════════════════════════════════════
   App Shell
   ═══════════════════════════════════════════════════ */
.app { height: 100vh; display: flex; flex-direction: column; }

/* Top Bar — thin, discreet */
.topbar {
  height: var(--topbar-h);
  padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between;
  background: transparent;
  flex-shrink: 0;
}
.topbar-left { display: flex; align-items: center; gap: 6px; }
.topbar-logo {
  width: 22px; height: 22px;
  background: var(--accent); color: var(--text-inverse);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.topbar-title { display: none; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.topbar-email { font-size: 11px; color: var(--text-tertiary); }
.btn-icon {
  width: 26px; height: 26px; border: none; background: transparent;
  color: var(--text-tertiary); border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.15s;
}
.btn-icon:hover { background: var(--bg-hover); color: var(--text-primary); }

/* ═══════════════════════════════════════════════════
   Workspace — full screen GenTab area
   ═══════════════════════════════════════════════════ */
.workspace {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px 100px;
}
.workspace::-webkit-scrollbar { width: 5px; }
.workspace::-webkit-scrollbar-thumb { background: var(--border); border-radius: 5px; }

/* Welcome */
.welcome {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 55vh;
  text-align: center;
}
.welcome-icon {
  width: 72px; height: 72px;
  background: var(--accent-bg); border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px; color: var(--accent);
}
.welcome h2 { font-size: 19px; font-weight: 600; margin-bottom: 6px; }
.welcome p { font-size: 14px; color: var(--text-secondary); max-width: 380px; line-height: 1.5; margin-bottom: 24px; }
.welcome-suggestions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.suggestion {
  padding: 7px 15px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 20px; font-size: 13px; font-family: var(--font);
  color: var(--text-primary); cursor: pointer; transition: all 0.15s;
}
.suggestion:hover { background: var(--accent-bg); border-color: var(--accent); color: var(--accent); }

/* Skeleton */
.skeleton { display: flex; flex-direction: column; gap: 14px; }
.sk-bar {
  height: 13px; border-radius: 6px;
  background: linear-gradient(90deg, var(--bg-hover) 25%, var(--border-light) 50%, var(--bg-hover) 75%);
  background-size: 200% 100%; animation: shimmer 1.5s infinite;
}
.sk-title { height: 20px; width: 40%; }
.sk-line { width: 75%; }
.sk-line.short { width: 50%; }
.sk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.sk-card {
  height: 90px; border-radius: var(--radius-md);
  background: linear-gradient(90deg, var(--bg-hover) 25%, var(--border-light) 50%, var(--bg-hover) 75%);
  background-size: 200% 100%; animation: shimmer 1.5s infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* GenTab content */
.gentab { animation: fadeIn 0.25s ease; }
.gentab.streaming::after {
  content: ''; display: inline-block;
  width: 2px; height: 15px; background: var(--accent);
  margin-left: 2px; vertical-align: text-bottom;
  animation: blink 0.8s step-end infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ═══════════════════════════════════════════════════
   Dock — floating block: input + nav
   ═══════════════════════════════════════════════════ */
.dock {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: min(65%, calc(100% - 32px));
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.dock-input {
  display: flex; align-items: center; gap: 4px;
  padding: 0 8px 0 20px;
  height: 48px;
}
.dock-input:focus-within {
  background: rgba(0,122,255,0.03);
}

#prompt-input {
  flex: 1; border: none; outline: none;
  font-size: 14px; font-family: var(--font);
  color: var(--text-primary); background: transparent;
  height: 100%;
}
#prompt-input::placeholder { color: var(--text-tertiary); }

.bar-btn {
  width: 32px; height: 32px; border: none; background: transparent;
  color: var(--text-tertiary); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; transition: color 0.15s;
}
.bar-btn:hover { color: var(--text-secondary); }
.bar-btn-send { color: var(--accent); }
.bar-btn-send:hover { color: var(--accent-hover); }
.bar-btn.recording { color: var(--error); animation: pulse 1.5s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.dock-nav {
  display: flex; align-items: center; justify-content: space-around;
  border-top: 1px solid var(--border-light);
  padding: 6px 0;
}

.nav-tab {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 3px 14px; border: none; background: transparent;
  color: var(--text-tertiary); font-size: 9px;
  font-family: var(--font); font-weight: 500;
  cursor: pointer; transition: color 0.15s;
}
.nav-tab:hover { color: var(--text-secondary); }
.nav-tab.active { color: var(--accent); }

/* ═══════════════════════════════════════════════════
   GenTab Generated HTML — Base design tokens
   Claude generates HTML using these classes
   ═══════════════════════════════════════════════════ */
.gentab h1 { font-size: 22px; font-weight: 700; margin-bottom: 14px; }
.gentab h2 { font-size: 17px; font-weight: 600; margin: 18px 0 10px; }
.gentab h3 { font-size: 15px; font-weight: 600; margin: 14px 0 8px; }
.gentab p { font-size: 14px; line-height: 1.6; margin-bottom: 10px; color: var(--text-secondary); }

.gentab table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 13px; }
.gentab th {
  text-align: left; padding: 9px 12px;
  background: var(--bg); font-weight: 600; color: var(--text-secondary);
  border-bottom: 2px solid var(--border);
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px;
}
.gentab td { padding: 9px 12px; border-bottom: 1px solid var(--border-light); }
.gentab tr:hover td { background: var(--bg); }

.gentab .card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 14px 18px;
  margin-bottom: 10px; box-shadow: var(--shadow-sm);
}
.gentab .grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px; margin: 14px 0;
}

.gentab .badge { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.gentab .badge-success { background: #dcfce7; color: #15803d; }
.gentab .badge-warning { background: #fef3c7; color: #b45309; }
.gentab .badge-error { background: #fee2e2; color: #b91c1c; }
.gentab .badge-info { background: #dbeafe; color: #1d4ed8; }

.gentab .btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 13px; font-weight: 500;
  font-family: var(--font); cursor: pointer;
  background: var(--bg-card); color: var(--text-primary); transition: all 0.15s;
}
.gentab .btn:hover { background: var(--bg); }
.gentab .btn-primary { background: var(--accent); color: white; border-color: var(--accent); }
.gentab .btn-primary:hover { background: var(--accent-hover); }

.gentab input, .gentab select, .gentab textarea {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; font-family: var(--font);
  color: var(--text-primary); background: var(--bg-card);
  outline: none; transition: border-color 0.2s;
}
.gentab input:focus, .gentab select:focus, .gentab textarea:focus {
  border-color: var(--accent);
}
.gentab label { display: block; font-size: 12px; font-weight: 500; margin-bottom: 3px; color: var(--text-secondary); }
.gentab .form-group { margin-bottom: 14px; }
.gentab .stat-value { font-size: 26px; font-weight: 700; }
.gentab .stat-label { font-size: 11px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.5px; }

/* ═══════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .workspace { padding: 16px; }
  .sk-grid { grid-template-columns: 1fr; }
}