/* ==========================================================================
   BIN AMEEN ADMIN DASHBOARD STYLES
   ========================================================================== */
:root {
  --bg-black: #060a10;
  --bg-dark: #090e17;
  --bg-card: #0f1826;
  --bg-card-hover: #152236;
  --bg-input: #090e17;
  
  --gold-primary: #c59b27;
  --gold-light: #dfb743;
  --gold-pale: #f5dc89;
  --gold-gradient: linear-gradient(135deg, #f5dc89 0%, #c59b27 50%, #8c6a12 100%);
  --gold-glow: rgba(197, 155, 39, 0.25);
  
  --text-white: #ffffff;
  --text-light: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glass: rgba(197, 155, 39, 0.22);
  --border-active: #c59b27;
  
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-black);
  color: var(--text-light);
  line-height: 1.6;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Cinzel', Georgia, serif;
  color: var(--text-white);
  letter-spacing: 0.5px;
}

a {
  color: var(--gold-light);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.85;
}

/* Container */
.admin-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   LOGIN PAGE
   ========================================================================== */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: radial-gradient(circle at center, #101929 0%, #060a10 85%);
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 460px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 42px 36px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  text-align: center;
}

.login-logo {
  height: 64px;
  width: auto;
  margin-bottom: 20px;
  filter: drop-shadow(0 4px 15px rgba(197, 155, 39, 0.3));
}

.login-logo-area h2 {
  font-size: 1.4rem;
  margin-bottom: 6px;
  color: var(--text-white);
}

.login-logo-area p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 28px;
}

.login-form {
  text-align: left;
}

.login-hint {
  margin-top: 20px;
  padding: 12px;
  background: rgba(197, 155, 39, 0.08);
  border: 1px dashed var(--border-glass);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: var(--gold-light);
  text-align: center;
}

.login-footer {
  margin-top: 24px;
  font-size: 0.84rem;
}

/* ==========================================================================
   DASHBOARD TOPBAR & HEADER
   ========================================================================== */
.admin-navbar {
  background: var(--bg-dark);
  border-bottom: 1px solid var(--border-glass);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.admin-brand img {
  height: 48px;
  width: auto;
  filter: drop-shadow(0 2px 10px rgba(197, 155, 39, 0.3));
}

.admin-badge {
  background: rgba(197, 155, 39, 0.15);
  border: 1px solid var(--gold-primary);
  color: var(--gold-light);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.admin-user-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--gold-gradient);
  color: #060a10;
  font-weight: 700;
  box-shadow: 0 4px 15px var(--gold-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(197, 155, 39, 0.4);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-subtle);
  color: var(--text-light);
}

.btn-outline:hover {
  background: rgba(197, 155, 39, 0.12);
  border-color: var(--gold-primary);
  color: var(--gold-light);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.btn-danger:hover {
  background: #ef4444;
  color: #ffffff;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 4px;
}

/* ==========================================================================
   TAB NAVIGATION
   ========================================================================== */
.dashboard-header {
  padding: 36px 0 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 28px;
}

.dashboard-title h1 {
  font-size: 2rem;
  margin-bottom: 4px;
}

.dashboard-title p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 32px;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 12px 20px;
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab-btn:hover {
  color: var(--text-white);
}

.tab-btn.active {
  color: var(--gold-light);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gold-gradient);
  border-radius: 3px 3px 0 0;
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

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

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   CARDS & GRIDS
   ========================================================================== */
.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 30px;
  margin-bottom: 28px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.card-header-flex h3 {
  font-size: 1.25rem;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-white);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-control:focus {
  border-color: var(--gold-primary);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

/* ==========================================================================
   TABLES
   ========================================================================== */
.table-responsive {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.admin-table th {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--border-subtle);
}

.admin-table td {
  padding: 16px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.9rem;
  vertical-align: middle;
}

.admin-table tr:hover td {
  background: rgba(255, 255, 255, 0.015);
}

.item-thumb {
  width: 64px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border-glass);
}

.cat-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 600;
  background: rgba(197, 155, 39, 0.12);
  color: var(--gold-light);
  border: 1px solid var(--border-glass);
  text-transform: uppercase;
}

.table-actions {
  display: flex;
  gap: 8px;
}

/* ==========================================================================
   ALERTS & NOTICES
   ========================================================================== */
.admin-alert {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-alert.success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--success);
  color: #34d399;
}

.admin-alert.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid var(--error);
  color: #f87171;
}

/* ==========================================================================
   MODAL WINDOWS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(5px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 34px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.8);
  position: relative;
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text-white);
}

/* Responsive */
@media (max-width: 900px) {
  .form-grid-3, .form-grid-2 {
    grid-template-columns: 1fr;
  }
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .admin-tabs {
    overflow-x: auto;
    white-space: nowrap;
  }
}
