/* admin/admin.css — LIGHT MODE */

/* =========================
   Theme Variables
   ========================= */
:root{
  --bg:#f6f7fb;
  --bg2:#ffffff;

  --panel:#ffffff;
  --panel2:#f2f4fb;

  --border:rgba(15,23,42,.12);
  --border2:rgba(15,23,42,.18);

  --text:#0f172a;     /* slate-900 */
  --muted:rgba(15,23,42,.72);

  --link:#2563eb;     /* blue-600 */
  --accent:#2563eb;   /* blue */
  --accent2:#7c3aed;  /* purple */
  --ok:#059669;       /* emerald */
  --warn:#d97706;     /* amber */
  --danger:#e11d48;   /* rose */

  --btnbg:#ffffff;
  --shadow:0 14px 40px rgba(2,6,23,.10);
}

/* =========================
   Base Layout
   ========================= */
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial;
  color:var(--text);
  background:
    radial-gradient(900px 600px at 10% -10%, rgba(37,99,235,.10), transparent 55%),
    radial-gradient(900px 600px at 95% 0%, rgba(124,58,237,.10), transparent 55%),
    linear-gradient(180deg, var(--bg), var(--bg2));
}

.wrap{
  max-width:1100px;
  margin:34px auto;
  padding:0 16px;
}

/* =========================
   Admin Utility Topbar
   ========================= */
.admin-topbar{
  position: sticky;
  top: 0;
  z-index: 999;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 12px;

  background: rgba(255,255,255,.78);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.admin-topbar a{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 800;

  padding: 7px 11px;
  border-radius: 12px;

  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);

  box-shadow: 0 6px 18px rgba(2,6,23,.06);
  transition: transform .06s ease, border-color .15s ease, background .15s ease;
}

.admin-topbar a:hover{
  border-color: rgba(37,99,235,.30);
  background: rgba(37,99,235,.06);
}

.admin-topbar a:active{ transform: translateY(1px); }

/* =========================
   Cards & Panels
   ========================= */
.card{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:16px;
  flex-wrap:wrap;
}

/* =========================
   Typography & Links
   ========================= */
a{
  color:var(--link);
  text-decoration:none;
}

a:hover{ text-decoration:underline; }

.muted{
  color:var(--muted);
  line-height:1.55;
}

.pill{
  display:inline-flex;
  align-items:center;
  gap:6px;

  padding:5px 10px;
  border-radius:999px;

  border:1px solid var(--border);
  background: rgba(15,23,42,.04);
  font-size:12px;
  color: rgba(15,23,42,.75);
}

/* Optional variants */
.pill.info{ border-color: rgba(37,99,235,.25); background: rgba(37,99,235,.08); color: rgba(15,23,42,.86); }
.pill.ok{ border-color: rgba(5,150,105,.25); background: rgba(5,150,105,.08); }
.pill.warn{ border-color: rgba(217,119,6,.25); background: rgba(217,119,6,.08); }
.pill.danger{ border-color: rgba(225,29,72,.25); background: rgba(225,29,72,.08); }

/* =========================
   Buttons
   ========================= */
.btn,
button.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;

  padding:10px 14px;
  border-radius:12px;

  border:1px solid var(--border);
  background: var(--btnbg);
  color: var(--text);
  text-decoration:none;
  font-weight:800;
  cursor:pointer;

  box-shadow: 0 8px 22px rgba(2,6,23,.08);
  transition: transform .06s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.btn:hover,
button.btn:hover{
  border-color: rgba(37,99,235,.28);
  background: rgba(37,99,235,.06);
  box-shadow: 0 10px 26px rgba(2,6,23,.10);
}

.btn:active,
button.btn:active{ transform: translateY(1px); }

