/* ==========================================================================
   HAYIR ÇORBASI - ADMIN DASHBOARD & PWA STYLES
   Mobile-Optimized for Field Personnel & Super Admins
   ========================================================================== */

:root {
  --admin-bg: #090e1f;
  --admin-card: rgba(15, 23, 42, 0.85);
  --admin-card-hover: rgba(22, 33, 62, 0.95);
  --admin-border: rgba(255, 255, 255, 0.1);
  --admin-accent: #ea580c;
  --admin-teal: #0284c7;
}

body.admin-body {
  background: var(--admin-bg);
  color: #f8fafc;
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
}

/* Admin Top Bar */
.admin-navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(11, 19, 41, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--admin-border);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-brand img {
  height: 38px;
}

.admin-brand-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: #ffffff;
}

.admin-role-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  background: rgba(234, 88, 12, 0.2);
  color: #fb923c;
  border: 1px solid rgba(234, 88, 12, 0.4);
}

.admin-user-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Tab Navigation for Admin Views */
.admin-tabs {
  display: flex;
  background: rgba(15, 23, 42, 0.6);
  border-bottom: 1px solid var(--admin-border);
  overflow-x: auto;
  padding: 0 1rem;
  gap: 0.5rem;
}

.admin-tab-btn {
  padding: 1rem 1.25rem;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-tab-btn:hover, .admin-tab-btn.active {
  color: #ffffff;
}

.admin-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--admin-accent);
  border-radius: 3px 3px 0 0;
}

.badge-count {
  background: var(--admin-accent);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
}

/* Tab Content */
.admin-container {
  max-width: 1200px;
  margin: 1.5rem auto;
  padding: 0 1rem;
}

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

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

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-box {
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: 14px;
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
}

.stat-box-title {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 0.5rem;
}

.stat-box-val {
  font-size: 1.85rem;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  color: #ffffff;
}

/* Pending Receipts Table / Cards */
.receipts-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
}

.receipt-card {
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  transition: transform 0.2s;
}

.receipt-card:hover {
  transform: translateY(-3px);
  border-color: rgba(234, 88, 12, 0.4);
}

.receipt-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.receipt-ref {
  font-family: monospace;
  font-size: 1.15rem;
  font-weight: 800;
  color: #fde047;
}

.receipt-thumb-wrap {
  position: relative;
  width: 100%;
  height: 180px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--admin-border);
  cursor: pointer;
}

.receipt-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.receipt-thumb-wrap:hover .receipt-thumb {
  transform: scale(1.04);
}

.receipt-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.btn-approve {
  flex: 1;
  background: #10b981;
  color: #ffffff;
  padding: 0.65rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-approve:hover {
  background: #059669;
}

.btn-reject {
  flex: 1;
  background: #ef4444;
  color: #ffffff;
  padding: 0.65rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-reject:hover {
  background: #dc2626;
}

/* Blackboard Daily List for Field Staff */
.field-chalkboard-container {
  background: #18181b;
  border: 8px solid #78350f;
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.chalkboard-title {
  font-family: 'Outfit', cursive, sans-serif;
  font-size: 1.75rem;
  color: #fef08a;
  text-align: center;
  margin-bottom: 0.5rem;
}

.chalkboard-sub {
  text-align: center;
  color: #94a3b8;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.chalk-name-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chalk-name-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chalk-name-text {
  font-family: 'Caveat', cursive, sans-serif;
  font-size: 1.6rem;
  color: #ffffff;
  letter-spacing: 0.03em;
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.92);
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.lightbox-modal.active {
  display: flex;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
}

/* Login Modal */
.admin-login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #090e1f;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.admin-login-card {
  background: #0f1c3f;
  border: 1px solid var(--admin-border);
  border-radius: 20px;
  max-width: 420px;
  width: 100%;
  padding: 2.5rem;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.pin-input {
  letter-spacing: 0.4em;
  font-size: 1.75rem;
  text-align: center;
  font-family: monospace;
}
