/**
 * ═══════════════════════════════════════════════════════════════
 *  AET ADMIN SYSTEM — PREMIUM UI v3
 *  Amboseli Ecosystem Trust — Internal Management Portal
 * ═══════════════════════════════════════════════════════════════
 */

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

/* ─────────────────────────────────────────────
   DESIGN TOKENS (HIGH CONTRAST & VISIBILITY)
───────────────────────────────────────────── */
:root {
  /* Sidebar */
  --sb-bg:       #060c06;
  --sb-w:        248px;
  --sb-border:   rgba(255,255,255,0.07);

  /* Brand */
  --gold:        #b07d1e;
  --gold-h:      #c8922e;
  --gold-dim:    rgba(176,125,30,0.14);
  --gold-glow:   rgba(176,125,30,0.30);
  --green:       #15803d;
  --green-dim:   rgba(21,128,61,0.12);
  --red:         #dc2626;
  --red-dim:     rgba(220,38,38,0.10);
  --blue:        #2563eb;
  --blue-dim:    rgba(37,99,235,0.10);
  --amber:       #d97706;

  /* Main canvas — soft warm grounded tone, no eye strain glare */
  --bg:          #eef2ed;
  --bg-2:        #e0e6de;
  --card:        #ffffff;
  --card-hover:  #f6f9f5;
  --border:      rgba(0,0,0,0.13);
  --border-2:    rgba(0,0,0,0.07);

  /* Text — deep, sharp, high-contrast readable */
  --text:        #0a140a;
  --text-2:      #1f2e1f;
  --text-muted:  #445644;
  --text-light:  #ffffff;
  --text-dim:    rgba(255,255,255,0.60);

  /* UI */
  --r-xl:  20px;
  --r-lg:  14px;
  --r-md:  10px;
  --r-sm:  8px;
  --r-xs:  6px;
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg:   0 12px 36px rgba(0,0,0,0.12);
  --shadow-gold: 0 6px 22px rgba(176,125,30,0.30);
  --t:           0.20s ease;
}

/* ─────────────────────────────────────────────
   BASE
───────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
  font-size: 13.5px;
  line-height: 1.55;
}

/* ─────────────────────────────────────────────
   ██ SIDEBAR
───────────────────────────────────────────── */
.admin-sidebar {
  width: var(--sb-w);
  min-height: 100vh;
  background: var(--sb-bg);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  border-right: 1px solid var(--sb-border);
  z-index: 200;
  overflow: hidden;
}

/* Subtle radial glow at top */
.admin-sidebar::before {
  content: '';
  position: absolute;
  top: -60px; left: -60px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(200,146,46,0.08) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Logo area ── */
.sidebar-logo {
  padding: 26px 20px 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--sb-border);
  position: relative;
  z-index: 2;
}
.sidebar-logo-icon,
.sidebar-logo-img {
  width: 38px; height: 38px;
  border-radius: 10px;
  object-fit: contain;
  flex-shrink: 0;
}
.sidebar-logo-icon {
  background: linear-gradient(135deg, var(--gold) 0%, #e6b84a 100%);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900;
  font-size: 15px;
  color: var(--sb-bg);
  box-shadow: var(--shadow-gold);
  letter-spacing: -0.5px;
}
.sidebar-logo-img {
  background: rgba(255,255,255,0.06);
  padding: 4px;
  border: 1px solid rgba(200,146,46,0.30);
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}
.sidebar-logo-text {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  line-height: 1.2;
}
.sidebar-logo-sub {
  font-size: 0.60rem;
  color: var(--text-dim);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ── Nav sections ── */
.sidebar-nav-section {
  padding: 18px 14px 6px;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}
.sidebar-section-label {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.18);
  padding: 0 8px;
  margin: 14px 0 5px;
}
.sidebar-section-label:first-child { margin-top: 0; }

.admin-nav { list-style: none; }
.admin-nav li + li { margin-top: 2px; }

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-md);
  text-decoration: none;
  color: rgba(255,255,255,0.40);
  font-size: 0.83rem;
  font-weight: 500;
  transition: var(--t);
  position: relative;
}
.admin-nav a:hover {
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.82);
}
.nav-icon {
  width: 16px; height: 16px;
  flex-shrink: 0;
  stroke: currentColor;
  transition: var(--t);
}
.admin-nav li.active a {
  background: var(--gold-dim);
  color: var(--gold);
  font-weight: 600;
}
.admin-nav li.active a .nav-icon { stroke: var(--gold); }
.nav-badge {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  font-size: 0.60rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 20px;
  min-width: 16px;
  text-align: center;
  line-height: 1.5;
  animation: pulse-badge 2s ease-in-out infinite;
}
@keyframes pulse-badge {
  0%, 100% { box-shadow: 0 0 0 0 rgba(224,82,82,0.4); }
  50%       { box-shadow: 0 0 0 5px rgba(224,82,82,0); }
}

