*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --navy: #1a2e5a;
  --navy-dark: #0f1e3d;
  --navy-light: #2a4080;
  --gold: #b8860b;
  --gold-light: #d4a017;
  --gold-bg: #fdf8ee;
  --white: #ffffff;
  --off-white: #f8f7f4;
  --border: #ddd8cc;
  --text-main: #1a1a1a;
  --text-muted: #5a5a5a;
  --text-light: #888;
  --accent-red: #8b1a1a;
}

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-main);
  background: var(--white);
}

a {
  color: var(--navy);
  text-decoration: none;
}

a:hover {
  color: var(--gold);
  text-decoration: underline;
}

/* ── ANNOUNCEMENT BAR ── */
.announce-bar {
  background: var(--navy-dark);
  color: #e8d9a0;
  text-align: center;
  font-size: 13px;
  padding: 8px 16px;
  font-family: Arial, sans-serif;
  letter-spacing: 0.3px;
}

.announce-bar a {
  color: #f0c040;
  font-weight: bold;
}

.announce-bar a:hover {
  text-decoration: underline;
}

/* ── TOP NAV ── */
.top-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 18px 0 0;
}

.top-bar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.journal-logo {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  flex: 1;
}

.logo-badge {
  width: 56px;
  height: 56px;
  background: var(--navy);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-badge span {
  color: #e8d9a0;
  font-size: 18px;
  font-weight: bold;
  font-family: Georgia, serif;
  letter-spacing: 1px;
}

.logo-text {
  line-height: 1.3;
}

.logo-title {
  font-size: 20px;
  font-weight: bold;
  color: var(--navy-dark);
  font-family: Georgia, serif;
}

.logo-sub {
  font-size: 12px;
  color: var(--text-muted);
  font-family: Arial, sans-serif;
}

.issn-badge {
  font-size: 12px;
  font-family: Arial, sans-serif;
  color: var(--text-muted);
  border-left: 1px solid var(--border);
  padding-left: 18px;
  line-height: 1.5;
  white-space: nowrap;
}

.issn-badge strong {
  color: var(--navy);
  display: block;
}

/* ── MAIN NAV ── */
nav {
  max-width: 1100px;
  margin: 14px auto 0;
  padding: 0 24px;
  display: flex;
  gap: 0;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

nav a {
  font-size: 13.5px;
  font-family: Arial, sans-serif;
  color: var(--text-main);
  padding: 10px 14px;
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

nav a:hover,
nav a.active {
  color: var(--navy);
  border-bottom-color: var(--navy);
  text-decoration: none;
}

/* ── PAGE SECTIONS ── */
.page-section {
  display: none;
}

.page-section.active {
  display: block;
}

/* ── HERO ── */
.hero {
  background: var(--navy);
  color: white;
  padding: 56px 24px 48px;
  text-align: center;
  border-bottom: 4px solid var(--gold);
}

.hero-eyebrow {
  font-size: 12px;
  font-family: Arial, sans-serif;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #e8d9a0;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: 36px;
  font-weight: bold;
  line-height: 1.2;
  color: white;
  margin-bottom: 12px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero h1 em {
  font-style: italic;
  color: #e8d9a0;
}

.hero-tagline {
  font-size: 14px;
  font-family: Arial, sans-serif;
  color: #b8c8e0;
  margin-bottom: 28px;
  letter-spacing: 0.5px;
}

.hero-tagline span {
  margin: 0 6px;
  color: #6080a0;
}

.hero-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--gold-light);
  color: var(--navy-dark);
  font-size: 13px;
  font-family: Arial, sans-serif;
  font-weight: bold;
  padding: 10px 22px;
  border-radius: 3px;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary:hover {
  background: #e8b020;
  color: var(--navy-dark);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: white;
  font-size: 13px;
  font-family: Arial, sans-serif;
  padding: 10px 22px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  cursor: pointer;
  text-decoration: none;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  text-decoration: none;
}

/* ── STATS STRIP ── */
.stats-strip {
  background: var(--gold-bg);
  border-bottom: 1px solid var(--border);
  padding: 20px 24px;
}

.stats-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
  padding: 8px 36px;
  border-right: 1px solid var(--border);
}

.stat-item:last-child {
  border-right: none;
}

.stat-num {
  font-size: 22px;
  font-weight: bold;
  color: var(--navy);
  font-family: Georgia, serif;
  display: block;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: Arial, sans-serif;
}

/* ── MAIN CONTENT LAYOUT ── */
.content-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}

.content-wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px;
}

/* ── SECTION HEADERS ── */
.section-head {
  font-size: 11px;
  font-family: Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold);
  margin-bottom: 8px;
  display: block;
}

