/* GCUH Student Portal — original stylesheet (FLEX-style layout) */
:root {
  --blue: #1e6fd9;
  --blue-dark: #155cb8;
  --navy: #0e2a47;
  --navy-2: #12365c;
  --bg: #eef2f7;
  --card: #ffffff;
  --text: #1c2733;
  --muted: #66788c;
  --line: #dbe3ec;
  --danger: #c0392b;
  --warn-bg: #fdecea;
  --ok: #1e7d32;
  --radius: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}

h2 { font-size: 22px; margin: 0 0 14px; }
h3 { font-size: 16px; margin: 22px 0 10px; }
a { color: var(--blue); }
code { background: #eef2f7; padding: 1px 5px; border-radius: 4px; font-size: 13px; }

/* ---------- Login ---------- */
.login-wrap {
  display: flex;
  min-height: 100vh;
}
.login-left {
  flex: 1 1 46%;
  background: #fff;
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 560px;
}
.brand { display: flex; align-items: center; gap: 14px; margin-bottom: 36px; }
.brand-mark {
  width: 64px; height: 64px; border-radius: 12px;
  background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800; letter-spacing: 1px;
  flex-shrink: 0;
}
.brand-text h1 { font-size: 26px; margin: 0; line-height: 1.15; }
.brand-text h1 span { color: var(--blue); font-weight: 600; }
.brand-text p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }

.signin-title { font-size: 24px; margin: 0 0 18px; }

