/* ==========================================================================
   UI Polish Layer
   Loaded AFTER style.css. Visual refinements only: no layout structure,
   class names or behaviour are changed. Remove the <link> in
   includes/header.php to revert completely.
   All colors come from design tokens, so light/dark and the journal's
   configured theme color keep working.
   ========================================================================== */

:root {
    --bg-primary: #f6f7f9;
    --border-color: #e3e7ee;
    --text-secondary: #3b475a;
    --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.04);
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.04);
    --shadow: 0 2px 4px rgba(16, 24, 40, 0.03), 0 8px 20px -6px rgba(16, 24, 40, 0.08);
    --shadow-md: 0 4px 8px rgba(16, 24, 40, 0.04), 0 16px 32px -8px rgba(16, 24, 40, 0.12);
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --focus-ring: 0 0 0 3px var(--primary-light), 0 0 0 1.5px var(--primary);
}

/* ---------- Base typography ---------- */
body {
    font-size: 1rem;
    line-height: 1.7;
    text-rendering: optimizeLegibility;
    font-feature-settings: "cv11", "ss01";
}
h1, h2, h3, h4 {
    text-wrap: balance;
}
p, li {
    text-wrap: pretty;
}
::selection {
    background: var(--primary);
    color: var(--text-inverse, #fff);
}

/* ---------- Accessible focus (keyboard) ---------- */
:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
    border-radius: var(--radius-xs);
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
    box-shadow: var(--focus-ring);
}

/* ---------- Top utility bar: quieter ---------- */
.utility-topbar {
    background: transparent;
    font-size: 0.78rem;
    color: var(--text-muted);
    padding: 6px 0;
}
.utility-right a {
    font-weight: 500;
    color: var(--text-muted);
}

/* ---------- Header / navigation ---------- */
.main-header {
    background-color: var(--bg-glass);
    box-shadow: 0 1px 0 var(--border-color);
}
.header-container {
    padding: 12px 24px;
}
.brand-text h1 {
    font-size: 1.28rem;
    letter-spacing: -0.015em;
}
.nav-menu ul {
    gap: 6px;
}
.nav-menu a {
    font-size: 0.88rem;
    font-weight: 550;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
}
.nav-menu a::after {
    display: none;
}
.nav-menu a:hover {
    background: var(--primary-light);
    color: var(--primary);
}
.nav-menu a.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 650;
}

/* ---------- Hero ---------- */
.journal-hero-card {
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    border-radius: 18px;
    padding: 40px 44px;
}
.journal-hero-card::before {
    height: 3px;
}
.hero-journal-title {
    letter-spacing: -0.02em;
}

/* ---------- Buttons ---------- */
.dergipark-btn-solid, .btn-primary,
.dergipark-btn-outline, .btn-secondary {
    border-radius: var(--radius-md);
    font-weight: 650;
    letter-spacing: 0.005em;
    transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out),
                background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.dergipark-btn-solid, .btn-primary {
    box-shadow: var(--shadow-xs), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.dergipark-btn-solid:hover, .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px -4px var(--primary-glow);
}
.dergipark-btn-solid:active, .btn-primary:active,
.dergipark-btn-outline:active, .btn-secondary:active {
    transform: translateY(0);
    box-shadow: none;
}
.dergipark-btn-outline:hover, .btn-secondary:hover {
    transform: translateY(-1px);
}

/* ---------- Tabs: pill style, no heavy underline ---------- */
.dergipark-tabs {
    border-bottom: 1px solid var(--border-color);
    gap: 2px;
}
.dergipark-tabs .tab-item {
    border-bottom-width: 2px;
    padding: 10px 16px;
    font-weight: 600;
}
.dergipark-tabs .tab-item.active {
    background: transparent;
}

/* ---------- Section headings ---------- */
.section-title {
    letter-spacing: -0.015em;
}

/* ---------- Search ---------- */
.search-input-modern {
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    transition: border-color 0.15s ease, box-shadow 0.2s ease;
}
.search-input-modern:focus {
    box-shadow: var(--focus-ring);
}

/* ---------- Article cards ---------- */
.article-card {
    padding: 24px 28px;
    border-radius: 14px;
    border-color: var(--border-color);
    transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out),
                border-color 0.2s ease;
}
.article-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.article-card h3 {
    font-size: 1.22rem;
    line-height: 1.38;
    letter-spacing: -0.012em;
}
.article-authors-str {
    font-weight: 550;
}
.article-snippet {
    color: var(--text-secondary);
    line-height: 1.65;
}
.article-card-meta-bar {
    font-size: 0.82rem;
    padding-top: 10px;
    margin-top: 4px;
}
.article-doi-link {
    letter-spacing: 0.01em;
}
.btn-card-pdf {
    border-radius: var(--radius-md);
    padding: 9px 18px;
    font-weight: 650;
    box-shadow: var(--shadow-xs);
}
.article-type-pill {
    letter-spacing: 0.06em;
}

/* ---------- Sidebars / panels ---------- */
.sidebar-panel, .dergipark-menu {
    border-radius: 14px;
    box-shadow: var(--shadow-xs);
}
.sidebar-title {
    letter-spacing: -0.005em;
}
.dergipark-menu a {
    padding: 11px 18px;
    font-weight: 550;
}
.dergipark-menu a:hover {
    padding-left: 18px;
    transform: translateX(2px);
}

/* ---------- Article reading page ---------- */
.article-title-heading {
    letter-spacing: -0.02em;
    line-height: 1.28;
}
.abstract-card-box, .article-header-box {
    border-radius: 16px;
}
.article-fulltext-content .article-p {
    line-height: 1.85;
}

/* ---------- Forms (public + dashboard) ---------- */
.form-group label {
    font-weight: 600;
    font-size: 0.86rem;
    letter-spacing: 0.005em;
}
.form-group input, .form-group textarea, .form-group select,
.dashboard-content-panel input[type="text"],
.dashboard-content-panel input[type="email"],
.dashboard-content-panel input[type="password"],
.dashboard-content-panel input[type="number"],
.dashboard-content-panel input[type="url"],
.dashboard-content-panel input[type="date"],
.dashboard-content-panel input[type="search"],
.dashboard-content-panel textarea,
.dashboard-content-panel select {
    border-radius: var(--radius-md);
    transition: border-color 0.15s ease, box-shadow 0.2s ease, background-color 0.15s ease;
}
.dashboard-content-panel input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
.dashboard-content-panel select,
.dashboard-content-panel textarea {
    font-size: 0.9rem;
}
.dashboard-content-panel input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):hover,
.dashboard-content-panel select:hover,
.dashboard-content-panel textarea:hover {
    border-color: var(--text-muted);
}
.auth-container {
    border-radius: 18px;
    box-shadow: var(--shadow-md);
}

