/* RuangArsitek v2 — Organic Warm Earth (final)
   Light: cream FAF6F0 + terracotta B85C3C
   Dark: soft warm dark 1A1612 + terracotta lighter D88562 (bukan true black)
*/

:root {
  /* Surfaces */
  --bg: #FAF6F0;
  --bg-2: #F4ECE0;
  --surface: #FFFFFF;
  --surface-2: #F7F1E8;
  --surface-warm: #EFE6D6;
  --overlay: rgba(26, 22, 18, 0.45);

  /* Foreground */
  --fg: #2A2520;
  --fg-strong: #1A1612;
  --fg-muted: #6B6258;
  --fg-faint: #A39E96;
  --fg-faintest: #C9C2B7;
  --fg-inverse: #FAF6F0;

  /* Borders */
  --border: #EBE2D5;
  --border-strong: #D8CCB9;
  --border-faint: #F4ECE0;
  --divider: #ECE3D5;

  /* Brand */
  --primary: #B85C3C;          /* terracotta muted */
  --primary-hover: #A24E31;
  --primary-press: #8E4429;
  --primary-soft: #EDD8C9;
  --primary-softer: #F7EBE0;
  --on-primary: #FFFFFF;

  --secondary: #6B7A4F;        /* olive */
  --secondary-soft: #DDE3CF;

  /* Pro / Max tier surfaces */
  --pro-surface: #F7EBE0;
  --pro-border: #E8C9B0;
  --pro-glow: 0 4px 14px rgba(184,92,60,0.12);

  --max-surface: #EFEBF7;
  --max-border: #D3CBE7;

  /* Semantic */
  --success: #5F7B4F;
  --success-soft: #DCE4D0;
  --warning: #C99544;
  --warning-soft: #F4E5C9;
  --error: #B54B3F;
  --error-soft: #F2D6CF;
  --info: #527A8A;
  --info-soft: #D5E1E6;

  /* Tier */
  --tier-free: #8A8378;
  --tier-pro: #B85C3C;
  --tier-max: #6B5BA8;

  /* Type */
  --font-display: 'Fraunces', ui-serif, Georgia, serif;
  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, "SF Mono", Menlo, monospace;

  /* Radii */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-xl: 24px;
  --r-2xl: 28px;
  --r-3xl: 32px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-card: 0 1px 2px rgba(40, 32, 24, 0.04), 0 4px 16px rgba(40, 32, 24, 0.05);
  --shadow-elevated: 0 2px 4px rgba(40, 32, 24, 0.06), 0 12px 32px rgba(40, 32, 24, 0.08);
  --shadow-fab: 0 4px 14px rgba(184, 92, 60, 0.32);

  /* Spacing */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-7: 28px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;
}

.theme-dark {
  /* Cool navy dark — bukan true black, bukan warm brown.
     Terracotta accent dipertahankan supaya brand consistency dengan light mode. */
  --bg: #0F1419;
  --bg-2: #141B22;
  --surface: #161C24;
  --surface-2: #1C232D;
  --surface-warm: #232B36;
  --overlay: rgba(0, 0, 0, 0.55);

  --fg: #E6E8EC;
  --fg-strong: #F4F5F8;
  --fg-muted: #9AA2AE;
  --fg-faint: #5E6776;
  --fg-faintest: #3A434F;
  --fg-inverse: #0F1419;

  --border: #232C38;
  --border-strong: #34404F;
  --border-faint: #1A2029;
  --divider: #1F2733;

  --primary: #D88562;          /* terracotta lighter — tetap warm accent on cool dark */
  --primary-hover: #E29874;
  --primary-press: #C57451;
  --primary-soft: #3A2A22;     /* warm tint card surface for primary-related UI */
  --primary-softer: #2A201A;
  --on-primary: #1A1612;

  --secondary: #9AAB7B;
  --secondary-soft: #2A3324;

  --pro-surface: #2A201A;
  --pro-border: #4A3526;
  --pro-glow: 0 4px 16px rgba(216,133,98,0.18);

  --max-surface: #221E33;
  --max-border: #3C3556;

  --success: #8AA572;
  --success-soft: #1F2C22;
  --warning: #D9A85F;
  --warning-soft: #322818;
  --error: #D77268;
  --error-soft: #321F1C;
  --info: #7CA0AE;
  --info-soft: #1F2D33;

  --tier-free: #9AA2AE;
  --tier-pro: #D88562;
  --tier-max: #9889CC;

  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.25), 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-elevated: 0 2px 4px rgba(0, 0, 0, 0.35), 0 12px 32px rgba(0, 0, 0, 0.4);
  --shadow-fab: 0 4px 16px rgba(0, 0, 0, 0.5);
}

/* Reset within mock screens */
.ra-app {
  font-family: var(--font-sans);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
  letter-spacing: -0.005em;
  line-height: 1.45;
}

.ra-app *, .ra-app *::before, .ra-app *::after { box-sizing: border-box; }

.ra-app button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  padding: 0;
  margin: 0;
}

.ra-app input, .ra-app textarea {
  font-family: inherit;
  color: inherit;
}

/* Typography helpers */
.ra-display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 144, "SOFT" 50;
}

.ra-display-tight {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

.ra-eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.ra-mono {
  font-family: var(--font-mono);
  font-feature-settings: "tnum", "zero";
}

/* Material symbols icon font */
.msi {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.msi.fill { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
.msi.w500 { font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24; }

/* Common components */
.ra-card {
  background: var(--surface);
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.theme-dark .ra-card { box-shadow: none; }

.ra-btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  border-radius: var(--r-pill);
  padding: 14px 24px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s, transform 0.1s;
}

.ra-btn-primary:hover { background: var(--primary-hover); }
.ra-btn-primary:active { background: var(--primary-press); transform: scale(0.98); }

.ra-btn-ghost {
  background: transparent;
  color: var(--fg);
  border-radius: var(--r-pill);
  padding: 14px 24px;
  font-weight: 500;
  font-size: 15px;
  border: 1px solid var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ra-input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 16px;
  font-size: 15px;
  color: var(--fg);
  width: 100%;
  transition: border-color 0.15s, background 0.15s;
}

.ra-input::placeholder { color: var(--fg-faint); }
.ra-input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface);
}

.ra-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  font-size: 12.5px;
  font-weight: 500;
  background: var(--surface-2);
  color: var(--fg);
  border: 1px solid var(--border);
}

.status-draft { background: var(--warning); }
.status-final { background: var(--success); }
.status-exported { background: var(--info); }
