/* ============================================================
   INNENT CHURCH 360 — Brand & Design System
   Red + Green + Clean dark/light. Completely independent of any
   previous system design.
   ============================================================ */

:root {
  /* Core brand */
  --red:          #E30613;
  --red-dark:     #B8050F;
  --red-soft:     #FEE2E2;
  --green:        #00A651;
  --green-dark:   #008C45;
  --green-soft:   #D1FAE5;

  /* Neutrals */
  --ink:          #0F172A;
  --ink-2:        #1E293B;
  --muted:        #64748B;
  --line:         #E2E8F0;
  --bg:           #F8FAFC;
  --card:         #FFFFFF;
  --sidebar:      #0B1220;
  --sidebar-2:    #111827;

  /* Gradients */
  --grad-brand:   linear-gradient(135deg, #E30613 0%, #00A651 100%);
  --grad-red:     linear-gradient(135deg, #E30613, #B8050F);
  --grad-green:   linear-gradient(135deg, #00A651, #008C45);

  /* Shadows & radius */
  --shadow-sm:    0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow:       0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg:    0 12px 32px rgba(15, 23, 42, 0.12);
  --radius:       14px;
  --radius-sm:    10px;
  --radius-full:  9999px;

  /* Typography */
  --font:         'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }

/* ---------- Shared buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--grad-red);
  color: #fff;
  box-shadow: 0 4px 14px rgba(227, 6, 19, 0.35);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(227, 6, 19, 0.45);
}
.btn-green {
  background: var(--grad-green);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 166, 81, 0.35);
}
.btn-green:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 166, 81, 0.45);
}
.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn-outline:hover {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-soft);
}
.btn-ghost {
  background: transparent;
  color: var(--muted);
}
.btn-ghost:hover { color: var(--ink); background: var(--line); }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.btn-lg { padding: 15px 28px; font-size: 1.05rem; }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}
.card-sub {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 2px;
}

/* ---------- Stats ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--grad-brand);
}
.stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.stat-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 6px;
}
.stat-change.up { color: var(--green); }
.stat-change.down { color: var(--red); }

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th {
  text-align: left;
  padding: 12px 16px;
  background: #F1F5F9;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: #F8FAFC; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-green { background: var(--green-soft); color: var(--green-dark); }
.badge-red { background: var(--red-soft); color: var(--red-dark); }
.badge-gray { background: #F1F5F9; color: var(--muted); }
.badge-blue { background: #DBEAFE; color: #1D4ED8; }

/* ---------- Forms (demo only) ---------- */
.form-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.input {
  flex: 1;
  min-width: 160px;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.15s;
}
.input:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.12);
}
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748B' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

/* ---------- Utilities ---------- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.text-muted { color: var(--muted); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.font-bold { font-weight: 700; }
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Avatar */
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--grad-brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.avatar-sm { width: 28px; height: 28px; font-size: 0.75rem; }

/* Empty state */
.empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
}
.empty svg { margin: 0 auto 16px; opacity: 0.4; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94A3B8; }