/* ---------- Dashboard shell ---------- */
.dashboard-layout-container {
    gap: 28px;
}
.dashboard-sidebar {
    border-radius: 16px;
    padding: 22px 16px;
    box-shadow: var(--shadow-xs);
}
.user-profile-summary {
    padding-bottom: 18px;
    margin-bottom: 14px;
}
.dash-nav-list {
    gap: 2px;
}
.dash-nav-list li a {
    padding: 9px 12px;
    font-weight: 550;
    border-radius: var(--radius-md);
    position: relative;
}
.dash-nav-list li a:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}
.dash-nav-list li.active a {
    background: var(--primary-light);
    color: var(--primary) !important;
    font-weight: 700;
}
.dash-nav-list li.active a::before {
    content: '';
    position: absolute;
    left: -16px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--primary);
}
.dash-nav-list li.active a svg {
    stroke: var(--primary);
}
.dashboard-content-panel {
    border-radius: 16px;
    padding: 32px 36px;
    box-shadow: var(--shadow-sm);
}
.dashboard-content-panel h2, .dashboard-content-panel h3 {
    letter-spacing: -0.015em;
}

/* ---------- Tables ---------- */
.table-container {
    border-radius: 14px;
    box-shadow: var(--shadow-xs);
}
.queue-table thead th {
    background: var(--bg-primary);
    font-size: 0.7rem;
    padding: 11px 16px;
}
.queue-table tbody td {
    padding: 15px 16px;
}
.queue-table tbody tr {
    transition: background-color 0.15s ease;
}
.queue-table tbody tr:hover td {
    background-color: var(--primary-light);
}
.tbl-btn {
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-weight: 650;
}
.tbl-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px -3px var(--primary-glow);
}

/* ---------- Badges / alerts ---------- */
.badge {
    letter-spacing: 0.02em;
}
.alert {
    border-radius: var(--radius-md);
}

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid var(--border-color);
}

/* ---------- Dark mode adjustments ---------- */
[data-theme="dark"] {
    --bg-primary: #0b1018;
    --border-color: #243044;
    --text-secondary: #c3cddc;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 10px 24px -8px rgba(0, 0, 0, 0.55);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.35), 0 18px 36px -10px rgba(0, 0, 0, 0.65);
}
/* The journal theme color is a dark green; lift it for text on dark surfaces */
[data-theme="dark"] .nav-menu a:hover,
[data-theme="dark"] .nav-menu a.active,
[data-theme="dark"] .dash-nav-list li.active a,
[data-theme="dark"] .dergipark-tabs .tab-item.active,
[data-theme="dark"] .article-card h3 a:hover,
[data-theme="dark"] .btn-card-pdf,
[data-theme="dark"] .article-doi-link {
    color: color-mix(in srgb, var(--primary) 45%, #ffffff) !important;
}
[data-theme="dark"] .dash-nav-list li.active a svg {
    stroke: color-mix(in srgb, var(--primary) 45%, #ffffff);
}
[data-theme="dark"] .btn-card-pdf:hover {
    color: #ffffff !important;
}
[data-theme="dark"] .queue-table thead th {
    background: rgba(255, 255, 255, 0.025);
}
[data-theme="dark"] .dash-nav-list li a:hover {
    background: rgba(255, 255, 255, 0.04);
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .article-card:hover, .dergipark-btn-solid:hover, .btn-primary:hover {
        transform: none;
    }
}

/* ---------- Small screens ---------- */
@media (max-width: 768px) {
    .journal-hero-card { padding: 26px 22px; border-radius: 16px; }
    .article-card { padding: 18px 18px; }
    .dashboard-content-panel { padding: 20px 16px; }
    .dash-nav-list li.active a::before { left: -12px; }
}

/* ==========================================================================
   Round 2: home page + dashboard KPI cards
   ========================================================================== */

/* Home: the tab strip repeats the top navigation and the right-hand menu */
.tabs-redundant {
    display: none;
}

/* Home: calmer hero actions and a clearer sidebar hierarchy */
.hero-actions-group {
    gap: 12px;
}
.homepage-grid {
    gap: 40px;
}
.homepage-grid aside .dergipark-menu {
    margin-bottom: 20px;
}
.dergipark-menu li {
    border-bottom-color: var(--border-light);
}
.dergipark-menu i {
    opacity: 0.85;
}

/* Editor queue KPI cards (inline-styled markup, so !important is required) */
.kpi-grid {
    gap: 14px !important;
}
.kpi-grid > a > div {
    text-align: left !important;
    padding: 16px 18px !important;
    border-radius: 14px !important;
    box-shadow: var(--shadow-xs) !important;
    transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), border-color 0.15s ease;
    position: relative;
    overflow: hidden;
}
.kpi-grid > a:hover > div {
    transform: translateY(-2px);
    box-shadow: var(--shadow) !important;
}
.kpi-grid > a > div > div:first-child {
    font-size: 0.68rem !important;
    letter-spacing: 0.07em;
}
.kpi-grid > a > div > div:last-child {
    font-size: 2rem !important;
    line-height: 1.1;
    margin-top: 8px !important;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}
/* the selected filter gets a tinted surface and an accent bar */
.kpi-grid > a > div[style*="border:1px solid var(--primary)"] {
    background: var(--primary-light) !important;
    box-shadow: 0 0 0 1px var(--primary), var(--shadow-xs) !important;
}

/* ==========================================================================
   Round 3: settings, archive, article, policies, auth, footer, users, mobile
   ========================================================================== */

/* ---------- Settings (page-level <style> loads later, so scope with the panel) ---------- */
.dashboard-content-panel .settings-tabs-nav {
    gap: 4px;
    padding: 5px;
    border-radius: 12px;
    background: var(--bg-primary);
    box-shadow: none;
}
.dashboard-content-panel .settings-tab-btn {
    padding: 9px 15px;
    border-radius: 9px;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.dashboard-content-panel .settings-tab-btn:hover {
    background: var(--bg-card);
    border-color: transparent;
    box-shadow: var(--shadow-xs);
}
.dashboard-content-panel .settings-tab-btn.active {
    background: var(--bg-card);
    color: var(--primary) !important;
    border-color: var(--border-color);
    box-shadow: var(--shadow-sm);
}
.dashboard-content-panel .settings-tab-btn.active i {
    color: var(--primary) !important;
}
.dashboard-content-panel .settings-tab-btn.active .tab-badge {
    background: var(--primary-light);
    color: var(--primary);
}
.dashboard-content-panel .settings-card {
    border-radius: 14px;
    padding: 26px 28px;
    box-shadow: var(--shadow-xs);
}
.dashboard-content-panel .settings-card-header {
    border-bottom-color: var(--border-light);
    padding-bottom: 14px;
    margin-bottom: 22px;
}
.dashboard-content-panel .settings-card-header h4,
.dashboard-content-panel .settings-card-header h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    letter-spacing: -0.01em;
}
.dashboard-content-panel .settings-card-header h4 i,
.dashboard-content-panel .settings-card-header h3 i {
    color: var(--primary);
}
.dashboard-content-panel .settings-section-desc {
    font-size: 0.85rem;
    line-height: 1.55;
}
.dashboard-content-panel .tab-save-footer {
    border-top-color: var(--border-light);
}
.dashboard-content-panel .form-group > label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-primary);
}
.dashboard-content-panel .form-group small,
.dashboard-content-panel .form-group .help-text {
    color: var(--text-muted);
    font-size: 0.78rem;
}

