/* =======================================================
   CUSTOM THEME: HIJAU EMERALD & EMAS ISLAMI PREMIUM
   Baytulhaq SIM — theme.css
   Semua custom variable, utility class, dan component style
   yang sebelumnya tersebar sebagai inline style di index.html
   ======================================================= */

/* -------------------------------------------------------
   CSS VARIABLES
   ------------------------------------------------------- */
:root {
  --f7-theme-color: #0d5236;
  --f7-navbar-bg-color: #0d5236;
  --f7-navbar-text-color: #ffffff;
  --f7-navbar-link-color: #ffffff;

  /* Brand Colors */
  --color-emerald: #0d5236;
  --color-gold: #c4a053;
  --color-emerald-light: #f3f6f5;
  --color-blue-accent: #2b6cb0;

  /* Text Colors */
  --color-text-primary: #2d3748;
  --color-text-secondary: #718096;
  --color-text-muted: #a0aec0;

  /* Status Colors */
  --color-danger: #e53e3e;
  --color-warning: #dd6b20;

  /* Border & Shadow */
  --border-soft: rgba(13, 82, 54, 0.03);
  --shadow-card: 0 4px 12px rgba(13, 82, 54, 0.06);
}

/* -------------------------------------------------------
   LAYOUT & BODY
   ------------------------------------------------------- */
body {
  background-color: var(--color-emerald-light);
}

/* -------------------------------------------------------
   COLOR UTILITIES
   ------------------------------------------------------- */
.bg-emerald {
  background-color: var(--color-emerald) !important;
}

/* Sort button — tab santri */
.sort-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 3px;
  width: auto !important;
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 600;
  color: #718096;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.sort-btn.active {
  background: #f0fdf4;
  border-color: #0d5236;
  color: #0d5236;
}

.text-gold {
  color: var(--color-gold) !important;
}

.text-emerald {
  color: var(--color-emerald) !important;
}

.text-secondary {
  color: var(--color-text-secondary) !important;
}

.text-muted {
  color: var(--color-text-muted) !important;
}

/* -------------------------------------------------------
   TYPOGRAPHY UTILITIES
   ------------------------------------------------------- */
.fw-700 {
  font-weight: 700 !important;
}

.fw-800 {
  font-weight: 800 !important;
}

.fw-600 {
  font-weight: 600 !important;
}

.fs-11 {
  font-size: 11px !important;
}

.fs-12 {
  font-size: 12px !important;
}

.fs-13 {
  font-size: 13px !important;
}

.fs-13-5 {
  font-size: 13.5px !important;
}

.text-uppercase {
  text-transform: uppercase !important;
}

.text-capitalize {
  text-transform: capitalize !important;
}

/* -------------------------------------------------------
   ROLE BADGE
   ------------------------------------------------------- */
.role-badge {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 12px;
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  background: var(--color-gold);
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* -------------------------------------------------------
   MENU GRID (Halaman Utama)
   ------------------------------------------------------- */
.menu-grid {
  padding: 8px;
}

.menu-card {
  text-align: center;
  padding: 22px 10px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
  border: 1px solid var(--border-soft);
  transition: transform 0.2s;
  cursor: pointer;
}

.menu-card:active {
  transform: scale(0.96);
}

.menu-card i {
  font-size: 38px;
  margin-bottom: 10px;
  display: block;
}

.menu-card span {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--color-text-primary);
  display: block;
}

/* -------------------------------------------------------
   GREETING CARD (Halaman Utama)
   ------------------------------------------------------- */
.greeting-card {
  margin: 16px;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  padding: 20px 15px;
  text-align: center;
}

.greeting-card .greeting-logo {
  width: 70px;
  height: auto;
  margin-bottom: 10px;
}

.greeting-card .greeting-subtitle {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 13.5px;
}

.greeting-card .greeting-name {
  margin: 4px 0 0 0;
  color: var(--color-emerald);
  font-weight: 700;
}

/* -------------------------------------------------------
   QR READER
   ------------------------------------------------------- */
#reader {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  margin-top: 10px;
  border: 2px solid var(--color-emerald);
}

/* -------------------------------------------------------
   ADMIN TAB NAVIGATION
   ------------------------------------------------------- */
.admin-tab-bar {
  display: flex;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.admin-tab-btn {
  flex: 1;
  padding: 10px 0;
  background: var(--color-emerald-light);
  border: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-secondary);
  cursor: pointer;
  border-bottom: 3px solid transparent;
}

.admin-tab-btn.active {
  color: var(--color-emerald);
  border-bottom-color: var(--color-emerald);
  background: #fff;
}

.admin-tab-btn i {
  font-size: 18px;
  display: block;
  margin: 0 auto 2px auto;
}

.admin-tab-content {
  display: none;
}

.admin-tab-content.active {
  display: block;
}

/* -------------------------------------------------------
   LIST HEADER ROW (dipakai di dalam tab panel)
   ------------------------------------------------------- */
.list-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 4px 16px;
}

.list-header-row .block-title {
  margin: 0;
  padding: 0;
  font-size: 13px;
}

/* -------------------------------------------------------
   RINGKASAN INFAQ
   ------------------------------------------------------- */
.infaq-summary {
  padding: 10px 16px;
  background: #f0fff4;
  border-radius: 8px;
  margin: 8px 16px;
  font-size: 13px;
}

/* -------------------------------------------------------
   FORM ITEM OUTLINE — border-radius override
   ------------------------------------------------------- */
.item-input-outline .item-inner::after {
  border-radius: 8px;
}

/* -------------------------------------------------------
   BUTTON RADIUS UTILITIES
   ------------------------------------------------------- */
.btn-rounded {
  border-radius: 8px !important;
}

.btn-rounded-lg {
  border-radius: 10px !important;
}

/* -------------------------------------------------------
   EMPTY STATE LIST ITEM
   ------------------------------------------------------- */
.list-empty-state {
  text-align: center;
  color: var(--color-text-secondary);
  padding: 25px;
}

/* -------------------------------------------------------
   KELAS CHIP FILTER (tab Santri)
   ------------------------------------------------------- */
.kelas-chip {
  display: inline-flex !important;
  flex-shrink: 0;
  width: auto !important;
  padding: 5px 14px;
  border-radius: 20px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.kelas-chip.active {
  background: var(--color-emerald);
  color: #fff;
  border-color: var(--color-emerald);
}

/* -------------------------------------------------------
   SANTRI CARD (tab Santri)
   ------------------------------------------------------- */
.santri-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: box-shadow 0.15s;
}

.santri-card:active {
  box-shadow: 0 2px 8px rgba(13,82,54,0.12);
}

.santri-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.santri-avatar.laki   { background: #2b6cb0; }
.santri-avatar.perempuan { background: #b83280; }

.santri-card-info {
  flex: 1;
  min-width: 0;
}

.santri-card-nama {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.santri-card-meta {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.santri-card-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.santri-card-actions button {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn-edit-santri {
  background: #ebf8ff;
  color: #2b6cb0;
}

.btn-hapus-santri {
  background: #fff5f5;
  color: #e53e3e;
}
