/* =========================
   HARRATA ADMIN PANEL CSS
   /admin/admin.css
   ========================= */

:root{
  --bg-main: #0e1218;
  --bg-card: #141b24;
  --bg-soft: #1a2330;

  --text-main: #e8edf5;
  --text-muted: #9aa6b6;

  --accent: #f2b544;        /* Harrata gold */
  --accent-soft: rgba(242,181,68,.18);

  --success: #4caf50;
  --danger: #e53935;
  --warning: #ffb020;

  --border-soft: rgba(255,255,255,.08);
  --shadow: 0 14px 40px rgba(0,0,0,.45);
  --radius: 14px;
}

/* ---- Base ---- */
body.admin{
  background: radial-gradient(1200px 600px at 20% 0%, rgba(242,181,68,.10), transparent 55%),
              radial-gradient(900px 500px at 80% 10%, rgba(255,255,255,.05), transparent 55%),
              var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
}

body.admin, body.admin *{ box-sizing: border-box; }

.admin .container{
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto;
}

.admin a{ color: inherit; text-decoration: none; }
.admin .muted{ color: var(--text-muted); }
.admin .small{ font-size: 13px; }

/* ---- Layout ---- */
.admin-layout{
  display: flex;
  min-height: 100vh;
}

.sidebar{
  width: 260px;
  flex: 0 0 260px;
  border-right: 1px solid var(--border-soft);
  background:
    linear-gradient(180deg, rgba(242,181,68,.10), rgba(0,0,0,0) 35%),
    rgba(10,14,20,.75);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
}

.sidebar__brand{
  padding: 10px 10px 16px;
  border-bottom: 1px solid var(--border-soft);
}

.sidebar__title{
  font-weight: 900;
  letter-spacing: .4px;
  font-size: 18px;
}

.sidebar__subtitle{
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-muted);
}

.sidebar__nav{
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 10px;
}

.slink{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.02);
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
  font-weight: 700;
  font-size: 14px;
}

.slink:hover{
  border-color: rgba(242,181,68,.30);
  background: rgba(242,181,68,.06);
  transform: translateY(-1px);
}

.slink.is-active{
  border-color: rgba(242,181,68,.55);
  background: rgba(242,181,68,.12);
}

.sidebar__footer{
  margin-top: auto;
  padding: 14px 10px 10px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar__user{
  font-weight: 800;
  margin-top: 2px;
}

.sidebar__logout{ width: 100%; justify-content: center; }

.admin-content{
  flex: 1;
  min-width: 0;
}

/* ---- Topbar inside content ---- */
.topbar{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(10,14,20,.45);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar__title{
  font-weight: 900;
  letter-spacing: -0.01em;
  font-size: 18px;
}

.topbar__actions{ display: flex; gap: 10px; flex-wrap: wrap; }

.admin-main{ padding: 26px 0 60px; }

/* ---- Cards ---- */
.admin .card{
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,0) 42%),
              var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.admin .split{
  height: 1px;
  background: var(--border-soft);
  margin: 16px 0;
}

.admin .note{
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 14px;
}

/* ---- Buttons ---- */
.admin .btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  background: var(--accent);
  color: #111;
  border: 1px solid transparent;

  padding: 10px 14px;
  border-radius: 11px;

  font-weight: 800;
  font-size: 14px;

  cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease, opacity .14s ease, border-color .14s ease;
  user-select: none;
  white-space: nowrap;
}

.admin .btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(242,181,68,.22);
}

.admin .btn:active{
  transform: translateY(0);
  opacity: .92;
}

.admin .btn--ghost{
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-soft);
}

.admin .btn--ghost:hover{
  border-color: var(--accent);
  box-shadow: none;
  color: var(--accent);
}

.admin .btn--danger{ background: var(--danger); color:#fff; }
.admin .btn--success{ background: var(--success); color:#fff; }

/* ---- Tables ---- */
.admin .ptable{
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 12px;
}

.admin .ptable thead th{
  text-align: left;
  padding: 12px;
  color: var(--text-muted);
  font-size: 13px;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(255,255,255,.02);
}

.admin .ptable tbody td{
  padding: 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  vertical-align: middle;
}

.admin .ptable tbody tr:hover{ background: rgba(255,255,255,.03); }

/* ---- Badges ---- */
.admin .badge{
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .2px;
  border: 1px solid rgba(255,255,255,.10);
}

.admin .badge--pending{
  background: rgba(255,176,32,.15);
  color: #ffd79a;
  border-color: rgba(255,176,32,.28);
}

.admin .badge--accepted{
  background: rgba(76,175,80,.15);
  color: #bff3c2;
  border-color: rgba(76,175,80,.28);
}

.admin .badge--refused{
  background: rgba(229,57,53,.15);
  color: #ffb3ae;
  border-color: rgba(229,57,53,.28);
}

/* ---- Dashboard helpers ---- */
.admin-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.statcard{
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  background: rgba(255,255,255,.02);
  padding: 16px;
}

.statcard__label{ color: var(--text-muted); font-size: 13px; }
.statcard__num{ font-size: 30px; font-weight: 900; margin-top: 6px; letter-spacing: -0.02em; }
.statcard__hint{ margin-top: 6px; font-size: 13px; color: var(--text-muted); }

/* ---- Responsive ---- */
@media (max-width: 900px){
  .admin-layout{ flex-direction: column; }
  .sidebar{
    width: 100%;
    flex: 0 0 auto;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--border-soft);
  }
  .sidebar__nav{ flex-direction: row; flex-wrap: wrap; }
  .slink{ flex: 1 1 auto; justify-content: center; }
  .topbar{ position: relative; top: auto; }
}