/* ---------- Archive & issue cards ---------- */
.archive-layout .journal-hero-card {
    padding: 30px 36px;
}
.archive-layout [class*="issue-card"],
.archive-layout .content-section > div[style*="grid"] > div {
    border-radius: 14px;
}

/* ---------- Article reading page ---------- */
.article-sidebar .sidebar-panel {
    border-radius: 14px;
}
.side-download-btn {
    border-radius: var(--radius-md);
    font-weight: 700;
    box-shadow: var(--shadow-xs), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), background-color 0.15s ease;
}
.side-download-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px -4px var(--primary-glow);
}
.citation-mini-tab {
    border-radius: var(--radius-sm);
    transition: background-color 0.15s ease, color 0.15s ease;
}
.citation-text-box {
    line-height: 1.65;
    border-radius: var(--radius-md);
}
.author-affiliation-card {
    border-radius: 16px;
}
.keywords-row a, .keywords-row span {
    transition: background-color 0.15s ease, color 0.15s ease;
}
.article-fulltext-content table {
    border-radius: 10px;
}

/* ---------- Policies / editorial board ---------- */
.policy-box {
    border-radius: 12px !important;
    box-shadow: var(--shadow-xs) !important;
    background: var(--bg-card) !important;
    border-top: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}
.editorial-member-card {
    border-radius: 14px !important;
    background: var(--bg-card) !important;
    box-shadow: var(--shadow-xs);
    transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), border-color 0.2s ease;
}
.editorial-member-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.editor-card {
    border-radius: 14px;
}

/* ---------- Auth screens ---------- */
.auth-container {
    border: 1px solid var(--border-color);
}
.auth-header h2 {
    letter-spacing: -0.02em;
}
.btn-block {
    border-radius: var(--radius-md);
    padding-top: 12px;
    padding-bottom: 12px;
}
.btn-google-login, .btn-google-register,
.btn-orcid-login, .btn-orcid-register {
    border-radius: var(--radius-md);
    transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), border-color 0.15s ease;
}
.btn-google-login:hover, .btn-google-register:hover,
.btn-orcid-login:hover, .btn-orcid-register:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* ---------- User management ---------- */
.user-management-wrapper .user-profile-avatar {
    box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 3px var(--border-color);
}
.user-management-wrapper .queue-table tbody td {
    padding-top: 16px;
    padding-bottom: 16px;
}

/* ---------- Footer ---------- */
.site-footer {
    margin-top: 48px;
}
.footer-grid {
    gap: 48px;
}
.footer-links h4, .footer-contact h4 {
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.74rem !important;
    color: var(--text-muted);
}
.footer-links a {
    transition: color 0.15s ease, padding-left 0.2s var(--ease-out);
}
.footer-links a:hover {
    padding-left: 3px;
}
.footer-bottom {
    border-top: 1px solid var(--border-color);
}

