/* ===============================
   TOKENS
   =============================== */
:root {
    --bg: #f4f6f8;
    --text: #1f2933;

  --muted: #6b7280;
  --muted-2: #4b5563;

  --card: #ffffff;
  --border: #e5e7eb;
  --border-2: #d1d5db;

  --brand: #0f2a44;

  --green:  #15803d;
  --orange: #d97706;
  --red:    #b91c1c;

  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 18px;

  --space-1: 6px;
  --space-2: 10px;
  --space-3: 14px;
  --space-4: 16px;
  --space-5: 18px;
  --space-6: 24px;
}

/* ===============================
   CORE RESET
   =============================== */
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* ===============================
   LAYOUT
   =============================== */
.container {
  max-width: 420px;
  margin: 0 auto;
  padding: var(--space-6) 18px;
  padding-top: max(var(--space-6), env(safe-area-inset-top));
  padding-bottom: max(var(--space-6), env(safe-area-inset-bottom));
}

.with-bottom-nav {
  padding-bottom: max(120px, calc(64px + env(safe-area-inset-bottom)));
}

/* ===============================
   TYPOGRAPHY / TEXT
   =============================== */
.helper {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.muted {
  color: var(--muted);
}

.page-subtitle,
.subtitle {
  margin-bottom: var(--space-5);
  font-size: 14px;
  color: var(--muted-2);
  line-height: 1.45;
}

.footer {
  margin-top: 32px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}

/* Spacing Utility Classes */
.sheet-spacing-top {
  margin-top: var(--space-5);
}

.sheet-spacing-sm {
  margin-top: var(--space-2);
}

.btn-block {
  width: 100%;
}

/* ===============================
   HEADER
   =============================== */
.header {
  margin-bottom: var(--space-5);
}

.header h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
}

.header small {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  color: var(--muted);
}

.today-context {
  margin: 20px 0 28px;
  font-size: 14px;
  color: var(--muted);
}

.tagline {
  margin-top: 6px;
  font-size: 15px;
  color: #374151;
  line-height: 1.45;
}

/* ===============================
   BUTTONS
   =============================== */
.btn {
  display: block;
  width: 100%;
  padding: 16px;
  margin-bottom: var(--space-3);
  border-radius: var(--r-sm);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  text-align: left;
  border: 1px solid transparent;
  cursor: pointer;
  min-height: 44px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn small {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 400;
  color: rgba(255,255,255,0.85);
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-secondary {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border-2);
}

.btn-secondary small {
  color: var(--muted-2);
  font-weight: 400;
}

.btn-suggest {
  padding: 14px;
  text-align: center;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  min-height: 44px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.btn-suggest:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
  transform: translateY(-1px);
}

.btn-suggest:active {
  transform: translateY(0);
}

  min-height: 44px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
.btn-retry {
  width: auto;
  padding: 10px 12px;
  border-radius: 10px;
  margin: 0;
  text-align: center;
}

/* ===============================
   CARDS
   =============================== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}

.card-primary {
  border-color: var(--brand);
  border-width: 2px;
  background: linear-gradient(135deg, rgba(15, 42, 68, 0.02) 0%, rgba(15, 42, 68, 0.05) 100%);
}

/* left accent row (generic) */
.card-row {
  border-left: 4px solid var(--border);
  padding-left: 12px;
  margin-top: 12px;
}

/* use status tokens for consistency */
.card-row.GREEN  { border-color: var(--green); }
.card-row.ORANGE { border-color: var(--orange); }
.card-row.RED    { border-color: var(--red); }

/* ===============================
   DAILY REMINDER
   =============================== */
.daily-reminder {
  margin-top: 24px;
  padding: var(--space-4);
  border-radius: var(--r-sm);
  background: var(--card);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.daily-reminder:hover {
  border-color: var(--brand);
  box-shadow: 0 4px 12px rgba(15, 42, 68, 0.08);
}

.reminder-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

.reminder-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}

/* ===============================
   POPUP MODAL
   =============================== */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.popup-content {
  background: var(--card);
  border-radius: var(--r-lg);
  max-width: 400px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  animation: slideInUp 0.3s ease-out;
}

.popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  border-bottom: 1px solid var(--border);
}

.popup-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.popup-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.popup-close:hover {
  background: var(--border);
  color: var(--text);
}

.popup-body {
  padding: var(--space-4);
}

