/* Not Yet Dude — styles */
/* Dark mode default, mobile-first, no framework */

/* ============================================================
   RESET + TOKENS
   ============================================================ */

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

:root {
  --bg:         #0f0f13;
  --surface:    #1a1a22;
  --surface2:   #24242f;
  --border:     #2e2e3d;
  --accent:     #7c6af7;
  --accent-dim: #5a4ed4;
  --text:       #e8e8f0;
  --text-muted: #8888a0;
  --text-faint: #55556a;
  --danger:     #e05555;
  --warn:       #e0963a;
  --success:    #4caf7a;
  --radius:     12px;
  --radius-sm:  8px;
  --radius-xs:  6px;
  --shadow:     0 4px 24px rgba(0,0,0,0.4);
  --transition: 160ms ease;
  --safe-top:   env(safe-area-inset-top,    0px);
  --safe-bot:   env(safe-area-inset-bottom, 0px);
  --safe-l:     env(safe-area-inset-left,   0px);
  --safe-r:     env(safe-area-inset-right,  0px);
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

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

/* ============================================================
   UTILITY
   ============================================================ */

.hidden      { display: none !important; }
.sr-only     { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.muted       { color: var(--text-muted); }
.faint       { color: var(--text-faint); }
.danger-text { color: var(--danger); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity var(--transition), background var(--transition);
  white-space: nowrap;
  min-height: 44px;
}
.btn:active { opacity: 0.8; }

.btn-primary  { background: var(--accent);  color: #fff; }
.btn-primary:hover { background: var(--accent-dim); }

.btn-ghost    { background: var(--surface2); color: var(--text); }
.btn-ghost:hover { background: var(--border); }

.btn-danger   { background: rgba(224,85,85,0.15); color: var(--danger); border: 1px solid rgba(224,85,85,0.3); }
.btn-danger:hover { background: rgba(224,85,85,0.25); }

.btn-text     { padding: 6px 10px; background: transparent; color: var(--text-muted); font-size: 0.875rem; }
.btn-text:hover { color: var(--text); }

.btn-sm { padding: 7px 14px; font-size: 0.875rem; min-height: 36px; }

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

#app {
  min-height: 100%;
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bot);
  padding-left: var(--safe-l);
  padding-right: var(--safe-r);
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 600px) {
  .container { padding: 0 24px; }
}

/* ============================================================
   LANDING PAGE
   ============================================================ */

#page-landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  text-align: center;
  padding: 48px 24px;
}

.landing-emoji {
  font-size: 3.5rem;
  margin-bottom: 20px;
  display: block;
}

.landing-title {
  font-size: clamp(2rem, 8vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  color: var(--text);
}

.landing-tagline {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.landing-pitch {
  font-size: 0.95rem;
  color: var(--text-faint);
  max-width: 340px;
  margin-bottom: 40px;
  line-height: 1.6;
}

.btn-google {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  color: #333;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  min-height: 48px;
  transition: box-shadow var(--transition);
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.btn-google:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.4); }
.btn-google svg { flex-shrink: 0; }

/* ============================================================
   HEADER
   ============================================================ */

#page-app header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15,15,19,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 720px;
  margin: 0 auto;
  height: 52px;
}

.header-logo {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============================================================
   CAPTURE BAR
   ============================================================ */

.capture-section {
  padding: 20px 0 4px;
}

.capture-form {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.capture-input {
  flex: 1;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 1rem;
  color: var(--text);
  min-height: 50px;
  transition: border-color var(--transition);
}
.capture-input::placeholder { color: var(--text-faint); }
.capture-input:focus { border-color: var(--accent); }

.capture-btn {
  background: var(--accent);
  color: #fff;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  min-height: 50px;
  min-width: 72px;
  transition: background var(--transition);
  flex-shrink: 0;
}
.capture-btn:hover { background: var(--accent-dim); }
.capture-btn:active { opacity: 0.85; }
.capture-saving { opacity: 0.6; pointer-events: none; }

/* ============================================================
   NUDGE BANNER
   ============================================================ */

.nudge-banner {
  margin-top: 16px;
  padding: 10px 14px;
  background: rgba(124,106,247,0.1);
  border: 1px solid rgba(124,106,247,0.25);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background var(--transition);
}
.nudge-banner:hover { background: rgba(124,106,247,0.18); }

/* ============================================================
   SECTION HEADERS + FILTERS
   ============================================================ */

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 28px 0 14px;
}

.section-title {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.filter-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 20px 0 16px;
}

.filter-btn {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all var(--transition);
  min-height: 36px;
}
.filter-btn.active,
.filter-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ============================================================
   DUE / VERDICT SECTION
   ============================================================ */

.due-section {
  margin-top: 20px;
  background: rgba(224,150,58,0.07);
  border: 1px solid rgba(224,150,58,0.25);
  border-radius: var(--radius);
  overflow: hidden;
}

.due-header {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--warn);
  border-bottom: 1px solid rgba(224,150,58,0.2);
}

.due-count-badge {
  background: var(--warn);
  color: #fff;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
}

.due-card {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(224,150,58,0.12);
  transition: background var(--transition);
}
.due-card:last-child { border-bottom: none; }

.due-card-title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 4px;
  cursor: pointer;
}
.due-card-title:hover { color: var(--accent); }

.due-card-signals {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.5;
}

.due-card-signal-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-bottom: 2px;
}