/* ---------- Toasts ---------- */
.toast-msg {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

/* ---------- Mobile refinements ---------- */
@media (max-width: 900px) {
    .dashboard-layout-container {
        grid-template-columns: 1fr;
    }
    .dashboard-sidebar {
        position: static;
    }
    .dash-nav-list li.active a::before {
        display: none;
    }
    .dashboard-content-panel .settings-card {
        padding: 18px 16px;
    }
    .dashboard-content-panel .settings-tabs-nav {
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
    }
    .dashboard-content-panel .settings-tab-btn {
        white-space: nowrap;
    }
}
@media (max-width: 768px) {
    body { font-size: 0.97rem; }
    .header-container { padding: 10px 16px; }
    .site-content-wrapper { padding: 22px 16px; }
    .kpi-grid > a > div > div:last-child { font-size: 1.6rem !important; }
    .footer-grid { gap: 28px; }
}

/* ==========================================================================
   Production & Layout Desk: use the full panel width, no horizontal scroll
   ========================================================================== */
.dashboard-content-panel:has(.production-desk) {
    padding: 20px 22px;
}
.production-desk {
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}
.production-desk > p {
    margin-bottom: 14px !important;
}
/* compact filter bar: one row on desktop */
.production-desk form {
    grid-template-columns: 1.4fr 1.2fr 80px 80px 90px 1fr auto !important;
    gap: 10px !important;
}
.production-desk form > div[style*="max-width"] {
    max-width: none !important;
}
.production-desk form input,
.production-desk form select {
    padding: 8px 10px !important;
    border-radius: var(--radius-sm) !important;
}
.production-desk form > div:last-child {
    align-self: end;
}
/* table: fixed, compact columns so every column is visible */
.production-desk .table-container {
    overflow-x: visible;
    margin-top: 6px;
}
.production-desk .queue-table {
    table-layout: fixed;
    width: 100%;
}
.production-desk .queue-table th:nth-child(1) { width: 58px !important; }
.production-desk .queue-table th:nth-child(3) { width: 96px !important; }
.production-desk .queue-table th:nth-child(4) { width: 128px !important; }
.production-desk .queue-table th:nth-child(5) { width: 118px !important; }
.production-desk .queue-table th:nth-child(6) { width: 172px !important; }
.production-desk .queue-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 10px 10px;
}
.production-desk .queue-table tbody td {
    padding: 10px 10px;
    overflow-wrap: anywhere;
}
.production-desk .queue-table td:nth-child(4) span {
    white-space: normal;
    line-height: 1.35;
}
.production-desk .queue-table td:nth-child(5) .badge,
.production-desk .queue-table td:nth-child(3) .badge {
    white-space: nowrap;
}
.production-desk .tbl-cell-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.86rem;
    line-height: 1.38;
}
.production-desk .tbl-meta-sub {
    margin-top: 3px;
    font-size: 0.7rem;
}
.production-desk .tbl-actions {
    flex-wrap: nowrap;
    gap: 5px;
    justify-content: flex-end;
}
.production-desk .tbl-btn {
    padding: 5px 9px;
}
@media (max-width: 1100px) {
    .production-desk form {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important;
    }
    .production-desk .table-container {
        overflow-x: auto;
    }
    .production-desk .queue-table {
        min-width: 760px;
    }
}

/* production desk: final column budget */
.production-desk .queue-table th:nth-child(1) { width: 52px !important; }
.production-desk .queue-table th:nth-child(3) { width: 92px !important; }
.production-desk .queue-table th:nth-child(4) { width: 112px !important; }
.production-desk .queue-table th:nth-child(5) { width: 108px !important; }
.production-desk .queue-table th:nth-child(6) { width: 164px !important; }
.production-desk .queue-table thead th {
    white-space: normal;
    line-height: 1.25;
    font-size: 0.66rem;
}
.production-desk .queue-table td:nth-child(3) .badge {
    font-size: 0.6rem !important;
    padding: 2px 6px;
    white-space: normal;
}
.production-desk .tbl-actions { gap: 4px; }
.production-desk .tbl-btn { padding: 5px 8px; font-size: 0.72rem; }
.production-desk .tbl-btn-icon { padding: 4px 5px; min-width: 26px; flex-shrink: 0; }

/* ==========================================================================
   User management: compact rows, no horizontal scroll (259 users)
   ========================================================================== */