.btn.primary{
  border:none;
  background: linear-gradient(90deg, #2563eb, #7c3aed);
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(37,99,235,.20);
}

.btn.primary:hover{
  filter: brightness(1.02);
  box-shadow: 0 14px 34px rgba(37,99,235,.24);
}

.btn.danger{
  border:1px solid rgba(225,29,72,.25);
  background: rgba(225,29,72,.06);
}

.btn.danger:hover{
  border-color: rgba(225,29,72,.40);
  background: rgba(225,29,72,.10);
}

/* =========================
   Forms
   ========================= */
label{
  display:block;
  margin:12px 0 6px;
  font-weight:800;
}

input,
textarea,
select{
  width:100%;
  padding:12px;
  border-radius:14px;
  border:1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  outline:none;

  box-shadow: 0 6px 18px rgba(2,6,23,.06);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

textarea{ min-height:120px; }

input:focus,
textarea:focus,
select:focus{
  border-color: rgba(37,99,235,.55);
  box-shadow: 0 0 0 4px rgba(37,99,235,.14);
  background: #ffffff;
}

input::placeholder,
textarea::placeholder{
  color: rgba(15,23,42,.45);
}

/* =========================
   Grids & Rows
   ========================= */
.grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:12px;
  margin-top:12px;
}

.row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

@media(max-width:900px){
  .grid,
  .row{ grid-template-columns:1fr; }
}

/* =========================
   Tables
   ========================= */
.table{
  width:100%;
  border-collapse:separate;
  border-spacing:0 8px;
  margin-top:10px;
}

.table td{
  background:#ffffff;
  border:1px solid var(--border);
  padding:10px 12px;
  box-shadow: 0 6px 18px rgba(2,6,23,.06);
}

.table tr td:first-child{ border-radius:12px 0 0 12px; }
.table tr td:last-child{ border-radius:0 12px 12px 0; }

.table tr:hover td{
  border-color: rgba(37,99,235,.22);
  background: rgba(37,99,235,.04);
}

/* =========================
   Notices
   ========================= */
.note{
  margin-top:14px;
  padding:12px;
  border-radius:14px;
  border:1px solid rgba(37,99,235,.22);
  background: rgba(37,99,235,.08);
  color: rgba(15,23,42,.90);
}

.warn{
  margin-top:14px;
  padding:12px;
  border-radius:14px;
  border:1px solid rgba(217,119,6,.24);
  background: rgba(217,119,6,.10);
  color: rgba(15,23,42,.90);
}

/* ===========================
   Lesson Type (icons + pill)
   =========================== */
.lesson-type-row{
  display:flex;
  gap:12px;
  align-items:flex-end;
  flex-wrap:wrap;
}

.lesson-type-select{
  min-width:220px;
  padding:10px 12px;
}

/* Preview pill (matches light mode) */
.type-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 11px;
  border-radius:999px;
  background: rgba(15,23,42,.04);
  border:1px solid var(--border);
  font-size:14px;
  line-height:1;
  color: rgba(15,23,42,.90);
}

.type-pill .ico{
  font-size:16px;
  line-height:1;
}

/* Optional: type variants if you add classes (t-reading etc.) */
.type-pill.t-reading{ border-color: rgba(20,184,166,.35); background: rgba(20,184,166,.12); }
.type-pill.t-video{ border-color: rgba(59,130,246,.35); background: rgba(59,130,246,.12); }
.type-pill.t-activity{ border-color: rgba(168,85,247,.35); background: rgba(168,85,247,.12); }
.type-pill.t-external_link{ border-color: rgba(245,158,11,.35); background: rgba(245,158,11,.12); }
.type-pill.t-quiz{ border-color: rgba(244,63,94,.35); background: rgba(244,63,94,.12); }

/* Optional helper if your admin labels are tight */
.lesson-type-row label{
  display:inline-block;
  margin-bottom:6px;
}
/* =========================
   ADMIN DASHBOARD POLISH
   ========================= */

/* --- Card hover lift (subtle modern feel) --- */
.card{
  transition: transform .12s ease, box-shadow .12s ease;
}

.card:hover{
  transform: translateY(-2px);
  box-shadow: 0 18px 46px rgba(2,6,23,.14);
}

/* --- Stat tiles look cleaner (if you use pills or numbers in cards) --- */
.card .pill{
  font-weight:600;
  letter-spacing:.02em;
}

/* --- Buttons hierarchy (primary stands out more) --- */
.btn.primary{
  position: relative;
}

.btn.primary::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  box-shadow: 0 0 0 0 rgba(37,99,235,.35);
  transition: box-shadow .15s ease;
}

.btn.primary:hover::after{
  box-shadow: 0 0 0 6px rgba(37,99,235,.12);
}

/* --- Admin topbar active state (add class="active" to current link) --- */
.admin-topbar a.active{
  border-color: rgba(37,99,235,.55);
  background: rgba(37,99,235,.14);
  color: #0f172a;
  font-weight:900;
}

/* --- Table polish: clearer grouping --- */
.table{
  font-size:14px;
}

.table td{
  transition: background .12s ease, border-color .12s ease;
}

/* Zebra feel without stripes */
.table tr:nth-child(even) td{
  background: rgba(15,23,42,.02);
}

/* --- Make headings pop slightly inside cards --- */
.card h2,
.card h3,
.section-title{
  font-weight:900;
  letter-spacing:.02em;
}

/* --- Inputs feel softer --- */
input,
textarea,
select{
  border-radius:16px;
}

/* --- Subtle divider utility if you ever need it --- */
.divider{
  height:1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(15,23,42,.14),
    transparent
  );
  margin:16px 0;
}

/* --- Dashboard “tile” feel if you use grid cards --- */
.grid .card{
  padding:16px;
}

/* --- Tiny animation for hover focus (professional feel) --- */
.btn,
.admin-topbar a{
  transition: 
    transform .06s ease,
    box-shadow .12s ease,
    background .15s ease,
    border-color .15s ease;
}

/* --- Accessibility improvement: visible focus --- */
.btn:focus,
input:focus,
select:focus,
textarea:focus{
  outline:none;
}

/* --- Optional: icon alignment helper --- */
.icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:20px;
}
