/* ============================================================
   LANDGOLD COLOMBIA – ADMIN PANEL STYLES
   ============================================================ */

:root {
  --gold: #C9A227; --gold-light: #E2BC4A; --gold-dark: #A07D10;
  --green: #1E6B4A; --green-light: #27845C;
  --dark: #2D2D2D; --dark-2: #1A1A1A; --sidebar-w: 260px;
  --danger: #EF4444; --success: #22C55E; --warning: #F59E0B;
  --info: #3B82F6;
  --radius: 12px; --radius-sm: 8px;
  --transition: all .25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body { font-family: 'Inter', sans-serif; background: #F0F2F5; color: #1F2937; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
ul { list-style: none; }
input, textarea, select, button { font-family: inherit; }

/* ─── Login Page ─────────────────────────────────────────── */
.admin-login-body {
  min-height: 100vh;
  background: linear-gradient(135deg, #1A1A1A 0%, #1E6B4A 50%, #1A1A1A 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.login-card {
  background: rgba(255,255,255,.97);
  border-radius: 20px;
  padding: 48px 40px;
  width: 100%; max-width: 420px;
  box-shadow: 0 24px 80px rgba(0,0,0,.4);
}
.login-logo {
  text-align: center; margin-bottom: 32px;
}
.login-logo .brand {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.8rem; font-weight: 800;
}
.login-logo .brand .g { color: var(--gold); }
.login-logo .brand .gr { color: var(--green); }
.login-logo small {
  display: block; font-size: .7rem; color: #6B7280;
  letter-spacing: 3px; text-transform: uppercase; margin-top: 4px;
}
.login-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 4px; }
.login-sub { color: #6B7280; font-size: .875rem; margin-bottom: 28px; }
.form-field { margin-bottom: 18px; }
.form-field label {
  display: block; font-size: .8rem; font-weight: 600;
  color: #374151; margin-bottom: 6px;
}
.form-field input {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid #E5E7EB; border-radius: var(--radius-sm);
  font-size: .9rem; outline: none; transition: var(--transition);
  background: #F9FAFB;
}
.form-field input:focus { border-color: var(--gold); background: #fff; box-shadow: 0 0 0 3px rgba(201,162,39,.12); }
.btn-login {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #fff; border: none; border-radius: var(--radius-sm);
  font-size: .95rem; font-weight: 700; cursor: pointer;
  transition: var(--transition);
}
.btn-login:hover { opacity: .9; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(201,162,39,.4); }
.login-error {
  background: #FEF2F2; border: 1px solid #FCA5A5; color: #DC2626;
  border-radius: var(--radius-sm); padding: 10px 14px;
  font-size: .85rem; margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.login-footer { text-align: center; margin-top: 24px; font-size: .8rem; color: #9CA3AF; }
.login-footer a { color: var(--green); font-weight: 600; }

/* ─── Layout ─────────────────────────────────────────────── */
.admin-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); min-width: var(--sidebar-w);
  background: var(--dark-2); color: #fff;
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; height: 100vh;
  overflow-y: auto; z-index: 100;
  transition: var(--transition);
}
.sidebar-logo {
  padding: 28px 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-logo .brand {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.4rem; font-weight: 800;
}
.sidebar-logo small {
  display: block; font-size: .65rem; color: rgba(255,255,255,.4);
  letter-spacing: 3px; text-transform: uppercase; margin-top: 2px;
}
.sidebar-nav { flex: 1; padding: 20px 0; }
.nav-section-title {
  font-size: .65rem; font-weight: 700; color: rgba(255,255,255,.3);
  letter-spacing: 2px; text-transform: uppercase;
  padding: 16px 24px 8px;
}
.sidebar-link {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 24px; font-size: .875rem; font-weight: 500;
  color: rgba(255,255,255,.65); transition: var(--transition);
  border-left: 3px solid transparent;
}
.sidebar-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar-link.active {
  background: rgba(201,162,39,.12);
  color: var(--gold-light);
  border-left-color: var(--gold);
}
.sidebar-link i { width: 18px; text-align: center; font-size: .95rem; }
.sidebar-footer {
  padding: 20px 24px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: .8rem; color: rgba(255,255,255,.35);
}

.admin-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex; flex-direction: column;
  min-height: 100vh;
}
.admin-topbar {
  background: #fff; border-bottom: 1px solid #E5E7EB;
  padding: 16px 32px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.topbar-title { font-size: 1.1rem; font-weight: 700; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-user {
  display: flex; align-items: center; gap: 10px;
  font-size: .85rem; font-weight: 500;
}
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--green));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: .85rem;
}
.btn-sm {
  padding: 7px 16px; border-radius: var(--radius-sm);
  font-size: .8rem; font-weight: 600; cursor: pointer;
  border: none; transition: var(--transition); display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary { background: var(--gold); color: #fff; }
.btn-primary:hover { background: var(--gold-dark); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-secondary { background: #E5E7EB; color: #374151; }
.btn-secondary:hover { background: #D1D5DB; }
.btn-info { background: var(--info); color: #fff; }

.page-body { padding: 32px; flex: 1; }
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px;
}
.page-header h1 { font-size: 1.5rem; font-weight: 800; }
.page-header p { color: #6B7280; font-size: .875rem; margin-top: 2px; }

/* ─── Cards ──────────────────────────────────────────────── */
.card {
  background: #fff; border-radius: var(--radius);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  overflow: hidden;
}
.card-header {
  padding: 20px 24px; border-bottom: 1px solid #F3F4F6;
  display: flex; align-items: center; justify-content: space-between;
}
.card-header h3 { font-size: 1rem; font-weight: 700; }
.card-body { padding: 24px; }

/* ─── Dashboard ──────────────────────────────────────────── */
.dash-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 20px; margin-bottom: 28px;
}
.dash-stat {
  background: #fff; border-radius: var(--radius);
  padding: 24px; box-shadow: 0 1px 4px rgba(0,0,0,.06);
  display: flex; align-items: flex-start; justify-content: space-between;
}
.dash-stat-info .num {
  font-family: 'Montserrat', sans-serif;
  font-size: 2rem; font-weight: 800; line-height: 1;
}
.dash-stat-info .lbl { font-size: .8rem; color: #6B7280; margin-top: 4px; }
.dash-stat-icon {
  width: 48px; height: 48px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.dash-stat-icon.gold { background: rgba(201,162,39,.12); }
.dash-stat-icon.green { background: rgba(30,107,74,.12); }
.dash-stat-icon.blue { background: rgba(59,130,246,.12); }
.dash-stat-icon.purple { background: rgba(139,92,246,.12); }

/* ─── Tables ─────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
thead th {
  background: #F9FAFB; padding: 12px 16px;
  text-align: left; font-weight: 700; font-size: .75rem;
  text-transform: uppercase; letter-spacing: .5px; color: #6B7280;
  border-bottom: 1px solid #E5E7EB;
}
tbody td { padding: 14px 16px; border-bottom: 1px solid #F3F4F6; vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #F9FAFB; }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 50px;
  font-size: .7rem; font-weight: 700; text-transform: uppercase;
}
.badge-success { background: #D1FAE5; color: #065F46; }
.badge-danger  { background: #FEE2E2; color: #991B1B; }
.badge-warning { background: #FEF3C7; color: #92400E; }
.badge-gold    { background: rgba(201,162,39,.15); color: var(--gold-dark); }
.badge-green   { background: rgba(30,107,74,.12); color: var(--green-dark, #134A33); }

/* ─── Forms ──────────────────────────────────────────────── */
.admin-form { display: grid; gap: 20px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.admin-form-group label {
  display: block; font-size: .8rem; font-weight: 700;
  color: #374151; margin-bottom: 6px;
}
.admin-form-group input,
.admin-form-group textarea,
.admin-form-group select {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid #E5E7EB; border-radius: var(--radius-sm);
  font-size: .875rem; outline: none; transition: var(--transition); background: #fff;
}
.admin-form-group input:focus,
.admin-form-group textarea:focus,
.admin-form-group select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,39,.1); }
.admin-form-group textarea { resize: vertical; min-height: 100px; }
.form-check { display: flex; align-items: center; gap: 8px; }
.form-check input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--gold); }
.form-check label { font-size: .875rem; font-weight: 500; }
.img-preview { margin-top: 8px; border-radius: var(--radius-sm); overflow: hidden; max-width: 200px; }
.img-preview img { width: 100%; }

/* ─── Modal ──────────────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); backdrop-filter: blur(4px);
  z-index: 200; align-items: center; justify-content: center;
  padding: 24px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff; border-radius: 16px;
  width: 100%; max-width: 640px; max-height: 90vh;
  overflow-y: auto; box-shadow: 0 24px 80px rgba(0,0,0,.3);
}
.modal-header {
  padding: 24px 28px 20px;
  border-bottom: 1px solid #E5E7EB;
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 { font-size: 1.1rem; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 1.3rem; cursor: pointer; color: #9CA3AF; transition: var(--transition); }
.modal-close:hover { color: #374151; }
.modal-body { padding: 28px; }
.modal-footer { padding: 20px 28px; border-top: 1px solid #E5E7EB; display: flex; gap: 12px; justify-content: flex-end; }

/* ─── Alert ──────────────────────────────────────────────── */
.alert {
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: .875rem; display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px;
}
.alert-success { background: #D1FAE5; color: #065F46; border: 1px solid #6EE7B7; }
.alert-danger   { background: #FEE2E2; color: #991B1B; border: 1px solid #FCA5A5; }

/* ─── Tabs ───────────────────────────────────────────────── */
.admin-tabs { display: flex; gap: 4px; margin-bottom: 24px; background: #F3F4F6; border-radius: var(--radius-sm); padding: 4px; }
.admin-tab {
  flex: 1; padding: 10px 16px; border-radius: 6px;
  font-size: .85rem; font-weight: 600; cursor: pointer;
  border: none; background: transparent; color: #6B7280;
  transition: var(--transition);
}
.admin-tab.active { background: #fff; color: var(--dark); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .dash-stats { grid-template-columns: 1fr 1fr; }
  .form-row-2 { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .admin-content { margin-left: 0; }
  .dash-stats { grid-template-columns: 1fr 1fr; }
  .page-body { padding: 20px; }
  .admin-topbar { padding: 14px 20px; }
}
@media (max-width: 480px) {
  .dash-stats { grid-template-columns: 1fr; }
}