.user-management-wrapper .table-container {
    overflow-x: visible;
}
.user-management-wrapper .queue-table {
    table-layout: fixed;
    width: 100%;
}
.user-management-wrapper .queue-table th:nth-child(1) { width: 20%; }
.user-management-wrapper .queue-table th:nth-child(2) { width: 20%; }
.user-management-wrapper .queue-table th:nth-child(3) { width: 21%; }
.user-management-wrapper .queue-table th:nth-child(4) { width: 19%; }
.user-management-wrapper .queue-table th:nth-child(5) { width: 8%; }
.user-management-wrapper .queue-table th:nth-child(6) { width: 12%; }
.user-management-wrapper .queue-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    white-space: normal;
    padding: 10px 10px;
}
.user-management-wrapper .queue-table tbody td {
    padding: 10px 10px;
    overflow-wrap: anywhere;
}
/* role checkboxes: two columns instead of one tall stack */
.user-management-wrapper .queue-table td:nth-child(4) form {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 3px 10px !important;
}
.user-management-wrapper .queue-table td:nth-child(4) label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-management-wrapper .queue-table td:nth-child(6) form,
.user-management-wrapper .queue-table td:nth-child(5) form {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
@media (max-width: 1100px) {
    .user-management-wrapper .table-container {
        overflow-x: auto;
    }
    .user-management-wrapper .queue-table {
        min-width: 860px;
    }
}

/* user table: give the role column room so labels are not cut */
.user-management-wrapper .queue-table th:nth-child(1) { width: 19%; }
.user-management-wrapper .queue-table th:nth-child(2) { width: 19%; }
.user-management-wrapper .queue-table th:nth-child(3) { width: 17%; }
.user-management-wrapper .queue-table th:nth-child(4) { width: 25%; }
.user-management-wrapper .queue-table th:nth-child(5) { width: 8%; }
.user-management-wrapper .queue-table th:nth-child(6) { width: 12%; }
.user-management-wrapper .queue-table td:nth-child(4) form {
    grid-template-columns: auto auto;
    justify-content: start;
    gap: 4px 14px !important;
}
.user-management-wrapper .queue-table td:nth-child(4) label {
    overflow: visible;
    text-overflow: clip;
    font-size: 0.74rem !important;
}

/* ==========================================================================
   Round 4: modern editorial look
   Softer surfaces, pill controls, tinted atmosphere, refined type.
   ========================================================================== */

:root {
    --font-heading: 'Newsreader', 'Lora', Georgia, serif;
    --bg-primary: #f7f6f3;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --border-color: #e8e6e1;
    --border-light: #f0eee9;
    --text-primary: #16181d;
    --text-secondary: #3f4652;
    --text-muted: #6b7280;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-xs: 0 1px 2px rgba(22, 24, 29, 0.04);
    --shadow-sm: 0 1px 2px rgba(22, 24, 29, 0.04), 0 4px 12px -2px rgba(22, 24, 29, 0.05);
    --shadow: 0 2px 6px rgba(22, 24, 29, 0.04), 0 14px 32px -10px rgba(22, 24, 29, 0.12);
    --shadow-md: 0 4px 10px rgba(22, 24, 29, 0.05), 0 24px 48px -14px rgba(22, 24, 29, 0.18);
    --tint: color-mix(in srgb, var(--primary) 7%, transparent);
    --tint-strong: color-mix(in srgb, var(--primary) 14%, transparent);
}
[data-theme="dark"] {
    --bg-primary: #0c0f14;
    --bg-secondary: #12161d;
    --bg-card: #161b24;
    --border-color: #252c38;
    --border-light: #1b212b;
    --tint: color-mix(in srgb, var(--primary) 16%, transparent);
    --tint-strong: color-mix(in srgb, var(--primary) 28%, transparent);
}

/* ---------- Atmosphere ---------- */
body {
    background-color: var(--bg-primary);
    background-image:
        radial-gradient(900px 420px at 12% -80px, var(--tint), transparent 70%),
        radial-gradient(700px 360px at 95% -60px, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%);
    background-repeat: no-repeat;
}
h1, h2, h3, h4, .section-title, .brand-text h1 {
    font-family: var(--font-heading);
    font-optical-sizing: auto;
    letter-spacing: -0.018em;
}

/* ---------- Header: airy glass ---------- */
.utility-topbar {
    border-bottom: none;
}
.main-header {
    background: color-mix(in srgb, var(--bg-secondary) 78%, transparent);
    backdrop-filter: saturate(1.6) blur(18px);
    -webkit-backdrop-filter: saturate(1.6) blur(18px);
    border-bottom: 1px solid color-mix(in srgb, var(--border-color) 70%, transparent);
    box-shadow: none;
}
.brand-logo {
    border-radius: 14px;
    border: none;
    box-shadow: var(--shadow-sm);
}
.brand-text h1 {
    font-size: 1.36rem;
    font-weight: 600;
}
.nav-menu a {
    border-radius: var(--radius-full);
    padding: 8px 14px;
}
.nav-menu a:hover {
    background: var(--tint);
}
.nav-menu a.active {
    background: var(--tint-strong);
}
.action-icon-btn {
    border-radius: var(--radius-full);
    background: var(--bg-secondary);
}

/* ---------- Hero ---------- */
.journal-hero-card {
    border: none;
    border-radius: 28px;
    padding: 48px 52px;
    background:
        radial-gradient(520px 260px at 100% 0%, var(--tint-strong), transparent 70%),
        linear-gradient(180deg, var(--bg-secondary), color-mix(in srgb, var(--bg-secondary) 94%, var(--primary)));
    box-shadow: var(--shadow);
}
.journal-hero-card::before {
    display: none;
}
.hero-journal-title {
    font-size: clamp(2rem, 3.4vw, 2.9rem);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.03em;
}
.meta-pill, .index-chip, .pub-badge-link {
    border-radius: var(--radius-full);
    border-color: transparent;
    background: var(--tint);
}
.journal-cover-3d {
    border-radius: 6px 12px 12px 6px;
}

/* ---------- Buttons: pills ---------- */
.dergipark-btn-solid, .btn-primary, .dergipark-btn-outline, .btn-secondary,
.side-download-btn, .btn-card-pdf, .btn-block {
    border-radius: var(--radius-full);
}
.dergipark-btn-solid, .btn-primary {
    padding-left: 22px;
    padding-right: 22px;
}
.dergipark-btn-outline, .btn-secondary {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}
.dergipark-btn-outline:hover, .btn-secondary:hover {
    border-color: var(--primary);
    background: var(--tint);
}
.tbl-btn {
    border-radius: var(--radius-full);
    padding: 6px 13px;
}
.badge, .article-type-pill, .tbl-id-pill {
    border-radius: var(--radius-full);
}

/* ---------- Section titles ---------- */
.section-title {
    font-size: 1.55rem;
    font-weight: 600;
    border: none;
    padding-left: 0;
}
.section-title::before {
    display: none;
}

/* ---------- Search ---------- */
.search-input-modern {
    border-radius: var(--radius-full);
    padding-left: 22px;
    border-color: transparent;
    background: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
}
.search-input-modern:focus {
    border-color: var(--primary);
}
.search-form-row .dergipark-btn-solid, .search-form-row button {
    border-radius: var(--radius-full);
}
.issue-nav-bar {
    border: none;
    border-radius: var(--radius-full);
    background: var(--bg-secondary);
    box-shadow: var(--shadow-xs);
}

/* ---------- Article list: soft floating cards ---------- */
.article-card {
    border: 1px solid transparent;
    border-radius: 22px;
    padding: 28px 32px;
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}
.article-card:hover {
    border-color: var(--primary-border);
    box-shadow: var(--shadow-md);
    background: var(--bg-card);
}
.article-card h3 {
    font-size: 1.36rem;
    font-weight: 600;
    line-height: 1.28;
}
.article-card-meta-bar {
    border-top: 1px dashed var(--border-color);
}
.btn-card-pdf {
    background: var(--tint);
    border-color: transparent;
}

/* ---------- Right-hand menu & panels ---------- */
.dergipark-menu, .sidebar-panel {
    border: none;
    border-radius: 22px;
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}
.dergipark-menu {
    padding: 8px;
}
.dergipark-menu li {
    border: none;
}
.dergipark-menu a {
    border-radius: 14px;
    padding: 10px 12px;
}
.dergipark-menu a:hover {
    background: var(--tint);
    transform: none;
    padding-left: 12px;
}
.dergipark-menu i {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: var(--tint);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}
.sidebar-title {
    font-family: var(--font-heading);
    font-size: 1.12rem;
    font-weight: 600;
}

/* ---------- Article reading page ---------- */
.article-title-heading {
    font-size: clamp(1.9rem, 3vw, 2.6rem);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.028em;
}
.author-affiliation-card, .abstract-card-box, .article-header-box {
    border: none;
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
}
.abstract-text {
    font-size: 1.03rem;
    line-height: 1.8;
}

/* ---------- Dashboard ---------- */
.dashboard-sidebar {
    border: none;
    border-radius: 24px;
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}
.dashboard-content-panel {
    border: none;
    border-radius: 26px;
    box-shadow: var(--shadow-sm);
}
.dash-nav-list li a {
    border-radius: var(--radius-full);
    padding: 10px 14px;
}
.dash-nav-list li.active a {
    background: var(--tint-strong);
}
.dash-nav-list li.active a::before {
    display: none;
}
.user-profile-avatar {
    box-shadow: 0 0 0 3px var(--bg-card), 0 0 0 4px var(--tint-strong), var(--shadow-sm);
}
.table-container {
    border: none;
    border-radius: 20px;
    box-shadow: 0 0 0 1px var(--border-color);
}
.queue-table thead th {
    background: color-mix(in srgb, var(--bg-primary) 70%, var(--bg-secondary));
    border-bottom: 1px solid var(--border-color);
}
.queue-table tbody td {
    border-bottom-color: var(--border-light);
}
.dashboard-content-panel .settings-tabs-nav {
    border: none;
    border-radius: var(--radius-full);
    background: var(--bg-primary);
}
.dashboard-content-panel .settings-tab-btn {
    border-radius: var(--radius-full);
}
.dashboard-content-panel .settings-card {
    border: none;
    border-radius: 22px;
    box-shadow: 0 0 0 1px var(--border-color);
}
.kpi-grid > a > div {
    border: none !important;
    border-radius: 20px !important;
    box-shadow: 0 0 0 1px var(--border-color) !important;
}

/* ---------- Forms ---------- */
.form-group input, .form-group textarea, .form-group select,
.dashboard-content-panel input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
.dashboard-content-panel select,
.dashboard-content-panel textarea {
    border-radius: 12px;
    background-color: var(--bg-primary);
    border-color: transparent;
    box-shadow: inset 0 0 0 1px var(--border-color);
}
.dashboard-content-panel input:focus,
.dashboard-content-panel select:focus,
.dashboard-content-panel textarea:focus {
    background-color: var(--bg-secondary);
    border-color: transparent;
    box-shadow: inset 0 0 0 1.5px var(--primary), 0 0 0 4px var(--tint);
}
.auth-container {
    border: none;
    border-radius: 28px;
}

/* ---------- Editorial cards & policies ---------- */
.editorial-member-card, .editor-card, .policy-box {
    border: none !important;
    border-radius: 22px !important;
    box-shadow: var(--shadow-sm) !important;
}

/* ---------- Footer ---------- */
.site-footer {
    border-top: none;
    background: color-mix(in srgb, var(--bg-secondary) 60%, var(--bg-primary));
    border-radius: 32px 32px 0 0;
    box-shadow: 0 -1px 0 var(--border-color);
}

@media (max-width: 768px) {
    .journal-hero-card { padding: 30px 24px; border-radius: 22px; }
    .article-card { padding: 20px 20px; border-radius: 18px; }
    .dashboard-content-panel { border-radius: 20px; }
    .site-footer { border-radius: 24px 24px 0 0; }
}

/* Dark tokens must be restated: the round-4 :root block above has equal specificity and loads later */
[data-theme="dark"] {
    --text-primary: #f1f5f9;
    --text-secondary: #c3cddc;
    --text-muted: #94a3b8;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 12px -2px rgba(0, 0, 0, 0.35);
    --shadow: 0 2px 6px rgba(0, 0, 0, 0.35), 0 14px 32px -10px rgba(0, 0, 0, 0.6);
    --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.4), 0 24px 48px -14px rgba(0, 0, 0, 0.7);
}

