/* =========================================
   RESET & BASE
========================================= */
*{box-sizing:border-box}
body{
  margin:0;
  font-family:Inter,Segoe UI,Arial,sans-serif;
  background:#f4f7fb;
  color:#0f172a;
  line-height:1.6;
}

/* =========================================
   LAYOUT
========================================= */
.admin-app{display:flex;min-height:100vh}
.admin-main{flex:1;display:flex;flex-direction:column}

/* New admin shell wrapper */
.admin-shell{
  display:flex;
  min-height:100vh;
}

/* Sidebar brand container */
.sidebar__brand{
  display:flex;
  align-items:center;
  gap:12px;
  padding:0 22px 20px;
}
.brand__logo{
  width:36px;
  height:36px;
  border-radius:12px;
  background:rgba(255,255,255,.12);
  display:grid;
  place-items:center;
  font-size:20px;
}
.brand__name{
  font-weight:800;
  font-size:18px;
}

/* Side navigation */
.side-nav{
  display:flex;
  flex-direction:column;
  gap:4px;
  margin-top:8px;
}
.side-nav__link{
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 22px;
  color:#e0e7ff;
  text-decoration:none;
  font-size:14px;
  border-left:3px solid transparent;
  transition:background .2s;
}
.side-nav__link:hover{
  background:rgba(255,255,255,.12);
}
.side-nav__link.is-active{
  background:rgba(255,255,255,.18);
  color:#fff;
  border-left-color:#fff;
}
.side-nav__spacer{
  flex:1;
  height:10px;
}

/* Topbar adjustments */
.topbar__left, .topbar__right{
  display:flex;
  align-items:center;
  gap:12px;
}
.pill{
  display:inline-flex;
  align-items:center;
  padding:4px 8px;
  border-radius:9999px;
  font-size:12px;
  font-weight:600;
  background:rgba(37,99,235,.1);
  color:#2563eb;
}

/* Ghost button variant */
.btn.btn-ghost{
  background:none;
  color:#2563eb;
  border:1px solid transparent;
  padding:6px 12px;
  border-radius:10px;
  text-decoration:none;
  font-size:13px;
  font-weight:600;
  transition:background .2s;
}
.btn.btn-ghost:hover{
  background:rgba(37,99,235,.08);
}

/* =========================================
   SIDEBAR
========================================= */
.sidebar{
  width:260px;
  /* Unified blue gradient matching frontend theme */
  background:linear-gradient(180deg,#2563eb,#1d4ed8);
  color:#fff;
  padding:20px 0;
}
.brand{
  font-size:20px;
  font-weight:700;
  padding:0 22px 20px;
}
.menu a{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 22px;
  color:#e0e7ff;
  text-decoration:none;
  font-size:14px;
  border-left:3px solid transparent;
}
.menu a:hover{background:rgba(255,255,255,.12)}
.menu a.active{
  background:rgba(255,255,255,.18);
  color:#fff;
  border-left-color:#fff;
}

/* =========================================
   TOPBAR
========================================= */
.topbar{
  background:#fff;
  padding:14px 26px;
  border-bottom:1px solid #e5e7eb;
  font-weight:600;
}

/* =========================================
   CONTENT
========================================= */
.admin-content{padding:32px}

/* =========================================
   HEADINGS
========================================= */
.section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:26px;
}
.section-title{
  font-size:22px;
  font-weight:700;
}
.muted{
  font-size:14px;
  color:#64748b;
}

/* =========================================
   GRID
========================================= */
.grid{display:grid;gap:24px}
.grid-2{grid-template-columns:repeat(2,1fr)}
.grid-3{grid-template-columns:repeat(3,1fr)}

/* =========================================
   CARDS
========================================= */
.card{
  background:#fff;
  border-radius:16px;
  padding:22px;
  box-shadow:0 10px 30px rgba(0,0,0,.07);
}
.card > * + *{margin-top:14px}

.statcard__label{
  font-size:13px;
  color:#64748b;
}
.statcard__value{
  font-size:34px;
  font-weight:800;
  margin-top:6px;
}

