/* AIBotForMe Unified Platform — Design System */
:root {
  --bg:       #0D1117;
  --bg2:      #161B22;
  --bg3:      #21262D;
  --bg4:      #30363D;
  --border:   #30363D;
  --text:     #E6EDF3;
  --text2:    #8B949E;
  --text3:    #6E7681;
  --accent:   #58A6FF;
  --accent2:  #1F6FEB;
  --green:    #3FB950;
  --red:      #F85149;
  --amber:    #D29922;
  --purple:   #BC8CFF;
  --cyan:     #44D7FF;
  --rail-w:   220px;
  --radius:   10px;
  --shadow:   0 4px 24px rgba(0,0,0,.5);
}

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

html, body { height: 100%; background: var(--bg); color: var(--text); font: 15px/1.6 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }

#app { min-height: 100vh; display: flex; flex-direction: column; }
#root { min-height: 100vh; display: flex; flex-direction: column; }

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

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: var(--radius); border: none;
  font-size: 14px; font-weight: 500; cursor: pointer; transition: all .15s;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary  { background: var(--accent2); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent); }
.btn-secondary { background: var(--bg3); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover:not(:disabled) { background: var(--bg4); }
.btn-ghost  { background: transparent; color: var(--text2); border: 1px solid var(--border); }
.btn-ghost:hover:not(:disabled) { background: var(--bg3); color: var(--text); }
.btn-danger { background: var(--red); color: #fff; }
.btn-purple { background: var(--purple); color: #fff; }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-lg { padding: 12px 28px; font-size: 16px; }
.btn-full { width: 100%; justify-content: center; }
.btn:hover { opacity: .85; }
.btn:active { transform: scale(.97); }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 500; color: var(--text2); margin-bottom: 6px; }
.form-input, .form-select, .form-textarea {
  width: 100%; background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text); font-size: 14px;
  padding: 9px 12px; outline: none; transition: border-color .15s; font-family: inherit;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--accent); }
.form-textarea { resize: vertical; min-height: 90px; }
.form-help { font-size: 0.78rem; color: var(--text3); margin-top: 4px; }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.card-sm { padding: 16px; }
.card-title { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text2); margin-bottom: 10px; }
.card-sub   { font-size: 0.83rem; color: var(--text2); }

/* ── Layout ──────────────────────────────────────────────────────────────── */
.container { max-width: 900px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 520px; margin: 0 auto; padding: 0 20px; }
.container-wide { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ── App Shell with Sidebar ──────────────────────────────────────────────── */
.app-shell { height: 100vh; display: flex; }
.main-layout { display: flex; width: 100%; height: 100vh; }
.app-layout { display: flex; width: 100%; height: 100vh; overflow: hidden; }

/* ── Sidebar nav ─────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--rail-w); min-height: 100vh;
  background: var(--bg2); border-right: 1px solid var(--border);
  padding: 16px 8px; display: flex; flex-direction: column; flex-shrink: 0;
  overflow-y: auto;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 8px 16px; margin-bottom: 4px;
  border-bottom: 1px solid var(--border); margin-bottom: 12px;
}
.sidebar-brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.sidebar-brand-name { font-size: 0.95rem; font-weight: 700; color: var(--text); }
.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.sidebar-footer { padding-top: 12px; border-top: 1px solid var(--border); margin-top: 8px; }

/* ── Nav section labels ──────────────────────────────────────────────────── */
.nav-section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted, #888);
  padding: 12px 8px 4px;
  display: block;
}
.nav-section-label:first-child { padding-top: 4px; }

.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px; color: var(--text2);
  font-size: 14px; cursor: pointer; transition: all .12s;
}
.sidebar-link:hover, .sidebar-link.active { background: var(--bg3); color: var(--text); }
.sidebar-link svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ── Page area ───────────────────────────────────────────────────────────── */
.page-area { flex: 1; overflow-y: auto; padding: 28px 32px; }
.main-content { flex: 1; padding: 28px; overflow: auto; }
.page-header { margin-bottom: 24px; }
.page-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 4px; }
.page-sub   { color: var(--text2); font-size: 0.88rem; margin-bottom: 24px; }

