/* ==========================================================================
   BLUEPRINT BUILD — SUPER ADMIN PORTAL STYLES
   Maximalist iOS Aesthetic
   Palette: #000000, #5c5558, #a8a29e, #7d1a24, #ede8e1
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@400;600;700&family=Varela+Round&display=swap');

:root {
  --c-black: #000000;
  --c-charcoal: #5c5558;
  --c-stone: #a8a29e;
  --c-crimson: #7d1a24;
  --c-crimson-light: #9e2330;
  --c-cream: #ede8e1;
  --c-cream-pure: #fbf9f6;

  --bg-main: #ede8e1;
  --bg-surface: #ffffff;
  --bg-surface-alt: #f5f1ec;
  --text-main: #000000;
  --text-muted: #5c5558;
  --text-dim: #78716c;
  --border-main: #000000;
  --border-subtle: #a8a29e;
  --accent: #7d1a24;
  --shadow-color: #000000;
}

[data-theme="dark"] {
  --bg-main: #000000;
  --bg-surface: #141416;
  --bg-surface-alt: #1c1c1f;
  --text-main: #ede8e1;
  --text-muted: #a8a29e;
  --text-dim: #5c5558;
  --border-main: #ede8e1;
  --border-subtle: #5c5558;
  --accent: #9e2330;
  --shadow-color: #7d1a24;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Varela Round', system-ui, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: 'Comfortaa', cursive, sans-serif;
  letter-spacing: -0.02em;
  font-weight: 700;
}

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

.admin-sidebar {
  width: 270px;
  background-color: var(--c-black);
  color: var(--c-cream);
  border-right: 2.5px solid var(--border-main);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
}

.admin-main {
  flex: 1;
  padding: 30px 24px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Top bar on mobile / header */
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--border-main);
}

/* Brand badge */
.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #ffffff;
}

.admin-brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--c-crimson);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Comfortaa', cursive;
  font-weight: 700;
  font-size: 1.25rem;
  border: 2px solid #ffffff;
}

.admin-brand-text {
  font-family: 'Comfortaa', cursive;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.1;
}

.admin-brand-sub {
  font-size: 0.65rem;
  color: var(--c-crimson);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Navigation items */
.admin-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 24px;
}

.admin-nav-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--c-stone);
  font-family: 'Comfortaa', cursive;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  transition: all 0.15s ease;
}

.admin-nav-item a:hover {
  background-color: #1a1a1c;
  color: #ffffff;
}

.admin-nav-item.active a {
  background-color: var(--c-crimson);
  color: #ffffff;
  border-color: #ffffff;
  box-shadow: 2px 2px 0px #000000;
}

/* ==========================================================================
   CARDS & MAXIMALIST COMPONENTS
   ========================================================================== */
.admin-card {
  background-color: var(--bg-surface);
  border: 2.5px solid var(--border-main);
  box-shadow: 4px 4px 0px var(--shadow-color);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 24px;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.stat-box {
  background-color: var(--bg-surface);
  border: 2.5px solid var(--border-main);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 3.5px 3.5px 0px var(--shadow-color);
}

.stat-value {
  font-family: 'Comfortaa', cursive;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--c-crimson);
  margin-top: 6px;
}

.stat-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Buttons */
.btn-admin-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--c-crimson);
  color: #ffffff !important;
  font-family: 'Comfortaa', cursive;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 9999px;
  border: 2px solid var(--border-main);
  box-shadow: 3px 3px 0px var(--shadow-color);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-admin-primary:hover {
  transform: translate(-1.5px, -1.5px);
  box-shadow: 4.5px 4.5px 0px var(--shadow-color);
  background-color: var(--c-crimson-light);
}

.btn-admin-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--bg-surface);
  color: var(--text-main) !important;
  font-family: 'Comfortaa', cursive;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 9999px;
  border: 2px solid var(--border-main);
  box-shadow: 3px 3px 0px var(--shadow-color);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-admin-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background-color: #000000;
  color: #ff6b6b !important;
  font-family: 'Comfortaa', cursive;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 9999px;
  border: 2px solid var(--border-main);
  box-shadow: 2px 2px 0px var(--shadow-color);
  text-decoration: none;
  cursor: pointer;
  font-size: 0.8rem;
}

/* ==========================================================================
   FORMS & INPUTS
   ========================================================================== */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-family: 'Comfortaa', cursive;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-main);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: 14px;
  border: 2px solid var(--border-main);
  background-color: var(--bg-surface-alt);
  color: var(--text-main);
  font-family: 'Varela Round', sans-serif;
  font-size: 0.98rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--c-crimson);
  box-shadow: 3px 3px 0px var(--c-crimson);
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 4px;
}

/* Tables */
.admin-table-wrap {
  overflow-x: auto;
  border-radius: 16px;
  border: 2px solid var(--border-main);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
  background-color: var(--bg-surface);
}

.admin-table th {
  background-color: var(--c-black);
  color: var(--c-cream);
  padding: 14px 16px;
  font-family: 'Comfortaa', cursive;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--border-main);
}

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

.admin-table tr:hover td {
  background-color: var(--bg-surface-alt);
}

/* Status Badges */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-family: 'Comfortaa', cursive;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  border: 1.5px solid var(--border-main);
}

.badge-published {
  background-color: #25d366;
  color: #000000;
}

.badge-draft {
  background-color: var(--c-stone);
  color: #000000;
}

.badge-role-super {
  background-color: var(--c-crimson);
  color: #ffffff;
}

.badge-role-admin {
  background-color: var(--c-charcoal);
  color: #ffffff;
}

/* Mobile Bar */
.admin-mobile-header {
  display: none;
  background-color: var(--c-black);
  color: #ffffff;
  padding: 12px 18px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2.5px solid var(--border-main);
  position: sticky;
  top: 0;
  z-index: 1000;
}

@media (max-width: 900px) {
  .admin-sidebar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    z-index: 9999;
  }
  .admin-sidebar.open {
    display: flex;
  }
  .admin-mobile-header {
    display: flex;
  }
  .admin-main {
    padding: 20px 14px;
  }
}