/* Dark mode: the configured brand color is often too dark for text on dark surfaces.
   Keep the brand hue but lift it. --brand-base keeps a cycle-free copy of the original. */
:root { --brand-base: var(--primary); --brand-base-hover: var(--primary-hover); }
[data-theme="dark"] body,
body[data-theme="dark"] {
    --primary: color-mix(in srgb, var(--brand-base) 52%, #ffffff);
    --primary-hover: color-mix(in srgb, var(--brand-base) 38%, #ffffff);
    --primary-light: color-mix(in srgb, var(--brand-base) 22%, transparent);
    --primary-border: color-mix(in srgb, var(--brand-base) 45%, transparent);
    --primary-glow: color-mix(in srgb, var(--brand-base) 40%, transparent);
}
/* filled buttons keep dark text-on-light contrast in the lifted color */
[data-theme="dark"] .dergipark-btn-solid, [data-theme="dark"] .btn-primary,
[data-theme="dark"] .side-download-btn, [data-theme="dark"] .tbl-btn-primary {
    color: #08110d !important;
}

/* ==========================================================================
   Round 5: prestige layer
   Deep ink masthead + footer, brass hairline details, calmer rhythm.
   ========================================================================== */
:root {
    --ink: color-mix(in srgb, var(--brand-base) 42%, #0a100e);
    --ink-2: color-mix(in srgb, var(--brand-base) 55%, #0a100e);
    --brass: #b9975b;
    --brass-soft: color-mix(in srgb, #b9975b 40%, transparent);
    --on-ink: #e9efec;
    --on-ink-muted: #a9b8b1;
}

/* ---------- Masthead strip ---------- */
.utility-topbar {
    background: var(--ink);
    color: var(--on-ink-muted);
    font-size: 0.74rem;
    letter-spacing: 0.04em;
    padding: 7px 0;
    border-bottom: 1px solid var(--brass-soft);
}
.utility-left, .utility-left span {
    color: var(--on-ink-muted);
    font-weight: 500;
}
.utility-right a {
    color: var(--on-ink) !important;
    font-weight: 500;
}
.utility-right a:hover {
    color: var(--brass) !important;
}
.utility-topbar .action-icon-btn {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
    color: var(--on-ink) !important;
    width: 28px;
    height: 28px;
}
.utility-topbar .action-icon-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: var(--brass-soft);
}
.utility-topbar .lang-switch-toggle a {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
    color: var(--on-ink);
}

/* ---------- Brand ---------- */
.brand-text h1 {
    font-size: 1.42rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}
.brand-link {
    gap: 16px;
}
.brand-link::after {
    content: '';
    width: 1px;
    height: 30px;
    background: var(--brass-soft);
    order: 1;
    display: none;
}

/* ---------- Brass hairline details ---------- */
.hero-journal-title::after {
    content: '';
    display: block;
    width: 56px;
    height: 2px;
    margin-top: 16px;
    background: var(--brass);
    border-radius: 2px;
}
.section-title {
    position: relative;
    padding-bottom: 14px;
    margin-bottom: 22px;
}
.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 44px;
    height: 2px;
    background: var(--brass);
    border-radius: 2px;
}
.sidebar-title {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 14px;
}
.article-title-heading::after {
    content: '';
    display: block;
    width: 56px;
    height: 2px;
    margin-top: 18px;
    background: var(--brass);
}
.dashboard-content-panel > h2:first-child::after,
.dashboard-content-panel > h3:first-child::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    margin-top: 10px;
    background: var(--brass);
}

/* ---------- Hero refinement ---------- */
.journal-hero-card {
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--brass) 28%, var(--border-color)), var(--shadow);
}
.journal-cover-3d {
    box-shadow: 0 30px 50px -18px rgba(10, 16, 14, 0.5), 0 10px 18px -8px rgba(10, 16, 14, 0.3);
}

