/* =====================================================================
   Dergi Yönetim Paneli
   ===================================================================== */
:root {
    --primary: #0b5563;
    --primary-600: #0d6677;
    --primary-700: #094652;
    --primary-50: #ecf6f7;
    --primary-100: #d3eaed;
    --accent: #c2410c;
    --ink: #17212b;
    --text: #334155;
    --muted: #64748b;
    --faint: #94a3b8;
    --line: #e2e8f0;
    --line-2: #eef2f6;
    --bg: #f4f6f9;
    --card: #ffffff;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 3px rgba(15, 23, 42, .06);
    --shadow-lg: 0 18px 50px rgba(15, 23, 42, .18);
    --sidebar-w: 256px;
    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.panel {
    margin: 0; font: 14px/1.55 var(--font); color: var(--text); background: var(--bg);
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--ink); margin: 0 0 .5em; line-height: 1.3; }
h1 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 17px; font-weight: 650; }
h3 { font-size: 15px; font-weight: 650; }
p { margin: 0 0 .8em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
code { background: var(--line-2); padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
.ic { width: 18px; height: 18px; flex: none; vertical-align: middle; }
.ic-sm { width: 15px; height: 15px; }
.ic-lg { width: 22px; height: 22px; }
.ic-xl { width: 34px; height: 34px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------------------------------------------------------------- layout */
.p-shell { display: flex; min-height: 100vh; }
.p-sidebar {
    width: var(--sidebar-w); background: #0d2a33; color: #c9d6db; flex: none;
    position: fixed; inset: 0 auto 0 0; overflow-y: auto; z-index: 40; display: flex; flex-direction: column;
}
.p-brand { display: flex; align-items: center; gap: 10px; padding: 16px 18px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.07); }
.p-brand:hover { text-decoration: none; }
.p-brand-mark { min-width: 34px; height: 34px; padding: 0 5px; border-radius: 8px; background: var(--primary); display: grid; place-items: center; font: 700 10.5px var(--font); color: #fff; flex: none; }
.p-brand-mark img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; background: #fff; }
.p-brand b { display: block; font-size: 14px; line-height: 1.2; }
.p-brand small { color: #86a1ab; font-size: 11.5px; }
.p-nav { padding: 10px 10px 30px; flex: 1; }
.p-nav-group { margin-top: 14px; }
.p-nav-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: #6f8c96; padding: 0 10px 6px; font-weight: 600; }
.p-nav a {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px; color: #c9d6db; border-radius: 7px; font-weight: 500;
}
.p-nav a:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.p-nav a.active { background: rgba(94, 205, 214, .14); color: #fff; }
.p-nav a.active .ic { color: #6fd3dc; }
.p-nav .count { margin-left: auto; background: var(--accent); color: #fff; border-radius: 999px; font-size: 11px; padding: 0 7px; line-height: 18px; font-weight: 600; }
.p-sidebar-foot { padding: 12px 18px; font-size: 12px; border-top: 1px solid rgba(255,255,255,.07); color: #6f8c96; }
.p-sidebar-foot a { color: #9fc3cb; }

.p-main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }
.p-topbar {
    height: 58px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px;
    padding: 0 24px; position: sticky; top: 0; z-index: 30;
}
.p-topbar .p-burger { display: none; }
.p-crumbs { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; min-width: 0; overflow: hidden; white-space: nowrap; }
.p-crumbs a { color: var(--muted); }
.p-top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.p-iconbtn {
    position: relative; width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 8px; color: var(--text);
    background: transparent; border: 1px solid transparent; cursor: pointer;
}
.p-iconbtn:hover { background: var(--line-2); text-decoration: none; }
.p-iconbtn .dot { position: absolute; top: 5px; right: 4px; min-width: 16px; height: 16px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 10px; line-height: 16px; text-align: center; padding: 0 4px; font-weight: 700; }
.p-lang { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.p-lang a { padding: 5px 9px; font-size: 12px; font-weight: 600; color: var(--muted); }
.p-lang a.on { background: var(--primary); color: #fff; }
.p-lang a:hover { text-decoration: none; }
.p-user { display: flex; align-items: center; gap: 9px; padding: 4px 8px 4px 4px; border-radius: 9px; cursor: pointer; border: 1px solid transparent; background: none; font: inherit; color: inherit; }
.p-user:hover { background: var(--line-2); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary-100); color: var(--primary-700); display: inline-grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.avatar-lg { width: 48px; height: 48px; font-size: 16px; }
.p-user-name { font-weight: 600; color: var(--ink); font-size: 13px; line-height: 1.1; text-align: left; }
.p-user-name small { display: block; color: var(--muted); font-weight: 500; font-size: 11.5px; }

.p-content { padding: 26px 28px 60px; max-width: 1400px; width: 100%; }
.p-foot { margin-top: auto; padding: 16px 28px; font-size: 12px; color: var(--faint); }

/* dropdown */
.dropdown { position: relative; }
.dropdown-menu {
    display: none; position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; background: #fff; border: 1px solid var(--line);
    border-radius: 10px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 60;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a, .dropdown-menu button {
    display: flex; gap: 9px; align-items: center; width: 100%; padding: 8px 10px; border-radius: 7px; color: var(--text); background: none; border: 0; font: inherit; cursor: pointer; text-align: left;
}
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--line-2); text-decoration: none; }
.dropdown-menu .sep { height: 1px; background: var(--line); margin: 5px 0; }
.dropdown-menu .danger { color: #b91c1c; }

/* ---------------------------------------------------------------- page header */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { color: var(--muted); margin: 2px 0 0; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card + .card { margin-top: 18px; }
.grid > .card + .card, .grid > * + .card { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { margin: 0; }
.card-head .sub { color: var(--muted); font-size: 12.5px; }
.card-body { padding: 18px; }
.card-body.tight { padding: 0; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--line); background: #fbfcfd; border-radius: 0 0 var(--radius) var(--radius); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1fr) 330px; align-items: start; }
.stack > * + * { margin-top: 18px; }

.stat { padding: 16px 18px; display: flex; gap: 14px; align-items: center; }
.stat .stat-ic { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); flex: none; }
.stat .stat-ic.amber { background: #fef3c7; color: #b45309; }
.stat .stat-ic.violet { background: #ede9fe; color: #6d28d9; }
.stat .stat-ic.red { background: #fee2e2; color: #b91c1c; }
.stat .stat-ic.green { background: #dcfce7; color: #15803d; }
.stat b { display: block; font-size: 22px; color: var(--ink); line-height: 1.1; }
.stat span { color: var(--muted); font-size: 12.5px; }
a.stat:hover { text-decoration: none; background: #fbfdfd; }

/* ---------------------------------------------------------------- buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line);
    background: #fff; color: var(--ink); font: 600 13.5px/1.2 var(--font); cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--line-2); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-700); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: #9a3412; }
.btn-danger { background: #fff; border-color: #fecaca; color: #b91c1c; }
.btn-danger:hover { background: #fef2f2; }
.btn-danger-solid { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.btn-danger-solid:hover { background: #991b1b; }
.btn-success { background: #15803d; border-color: #15803d; color: #fff; }
.btn-success:hover { background: #166534; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { padding: 5px 10px; font-size: 12.5px; border-radius: 7px; }
.btn-xs { padding: 3px 8px; font-size: 12px; border-radius: 6px; }
.btn-block { width: 100%; }
.btn .ic { width: 16px; height: 16px; }
.btn-group { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.link-btn { background: none; border: 0; padding: 0; color: var(--primary); font: inherit; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: #b91c1c; }

/* ---------------------------------------------------------------- forms */
.form-row { margin-bottom: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
label.lbl, .lbl { display: block; font-weight: 600; color: var(--ink); margin-bottom: 5px; font-size: 13px; }
.lbl .req { color: #dc2626; }
.lbl .opt { color: var(--faint); font-weight: 500; }
.help { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.input, .select, .textarea {
    width: 100%; padding: 8px 11px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: var(--ink);
    font: 14px/1.45 var(--font); transition: border-color .12s, box-shadow .12s;
}
.input:focus, .select:focus, .textarea:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(11, 85, 99, .14); }
.textarea { min-height: 110px; resize: vertical; }
.textarea.tall { min-height: 220px; }
.textarea.mono { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.input-sm { padding: 5px 9px; font-size: 13px; }
.check { display: flex; gap: 9px; align-items: flex-start; cursor: pointer; margin-bottom: 8px; }
.check input { margin-top: 3px; accent-color: var(--primary); width: 16px; height: 16px; flex: none; }
.checklist .check { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfd; }
.checklist .check:has(input:checked) { border-color: #99d1d8; background: var(--primary-50); }
.field-error { color: #b91c1c; font-size: 12.5px; margin-top: 4px; }
.input.is-invalid { border-color: #f87171; }
.inline-form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.inline-form .form-row { margin: 0; }
.lang-tabs { display: flex; gap: 4px; margin-bottom: -1px; }
.lang-tabs button { border: 1px solid var(--line); border-bottom: 0; background: #f8fafc; padding: 6px 12px; border-radius: 8px 8px 0 0; font: 600 12px var(--font); color: var(--muted); cursor: pointer; }
.lang-tabs button.on { background: #fff; color: var(--primary); }
.lang-pane { border: 1px solid var(--line); border-radius: 0 8px 8px 8px; padding: 14px; background: #fff; }
.lang-pane[hidden] { display: none; }
.counter { float: right; font-size: 11.5px; color: var(--faint); font-weight: 500; }
.tag-input { display: flex; flex-wrap: wrap; gap: 6px; }

/* file drop */
.dropzone {
    border: 2px dashed #cbd5e1; border-radius: 10px; padding: 22px; text-align: center; color: var(--muted); background: #fafbfc; cursor: pointer; transition: all .15s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--primary); background: var(--primary-50); color: var(--primary); }
.dropzone input[type=file] { display: none; }
.dropzone .ic { width: 28px; height: 28px; margin-bottom: 6px; }
.dropzone .picked { margin-top: 8px; font-weight: 600; color: var(--ink); }

/* ---------------------------------------------------------------- alerts */
.alert { display: flex; gap: 10px; padding: 11px 14px; border-radius: 9px; border: 1px solid; margin-bottom: 16px; align-items: flex-start; }
.alert .ic { margin-top: 1px; }
.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.alert-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.alert ul { margin: 4px 0 0; padding-left: 18px; }
.alert p:last-child { margin: 0; }
.notice { padding: 12px 14px; border-radius: 9px; background: var(--primary-50); border: 1px solid var(--primary-100); color: var(--primary-700); }

/* ---------------------------------------------------------------- badges */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; line-height: 1.6; }
.badge-gray { background: #f1f5f9; color: #475569; }
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-amber { background: #fef3c7; color: #a16207; }
.badge-orange { background: #ffedd5; color: #c2410c; }
.badge-violet { background: #ede9fe; color: #6d28d9; }
.badge-green { background: #dcfce7; color: #15803d; }
.badge-teal { background: #ccfbf1; color: #0f766e; }
.badge-red { background: #fee2e2; color: #b91c1c; }
.badge-outline { background: #fff; border: 1px solid currentColor; line-height: 1.45; }
.badge-outline.badge-gray { color: #64748b; }

/* ---------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 10px 14px; background: #f8fafc; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fbfcfd; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions { text-align: right; white-space: nowrap; }
.t-title { font-weight: 600; color: var(--ink); display: block; line-height: 1.4; }
a.t-title:hover { color: var(--primary); }
.t-meta { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty .ic { width: 40px; height: 40px; color: #cbd5e1; margin-bottom: 8px; }

/* list rows (submission queue) */
.sub-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) 190px 150px; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); align-items: center; }
.sub-row:last-child { border-bottom: 0; }
.sub-row:hover { background: #fbfcfd; }
.sub-id { font: 600 12.5px ui-monospace, Consolas, monospace; color: var(--muted); }
.sub-stage { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.sub-due { font-size: 12px; color: var(--muted); }
.sub-due.late { color: #b91c1c; font-weight: 600; }

/* ---------------------------------------------------------------- tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.on { color: var(--primary); border-bottom-color: var(--primary); }
.tabs a .n { background: var(--line-2); color: var(--muted); border-radius: 999px; font-size: 11px; padding: 0 7px; }
.tabs a.on .n { background: var(--primary-100); color: var(--primary-700); }
.tabs a.done { color: #15803d; }
.subtabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.subtabs a { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-weight: 600; font-size: 12.5px; background: #fff; }
.subtabs a.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.subtabs a:hover { text-decoration: none; }

/* ---------------------------------------------------------------- workflow */
.wf-head { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 18px; box-shadow: var(--shadow); }
.wf-head h1 { font-family: var(--serif); font-size: 22px; font-weight: 600; margin: 6px 0 6px; }
.wf-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 13px; }
.wf-meta span { display: inline-flex; gap: 5px; align-items: center; }
.wf-steps { display: flex; margin-top: 16px; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.wf-steps a { flex: 1; display: flex; align-items: center; gap: 8px; padding: 10px 12px; color: var(--muted); font-weight: 600; font-size: 13px; background: #fafbfc; border-right: 1px solid var(--line); }
.wf-steps a:last-child { border-right: 0; }
.wf-steps a:hover { text-decoration: none; background: #f3f6f8; }
.wf-steps .n { width: 22px; height: 22px; border-radius: 50%; border: 2px solid currentColor; display: grid; place-items: center; font-size: 11px; flex: none; }
.wf-steps a.done { color: #15803d; background: #f5fcf7; }
.wf-steps a.done .n { background: #15803d; border-color: #15803d; color: #fff; }
.wf-steps a.current { color: var(--primary); background: var(--primary-50); box-shadow: inset 0 -3px 0 var(--primary); }
.wf-steps a.viewing { outline: 2px solid var(--primary); outline-offset: -2px; }
.wf-steps a.locked { opacity: .5; pointer-events: none; }

.file-list { list-style: none; margin: 0; padding: 0; }
.file-list li { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line-2); }
.file-list li:last-child { border-bottom: 0; }
.file-ic { width: 36px; height: 36px; border-radius: 8px; background: #f1f5f9; display: grid; place-items: center; color: var(--muted); flex: none; font: 700 9.5px var(--font); text-transform: uppercase; }
.file-ic.pdf { background: #fee2e2; color: #b91c1c; }
.file-ic.doc, .file-ic.docx { background: #dbeafe; color: #1d4ed8; }
.file-ic.xls, .file-ic.xlsx, .file-ic.csv { background: #dcfce7; color: #15803d; }
.file-ic.png, .file-ic.jpg, .file-ic.jpeg, .file-ic.tif, .file-ic.tiff { background: #fef3c7; color: #a16207; }
.file-info { flex: 1; min-width: 0; }
.file-info a, .file-info b { font-weight: 600; color: var(--ink); word-break: break-word; }
.file-info small { display: block; color: var(--muted); font-size: 12px; }
.file-actions { display: flex; gap: 6px; flex: none; align-items: center; }

.decision-box { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); overflow: hidden; }
.decision-box h3 { padding: 13px 16px; margin: 0; border-bottom: 1px solid var(--line); background: #fbfcfd; font-size: 14px; }
.decision-box .db-body { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.decision-box .btn { justify-content: flex-start; }

.people { list-style: none; margin: 0; padding: 0; }
.people li { display: flex; gap: 10px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line-2); }
.people li:last-child { border-bottom: 0; }
.people .who { flex: 1; min-width: 0; }
.people .who b { display: block; color: var(--ink); font-size: 13.5px; }
.people .who small { color: var(--muted); font-size: 12px; }

.reviewer-card { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: #fff; }
.reviewer-card + .reviewer-card { margin-top: 10px; }
.reviewer-card .rc-top { display: flex; gap: 12px; align-items: flex-start; }
.reviewer-card .rc-top .who { flex: 1; min-width: 0; }
.reviewer-card .rc-dates { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.reviewer-card .rc-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.review-text { background: #f8fafc; border: 1px solid var(--line-2); border-radius: 8px; padding: 12px 14px; white-space: pre-wrap; font-size: 13.5px; color: var(--ink); }
.review-text.private { background: #fffbeb; border-color: #fde68a; }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 16px 26px; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 3px var(--primary-100); }
.timeline li::after { content: ""; position: absolute; left: 10px; top: 18px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline .tl-time { font-size: 12px; color: var(--faint); }
.timeline .tl-msg { color: var(--ink); }
.timeline .tl-who { color: var(--muted); font-size: 12.5px; }

.discussion { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.discussion + .discussion { margin-top: 10px; }
.discussion summary { list-style: none; cursor: pointer; padding: 11px 14px; display: flex; gap: 10px; align-items: center; background: #fbfcfd; }
.discussion summary::-webkit-details-marker { display: none; }
.discussion summary b { flex: 1; color: var(--ink); }
.discussion[open] summary { border-bottom: 1px solid var(--line); }
.msg { padding: 12px 14px; border-bottom: 1px solid var(--line-2); display: flex; gap: 10px; }
.msg-body { flex: 1; min-width: 0; }
.msg-body .meta { font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.msg-body .meta b { color: var(--ink); }
.msg-body .text { white-space: pre-wrap; color: var(--ink); }
.msg-reply { padding: 12px 14px; background: #fbfcfd; }

.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 14px; font-size: 13.5px; }
.kv dt { color: var(--muted); font-weight: 500; }
.kv dd { margin: 0; color: var(--ink); word-break: break-word; }

.meta-block { border: 1px solid var(--line); border-radius: 9px; padding: 14px 16px; }
.meta-block + .meta-block { margin-top: 12px; }
.meta-block .lang-chip { font: 700 10.5px var(--font); letter-spacing: .06em; color: var(--primary); background: var(--primary-50); padding: 2px 7px; border-radius: 5px; }
.meta-block h3 { font-family: var(--serif); font-size: 17px; font-weight: 600; margin: 8px 0 8px; }
.meta-block .abstract { white-space: pre-line; color: var(--text); }
.kw { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.kw span { background: var(--line-2); color: var(--text); border-radius: 6px; padding: 2px 8px; font-size: 12.5px; }

.author-list { display: grid; gap: 10px; }
.author-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.author-item .who { flex: 1; min-width: 0; }
.author-item .who b { color: var(--ink); }
.author-item .who small { display: block; color: var(--muted); }

/* stepper (wizard) */
.stepper { display: flex; gap: 0; margin-bottom: 22px; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.stepper > a, .stepper > span { flex: 1; display: flex; align-items: center; gap: 9px; padding: 12px 14px; color: var(--muted); font-weight: 600; font-size: 13px; border-right: 1px solid var(--line); }
.stepper > :last-child { border-right: 0; }
.stepper .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--line-2); font-size: 12px; flex: none; }
.stepper > .done { color: #15803d; }
.stepper .done .n { background: #dcfce7; }
.stepper > .on { color: var(--primary); background: var(--primary-50); }
.stepper .on .n { background: var(--primary); color: #fff; }
.stepper > a:hover { text-decoration: none; background: #f8fafc; }

/* modal */
dialog.modal { border: 0; border-radius: 14px; padding: 0; width: min(720px, calc(100% - 24px)); box-shadow: var(--shadow-lg); max-height: calc(100vh - 40px); }
dialog.modal.wide { width: min(980px, calc(100% - 24px)); }
dialog.modal::backdrop { background: rgba(15, 23, 42, .5); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 2; }
.modal-head h2 { margin: 0; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; background: #fbfcfd; position: sticky; bottom: 0; }

/* reviewer picker */
.picker-list { max-height: 360px; overflow-y: auto; border: 1px solid var(--line); border-radius: 9px; }
.picker-item { display: flex; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line-2); cursor: pointer; align-items: flex-start; }
.picker-item:last-child { border-bottom: 0; }
.picker-item:hover { background: #f8fafc; }
.picker-item:has(input:checked) { background: var(--primary-50); }
.picker-item input { margin-top: 4px; accent-color: var(--primary); }
.picker-item .who { flex: 1; min-width: 0; }
.picker-item .who b { color: var(--ink); }
.picker-item .stats { display: flex; gap: 12px; font-size: 11.5px; color: var(--muted); margin-top: 3px; flex-wrap: wrap; }
.picker-item .interests { font-size: 12px; color: var(--primary-700); margin-top: 3px; }

.pagination { display: flex; gap: 4px; justify-content: center; padding: 14px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 32px; height: 32px; display: inline-grid; place-items: center; padding: 0 8px; border-radius: 7px; border: 1px solid var(--line); background: #fff; color: var(--text); font-weight: 600; font-size: 13px; }
.pagination .current { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination .gap { border: 0; background: none; }
.pagination a:hover { text-decoration: none; background: var(--line-2); }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.toolbar .input, .toolbar .select { width: auto; min-width: 180px; }
.toolbar .grow { flex: 1; min-width: 200px; }
.search-box { position: relative; }
.search-box .ic { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--faint); width: 16px; }
.search-box .input { padding-left: 33px; }

.task { display: flex; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line-2); align-items: flex-start; }
.task:last-child { border-bottom: 0; }
.task .t-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--primary-50); color: var(--primary); }
.task .t-ic.warn { background: #fef3c7; color: #b45309; }
.task .t-ic.red { background: #fee2e2; color: #b91c1c; }
.task .t-body { flex: 1; min-width: 0; }
.task .t-body b { color: var(--ink); display: block; }
.task .t-body small { color: var(--muted); }

.bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 10px; }
.bars .bar { flex: 1; background: var(--primary-100); border-radius: 5px 5px 0 0; position: relative; min-height: 2px; }
.bars .bar:hover { background: var(--primary); }
.bars .bar span { position: absolute; bottom: -20px; left: 0; right: 0; text-align: center; font-size: 10.5px; color: var(--muted); }
.bars .bar em { position: absolute; top: -18px; left: 0; right: 0; text-align: center; font-size: 10.5px; color: var(--ink); font-style: normal; font-weight: 600; }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 18px; } .mt-4 { margin-top: 26px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 18px; }
.flex { display: flex; gap: 10px; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; }
.prose { color: var(--text); }
.prose h3 { margin-top: 1.2em; }
.prose ul { padding-left: 20px; }
.hidden { display: none !important; }

/* ---------------------------------------------------------------- auth pages */
body.auth { margin: 0; min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); font: 14px/1.55 var(--font); color: var(--text); background: #fff; }
.auth-side { background: linear-gradient(155deg, #0b5563 0%, #0d2a33 100%); color: #d5e7ea; padding: 48px 56px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.auth-side::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; border: 60px solid rgba(255,255,255,.04); }
.auth-side h2 { color: #fff; font: 600 30px/1.25 var(--serif); margin: auto 0 14px; max-width: 460px; }
.auth-side p { max-width: 440px; color: #b7d3d8; }
.auth-side ul { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.auth-side li { display: flex; gap: 10px; align-items: center; }
.auth-side li .ic { color: #6fd3dc; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card.wide { max-width: 620px; }
.auth-card h1 { font-size: 24px; margin-bottom: 4px; }
.auth-card .lead { color: var(--muted); margin-bottom: 24px; }
.auth-brand { display: flex; gap: 10px; align-items: center; color: #fff; font-weight: 600; }
.auth-brand:hover { text-decoration: none; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
    .grid-main { grid-template-columns: minmax(0, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .p-sidebar { transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
    body.nav-open .p-sidebar { transform: none; }
    body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 35; }
    .p-main { margin-left: 0; }
    .p-topbar { padding: 0 14px; }
    .p-topbar .p-burger { display: inline-grid; }
    .p-content { padding: 18px 16px 50px; }
    .grid-2, .grid-3, .form-grid, .form-grid-3 { grid-template-columns: minmax(0, 1fr); }
    .sub-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .p-user-name { display: none; }
    body.auth { grid-template-columns: 1fr; }
    .auth-side { display: none; }
    .wf-steps { flex-direction: column; }
    .wf-steps a { border-right: 0; border-bottom: 1px solid var(--line); }
    .stepper { flex-direction: column; }
    .stepper > a, .stepper > span { border-right: 0; border-bottom: 1px solid var(--line); }
    .kv { grid-template-columns: 1fr; gap: 2px; }
    .reviewer-card .rc-top { flex-wrap: wrap; }
    .reviewer-card .rc-top > .btn { width: 100%; }
    .page-head .actions { width: 100%; }
    .kv dd { margin-bottom: 8px; }
}
@media (max-width: 560px) {
    .grid-4 { grid-template-columns: minmax(0, 1fr); }
    .p-crumbs { display: none; }
}
@media print {
    .p-sidebar, .p-topbar, .btn { display: none !important; }
    .p-main { margin: 0; }
}