/* ── Top nav (fallback/wizard mode) ─────────────────────────────────────── */
.topnav {
  background: var(--bg2); border-bottom: 1px solid var(--border);
  padding: 0 24px; height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
}
.topnav-brand { font-size: 1rem; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 10px; }
.topnav-brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.topnav-links { display: flex; gap: 4px; }
.nav-link { padding: 6px 12px; border-radius: 6px; color: var(--text2); font-size: 14px; cursor: pointer; }
.nav-link:hover, .nav-link.active { background: var(--bg3); color: var(--text); }
.topnav-right { display: flex; gap: 8px; align-items: center; }

/* ── Wizard ──────────────────────────────────────────────────────────────── */
.wizard-wrap {
  min-height: 100vh; display: flex; align-items: flex-start;
  justify-content: center; padding: 40px 20px;
}
.wizard-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 14px; padding: 40px; width: 100%; max-width: 680px;
}
.wizard-step-label { font-size: 0.78rem; color: var(--accent); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 8px; }
.wizard-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 6px; }
.wizard-sub   { color: var(--text2); margin-bottom: 32px; font-size: 0.92rem; }
.wizard-progress { height: 4px; background: var(--bg3); border-radius: 2px; margin-bottom: 36px; }
.wizard-progress-bar { height: 100%; background: var(--accent); border-radius: 2px; transition: width .3s; }
.wizard-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 32px; }

/* ── Connector tiles ─────────────────────────────────────────────────────── */
.connector-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 12px; }
.connector-tile {
  background: var(--bg3); border: 2px solid var(--border);
  border-radius: var(--radius); padding: 16px; cursor: pointer;
  transition: all .15s; display: flex; flex-direction: column; gap: 8px;
}
.connector-tile:hover { border-color: var(--accent); }
.connector-tile.selected { border-color: var(--accent); background: rgba(88,166,255,.08); }
.connector-tile.connected { border-color: var(--green); }
.connector-tile.error { border-color: var(--red); }
.connector-tile-name { font-size: 0.92rem; font-weight: 600; }
.connector-tile-desc { font-size: 0.78rem; color: var(--text2); line-height: 1.4; }
.connector-tile-status { font-size: 0.75rem; font-weight: 500; }
.connector-tile-status.ok   { color: var(--green); }
.connector-tile-status.err  { color: var(--red); }
.connector-tile-status.none { color: var(--text3); }

/* ── Capability tiles ────────────────────────────────────────────────────── */
.cap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cap-tile {
  background: var(--bg3); border: 2px solid var(--border);
  border-radius: var(--radius); padding: 18px; cursor: pointer; transition: all .15s;
}
.cap-tile:hover { border-color: var(--accent); }
.cap-tile.selected { border-color: var(--accent); background: rgba(88,166,255,.08); }
.cap-tile-title { font-weight: 600; margin-bottom: 4px; font-size: 0.92rem; }
.cap-tile-desc  { font-size: 0.8rem; color: var(--text2); }

/* ── Platform choice ─────────────────────────────────────────────────────── */
.platform-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.platform-tile {
  background: var(--bg3); border: 2px solid var(--border);
  border-radius: var(--radius); padding: 24px 16px;
  cursor: pointer; text-align: center; transition: all .15s;
}
.platform-tile:hover { border-color: var(--accent); }
.platform-tile.selected { border-color: var(--accent); background: rgba(88,166,255,.08); }
.platform-tile-icon { font-size: 2rem; margin-bottom: 10px; }
.platform-tile-name { font-weight: 600; font-size: 0.95rem; }
.platform-tile-desc { font-size: 0.78rem; color: var(--text2); margin-top: 4px; }

