/* =========================================================
   Guardian UI — B Style Compatible
   Works with existing markup
   ========================================================= */

/* ---------- Global ---------- */

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  line-height: 1.5;
}

/* ---------- Layout ---------- */

.section,
.card,
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 24px;
}

.section-tight {
  padding: 16px;
}

/* ---------- Headings ---------- */

h1 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 12px;
}

h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
}

h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.section-hint,
.helper-text {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- Inputs ---------- */

label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  display: block;
  margin-bottom: 4px;
}

input,
select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(15,118,110,0.15);
}

/* ---------- Buttons ---------- */

button,
.btn,
.primary-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}

button.secondary,
.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--border);
}

button:hover,
.primary-btn:hover {
  background: var(--primary-hover);
}

button.secondary:hover {
  background: rgba(15,118,110,0.08);
}

/* ---------- Tables ---------- */

.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

thead th {
  text-align: left;
  padding: 10px 12px;
  color: var(--muted);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

tbody tr:hover {
  background: rgba(15,118,110,0.05);
}

/* ---------- Numbers ---------- */

td.number,
.text-right {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ---------- Income / Result Emphasis ---------- */

.total,
.strong {
  font-weight: 600;
}

.muted {
  color: var(--muted);
}

/* ---------- Inline chips (events later) ---------- */

.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 0.7rem;
  border-radius: 999px;
  background: rgba(15,118,110,0.12);
  color: var(--primary);
  font-weight: 500;
}

/* ---------- Utility ---------- */

.hidden {
  display: none !important;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