/* ---------- Article cards: editorial rhythm ---------- */
.article-card h3 a {
    background-image: linear-gradient(var(--brass), var(--brass));
    background-size: 0 1px;
    background-repeat: no-repeat;
    background-position: 0 100%;
    transition: background-size 0.35s var(--ease-out), color 0.15s ease;
    padding-bottom: 2px;
}
.article-card:hover h3 a {
    background-size: 100% 1px;
}
.article-authors-str {
    font-variant-caps: normal;
    letter-spacing: 0.005em;
    color: var(--text-primary);
}
.article-doi-link {
    font-feature-settings: "tnum";
}

/* ---------- Footer: deep ink ---------- */
.site-footer {
    background: var(--ink);
    color: var(--on-ink-muted);
    border-radius: 36px 36px 0 0;
    box-shadow: none;
    border-top: 1px solid var(--brass-soft);
    margin-top: 64px;
}
.site-footer h3, .site-footer h4, .footer-brand h3 {
    color: var(--on-ink) !important;
    font-family: var(--font-heading);
}
.footer-links h4, .footer-contact h4 {
    color: var(--brass) !important;
}
.site-footer p, .site-footer li, .site-footer span, .license-info {
    color: var(--on-ink-muted);
}
.site-footer a {
    color: var(--on-ink);
}
.site-footer a:hover {
    color: var(--brass);
}
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--on-ink-muted);
}
.site-footer img {
    max-width: 100%;
}

/* ---------- Dashboard: quiet, structured ---------- */
.dashboard-sidebar {
    box-shadow: 0 0 0 1px var(--border-color), var(--shadow-xs);
}
.dashboard-content-panel {
    box-shadow: 0 0 0 1px var(--border-color), var(--shadow-sm);
}
.user-profile-summary h4 {
    font-family: var(--font-heading);
    font-size: 1.12rem;
}
.dash-nav-list li a {
    font-weight: 500;
}
.dash-nav-list li.active a {
    font-weight: 650;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 22%, transparent);
}

/* ---------- Auth ---------- */
.auth-container {
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--brass) 25%, var(--border-color)), var(--shadow-md);
}
.auth-header h2 {
    font-weight: 600;
}
.auth-header h2::after {
    content: '';
    display: block;
    width: 44px;
    height: 2px;
    margin: 14px auto 0;
    background: var(--brass);
}

/* ---------- Dark mode: masthead already dark; keep brass legible ---------- */
[data-theme="dark"] {
    --ink: color-mix(in srgb, var(--brand-base) 30%, #05080a);
    --brass: #c9a96d;
}

/* inline-styled masthead items need !important to recolor on the dark strip */
.utility-topbar .utility-left span { color: var(--on-ink-muted) !important; font-weight: 500 !important; }
.utility-topbar .utility-right > span { color: rgba(255, 255, 255, 0.22) !important; }
.utility-topbar .utility-right > a { color: var(--on-ink) !important; font-weight: 500 !important; }
.utility-topbar .utility-right > a:hover { color: var(--brass) !important; }
.utility-topbar .utility-right > a.action-icon-btn { color: var(--on-ink) !important; }

/* ==========================================================================
   Issues desk: replace the rainbow of action buttons with quiet chips
   ========================================================================== */
.queue-table td a.btn-primary[href*="export_xml.php"],
.queue-table td a.btn-primary[href*="action=aperta"],
.queue-table td a.btn-primary[href*="action=zenodo"],
.queue-table td a.btn-primary[href*="edit_id="] {
    background: var(--bg-secondary) !important;
    color: var(--text-secondary) !important;
    border: 1px solid color-mix(in srgb, var(--border-color) 60%, var(--text-muted)) !important;
    border-radius: var(--radius-full) !important;
    font-weight: 600 !important;
    padding: 4px 11px !important;
    box-shadow: none;
}
.queue-table td a.btn-primary[href*="export_xml.php"]:hover,
.queue-table td a.btn-primary[href*="action=aperta"]:hover,
.queue-table td a.btn-primary[href*="action=zenodo"]:hover,
.queue-table td a.btn-primary[href*="edit_id="]:hover {
    background: var(--tint) !important;
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    transform: none;
}
.queue-table td form button.btn-primary[style*="var(--danger)"] {
    background: var(--danger-light) !important;
    color: var(--danger) !important;
    border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent) !important;
    border-radius: var(--radius-full) !important;
    padding: 4px 11px !important;
}
.queue-table td form button.btn-primary[style*="var(--danger)"]:hover {
    background: var(--danger) !important;
    color: #fff !important;
}
.queue-table td > div[style*="justify-content:flex-end"] {
    max-width: 280px;
    margin-left: auto;
}
.queue-table td > div[style*="justify-content:flex-end"] {
    max-width: none;
    min-width: 250px;
    gap: 5px !important;
}

/* ==========================================================================
   Assigned Reviewers & Evaluation Reports: one card per reviewer,
   everything visible, no horizontal scrolling
   ========================================================================== */
.reviewer-table-wrap {
    overflow: visible !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}
.reviewer-table,
.reviewer-table tbody {
    display: block;
    width: 100%;
    min-width: 0 !important;
}
.reviewer-table thead {
    display: none;
}
.reviewer-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    grid-template-areas:
        "who    status"
        "meta   meta"
        "acts   acts";
    gap: 14px 24px;
    padding: 18px 20px;
    margin-bottom: 14px;
    background: var(--bg-card);
    border-radius: 18px;
    box-shadow: 0 0 0 1px var(--border-color), var(--shadow-xs);
}
.reviewer-table tbody tr:hover td {
    background: transparent !important;
}
.reviewer-table tbody td {
    display: block;
    padding: 0 !important;
    border: none !important;
    background: transparent;
    min-width: 0;
    text-align: left !important;
    overflow-wrap: anywhere;
}
.reviewer-table td:nth-child(1) { grid-area: who; }
.reviewer-table td.rv-status    { grid-area: status; }