.welcome-step {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.step-icon {
  font-size: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}

.step-content h4 {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.step-content p {
  margin: 0;
  font-size: 14px;
  color: var(--muted-2);
  line-height: 1.4;
}

.popup-footer {
  padding: var(--space-4);
  border-top: 1px solid var(--border);
  text-align: center;
}

.popup-note {
  margin: var(--space-2) 0 0 0;
  font-size: 12px;
  color: var(--muted);
}

/* ===============================
   HERO BUTTON
   =============================== */
.btn-hero {
  font-size: 16px;
  padding: 18px 20px;
  margin-bottom: var(--space-4);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(15, 42, 68, 0.2);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(15, 42, 68, 0.3);
  }
}
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: max(64px, calc(64px + env(safe-area-inset-bottom)));
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav a {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: #9ca3af;
  text-decoration: none;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav a.active {
  color: var(--brand);
  font-weight: 700;
}

.bottom-nav a.active .icon {
  fill: #1f2933;
}

.bottom-nav a:not(.active) .icon {
  fill: #9ca3af;
}

.icon {
  width: 22px;            
  height: 22px;
  display: block;
  margin: 0 auto 4px;
  stroke: currentColor;
  stroke-width: 2.4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.15s ease;
}

/* Guide icon specific */
.icon-guide {
  fill: none;          
  stroke: currentColor;
}

.icon-guide .dot {
  fill: currentColor;  
  stroke: none;
}

.bottom-nav .icon-play{
  fill: currentColor;
  stroke: none;
}

/* subtle active emphasis */
.bottom-nav a.active .icon {
  transform: scale(1.05);
}

/* ================================
   HISTORY / NOTES
   ================================ */
.log-entry {
  margin-top: 14px;
  padding-left: 12px;
  border-left: 4px solid var(--border);
}

.log-entry.status-GREEN  { border-left-color: var(--green); }
.log-entry.status-ORANGE { border-left-color: var(--orange); }
.log-entry.status-RED    { border-left-color: var(--red); }

.log-status {
  margin-left: 6px;
  font-weight: 800;
}

.log-entry.status-GREEN  .log-status { color: var(--green); }
.log-entry.status-ORANGE .log-status { color: var(--orange); }
.log-entry.status-RED    .log-status { color: var(--red); }

/* Dropdown day */
.history-day {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 14px;
  overflow: hidden;
}

.history-day summary {
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 800;
  display: flex;
  justify-content: space-between;
  cursor: pointer;
}

.history-day summary::-webkit-details-marker { display: none; }

.history-day .count {
  font-weight: 600;
  color: var(--muted);
}

.history-entry {
  padding: 14px 16px;
  border-top: 1px solid #f1f5f9;
  border-left: 4px solid var(--border);
  transition: all 0.2s ease;
}

.history-entry:hover {
  background: #fafbfc;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

.history-entry.status-GREEN  { border-left-color: var(--green); }
.history-entry.status-ORANGE { border-left-color: var(--orange); }
.history-entry.status-RED    { border-left-color: var(--red); }

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.history-time-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-time {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
}

.history-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  background: #f3f4f6;
}

.history-status.status-GREEN {
  color: var(--green);
  background: rgba(22, 163, 74, 0.1);
}

.history-status.status-ORANGE {
  color: var(--orange);
  background: rgba(245, 158, 11, 0.1);
}

.history-status.status-RED {
  color: var(--red);
  background: rgba(239, 68, 68, 0.1);
}

.history-job {
  font-size: 13px;
  font-weight: 600;
  color: #1f2933;
  margin-bottom: 8px;
  padding: 8px 10px;
  background: #f9fafb;
  border-radius: 6px;
  border-left: 3px solid var(--brand);
}

.history-job strong {
  color: var(--brand);
}

/* ===============================
   GUIDE CARDS
   =============================== */
.guide-card {
  background: var(--card);
  border-radius: var(--r-md);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  transition: all 0.3s ease;
}

.guide-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-2px);
  border-color: currentColor;
  opacity: 0.98;
}

/* Color variants */
.guide-card-blue {
  border-color: #e0f2fe;
}

.guide-card-blue:hover {
  background: #f0f9ff;
  border-color: #0284c7;
}

.guide-card-orange {
  border-color: #fed7aa;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.guide-card-orange:hover {
  background: #fffbeb;
  border-color: #d97706;
}

.guide-card-red {
  border-color: #fecaca;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.guide-card-red:hover {
  background: #fef2f2;
  border-color: #dc2626;
}

.guide-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.guide-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
}