h2.block-title {
  font-size: 24px;
  color: var(--navy-dark);
  font-family: Georgia, serif;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

h3.sub-title {
  font-size: 17px;
  color: var(--navy);
  font-family: Georgia, serif;
  margin: 24px 0 10px;
}

/* ── ARTICLE CARDS ── */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.article-card {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.article-card:last-child {
  border-bottom: none;
}

.article-type {
  font-size: 11px;
  font-family: Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold);
  margin-bottom: 5px;
}

.article-title {
  font-size: 16px;
  color: var(--navy);
  font-family: Georgia, serif;
  line-height: 1.4;
  margin-bottom: 6px;
  cursor: pointer;
}

.article-title:hover {
  color: var(--gold);
}

.article-meta {
  font-size: 13px;
  font-family: Arial, sans-serif;
  color: var(--text-muted);
}

.article-meta strong {
  color: var(--text-main);
}

/* ── SIDEBAR ── */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-box {
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.sidebar-box-head {
  background: var(--navy);
  color: white;
  font-size: 12px;
  font-family: Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 10px 16px;
}

.sidebar-box-body {
  padding: 16px;
  background: var(--white);
}

.sidebar-box-body p {
  font-size: 14px;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  margin-bottom: 10px;
  color: var(--text-main);
}

.deadline-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.deadline-item:last-child {
  border-bottom: none;
}

.deadline-event {
  font-size: 13px;
  font-family: Arial, sans-serif;
  color: var(--text-main);
  flex: 1;
}

.deadline-date {
  font-size: 12px;
  font-family: Arial, sans-serif;
  color: var(--accent-red);
  font-weight: bold;
  white-space: nowrap;
}

/* ── TABLES ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-family: Arial, sans-serif;
  margin: 16px 0;
}

.data-table th {
  background: var(--navy);
  color: white;
  padding: 10px 14px;
  text-align: left;
  font-weight: normal;
  font-size: 13px;
  letter-spacing: 0.3px;
}

.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--text-main);
}

.data-table tr:nth-child(even) td {
  background: var(--off-white);
}

.data-table tr:hover td {
  background: var(--gold-bg);
}

/* ── INFO PROSE ── */
.prose {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-main);
}

.prose p {
  margin-bottom: 16px;
}

.prose ul {
  padding-left: 20px;
  margin-bottom: 16px;
}

.prose ul li {
  margin-bottom: 6px;
}

.prose strong {
  color: var(--navy-dark);
}

/* ── GRID CARDS ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.info-card {
  border: 1px solid var(--border);
  padding: 18px;
  border-radius: 2px;
  background: var(--off-white);
}

.info-card-label {
  font-size: 11px;
  font-family: Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.info-card-val {
  font-size: 15px;
  font-family: Georgia, serif;
  color: var(--navy-dark);
  font-weight: bold;
}

/* ── CALL FOR PAPERS BLOCK ── */
.cfp-block {
  background: var(--navy);
  color: white;
  padding: 32px 36px;
  border-radius: 2px;
  margin: 24px 0;
  border-left: 5px solid var(--gold-light);
}

.cfp-block h3 {
  font-size: 20px;
  color: #e8d9a0;
  margin-bottom: 8px;
}

.cfp-block p {
  font-size: 14px;
  font-family: Arial, sans-serif;
  color: #c8d8e8;
  line-height: 1.7;
  margin-bottom: 16px;
}

.cfp-block .btn-primary {
  margin-right: 8px;
}

/* ── BOARD TABLE ── */
.board-section {
  margin-bottom: 32px;
}

.board-role-tag {
  display: inline-block;
  font-size: 11px;
  font-family: Arial, sans-serif;
  background: var(--navy);
  color: #e8d9a0;
  padding: 2px 10px;
  border-radius: 2px;
  margin-bottom: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ── PROCESS STEPS ── */
.process-list {
  list-style: none;
  padding: 0;
  counter-reset: step;
}

.process-list li {
  counter-increment: step;
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.process-list li::before {
  content: counter(step);
  min-width: 32px;
  height: 32px;
  background: var(--navy);
  color: #e8d9a0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-family: Arial, sans-serif;
  font-weight: bold;
  flex-shrink: 0;
}

.process-list li strong {
  color: var(--navy-dark);
  display: block;
  margin-bottom: 3px;
}

.process-list li p {
  font-size: 14px;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

/* ── FAQ ── */
.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-q {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 16px 0;
  font-size: 15px;
  font-family: Georgia, serif;
  color: var(--navy-dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.faq-q:hover {
  color: var(--gold);
}

.faq-q .faq-icon {
  font-size: 18px;
  color: var(--navy);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.faq-a {
  display: none;
  padding: 0 0 16px;
  font-size: 14px;
  font-family: Arial, sans-serif;
  line-height: 1.7;
  color: var(--text-muted);
}

.faq-a.open {
  display: block;
}

.faq-q.open .faq-icon {
  transform: rotate(45deg);
}

/* ── POLICY CARD ── */
.policy-block {
  border-left: 3px solid var(--navy);
  padding: 16px 20px;
  margin-bottom: 20px;
  background: var(--off-white);
}

.policy-block h3 {
  font-size: 15px;
  color: var(--navy-dark);
  margin-bottom: 8px;
}

.policy-block p {
  font-size: 14px;
  font-family: Arial, sans-serif;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0;
}

/* ── DECLARATION BOX ── */
.declaration-box {
  border: 1px solid var(--border);
  background: var(--gold-bg);
  padding: 20px 24px;
  margin: 20px 0;
  border-radius: 2px;
  font-size: 14px;
  font-style: italic;
  font-family: Georgia, serif;
  line-height: 1.8;
  color: var(--text-main);
}

/* ── INDEXING BADGES ── */
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.badge {
  font-size: 12px;
  font-family: Arial, sans-serif;
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text-muted);
  background: var(--off-white);
}

/* ── ARCHIVE LIST ── */
.archive-list {
  list-style: none;
  padding: 0;
}

.archive-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-family: Arial, sans-serif;
  font-size: 14px;
}

.archive-list li:nth-child(odd) {
  background: var(--off-white);
}

.archive-vol {
  font-weight: bold;
  color: var(--navy);
}

.archive-year {
  color: var(--text-muted);
}

.archive-status {
  font-size: 11px;
  background: var(--navy);
  color: #e8d9a0;
  padding: 2px 8px;
  border-radius: 2px;
  letter-spacing: 0.5px;
}

/* ── CONTACT ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.contact-card {
  border: 1px solid var(--border);
  padding: 24px;
  border-radius: 2px;
}

.contact-card h3 {
  font-size: 16px;
  color: var(--navy-dark);
  margin-bottom: 16px;
}

.contact-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-family: Arial, sans-serif;
}

.contact-row:last-child {
  border-bottom: none;
}

.contact-row-label {
  color: var(--text-muted);
  min-width: 70px;
  flex-shrink: 0;
}

.contact-row-val {
  color: var(--text-main);
}

/* ── FOOTER ── */
footer {
  background: var(--navy-dark);
  color: #a0b0c8;
  padding: 40px 24px 20px;
  margin-top: 60px;
  font-family: Arial, sans-serif;
  font-size: 13px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid #2a3e5a;
  margin-bottom: 20px;
}

footer h4 {
  color: #e8d9a0;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 14px;
  font-weight: bold;
}

footer ul {
  list-style: none;
  padding: 0;
}

footer ul li {
  margin-bottom: 8px;
}

footer ul a {
  color: #8898aa;
  font-size: 13px;
}

footer ul a:hover {
  color: #e8d9a0;
  text-decoration: none;
}

.footer-about {
  color: #8898aa;
  line-height: 1.7;
  margin-bottom: 12px;
}

.footer-issn {
  font-size: 12px;
  color: #6070a0;
}

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #566070;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-copyright strong {
  color: #7080a0;
}

/* ── PAGE HEADER ── */
.page-head {
  background: var(--off-white);
  border-bottom: 1px solid var(--border);
  padding: 28px 24px;
}

.page-head-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.breadcrumb {
  font-size: 12px;
  font-family: Arial, sans-serif;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.breadcrumb a {
  color: var(--navy);
}

.page-head h1 {
  font-size: 26px;
  color: var(--navy-dark);
  font-family: Georgia, serif;
}

@media (max-width: 768px) {
  .content-wrap {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .stats-inner {
    justify-content: flex-start;
  }

  .stat-item {
    border-right: none;
    border-bottom: 1px solid var(--border);
    width: 50%;
  }

  .hero h1 {
    font-size: 26px;
  }
}

/* ══════════════════════════════════════════════════════════
     AUTHOR PORTAL  —  design tokens extend the journal palette
     ══════════════════════════════════════════════════════════ */
:root {
  --canvas: #f4f2ed;
  --sidebar: #0f1e3d;
  --sidebar-hover: #1c3161;
  --sidebar-text: #b9c6de;
  --shadow-sm: 0 1px 2px rgba(15, 30, 61, 0.06);
  --shadow-md: 0 2px 10px rgba(15, 30, 61, 0.10);
  --ok: #15803d;
  --warn: #b45309;
  --info: #1d4ed8;
}

/* Screens: site / auth / portal are mutually exclusive */
#auth-screen,
#portal {
  display: none;
}

body.auth-mode #site,
body.portal-mode #site {
  display: none;
}

body.auth-mode #auth-screen {
  display: block;
}

body.portal-mode #portal {
  display: block;
}

body.portal-mode {
  background: var(--canvas);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 2px;
}

/* ── header author button on the public site ── */
.author-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--navy);
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 12.5px;
  font-weight: bold;
  padding: 9px 16px;
  border-radius: 3px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.author-cta:hover {
  background: var(--navy-light);
  color: #fff;
  text-decoration: none;
}

.author-cta.ghost {
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--border);
}

