:root {
  --navy: #1F3B57;
  --navy-deep: #142A3F;
  --gold: #B08D57;
  --gold-light: #D8C39C;
  --paper: #FAF7F1;
  --ink: #1C1E22;
  --ink-soft: #5B6572;
  --line: #E4DFD3;
  --card: #FFFFFF;
  --danger: #A5402F;
  --danger-bg: #FBECE8;
  --ok: #2F6B4F;
  --ok-bg: #EAF3EC;
  --font-serif: "Source Serif 4", Georgia, serif;
  --font-sans: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
}

h1, h2, h3 { font-family: var(--font-serif); margin: 0; font-weight: 600; }

button { font-family: var(--font-sans); cursor: pointer; }
input, select { font-family: var(--font-sans); }
code { background: #F2EEE4; padding: 1px 5px; border-radius: 3px; font-size: 0.9em; }

#app { max-width: 1100px; margin: 0 auto; min-height: 100vh; }

.login-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}
@media (max-width: 760px) {
  .login-wrap { grid-template-columns: 1fr; }
}

.login-left {
  background: var(--navy);
  color: #fff;
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.login-left .eyebrow { font-size: 11px; letter-spacing: .06em; color: var(--gold-light); margin-bottom: 6px; }
.login-left h1 { font-size: 28px; line-height: 1.25; color: #fff; }
.login-left p { font-size: 13px; color: #C7D2DD; margin-top: 16px; line-height: 1.6; }
.org-tree { font-size: 12px; color: #C7D2DD; line-height: 2; margin: 24px 0; }
.org-tree .row { display: flex; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.15); padding: 6px 0; }
.org-tree .row:last-child { border-bottom: none; }
.org-tree .row span:last-child { color: #fff; font-weight: 600; }
.foot-note { font-size: 12px; color: #8FA3B8; }

.login-right {
  background: var(--card);
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-right h2 { font-size: 20px; margin-bottom: 4px; }
.login-right .sub { font-size: 13px; color: var(--ink-soft); margin: 6px 0 24px; }
.field-label { font-size: 12px; color: var(--ink-soft); display: block; margin-bottom: 4px; }
.field-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 14px;
  margin-bottom: 14px;
  background: #fff;
  color: var(--ink);
}
.btn-primary {
  width: 100%;
  padding: 11px;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
}
.btn-primary:hover { background: var(--navy-deep); }
.err-box { min-height: 20px; font-size: 13px; color: var(--danger); margin-bottom: 6px; }
.demo-note { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-soft); line-height: 1.6; }

.topbar {
  background: var(--navy);
  color: #fff;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.who { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--gold); color: var(--navy-deep);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
}
.who-name { font-size: 14px; font-weight: 600; }
.who-role { font-size: 12px; color: #C7D2DD; }
.btn-outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,.4);
  color: #fff;
  padding: 7px 14px;
  border-radius: 4px;
  font-size: 13px;
}

.dash-body { padding: 26px 28px; }

.notice-warn {
  background: #FBF3E4; border: 1px solid #E9D8AE; color: #7A5A16;
  padding: 12px 16px; border-radius: 4px; font-size: 13px; margin-bottom: 20px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.notice-warn button { background: var(--navy); color: #fff; border: none; padding: 7px 12px; border-radius: 4px; font-size: 12px; white-space: nowrap; }

.section-title { font-size: 19px; margin-bottom: 4px; }
.section-sub { font-size: 13px; color: var(--ink-soft); margin: 4px 0 18px; }

.module-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.module-card { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 16px; }
.module-tag { font-size: 11px; letter-spacing: .03em; color: var(--gold); font-weight: 600; margin-bottom: 6px; }
.module-text { font-size: 14px; line-height: 1.5; }

.pw-panel {
  margin-top: 24px; background: #fff; border: 1px solid var(--line);
  border-radius: 6px; padding: 20px; max-width: 360px;
}
.pw-panel h3 { font-size: 15px; margin-bottom: 12px; }

.admin-section { margin-top: 30px; }
.search-input { width: 100%; max-width: 320px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 4px; font-size: 13px; margin-bottom: 14px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead tr { background: var(--paper); text-align: left; }
th, td { padding: 9px 12px; border-bottom: 1px solid var(--line); }
.mono { font-family: monospace; font-size: 12px; }
.pill-active { color: var(--ok); background: var(--ok-bg); padding: 2px 8px; border-radius: 10px; font-size: 11px; }
.pill-inactive { color: var(--danger); background: var(--danger-bg); padding: 2px 8px; border-radius: 10px; font-size: 11px; }
.btn-small { border: 1px solid var(--line); background: #fff; border-radius: 4px; padding: 4px 8px; font-size: 11px; margin-right: 6px; }

.loading { padding: 64px 24px; text-align: center; color: var(--ink-soft); font-size: 14px; }