.guide-icon-blue {
  background: #e0f2fe;
  color: #0284c7;
}

.guide-icon-orange {
  background: #fed7aa;
  color: #d97706;
}

.guide-icon-red {
  background: #fecaca;
  color: #dc2626;
}

.guide-icon-indicator {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  color: white;
}

.guide-icon-red {
  background: #dc2626;
}

.guide-content {
  flex: 1;
  min-width: 0;
}

.guide-content h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.guide-content p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted-2);
}

.guide-text {
  flex: 1;
}

.guide-text h4 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.guide-text p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted-2);
}

/* ===============================
   GUIDE SECTIONS \u2014 Color-Coded
   =============================== */
.guide-section {
  margin-bottom: 32px;
  padding-bottom: 24px;
}

.section-header {
  margin-bottom: 16px;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 8px;
}

.section-blue {
  background: #e0f2fe;
  color: #0284c7;
}

.section-orange {
  background: #fed7aa;
  color: #d97706;
}

.section-red {
  background: #fecaca;
  color: #dc2626;
}

.section-subtitle {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted-2);
  line-height: 1.5;
}

/* ===============================
   Q1 CHECK LIST
   =============================== */
.check-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 12px;

  padding: 12px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--card);

  font-size: 14px;
  font-weight: 500;
  color: var(--text);

  cursor: pointer;
}

.check-item input {
  width: 18px;
  height: 18px;
}

.check-item:has(input:checked) {
  border-color: var(--brand);
  background: #f8fafc;
}

.check-item.no-change {
  background: #f9fafb;
  border-style: dashed;
  color: var(--muted);
}

/* ===============================
   FORM ELEMENTS
   =============================== */
textarea {
  width: 100%;
  min-height: 96px;
  padding: 14px;
  font-size: 14px;
  line-height: 1.5;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-2);
  resize: vertical;
  margin-bottom: 14px;
  font-family: inherit;
  margin-top: 8px;
}

textarea::placeholder { color: #9ca3af; }

/* Job description counter (use class, not ID) */
.job-desc-counter {
  margin-top: 6px;
  text-align: right;
}

/* ===============================
   SELECT (dropdown)
   =============================== */

/* wrapper 
.select-wrap {
  position: relative;
}

/* base select style */
select {
  width: 100%;
  margin-top: 8px;
  padding: 14px 44px 14px 14px; 
  font-size: 15px;
  line-height: 1.2;

  border-radius: var(--r-sm);
  border: 1px solid var(--border-2);
  background: #fff;
  color: var(--text);

  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  cursor: pointer;
  outline: none;
}

/* focus state */
select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 42, 68, 0.12);
}

/* custom arrow */
select {
  background-image:
    linear-gradient(45deg, transparent 50%, var(--brand) 50%),
    linear-gradient(135deg, var(--brand) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 52%,
    calc(100% - 12px) 52%;
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
}

/* disabled */
select:disabled {
  background: #f9fafb;
  color: #9ca3af;
  cursor: not-allowed;
}


.card select {
  margin-bottom: 0; 
}

/* ===============================
   AI REFLECTION BOX
   =============================== */
.ai-card {
  margin-top: 18px;
  padding: 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--card);
  position: relative;
}

.ai-card .ai-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.ai-title-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-card .ai-title strong {
  font-size: 14px;
  letter-spacing: 0.2px;
}

.ai-chip {
  font-size: 11px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: #374151;
  background: #f9fafb;
}

.ai-latency {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.ai-rid {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  opacity: 0.8;
}

.ai-card .ai-section { 
    margin-top: 14px; 
}

.ai-card .ai-section:first-of-type {
  margin-top: 0;
}

.ai-card .ai-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: #111827;
  margin-bottom: 4px;
}

.ai-card .ai-text {
  font-size: 14px;
  line-height: 1.55;
  color: #374151;
  margin: 0;
}

.ai-card.is-loading .ai-text { color: var(--muted); }

.ai-card.is-error {
  border-color: #fecaca;
  background: #fff7f7;
}