/* ── Sidebar divider ── */
.sidebar-divider {
  height: 1px;
  background: var(--sb-border);
  margin: 8px 14px;
}

/* ── Sidebar user footer ── */
.sidebar-user {
  padding: 14px 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--sb-border);
  position: relative;
  z-index: 2;
}
.sidebar-user .avatar {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold) 0%, #e6b84a 100%);
  color: var(--sb-bg);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 0.78rem;
  flex-shrink: 0;
  box-shadow: 0 3px 10px var(--gold-glow);
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255,255,255,0.80);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user-role {
  font-size: 0.62rem;
  color: var(--text-dim);
  margin-top: 1px;
}
.logout-link {
  color: rgba(255,255,255,0.22);
  text-decoration: none;
  transition: var(--t);
  flex-shrink: 0;
  padding: 5px;
  border-radius: 7px;
}
.logout-link:hover { color: var(--red); background: var(--red-dim); }

/* ─────────────────────────────────────────────
   ██ MAIN LAYOUT
───────────────────────────────────────────── */
.admin-main {
  flex: 1;
  margin-left: var(--sb-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─────────────────────────────────────────────
   ██ TOP BAR
───────────────────────────────────────────── */
.admin-topbar {
  background: #ffffff;
  border-bottom: 1.5px solid rgba(0,0,0,0.12);
  padding: 16px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.topbar-breadcrumb {
  font-size: 0.74rem;
  color: #4a5c4a;
  font-weight: 600;
}
.topbar-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: #0a140a;
  letter-spacing: -0.02em;
}
.topbar-right { display: flex; align-items: center; gap: 10px; }
.topbar-chip {
  background: var(--bg);
  border: 1.5px solid rgba(0,0,0,0.12);
  border-radius: 30px;
  padding: 6px 14px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #1f2e1f;
  display: flex; align-items: center; gap: 6px;
}
.topbar-chip .live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #16a34a;
  animation: blink-dot 1.5s ease-in-out infinite;
}
@keyframes blink-dot { 0%,100%{opacity:1;} 50%{opacity:0.3;} }

/* ─────────────────────────────────────────────
   ██ PAGE BODY
───────────────────────────────────────────── */
.page-body {
  flex: 1;
  padding: 30px 36px;
  max-width: 1400px;
  width: 100%;
}

/* ─────────────────────────────────────────────
   ██ GREETING HEADER (Dashboard)
───────────────────────────────────────────── */
.dash-greeting {
  margin-bottom: 26px;
}
.dash-greeting-time {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #a36f16;
  margin-bottom: 5px;
}
.dash-greeting h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.7rem, 2.6vw, 2.3rem);
  font-weight: 800;
  color: #0a140a;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.dash-greeting p {
  font-size: 0.88rem;
  color: #3b4e3b;
  margin-top: 5px;
  font-weight: 500;
}