.due-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.verdict-btn {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 40px;
  border: none;
  transition: opacity var(--transition);
}
.verdict-btn:active { opacity: 0.75; }
.verdict-revive  { background: var(--success); color: #fff; }
.verdict-repark  { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.verdict-kill    { background: rgba(224,85,85,0.15); color: var(--danger); border: 1px solid rgba(224,85,85,0.3); }

/* ============================================================
   IDEA CARDS GRID
   ============================================================ */

.ideas-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 40px;
}

@media (min-width: 540px) {
  .ideas-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 720px) {
  .ideas-grid { grid-template-columns: repeat(3, 1fr); }
}

.idea-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: border-color var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 110px;
}
.idea-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.idea-card-title {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.idea-card-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--text-faint);
}

.idea-tag {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 500;
}
.tag-due     { background: rgba(224,150,58,0.18); color: var(--warn); }
.tag-active  { background: rgba(76,175,122,0.18); color: var(--success); }
.tag-missing { background: var(--surface2); color: var(--text-faint); border: 1px solid var(--border); }

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

.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-faint);
}
.empty-state-icon { font-size: 2.5rem; display: block; margin-bottom: 12px; }
.empty-state-msg  { font-size: 0.95rem; }

/* ============================================================
   GRAVEYARD
   ============================================================ */

.graveyard-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}
.graveyard-toggle:hover { color: var(--text); }
.graveyard-toggle .toggle-chevron { margin-left: auto; transition: transform var(--transition); }
.graveyard-toggle.open .toggle-chevron { transform: rotate(180deg); }

/* ============================================================
   MODAL (detail view + repark + settings)
   ============================================================ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  animation: fadeIn 120ms ease;
}

@media (min-width: 600px) {
  .modal-backdrop {
    align-items: center;
    padding: 24px;
  }
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--surface);
  border-radius: var(--radius) var(--radius) 0 0;
  width: 100%;
  max-width: 640px;
  max-height: 90svh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  animation: slideUp 180ms ease;
  padding-bottom: var(--safe-bot);
}

@media (min-width: 600px) {
  .modal {
    border-radius: var(--radius);
    max-height: 88svh;
  }
}

@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}

.modal-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1.3rem;
  border-radius: 6px;
  transition: background var(--transition);
}
.modal-close:hover { background: var(--surface2); color: var(--text); }

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
}

/* ============================================================
   DETAIL FORM FIELDS
   ============================================================ */

.field-group { display: flex; flex-direction: column; gap: 6px; }

.field-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.field-input {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 0.95rem;
  color: var(--text);
  transition: border-color var(--transition);
  min-height: 44px;
}
.field-input:focus { border-color: var(--accent); }
.field-input::placeholder { color: var(--text-faint); }

textarea.field-input {
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}

/* ============================================================
   TIMER PICKER
   ============================================================ */

.timer-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.timer-btn {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  background: var(--surface2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all var(--transition);
  min-height: 38px;
}
.timer-btn.selected,
.timer-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.timer-btn.timer-clear {
  color: var(--danger);
  border-color: rgba(224,85,85,0.3);
  background: rgba(224,85,85,0.08);
}
.timer-btn.timer-clear:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.custom-date-row {
  margin-top: 4px;
}
input[type="date"].field-input {
  color-scheme: dark;
}

/* ============================================================
   IDEA STATUS ROW
   ============================================================ */

.status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.status-pill {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}
.pill-parked  { background: var(--surface2); color: var(--text-muted); border: 1px solid var(--border); }
.pill-due     { background: rgba(224,150,58,0.18); color: var(--warn); }
.pill-active  { background: rgba(76,175,122,0.18); color: var(--success); }
.pill-killed  { background: rgba(224,85,85,0.1); color: var(--danger); }

/* ============================================================
   DETAIL ACTION ROW
   ============================================================ */

.detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

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

.repark-modal .modal-body {
  gap: 16px;
}

/* ============================================================
   SETTINGS
   ============================================================ */

.settings-section {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.settings-section:last-child { border-bottom: none; }

.settings-section-title {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.prompt-question-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.prompt-question-row input {
  flex: 1;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 0.9rem;
  color: var(--text);
  min-height: 40px;
  transition: border-color var(--transition);
}
.prompt-question-row input:focus { border-color: var(--accent); }

.prompt-question-row .btn-icon-danger {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-faint);
  transition: all var(--transition);
  flex-shrink: 0;
}
.prompt-question-row .btn-icon-danger:hover {
  background: rgba(224,85,85,0.15);
  color: var(--danger);
}

/* ============================================================
   INSTALL HINT
   ============================================================ */

.install-hint {
  position: fixed;
  bottom: calc(16px + var(--safe-bot));
  right: 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  max-width: 280px;
  box-shadow: var(--shadow);
  z-index: 300;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  animation: slideUp 200ms ease;
}

.install-hint-text {
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.45;
}

.install-hint-dismiss {
  flex-shrink: 0;
  cursor: pointer;
  color: var(--text-faint);
  font-size: 1.1rem;
  line-height: 1;
  padding: 2px;
}
.install-hint-dismiss:hover { color: var(--text); }

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

#toast-container {
  position: fixed;
  bottom: calc(24px + var(--safe-bot));
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.875rem;
  box-shadow: var(--shadow);
  animation: toastIn 200ms ease;
  pointer-events: auto;
}

.toast.toast-error {
  border-color: rgba(224,85,85,0.4);
  background: rgba(224,85,85,0.12);
  color: var(--danger);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   LOADING SPINNER
   ============================================================ */

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
}

/* ============================================================
   CONFIRM DIALOG
   ============================================================ */

.confirm-dialog .modal-body {
  gap: 12px;
}
.confirm-dialog p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

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

hr.divider {
  border: none;
  border-top: 1px solid var(--border);
}

.due-at-display {
  font-size: 0.8rem;
  color: var(--text-faint);
}

.resurface-count {
  font-size: 0.78rem;
  color: var(--text-faint);
}