/* ── Grid layouts ────────────────────────────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin-bottom: 24px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
@media (max-width: 900px) { .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .grid-2, .cap-grid, .platform-grid, .grid-3 { grid-template-columns: 1fr; } }

/* ── Stat cards ──────────────────────────────────────────────────────────── */
.stat-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.stat-label { font-size: 0.78rem; color: var(--text2); margin-bottom: 6px; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; }
.stat-value { font-size: 1.8rem; font-weight: 700; }
.stat-value.cyan { color: var(--cyan); }
.stat-value.purple { color: var(--purple); }
.stat-value.green { color: var(--green); }
.stat-value.amber { color: var(--amber); }

/* ── Status pill ─────────────────────────────────────────────────────────── */
.pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 20px; padding: 3px 10px; font-size: 0.75rem; font-weight: 600; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.live { background: rgba(63,185,80,.12); color: var(--green); }
.pill.testing { background: rgba(210,153,34,.12); color: var(--amber); }
.pill.pending { background: rgba(248,81,73,.12); color: var(--red); }
.pill.approved { background: rgba(63,185,80,.12); color: var(--green); }

/* ── Chat ────────────────────────────────────────────────────────────────── */
.chat-wrap { display: flex; flex-direction: column; height: calc(100vh - 56px - 56px); }
.chat-log  { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.bubble { max-width: 75%; padding: 12px 16px; border-radius: 12px; font-size: 0.92rem; line-height: 1.5; }
.bubble.user      { background: var(--accent2); align-self: flex-end; border-bottom-right-radius: 4px; }
.bubble.assistant { background: var(--bg3); align-self: flex-start; border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.bubble-sources { font-size: 0.72rem; color: var(--text3); margin-top: 6px; }
.bubble-time { font-size: 0.7rem; color: var(--text3); margin-top: 4px; }
.chat-input-row { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; gap: 10px; }
.chat-input { flex: 1; background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; color: var(--text); padding: 10px 14px; font-size: 14px; outline: none; }
.chat-input:focus { border-color: var(--accent); }

/* ── Connector health badges ─────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.badge-green  { background: rgba(63,185,80,.15); color: var(--green); }
.badge-red    { background: rgba(248,81,73,.15);  color: var(--red); }
.badge-amber  { background: rgba(210,153,34,.15); color: var(--amber); }
.badge-gray   { background: var(--bg3); color: var(--text3); border: 1px solid var(--border); }

/* ── Auth page ───────────────────────────────────────────────────────────── */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; padding: 40px; width: 100%; max-width: 420px; }
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo-mark { width: 44px; height: 44px; background: var(--accent2); border-radius: 12px; margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.auth-title { font-size: 1.25rem; font-weight: 700; text-align: center; margin-bottom: 4px; }
.auth-sub   { text-align: center; color: var(--text2); font-size: 0.85rem; margin-bottom: 28px; }

/* ── Connect login screen ────────────────────────────────────────────────── */
.login-screen { position: fixed; inset: 0; background: var(--bg); display: flex; align-items: center; justify-content: center; z-index: 100; }
.login-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 16px; padding: 40px 36px; width: 360px; text-align: center; box-shadow: var(--shadow); }
.login-logo { display: flex; gap: 8px; justify-content: center; margin-bottom: 20px; }
.login-card h1 { font-size: 1.4rem; font-weight: 700; margin-bottom: 6px; }
.login-sub { color: var(--text2); margin-bottom: 28px; font-size: 0.9rem; }
.login-card form { display: flex; flex-direction: column; gap: 12px; }
.login-card input { background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; color: var(--text); font-size: 0.95rem; outline: none; transition: border .15s; }
.login-card input:focus { border-color: var(--cyan); }
.login-error { color: var(--red); font-size: 0.85rem; margin-top: 4px; }

/* ── Toast ───────────────────────────────────────────────────────────────── */
#toast-area, #toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 18px; font-size: 14px;
  box-shadow: var(--shadow); animation: slideIn .2s ease; min-width: 220px;
}
.toast.success { border-left: 3px solid var(--green); }
.toast.error   { border-left: 3px solid var(--red); }
.toast.info    { border-left: 3px solid var(--accent); }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── Misc ─────────────────────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.section-label { font-size: 0.78rem; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.empty { text-align: center; padding: 60px 20px; color: var(--text3); font-size: 0.92rem; }
.empty-icon { font-size: 2.5rem; margin-bottom: 12px; opacity: .4; }
.empty h3 { color: var(--text2); font-size: 1rem; margin-bottom: 6px; }
.empty p { font-size: 0.85rem; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }
.section-gap { margin-bottom: 24px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-gap { display: flex; gap: 10px; align-items: center; }
.mt-16 { margin-top: 16px; }
.text-sm { font-size: 0.8rem; color: var(--text2); }

/* ── Ollama status ───────────────────────────────────────────────────────── */
.ollama-status { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--text2); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text3); }
.status-dot.up { background: var(--green); box-shadow: 0 0 6px var(--green); }
.status-dot.down { background: var(--red); }