/* =========================================
   TABLES (ALL LIST PAGES)
========================================= */
.admin-table{
  width:100%;
  border-collapse:collapse;
}
.admin-table th{
  text-align:left;
  font-size:13px;
  font-weight:600;
  color:#475569;
  padding:14px 16px;
  border-bottom:1px solid #e5e7eb;
  background:#f8fafc;
}
.admin-table td{
  padding:14px 16px;
  border-bottom:1px solid #f1f5f9;
  font-size:14px;
}
.admin-table tr:hover{background:#f8fafc}

/* =========================================
   BADGES (STATUS)
========================================= */
.badge{
  display:inline-block;
  padding:5px 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:600;
}
.badge-success{background:#dcfce7;color:#166534}
.badge-draft{background:#fee2e2;color:#991b1b}

/* =========================================
   BUTTONS
========================================= */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 14px;
  border-radius:10px;
  font-size:13px;
  font-weight:600;
  text-decoration:none;
  border:none;
  cursor:pointer;
  background:#e5e7eb;
  color:#111827;
}
.btn:hover{background:#d1d5db}

.btn-primary{background:#2563eb;color:#fff}
.btn-primary:hover{background:#1d4ed8}

.btn-danger{background:#ef4444;color:#fff}
.btn-danger:hover{background:#dc2626}

.btn-sm{padding:6px 12px;font-size:12px}

/* =========================================
   FORMS (ALL ADMIN FORMS)
========================================= */
label{
  font-size:13px;
  font-weight:600;
  margin-bottom:6px;
  display:block;
}
.input, select, textarea{
  width:100%;
  padding:10px 12px;
  border-radius:10px;
  border:1px solid #e5e7eb;
  font-size:14px;
}
.input:focus, select:focus, textarea:focus{
  outline:none;
  border-color:#2563eb;
}

/* =========================================
   ALERTS
========================================= */
.alert{
  padding:14px 18px;
  border-radius:12px;
  font-size:14px;
}
.alert-success{background:#dcfce7;color:#166534}

/* =========================================
   MENUS / SIMPLE LISTS (FIX UP-DOWN TEXT)
========================================= */
.admin-list{
  list-style:none;
  margin:0;
  padding:0;
}
.admin-list li{
  padding:14px 16px;
  border-bottom:1px solid #f1f5f9;
  display:flex;
  justify-content:space-between;
  align-items:center;
}
.admin-list li:last-child{border-bottom:none}

.menu-item-info{
  display:flex;
  flex-direction:column;
  gap:2px;
}
.menu-item-info strong{font-size:14px}
.menu-item-info span{
  font-size:12px;
  color:#64748b;
}

/* =========================================
   UTILITIES
========================================= */
.mt{margin-top:24px}
.mt-sm{margin-top:12px}
.text-right{text-align:right}
/* =========================================
   FINAL TEXT & ALIGNMENT HARD FIX
   (THIS SOLVES UP / DOWN TEXT ISSUE)
========================================= */

/* GLOBAL TEXT NORMALIZATION */
body, p, span, a, li, td, th, label, input, select, textarea, button {
  line-height: 1.5;
  vertical-align: middle;
}

/* HEADINGS FIX */
h1, h2, h3, h4, h5 {
  line-height: 1.35;
  margin: 0;
}
.section-title {
  line-height: 1.3;
}
.muted {
  line-height: 1.4;
  margin-top: 2px;
}

/* TABLE TEXT ALIGNMENT */
.admin-table th,
.admin-table td {
  vertical-align: middle;
  line-height: 1.45;
}

/* MENU LIST FIX */
.admin-list li {
  align-items: center;
}
.menu-item-info strong,
.menu-item-info span {
  line-height: 1.4;
}

/* FORM FIX */
label {
  line-height: 1.4;
}
.input, select, textarea {
  line-height: 1.4;
}

/* BUTTON BASELINE FIX */
.btn {
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* CARD CONTENT RHYTHM */
.card > h1,
.card > h2,
.card > h3 {
  margin-bottom: 8px;
}
.card > p {
  margin-top: 0;
}

/* REMOVE RANDOM MARGINS */
table, ul, ol {
  margin: 0;
}
/* ===== MENU LIST FIX (RIGHT PANEL) ===== */
.admin-list{
  list-style:none;
  margin:0;
  padding:0;
}
.admin-list li{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 16px;
  border-bottom:1px solid #f1f5f9;
}
.admin-list li:last-child{border-bottom:none}

.menu-item-info{
  display:flex;
  flex-direction:column;
  line-height:1.4;
}
.menu-item-info strong{
  font-size:14px;
}
.menu-item-info span{
  font-size:12px;
  color:#64748b;
}

.menu-item-actions{
  display:flex;
  align-items:center;
  gap:10px;
}
