:root {
  --primary: #1a3a6b;
  --primary-light: #2d6bc4;
  --primary-dark: #0f2347;
  --accent: #e8a020;
  --accent-light: #f5c04a;
  --success: #22a06b;
  --danger: #c5221f;
  --warning: #f9a825;
  --bg: #f0f4f8;
  --surface: #ffffff;
  --border: #dce3ed;
  --text: #1c2b3a;
  --text-muted: #6b7a8d;
  --shadow: 0 2px 16px rgba(26,58,107,0.09);
  --radius: 12px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  min-height: 100vh;
}

a { color: var(--primary-light); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== HEADER ===== */
.site-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
  color: #fff;
  padding: 0;
  box-shadow: 0 4px 20px rgba(26,58,107,0.25);
  position: relative;
  overflow: hidden;
}

.site-header::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 300px; height: 300px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.site-header .header-top,
.site-header .journal-nav {
  position: relative;
  z-index: 1;
}

.lang-switch {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  flex-shrink: 0;
}

.lang-switch--inline {
  position: static;
  top: auto;
  right: auto;
  z-index: auto;
}

.header-top-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  margin-left: auto;
}

.lang-switch__btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
}

.lang-switch__btn:hover {
  background: rgba(255, 255, 255, 0.26);
}

.lang-switch__btn.is-active {
  background: rgba(255, 255, 255, 0.94);
  color: var(--primary-dark);
  border-color: transparent;
}

.site-header.site-header--unified .lang-switch__btn.is-active {
  color: var(--primary-dark);
}

.lang-switch--light .lang-switch__btn {
  border-color: var(--border);
  background: #fff;
  color: var(--text-muted);
}

.lang-switch--light .lang-switch__btn:hover {
  background: #f0f5ff;
}

.lang-switch--light .lang-switch__btn.is-active {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-icon {
  width: 52px; height: 52px;
  background: var(--accent);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  font-weight: 900;
  color: var(--primary-dark);
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(232,160,32,0.4);
}

.logo-text h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.3px;
  line-height: 1.1;
}

.logo-text p {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  margin-top: 2px;
}

.header-auth {
  display: flex;
  gap: 10px;
  align-items: center;
}

.header-auth .btn-ghost {
  border: 1.5px solid rgba(255,255,255,0.4);
  color: #fff;
  background: transparent;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.header-auth .btn-ghost:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.7);
}

.header-auth .btn-accent {
  background: var(--accent);
  color: var(--primary-dark);
  border: none;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.header-auth .btn-accent:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
}

/* User menu in header */
.user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 36px; height: 36px;
  background: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  color: var(--primary-dark);
  font-size: 15px;
}

.user-name {
  font-size: 14px;
  font-weight: 600;
}

/* ===== JOURNAL NAVIGATION BUTTONS ===== */
.journal-nav {
  padding: 18px 40px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.journal-nav-label {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-right: 4px;
  white-space: nowrap;
}

.journal-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.2);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}

.journal-btn:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.5);
  transform: translateY(-2px);
  text-decoration: none;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.journal-btn .j-icon {
  font-size: 16px;
}