/* round, due date, verdict, to-author become a labelled strip */
.reviewer-table td.rv-round,
.reviewer-table td.rv-due,
.reviewer-table td.rv-verdict,
.reviewer-table td.rv-incl {
    grid-area: meta;
}
.reviewer-table tbody tr {
    --strip-gap: 10px;
}
.reviewer-table td.rv-round,
.reviewer-table td.rv-due,
.reviewer-table td.rv-verdict,
.reviewer-table td.rv-incl {
    display: inline-flex !important;
    flex-direction: column;
    gap: 5px;
    align-items: flex-start;
    justify-self: start;
    margin-right: 28px;
}
.reviewer-table td[data-label]::before {
    content: attr(data-label);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.reviewer-table td.rv-actions {
    grid-area: acts;
    padding-top: 14px !important;
    border-top: 1px solid var(--border-light) !important;
}
.reviewer-table td.rv-actions .tbl-actions {
    justify-content: flex-start !important;
    flex-wrap: wrap;
    gap: 6px;
}
.reviewer-table td.rv-status {
    text-align: right !important;
}
.reviewer-table td.rv-status > div {
    justify-content: flex-end;
}

/* the four meta cells share one row: use a flex wrapper via the grid area */
@supports (display: contents) {
    .reviewer-table tbody tr {
        grid-template-columns: auto auto auto auto minmax(0, 1fr);
        grid-template-areas:
            "who    who    who    status status"
            "round  due    verdict incl   .     "
            "acts   acts   acts   acts   acts  ";
    }
    .reviewer-table td.rv-round   { grid-area: round;   margin-right: 0; }
    .reviewer-table td.rv-due     { grid-area: due;     margin-right: 0; }
    .reviewer-table td.rv-verdict { grid-area: verdict; margin-right: 0; }
    .reviewer-table td.rv-incl    { grid-area: incl;    margin-right: 0; }
    .reviewer-table tbody tr { column-gap: 36px; }
    .reviewer-table td.rv-status { grid-column: 4 / -1; }
}
@media (max-width: 700px) {
    .reviewer-table tbody tr {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "who    who"
            "status status"
            "round  due"
            "verdict incl"
            "acts   acts";
    }
    .reviewer-table td.rv-status { grid-column: 1 / -1; text-align: left !important; }
    .reviewer-table td.rv-status > div { justify-content: flex-start; }
}

/* ==========================================================================
   Theme-Adaptive Newsletter Components
   ========================================================================== */

/* 1. Bottom Wide Banner ("Stay Informed on Journal Updates") */
.newsletter-wide-banner {
    background: linear-gradient(135deg, #090d16 0%, var(--primary) 100%) !important;
    border-radius: var(--radius-md, 12px) !important;
    padding: 24px 28px !important;
    margin-top: 30px !important;
    color: #ffffff !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    position: relative !important;
    overflow: hidden !important;
}

[data-theme="dark"] .newsletter-wide-banner {
    background: linear-gradient(135deg, #0f172a 0%, rgba(var(--primary-rgb, 162, 8, 61), 0.45) 100%) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.newsletter-wide-banner .newsletter-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: rgba(255, 255, 255, 0.16) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    padding: 3px 10px !important;
    border-radius: 20px !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    margin-bottom: 8px !important;
}

.newsletter-wide-banner .newsletter-input {
    padding: 10px 14px !important;
    border-radius: var(--radius-sm, 6px) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    font-size: 0.85rem !important;
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    outline: none !important;
    transition: var(--transition, all 0.2s) !important;
}

.newsletter-wide-banner .newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
}

.newsletter-wide-banner .newsletter-input:focus {
    border-color: #ffffff !important;
    background: rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2) !important;
}

.newsletter-wide-banner .btn-newsletter-submit {
    background: #ffffff !important;
    color: var(--primary) !important;
    border: none !important;
    padding: 10px 18px !important;
    border-radius: var(--radius-sm, 6px) !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
    transition: var(--transition, all 0.2s) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.newsletter-wide-banner .btn-newsletter-submit:hover {
    background: var(--primary-light, #f8fafc) !important;
    color: var(--primary-hover) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25) !important;
}

/* 2. Sidebar Panel ("Subscribe to Newsletter") */
.newsletter-sidebar-panel {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--bg-card) 100%) !important;
    border: 1px solid var(--primary-border) !important;
    border-radius: var(--radius-md, 10px) !important;
    padding: 18px 16px !important;
    margin-bottom: 20px !important;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb, 162, 8, 61), 0.08) !important;
    transition: var(--transition, all 0.2s) !important;
}

[data-theme="dark"] .newsletter-sidebar-panel {
    background: linear-gradient(135deg, rgba(var(--primary-rgb, 162, 8, 61), 0.12) 0%, var(--bg-card) 100%) !important;
    border-color: rgba(var(--primary-rgb, 162, 8, 61), 0.3) !important;
}

.newsletter-sidebar-panel .newsletter-icon-box {
    width: 36px !important;
    height: 36px !important;
    border-radius: 8px !important;
    background: var(--primary) !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.1rem !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 6px rgba(var(--primary-rgb, 162, 8, 61), 0.3) !important;
}

.newsletter-sidebar-panel .newsletter-tagline {
    font-size: 0.72rem !important;
    color: var(--primary) !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
}

.newsletter-sidebar-panel .btn-newsletter-submit {
    background: var(--primary) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 9px 14px !important;
    border-radius: var(--radius-sm, 6px) !important;
    font-size: 0.86rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    transition: var(--transition, all 0.2s) !important;
    box-shadow: 0 2px 6px rgba(var(--primary-rgb, 162, 8, 61), 0.25) !important;
}

.newsletter-sidebar-panel .btn-newsletter-submit:hover {
    background: var(--primary-hover) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 10px rgba(var(--primary-rgb, 162, 8, 61), 0.35) !important;
}