.author-cta.ghost:hover {
  background: var(--gold-bg);
  color: var(--navy);
}

/* ══════════ AUTH SCREENS ══════════ */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}

.auth-aside {
  background: var(--navy);
  color: #fff;
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 4px solid var(--gold);
}

.auth-aside .logo-badge {
  width: 52px;
  height: 52px;
  background: rgba(255, 255, 255, 0.12);
}

.auth-aside h2 {
  font-family: Georgia, serif;
  font-size: 30px;
  line-height: 1.25;
  margin: 32px 0 14px;
}

.auth-aside p {
  font-family: Arial, sans-serif;
  font-size: 14.5px;
  color: #b8c8e0;
  line-height: 1.75;
  max-width: 46ch;
}

.auth-facts {
  margin-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 20px;
}

.auth-facts div {
  font-family: Arial, sans-serif;
  font-size: 13px;
  color: #cddaf0;
  padding: 7px 0;
  display: flex;
  gap: 10px;
}

.auth-facts span {
  color: var(--gold-light);
}

.auth-foot {
  font-family: Arial, sans-serif;
  font-size: 12px;
  color: #8fa3c4;
  margin-top: 40px;
}

.auth-panel {
  padding: 48px 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  overflow-y: auto;
}

.auth-card {
  width: 100%;
  max-width: 430px;
}

