/* ==========================================================================
   SEAPLATE — ADMIN PANEL STYLESHEET
   Lightweight, clean, modern dark administrative interface
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

:root {
  --admin-bg: #0b0d12;
  --admin-surface: #12151d;
  --admin-card: #181c26;
  --admin-card-hover: #1f2431;
  --admin-border: rgba(255, 255, 255, 0.08);
  --admin-gold: #cba76b;
  --admin-gold-hover: #dfbe83;
  --text-pure: #ffffff;
  --text-main: #e2e5eb;
  --text-muted: #8892a4;
  
  --status-pending: #eab308;
  --status-confirmed: #22c55e;
  --status-rejected: #ef4444;
  --status-cancelled: #6b7280;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --font-sans: 'Outfit', sans-serif;
  --font-serif: 'Playfair Display', serif;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--admin-bg);
  color: var(--text-main);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ==========================================================================
   LOGIN SCREEN
   ========================================================================== */
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.login-card {
  background: var(--admin-card);
  border: 1px solid rgba(203, 167, 107, 0.25);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  text-align: center;
}

.login-logo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--admin-gold);
  margin-bottom: 16px;
  object-fit: cover;
}

.login-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--text-pure);
  margin-bottom: 6px;
}

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

/* Form inputs */
.admin-form-group {
  margin-bottom: 20px;
  text-align: left;
}

.admin-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.admin-input, .admin-select, .admin-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: var(--text-pure);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s;
}

.admin-input:focus, .admin-select:focus, .admin-textarea:focus {
  border-color: var(--admin-gold);
  box-shadow: 0 0 0 3px rgba(203, 167, 107, 0.15);
  background: rgba(255, 255, 255, 0.07);
}

.btn-admin-primary {
  background: var(--admin-gold);
  color: #0b0d12;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  padding: 13px 20px;
  width: 100%;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-admin-primary:hover {
  background: var(--admin-gold-hover);
  transform: translateY(-1px);
}

.btn-admin-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-admin-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-pure);
}

/* ==========================================================================
   ADMIN LAYOUT
   ========================================================================== */
.admin-layout {
  display: none; /* revealed upon authentication */
  min-height: 100vh;
}

.admin-sidebar {
  width: 260px;
  background: var(--admin-surface);
  border-right: 1px solid var(--admin-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--admin-gold);
  object-fit: cover;
}

.sidebar-brand-name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--text-pure);
  letter-spacing: 0.05em;
}

.sidebar-badge {
  font-size: 0.7rem;
  color: var(--admin-gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.sidebar-nav {
  list-style: none;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  color: var(--text-muted);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.sidebar-nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

.sidebar-nav-item.active {
  background: rgba(203, 167, 107, 0.15);
  color: var(--admin-gold);
  font-weight: 600;
  border-left: 3px solid var(--admin-gold);
}

.sidebar-nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--admin-border);
}

.sidebar-user-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
}

.admin-main-content {
  margin-left: 260px;
  padding: 36px 40px;
  min-height: 100vh;
}

.top-bar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.page-title {
  font-size: 1.8rem;
  color: var(--text-pure);
}

/* Metric Cards */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.metric-card {
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.metric-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.metric-value {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-pure);
}

/* Sections */
.admin-section {
  display: none;
}

.admin-section.active {
  display: block;
}

/* Bookings Table */
.panel-card {
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 32px;
}

.table-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-tab {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--admin-border);
  color: var(--text-muted);
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-tab:hover {
  color: var(--text-pure);
  border-color: rgba(255, 255, 255, 0.2);
}

.filter-tab.active {
  background: var(--admin-gold);
  color: #0b0d12;
  border-color: var(--admin-gold);
  font-weight: 600;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

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

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

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

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

/* Status Badges */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-pill.Pending {
  background: rgba(234, 179, 8, 0.15);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.status-pill.Confirmed {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-pill.Rejected {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-pill.Cancelled {
  background: rgba(107, 114, 128, 0.15);
  color: #9ca3af;
  border: 1px solid rgba(107, 114, 128, 0.3);
}

/* Action buttons in table */
.action-btn-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--admin-border);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-pure);
}

.btn-icon.wa:hover {
  background: #25d366;
  color: #ffffff;
  border-color: #25d366;
}

.btn-icon.confirm:hover {
  background: #22c55e;
  color: #ffffff;
}

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

.btn-icon.delete:hover {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
}

.admin-table th:last-child,
.admin-table td:last-child {
  min-width: 175px;
}

/* Promotion Previews */
.promo-admin-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
}

.promo-admin-preview {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--admin-border);
}

/* Mobile responsive */
@media (max-width: 900px) {
  .admin-sidebar {
    width: 70px;
  }
  .sidebar-brand-name, .sidebar-badge, .sidebar-nav-item span, .sidebar-user-name {
    display: none;
  }
  .admin-main-content {
    margin-left: 70px;
    padding: 24px 16px;
  }
  .promo-admin-card {
    grid-template-columns: 1fr;
  }
}
