/* ===== ADMIN UI VARIABLES ===== */
:root {
  --saffron: #FF6B00;
  --cream: #FFF8E7;
  --cream-dark: #F5EDCF;
  --brown: #3B1F0A;
  --text-dark: #2A1204;
  --text-mid: #5C3317;
  --text-light: #8B6040;
  --white: #FFFFFF;
  --bg-color: #F4F6F8;
  --radius: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body { background-color: var(--bg-color); color: var(--text-dark); }

.screen-center { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.card { background: var(--white); padding: 24px; border-radius: var(--radius); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.login-card { width: 100%; max-width: 400px; text-align: center; }

.input-field { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 4px; margin-bottom: 10px; font-size: 0.95rem; background: #fff;}
.input-group label { display: block; font-size: 0.8rem; font-weight: bold; color: var(--text-mid); margin-bottom: 4px; text-transform: uppercase; }

.btn { padding: 10px 16px; border-radius: 4px; font-weight: bold; cursor: pointer; border: none; transition: 0.2s; display: inline-flex; align-items: center; gap: 8px;}
.btn-sm { padding: 6px 12px; font-size: 0.85rem; }
.btn-primary { background: var(--saffron); color: white; }
.btn-primary:hover { opacity: 0.9; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-outline { background: transparent; border: 1px solid #ddd; color: var(--text-mid); }
.btn-outline:hover { background: #f0f0f0; }

.admin-nav { background: var(--brown); color: white; display: flex; justify-content: space-between; align-items: center; padding: 0 24px; height: 60px; position: sticky; top: 0; z-index: 50;}
.nav-brand { font-weight: bold; font-size: 1.2rem; color: var(--saffron); }
.nav-links { display: flex; gap: 5px; }
.nav-btn { background: transparent; color: white; border: none; padding: 8px 16px; cursor: pointer; font-weight: bold; opacity: 0.7; border-radius: 4px; transition: 0.2s; }
.nav-btn:hover, .nav-btn.active { opacity: 1; background: rgba(255,255,255,0.1); color: var(--saffron); }

.admin-container { max-width: 1400px; margin: 24px auto; padding: 0 20px; }
.control-panel { margin-bottom: 24px; }

.table-container { overflow-x: auto; padding: 0; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.admin-table th, .admin-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid #eee; }
.admin-table th { background: #fafafa; font-weight: bold; color: var(--text-mid); text-transform: uppercase; font-size: 0.8rem; position: sticky; top: 0; }
.admin-table tr:hover { background: #fdfdfd; }

.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal-content { 
  width: 90%; 
  max-width: 500px; 
  max-height: 85vh; /* 🚀 NEW: Limits the modal height to 85% of the screen */
  overflow-y: auto; /* 🚀 NEW: Automatically adds a scrollbar if content is too long */
}

/* 🚀 NEW: Beautiful slim scrollbar specifically for Admin Modals */
.modal-content::-webkit-scrollbar { width: 6px; }
.modal-content::-webkit-scrollbar-track { background: var(--bg-color); border-radius: 10px; }
.modal-content::-webkit-scrollbar-thumb { background: var(--saffron); border-radius: 10px; }

/* Toasts */
#toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { background: #333; color: white; padding: 12px 20px; border-radius: 4px; font-size: 0.9rem; box-shadow: 0 4px 12px rgba(0,0,0,0.2); opacity: 0; transform: translateY(20px); transition: 0.3s cubic-bezier(0.4,0,0.2,1); }
.toast.show { opacity: 1; transform: translateY(0); }