.auth-card h1 {
  font-family: Georgia, serif;
  font-size: 27px;
  color: var(--navy-dark);
  margin-bottom: 6px;
}

.auth-card .lede {
  font-family: Arial, sans-serif;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 26px;
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.auth-alt {
  font-family: Arial, sans-serif;
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 22px;
  text-align: center;
}

.oauth-row {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 3px;
  font-family: Arial, sans-serif;
  font-size: 13.5px;
  color: var(--text-main);
  cursor: pointer;
}

.oauth-btn:hover {
  background: var(--off-white);
  border-color: var(--navy-light);
}

.oauth-btn b {
  color: var(--navy);
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  font-family: Arial, sans-serif;
  font-size: 12px;
  color: var(--text-light);
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  background: var(--border);
  flex: 1;
}

/* ══════════ FORM PRIMITIVES ══════════ */
.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-family: Arial, sans-serif;
  font-size: 12.5px;
  font-weight: bold;
  color: var(--navy-dark);
  margin-bottom: 6px;
}

.field label .req {
  color: var(--accent-red);
}

.field .hint {
  font-family: Arial, sans-serif;
  font-size: 12px;
  color: var(--text-light);
  margin-top: 5px;
  line-height: 1.5;
}

.field .err {
  font-family: Arial, sans-serif;
  font-size: 12px;
  color: var(--accent-red);
  margin-top: 5px;
  display: none;
}

.field.invalid .err {
  display: block;
}

.field.invalid input,
.field.invalid select,
.field.invalid textarea {
  border-color: var(--accent-red);
  background: #fdf6f6;
}

input[type=text],
input[type=email],
input[type=password],
input[type=url],
input[type=date],
input[type=number],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-family: Arial, sans-serif;
  font-size: 14px;
  color: var(--text-main);
  background: #fff;
}

textarea {
  line-height: 1.65;
  resize: vertical;
  min-height: 110px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--navy-light);
  outline: none;
  box-shadow: 0 0 0 3px rgba(42, 64, 128, 0.10);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-family: Arial, sans-serif;
  font-size: 13.5px;
  color: var(--text-main);
  line-height: 1.6;
  margin-bottom: 10px;
}

.check input {
  margin-top: 3px;
  flex-shrink: 0;
}

.btn {
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: bold;
  padding: 10px 20px;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.btn-navy {
  background: var(--navy);
  color: #fff;
}

.btn-navy:hover {
  background: var(--navy-light);
}

.btn-gold {
  background: var(--gold-light);
  color: var(--navy-dark);
}

.btn-gold:hover {
  background: #e8b020;
}

.btn-ghost {
  background: #fff;
  color: var(--navy);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: var(--off-white);
}

.btn-danger {
  background: #fff;
  color: var(--accent-red);
  border-color: #e3c4c4;
}

.btn-danger:hover {
  background: #fdf6f6;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-sm {
  font-size: 12px;
  padding: 7px 13px;
}

/* ══════════ PORTAL SHELL ══════════ */
.shell {
  display: grid;
  grid-template-columns: 258px 1fr;
  min-height: 100vh;
}

.side {
  background: var(--sidebar);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.side-brand {
  padding: 20px 20px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  display: flex;
  gap: 13px;
  align-items: center;
}

.side-brand .mark {
  width: 42px;
  height: 42px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: Georgia, serif;
  font-weight: bold;
  font-size: 15px;
  color: #e8d9a0;
  letter-spacing: 0.5px;
}

.side-brand .t1 {
  font-family: Georgia, serif;
  font-size: 16.5px;
  font-weight: bold;
  color: #fff;
  line-height: 1.2;
}

.side-brand .t2 {
  font-family: Arial, sans-serif;
  font-size: 11.5px;
  color: #8fa3c4;
  margin-top: 2px;
}

.side-nav {
  padding: 10px 10px 20px;
  flex: 1;
}

.side-group {
  font-family: Arial, sans-serif;
  font-size: 10.5px;
  color: #6e82a6;
  letter-spacing: 0.8px;
  padding: 16px 12px 7px;
}

.side-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 4px;
  font-family: Arial, sans-serif;
  font-size: 13.5px;
  color: var(--sidebar-text);
  cursor: pointer;
  border-left: 3px solid transparent;
  margin-bottom: 1px;
}

.side-link:hover {
  background: var(--sidebar-hover);
  color: #fff;
  text-decoration: none;
}

.side-link.active {
  background: var(--sidebar-hover);
  color: #fff;
  border-left-color: var(--gold-light);
  font-weight: bold;
}

.side-link svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
}

.side-link .count {
  margin-left: auto;
  background: var(--gold);
  color: var(--navy-dark);
  font-size: 11px;
  font-weight: bold;
  min-width: 20px;
  text-align: center;
  padding: 1px 6px;
  border-radius: 10px;
}

.side-link .count.quiet {
  background: rgba(255, 255, 255, 0.14);
  color: #dbe4f3;
}