#loginForm label, .narrow-form label {
  display: block; font-weight: 600; font-size: 13px; margin: 14px 0 5px;
}
.field {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0 12px; background: #fff;
}
.field:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(30,111,217,.15); }
.field svg { width: 18px; height: 18px; fill: var(--muted); flex-shrink: 0; }
.field input {
  border: 0; outline: 0; flex: 1; padding: 12px 0; font-size: 15px; font-family: inherit;
}
.login-row {
  display: flex; justify-content: space-between; align-items: center;
  margin: 14px 0 4px; font-size: 14px;
}
.remember { display: flex; align-items: center; gap: 6px; font-weight: 400; margin: 0; }
.remember input { accent-color: var(--blue); }
.hint { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.error {
  color: var(--danger); background: var(--warn-bg);
  border: 1px solid #f5c6c0; border-radius: var(--radius);
  padding: 10px 12px; font-size: 14px; margin: 12px 0 0;
}
.success {
  color: var(--ok); background: #e8f5e9;
  border: 1px solid #b9dfc0; border-radius: var(--radius);
  padding: 10px 12px; font-size: 14px; margin: 12px 0 0;
}
.btn-primary {
  width: 100%; margin-top: 18px; padding: 13px;
  background: var(--blue); color: #fff; border: 0; border-radius: var(--radius);
  font-size: 16px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.btn-primary:hover { background: var(--blue-dark); }

.demo-box {
  margin-top: 26px; padding: 14px 16px;
  background: #f2f7ff; border: 1px dashed #9ec2f0; border-radius: var(--radius);
  font-size: 14px; line-height: 1.7;
}

.login-right {
  flex: 1 1 54%;
  background: linear-gradient(150deg, #0e2a47 0%, #155cb8 55%, #1e6fd9 100%);
  color: #fff; padding: 48px 56px;
  display: flex; flex-direction: column; justify-content: center;
}
.login-right h2 { font-size: 32px; line-height: 1.25; margin-bottom: 12px; }
.login-right p { font-size: 16px; opacity: .92; max-width: 460px; }
.login-right .contact { margin-top: 28px; font-size: 14px; opacity: .8; }

/* ---------- Portal shell ---------- */
.topbar {
  background: var(--blue); color: #fff;
  display: flex; align-items: center; gap: 16px;
  padding: 0 20px; height: 56px;
  position: sticky; top: 0; z-index: 20;
}
.topbar-brand { font-size: 19px; font-weight: 800; letter-spacing: .3px; }
.topbar-brand span { font-weight: 400; opacity: .9; }
.topbar-user { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 14px; }
.user-name { font-weight: 600; }
.user-roll { opacity: .85; }
.btn-logout {
  background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.4);
  border-radius: 6px; padding: 6px 12px; cursor: pointer; font-size: 13px; font-family: inherit;
}
.btn-logout:hover { background: rgba(255,255,255,.28); }
.hamburger {
  display: none; background: none; border: 0; color: #fff;
  font-size: 22px; cursor: pointer; padding: 4px 8px;
}

.shell { display: flex; min-height: calc(100vh - 56px); }
.sidebar {
  width: 230px; flex-shrink: 0; background: var(--navy); color: #dbe6f2;
}
.sidebar ul { list-style: none; margin: 0; padding: 12px 0; }
.sidebar a {
  display: block; padding: 12px 20px; color: #dbe6f2; text-decoration: none;
  font-size: 15px; border-left: 4px solid transparent;
}
.sidebar a:hover { background: var(--navy-2); color: #fff; }
.sidebar a.active { background: var(--navy-2); color: #fff; border-left-color: var(--blue); font-weight: 600; }

.content { flex: 1; padding: 24px 28px; min-width: 0; }
.page { animation: fade .18s ease-in; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.welcome-banner {
  background: linear-gradient(120deg, #0e2a47, #1e6fd9);
  color: #fff; border-radius: var(--radius); padding: 20px 24px; margin-bottom: 18px;
}
.welcome-banner h3 { margin: 0 0 4px; font-size: 20px; }
.welcome-banner p { margin: 0; opacity: .9; }

.kpi-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px;
}
.kpi {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; display: flex; flex-direction: column; gap: 2px;
}
.kpi-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi-value { font-size: 30px; font-weight: 800; color: var(--blue); line-height: 1.2; }
.kpi-sub { font-size: 12px; color: var(--muted); }

.card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px;
}
.card h3 { margin-top: 0; }
.plain-list { margin: 0; padding-left: 18px; }
.plain-list li { margin-bottom: 8px; }
.plain-list em { color: var(--muted); font-size: 12px; }

.note { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table thead th { background: #f4f7fb; font-size: 13px; text-transform: uppercase; letter-spacing: .3px; color: #40556c; }
.data-table tbody tr:nth-child(even) { background: #f8fafc; }
.data-table tbody tr:hover { background: #eef4fc; }
.data-table tfoot td { background: #f4f7fb; font-size: 14px; }
.data-table.timetable td:first-child { font-weight: 600; background: #f4f7fb; }
.low { background: var(--warn-bg) !important; color: var(--danger); font-weight: 700; }
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700;
}
.badge-paid { background: #e8f5e9; color: var(--ok); }
.badge-unpaid { background: var(--warn-bg); color: var(--danger); }
.badge-good { background: #e8f5e9; color: var(--ok); }
.badge-low { background: var(--warn-bg); color: var(--danger); }

.profile-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; display: flex; gap: 28px; align-items: flex-start;
}
.avatar {
  width: 96px; height: 96px; border-radius: 50%; background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; font-weight: 800; flex-shrink: 0;
}
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 32px; flex: 1; }
.profile-grid span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.profile-grid strong { font-size: 15px; }

.narrow-form { max-width: 420px; }
.narrow-form input {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line);
  border-radius: var(--radius); font-size: 15px; font-family: inherit;
}
.narrow-form input:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(30,111,217,.15); }

.portal-footer {
  text-align: center; font-size: 12px; color: var(--muted);
  padding: 14px; border-top: 1px solid var(--line); background: #fff;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .login-wrap { flex-direction: column; }
  .login-left { max-width: none; padding: 32px 22px; }
  .login-right { padding: 32px 22px; }
  .login-right h2 { font-size: 24px; }
  .hamburger { display: block; }
  .sidebar {
    position: fixed; left: 0; top: 56px; bottom: 0; z-index: 30;
    transform: translateX(-100%); transition: transform .2s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .content { padding: 18px 14px; }
  .user-roll { display: none; }
  .profile-card { flex-direction: column; }
}