/* ── Tables ──────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text2); padding: 10px 14px; border-bottom: 1px solid var(--border); font-weight: 600; }
td { padding: 12px 14px; border-bottom: 1px solid rgba(48,54,61,.5); color: var(--text); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(33,38,45,.6); }
.row-link { cursor: pointer; }

/* ── Info banner ─────────────────────────────────────────────────────────── */
.info-banner { background: rgba(88,166,255,.07); border: 1px solid rgba(88,166,255,.2); border-left: 3px solid var(--accent); border-radius: var(--radius); padding: 14px 18px; font-size: 0.875rem; color: var(--text2); line-height: 1.6; }
.info-banner strong { color: var(--text); }

/* ── Getting started steps ───────────────────────────────────────────────── */
.steps { display: flex; flex-direction: column; gap: 12px; }
.step { display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px; background: var(--bg3); border-radius: 8px; border: 1px solid var(--border); }
.step-num { width: 28px; height: 28px; border-radius: 50%; background: var(--cyan); color: #000; font-size: 0.8rem; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.step-body strong { display: block; font-size: 0.9rem; color: var(--text); margin-bottom: 2px; }
.step-body span { font-size: 0.82rem; color: var(--text2); }

/* ── Queue cards ─────────────────────────────────────────────────────────── */
.queue-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.queue-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.queue-contact { font-weight: 600; font-size: 0.95rem; }
.queue-tenant { font-size: 0.75rem; color: var(--cyan); margin-top: 2px; }
.queue-time { font-size: 0.75rem; color: var(--text3); }
.queue-inbound { background: var(--bg3); border-radius: 7px; padding: 10px 12px; font-size: 0.875rem; color: var(--text2); margin-bottom: 10px; }
.queue-inbound-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text3); margin-bottom: 4px; }
.queue-draft-wrap { position: relative; }
.queue-draft { width: 100%; background: rgba(88,166,255,.07); border: 1px solid rgba(88,166,255,.25); border-radius: 7px; padding: 10px 12px; color: var(--text); font-size: 0.9rem; resize: vertical; min-height: 64px; font-family: inherit; outline: none; }
.queue-draft:focus { border-color: var(--accent); }
.queue-actions { display: flex; gap: 8px; margin-top: 10px; }

/* ── Playground ──────────────────────────────────────────────────────────── */
.playground-wrap { display: grid; grid-template-columns: 320px 1fr; gap: 20px; height: calc(100vh - 140px); }
.playground-config { overflow-y: auto; }
.playground-chat { display: flex; flex-direction: column; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.playground-messages { flex: 1; overflow-y: auto; padding: 20px; }
.playground-input { display: flex; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--border); background: var(--bg3); }
.playground-input input { flex: 1; background: var(--bg2); border: 1px solid var(--border); border-radius: 7px; padding: 9px 12px; color: var(--text); font-size: 0.9rem; outline: none; }
.playground-input input:focus { border-color: var(--cyan); }