/* ===== MAIN LAYOUT ===== */
.main-content {
  max-width: 1400px;
  margin: 40px auto;
  padding: 0 clamp(24px, 4vw, 48px);
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: var(--radius);
  padding: 60px 50px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  right: -40px; bottom: -40px;
  width: 200px; height: 200px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.hero-text h2 { font-size: 34px; font-weight: 800; margin-bottom: 14px; }
.hero-text p { font-size: 16px; color: rgba(255,255,255,0.85); max-width: 480px; margin-bottom: 28px; }

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px; border-radius: var(--radius-sm); font-size: 16px; font-weight: 600; cursor: pointer; border: none; transition: all 0.2s; text-decoration: none; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--primary-dark); }
.btn-primary:hover { background: var(--accent-light); box-shadow: 0 4px 16px rgba(232,160,32,0.4); }
.btn-outline-white { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.6); }
.btn-outline-white:hover { background: rgba(255,255,255,0.12); border-color: #fff; color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #1a8a57; box-shadow: 0 4px 16px rgba(34,160,107,0.35); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #a51c19; }
.btn-secondary { background: #e8edf4; color: var(--text); }
.btn-secondary:hover { background: #d8e0ec; }
.btn-sm { padding: 9px 20px; font-size: 15px; }

.hero-stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-shrink: 0;
}

.hero-stat {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  padding: 16px 24px;
  text-align: center;
  min-width: 130px;
}

.hero-stat .num { font-size: 32px; font-weight: 800; }
.hero-stat .label { font-size: 12px; color: rgba(255,255,255,0.75); margin-top: 2px; }

/* ===== CARDS GRID ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  border: 1px solid var(--border);
  transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover { box-shadow: 0 6px 24px rgba(26,58,107,0.14); transform: translateY(-2px); }

.card-icon {
  width: 50px; height: 50px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}

.card-icon.blue { background: #e8f0fd; }
.card-icon.green { background: #e6f4ea; }
.card-icon.orange { background: #fff3e0; }
.card-icon.purple { background: #f3e8fd; }

.card h3 { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.card p { font-size: 16px; color: var(--text-muted); }

/* ===== JOURNALS SECTION ===== */
.journals-section { margin-bottom: 40px; }
.section-title { font-size: 26px; font-weight: 800; margin-bottom: 22px; color: var(--primary); }

.journals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.journal-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 0.2s;
  text-decoration: none;
  color: var(--text);
  display: block;
}

.journal-card:hover { transform: translateY(-4px); box-shadow: 0 8px 32px rgba(26,58,107,0.18); text-decoration: none; color: var(--text); }

.journal-card-header {
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--border);
}

