* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--text); display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

/* ── Auth ── */
#auth-screen { display: flex; align-items: flex-start; justify-content: center; width: 100%; min-height: 100vh; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); padding: 24px 16px; overflow-y: auto; }
.login-box { background: white; border-radius: 12px; padding: 28px 32px; width: 400px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); align-self: center; }
.login-box .logo { text-align: center; margin-bottom: 16px; }
.login-box .logo p { font-size: 11px; color: var(--muted); margin-top: 3px; }
.login-box label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.login-box input { width: 100%; padding: 9px 12px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 14px; outline: none; transition: border-color .2s; }
.login-box input:focus { border-color: var(--primary-light); }
.form-group { margin-bottom: 14px; }
.login-box .btn-login { width: 100%; padding: 11px; background: var(--primary); color: white; border: none; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; transition: background .2s; }
.login-box .btn-login:hover { background: var(--primary-light); }
.login-hint { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 12px; }
.login-hint-title { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 8px; text-align: center; }
.login-hint-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.hint-row { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px; background: var(--bg); border-radius: 6px; }
.hint-role { font-size: 10px; color: var(--muted); font-weight: 600; }
.hint-cred { font-size: 11px; color: var(--text); font-family: 'Courier New', monospace; }
.error-msg { color: var(--danger); font-size: 13px; margin-top: 10px; text-align: center; }

/* ── App Shell ── */
#app { display: flex; flex-direction: column; width: 100%; flex: 1; overflow: hidden; }

/* ── Top Nav ── */
aside {
  width: 100%;
  height: 58px;
  background: var(--primary);
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-shrink: 0;
  overflow: visible;
  position: relative;
  z-index: 100;
}

/* Brand / logo area */
.nav-brand {
  display: flex;
  align-items: center;
  padding: 0 16px;
  height: 100%;
  border-right: 1px solid rgba(255,255,255,.12);
  flex-shrink: 0;
}
.sidebar-logo-wrap {
  background: white;
  border-radius: 5px;
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
}
.sidebar-logo-img { height: 24px; width: auto; display: block; }

/* Nav items */
nav { display: flex; flex-direction: row; align-items: center; flex: 1; height: 100%; }

/* Top-level nav link (single-item sections rendered directly) */
.nav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  height: 100%;
  color: rgba(255,255,255,.72);
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
  border-bottom: 3px solid transparent;
  border-left: none;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-item:hover { background: rgba(255,255,255,.08); color: white; }
.nav-item.active { background: rgba(255,255,255,.1); color: white; border-bottom-color: var(--accent); }

/* Dropdown group */
.nav-group { position: relative; height: 100%; display: flex; align-items: stretch; flex-shrink: 0; }
.nav-group-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  color: rgba(255,255,255,.72);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  user-select: none;
  transition: all .15s;
}
.nav-group-label::after { content: '▾'; font-size: 10px; margin-left: 4px; opacity: .7; }
.nav-group:hover .nav-group-label { background: rgba(255,255,255,.08); color: white; }
.nav-group.active .nav-group-label { background: rgba(255,255,255,.1); color: white; border-bottom-color: var(--accent); }

.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--primary);
  border: 1px solid rgba(255,255,255,.12);
  border-top: none;
  border-radius: 0 0 8px 8px;
  min-width: 200px;
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  flex-direction: column;
  padding: 4px 0;
}
.nav-group:hover .nav-dropdown,
.nav-group.open .nav-dropdown { display: flex; }
.nav-dropdown .nav-item {
  height: 42px;
  padding: 0 18px;
  border-bottom: none;
  border-left: 3px solid transparent;
  font-size: 13px;
}
.nav-dropdown .nav-item:hover { border-left-color: var(--accent); background: rgba(255,255,255,.08); }
.nav-dropdown .nav-item.active { border-left-color: var(--accent); background: rgba(255,255,255,.1); color: white; }

/* User / sign-out area */
.nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  height: 100%;
  border-left: 1px solid rgba(255,255,255,.12);
  flex-shrink: 0;
}
.user-name { color: white; font-size: 12px; font-weight: 600; line-height: 1.3; }
.user-role { color: rgba(255,255,255,.45); font-size: 10px; }
.btn-logout { padding: 6px 12px; background: rgba(255,255,255,.1); color: rgba(255,255,255,.8); border: none; border-radius: 6px; font-size: 12px; cursor: pointer; white-space: nowrap; }
.btn-logout:hover { background: rgba(255,255,255,.2); }

/* Hamburger button (mobile only) */
.nav-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 100%;
  background: none;
  border: none;
  color: white;
  font-size: 22px;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: auto;
}
.nav-hamburger:hover { background: rgba(255,255,255,.08); }

/* Mobile slide-down menu */
.nav-mobile-menu {
  display: none;
  position: absolute;
  top: 58px;
  left: 0;
  right: 0;
  background: var(--primary);
  border-top: 1px solid rgba(255,255,255,.12);
  z-index: 200;
  max-height: calc(100vh - 58px);
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.nav-mobile-menu.open { display: block; }
.mobile-nav-section {
  padding: 10px 16px 4px;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,.35);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.nav-mobile-menu .nav-item {
  height: 46px;
  padding: 0 20px;
  border-bottom: none;
  border-left: 3px solid transparent;
  border-top: none;
  font-size: 13px;
}
.nav-mobile-menu .nav-item:hover { background: rgba(255,255,255,.08); }
.nav-mobile-menu .nav-item.active { border-left-color: var(--accent); background: rgba(255,255,255,.1); }
.mobile-nav-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,.12);
  gap: 12px;
}

/* ── Responsive breakpoint ── */
@media (max-width: 768px) {
  nav { display: none; }
  .nav-user { display: none; }
  .nav-hamburger { display: flex; }
}

/* SPH Media brand — login page */
.login-logo-img { max-width: 160px; height: auto; display: block; margin: 0 auto 4px; }
.login-system-name { font-size: 13px; color: var(--primary); font-weight: 600; text-align: center; margin-top: 6px; }

/* ── Main Area ── */
main { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
.topbar { background: white; border-bottom: 1px solid var(--border); padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.topbar h1 { font-size: 18px; font-weight: 700; color: var(--primary); }
.topbar .breadcrumb { font-size: 12px; color: var(--muted); margin-top: 2px; }
.content { padding: 24px; flex: 1; }
/* .page styles removed — MPA uses separate HTML files per page */
