/* ============================================
   ADMIN PANEL - Hindu Temple Switzerland
   ============================================ */
:root {
  --saffron: #FF6B00;
  --saffron-light: #FF8C2F;
  --gold: #FFD700;
  --deep-red: #8B1A1A;
  --sidebar-bg: #1A0A00;
  --sidebar-width: 260px;
  --header-height: 60px;
  --primary: #FF6B00;
  --success: #28a745;
  --danger: #dc3545;
  --warning: #ffc107;
  --info: #17a2b8;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', sans-serif; background: #F5F5F5; color: #333; }

/* ===== LAYOUT ===== */
.admin-layout { display: flex; min-height: 100vh; }

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-width); background: var(--sidebar-bg);
  position: fixed; top: 0; left: 0; height: 100vh;
  display: flex; flex-direction: column;
  border-right: 2px solid rgba(255,215,0,0.2);
  z-index: 1000; transition: transform 0.3s;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255,215,0,0.15);
  display: flex; align-items: center; gap: 0.75rem;
  text-decoration: none;
}

.sidebar-om { font-size: 2rem; color: var(--gold); }
.sidebar-brand-text { display: flex; flex-direction: column; }
.sidebar-brand-name { color: var(--gold); font-size: 0.9rem; font-weight: 700; }
.sidebar-brand-sub { color: #FF8C2F; font-size: 0.7rem; letter-spacing: 0.08em; }

.sidebar-nav { flex: 1; padding: 1rem 0; }

.nav-section-label {
  padding: 0.75rem 1.5rem 0.25rem;
  font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: rgba(255,215,0,0.4); font-weight: 600;
}

.sidebar-link {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.65rem 1.5rem; color: rgba(255,248,240,0.7);
  text-decoration: none; font-size: 0.875rem; font-weight: 500;
  transition: all 0.2s; border-left: 3px solid transparent;
}

.sidebar-link:hover {
  color: white; background: rgba(255,107,0,0.1); border-left-color: var(--saffron);
}

.sidebar-link.active {
  color: var(--gold); background: rgba(255,215,0,0.08); border-left-color: var(--gold);
}

.sidebar-link i { width: 18px; text-align: center; font-size: 1rem; }

.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255,215,0,0.15);
  font-size: 0.8rem; color: rgba(255,248,240,0.5);
}

.sidebar-footer .user-info { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--saffron), var(--deep-red));
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 0.85rem; flex-shrink: 0;
}
.user-name { color: rgba(255,248,240,0.8); font-size: 0.85rem; font-weight: 500; }
.user-role { color: rgba(255,248,240,0.4); font-size: 0.7rem; }
.btn-logout {
  width: 100%; background: rgba(220,53,69,0.15); border: 1px solid rgba(220,53,69,0.3);
  color: #FF6B6B; padding: 0.4rem 1rem; border-radius: 6px;
  cursor: pointer; font-size: 0.8rem; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
}
.btn-logout:hover { background: rgba(220,53,69,0.25); }

/* ===== MAIN CONTENT ===== */
.main-content {
  margin-left: var(--sidebar-width); flex: 1;
  display: flex; flex-direction: column;
}