.journal-card-header .badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.badge-stem { background: #e8f5e9; color: #2e7d32; }
.badge-finecs { background: #e3f2fd; color: #1565c0; }
.badge-conf { background: #fff8e1; color: #f57f17; }

.journal-card-header h3 { font-size: 16px; font-weight: 700; line-height: 1.4; }

.journal-card-body { padding: 16px 24px 24px; }
.journal-card-body p { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }

.journal-meta { display: flex; gap: 16px; font-size: 12px; color: var(--text-muted); }
.journal-meta span { display: flex; align-items: center; gap: 4px; }

.journal-card-footer {
  padding: 14px 24px;
  background: #f8f9fa;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--primary-light);
  font-weight: 600;
}

/* ===== PAYMENT SECTION ===== */
.payment-section {
  background: var(--surface);
  border-radius: var(--radius);
  border: 2px dashed var(--border);
  padding: 40px;
  text-align: center;
  margin-bottom: 40px;
}

.payment-section .coming-soon {
  display: inline-block;
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffc107;
  border-radius: 20px;
  padding: 4px 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.payment-section h3 { font-size: 22px; font-weight: 800; color: var(--primary); margin-bottom: 10px; }
.payment-section p { color: var(--text-muted); max-width: 500px; margin: 0 auto; }

/* ===== AUTH FORMS ===== */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.auth-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(26,58,107,0.14);
  padding: 44px 40px;
  width: 100%;
  max-width: 460px;
  border: 1px solid var(--border);
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo .logo-icon { width: 56px; height: 56px; font-size: 26px; border-radius: 14px; margin: 0 auto 12px; }
.auth-logo h2 { font-size: 20px; font-weight: 800; color: var(--primary); }
.auth-logo p { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ===== FORM ===== */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.form-label .req-mark { color: var(--danger); }

.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  font-family: inherit;
}

.form-control:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(45,107,196,0.12);
}

.form-control::placeholder { color: #aab4c0; }

select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }

.form-text { font-size: 12px; color: var(--text-muted); margin-top: 5px; }

.btn-block { width: 100%; justify-content: center; padding: 15px; font-size: 17px; }

.form-footer { text-align: center; margin-top: 24px; font-size: 14px; color: var(--text-muted); }
.form-footer a { color: var(--primary-light); font-weight: 600; }

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-danger { background: #fce8e6; color: #c5221f; border: 1px solid #f4c0bc; }
.alert-success { background: #e6f4ea; color: #137333; border: 1px solid #a8d5b5; }
.alert-info { background: #e8f0fd; color: #1a3a6b; border: 1px solid #c0d3f4; }
.alert-warning { background: #fff8e1; color: #856404; border: 1px solid #ffd54f; }

/* ===== DASHBOARD ===== */
.dashboard-layout {
  display: flex;
  gap: 24px;
  min-height: calc(100vh - 130px);
}

.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px 0;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  height: fit-content;
  position: sticky;
  top: 20px;
}

.sidebar-user {
  padding: 0 20px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.sidebar-user .user-avatar {
  width: 48px; height: 48px;
  font-size: 20px;
  margin-bottom: 10px;
}

.sidebar-user .name { font-weight: 700; font-size: 15px; }
.sidebar-user .email { font-size: 12px; color: var(--text-muted); margin-top: 2px; word-break: break-all; }

.sidebar-nav { list-style: none; }

.sidebar-nav li a, .sidebar-nav li button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
  transition: all 0.15s;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  border-radius: 0;
  text-decoration: none;
}

.sidebar-nav li a:hover, .sidebar-nav li button:hover {
  background: #f0f4f8;
  color: var(--primary);
  text-decoration: none;
}

.sidebar-nav li a.active {
  background: #e8f0fd;
  color: var(--primary-light);
  font-weight: 700;
  border-right: 3px solid var(--primary-light);
}

.sidebar-nav .nav-icon { font-size: 18px; }

.sidebar-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

.dashboard-main { flex: 1; min-width: 0; }

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.page-header h2 { font-size: 24px; font-weight: 800; color: var(--primary); }

/* ===== STATS CARDS ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  border: 1px solid var(--border);
  text-align: center;
}

.stat-card .num { font-size: 36px; font-weight: 800; color: var(--primary); }
.stat-card .label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.stat-card.pending .num { color: var(--warning); }
.stat-card.approved .num { color: var(--success); }
.stat-card.rejected .num { color: var(--danger); }

/* ===== TABLE ===== */
.table-container {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}

.table-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.table-header h3 { font-size: 17px; font-weight: 700; }

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f0f4f8;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  color: var(--text);
  width: 200px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  background: #f8f9fa;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  text-align: left;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 14px 16px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafcff; }

/* ===== STATUS BADGES ===== */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.status-pending { background: #fff8e1; color: #856404; }
.status-approved { background: #e6f4ea; color: #137333; }
.status-rejected { background: #fce8e6; color: #c5221f; }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modal-in 0.2s ease;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(-20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  padding: 24px 28px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.modal-header h3 { font-size: 20px; font-weight: 800; color: var(--primary); }

.modal-close {
  background: #f0f4f8;
  border: none;
  width: 34px; height: 34px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: background 0.15s;
}

.modal-close:hover { background: #dce3ed; }

.modal-body { padding: 20px 28px 28px; }
.modal-footer { padding: 0 28px 24px; display: flex; gap: 12px; justify-content: flex-end; }

/* ===== NOTIFICATION ===== */
.notif-item {
  display: flex;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background 0.15s;
}

.notif-item:hover { background: #fafcff; }
.notif-item.unread { background: #f0f6ff; }
.notif-item.unread:hover { background: #e8f0fd; }

.notif-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}

.notif-dot.unread { background: var(--primary-light); }
.notif-dot.read { background: var(--border); }

.notif-content .time { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ===== FILTER TABS ===== */
.filter-tabs {
  display: flex;
  gap: 4px;
  background: #f0f4f8;
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 7px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
  transition: all 0.15s;
}

.filter-tab.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: 0 1px 6px rgba(26,58,107,0.1);
}

.filter-tab:hover:not(.active) { color: var(--primary); }

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state .icon { font-size: 48px; margin-bottom: 14px; }
.empty-state h3 { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.empty-state p { font-size: 14px; max-width: 360px; margin: 0 auto 20px; }

/* ===== DETAIL VIEW ===== */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.detail-item label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); display: block; margin-bottom: 4px; }
.detail-item p { font-size: 14px; color: var(--text); }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.75);
  padding: 30px 40px;
  margin-top: auto;
  text-align: center;
  font-size: 13px;
}

.site-footer strong { color: #fff; }
.site-footer a { color: var(--accent-light); }

/* ===== LOADER ===== */
.loader { display: inline-block; width: 20px; height: 20px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.loader-dark { border-color: rgba(26,58,107,0.2); border-top-color: var(--primary-light); }

/* ===== SUBMIT UPLOAD PROGRESS ===== */
.submit-progress {
  margin: 16px 0 8px;
  padding: 14px 16px;
  background: #f0f4fa;
  border: 1px solid #c0d3f4;
  border-radius: 10px;
}
.submit-progress__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 10px;
}
.submit-progress__track {
  height: 10px;
  background: #dde6f2;
  border-radius: 999px;
  overflow: hidden;
}
.submit-progress__bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary-light), var(--primary));
  border-radius: 999px;
  transition: width 0.15s ease;
}
.submit-progress__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
}
.submit-progress__pct {
  font-weight: 700;
  color: var(--primary);
}

/* ===== TOAST ===== */
.toast-container {
  position: fixed;
  top: 24px; right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  max-width: 360px;
  animation: toast-in 0.25s ease;
  border-left: 4px solid transparent;
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.info { border-left-color: var(--primary-light); }

@keyframes toast-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* ===== ANNOUNCEMENT BAR ===== */
.announce-bar {
  background: #1a8a57;
  color: #fff;
  padding: 11px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
  flex-wrap: wrap;
}

.announce-bar strong { font-weight: 700; }
.announce-bar .announce-link {
  background: #fff;
  color: #1a8a57;
  border: none;
  padding: 7px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s;
  flex-shrink: 0;
}
.announce-bar .announce-link:hover { background: #e6f4ea; }

/* ===== SUB NAVIGATION ===== */
.sub-nav {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
  display: flex;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.sub-nav::-webkit-scrollbar { display: none; }

.sub-nav a {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all 0.15s;
}
.sub-nav a:hover { color: var(--primary); border-bottom-color: var(--primary-light); }
.sub-nav a.active { color: var(--primary); border-bottom-color: var(--primary-light); font-weight: 700; }

/* ===== JOURNAL ISSUE CARD ===== */
.issue-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  transition: box-shadow 0.2s;
}
.issue-card:hover { box-shadow: 0 6px 24px rgba(26,58,107,0.14); }

.issue-cover {
  width: 220px;
  min-height: 280px;
  flex-shrink: 0;
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-light) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
  position: relative;
  color: #fff;
  text-align: center;
}

.issue-cover .accept-badge {
  position: absolute;
  top: 10px;
  left: 0;
  z-index: 2;
  background: #1a8a57;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 0 4px 4px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.issue-cover .issue-num {
  font-size: 48px;
  font-weight: 900;
  line-height: 1;
  margin-top: 20px;
}
.issue-cover .issue-label {
  font-size: 11px;
  opacity: 0.8;
  margin-top: 4px;
}
.issue-cover .issue-journal-abbr {
  font-size: 12px;
  font-weight: 700;
  margin-top: 12px;
  background: rgba(255,255,255,0.2);
  padding: 3px 8px;
  border-radius: 4px;
}

.issue-info {
  flex: 1;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.issue-info h3 { font-size: 22px; font-weight: 800; color: var(--primary); }
.issue-info .issue-subtitle { font-size: 15px; color: var(--text-muted); }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 4px;
}

.pricing-item label {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 3px;
}
.pricing-item .price {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
}
.pricing-item .price.free { color: #1a8a57; }
.pricing-item .price-note { font-size: 11px; color: var(--text-muted); }

.issue-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.issue-stat {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ===== CONTENT PAGE ===== */
.content-page { max-width: 900px; margin: 0 auto; }
.content-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); padding: 44px 48px; }
.content-card h1 { font-size: 32px; font-weight: 800; color: var(--primary); margin-bottom: 12px; }
.content-card .lead { font-size: 18px; color: var(--text-muted); margin-bottom: 32px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.content-card h2 { font-size: 22px; font-weight: 700; color: var(--primary); margin: 32px 0 14px; }
.content-card h3 { font-size: 19px; font-weight: 700; color: var(--text); margin: 22px 0 10px; }
.content-card p { font-size: 17px; line-height: 1.8; color: var(--text); margin-bottom: 14px; }
.content-card ul, .content-card ol { padding-left: 26px; margin-bottom: 16px; }
.content-card li { font-size: 17px; line-height: 1.8; margin-bottom: 8px; }
.content-card .highlight-box {
  background: #e8f0fd;
  border-left: 4px solid var(--primary-light);
  border-radius: 4px;
  padding: 18px 22px;
  margin: 18px 0;
  font-size: 16px;
  line-height: 1.65;
}
.content-card .warn-box {
  background: #fff8e1;
  border-left: 4px solid var(--warning);
  border-radius: 4px;
  padding: 18px 22px;
  margin: 18px 0;
  font-size: 16px;
}

/* ===== Оплата и сроки — крупнее и жирнее ===== */
.page-payment .content-breadcrumb {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.page-payment .content-card {
  padding: 44px 48px;
}
.page-payment .content-card h1 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 12px;
}
.page-payment .content-card .lead {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.65;
  margin-bottom: 36px;
}
.page-payment .content-card h2 {
  font-size: 22px;
  font-weight: 800;
  margin: 32px 0 16px;
}
.page-payment .content-card p,
.page-payment .content-card li {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.7;
}
.page-payment .content-card .highlight-box,
.page-payment .content-card .warn-box {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.65;
  padding: 18px 22px;
}
.page-payment .content-card .warn-box strong,
.page-payment .content-card .highlight-box strong {
  font-weight: 700;
}
.page-payment .payment-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.page-payment .payment-feature {
  background: #e6f4ea;
  border-radius: 12px;
  padding: 22px 20px;
  text-align: center;
}
.page-payment .payment-feature-icon {
  font-size: 32px;
  margin-bottom: 10px;
}
.page-payment .payment-feature strong {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: #137333;
  margin-bottom: 8px;
}
.page-payment .payment-feature p {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #1e5631;
}
.page-payment .payment-table-wrap {
  overflow-x: auto;
  margin-bottom: 20px;
}
.page-payment .payment-table {
  width: 100%;
  border-collapse: collapse;
}
.page-payment .payment-table th {
  padding: 14px 18px;
  text-align: left;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-muted);
  background: #f8f9fa;
  border-bottom: 2px solid var(--border);
}
.page-payment .payment-table td {
  padding: 16px 18px;
  font-size: 17px;
  font-weight: 500;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: top;
}
.page-payment .payment-table-term {
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}
.page-payment .payment-table-term--success {
  color: var(--success);
}
.page-payment .payment-soon-box {
  background: #fff8e1;
  border: 1px solid #ffc107;
  border-radius: 12px;
  padding: 28px 24px;
  text-align: center;
  margin-bottom: 24px;
}
.page-payment .payment-soon-icon {
  font-size: 40px;
  margin-bottom: 12px;
}
.page-payment .payment-soon-box strong {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: #856404;
}
.page-payment .payment-soon-box p {
  margin: 12px 0 0;
  color: #856404;
  font-size: 17px;
  font-weight: 500;
}

/* FAQ accordion */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  overflow: hidden;
}
.faq-question {
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  transition: background 0.15s;
  user-select: none;
}
.faq-question:hover { background: #f8f9fa; }
.faq-answer {
  padding: 0 20px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s;
}
.faq-item.open .faq-answer { max-height: 400px; padding: 14px 20px; }
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-arrow { transition: transform 0.25s; flex-shrink: 0; }

/* Step list */
.step-list { list-style: none; padding: 0; counter-reset: step; }
.step-list li {
  counter-increment: step;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f0f0f0;
}
.step-list li:last-child { border-bottom: none; }
.step-num {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary-light);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.step-content h4 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.step-content p { font-size: 14px; color: var(--text-muted); margin: 0; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .header-top { padding: 12px 20px; }
  .journal-nav { padding: 14px 20px; gap: 8px; }
  .journal-btn { font-size: 12px; padding: 6px 12px; }
  .logo-text h1 { font-size: 17px; }
  .hero { padding: 36px 24px; flex-direction: column; }
  .hero-stats { flex-direction: row; width: 100%; }
  .hero-stat { flex: 1; }
  .main-content { margin: 24px auto; padding: 0 14px; }
  .dashboard-layout { flex-direction: column; }
  .sidebar { width: 100%; position: static; }
  .auth-card { padding: 30px 22px; }
  .detail-grid { grid-template-columns: 1fr; }
}

/* ===== FILE INPUT ===== */
.file-upload {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.file-upload:hover { border-color: var(--primary-light); background: #f8faff; }
.file-upload.dragover { border-color: var(--primary-light); background: #e8f0fd; }
.file-upload input[type=file] { display: none; }
.file-upload .file-icon { font-size: 32px; margin-bottom: 8px; }
.file-upload p { font-size: 14px; color: var(--text-muted); }
.file-upload .selected-file { font-size: 13px; color: var(--primary); font-weight: 600; margin-top: 8px; }

/* Progress stepper */
.steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 32px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.step {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  min-width: 80px;
}

.step-circle {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #e0e7ef;
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  transition: all 0.2s;
  z-index: 1;
}

.step.active .step-circle { background: var(--primary-light); color: #fff; }
.step.done .step-circle { background: var(--success); color: #fff; }

.step-line {
  flex: 1;
  height: 2px;
  background: #e0e7ef;
  margin: 0 -1px;
}

.step.done .step-line { background: var(--success); }

.step-label { display: none; }