.ai-card.is-error .ai-text { color: #7f1d1d; }

.ai-card.status-ORANGE { 
    border-left: 5px solid var(--orange); 
    
}
.ai-card.status-RED    { 
    border-left: 5px solid var(--red); 
    
}

.ai-actions {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Simple loading shimmer */
.ai-skeleton {
  margin-top: 8px;
  display: grid;
  gap: 10px;
}

.ai-skeleton .line {
  height: 10px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
  position: relative;
}

.ai-skeleton .line::after {
  content: "";
  position: absolute;
  left: -40%;
  top: 0;
  height: 100%;
  width: 40%;
  background: rgba(255,255,255,0.65);
  animation: aiShimmer 1.2s infinite;
}

@keyframes aiShimmer {
  0% { left: -40%; }
  100% { left: 120%; }
}

/* spacing improvement */
#statusReminder {
  margin-top: 12px;
}

#statusReminder strong {
  display: block;
  margin-bottom: 6px;
}

#statusReminder ul {
  margin: 6px 0 12px 18px;
  padding: 0;
}

#statusReminder li {
  margin-bottom: 6px;
}

/* Pause point */
#statusReminder p {
  margin: 10px 0 16px;
}

#nextAction .btn {
  margin-top: 8px;
}

/* ===============================
   LOGIN PAGE
   =============================== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-container {
  width: 100%;
  padding: 24px 18px;
}

.login-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 22px 18px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.login-title {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  text-align: center;
}

.login-subtitle {
  margin: 8px 0 18px;
  text-align: center;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.4;
}

.login-label {
  display: block;
  margin: 10px 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: #374151;
}

.login-form input {
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  outline: none;
}

.login-form input:focus {
  border-color: #0f2a44;
  box-shadow: 0 0 0 3px rgba(15,42,68,0.12);
}

.login-btn {
  margin-top: 14px;
  text-align: center;
}

.login-alert {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.4;
}

.login-alert.is-error {
  background: #fff7f7;
  border: 1px solid #fecaca;
  color: #7f1d1d;
}

.login-alert.is-ok {
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  color: #065f46;
}

.login-note {
  margin: 14px 2px 0;
  text-align: center;
}

/*
.history-job{
  margin-top: 8px;
  font-size: 14px;
  color: #475569;
  line-height: 1.4;
}
*/

.history-job,
.history-note {
  margin-top: 8px;
  font-size: 14px;
  color: #475569;
  line-height: 1.6;
}

.history-note {
  margin-top: 10px;
  padding: 12px;
  background: #f9fafb;
  border-radius: 6px;
  border-left: 2px solid #d1d5db;
}

.history-note.muted {
  color: #9ca3af;
  font-size: 13px;
  font-weight: 500;
}

.history-ai {
  margin-top: 12px;
  border-top: 1px solid #e5e7eb;
  padding-top: 12px;
}

.history-ai-summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--brand);
  list-style: none;
  padding: 8px 0;
  transition: color 0.2s ease;
}

.history-ai-summary:hover {
  color: #1e3a8a;
}

[open] > .history-ai-summary {
  color: var(--brand);
}

.history-ai-content {
  margin-top: 10px;
}

.history-ai-block {
  margin-bottom: 10px;
  padding: 10px;
  background: #f0f5ff;
  border-radius: 6px;
  border-left: 3px solid var(--brand);
}

.history-ai-block strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.history-ai-block p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #1f2933;
}

.history-ai summary::-webkit-details-marker { display: none; }

.history-ai-summary::after {
  content: "›";
  float: right;
  transition: transform 0.2s ease;
}

.history-ai[open] .history-ai-summary::after {
  transform: rotate(90deg);
}

/* ===============================
   HISTORY — EMPTY & ERROR STATES
   =============================== */
.empty-state,
.error-state {
  text-align: center;
  padding: 40px 20px;
  border-radius: var(--r-lg);
  background: #f9fafb;
  border: 1px dashed var(--border);
}

.empty-icon,
.error-icon {
  font-size: 48px;
  margin-bottom: 12px;
  display: block;
}

.empty-state h3,
.error-state h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: #1f2933;
}

.empty-state p,
.error-state p {
  margin: 0 0 16px;
  font-size: 14px;
  color: #6b7280;
  line-height: 1.6;
}

/* ===============================
   HISTORY — LOADING SKELETON
   =============================== */