/* ─────────────────────────────────────────────
   ██ STAT CARDS
───────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
@media(max-width:1100px){ .stats-grid{ grid-template-columns: repeat(2,1fr); } }

.stat-card {
  background: #ffffff;
  border-radius: var(--r-xl);
  padding: 22px 24px 20px;
  border: 1.5px solid rgba(0,0,0,0.11);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  position: relative;
  overflow: hidden;
  transition: transform var(--t), box-shadow var(--t);
  cursor: default;
}
.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  border-radius: 0 0 var(--r-xl) var(--r-xl);
  transition: var(--t);
}
.stat-card.gold::after   { background: linear-gradient(90deg, #b07d1e, #d49b2c); }
.stat-card.green::after  { background: linear-gradient(90deg, #15803d, #22c55e); }
.stat-card.blue::after   { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.stat-card.red::after    { background: linear-gradient(90deg, #dc2626, #f87171); }

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.09);
}
.stat-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}
.stat-card-icon {
  width: 38px; height: 38px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.stat-card.gold .stat-card-icon  { background: rgba(176,125,30,0.14); color: #a36f16; }
.stat-card.green .stat-card-icon { background: rgba(21,128,61,0.14);  color: #15803d; }
.stat-card.blue .stat-card-icon  { background: rgba(37,99,235,0.14);  color: #2563eb; }
.stat-card.red .stat-card-icon   { background: rgba(220,38,38,0.14);  color: #dc2626; }
.stat-trend {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}
.trend-up     { background: #dcfce7; color: #14532d; }
.trend-down   { background: #fee2e2; color: #991b1b; }
.trend-steady { background: #dbeafe; color: #1e40af; }
.trend-warn   { background: #fef3c7; color: #92400e; }

.stat-card .num {
  font-size: 2.5rem;
  font-weight: 900;
  color: #0a140a;
  line-height: 1;
  letter-spacing: -0.04em;
  display: block;
}
.stat-card .label {
  font-size: 0.74rem;
  font-weight: 700;
  color: #3b4e3b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 6px;
  display: block;
}

/* ─────────────────────────────────────────────
   ██ QUICK ACTIONS BAR
───────────────────────────────────────────── */
.quick-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.qa-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--r-md);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform var(--t), box-shadow var(--t), background var(--t);
  letter-spacing: 0.02em;
}
.qa-btn:hover { transform: translateY(-2px); }
.qa-btn-primary {
  background: #0a140a;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}
.qa-btn-primary:hover { background: #b07d1e; box-shadow: var(--shadow-gold); }
.qa-btn-outline {
  background: #ffffff;
  color: #1a2a1a;
  border: 1.5px solid rgba(0,0,0,0.14);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.qa-btn-outline:hover { border-color: #b07d1e; color: #b07d1e; background: #faf8f4; box-shadow: 0 4px 14px rgba(0,0,0,0.08); }

/* ─────────────────────────────────────────────
   ██ CONTENT GRID
───────────────────────────────────────────── */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.content-grid.thirds {
  grid-template-columns: 1.4fr 1fr;
}
@media(max-width:1100px){ .content-grid{ grid-template-columns: 1fr; } }

/* ─────────────────────────────────────────────
   ██ PANEL CARD
───────────────────────────────────────────── */
.panel {
  background: var(--card);
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border-2);
}
.panel-title {
  font-size: 0.80rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.panel-action {
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--gold);
  text-decoration: none;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--gold-dim);
  background: var(--gold-dim);
  transition: var(--t);
}
.panel-action:hover { background: rgba(200,146,46,0.22); }

/* ─────────────────────────────────────────────
   ██ MESSAGE LIST (compact, dashboard)
───────────────────────────────────────────── */
.msg-list { list-style: none; }
.msg-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 22px;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  cursor: pointer;
  transition: background var(--t);
  text-decoration: none;
  color: inherit;
  position: relative;
}
.msg-item:last-child { border-bottom: none; }
.msg-item:hover { background: #f6f9f5; }
.msg-item.unread {
  background: rgba(21,128,61,0.04);
}
.msg-item.unread::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: #15803d;
  border-radius: 0 3px 3px 0;
}
.msg-av {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #b07d1e, #d49b2c);
  color: #060c06;
  font-weight: 900;
  font-size: 0.84rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(176,125,30,0.25);
}
.msg-body { flex: 1; min-width: 0; }
.msg-name {
  font-weight: 800;
  font-size: 0.85rem;
  color: #0a140a;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.msg-preview {
  font-size: 0.76rem;
  color: #445644;
  font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 2px;
}
.msg-meta-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex-shrink: 0;
}
.msg-time { font-size: 0.70rem; color: #445644; font-weight: 600; }
.msg-dot  { width: 8px; height: 8px; border-radius: 50%; background: #15803d; }

/* Empty states */
.empty-state {
  padding: 50px 24px;
  text-align: center;
  color: #445644;
}
.empty-state-icon { font-size: 2.2rem; margin-bottom: 12px; color: #445644; }
.empty-state p { font-size: 0.85rem; font-weight: 600; color: #3b4e3b; }
.empty-state a { color: #b07d1e; font-weight: 700; text-decoration: underline; }

/* ─────────────────────────────────────────────
   ██ POST LIST (compact, dashboard)
───────────────────────────────────────────── */
.post-list { list-style: none; }
.post-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  transition: background var(--t);
}
.post-item:last-child { border-bottom: none; }
.post-item:hover { background: #f6f9f5; }
.post-thumb {
  width: 50px; height: 38px;
  border-radius: var(--r-sm);
  object-fit: cover;
  background: var(--bg-2);
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.08);
}
.post-thumb-ph {
  width: 50px; height: 38px;
  border-radius: var(--r-sm);
  background: #e2e8df;
  display: flex; align-items: center; justify-content: center;
  color: #445644;
  flex-shrink: 0;
}
.post-info { flex: 1; min-width: 0; }
.post-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: #0a140a;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.post-sub { font-size: 0.73rem; color: #445644; font-weight: 600; margin-top: 2px; }
.status-pill {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}
.pill-published { background: #dcfce7; color: #14532d; }
.pill-draft     { background: #fef3c7; color: #92400e; }

/* ─────────────────────────────────────────────
   ██ ACTIVITY FEED
───────────────────────────────────────────── */
.activity-feed { list-style: none; }
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 22px;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  transition: background var(--t);
}
.activity-item:last-child { border-bottom: none; }
.activity-item:hover { background: #f6f9f5; }
.act-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}
.act-text  { font-size: 0.84rem; color: #0a140a; line-height: 1.5; flex: 1; font-weight: 500; }
.act-text strong { font-weight: 800; color: #0a140a; }
.act-time  { font-size: 0.72rem; color: #445644; font-weight: 600; flex-shrink: 0; margin-top: 2px; }

/* ─────────────────────────────────────────────
   ██ MESSAGES FULL PAGE
───────────────────────────────────────────── */
.msg-full-list { list-style: none; }
.msg-full-item {
  background: #ffffff;
  border-radius: var(--r-xl);
  border: 1.5px solid rgba(0,0,0,0.12);
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: box-shadow var(--t);
}
.msg-full-item:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.08); }
.msg-full-item.unread { border-left: 4px solid #15803d; }

.msg-full-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  cursor: pointer;
  user-select: none;
}
.msg-full-av {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #b07d1e, #d49b2c);
  color: #060c06;
  font-weight: 900;
  font-size: 0.95rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(176,125,30,0.25);
}
.msg-full-details { flex: 1; min-width: 0; }
.msg-full-name  { font-size: 0.92rem; font-weight: 800; color: #0a140a; }
.msg-full-email { font-size: 0.76rem; color: #445644; font-weight: 600; margin-top: 1px; }
.msg-full-subj  { font-size: 0.84rem; font-weight: 700; color: #1a2a1a; margin-top: 3px; }
.msg-full-right {
  display: flex; flex-direction: column;
  align-items: flex-end; gap: 6px;
  flex-shrink: 0;
}
.msg-full-time  { font-size: 0.72rem; color: #445644; font-weight: 600; }

.msg-tag {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tag-new  { background: #dcfce7; color: #14532d; }
.tag-read { background: #e0e6de; color: #3b4e3b; }
.tag-partner { background: #dbeafe; color: #1e40af; }

.msg-full-body {
  display: none;
  padding: 0 22px 22px;
}
.msg-full-body.open { display: block; }
.msg-full-body-inner {
  background: #f4f7f3;
  border-radius: var(--r-lg);
  padding: 18px 20px;
  font-size: 0.88rem;
  line-height: 1.75;
  color: #111e11;
  white-space: pre-wrap;
  border: 1.5px solid rgba(0,0,0,0.08);
  font-weight: 500;
}
.msg-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.mac-btn {
  padding: 8px 16px;
  border-radius: var(--r-sm);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: var(--t);
  display: inline-flex; align-items: center; gap: 6px;
}
.mac-reply  { background: #0a140a; color: #fff; }
.mac-reply:hover { background: #b07d1e; }
.mac-read   { background: #dcfce7; color: #14532d; border: 1px solid #86efac; }
.mac-read:hover { background: #bbf7d0; }
.mac-delete { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.mac-delete:hover { background: #fecaca; }
.mac-time   { margin-left: auto; font-size: 0.72rem; color: #445644; font-weight: 600; }

/* Filter tabs */
.filter-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.filter-tab {
  padding: 7px 18px;
  border-radius: 30px;
  font-size: 0.76rem;
  font-weight: 800;
  text-decoration: none;
  border: 1.5px solid rgba(0,0,0,0.14);
  background: #ffffff;
  color: #2b3d2b;
  transition: var(--t);
}
.filter-tab:hover { border-color: #b07d1e; color: #b07d1e; background: #faf8f4; }
.filter-tab.active { background: #0a140a; color: #ffffff; border-color: transparent; }

/* ─────────────────────────────────────────────
   ██ TABLE (manage.php)
───────────────────────────────────────────── */
/* ─────────────────────────────────────────────
   ██ TABLE (manage.php)
───────────────────────────────────────────── */
.manage-container {
  background: #ffffff;
  border-radius: var(--r-xl);
  border: 1.5px solid rgba(0,0,0,0.12);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  overflow: hidden;
}
.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1.5px solid rgba(0,0,0,0.09);
  background: #fafbfa;
}
.table-header h2 {
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: #0a140a;
}
.tbl-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1.5px solid rgba(0,0,0,0.16);
  border-radius: var(--r-md);
  padding: 8px 14px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: #0a140a;
  width: 240px;
  transition: var(--t);
}
.tbl-search:focus { outline: none; border-color: #b07d1e; box-shadow: 0 0 0 3px rgba(176,125,30,0.20); }
table {
  width: 100%;
  border-collapse: collapse;
}
thead { background: #eef2ed; }
th {
  font-size: 0.70rem;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: #1a2a1a;
  padding: 12px 20px;
  font-weight: 800;
  text-align: left;
  border-bottom: 1.5px solid rgba(0,0,0,0.10);
}
td {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  vertical-align: middle;
  font-size: 0.84rem;
  color: #0a140a;
}
tr:last-child td { border-bottom: none; }
tbody tr { transition: background var(--t); }
tbody tr:hover td { background: #f6f9f5; }
.blog-img-thumb {
  width: 64px; height: 46px;
  object-fit: cover;
  border-radius: var(--r-sm);
  box-shadow: 0 1px 4px rgba(0,0,0,0.10);
}
.td-title { font-weight: 800; font-size: 0.88rem; color: #0a140a; }
.td-sub   { font-size: 0.75rem; color: #445644; font-weight: 600; margin-top: 2px; }
.tag-status {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: inline-block;
}
.tag-published { background: #dcfce7; color: #14532d; }
.tag-draft     { background: #fef3c7; color: #92400e; }
.btn-delete {
  background: #fee2e2;
  color: #991b1b;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  font-size: 0.75rem;
  font-weight: 800;
  text-decoration: none;
  border: 1px solid rgba(220,38,38,0.25);
  transition: var(--t);
  display: inline-block;
}
.btn-delete:hover { background: #dc2626; color: #fff; }
.btn-primary {
  background: #0a140a;
  color: #fff;
  padding: 9px 20px;
  border-radius: var(--r-md);
  font-size: 0.80rem;
  font-weight: 800;
  text-decoration: none;
  transition: var(--t);
  display: inline-block;
  border: none;
  cursor: pointer;
}
.btn-primary:hover { background: #b07d1e; }

/* Status messages */
.status-msg {
  background: #ecfdf5;
  color: #065f46;
  padding: 14px 20px;
  border-radius: var(--r-lg);
  font-weight: 700;
  border: 1.5px solid #6ee7b7;
  font-size: 0.86rem;
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 10px;
}
.status-msg.err { background: #fef2f2; color: #991b1b; border: 1.5px solid #fca5a5; }

/* ─────────────────────────────────────────────
   ██ COMPOSE FORM
───────────────────────────────────────────── */
.upload-container {
  background: #ffffff;
  border-radius: var(--r-xl);
  padding: 34px 38px;
  border: 1.5px solid rgba(0,0,0,0.12);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  max-width: 820px;
}
.form-group { margin-bottom: 22px; }
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  color: #1a2b1a;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.10em;
}
input[type="text"],
input[type="date"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 12px 16px;
  background: #ffffff;
  border: 1.5px solid rgba(0,0,0,0.16);
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: 0.90rem;
  color: #0a140a;
  font-weight: 600;
  transition: var(--t);
  appearance: none;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  background: #ffffff;
  border-color: #b07d1e;
  box-shadow: 0 0 0 3.5px rgba(176,125,30,0.20);
}
textarea { resize: vertical; min-height: 280px; }

.file-upload-box {
  border: 2px dashed rgba(0,0,0,0.20);
  border-radius: var(--r-xl);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--t);
  background: #f8faf7;
  display: block;
}
.file-upload-box:hover {
  border-color: #b07d1e;
  background: rgba(176,125,30,0.04);
  transform: translateY(-2px);
}
.file-upload-box input[type="file"] { display: none; }

.editor-toolbar {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  background: #eef2ed;
  border: 1.5px solid rgba(0,0,0,0.15);
  border-bottom: none;
  border-radius: var(--r-md) var(--r-md) 0 0;
  flex-wrap: wrap;
}
.editor-btn {
  background: #ffffff;
  border: 1.5px solid rgba(0,0,0,0.14);
  padding: 6px 12px;
  border-radius: var(--r-xs);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 800;
  color: #1a2b1a;
  transition: var(--t);
  font-family: inherit;
}
.editor-btn:hover { background: #0a140a; color: #ffffff; border-color: #0a140a; }

.btn-submit {
  background: #0a140a;
  color: #ffffff;
  padding: 14px 32px;
  border: none;
  border-radius: var(--r-lg);
  font-size: 0.88rem;
  font-weight: 900;
  cursor: pointer;
  transition: var(--t);
  margin-top: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  width: 100%;
  font-family: inherit;
}
.btn-submit:hover {
  background: #b07d1e;
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

/* ─────────────────────────────────────────────
   ██ CHANGE PASSWORD PAGE
───────────────────────────────────────────── */
.pwd-form { max-width: 480px; }
.security-tip {
  background: #fdfaf2;
  border: 1px solid #fae8c8;
  border-left: 4px solid #b07d1e;
  padding: 14px 18px;
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: 0.82rem;
  color: #1a2b1a;
  margin-bottom: 24px;
  line-height: 1.6;
}
.strength-meter { height: 4px; border-radius: 4px; background: var(--bg-2); margin-top: 8px; overflow: hidden; }
.strength-bar   { height: 100%; width: 0%; border-radius: 4px; transition: width .3s, background .3s; }
.strength-label { font-size: .70rem; margin-top: 5px; font-weight: 800; }
.msg-success { background: #ecfdf5; border: 1.5px solid #6ee7b7; color: #065f46; padding: 14px 18px; border-radius: var(--r-md); font-size:.86rem; font-weight:700; margin-bottom:20px; }
.msg-error   { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; padding: 12px 16px; border-radius: var(--r-md); font-size:.84rem; font-weight:600; margin-bottom:18px; }

/* ─────────────────────────────────────────────
   ██ DASHBOARD STATS GRID (3-col for manage)
───────────────────────────────────────────── */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.dashboard-stats .stat-card { padding: 18px 20px; }
.dashboard-stats .stat-card .num { font-size: 1.9rem; }

/* ─────────────────────────────────────────────
   ██ LOGIN SCREEN
───────────────────────────────────────────── */
.login-body {
  background: var(--sb-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
  position: relative;
  overflow: hidden;
}

/* Animated background orbs */
.login-body::before, .login-body::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.login-body::before {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(200,146,46,0.06) 0%, transparent 70%);
  top: -150px; right: -150px;
}
.login-body::after {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(46,204,113,0.04) 0%, transparent 70%);
  bottom: -100px; left: -100px;
}

.login-wrapper {
  position: relative; z-index: 2;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.login-box {
  width: 100%;
  max-width: 400px;
  animation: fade-up 0.5s ease-out;
}
@keyframes fade-up {
  from { opacity:0; transform: translateY(20px); }
  to   { opacity:1; transform: translateY(0); }
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 40px;
  justify-content: center;
}
.login-logo-icon,
.login-logo-img {
  width: 50px; height: 50px;
  border-radius: 14px;
  object-fit: contain;
  flex-shrink: 0;
}
.login-logo-icon {
  background: linear-gradient(135deg, var(--gold) 0%, #e6b84a 100%);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 20px;
  color: var(--sb-bg);
  box-shadow: 0 12px 32px var(--gold-glow);
}
.login-logo-img {
  background: rgba(255,255,255,0.06);
  padding: 6px;
  border: 1px solid rgba(200,146,46,0.35);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.login-logo-text {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.login-logo-sub {
  font-size: 0.60rem;
  color: var(--text-dim);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-top: 2px;
}

.login-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 24px;
  padding: 40px 36px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 32px 80px rgba(0,0,0,0.5);
}
.aet-badge {
  display: inline-block;
  font-size: 0.60rem;
  font-weight: 800;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}
.login-card h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.9rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 6px;
}
.login-card > p {
  font-size: 0.80rem;
  color: var(--text-dim);
  margin-bottom: 30px;
}

.login-card .form-group { margin-bottom: 16px; }
.login-card label {
  color: rgba(255,255,255,0.35);
  font-size: 0.64rem;
}
.login-card input[type="password"] {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  color: #fff;
  border-radius: var(--r-md);
  padding: 13px 16px;
  font-size: 0.90rem;
}
.login-card input[type="password"]::placeholder { color: rgba(255,255,255,0.22); }
.login-card input[type="password"]:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(255,255,255,0.07);
  box-shadow: 0 0 0 4px rgba(200,146,46,0.15);
}

.btn-login {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--gold) 0%, #e6b84a 100%);
  color: var(--sb-bg);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--t);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  margin-top: 8px;
  box-shadow: 0 6px 20px var(--gold-glow);
}
.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px var(--gold-glow);
  filter: brightness(1.05);
}
.btn-login:active { transform: translateY(0); }

.error {
  background: rgba(224,82,82,0.10);
  border: 1px solid rgba(224,82,82,0.22);
  color: #ff9a9a;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  font-size: 0.78rem;
  margin-bottom: 16px;
  font-weight: 600;
  display: flex; align-items: center; gap: 7px;
}
.foot-note {
  margin-top: 28px;
  text-align: center;
  font-size: 0.65rem;
  color: rgba(255,255,255,0.18);
  letter-spacing: 0.06em;
}

/* ─────────────────────────────────────────────
   ██ SCROLLBAR
───────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.14); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.22); }

/* ─────────────────────────────────────────────
   ██ ANIMATIONS
───────────────────────────────────────────── */
@keyframes count-up {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.stat-card { animation: count-up 0.4s ease-out both; }
.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.10s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.20s; }

.panel { animation: count-up 0.4s ease-out both; animation-delay: 0.25s; }

/* ─────────────────────────────────────────────
   ██ RESPONSIVE
───────────────────────────────────────────── */
@media (max-width: 900px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-main { margin-left: 0; }
  .page-body { padding: 20px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .admin-topbar { padding: 14px 20px; }
}
