@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --admin-black: #08080a;
  --admin-sidebar: #0b0b0e;
  --admin-card: #121217;
  --admin-card-hover: #171720;
  --admin-border: #23232c;
  --admin-gold: #d4a72c;
  --admin-gold-hover: #e5b738;
  --admin-gold-glow: rgba(212, 167, 44, 0.2);
  --admin-text: #f4f4f5;
  --admin-text-muted: #9ca3af;
  --admin-success: #22c55e;
  --admin-warning: #f59e0b;
  --admin-danger: #ef4444;
  --admin-info: #3b82f6;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--admin-black);
  color: var(--admin-text);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

/* --- SIDEBAR --- */
.admin-sidebar {
  width: 260px;
  background-color: var(--admin-sidebar);
  border-right: 1px solid var(--admin-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-logo img {
  height: 40px;
  width: auto;
}

.sidebar-badge {
  background: var(--admin-gold-glow);
  color: var(--admin-gold);
  border: 1px solid var(--admin-gold);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
}

.sidebar-menu {
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  overflow-y: auto;
}

.menu-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #6b7280;
  letter-spacing: 1px;
  padding: 12px 10px 4px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  color: var(--admin-text-muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.sidebar-link svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
  flex-shrink: 0;
}

.sidebar-link:hover {
  background-color: var(--admin-card);
  color: var(--admin-gold);
}

.sidebar-link.active {
  background-color: var(--admin-card);
  color: var(--admin-gold);
  font-weight: 600;
  border-left: 3px solid var(--admin-gold);
}

.sidebar-footer {
  padding: 16px 14px;
  border-top: 1px solid var(--admin-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-sidebar-ext {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px;
  background: transparent;
  border: 1px solid var(--admin-border);
  color: var(--admin-text-muted);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-sidebar-ext:hover {
  border-color: var(--admin-gold);
  color: var(--admin-gold);
  background: var(--admin-gold-glow);
}

/* --- MAIN CONTENT AREA --- */
.admin-main {
  margin-left: 260px;
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--admin-black);
}

.admin-topbar {
  height: 70px;
  padding: 0 32px;
  background-color: var(--admin-sidebar);
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--admin-text);
  font-size: 24px;
  cursor: pointer;
}

.page-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--admin-text);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.topbar-date {
  font-size: 13px;
  color: var(--admin-text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: 30px;
}

.admin-avatar {
  width: 32px;
  height: 32px;
  background: var(--admin-gold);
  color: var(--admin-black);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
}

.admin-name {
  font-size: 13px;
  font-weight: 600;
}

.admin-body {
  padding: 32px;
  flex: 1;
}

/* --- METRIC CARDS GRID --- */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.metric-card {
  background-color: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.25s ease;
}

.metric-card:hover {
  transform: translateY(-3px);
  border-color: rgba(212, 167, 44, 0.35);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.metric-info h4 {
  font-size: 13px;
  font-weight: 500;
  color: var(--admin-text-muted);
}

.metric-value {
  font-family: 'Montserrat', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--admin-text);
  margin-top: 6px;
}

.metric-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(212, 167, 44, 0.1);
  color: var(--admin-gold);
}

.metric-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* --- SECTION PANELS & TABLES --- */
.panel {
  background-color: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 28px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.panel-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--admin-text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* --- BUTTONS --- */
.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background-color: var(--admin-gold);
  color: var(--admin-black);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-gold:hover {
  background-color: var(--admin-gold-hover);
  box-shadow: 0 4px 14px var(--admin-gold-glow);
}

.btn-dark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background-color: #1e1e26;
  color: var(--admin-text);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-dark:hover {
  border-color: #4b5563;
  background-color: #272733;
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background-color: rgba(239, 68, 68, 0.15);
  color: var(--admin-danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-danger:hover {
  background-color: var(--admin-danger);
  color: #fff;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* --- DATA TABLES --- */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.data-table th {
  background-color: #0d0d12;
  color: #9ca3af;
  padding: 14px 16px;
  font-weight: 600;
  border-bottom: 1px solid var(--admin-border);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #1a1a24;
  vertical-align: middle;
  color: #d1d5db;
}

.data-table tr:hover td {
  background-color: #16161e;
}

/* Status Badges */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-pending { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-confirmed { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.badge-progress { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }
.badge-completed { background: rgba(34, 197, 94, 0.15); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.3); }
.badge-cancelled { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }

/* --- MODAL DIALOGS --- */
.admin-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  padding: 20px;
}

.admin-modal.open {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background-color: var(--admin-sidebar);
  border: 1px solid rgba(212, 167, 44, 0.3);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  animation: modalScale 0.25s ease;
}

@keyframes modalScale {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--admin-text);
}

.modal-close {
  background: none;
  border: none;
  color: var(--admin-text-muted);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: #fff;
}

.modal-body {
  padding: 24px;
  max-height: 75vh;
  overflow-y: auto;
}

/* --- FORM CONTROLS --- */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #d1d5db;
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  background-color: #17171e;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-sm);
  color: var(--admin-text);
  font-size: 13.5px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--admin-gold);
  background-color: #1c1c24;
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

/* Image preview box in modal */
.img-preview-box {
  width: 100%;
  height: 140px;
  border: 1px dashed var(--admin-border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #101015;
  margin-top: 8px;
}

.img-preview-box img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

/* --- TOAST ALERTS --- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-toast {
  background: #14141b;
  color: #fff;
  border: 1px solid var(--admin-gold);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideToast 0.3s ease;
}

@keyframes slideToast {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
