:root{
  --text:#102033;
  --muted:#587086;
  --line:rgba(15,23,42,.10);

  --bg1:#f2dcc0;
  --bg2:#e7c39a;
  --bg3:#dca36a;

  --card1:#dde6ef;
  --card2:#d2dde9;
  --card3:rgba(232,238,245,.92);

  --panel:#eef3f8;
  --panel-2:#e3ebf3;

  --blue:#2563eb;
  --blue-dark:#1e40af;
  --blue-soft:#dbe8ff;

  --success:#15803d;
  --success-bg:rgba(21,128,61,.10);

  --warn:#b45309;
  --warn-bg:rgba(180,83,9,.10);

  --danger:#b91c1c;
  --danger-bg:rgba(185,28,28,.10);

  --shadow:0 16px 36px rgba(0,0,0,.10);
  --shadow-soft:0 10px 24px rgba(0,0,0,.07);

  --radius:20px;
  --radius-sm:14px;

  --max:1180px;
}

*{
  box-sizing:border-box;
}

html{
  scroll-behavior:smooth;
}

html,body{
  margin:0;
  padding:0;
  min-height:100%;
  font-family:Inter, "Segoe UI", Roboto, Arial, sans-serif;
  color:var(--text);
  background:
    radial-gradient(circle at top left, rgba(220,120,32,.22), transparent 35%),
    radial-gradient(circle at bottom right, rgba(193,92,24,.16), transparent 30%),
    linear-gradient(180deg, var(--bg1) 0%, var(--bg2) 55%, var(--bg3) 100%);
}

body{
  min-height:100vh;
}

a{
  color:var(--blue-dark);
  text-decoration:none;
  transition:.18s ease;
}

a:hover{
  color:var(--blue);
}

img{
  display:block;
  max-width:100%;
}

.container{
  width:min(var(--max), calc(100% - 32px));
  margin:0 auto;
}

h1,h2,h3{
  margin-top:0;
  line-height:1.1;
  letter-spacing:-.02em;
  color:var(--text);
}

h1{
  font-size:clamp(30px, 5vw, 46px);
}

h2{
  font-size:clamp(24px, 3.2vw, 34px);
}

h3{
  font-size:clamp(20px, 2.4vw, 24px);
}

p{
  color:#31475b;
  line-height:1.7;
}

/* HEADER */
.admin-header{
  position:sticky;
  top:0;
  z-index:1000;
  backdrop-filter:blur(10px);
  background:rgba(255,255,255,.62);
  border-bottom:1px solid rgba(255,255,255,.35);
}

.admin-header-inner{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:20px;
  min-height:84px;
  padding:14px 0;
}

.admin-brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.admin-brand-badge{
  width:50px;
  height:50px;
  border-radius:16px;
  display:grid;
  place-items:center;
  font-size:24px;
  background:linear-gradient(135deg, rgba(37,99,235,.12), rgba(255,255,255,.62));
  border:1px solid rgba(255,255,255,.48);
  box-shadow:var(--shadow-soft);
  flex:0 0 50px;
}

.admin-brand-copy{
  display:flex;
  flex-direction:column;
  min-width:0;
}

.admin-brand-title{
  font-size:22px;
  font-weight:900;
  color:var(--blue-dark);
  line-height:1.05;
  letter-spacing:-.02em;
  white-space:nowrap;
}

.admin-brand-tagline{
  font-size:12px;
  font-weight:700;
  color:var(--muted);
  letter-spacing:.04em;
  text-transform:uppercase;
  margin-top:2px;
  white-space:nowrap;
}

.admin-nav{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  flex-wrap:wrap;
}

.admin-nav a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:0 16px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.45);
  background:rgba(255,255,255,.72);
  color:var(--text);
  font-weight:700;
  box-shadow:var(--shadow-soft);
}

.admin-nav a:hover{
  transform:translateY(-2px);
}

.admin-userbar{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.admin-user-email{
  font-size:14px;
  font-weight:700;
  color:#31475b;
  padding:10px 14px;
  border-radius:14px;
  background:rgba(255,255,255,.52);
  border:1px solid rgba(255,255,255,.42);
}

/* PAGE WRAP */
.admin-page-shell{
  padding-top:24px;
  padding-bottom:16px;
}

/* TOPBAR / PAGE HEAD */
.topbar{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  margin-bottom:22px;
}

.actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

/* CARDS */
.card{
  background:linear-gradient(180deg, var(--card1), var(--card2));
  border:1px solid rgba(255,255,255,.34);
  border-radius:var(--radius);
  padding:24px;
  box-shadow:var(--shadow);
  margin-bottom:20px;
}

.card-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:16px;
}

.card-grid .card{
  margin-bottom:0;
}

.card-grid .card,
.card-grid a.card{
  text-decoration:none;
  color:var(--text);
  display:block;
  font-weight:700;
}

.card-grid .card:hover,
.card-grid a.card:hover{
  transform:translateY(-3px);
}

