/* ==========================================================================
   theme.css — Barateknologi Admin shared design tokens
   Per design-brief-v0.1.md, Section 6 (Style Guide).
   Loaded on every redesigned page, after Bootstrap, before page-specific CSS.
   ========================================================================== */

:root {
  /* ---- Color ---- */
  --color-bg:        #FAF9F5;   /* page background, warm off-white */
  --color-surface:   #FFFFFF;   /* cards, modals — slightly lifted off bg */
  --color-surface-2: #F3F1EA;   /* nested/secondary surfaces, table stripes */
  --color-border:    #E8E5DC;   /* hairline borders, warm-toned not cold gray */

  --color-accent:       #CC785C; /* primary actions, active states, links */
  --color-accent-hover: #B5674E;
  --color-accent-soft:  #F3E4DD; /* accent-tinted backgrounds, badges */

  --color-text:       #2A2620;  /* body text — warm near-black, not pure #000 */
  --color-text-muted: #6B6459;  /* secondary text, labels */

  /* semantic — keep meaning, warm up the tone slightly */
  --color-success: #3F9142;
  --color-danger:  #C0483C;
  --color-warning: #C98A2C;
  --color-info:    #3B7A9E;

  /* ---- Typography ---- */
  --font-body: 'Figtree', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-size-base: 15px;
  --line-height-base: 1.6;

  /* ---- Shape ---- */
  --radius-sm: 6px;   /* small elements: badges, inputs */
  --radius-md: 8px;   /* default: buttons, cards, modals */
  --radius-lg: 12px;  /* large containers only, used sparingly */

  /* ---- Spacing scale (comfortable density) ---- */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;

  /* table-specific: comfortable row padding, not compact */
  --table-cell-padding-y: 14px;
  --table-cell-padding-x: 16px;

  /* ---- Elevation ---- */
  --shadow-sm: 0 1px 2px rgba(42, 38, 32, 0.06);
  --shadow-md: 0 4px 12px rgba(42, 38, 32, 0.08);
}

* { box-sizing: border-box; }

body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  background: var(--color-bg);
  color: var(--color-text);
}

/* ---- Shared form control theming (used across all redesigned pages) ---- */
.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
}

.form-control {
  font-family: var(--font-body);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.95rem;
  background: var(--color-bg);
}

.form-control:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
  background: var(--color-surface);
  outline: none;
}

/* ---- Shared button theming ---- */
.btn-accent {
  background: var(--color-accent);
  border: none;
  color: #fff;
  font-weight: 600;
  padding: 11px 20px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  transition: background 0.15s ease;
}

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

/* ---- Shared card theming ---- */
.card-theme {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* ---- Shared alert/error theming ---- */
.alert-theme-danger {
  background: #FBEAE7;
  border: 1px solid #F0C9C2;
  color: var(--color-danger);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.875rem;
}