.side-foot {
  padding: 14px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  font-family: Arial, sans-serif;
  font-size: 11.5px;
  color: #7f93b6;
}

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0 26px;
  display: flex;
  align-items: center;
  gap: 18px;
  height: 62px;
  position: sticky;
  top: 0;
  z-index: 40;
}

.crumb {
  font-family: Arial, sans-serif;
  font-size: 13px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.crumb b {
  color: var(--navy-dark);
}

.topsearch {
  flex: 1;
  max-width: 380px;
  position: relative;
  margin-left: auto;
}

.topsearch input {
  padding-left: 34px;
  font-size: 13px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.topsearch svg {
  position: absolute;
  left: 11px;
  top: 9px;
  width: 15px;
  height: 15px;
  stroke: var(--text-light);
  fill: none;
  stroke-width: 1.8;
}

.icon-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 7px;
  border-radius: 4px;
  color: var(--text-muted);
}

.icon-btn:hover {
  background: var(--off-white);
  color: var(--navy);
}

.icon-btn svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  display: block;
}

.dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-red);
  border: 2px solid #fff;
}

.who {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding-left: 14px;
  border-left: 1px solid var(--border);
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--navy);
  color: #e8d9a0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Georgia, serif;
  font-size: 13px;
  font-weight: bold;
  flex-shrink: 0;
}

.who .nm {
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: bold;
  color: var(--navy-dark);
  line-height: 1.3;
}

.who .rl {
  font-family: Arial, sans-serif;
  font-size: 11.5px;
  color: var(--text-light);
}

.view-wrap {
  padding: 26px;
  max-width: 1180px;
  width: 100%;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.view-head {
  margin-bottom: 22px;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
}

.view-head h1 {
  font-family: Georgia, serif;
  font-size: 25px;
  color: var(--navy-dark);
  line-height: 1.25;
}

.view-head p {
  font-family: Arial, sans-serif;
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 5px;
  max-width: 72ch;
  line-height: 1.65;
}

.view-head .spacer {
  margin-left: auto;
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

/* ══════════ CARDS / PANELS ══════════ */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: var(--shadow-sm);
}

.card-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-head h3 {
  font-family: Georgia, serif;
  font-size: 16px;
  color: var(--navy-dark);
}

.card-head .more {
  margin-left: auto;
  font-family: Arial, sans-serif;
  font-size: 12.5px;
  color: var(--navy);
  cursor: pointer;
}

.card-body {
  padding: 18px;
}

.card-body.tight {
  padding: 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: start;
}

.grid-main {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 18px;
  align-items: start;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 14px 15px;
  cursor: pointer;
  border-top: 3px solid var(--navy);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
}

.stat-card .n {
  font-family: Georgia, serif;
  font-size: 27px;
  font-weight: bold;
  color: var(--navy-dark);
  line-height: 1;
}

.stat-card .l {
  font-family: Arial, sans-serif;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 7px;
  line-height: 1.35;
}

.stat-card.s-review {
  border-top-color: var(--gold);
}

.stat-card.s-rev {
  border-top-color: var(--warn);
}

.stat-card.s-acc {
  border-top-color: var(--ok);
}

.stat-card.s-pub {
  border-top-color: #14532d;
}

.stat-card.s-draft {
  border-top-color: #6b7280;
}

/* welcome strip — the one bold element */
.welcome {
  background: var(--navy);
  color: #fff;
  border-radius: 4px;
  padding: 24px 26px;
  margin-bottom: 20px;
  border-left: 5px solid var(--gold-light);
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}

.welcome h2 {
  font-family: Georgia, serif;
  font-size: 22px;
  line-height: 1.3;
}

.welcome p {
  font-family: Arial, sans-serif;
  font-size: 13.5px;
  color: #b8c8e0;
  margin-top: 6px;
  line-height: 1.6;
  max-width: 62ch;
}

.welcome .acts {
  margin-left: auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ══════════ STATUS BADGES ══════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: Arial, sans-serif;
  font-size: 11.5px;
  font-weight: bold;
  padding: 3px 9px;
  border-radius: 2px;
  border: 1px solid;
  white-space: nowrap;
  line-height: 1.7;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.b-draft {
  color: #57534e;
  background: #f5f5f4;
  border-color: #e0dedb;
}

.b-submitted {
  color: #1a2e5a;
  background: #eef1f8;
  border-color: #ccd6ea;
}

.b-under_review {
  color: #8a6508;
  background: var(--gold-bg);
  border-color: #ecd9a8;
}

.b-revision_required {
  color: #b45309;
  background: #fdf4e7;
  border-color: #f0dcbb;
}

.b-accepted {
  color: #15803d;
  background: #edf7f0;
  border-color: #c3e3cf;
}

.b-in_production {
  color: #5b3fa0;
  background: #f3f0fb;
  border-color: #d9d0f0;
}

.b-published {
  color: #14532d;
  background: #e8f3ec;
  border-color: #b9d9c5;
}

.b-rejected {
  color: #8b1a1a;
  background: #fbf0f0;
  border-color: #e8c9c9;
}

.b-withdrawn {
  color: #57534e;
  background: #f5f5f4;
  border-color: #e0dedb;
}

.badge.plain::before {
  display: none;
}

/* ══════════ TABLES ══════════ */
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-family: Arial, sans-serif;
  font-size: 13.5px;
}

.tbl th {
  text-align: left;
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: bold;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--off-white);
  white-space: nowrap;
}