/* HERO / FEATURE CARD */
.hero-card{
  background:
    radial-gradient(circle at top left, rgba(37,99,235,.10), transparent 30%),
    linear-gradient(180deg, #edf3f9, #dde7f1);
  border:1px solid rgba(255,255,255,.36);
  border-radius:24px;
  padding:34px;
  box-shadow:var(--shadow);
}

/* STATS */
.stat-box{
  background:linear-gradient(180deg, #e7eef5, #d9e3ee);
  border:1px solid rgba(255,255,255,.34);
  border-radius:18px;
  padding:18px;
  box-shadow:var(--shadow-soft);
  margin-bottom:20px;
}

.stat-box-danger{
  border-color:rgba(185,28,28,.22);
  box-shadow:
    0 0 0 1px rgba(185,28,28,.10) inset,
    var(--shadow-soft);
}

.stat-label{
  font-size:13px;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:#5c7390;
  margin-bottom:8px;
}

.stat-value{
  font-size:30px;
  font-weight:900;
  color:var(--blue-dark);
  line-height:1.1;
}

/* GRID */
.grid{
  display:grid;
  gap:16px;
}

.grid-2{
  grid-template-columns:repeat(2, minmax(0, 1fr));
}

.grid-3{
  grid-template-columns:repeat(3, minmax(0, 1fr));
}

.grid-4{
  grid-template-columns:repeat(4, minmax(0, 1fr));
}

.full{
  grid-column:1 / -1;
}

/* BUTTONS */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:44px;
  padding:0 16px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.50);
  background:rgba(255,255,255,.75);
  color:var(--text);
  text-decoration:none;
  cursor:pointer;
  transition:.18s ease;
  box-shadow:0 10px 24px rgba(0,0,0,.06);
}

.btn:hover{
  transform:translateY(-2px);
  color:var(--text);
}