.loading-skeleton {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skeleton-card {
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
  height: 100px;
  border-radius: var(--r-lg);
  border: 1px solid #e5e7eb;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ===============================
   HISTORY — IMPROVED DATE HEADER
   =============================== */
.history-day {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: 14px;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.history-day[open] {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.history-day summary {
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 800;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.history-day summary:hover {
  background: #f9fafb;
}

.history-day summary::before {
  content: "›";
  margin-right: 8px;
  display: inline-block;
  font-size: 20px;
  transition: transform 0.2s ease;
}

.history-day[open] summary::before {
  transform: rotate(90deg);
}

.history-day .count {
  font-weight: 600;
  color: var(--muted);
  background: #f0f0f0;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 13px;
}

.topbar{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom: 18px; /* dari 12 -> 18, biar header "napas" */
}

.topbar-left{
  flex:1 1 auto;
  min-width:0;
}

.topbar-left .app-title{
  font-size:34px;
  font-weight:800;
  line-height:1.05;
  color:var(--text);
}

.topbar-left .app-subtitle{
  margin-top:6px;
  font-size:16px;
  color:var(--muted-2);
}

.user-chip{
  display:flex;
  flex-direction: column;
  align-items:center;
  gap:8px;

  padding:10px 12px;            /* sedikit lebih kecil */
  border:1px solid rgba(15,42,68,0.10);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(6px);   /* kalau gak support, tetap oke */
  border-radius: 16px;          /* bukan 999px */
  box-shadow: 0 2px 10px rgba(15,42,68,0.06);
  transition: all 0.2s ease;
  cursor: pointer;
}

.user-chip:hover {
  border-color: rgba(15,42,68,0.15);
  box-shadow: 0 4px 12px rgba(15,42,68,0.1);
  transform: translateY(-1px);
}

.user-chip:active {
  transform: translateY(1px);
}

.avatar{
  width:36px;
  height:36px;
  border-radius: 999px;                 /* balik jadi bulat */
  background: rgba(15,42,68,0.08);
  border: 1px solid rgba(15,42,68,0.10);/* ring halus biar "niat" */
  color: var(--brand);
  box-shadow: 0 1px 0 rgba(15,42,68,0.05);

  display:flex;
  align-items:center;
  justify-content:center;

  font-weight: 900;
  font-size: 14px;
  line-height: 1;                       /* penting: huruf gak naik */
}

.user-meta{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:4px;
  line-height:1.05;
}

.user-name{
  font-weight:800;
  font-size:13px;
  color: var(--text);
  max-width: 140px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.user-row{
  display:flex;
  align-items:center;
  gap:8px;
  color: var(--muted);
  font-size:12px;
}

.badge-icon{
  width:24px;
  height:24px;
  opacity:0.75;
}

.user-level,
.token-pill{
  font-size:12px;
  padding:2px 8px;
  border-radius:999px;
  border:1px solid rgba(15,42,68,0.10);
  background: rgba(15,42,68,0.04);
  color: var(--brand);
}

.token-pill{
  background: rgba(217,119,6,0.06);
  border-color: rgba(217,119,6,0.18);
  color: #9a5a03; /* masih nyambung sama orange theme */
}

/* responsive tweak */
@media (max-width: 420px){
  .user-chip{ padding:9px 10px; border-radius:14px; }
  .user-name{ max-width:120px; }
}

/* ===============================
   Account sheet (slide-over)
   =============================== */
.sheet-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
  z-index: 50;
}

.sheet{
  position: fixed;
  left: 50%;
  bottom: -100%;
  transform: translateX(-50%);
  width: min(520px, calc(100vw - 24px));
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px 18px 18px 18px;
  box-shadow: 0 18px 45px rgba(0,0,0,0.18);
  padding: 12px 14px 14px;
  z-index: 51;
  transition: bottom .22s ease;
}

.sheet-open .sheet-backdrop{
  opacity: 1;
  pointer-events: auto;
}
.sheet-open .sheet{
  bottom: 12px;
}

.sheet-handle{
  width: 44px;
  height: 5px;
  border-radius: 999px;
  background: rgba(107,114,128,0.25);
  margin: 6px auto 10px;
}

.sheet-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.sheet-title{
  font-weight: 800;
  font-size: 16px;
  color: var(--text);
}

.sheet-close{
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
}

.sheet-profile{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 0 6px;
}

.sheet-avatar{
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(15,42,68,0.08);
  color: var(--brand);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 900;
}

.sheet-name{
  font-weight: 800;
  font-size: 14px;
  color: var(--text);
  line-height: 1.1;
}

.sheet-email{
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.sheet-cards{
  display:flex;
  flex-direction:column;
  gap: 10px;
  margin-top: 6px;
}



.sheet-card{
  border:1px solid var(--border);
  background:var(--card);
  border-radius:18px;
  padding:10px;
  margin-top: 10px;
}

.sheet-card-label{
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.sheet-status-row{
  display:flex;
  align-items:center;
  gap: 10px;
}

.sheet-badge{
  width: 34px;
  height: 34px;
}

.sheet-badge-label{
  font-weight: 800;
  color: var(--text);
  font-size: 14px;
}

.sheet-small{
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.sheet-token-row{
  display:flex;
  align-items:baseline;
  gap: 10px;
}

.sheet-token-big{
  font-size: 28px;
  font-weight: 900;
  color: var(--brand);
}

.sheet-actions{
  margin-top: 10px;
}

.sheet-footer{
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  text-align:center;
}

/* ===== Account slide sheet (right) ===== */
.sheet-overlay{
  position: fixed;
  inset: 0;
  background: rgba(15, 42, 68, 0.20);
  backdrop-filter: blur(2px);
  z-index: 9998;
}

.sheet{
  position: fixed;
  top: 0;
  right: 0;
  height: 100dvh;
  width: min(360px, 92vw);
  background: var(--card);
  border-left: 1px solid var(--border);
  box-shadow: -18px 0 40px rgba(15,42,68,0.18);
  z-index: 9999;

  transform: translateX(102%);
  transition: transform .22s ease;
  display: flex;
  flex-direction: column;
}

.sheet.is-open{ transform: translateX(0); }

.sheet-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--border);
}

.sheet-title{
  font-weight: 800;
  font-size: 16px;
  color: var(--text);
}

.sheet-close{
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.sheet-body{
  padding: 14px;
  overflow: auto;
}

.acct-card{
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 16px;
  padding: 14px;
}

.acct-card.muted{
  background: rgba(15,42,68,0.03);
}

.acct-row{
  display:flex;
  align-items:center;
  gap: 12px;
}

.acct-avatar{
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: rgba(15,42,68,0.08);
  border: 1px solid rgba(15,42,68,0.12);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 900;
  color: var(--brand);
}

.acct-meta{ min-width: 0; }
.acct-name{
  font-size: 16px;
  font-weight: 900;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.acct-email{
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.acct-stats{
  margin-top: 12px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat{
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 14px;
  padding: 10px;
}

.stat.big{ grid-column: 1 / -1; }

.stat.big#acctActivityCard{
  background: rgba(15,42,68,0.03);
}

#acctActivity{
  font-size: 22px;
  font-weight: 800;
  margin-top: 6px;
}

#acctActivityDetail{
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted-2);
}

.stat-label{
  font-size: 12px;
  color: var(--muted-2);
}

.stat-value{
  margin-top: 6px;
  font-weight: 800;
  color: var(--text);
}

#acctBadgeLabel{
  font-size: 18px;
  font-weight: 800;
  line-height: 1.15;
}

#acctLevel{
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
}

#acctTokens{
  font-size: 22px;
  font-weight: 900;
  line-height: 1.1;
}

.stat.big .stat-value{
  font-size: 18px;
  line-height: 1.05;
}

.stat-badge{
  margin-top: 6px;
  display:flex;
  align-items:flex-start;
  gap: 8px;
}

.acct-badge-icon{
  width: 36px;
  height: 36px;
  margin-top: 2px;
  display:block;
  opacity: .95;
}

.acct-coming-title{
  font-weight: 900;
  color: var(--text);
}

.acct-coming-sub{
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted-2);
}


html, body { overflow-x: hidden; }


.sheet{
  right: 0;
  left: auto;
  width: min(380px, 92vw);
  max-width: 92vw;
}

.sheet-section{ margin-top:14px; }
.sheet-section-title{ font-weight:800; color:var(--text); margin:10px 2px; font-size:14px; }



.sheet-row{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 10px;
  border:0;
  background:transparent;
  text-align:left;
  font-weight:700;
  color:var(--text);
  cursor:pointer;
}

.sheet-divider{ height:1px; background:var(--border); margin:6px 0; }

.sheet-form{ padding:8px 10px 12px; }
.sheet-label{ display:block; font-size:12px; color:var(--muted-2); margin-bottom:6px; }
.sheet-input{
  width:100%;
  padding:12px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#fff;
  font-size:14px;
  outline:none;
}
.sheet-hint{ margin-top:8px; font-size:12px; color:var(--muted-2); }
.chev{ color:var(--muted-2); font-weight:900; }

table{
  width:100%;
  border-collapse:collapse;
  font-size:13px;
}

th{
  font-size:12px;
  font-weight:600;
  text-transform:uppercase;
  opacity:.7;
}

th,td{
  padding:6px 8px;
  border-bottom:1px solid #eee;
  vertical-align:middle;
}

.mono{
  font-family:monospace;
  font-size:12px;
  white-space:nowrap;
}

td strong{
  font-size:12px;
}

.code-list{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-top:10px;
}

.code-card{
  border:1px solid #e6eaf0;
  border-radius:14px;
  padding:14px;
  background:#fff;
  box-shadow:0 1px 2px rgba(0,0,0,0.03);
}

.code-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
}

.code-value{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size:14px;
  letter-spacing:.4px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:100%;
}

.code-actions{
  display:flex;
  gap:8px;
}

.btn-mini{
  padding:6px 10px;
  border-radius:10px;
  font-size:12px;
  line-height:1;
  font-weight:600;
}

/* Disable button soft amber */
.btn-disable{
  background:#fff8e1;
  border:1px solid #ffe082;
  color:#8d6e63;
}

/* Delete button subtle red */
.btn-delete{
  background:#ffebee;
  border:1px solid #ffcdd2;
  color:#c62828;
}

.code-meta{
  margin-top:10px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  font-size:13px;
}

.meta-pill{
  padding:4px 10px;
  border:1px solid #eef2f7;
  border-radius:999px;
  background:#f8fafc;
  font-size:12px;
}

.note{
  max-width:260px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* Status badge */
.badge{
  padding:4px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
}

.badge-new{
  background:#e8f5e9;
  color:#2e7d32;
}

.badge-used{
  background:#eceff1;
  color:#455a64;
}

.badge-disabled{
  background:#ffebee;
  color:#c62828;
}

.insight-card { padding:16px; }

.insight-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.insight-select{
  width:160px;
  margin-top:6px;
}

.insight-metrics{
  margin-top:12px;
}

.big-number{
  font-size:44px;
  font-weight:800;
  line-height:1;
}

.mixbar{
  width:100%;
  height:10px;
  border-radius:999px;
  overflow:hidden;
  background:#e5e7eb;
  display:flex;
}

.mixbar .seg{ height:100%; display:block; }

/* ini yang penting: */
.mixbar .green{ background:#16a34a; }
.mixbar .orange{ background:#f59e0b; }
.mixbar .red{ background:#ef4444; } /* <- merah beneran */

.mixlegend{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-top:10px;
  font-size:14px;
}

/* ===============================
   NEW HOME ELEMENTS
   =============================== */
.status-snapshot {
  margin-top: 24px;
  margin-bottom: 20px;
  padding: var(--space-4);
  border-radius: var(--r-sm);
  background: var(--card);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.status-snapshot:hover {
  border-color: var(--brand);
  box-shadow: 0 4px 12px rgba(15, 42, 68, 0.08);
}

.snapshot-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

.snapshot-content {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}

.how-it-works {
  margin-top: 24px;
}

.how-it-works details {
  transition: all 0.3s ease;
}

.how-it-works details {
  padding: var(--space-3);
  border-radius: var(--r-sm);
  background: var(--card);
  border: 1px solid var(--border);
}

.how-it-works summary {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}

.how-it-works ul {
  margin: 10px 0 0 0;
  padding-left: 20px;
}

.how-it-works li {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}

.insights-preview {
  margin-top: 24px;
}

.first-time-guide {
  margin-top: 16px;
  padding: var(--space-4);
  border-radius: var(--r-sm);
  background: #e0f2fe; /* light blue */
  border: 1px solid #0ea5e9;
  transition: all 0.3s ease;
}

.first-time-guide:hover {
  background: #cce5f9;
  border-color: #0284c7;
  box-shadow: 0 4px 12px rgba(3, 102, 214, 0.1);
}

.first-time-guide p {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.first-time-guide ol {
  margin: 0;
  padding-left: 20px;
}

.first-time-guide li {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}

/* ===============================
   INSIGHTS PAGE
   =============================== */
.btn-back-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  font-size: 20px;
  color: #1f2933;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
  padding: 0;
  flex-shrink: 0;
}

.btn-back-icon:hover {
  background: #e5e7eb;
}

.btn-back-icon:active {
  transform: scale(0.95);
}

.btn-back-icon.loading {
  animation: spin 1s linear infinite;
}

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

.ins-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  background: #f3f4f6;
  font-size: 13px;
}

.chip-label {
  color: #6b7280;
  font-weight: 700;
}

.chip-strong {
  font-weight: 800;
}

/* Window selector */
.win-select {
  border: 1px solid #e5e7eb;
  background: #fff;
  font-weight: 800;
  padding: 7px 36px 7px 12px;
  border-radius: 999px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  line-height: 1.2;
  cursor: pointer;
  min-width: 140px;
  text-align: left;
}

/* Status mix bar */
.bar {
  height: 10px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
  display: flex;
}

.bar > div {
  height: 100%;
  min-width: 0;
}

.kpi {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  margin-top: 6px;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Insights list styling */
.list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.list li {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.list li:last-child {
  border-bottom: none;
}

/* Category badge styling */
.cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}

.cat-icon {
  font-size: 14px;
  width: 20px;
  text-align: center;
}

.cat-equipment {
  background: #fed7aa;
  color: #92400e;
}

.cat-config {
  background: #bfdbfe;
  color: #1e3a8a;
}

.cat-method {
  background: #d8b4fe;
  color: #581c87;
}

.cat-personnel {
  background: #bbf7d0;
  color: #065f46;
}

.cat-environment {
  background: #a5f3fc;
  color: #164e63;
}

.cat-uncategorized {
  background: #f3f4f6;
  color: #6b7280;
}

/* Progress bar */
.cat-progress {
  width: 80px;
  height: 6px;
  background: #eef2f7;
  border-radius: 3px;
  overflow: hidden;
}

.cat-progress-fill {
  height: 100%;
  background: #d1d5db;
  border-radius: 3px;
}

.cat-count {
  min-width: 40px;
  text-align: right;
  font-weight: 800;
  font-size: 16px;
}

/* ===============================
   PROGRESS INDICATOR
   =============================== */
.progress-container {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 4px;
}

.step {
  flex: 1;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #9ca3af;
  padding: 4px 2px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.step.active {
  background: var(--brand);
  color: white;
}

.progress-bar {
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--brand);
  border-radius: 2px;
  transition: width 0.5s ease;
}

/* ===============================
   FORM VALIDATION
   =============================== */
.form-error {
  border-color: var(--red) !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.1) !important;
}

.form-success {
  border-color: var(--green) !important;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.1) !important;
}

.validation-message {
  font-size: 12px;
  margin-top: 4px;
  display: none;
}

.validation-message.error {
  color: var(--red);
}

.validation-message.success {
  color: var(--green);
}

/* ===============================
   ANIMATIONS
   =============================== */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.card {
  animation: slideInUp 0.4s ease-out;
}

.btn-primary {
  transition: all 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 42, 68, 0.15);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: #f9fafb;
  border-color: var(--brand);
  box-shadow: 0 2px 8px rgba(15, 42, 68, 0.1);
  transform: translateY(-1px);
}

.btn-secondary:active {
  transform: translateY(0);
}

.btn-suggest {
  animation: fadeIn 0.6s ease-out 0.2s both;
}

/* ===============================
   STATUS VISUALIZATION
   =============================== */
.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  margin: 8px 0;
}

.status-green {
  background: rgba(22, 163, 74, 0.1);
  color: var(--green);
  border: 1px solid rgba(22, 163, 74, 0.2);
}

.status-orange {
  background: rgba(245, 158, 11, 0.1);
  color: var(--orange);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-red {
  background: rgba(239, 68, 68, 0.1);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ===============================
   DEMO BUTTON
   =============================== */
.btn-demo {
  display: flex;
  align-items: center;
  gap: var(--space-2); /* 10px */
  width: 100%;
  padding: 12px var(--space-4); /* 12px 16px */
  margin-bottom: var(--space-3); /* 14px */
  background-color: var(--card); /* Putih bersih */
  border: 1px dashed var(--brand); /* Garis putus-putus warna brand */
  border-radius: var(--r-sm); /* 12px */
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.btn-demo:hover {
  background-color: var(--bg); /* Sedikit abu-abu saat dihover */
  border-style: solid;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(15, 42, 68, 0.08);
}

.btn-demo .demo-icon {
  font-size: 18px;
}

.btn-demo .demo-text {
  flex: 1;
}

.btn-demo .demo-link {
  color: var(--brand);
  text-decoration: underline;
}


.legal-link{
    display:inline-block;
    font-size:13px;
    color:#6b7280;
    text-decoration:none;
    border-bottom:1px dashed #9ca3af;
    padding-bottom:2px;
}
.legal-link:hover{
    color:#374151;
    border-bottom-color:#374151;
}