.tbl td {
  padding: 13px 16px;
  border-bottom: 1px solid #eeece6;
  vertical-align: top;
  color: var(--text-main);
}

.tbl tr:last-child td {
  border-bottom: none;
}

.tbl tbody tr:hover {
  background: #fbfaf7;
}

.tbl .ttl {
  font-family: Georgia, serif;
  font-size: 14.5px;
  color: var(--navy-dark);
  font-weight: bold;
  cursor: pointer;
  line-height: 1.4;
  display: block;
}

.tbl .ttl:hover {
  color: var(--gold);
}

.tbl .meta {
  font-size: 11.5px;
  color: var(--text-light);
  margin-top: 4px;
}

.mono {
  font-family: 'Courier New', monospace;
  font-size: 12.5px;
  color: var(--navy);
}

.filters {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  background: #fff;
}

.filters input,
.filters select {
  width: auto;
  font-size: 13px;
  padding: 7px 10px;
}

.filters .grow {
  flex: 1;
  min-width: 200px;
}

.filters .res {
  margin-left: auto;
  font-family: Arial, sans-serif;
  font-size: 12px;
  color: var(--text-light);
}

.empty {
  padding: 46px 26px;
  text-align: center;
}

.empty h4 {
  font-family: Georgia, serif;
  font-size: 17px;
  color: var(--navy-dark);
  margin-bottom: 7px;
}

.empty p {
  font-family: Arial, sans-serif;
  font-size: 13.5px;
  color: var(--text-muted);
  max-width: 46ch;
  margin: 0 auto 16px;
  line-height: 1.65;
}

/* ══════════ STATUS RAIL (signature element) ══════════ */
.rail {
  display: flex;
  padding: 4px 0 0;
  overflow-x: auto;
}

.rail-step {
  flex: 1;
  min-width: 96px;
  position: relative;
  padding: 22px 6px 0;
  text-align: center;
}

.rail-step::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 0;
  right: 0;
  height: 2px;
  background: #e6e2d8;
}

.rail-step:first-child::before {
  left: 50%;
}

.rail-step:last-child::before {
  right: 50%;
}

.rail-step::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 50%;
  margin-left: -6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #d6d1c4;
}

.rail-step.done::before {
  background: var(--gold);
}

.rail-step.done::after {
  background: var(--gold);
  border-color: var(--gold);
}

.rail-step.now::after {
  background: var(--navy);
  border-color: var(--navy);
  box-shadow: 0 0 0 4px rgba(26, 46, 90, 0.14);
}

.rail-step.now::before {
  background: linear-gradient(to right, var(--gold) 50%, #e6e2d8 50%);
}

.rail-step.dead::after {
  background: var(--accent-red);
  border-color: var(--accent-red);
}

.rail-step .rl {
  font-family: Arial, sans-serif;
  font-size: 11.5px;
  color: var(--text-light);
  line-height: 1.35;
}

.rail-step.done .rl,
.rail-step.now .rl {
  color: var(--navy-dark);
  font-weight: bold;
}

.rail-step .rd {
  font-family: Arial, sans-serif;
  font-size: 10.5px;
  color: var(--text-light);
  margin-top: 3px;
}

/* ══════════ TIMELINE ══════════ */
.tl {
  list-style: none;
  padding: 2px 0 0;
}

.tl li {
  position: relative;
  padding: 0 0 18px 22px;
  border-left: 2px solid #eeece6;
}

.tl li:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.tl li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--gold);
}

.tl li.q::before {
  border-color: #d6d1c4;
}

.tl .tt {
  font-family: Arial, sans-serif;
  font-size: 13.5px;
  color: var(--text-main);
  line-height: 1.55;
}

.tl .tt b {
  color: var(--navy-dark);
}

.tl .td {
  font-family: Arial, sans-serif;
  font-size: 11.5px;
  color: var(--text-light);
  margin-top: 3px;
}

/* ══════════ TASK / ACTIVITY LISTS ══════════ */
.task {
  display: flex;
  gap: 13px;
  padding: 13px 18px;
  border-bottom: 1px solid #eeece6;
  align-items: flex-start;
}

.task:last-child {
  border-bottom: none;
}

.task .pin {
  width: 4px;
  align-self: stretch;
  border-radius: 2px;
  background: var(--gold);
  flex-shrink: 0;
}

.task .pin.hot {
  background: var(--accent-red);
}

.task .pin.cool {
  background: var(--navy-light);
}

.task .t1 {
  font-family: Arial, sans-serif;
  font-size: 13.5px;
  color: var(--text-main);
  line-height: 1.5;
}

.task .t1 b {
  color: var(--navy-dark);
}

.task .t2 {
  font-family: Arial, sans-serif;
  font-size: 11.5px;
  color: var(--text-light);
  margin-top: 4px;
}

.task .t2 .due {
  color: var(--accent-red);
  font-weight: bold;
}

.task .act {
  margin-left: auto;
  flex-shrink: 0;
}

/* ══════════ STEPPER (submission) ══════════ */
.steps {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  margin-bottom: 20px;
}

.step {
  flex: 1;
  padding: 13px 14px;
  border-right: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  gap: 11px;
  align-items: center;
  min-width: 0;
}