/* ===== TOPBAR ===== */
.topbar {
  height: var(--header-height); background: white;
  border-bottom: 1px solid #E0E0E0; padding: 0 1.5rem;
  display: flex; align-items: center; gap: 1rem;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.topbar-title { font-size: 1.1rem; font-weight: 700; color: var(--deep-red); flex: 1; }
.topbar-date { font-size: 0.8rem; color: #888; }

/* ===== PAGE CONTENT ===== */
.page-content { padding: 1.5rem; flex: 1; }

/* ===== CARDS ===== */
.stat-card {
  background: white; border-radius: 14px; padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  border-left: 4px solid var(--saffron); position: relative; overflow: hidden;
  transition: transform 0.2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.1); }
.stat-card.green  { border-left-color: var(--success); }
.stat-card.red    { border-left-color: var(--danger); }
.stat-card.blue   { border-left-color: var(--info); }
.stat-card.gold   { border-left-color: var(--gold); }

.stat-card-icon {
  position: absolute; right: 1.5rem; top: 50%; transform: translateY(-50%);
  font-size: 3rem; opacity: 0.1;
}
.stat-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: #888; margin-bottom: 0.25rem; font-weight: 600; }
.stat-value { font-size: 2rem; font-weight: 700; color: #333; line-height: 1.1; }
.stat-sub { font-size: 0.8rem; color: #999; margin-top: 0.25rem; }
.stat-value.green { color: var(--success); }
.stat-value.red   { color: var(--danger); }
.stat-value.orange { color: var(--saffron); }
.stat-value.gold  { color: #B8960C; }

/* ===== TABLE ===== */
.table-card {
  background: white; border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06); overflow: hidden;
  margin-bottom: 1.5rem;
}
.table-card-header {
  padding: 1rem 1.5rem; border-bottom: 1px solid #F0F0F0;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.table-card-title { font-weight: 700; color: var(--deep-red); font-size: 1rem; flex: 1; }
.table-responsive { overflow-x: auto; }
table.admin-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
table.admin-table th {
  background: #FFF8F0; padding: 0.75rem 1rem;
  text-align: left; font-weight: 600; color: #555;
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em;
  border-bottom: 2px solid #F0E8E0;
}
table.admin-table td { padding: 0.8rem 1rem; border-bottom: 1px solid #F8F8F8; vertical-align: middle; }
table.admin-table tr:hover td { background: #FFFAF5; }
table.admin-table tr:last-child td { border-bottom: none; }

/* ===== BADGES ===== */
.badge-category {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
}
.badge-archana  { background: rgba(255,107,0,0.1); color: var(--saffron); }
.badge-donation { background: rgba(40,167,69,0.1); color: #28a745; }
.badge-rental   { background: rgba(23,162,184,0.1); color: #17a2b8; }
.badge-other    { background: rgba(108,117,125,0.1); color: #6c757d; }
.badge-utilities { background: rgba(255,193,7,0.1); color: #856404; }
.badge-maintenance { background: rgba(220,53,69,0.1); color: #dc3545; }
.badge-priest   { background: rgba(102,16,242,0.1); color: #6610f2; }
.badge-supplies  { background: rgba(13,202,240,0.1); color: #0dcaf0; }

/* ===== BUTTONS ===== */
.btn-sm-action {
  background: none; border: none; cursor: pointer;
  padding: 4px 8px; border-radius: 6px; font-size: 0.9rem;
  transition: all 0.2s;
}
.btn-sm-action.edit  { color: #0d6efd; }
.btn-sm-action.edit:hover  { background: rgba(13,110,253,0.1); }
.btn-sm-action.del   { color: #dc3545; }
.btn-sm-action.del:hover   { background: rgba(220,53,69,0.1); }
.btn-sm-action.view  { color: #198754; }
.btn-sm-action.view:hover  { background: rgba(25,135,84,0.1); }

.btn-primary-temple {
  background: linear-gradient(135deg, var(--saffron), #CC5500);
  color: white; border: none; padding: 0.5rem 1.2rem;
  border-radius: 8px; font-weight: 600; font-size: 0.875rem;
  cursor: pointer; transition: all 0.2s;
  display: inline-flex; align-items: center; gap: 0.4rem;
}
.btn-primary-temple:hover { background: linear-gradient(135deg, var(--saffron-light), var(--saffron)); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255,107,0,0.3); }

/* ===== FILTER BAR ===== */
.filter-bar {
  background: white; border-radius: 14px; padding: 1rem 1.5rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06); margin-bottom: 1.5rem;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.filter-bar label { font-size: 0.8rem; color: #666; font-weight: 600; white-space: nowrap; }
.filter-bar input, .filter-bar select {
  border: 1px solid #ddd; border-radius: 8px; padding: 0.4rem 0.8rem;
  font-size: 0.875rem; color: #333; background: white; outline: none;
  transition: border-color 0.2s;
}
.filter-bar input:focus, .filter-bar select:focus { border-color: var(--saffron); }

/* ===== MODALS ===== */
.modal-header { background: linear-gradient(135deg, var(--saffron), #CC5500); color: white; }
.modal-header .btn-close { filter: invert(1); }
.modal-title-custom { font-weight: 700; }

/* ===== AMOUNT DISPLAY ===== */
.amount-positive { color: #28a745; font-weight: 700; }
.amount-negative { color: #dc3545; font-weight: 700; }
.amount-neutral  { color: #333; font-weight: 600; }

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center; padding: 4rem 2rem; color: #999;
}
.empty-state i { font-size: 3.5rem; color: #ddd; display: block; margin-bottom: 1rem; }
.empty-state p { font-size: 1rem; }

/* ===== POS SHORTCUT BANNER ===== */
.pos-banner {
  background: linear-gradient(135deg, var(--saffron), var(--deep-red));
  color: white; border-radius: 14px; padding: 1.25rem 1.5rem;
  display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem;
}
.pos-banner-icon { font-size: 2rem; }
.pos-banner-text { flex: 1; }
.pos-banner-text h4 { font-weight: 700; margin-bottom: 0.2rem; }
.pos-banner-text p { font-size: 0.85rem; opacity: 0.85; }

/* ===== MOBILE SIDEBAR ===== */
.sidebar-toggle {
  display: none; position: fixed; top: 0.75rem; left: 1rem;
  z-index: 1100; background: var(--saffron); border: none;
  color: white; border-radius: 8px; padding: 0.4rem 0.7rem;
  font-size: 1.2rem; cursor: pointer;
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .sidebar-toggle { display: block; }
  .stat-value { font-size: 1.6rem; }
}