/* ── Client detail tabs ──────────────────────────────────────────────────── */
.back-btn { display: inline-flex; align-items: center; gap: 6px; color: var(--text2); font-size: 0.85rem; cursor: pointer; margin-bottom: 20px; }
.back-btn:hover { color: var(--text); }
.tabs { display: flex; gap: 4px; margin-bottom: 22px; border-bottom: 1px solid var(--border); padding-bottom: 0; }
.tab { padding: 9px 16px; border: none; background: transparent; color: var(--text2); font-size: 0.875rem; font-weight: 500; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .15s, border-color .15s; }
.tab.active { color: var(--cyan); border-bottom-color: var(--cyan); }
.tab:hover { color: var(--text); }

/* ── Upload zone ─────────────────────────────────────────────────────────── */
.upload-zone { border: 2px dashed var(--border); border-radius: var(--radius); padding: 32px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.upload-zone:hover, .upload-zone.drag-over { border-color: var(--cyan); background: rgba(68,215,255,.04); }
.upload-zone p { color: var(--text2); font-size: 0.875rem; margin-top: 10px; }

/* ── Toggle switch ───────────────────────────────────────────────────────── */
.mode-toggle { display: flex; align-items: center; gap: 10px; }
.mode-toggle label { font-size: 0.85rem; color: var(--text2); }
.switch { position: relative; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; background: var(--bg3); border: 1px solid var(--border); border-radius: 24px; cursor: pointer; transition: background .2s; }
.slider::before { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: var(--text3); border-radius: 50%; transition: transform .2s, background .2s; }
input:checked + .slider { background: rgba(63,185,80,.2); border-color: var(--green); }
input:checked + .slider::before { transform: translateX(20px); background: var(--green); }

/* ── Conn cards ──────────────────────────────────────────────────────────── */
.conn-card { transition: transform .12s; }
.conn-card:hover { transform: translateY(-2px); }
.oauth-connect-btn {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px;
  cursor: pointer; transition: all .15s; width: 100%; margin-bottom: 10px;
}
.oauth-connect-btn:hover { border-color: var(--accent); background: var(--bg4); }
.oauth-connect-btn.connected { border-color: var(--green); }
.oauth-connect-btn .btn-label { flex: 1; text-align: left; }
.oauth-connect-btn .btn-label strong { display: block; font-size: 0.93rem; }
.oauth-connect-btn .btn-label span  { font-size: 0.78rem; color: var(--text2); }
.oauth-connect-btn .status { font-size: 0.8rem; font-weight: 600; }
.oauth-connect-btn .status.ok  { color: var(--green); }
.oauth-connect-btn .status.no  { color: var(--text3); }
.oauth-big-btn {
  background: var(--bg3); border: 2px solid var(--border);
  border-radius: 12px; padding: 24px 20px; cursor: pointer;
  text-align: center; transition: all .15s; min-width: 180px;
  display: flex; flex-direction: column; align-items: center;
}
.oauth-big-btn:hover { border-color: var(--accent); }
.oauth-big-btn.connected { border-color: var(--green); }

/* ── Wizard logo tiles ───────────────────────────────────────────────────── */
.wiz-logo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin-bottom: 16px; }
.wiz-logo-tile {
  background: var(--bg3); border: 2px solid var(--border);
  border-radius: 12px; padding: 20px 14px; cursor: pointer;
  text-align: center; transition: all .15s;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.wiz-logo-tile:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.wiz-logo-tile.selected { border-color: var(--accent); background: rgba(88,166,255,.1); }
.wiz-logo-tile.connected { border-color: var(--green); }
.wiz-logo-icon { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; }
.wiz-logo-name { font-weight: 700; font-size: 0.88rem; }
.wiz-logo-desc { font-size: 0.75rem; color: var(--text2); line-height: 1.4; }

/* ── Social Calendar ─────────────────────────────────────────────────────── */
.social-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.cal-header {
  background: var(--bg2); text-align: center;
  font-size: 0.72rem; font-weight: 600; color: var(--text3);
  padding: 6px 0; text-transform: uppercase; letter-spacing: .04em;
}
.cal-cell {
  background: var(--bg);
  min-height: 72px; padding: 6px 8px; cursor: pointer;
  transition: background .1s; position: relative;
}
.cal-cell:hover { background: var(--bg2); }
.cal-cell.cal-empty { background: var(--bg2); cursor: default; }
.cal-cell.cal-today .cal-day-num {
  background: var(--accent); color: #000; border-radius: 50%;
  width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.cal-day-num { font-size: 0.78rem; color: var(--text2); margin-bottom: 4px; line-height: 22px; }
.cal-dots { display: flex; flex-wrap: wrap; gap: 3px; }
.cal-dot { width: 10px; height: 10px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 6px; color: white; transition: transform .1s; }
.cal-dot:hover { transform: scale(1.4); }

/* ── Momentum ────────────────────────────────────────────────────────────── */
.mo-layout { display: grid; grid-template-columns: 380px 1fr; gap: 24px; align-items: flex-start; }
@media (max-width: 900px) { .mo-layout { grid-template-columns: 1fr; } }
.mo-push-card {
  background: linear-gradient(135deg, #1a1f35 0%, #161b22 100%);
  border: 1px solid #2d3748; border-radius: 14px; padding: 20px;
  margin-bottom: 20px; position: relative; overflow: hidden;
}
.mo-push-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #58a6ff, #bc8cff, #3fb950);
}
.mo-push-header { display: flex; align-items: center; justify-content: space-between; font-size: 0.8rem; font-weight: 600; color: var(--text2); margin-bottom: 12px; text-transform: uppercase; letter-spacing: .04em; }
.mo-push-text { font-size: 0.97rem; line-height: 1.65; color: var(--text); margin-bottom: 12px; }
.mo-affirmation { font-size: 0.85rem; color: var(--purple); font-style: italic; line-height: 1.5; padding: 10px 12px; background: rgba(188,140,255,.08); border-left: 3px solid var(--purple); border-radius: 0 6px 6px 0; margin-bottom: 10px; }
.mo-challenge { font-size: 0.84rem; color: var(--text2); line-height: 1.5; padding: 10px 12px; background: rgba(88,166,255,.07); border-radius: 8px; }
.mo-challenge-label { display: block; font-size: 0.72rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.mo-goal-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; transition: border-color .15s; }
.mo-goal-card:hover { border-color: var(--accent); }
.mo-progress-track { height: 5px; background: var(--bg4); border-radius: 3px; overflow: hidden; margin-bottom: 6px; }
.mo-progress-bar { height: 100%; background: linear-gradient(90deg, var(--accent2), var(--accent)); border-radius: 3px; transition: width .3s; }
.mo-progress-slider { width: 100%; height: 4px; -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer; outline: none; }
.mo-progress-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); cursor: pointer; box-shadow: 0 0 0 3px rgba(88,166,255,.2); }
.mo-right { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; height: calc(100vh - 180px); min-height: 480px; position: sticky; top: 72px; }
.mo-chat-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding-right: 4px; margin-bottom: 12px; }
.mo-style-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.mo-style-tile { background: var(--bg3); border: 2px solid var(--border); border-radius: 12px; padding: 18px 14px; cursor: pointer; text-align: center; transition: all .15s; }
.mo-style-tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.mo-style-tile.selected { border-color: var(--accent); background: rgba(88,166,255,.1); }
.mo-style-emoji { font-size: 1.8rem; margin-bottom: 8px; }
.mo-style-name  { font-weight: 700; font-size: 0.88rem; margin-bottom: 4px; }
.mo-style-desc  { font-size: 0.75rem; color: var(--text2); line-height: 1.4; }
