/* =========================================
   SkoolTest Portal — Polished Blue Theme
   Bright Blue (#0096D6) + Clean White
   ========================================= */

/* ---------- RESET (light) ---------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; }

/* ---------- TOKENS ---------- */
:root{
  --brand: #0096D6;          /* primary bright blue */
  --brand-600: #007bb3;      /* hover/darker for 0096D6 */
  --brand-50: #eaf7ff;       /* very light brand tint */
  --text: #0f172a;           /* slate-900 */
  --muted: #64748b;          /* slate-500 */
  --card: #ffffff;
  --border: #e5e7eb;         /* gray-200 */
  --ring: rgba(0, 150, 214, .35); /* focus ring in brand hue */
  --shadow: 0 6px 16px rgba(2, 6, 23, .06);
  --radius: 12px;
  --radius-sm: 8px;
  --space: 16px;
  --space-lg: 24px;
  --transition: 170ms cubic-bezier(.2,.7,.3,1);
}

/* ---------- GLOBAL ---------- */
body{
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 20% -10%, var(--brand-50), transparent 60%),
    #f8fafc; /* fallback base */
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Arial, sans-serif;
}

.container{
  max-width: 980px;
  width: 100%;
  margin: 24px auto;
  padding: 0 16px;
}

/* ---------- TYPOGRAPHY ---------- */
h1,h2,h3{ margin: 0; font-weight: 700; color: var(--brand); }
h1{ font-size: 22px; }
h2{ font-size: 18px; }
p.muted{ color: var(--muted); font-size: 13px; margin: 8px 0 0; }

/* ---------- ADMIN PAGE HEADER CARD ---------- */
.header{
  display: flex; align-items: center; justify-content: space-between;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  box-shadow: var(--shadow);
}

/* ---------- CARD ---------- */
.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;                 /* roomier card */
  box-shadow: var(--shadow);
  width: 100%;
}

/* ---------- FORMS ---------- */
label{
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin: 10px 0 6px;
}

input[type="email"],
input[type="password"],
input[type="text"],
select, textarea{
  width: 100%;
  padding: 12px 12px;            /* a bit taller */
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  font-size: 15px;
}

input:focus, select:focus, textarea:focus{
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--ring);
}

/* ---------- BUTTONS ---------- */
.btn{
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 12px 16px;            /* larger tap area */
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition), background-color var(--transition), box-shadow var(--transition);
  text-decoration: none;
  font-size: 15px;
}

.btn:active{ transform: translateY(1px); }

.btn-primary{
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 20px rgba(0, 150, 214, .18);
}
.btn-primary:hover{ background: var(--brand-600); }

.btn-light{
  background: #f1f5f9;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-light:hover{ background: #e2e8f0; }

/* ---------- ALERTS ---------- */
.err{
  margin-top: 12px;
  background: #fff1f2;               /* light red */
  color: #b91c1c;
  border: 1px solid #fecaca;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

/* ---------- LAYOUT HELPERS ---------- */
.stack{ display: grid; gap: 14px; }   /* slightly more spacing */
.centered{
  max-width: 520px;                   /* wider login box */
  width: 100%;
  margin: 72px auto;                  /* balanced spacing */
  padding: 0 16px;                    /* side padding on mobile */
  flex: 1 0 auto;                     /* play nicely with sticky footer layout */
}

/* ---------- LOGIN CARD OVERRIDES ---------- */
.login-card .title{ color: var(--brand); font-size: 24px; }

/* ---------- HEADER (STICKY, FULL-WIDTH, TIGHT) ---------- */
.site-header {
  position: sticky;
  top: 0;
  background: var(--brand, #007BFF);
  color: #fff;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.header-inner {
  max-width: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px; /* tighter padding, less empty space */
}

.brand {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.brand span { color: #fff; opacity: 0.9; }

.tagline {
  font-size: 14px;
  font-weight: 500;
  opacity: 0.9;
}

/* ---------- FOOTER (LIGHT GREY & STICKY BOTTOM) ---------- */
html, body {
  height: 100%;
  display: flex;
  flex-direction: column;
}

body > .container,
body > main,
body > div.wrap {
  flex: 1 0 auto; /* allow content to expand before footer */
}

.site-footer {
  flex-shrink: 0;
  background: #f1f1f1; /* light grey background */
  color: #444;
  text-align: center;
  padding: 12px;
  font-size: 14px;
  border-top: 1px solid #ddd;
}

.site-footer a {
  color: var(--brand);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* ---------- DASHBOARD UTILITIES ---------- */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.stat { display:flex; flex-direction:column; gap:8px; }
.stat .value { font-size: 26px; font-weight: 800; color: var(--brand); }
.stat .label { color: var(--muted); font-size: 13px; }

/* ---------- MOBILE POLISH ---------- */
@media (max-width: 480px){
  .centered{ margin: 56px auto; }
  .card{ padding: 22px; }
  .header-inner{ padding: 10px 16px; }
}
/* --- Dropdown layout polish for questions.php --- */
.filters select {
  min-width: 160px;          /* wider dropdowns even when empty */
  padding: 8px 10px;
  font-size: 14px;
}

.filters label {
  font-weight: 500;
  color: var(--muted);
  font-size: 13px;
}

.filters {
  flex-wrap: wrap;
  gap: 12px 16px;             /* add vertical breathing room */
  margin-top: 8px;
}

.toolbar {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow);
  margin-top: 18px;
}

.toolbar form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
