/* ASBS MBA Outreach Portal — single stylesheet, no build step. */

:root {
  --navy: #1f3864;
  --navy-dark: #152744;
  --ink: #1b1f27;
  --muted: #5c6672;
  --line: #dfe3e8;
  --bg: #f5f6f8;
  --card: #ffffff;
  --accent: #0b6bcb;
  --good: #137a4b;
  --good-bg: #e6f4ec;
  --warn: #8a5a00;
  --warn-bg: #fdf3e0;
  --bad: #b3261e;
  --bad-bg: #fdeceb;
  --radius: 6px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- header */

.topbar {
  background: var(--navy);
  color: #fff;
  padding: 0 16px;
}

.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  flex-wrap: wrap;
}

.brand {
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.2px;
  padding: 10px 0;
}
.brand:hover { text-decoration: none; }
.brand small {
  display: block;
  font-weight: 400;
  font-size: 11px;
  opacity: 0.7;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.nav {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  align-items: center;
}

.nav a {
  color: rgba(255, 255, 255, 0.82);
  padding: 8px 11px;
  border-radius: var(--radius);
  font-size: 14px;
}
.nav a:hover { background: rgba(255, 255, 255, 0.1); color: #fff; text-decoration: none; }
.nav a.on { background: rgba(255, 255, 255, 0.17); color: #fff; }

.whoami {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
}

.whoami form { margin: 0; }
.whoami button {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.9);
  padding: 5px 10px;
  border-radius: var(--radius);
  font: inherit;
  cursor: pointer;
}
.whoami button:hover { background: rgba(255, 255, 255, 0.12); }

/* ---------------------------------------------------------------- layout */

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 16px 60px;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

h1 { font-size: 22px; margin: 0 0 4px; font-weight: 600; }
h2 { font-size: 17px; margin: 26px 0 10px; font-weight: 600; }
h3 { font-size: 14px; margin: 0 0 8px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted); }

.sub { color: var(--muted); font-size: 13px; margin: 0; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 18px;
}
.card.tight { padding: 0; overflow: hidden; }

/* ---------------------------------------------------------------- stats */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 15px;
}
.stat .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 5px;
}
.stat .value { font-size: 24px; font-weight: 600; line-height: 1.1; }
.stat .note { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* ---------------------------------------------------------------- tables */

.table-scroll { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th, td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  background: #f8f9fa;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--muted);
  white-space: nowrap;
}

tbody tr:hover { background: #fbfcfd; }
tbody tr:last-child td { border-bottom: none; }

td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.nowrap, th.nowrap { white-space: nowrap; }

tfoot td {
  font-weight: 600;
  background: #f8f9fa;
  border-top: 2px solid var(--line);
}

.empty {
  padding: 30px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* ---------------------------------------------------------------- forms */

form { margin: 0; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.field { display: block; margin-bottom: 14px; }
.field > span {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 5px;
}
.field .hint { font-weight: 400; color: var(--muted); font-size: 12px; }

input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="date"], input[type="search"],
input[type="file"], select, textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #c4cad2;
  border-radius: var(--radius);
  font: inherit;
  color: var(--ink);
  background: #fff;
}

input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(11, 107, 203, 0.35);
  outline-offset: 0;
  border-color: var(--accent);
}

textarea { min-height: 76px; resize: vertical; }

.req { color: var(--bad); }

.btn {
  display: inline-block;
  padding: 8px 15px;
  border-radius: var(--radius);
  border: 1px solid var(--navy);
  background: var(--navy);
  color: #fff;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
}
.btn:hover { background: var(--navy-dark); text-decoration: none; color: #fff; }

.btn.secondary { background: #fff; color: var(--ink); border-color: #c4cad2; }
.btn.secondary:hover { background: #f2f4f6; color: var(--ink); }

.btn.danger { background: var(--bad); border-color: var(--bad); }
.btn.danger:hover { background: #8f1e17; }

.btn.small { padding: 5px 10px; font-size: 13px; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 18px; }
.actions.top { margin-top: 0; }

/* ---------------------------------------------------------------- filters */

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  align-items: end;
}
.filters .field { margin-bottom: 0; }
.filters .buttons { display: flex; gap: 8px; }

/* ---------------------------------------------------------------- badges */

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge.ok { background: var(--good-bg); color: var(--good); border-color: #bfe3cf; }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: #f0ddb8; }
.badge.bad { background: var(--bad-bg); color: var(--bad); border-color: #f3c9c6; }
.badge.mute { background: #eef0f3; color: var(--muted); border-color: #dfe3e8; }

/* ---------------------------------------------------------------- notices */

.notice {
  padding: 11px 14px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  border: 1px solid transparent;
  font-size: 14px;
}
.notice.success { background: var(--good-bg); color: var(--good); border-color: #bfe3cf; }
.notice.info { background: #e8f1fb; color: #0a4f96; border-color: #c3dcf5; }
.notice.error { background: var(--bad-bg); color: var(--bad); border-color: #f3c9c6; }
.notice.warn { background: var(--warn-bg); color: var(--warn); border-color: #f0ddb8; }

.notice ul { margin: 6px 0 0; padding-left: 20px; }

/* ---------------------------------------------------------------- login */

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--navy);
}
.login-box {
  background: #fff;
  border-radius: 8px;
  padding: 28px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}
.login-box h1 { font-size: 19px; margin-bottom: 2px; }
.login-box .sub { margin-bottom: 20px; }
.login-box .btn { width: 100%; margin-top: 4px; }

/* ---------------------------------------------------------------- misc */

.pagination {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
  flex-wrap: wrap;
}

.rowlist { margin: 0; padding: 0; list-style: none; }
.rowlist li {
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.rowlist li:last-child { border-bottom: none; }
.rowlist .meta { color: var(--muted); font-size: 13px; }

.bar {
  height: 6px;
  background: #e8ebee;
  border-radius: 3px;
  overflow: hidden;
  min-width: 60px;
}
.bar > span { display: block; height: 100%; background: var(--accent); }

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }

.errlist { margin: 0; padding-left: 18px; color: var(--bad); font-size: 13px; }
.warnlist { margin: 0; padding-left: 18px; color: var(--warn); font-size: 13px; }

tr.rowbad { background: var(--bad-bg); }
tr.rowbad:hover { background: #fbe3e1; }

details summary { cursor: pointer; color: var(--accent); font-size: 13px; }

.inline-form { display: inline; }

@media (max-width: 640px) {
  .topbar-inner { min-height: auto; padding: 8px 0; }
  .nav { width: 100%; }
  h1 { font-size: 19px; }
  .stat .value { font-size: 20px; }
  th, td { padding: 8px 9px; }
}

/* ---------------------------------------------------------------- searchable select */
/* Progressive enhancement over a native <select data-searchable>. The select
   itself stays in the DOM and remains what submits; it is taken out of layout
   rather than display:none so it keeps behaving like a real form control. */

.ss {
  position: relative;
}

.ss-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

.ss-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #c4cad2;
  border-radius: var(--radius);
  font: inherit;
  color: var(--ink);
  background: #fff;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) calc(50% + 2px), calc(100% - 10px) calc(50% + 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 28px;
}

.ss.is-open .ss-input {
  border-color: var(--accent);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.ss-panel {
  position: absolute;
  z-index: 40;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 290px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--accent);
  border-top: none;
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.ss-opt {
  padding: 7px 11px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.35;
  border-bottom: 1px solid #f1f3f5;
}

.ss-opt:last-child { border-bottom: none; }

.ss-opt.is-active {
  background: #e8f1fb;
}

.ss-opt.is-current {
  font-weight: 600;
}

.ss-opt mark {
  background: #fff2a8;
  color: inherit;
  padding: 0 1px;
  border-radius: 2px;
}

.ss-empty {
  padding: 12px 11px;
  color: var(--muted);
  font-size: 13px;
}
