/* =====================================================
   style.css — Absensi Digital SMP Minovatif Mertoyudan
   Global / Shared Styles
   ===================================================== */

:root {
  --primary:        #1a6b42;
  --primary-dark:   #124d2f;
  --primary-mid:    #1f8050;
  --primary-light:  #27a060;
  --accent:         #52c788;
  --accent-light:   #a8e6c2;
  --gold:           #f5a623;
  --red:            #e74c3c;
  --blue:           #3498db;
  --orange:         #e67e22;
  --teal:           #1abc9c;
  --purple:         #9b59b6;

  --text-dark:  #1a2332;
  --text-mid:   #4a5568;
  --text-light: #718096;
  --text-hint:  #a0aec0;

  --border:     #e2e8f0;
  --bg-page:    #f0f4f1;
  --bg-card:    #ffffff;

  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  18px;
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.06);
  --shadow-md:  0 4px 20px rgba(0,0,0,0.10);
  --shadow-lg:  0 8px 40px rgba(0,0,0,0.14);

  --font: 'Poppins', -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); color: var(--text-dark); line-height: 1.6; }
img  { max-width: 100%; display: block; }
a    { color: var(--primary); }
code { font-family: 'Courier New', monospace; background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-size: 0.85em; }

/* ---- Utilities ---- */
.text-sm    { font-size: 13px; }
.text-xs    { font-size: 11px; }
.text-muted { color: var(--text-light); }
.text-warning { color: #e67e22; font-weight: 600; }
.text-center { text-align: center; }
.mt-2 { margin-top: 8px; }
.mb-3 { margin-bottom: 12px; }
.font-mono { font-family: 'Courier New', monospace; font-size: 13px; }

/* ---- Alert ---- */
.alert {
  padding: 13px 18px; border-radius: var(--radius-md);
  font-size: 14px; margin-bottom: 20px;
  display: flex; align-items: center; gap: 10px;
}
.alert-success { background: #f0fdf4; border: 1px solid #86efac; color: #166534; }
.alert-error   { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; }
.alert-warning { background: #fffbeb; border: 1px solid #fcd34d; color: #92400e; }

/* ---- Badges ---- */
.badge-status {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 100px; font-size: 11px; font-weight: 600;
}
.badge-status.hadir     { background: #dcfce7; color: #166534; }
.badge-status.terlambat { background: #fef9c3; color: #854d0e; }
.badge-status.pulang    { background: #dbeafe; color: #1e40af; }
.badge-status.green     { background: #dcfce7; color: #166534; }
.badge-status.orange    { background: #ffedd5; color: #9a3412; }
.badge-status.blue      { background: #dbeafe; color: #1e40af; }
.badge-status.yellow    { background: #fef9c3; color: #854d0e; }

.badge-scan { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 100px; font-size: 11px; font-weight: 600; }
.badge-scan.masuk  { background: #dcfce7; color: #15803d; }
.badge-scan.pulang { background: #dbeafe; color: #1d4ed8; }

.badge-class { background: var(--primary); color: #fff; padding: 3px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.badge-type-small { background: #f1f5f9; color: #475569; padding: 2px 8px; border-radius: 4px; font-size: 11px; }
.badge-alert { background: #fff7ed; border: 1px solid #fed7aa; color: #c2410c; padding: 4px 12px; border-radius: 100px; font-size: 13px; }

.rfid-code { font-size: 12px; background: #f8fafc; border: 1px solid #e2e8f0; padding: 3px 8px; border-radius: 6px; color: #475569; }
.wa-numbers { font-size: 12px; color: #1a6b42; line-height: 1.6; }

/* ---- Table Photo ---- */
.table-photo { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; border: 2px solid var(--border); }
.table-photo-placeholder { width: 40px; height: 40px; border-radius: 8px; background: linear-gradient(135deg, #e8f5ee, #c8e6d8); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.td-photo { width: 56px; }
.td-reason { max-width: 200px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