.step:last-child {
  border-right: none;
}

.step .sn {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--off-white);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step .sl {
  font-family: Arial, sans-serif;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.3;
}

.step.active {
  background: var(--gold-bg);
}

.step.active .sn {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.step.active .sl {
  color: var(--navy-dark);
  font-weight: bold;
}

.step.ok .sn {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
}

.step.ok .sl {
  color: var(--text-main);
}

.pane {
  display: none;
}

.pane.active {
  display: block;
}

.form-nav {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 16px 18px;
  border-top: 1px solid var(--border);
  background: var(--off-white);
}

.form-nav .right {
  margin-left: auto;
  display: flex;
  gap: 10px;
}

.autosave {
  font-family: Arial, sans-serif;
  font-size: 12px;
  color: var(--text-light);
}

.autosave.on {
  color: var(--ok);
}

/* ══════════ FILE UPLOAD ══════════ */
.drop {
  border: 2px dashed var(--border);
  border-radius: 4px;
  padding: 26px;
  text-align: center;
  background: var(--off-white);
  cursor: pointer;
}

.drop:hover,
.drop.over {
  border-color: var(--navy-light);
  background: var(--gold-bg);
}

.drop .d1 {
  font-family: Arial, sans-serif;
  font-size: 13.5px;
  color: var(--navy-dark);
  font-weight: bold;
}

.drop .d2 {
  font-family: Arial, sans-serif;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 5px;
  line-height: 1.6;
}

.flist {
  margin-top: 12px;
}

.frow {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 3px;
  margin-bottom: 8px;
  background: #fff;
}

.frow .fi {
  width: 30px;
  height: 34px;
  background: var(--navy);
  color: #fff;
  border-radius: 2px;
  font-family: Arial, sans-serif;
  font-size: 9px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.frow .fn {
  font-family: Arial, sans-serif;
  font-size: 13px;
  color: var(--navy-dark);
  font-weight: bold;
  word-break: break-all;
}

.frow .fm {
  font-family: Arial, sans-serif;
  font-size: 11.5px;
  color: var(--text-light);
  margin-top: 2px;
}

.frow .fx {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* ══════════ MISC ══════════ */
.kv {
  font-family: Arial, sans-serif;
  font-size: 13.5px;
}

.kv dt {
  font-size: 11.5px;
  color: var(--text-light);
  margin-bottom: 3px;
}

.kv dd {
  color: var(--text-main);
  margin-bottom: 14px;
  line-height: 1.55;
}

.kv dd:last-child {
  margin-bottom: 0;
}

.chips {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.chip {
  font-family: Arial, sans-serif;
  font-size: 12px;
  background: var(--gold-bg);
  border: 1px solid #ecd9a8;
  color: #7a5c0a;
  padding: 3px 10px;
  border-radius: 12px;
}

.chip.grey {
  background: var(--off-white);
  border-color: var(--border);
  color: var(--text-muted);
}

.note {
  font-family: Arial, sans-serif;
  font-size: 13px;
  line-height: 1.65;
  padding: 13px 15px;
  border-radius: 3px;
  border-left: 3px solid;
  margin-bottom: 16px;
}

.note.info {
  background: #eef1f8;
  border-color: var(--navy);
  color: #23324f;
}

.note.warn {
  background: #fdf4e7;
  border-color: var(--warn);
  color: #6d3b0a;
}

.note.ok {
  background: #edf7f0;
  border-color: var(--ok);
  color: #14532d;
}

.note.bad {
  background: #fbf0f0;
  border-color: var(--accent-red);
  color: #6b1414;
}

.note b {
  display: block;
  margin-bottom: 3px;
}

.quote {
  font-family: Georgia, serif;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--text-main);
  background: var(--off-white);
  border-left: 3px solid var(--gold);
  padding: 14px 17px;
  border-radius: 0 3px 3px 0;
}

.quote cite {
  display: block;
  font-family: Arial, sans-serif;
  font-size: 11.5px;
  color: var(--text-light);
  font-style: normal;
  margin-top: 9px;
}

.n-item {
  display: flex;
  gap: 13px;
  padding: 14px 18px;
  border-bottom: 1px solid #eeece6;
  cursor: pointer;
}

.n-item:hover {
  background: #fbfaf7;
}

.n-item.unread {
  background: var(--gold-bg);
}

.n-item.unread:hover {
  background: #f9f1e0;
}

.n-item .nd {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  margin-top: 6px;
  flex-shrink: 0;
}

.n-item.read .nd {
  background: #ddd8cc;
}

.n-item .n1 {
  font-family: Arial, sans-serif;
  font-size: 13.5px;
  color: var(--navy-dark);
  font-weight: bold;
  line-height: 1.45;
}

.n-item .n2 {
  font-family: Arial, sans-serif;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.55;
}

.n-item .n3 {
  font-family: Arial, sans-serif;
  font-size: 11.5px;
  color: var(--text-light);
  margin-top: 5px;
}

.thread {
  display: grid;
  grid-template-columns: 270px 1fr;
  min-height: 460px;
}

.thread-list {
  border-right: 1px solid var(--border);
  overflow-y: auto;
  max-height: 560px;
}

.thread-item {
  padding: 13px 15px;
  border-bottom: 1px solid #eeece6;
  cursor: pointer;
}

.thread-item:hover {
  background: #fbfaf7;
}

.thread-item.active {
  background: var(--gold-bg);
  border-left: 3px solid var(--gold);
}

.thread-item .h1 {
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: bold;
  color: var(--navy-dark);
  line-height: 1.4;
}

.thread-item .h2 {
  font-family: Arial, sans-serif;
  font-size: 11.5px;
  color: var(--text-light);
  margin-top: 4px;
}

.msgs {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 420px;
  overflow-y: auto;
}

.msg {
  max-width: 78%;
}

.msg .bub {
  padding: 11px 14px;
  border-radius: 4px;
  font-family: Arial, sans-serif;
  font-size: 13.5px;
  line-height: 1.6;
}

.msg.them .bub {
  background: var(--off-white);
  border: 1px solid var(--border);
  color: var(--text-main);
}

.msg.me {
  align-self: flex-end;
}

.msg.me .bub {
  background: var(--navy);
  color: #fff;
}

.msg .mm {
  font-family: Arial, sans-serif;
  font-size: 11px;
  color: var(--text-light);
  margin-top: 5px;
}

.msg.me .mm {
  text-align: right;
}

.composer {
  border-top: 1px solid var(--border);
  padding: 13px 16px;
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.composer textarea {
  min-height: 44px;
  height: 44px;
  font-size: 13.5px;
}

/* ══════════ MODAL / DRAWER ══════════ */
.scrim {
  position: fixed;
  inset: 0;
  background: rgba(15, 30, 61, 0.45);
  z-index: 90;
  display: none;
}

.scrim.open {
  display: block;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 660px;
  max-width: 100%;
  background: #fff;
  z-index: 91;
  transform: translateX(100%);
  transition: transform 0.22s ease;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.drawer.open {
  transform: translateX(0);
}

.drawer-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 14px;
  align-items: flex-start;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}

.drawer-head h3 {
  font-family: Georgia, serif;
  font-size: 18px;
  color: var(--navy-dark);
  line-height: 1.35;
}

.drawer-head .dm {
  font-family: Arial, sans-serif;
  font-size: 12px;
  color: var(--text-light);
  margin-top: 5px;
}

.drawer-body {
  padding: 22px;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 560px;
  max-width: calc(100% - 32px);
  max-height: 88vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 5px;
  z-index: 92;
  display: none;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.modal.open {
  display: block;
}

.sec {
  margin-bottom: 24px;
}

.sec>h4 {
  font-family: Arial, sans-serif;
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: bold;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 13px;
  letter-spacing: 0.4px;
}

.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tab {
  padding: 9px 16px;
  font-family: Arial, sans-serif;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
}

.tab:hover {
  color: var(--navy);
}

.tab.active {
  color: var(--navy);
  border-bottom-color: var(--navy);
  font-weight: bold;
}

.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(140%);
  background: var(--navy-dark);
  color: #fff;
  padding: 13px 22px;
  border-radius: 4px;
  z-index: 120;
  font-family: Arial, sans-serif;
  font-size: 13.5px;
  transition: transform 0.25s ease;
  border-left: 4px solid var(--gold-light);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  max-width: 90vw;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.burger {
  display: none;
}
.logo{
    color:white;
}
a.logo:hover {
    color:white;
  text-decoration:none;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* ══════════ RESPONSIVE ══════════ */
@media (max-width: 1080px) {
  .stat-row {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-main,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .auth-wrap {
    grid-template-columns: 1fr;
  }

  .auth-aside {
    padding: 32px 26px;
  }

  .auth-aside h2 {
    font-size: 24px;
    margin-top: 20px;
  }

  .auth-panel {
    padding: 32px 22px;
  }

  .shell {
    grid-template-columns: 1fr;
  }

  .side {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 258px;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

  body.nav-open .side {
    transform: translateX(0);
  }

  .burger {
    display: inline-flex;
  }

  .topsearch {
    display: none;
  }

  .thread {
    grid-template-columns: 1fr;
  }

  .thread-list {
    max-height: 190px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .view-wrap {
    padding: 18px 15px;
  }
}

@media (max-width: 760px) {

  /* the top bar must not crowd out the breadcrumb on a phone —
       identity collapses to the avatar, signing out moves to the sidebar */
  .who .nm,
  .who .rl {
    display: none;
  }

  .who {
    padding-left: 10px;
  }

  .topbar {
    padding: 0 14px;
    gap: 10px;
  }

  .topbar>.btn-ghost {
    display: none;
  }

  .crumb {
    font-size: 12.5px;
  }
}

@media (max-width: 620px) {
  .stat-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .steps {
    flex-wrap: wrap;
  }

  .step {
    flex: 1 1 50%;
    border-bottom: 1px solid var(--border);
  }

  .step .sl {
    font-size: 11.5px;
  }

  .welcome {
    padding: 18px;
  }

  .welcome h2 {
    font-size: 18px;
  }

  .welcome .acts {
    margin-left: 0;
    width: 100%;
  }

  .tbl th:nth-child(3),
  .tbl td:nth-child(3) {
    display: none;
  }

  .drawer-body,
  .card-body {
    padding: 15px;
  }
}