.btn-primary{
  background:linear-gradient(135deg, var(--blue), #4a85ff);
  color:#fff;
  border-color:transparent;
}

.btn-primary:hover{
  color:#fff;
}

.btn-danger{
  background:linear-gradient(135deg, #dc2626, #b91c1c);
  color:#fff;
  border-color:transparent;
}

.btn-danger:hover{
  color:#fff;
}

/* BADGES */
.badge{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  line-height:1;
  border:1px solid transparent;
}

.badge-ok{
  background:rgba(21,128,61,.12);
  color:#166534;
  border-color:rgba(21,128,61,.18);
}

.badge-warn{
  background:rgba(180,83,9,.12);
  color:#9a3412;
  border-color:rgba(180,83,9,.18);
}

.badge-danger{
  background:rgba(185,28,28,.12);
  color:#991b1b;
  border-color:rgba(185,28,28,.18);
}

/* ALERTS */
.alert{
  padding:14px 16px;
  border-radius:14px;
  margin-bottom:18px;
  border:1px solid transparent;
  font-weight:600;
}

.alert-error{
  background:rgba(185,28,28,.10);
  border-color:rgba(185,28,28,.16);
  color:#991b1b;
}

.alert-success{
  background:rgba(21,128,61,.10);
  border-color:rgba(21,128,61,.16);
  color:#166534;
}

/* FORMS */
label{
  display:block;
  margin:0 0 8px;
  font-size:14px;
  color:#203448;
  font-weight:700;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
select,
textarea{
  width:100%;
  border:1px solid rgba(15,23,42,.12);
  border-radius:12px;
  background:rgba(255,255,255,.82);
  color:var(--text);
  padding:12px 14px;
  outline:none;
  transition:border-color .15s ease, box-shadow .15s ease;
  margin-bottom:14px;
  font:inherit;
}

input:focus,
select:focus,
textarea:focus{
  border-color:rgba(37,99,235,.28);
  box-shadow:0 0 0 4px rgba(37,99,235,.10);
}

textarea{
  resize:vertical;
  min-height:120px;
}

/* TABLES */
table{
  width:100%;
  border-collapse:collapse;
  background:rgba(255,255,255,.18);
  border-radius:16px;
  overflow:hidden;
}

th,td{
  text-align:left;
  padding:14px 12px;
  border-bottom:1px solid rgba(15,23,42,.08);
  vertical-align:top;
}

th{
  color:#46627f;
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:.04em;
  font-weight:800;
  background:rgba(255,255,255,.26);
}

tr:last-child td{
  border-bottom:none;
}

/* MISC */
hr{
  border:none;
  border-top:1px solid rgba(15,23,42,.08);
  margin:28px 0;
}

.progress-wrap{
  background:rgba(255,255,255,.55);
  border-radius:999px;
  overflow:hidden;
  height:14px;
  margin:12px 0 8px;
  border:1px solid rgba(15,23,42,.06);
}

.progress-bar{
  height:14px;
  background:linear-gradient(90deg,#2563eb 0%, #60a5fa 100%);
}

/* FOOTER */
.admin-footer{
  margin-top:40px;
  padding:22px 0 30px;
  border-top:1px solid rgba(255,255,255,.34);
  background:rgba(255,255,255,.22);
  color:var(--muted);
  font-size:14px;
}

.admin-footer-inner{
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:12px;
}

.admin-footer-links{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
}

.admin-footer-links a{
  color:var(--muted);
}

.admin-footer-links a:hover{
  color:var(--text);
}

/* OPTIONAL LEGACY COMPAT */
.footer-links{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
}

.footer-links a{
  color:var(--muted);
}

.footer-links a:hover{
  color:var(--text);
}

.admin-link{
  opacity:.55;
  font-size:13px;
}

.admin-link:hover{
  opacity:.95;
}

/* RESPONSIVE */
@media (max-width: 980px){
  .admin-header-inner{
    grid-template-columns:1fr;
    align-items:flex-start;
  }

  .admin-nav{
    justify-content:flex-start;
  }

  .admin-userbar{
    justify-content:flex-start;
  }

  .grid-4{
    grid-template-columns:1fr 1fr;
  }
}

@media (max-width: 760px){
  .grid-4,
  .grid-3,
  .grid-2{
    grid-template-columns:1fr;
  }

  .hero-card,
  .card{
    padding:20px;
  }

  .admin-footer-inner,
  .topbar{
    flex-direction:column;
    align-items:flex-start;
  }
}
.dash-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:16px;
}

.dash-card{
  position:relative;
  overflow:hidden;
  display:block;
  text-decoration:none;
  color:inherit;
  background:linear-gradient(180deg, rgba(255,255,255,.92), rgba(244,248,252,.96));
  border:1px solid rgba(15,23,42,.08);
  border-radius:20px;
  padding:20px;
  box-shadow:0 16px 34px rgba(15,23,42,.08);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.dash-card:hover{
  transform:translateY(-4px);
  box-shadow:0 22px 42px rgba(15,23,42,.12);
  border-color:rgba(37,99,235,.18);
}

.dash-card::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  width:100%;
  height:4px;
  background:linear-gradient(90deg, #c76b1b, #e6a24f, #2f6fe8, #c76b1b);
  background-size:220% 100%;
  opacity:.55;
  transition:opacity .18s ease;
}

.dash-card:hover::before{
  opacity:1;
  animation:dashStripe 4s linear infinite;
}

@keyframes dashStripe{
  from{background-position:0 50%}
  to{background-position:220% 50%}
}

.dash-card h3{
  margin:0 0 8px;
  font-size:20px;
  color:#203448;
}

.dash-muted{
  color:#587086;
  line-height:1.6;
  font-size:14px;
}

.dash-actions{
  margin-top:14px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.btn-secondary{
  background:rgba(37,99,235,.10);
  color:#1e40af;
  border:1px solid rgba(37,99,235,.16);
}

.btn-secondary:hover{
  background:rgba(37,99,235,.16);
  color:#1e3a8a;
}

.page-hero{
  background:
    radial-gradient(circle at top left, rgba(37,99,235,.10), transparent 30%),
    radial-gradient(circle at bottom right, rgba(220,120,32,.10), transparent 28%),
    linear-gradient(180deg, #edf3f9, #dde7f1);
  border:1px solid rgba(255,255,255,.36);
  border-radius:24px;
  padding:32px;
  box-shadow:var(--shadow);
  margin-bottom:22px;
}

.page-hero-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  flex-wrap:wrap;
}

.page-eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.56);
  border:1px solid rgba(255,255,255,.48);
  color:#9a4f13;
  font-weight:800;
  font-size:14px;
  margin-bottom:14px;
}

.page-hero p{
  max-width:760px;
  margin:0;
  color:#31475b;
  line-height:1.7;
}
.dash-card {
    position: relative;
    overflow: hidden;
    transition: all .2s ease;
}

.card-accent {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    opacity: 0.7;
    transition: height .2s ease, opacity .2s ease;
}

.dash-card:hover .card-accent {
    height: 100%;
    opacity: 0.08;
}

.accent-purple {
    background: linear-gradient(90deg, #a855f7, #6366f1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.card-title {
    font-weight: 600;
}

.card-count {
    font-size: 20px;
    font-weight: bold;
}

.card-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-top: 4px;
}
.dash-card:hover{
    transform:translateY(-3px);
}

.card-topline{
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:4px;
    transition:height .18s ease, opacity .18s ease;
    opacity:.95;
}

.dash-card:hover .card-topline{
    height:10px;
}

.card-topline-purple{
    background:linear-gradient(90deg,#a855f7,#6366f1);
}

.dash-card-compact{
    display:flex;
    flex-direction:column;
    justify-content:space-between;
    min-height:196px;
}

.dash-card-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
    margin-bottom:8px;
}

.dash-card-head h3{
    margin:0;
    font-size:18px;
    line-height:1.2;
}

.dash-card-total{
    min-width:36px;
    text-align:right;
    font-size:34px;
    font-weight:900;
    line-height:1;
    color:#111827;
}

.dash-card-desc{
    margin:0 0 14px;
    color:#5b6f82;
    line-height:1.6;
    font-size:14px;
}

.dash-mini-stats{
    display:grid;
    gap:8px;
    margin-top:auto;
}

.dash-mini-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    padding:8px 10px;
    border-radius:12px;
    background:rgba(255,255,255,.36);
    border:1px solid rgba(255,255,255,.34);
    font-size:14px;
    color:#31475b;
}

.dash-mini-row strong{
    font-size:15px;
    color:#102033;
}