/* ==========================================================================
   BLACK BUCK ADMIN PORTAL - LUXURY DARK DESIGN SYSTEM
   ========================================================================== */

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

:root {
  --admin-bg: #0b0b0e;
  --admin-sidebar: #101014;
  --admin-card: #15151b;
  --admin-card-hover: #1a1a22;
  --admin-border: #22222c;
  --admin-border-light: #2d2d3a;
  --admin-text: #f0f0f5;
  --admin-text-muted: #8e8e9f;
  --admin-accent: #c5a880;
  --admin-accent-hover: #d8bc94;
  --admin-success: #10b981;
  --admin-warning: #f59e0b;
  --admin-danger: #ef4444;
  --admin-info: #3b82f6;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-sans: 'Plus Jakarta Sans', sans-serif;
  --font-serif: 'Playfair Display', serif;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--admin-bg);
  color: var(--admin-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

/* ==========================================================================
   AUTH LAYOUT (LOGIN / REGISTER)
   ========================================================================== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 30%, #1e1e28 0%, #0c0d10 80%);
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.auth-header {
  text-align: center;
  margin-bottom: 30px;
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.auth-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 6px;
}

.auth-sub {
  font-size: 13.5px;
  color: var(--admin-text-muted);
}

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

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #cccccc;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  width: 100%;
  height: 44px;
  background: #0d0d11;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: #ffffff;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.form-control:focus {
  border-color: var(--admin-accent);
  outline: none;
  background: #121218;
}

.btn-admin-primary {
  width: 100%;
  height: 44px;
  background: #ffffff;
  color: #000000;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

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

.btn-admin-gold {
  background: var(--admin-accent);
  color: #000;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  border: none;
  cursor: pointer;
}

.btn-admin-gold:hover {
  background: var(--admin-accent-hover);
}

.alert-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid var(--admin-danger);
  color: #fca5a5;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 20px;
}

.alert-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--admin-success);
  color: #86efac;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 20px;
}

/* ==========================================================================
   ADMIN LAYOUT (SIDEBAR & MAIN CONTENT)
   ========================================================================== */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.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;
}

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

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

.sidebar-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--admin-text-muted);
  font-size: 13.5px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.sidebar-item a:hover,
.sidebar-item.active a {
  background: var(--admin-card);
  color: #ffffff;
  border-left: 3px solid var(--admin-accent);
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-main {
  margin-left: 260px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-topbar {
  height: 70px;
  background: var(--admin-sidebar);
  border-bottom: 1px solid var(--admin-border);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-content {
  padding: 32px;
  flex: 1;
}

/* ==========================================================================
   METRIC STAT CARDS
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.stat-card:hover {
  border-color: var(--admin-border-light);
  transform: translateY(-2px);
}

.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.stat-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--admin-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #1f1f2a;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--admin-accent);
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #ffffff;
}

/* ==========================================================================
   DATA TABLES
   ========================================================================== */
.admin-card {
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 30px;
}

.card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.card-title {
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
}

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

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

.admin-table th {
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 700;
  color: var(--admin-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--admin-border);
}

.admin-table td {
  padding: 16px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--admin-border);
  color: #e0e0e8;
  vertical-align: middle;
}

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

.badge {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 600;
  display: inline-block;
}

.badge-success { background: rgba(16, 185, 129, 0.15); color: #86efac; }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #fde68a; }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: #fca5a5; }
.badge-info { background: rgba(59, 130, 246, 0.15); color: #93c5fd; }

/* Upload Dropzone & Media Previews */
.upload-dropzone {
  border: 2px dashed var(--admin-border-light);
  border-radius: var(--radius-md);
  padding: 28px 20px;
  text-align: center;
  background: #0d0d12;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: var(--admin-accent);
  background: #13131a;
}

.upload-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 5;
}

.upload-icon-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(197, 168, 128, 0.12);
  color: var(--admin-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  transition: transform 0.2s ease;
}

.upload-dropzone:hover .upload-icon-circle {
  transform: translateY(-2px);
}

.upload-preview-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
  padding: 12px;
  background: #111116;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-sm);
}

.preview-thumb {
  width: 64px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--admin-border-light);
  background: #000;
}

/* Size Pills inside Admin Form */
.size-chips-wrap {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.size-chip {
  padding: 8px 14px;
  border: 1px solid var(--admin-border);
  background: #0d0d12;
  color: #ccc;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.size-chip:hover {
  border-color: var(--admin-accent);
  color: #fff;
}

.size-chip.active {
  background: var(--admin-accent);
  border-color: var(--admin-accent);
  color: #0b0b0e;
  font-weight: 700;
}

@media (max-width: 900px) {
  .admin-sidebar {
    display: none;
  }
  .admin-main {
    margin-left: 0;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
