/* IJMAHS Editorial Desk – admin panel styles (no build step needed) */
:root {
  --navy-950: #051731;
  --navy-900: #072b59;
  --navy-800: #0b3d7a;
  --navy-700: #1a5199;
  --navy-100: #e2ebf7;
  --navy-50: #f0f5fc;
  --green-700: #166a2f;
  --green-600: #1f8a3e;
  --green-100: #d6eedd;
  --green-50: #eaf6ee;
  --amber-700: #8f5b0a;
  --amber-600: #c47f12;
  --amber-100: #fbe7c2;
  --amber-50: #fdf5e6;
  --teal-700: #0c5f68;
  --teal-50: #e3f3f4;
  --violet-700: #5b3fa6;
  --violet-50: #f0ebfb;
  --red-700: #a52222;
  --red-50: #fdeeee;
  --ink: #13233d;
  --ink-2: #42506a;
  --ink-3: #6b7790;
  --line: #e3e9f2;
  --line-2: #cfd9e6;
  --bg: #f3f6fb;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(7 43 89 / 0.05), 0 4px 16px -6px rgb(7 43 89 / 0.08);
  --shadow-lg: 0 24px 60px -20px rgb(5 23 49 / 0.35);
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --sidebar: 268px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--navy-800); text-decoration: none; }
a:hover { color: var(--green-700); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--navy-700); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mono { font-family: var(--mono); letter-spacing: -0.01em; }
.muted { color: var(--ink-3); }
.nowrap { white-space: nowrap; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  background:
    radial-gradient(120% 60% at 0% 0%, rgb(31 138 62 / 0.18), transparent 60%),
    linear-gradient(180deg, var(--navy-900) 0%, var(--navy-950) 100%);
  color: #c9d6ea;
  padding: 20px 14px 16px;
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 18px; border-bottom: 1px solid rgb(255 255 255 / 0.08); }
.brand-logo { width: 52px; height: 52px; border-radius: 12px; background: #fff; padding: 5px; display: grid; place-items: center; box-shadow: 0 6px 18px -6px rgb(0 0 0 / 0.4); }
.brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.brand-name { font-weight: 800; color: #fff; font-size: 17px; letter-spacing: 0.02em; }
.brand-sub { font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: #8fd4a4; font-weight: 700; }

.nav-group { margin-top: 20px; }
.nav-label { padding: 0 12px 8px; font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: #7f93b3; font-weight: 700; }
.nav-link {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; margin: 2px 0; border-radius: 10px;
  color: #c9d6ea; font-weight: 600; font-size: 14px;
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: rgb(255 255 255 / 0.06); color: #fff; }
.nav-link.active { background: linear-gradient(90deg, rgb(31 138 62 / 0.95), rgb(31 138 62 / 0.75)); color: #fff; box-shadow: 0 8px 18px -10px rgb(31 138 62 / 0.9); }
.nav-link .count { margin-left: auto; font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: rgb(255 255 255 / 0.1); color: #e4ecf8; }
.nav-link .count.hot { background: #f2b544; color: #3d2a05; }
.nav-link.active .count { background: rgb(255 255 255 / 0.22); color: #fff; }

.sidebar-foot { margin-top: auto; padding-top: 16px; }
.user-card { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: rgb(255 255 255 / 0.06); }
.avatar { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; color: var(--navy-900); background: linear-gradient(135deg, #b8f0c9, #8fd0ff); flex: none; }
.user-card .name { color: #fff; font-weight: 700; font-size: 13.5px; line-height: 1.2; }
.user-card .email { font-size: 12px; color: #8ea2c2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.logout-btn { margin-left: auto; background: none; border: 0; color: #9fb2d0; cursor: pointer; padding: 6px; border-radius: 8px; }
.logout-btn:hover { color: #fff; background: rgb(255 255 255 / 0.08); }

.scrim { display: none; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  padding: 12px 32px; background: rgb(243 246 251 / 0.85);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.menu-btn { display: none; background: #fff; border: 1px solid var(--line-2); border-radius: 10px; padding: 7px; cursor: pointer; }
.top-search { position: relative; flex: 1; max-width: 520px; }
.top-search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); width: 17px; height: 17px; }
.top-search input { width: 100%; padding: 9px 14px 9px 38px; border-radius: 11px; border: 1px solid var(--line-2); background: #fff; }
.top-search input:focus { outline: none; border-color: var(--navy-700); box-shadow: 0 0 0 4px rgb(26 81 153 / 0.12); }
.top-date { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: 13px; font-weight: 600; }
.view-site { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; padding: 8px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line-2); color: var(--navy-800); }

.content { padding: 28px 32px 48px; width: 100%; max-width: 1440px; }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-3); margin-bottom: 6px; font-weight: 600; }
.crumbs .icon { width: 13px; height: 13px; }
.page-title { font-family: var(--display); font-weight: 500; font-size: 34px; letter-spacing: -0.01em; color: var(--navy-900); }
.page-sub { color: var(--ink-2); margin-top: 4px; }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-title { font-size: 15px; font-weight: 800; color: var(--navy-900); display: flex; align-items: center; gap: 9px; }
.card-title .icon { color: var(--green-600); }
.card-body { padding: 20px; }
.card + .card { margin-top: 20px; }
.stats > .card, .grid > .card { margin-top: 0; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat { position: relative; overflow: hidden; padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.stat::after { content: ""; position: absolute; right: -28px; top: -28px; width: 110px; height: 110px; border-radius: 50%; background: var(--tint, var(--navy-50)); }
.stat .stat-icon { position: absolute; right: 16px; top: 16px; z-index: 1; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: var(--tone, var(--navy-800)); background: #fff; box-shadow: 0 6px 16px -8px rgb(7 43 89 / 0.35); }
.stat .label { font-size: 12.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.08em; }
.stat .value { font-family: var(--display); font-size: 40px; line-height: 1.05; color: var(--navy-900); font-weight: 500; }
.stat .hint { font-size: 12.5px; color: var(--ink-2); }
.stat .hint b { color: var(--tone, var(--navy-800)); }
.stat.hero { background: linear-gradient(135deg, var(--navy-900), var(--navy-800) 60%, #14708a); border: 0; color: #fff; }
.stat.hero::after { background: rgb(255 255 255 / 0.08); }
.stat.hero .label { color: #a9c3e6; }
.stat.hero .value { color: #fff; }
.stat.hero .hint { color: #cfe0f5; }
.stat.hero .hint b { color: #9ff0b8; }
.stat.hero .stat-icon { background: rgb(255 255 255 / 0.14); color: #fff; box-shadow: none; }

/* bar chart */
.bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; align-items: end; height: 190px; padding-top: 10px; }
.bar-col { display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bar { width: 100%; max-width: 46px; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, var(--navy-700), var(--navy-900)); min-height: 4px; position: relative; }
.bar.current { background: linear-gradient(180deg, #34b05a, var(--green-700)); }
.bar-val { font-size: 12px; font-weight: 800; color: var(--navy-900); }
.bar-label { font-size: 12px; color: var(--ink-3); font-weight: 600; }

.hbar { display: grid; gap: 14px; }
.hbar-row .top { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.hbar-track { height: 8px; border-radius: 999px; background: var(--navy-50); overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--green-600), #4cc37a); }

.pipeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pipe { border-radius: 12px; padding: 12px 14px; background: var(--bg); border: 1px solid var(--line); }
.pipe .n { font-family: var(--display); font-size: 26px; color: var(--navy-900); line-height: 1.1; }
.pipe .t { font-size: 12px; color: var(--ink-2); font-weight: 600; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 700; font-size: 14px; cursor: pointer; line-height: 1.2;
  transition: background 0.15s, box-shadow 0.15s, transform 0.05s; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn .icon { width: 16px; height: 16px; }
.btn-primary { background: var(--green-600); color: #fff; box-shadow: 0 8px 18px -10px rgb(31 138 62 / 0.9); }
.btn-primary:hover { background: var(--green-700); color: #fff; }
.btn-navy { background: var(--navy-800); color: #fff; box-shadow: 0 8px 18px -10px rgb(11 61 122 / 0.9); }
.btn-navy:hover { background: var(--navy-900); color: #fff; }
.btn-amber { background: var(--amber-600); color: #fff; box-shadow: 0 8px 18px -10px rgb(196 127 18 / 0.9); }
.btn-amber:hover { background: var(--amber-700); color: #fff; }
.btn-ghost { background: #fff; color: var(--navy-800); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--navy-50); color: var(--navy-900); }
.btn-danger { background: #fff; color: var(--red-700); border-color: #f1c9c9; }
.btn-danger:hover { background: var(--red-50); color: var(--red-700); }
.btn-sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line-2); background: #fff; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--navy-50); color: var(--navy-900); }
.icon-btn .icon { width: 16px; height: 16px; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; line-height: 1.5; }
.badge .icon { width: 13px; height: 13px; }
.badge-new { background: var(--navy-50); color: var(--navy-800); box-shadow: inset 0 0 0 1px var(--navy-100); }
.badge-revised { background: var(--amber-50); color: var(--amber-700); box-shadow: inset 0 0 0 1px var(--amber-100); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }

.status { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 8px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.status .dot { width: 6px; height: 6px; }
.s-submitted { background: #e8f0fd; color: #1d4fa3; }
.s-under_review { background: var(--teal-50); color: var(--teal-700); }
.s-correction_requested { background: var(--amber-50); color: var(--amber-700); }
.s-revision_received { background: var(--violet-50); color: var(--violet-700); }
.s-accepted { background: var(--green-50); color: var(--green-700); }
.s-rejected { background: var(--red-50); color: var(--red-700); }

.sub-no { display: inline-flex; align-items: center; font-family: var(--mono); font-weight: 600; font-size: 12.5px; padding: 3px 9px; border-radius: 7px; background: var(--navy-50); color: var(--navy-900); border: 1px dashed #b9cbe5; white-space: nowrap; }
.sub-no.revised { background: var(--amber-50); border-color: #ecc98a; color: #6e4608; }

/* ---------- Tabs & filters ---------- */
.tabs { display: flex; gap: 4px; padding: 5px; background: #e8eef6; border-radius: 12px; width: fit-content; }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 9px; font-weight: 700; font-size: 13.5px; color: var(--ink-2); }
.tab:hover { color: var(--navy-900); }
.tab.active { background: #fff; color: var(--navy-900); box-shadow: 0 2px 8px -2px rgb(7 43 89 / 0.18); }
.tab .n { font-size: 11.5px; padding: 0 7px; border-radius: 999px; background: var(--line); color: var(--ink-2); }
.tab.active .n { background: var(--navy-800); color: #fff; }
.tab.t-revised.active .n { background: var(--amber-600); }

.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; }
.field + .field { margin-top: 14px; }
.label { font-size: 13px; font-weight: 700; color: var(--ink); }
.help { font-size: 12.5px; color: var(--ink-3); }
.input, .select, .textarea {
  width: 100%; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7790' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--navy-700); box-shadow: 0 0 0 4px rgb(26 81 153 / 0.12); }
.textarea { min-height: 130px; resize: vertical; line-height: 1.6; }
.filters .input, .filters .select { width: auto; min-width: 170px; padding-top: 8px; padding-bottom: 8px; }
.error { color: var(--red-700); font-size: 12.5px; font-weight: 600; }
.is-invalid { border-color: #e59a9a !important; }
.check { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 13.5px; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--green-600); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.tbl th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); font-weight: 800; padding: 11px 16px; background: #f8fafd; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background 0.12s; }
.tbl tbody tr:hover { background: #f8fbff; }
.tbl tr.row-revised td:first-child { box-shadow: inset 4px 0 0 var(--amber-600); }
.tbl tr.row-new td:first-child { box-shadow: inset 4px 0 0 var(--navy-700); }
.t-title { min-width: 260px; font-weight: 700; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 460px; }
.t-title:hover { color: var(--navy-800); }
.t-meta { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.t-meta .icon { width: 13px; height: 13px; }
.t-person { font-weight: 700; font-size: 13.5px; }
.t-email { font-size: 12.5px; color: var(--ink-3); word-break: break-all; }
.files-ind { display: inline-flex; gap: 6px; }
.files-ind span { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--ink-2); background: var(--bg); border: 1px solid var(--line); padding: 2px 7px; border-radius: 7px; }
.files-ind .icon { width: 13px; height: 13px; }

.empty { text-align: center; padding: 56px 20px; color: var(--ink-3); }
.empty .icon { width: 44px; height: 44px; color: #b6c4d8; margin: 0 auto 10px; stroke-width: 1.5; }
.empty h3 { color: var(--ink); font-size: 16px; margin-bottom: 4px; }

/* ---------- Alerts ---------- */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-radius: 12px; margin-bottom: 18px; font-weight: 600; border: 1px solid; }
.alert .icon { margin-top: 1px; }
.alert-success { background: var(--green-50); border-color: var(--green-100); color: var(--green-700); }
.alert-warning { background: var(--amber-50); border-color: var(--amber-100); color: var(--amber-700); }
.alert-error { background: var(--red-50); border-color: #f4cccc; color: var(--red-700); }

/* ---------- Submission detail ---------- */
.hero-panel {
  position: relative; overflow: hidden; border-radius: 18px; padding: 26px 28px; margin-bottom: 22px; color: #fff;
  background:
    linear-gradient(100deg, rgb(5 23 49 / 0.96) 0%, rgb(7 43 89 / 0.92) 55%, rgb(11 61 122 / 0.75) 100%),
    url("img/header_bg.webp") right center / cover no-repeat;
  box-shadow: var(--shadow-lg);
}
.hero-panel.revised { background:
    linear-gradient(100deg, rgb(43 26 3 / 0.95) 0%, rgb(92 56 6 / 0.9) 55%, rgb(150 92 12 / 0.72) 100%),
    url("img/header_bg.webp") right center / cover no-repeat; }
.hero-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.hero-panel .sub-no { background: rgb(255 255 255 / 0.12); color: #fff; border-color: rgb(255 255 255 / 0.35); font-size: 14px; padding: 5px 12px; }
.hero-panel h1 { font-family: var(--display); font-weight: 500; font-size: 30px; margin-top: 14px; max-width: 980px; letter-spacing: -0.005em; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px; color: #d4e1f3; font-size: 13.5px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta .icon { width: 15px; height: 15px; color: #9ff0b8; }
.hero-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 11px; border-radius: 999px; background: rgb(255 255 255 / 0.14); }
.hero-panel .status { background: #fff; }

.kv { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 0; }
.kv dt { padding: 11px 0; color: var(--ink-3); font-weight: 600; font-size: 13px; border-bottom: 1px solid var(--line); }
.kv dd { margin: 0; padding: 11px 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.kv > :nth-last-child(-n+2) { border-bottom: 0; }
.abstract { white-space: pre-line; line-height: 1.75; color: var(--ink-2); font-weight: 500; }
.keywords { display: flex; flex-wrap: wrap; gap: 6px; }
.keywords span { font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--green-50); color: var(--green-700); }

.authors { display: grid; gap: 10px; }
.author { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.author.corr { border-color: #a9dcb8; background: linear-gradient(90deg, var(--green-50), #fff 70%); }
.author .pos { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--navy-50); color: var(--navy-800); font-weight: 800; }
.author.corr .pos { background: var(--green-600); color: #fff; }
.author .nm { font-weight: 800; }
.author .aff { color: var(--ink-2); font-size: 13px; margin-top: 2px; }
.author .links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 5px; font-size: 12.5px; }
.author .links a, .author .links span { display: inline-flex; align-items: center; gap: 5px; }
.author .links .icon { width: 13px; height: 13px; }
.corr-tag { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--green-700); background: #fff; border: 1px solid #a9dcb8; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }

.doc-card { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: linear-gradient(135deg, #f7faff, #fff); }
.doc-icon { width: 46px; height: 54px; border-radius: 8px; background: #2b579a; color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 18px; position: relative; flex: none; box-shadow: 0 8px 16px -8px rgb(43 87 154 / 0.8); }
.doc-icon::after { content: ""; position: absolute; top: 0; right: 0; border-width: 0 12px 12px 0; border-style: solid; border-color: var(--bg) var(--bg) #1c3f75 #1c3f75; border-radius: 0 0 0 3px; }
.doc-name { font-weight: 700; word-break: break-all; }
.doc-meta { font-size: 12.5px; color: var(--ink-3); }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.thumb { position: relative; display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); aspect-ratio: 4 / 3; cursor: zoom-in; padding: 0; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.25s; }
.thumb:hover img { transform: scale(1.04); }
.thumb .cap { position: absolute; inset: auto 0 0 0; padding: 18px 9px 7px; font-size: 11.5px; font-weight: 700; color: #fff; background: linear-gradient(transparent, rgb(5 23 49 / 0.85)); text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb.file { display: grid; place-items: center; cursor: pointer; color: var(--ink-2); font-weight: 700; font-size: 12.5px; text-align: center; padding: 10px; }

.lightbox { position: fixed; inset: 0; z-index: 100; background: rgb(5 15 32 / 0.92); display: none; align-items: center; justify-content: center; padding: 60px 20px 30px; }
.lightbox.open { display: flex; }
.lightbox img { max-height: 100%; max-width: 100%; border-radius: 10px; box-shadow: 0 30px 80px rgb(0 0 0 / 0.5); background: #fff; }
.lb-bar { position: absolute; top: 14px; left: 20px; right: 20px; display: flex; align-items: center; justify-content: space-between; color: #fff; gap: 12px; }
.lb-bar .t { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-btn { background: rgb(255 255 255 / 0.12); color: #fff; border: 0; border-radius: 10px; padding: 8px; cursor: pointer; display: inline-grid; place-items: center; }
.lb-btn:hover { background: rgb(255 255 255 / 0.22); color: #fff; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { left: 18px; } .lb-next { right: 18px; }

.section-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); padding: 0 12px; overflow-x: auto; }
.section-tab { display: inline-flex; align-items: center; gap: 8px; padding: 14px 12px; font-weight: 700; color: var(--ink-3); border: 0; background: none; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.section-tab:hover { color: var(--navy-900); }
.section-tab.active { color: var(--navy-900); border-bottom-color: var(--green-600); }
.section-tab .n { font-size: 11px; padding: 0 7px; border-radius: 999px; background: var(--line); }
.panel[hidden] { display: none; }
.doc-frame { width: 100%; height: 78vh; min-height: 520px; border: 1px solid var(--line); border-radius: 12px; background: #eef2f8; }

.versions { display: grid; gap: 8px; }
.version { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); font-size: 13px; }
.version.current { border-color: var(--navy-700); background: var(--navy-50); }
.version .v { font-weight: 800; width: 34px; height: 26px; display: grid; place-items: center; border-radius: 7px; background: var(--navy-100); color: var(--navy-900); font-size: 12px; }
.version.rev .v { background: var(--amber-100); color: var(--amber-700); }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 15px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 18px 44px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot { position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--line-2); color: var(--ink-2); }
.tl-dot .icon { width: 15px; height: 15px; }
.tl-item.correction .tl-dot { border-color: var(--amber-600); color: var(--amber-700); background: var(--amber-50); }
.tl-item.submitted .tl-dot { border-color: var(--navy-700); color: var(--navy-800); background: var(--navy-50); }
.tl-item.email .tl-dot { border-color: var(--teal-700); color: var(--teal-700); background: var(--teal-50); }
.tl-item.status .tl-dot { border-color: var(--green-600); color: var(--green-700); background: var(--green-50); }
.tl-item.revision .tl-dot { border-color: var(--violet-700); color: var(--violet-700); background: var(--violet-50); }
.tl-head { font-weight: 700; font-size: 13.5px; }
.tl-time { font-size: 12px; color: var(--ink-3); }
.tl-msg { margin-top: 6px; padding: 10px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); white-space: pre-line; font-size: 13.5px; color: var(--ink-2); }
.tl-item.correction .tl-msg { background: var(--amber-50); border-color: var(--amber-100); color: #5c3d06; }
.mail-ok { color: var(--green-700); font-weight: 700; font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.mail-fail { color: var(--red-700); font-weight: 700; font-size: 12px; }
.mail-ok .icon { width: 13px; height: 13px; }

.action-card { position: sticky; top: 84px; }
.action-block + .action-block { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line-2); }
.action-title { font-weight: 800; font-size: 14px; display: flex; align-items: center; gap: 8px; margin-bottom: 4px; color: var(--navy-900); }
.action-title .icon { width: 17px; height: 17px; }
.action-block.correction .action-title .icon { color: var(--amber-600); }
.quick-msgs { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.quick-msgs button { font-size: 12px; font-weight: 700; border: 1px solid var(--line-2); background: #fff; border-radius: 999px; padding: 4px 10px; cursor: pointer; color: var(--ink-2); }
.quick-msgs button:hover { border-color: var(--amber-600); color: var(--amber-700); background: var(--amber-50); }
.status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.status-opt { position: relative; }
.status-opt input { position: absolute; opacity: 0; }
.status-opt label { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer; font-weight: 700; font-size: 13px; }
.status-opt input:checked + label { border-color: var(--navy-700); background: var(--navy-50); box-shadow: 0 0 0 3px rgb(26 81 153 / 0.12); }
.status-opt input:focus-visible + label { outline: 2px solid var(--navy-700); }

/* ---------- Article types ---------- */
.type-row .name { font-weight: 700; }
.type-row .desc { font-size: 12.5px; color: var(--ink-3); }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; border: 0; background: none; cursor: pointer; padding: 0; color: var(--ink-2); }
.switch .track { width: 36px; height: 20px; border-radius: 999px; background: #cbd5e3; position: relative; transition: background 0.15s; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 0.25); transition: left 0.15s; }
.switch.on .track { background: var(--green-600); }
.switch.on .track::after { left: 18px; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* ---------- Pagination ---------- */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); }
.pager-links { display: flex; gap: 4px; }
.pager-links a, .pager-links span { min-width: 34px; height: 34px; padding: 0 10px; display: inline-grid; place-items: center; border-radius: 9px; border: 1px solid var(--line-2); background: #fff; font-weight: 700; color: var(--ink-2); }
.pager-links a:hover { background: var(--navy-50); color: var(--navy-900); }
.pager-links .current { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.pager-links .disabled { opacity: 0.45; }

/* ---------- Login ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: #fff; }
.auth-art {
  position: relative; overflow: hidden; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  background:
    linear-gradient(160deg, rgb(5 23 49 / 0.94) 0%, rgb(7 43 89 / 0.86) 50%, rgb(18 128 140 / 0.55) 100%),
    url("img/header_bg.webp") 70% center / cover no-repeat;
}
.auth-art::after { content: ""; position: absolute; left: -120px; bottom: -160px; width: 520px; height: 320px; border-radius: 50%; background: linear-gradient(90deg, rgb(31 138 62 / 0.55), rgb(47 147 216 / 0.25)); filter: blur(10px); }
.auth-art .brand { border: 0; padding: 0; position: relative; z-index: 1; }
.auth-art h1 { font-family: var(--display); font-weight: 500; font-size: 44px; line-height: 1.1; max-width: 520px; position: relative; z-index: 1; }
.auth-art p { color: #cfe0f5; max-width: 460px; margin-top: 14px; font-size: 15.5px; position: relative; z-index: 1; }
.auth-feats { display: flex; flex-wrap: wrap; gap: 10px; position: relative; z-index: 1; }
.auth-feats span { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; background: rgb(255 255 255 / 0.1); border: 1px solid rgb(255 255 255 / 0.18); font-size: 13px; font-weight: 600; backdrop-filter: blur(6px); }
.auth-feats .icon { width: 15px; height: 15px; color: #9ff0b8; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; background: radial-gradient(80% 60% at 100% 0%, var(--navy-50), #fff 60%); }
.auth-box { width: 100%; max-width: 400px; }
.auth-box h2 { font-family: var(--display); font-weight: 500; font-size: 32px; color: var(--navy-900); }
.auth-box .sub { color: var(--ink-2); margin: 6px 0 26px; }
.auth-box .input { padding: 12px 14px; }
.auth-box .btn { padding: 12px 16px; font-size: 15px; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main { grid-template-columns: minmax(0, 1fr); }
  .action-card { position: static; }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: 60; left: 0; top: 0; width: var(--sidebar); transform: translateX(-100%); transition: transform 0.2s; }
  body.nav-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 50; background: rgb(5 15 32 / 0.45); }
  .menu-btn { display: inline-grid; place-items: center; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .auth { grid-template-columns: 1fr; }
  .auth-art { min-height: 300px; padding: 32px 24px; }
  .auth-art h1 { font-size: 32px; }
  .top-date, .view-site span { display: none; }
}
@media (max-width: 640px) {
  .content { padding: 20px 16px 40px; }
  .topbar { padding: 10px 16px; }
  .stats { grid-template-columns: minmax(0, 1fr); }
  .page-title { font-size: 28px; }
  .hero-panel { padding: 20px; }
  .hero-panel h1 { font-size: 23px; }
  .kv { grid-template-columns: minmax(0, 1fr); }
  .kv dt { border-bottom: 0; padding-bottom: 0; }
  .filters .input, .filters .select { min-width: 0; width: 100%; }
  .filters { width: 100%; }
  .status-grid { grid-template-columns: 1fr; }
}
