/* superdev-app dashboard — AMS portal design system (matches iris-portal/shared.css) */
:root {
  --primary: #5B8C8D;
  --primary-dark: #3A6B6C;
  --bg: #F8FAFC;
  --card-bg: #FFFFFF;
  --text: #2D3748;
  --text-light: #718096;
  --border: #E2E8F0;
  --success: #48BB78;
  --warning: #ED8936;
  --danger: #E53E3E;
  --shadow: 0 2px 8px rgba(0,0,0,0.04);
  --radius: 12px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; }
code { font-family: 'SFMono-Regular', Consolas, monospace; font-size: 0.82em; color: var(--primary-dark); background: rgba(91,140,141,0.08); padding: 1px 6px; border-radius: 5px; }
[hidden] { display: none !important; }

/* ── Login ─────────────────────────────────────────────── */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: linear-gradient(135deg, #EAF2F2 0%, var(--bg) 60%); }
.login-card { width: 100%; max-width: 380px; background: var(--card-bg); border-radius: 16px; box-shadow: 0 10px 40px rgba(58,107,108,0.12);
  padding: 34px 30px; border-top: 4px solid var(--primary); }
.login-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 4px; }
.login-brand i { font-size: 1.7rem; color: var(--primary); }
.login-brand b { font-size: 1.3rem; font-weight: 600; }
.login-brand b span { color: var(--primary); }
.login-sub { color: var(--text-light); font-size: 0.85rem; margin-bottom: 22px; }
.login-card label { display: block; font-size: 0.8rem; font-weight: 500; color: var(--text-light); margin: 12px 0 5px; }
.login-card .btn { width: 100%; margin-top: 20px; justify-content: center; }
.err { color: var(--danger); font-size: 0.83rem; margin-top: 12px; min-height: 1em; text-align: center; }

/* ── Layout ────────────────────────────────────────────── */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 250px; background: var(--card-bg); border-right: 1px solid var(--border); display: flex; flex-direction: column;
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 100; }
.logo { display: flex; align-items: center; gap: 11px; padding: 20px 18px; border-bottom: 1px solid var(--border); }
.logo i { font-size: 1.5rem; color: var(--primary); }
.logo div { font-weight: 600; color: var(--primary-dark); font-size: 1.02rem; line-height: 1.15; }
.logo div span { color: var(--primary); }
.logo small { display: block; font-weight: 400; font-size: 0.72rem; color: var(--text-light); }
.nav { flex: 1; padding: 14px 12px; overflow-y: auto; }
.nav-section { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-light); font-weight: 600; padding: 14px 10px 6px; }
.nav-item { display: flex; align-items: center; gap: 11px; width: 100%; border: none; background: none; cursor: pointer;
  padding: 10px 12px; border-radius: 9px; font-family: inherit; font-size: 0.9rem; font-weight: 400; color: var(--text); text-align: left; transition: 0.15s; }
.nav-item:hover { background: var(--bg); }
.nav-item.active { background: #E6F0F0; color: var(--primary-dark); font-weight: 500; }
.nav-item i { width: 18px; text-align: center; color: var(--primary); font-size: 0.95rem; }
.nav-item .nav-count { margin-left: auto; background: var(--primary); color: #fff; font-size: 0.68rem; font-weight: 600; padding: 1px 7px; border-radius: 999px; }
.sidebar-footer { padding: 14px; border-top: 1px solid var(--border); }
.sidebar-footer .who { font-size: 0.78rem; color: var(--text-light); padding: 0 4px 10px; word-break: break-all; }

.main { flex: 1; margin-left: 250px; min-width: 0; }
.top-header { background: var(--card-bg); border-bottom: 1px solid var(--border); padding: 16px 26px;
  display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 50; }
.top-header h1 { font-size: 1.25rem; font-weight: 600; }
.mobile-toggle { display: none; background: var(--bg); border: none; width: 36px; height: 36px; border-radius: 8px; cursor: pointer; margin-right: 12px; color: var(--text); }
.content { padding: 26px; }
.section { display: none; }
.section.active { display: block; }

/* ── Cards ─────────────────────────────────────────────── */
.card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; margin-bottom: 20px; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.card-header h3 { font-size: 1.02rem; font-weight: 600; display: flex; align-items: center; gap: 9px; }
.card-header h3 i { color: var(--primary); }
.muted { color: var(--text-light); font-size: 0.88rem; padding: 22px 4px; text-align: center; }

/* fleet grid */
.fleet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.college-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.college-card .cc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.college-card .cc-name { font-weight: 600; font-size: 1rem; }
.college-card .cc-slug { color: var(--text-light); font-size: 0.8rem; margin-bottom: 14px; }
.cc-actions { display: flex; gap: 7px; flex-wrap: wrap; }

/* ── Buttons ───────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border: none; border-radius: 9px;
  font-size: 0.88rem; font-weight: 500; cursor: pointer; font-family: inherit; transition: 0.16s; background: var(--primary); color: #fff; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--primary-dark); }
.btn:focus-visible { outline: 2px solid var(--primary-dark); outline-offset: 2px; }
.btn-sm { padding: 6px 11px; font-size: 0.8rem; border-radius: 7px; }
.btn-block { width: 100%; justify-content: center; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #C53030; }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--bg); border-color: var(--primary); color: var(--primary-dark); }
.btn-amber { background: var(--warning); }
.btn-amber:hover { background: #C05621; }
.btn-ghost { background: var(--bg); color: var(--text); }
.btn-ghost:hover { background: #E6F0F0; color: var(--primary-dark); }

/* ── Table ─────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.data-table thead { background: var(--bg); }
.data-table th { text-align: left; padding: 10px 12px; font-weight: 600; color: var(--text-light); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
.data-table td { padding: 11px 12px; border-top: 1px solid var(--border); vertical-align: middle; }
.data-table tbody tr:hover { background: #FAFCFC; }
.table-scroll { overflow-x: auto; }
.cell-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* ── Badges ────────────────────────────────────────────── */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 600; text-transform: capitalize; }
.badge-green { background: rgba(72,187,120,0.14); color: #276749; }
.badge-red   { background: rgba(229,62,62,0.13);  color: #9B2C2C; }
.badge-amber { background: rgba(237,137,54,0.15); color: #9C4221; }
.badge-teal  { background: rgba(91,140,141,0.14); color: var(--primary-dark); }
.badge-gray  { background: #EDF2F7; color: var(--text-light); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.dot-ok { background: var(--success); } .dot-off { background: var(--danger); }

/* ── Forms ─────────────────────────────────────────────── */
.form-control { width: 100%; padding: 10px 13px; border: 2px solid var(--border); border-radius: 9px; font-size: 0.9rem; font-family: inherit; color: var(--text); background: var(--card-bg); transition: 0.16s; }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(91,140,141,0.15); }
.search-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.search-row .form-control { max-width: 320px; }

/* ── Toast ─────────────────────────────────────────────── */
#toasts { position: fixed; top: 18px; right: 18px; z-index: 3000; display: flex; flex-direction: column; gap: 9px; }
.toast { background: var(--card-bg); border-left: 4px solid var(--primary); border-radius: 9px; box-shadow: 0 6px 22px rgba(0,0,0,0.12);
  padding: 12px 16px; font-size: 0.86rem; min-width: 220px; max-width: 340px; animation: slidein 0.2s ease; }
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
@keyframes slidein { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 820px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.2s; }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .mobile-toggle { display: inline-flex; align-items: center; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
