/* ============================================================
   RMS Panel — Shared Theme
   Include this in every page:
     <link rel="stylesheet" href="../theme.css">
   (adjust path as needed depending on file location)
   ============================================================ */

/* ── Design tokens ──────────────────────────────────────────────────────────── */
:root {
    --bg-color:   #f4f7f6;
    --side-bar:   #2c3e50;
    --accent:     #3498db;
    --deep-blue:  #1e3a5f;
    --white:      #ffffff;
    --text-main:  #333333;
    --muted:      #7f8c8d;
    --line:       #dde1e4;
    --cream:      #eef1f3;
    --danger:     #e74c3c;
    --success:    #27ae60;
    --warning:    #f39c12;
    --radius:     4px;
    --font:       'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Shell ──────────────────────────────────────────────────────────────────── */
body {
    font-family: var(--font);
    margin: 0;
    display: flex;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
}

/* ── Sidebar ────────────────────────────────────────────────────────────────── */
.sidebar {
    width: 250px;
    height: 100vh;
    background: var(--side-bar);
    color: var(--white);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    overflow-y: auto;
    transition: all 0.3s;
}
.sidebar h2 {
    text-align: center;
    font-weight: 400;
    padding: 20px 0;
    margin: 0;
    border-bottom: 1px solid #3e4f5f;
    font-size: 18px;
}
.sidebar a {
    display: block;
    color: #bdc3c7;
    padding: 15px 25px;
    text-decoration: none;
    transition: 0.2s;
    font-size: 14px;
}
.sidebar a i {
    width: 20px;
    margin-right: 8px;
    text-align: center;
}
.sidebar a:hover,
.sidebar a.active {
    background: #3e4f5f;
    color: var(--white);
}

/* ── Main content area ──────────────────────────────────────────────────────── */
.main-content {
    margin-left: 250px;
    padding: 32px 36px 80px;
    width: calc(100% - 250px);
    min-height: 100vh;
    box-sizing: border-box;
}

/* ── Page header ────────────────────────────────────────────────────────────── */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}
.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}
.page-header-left .eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 4px;
}
.page-header-left h1 {
    font-size: clamp(18px, 2.5vw, 24px);
    font-weight: 700;
    color: var(--side-bar);
    line-height: 1.2;
}
.page-header-left .sub {
    font-size: 12px;
    color: var(--muted);
    margin-top: 3px;
}

/* ── Stat pills (publications page) ────────────────────────────────────────── */
.stat-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.stat-pill {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 5px 13px;
    font-size: 12px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.stat-pill strong { color: var(--side-bar); font-size: 13px; }
.stat-pill i { color: var(--accent); }

/* ── Logout / user-actions ──────────────────────────────────────────────────── */
.logout-btn {
    background: var(--danger);
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 500;
}

/* ── Action bar (employees page toolbar) ────────────────────────────────────── */
.action-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    background: var(--white);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* ── Toolbar (publications page) ────────────────────────────────────────────── */
.toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: flex-end;
}

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
    padding: 8px 15px;
    border-radius: var(--radius);
    cursor: pointer;
    border: 1px solid transparent;
    font-size: 13px;
    font-family: var(--font);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 36px;
    box-sizing: border-box;
    transition: 0.2s;
}
.btn-add    { background: var(--accent); color: white; }
.btn-import { background: var(--success); color: white; border: none; }
.btn-primary {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 10px 26px;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.btn-primary:hover { background: #2176ae; }
.btn-secondary {
    background: var(--cream);
    color: var(--text-main);
    border: 1px solid var(--line);
    padding: 10px 18px;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 14px;
    cursor: pointer;
    transition: background .15s;
}
.btn-secondary:hover { background: var(--line); }
.btn-danger {
    background: var(--danger);
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.btn-danger:hover { background: #c0392b; }
.btn-reset {
    padding: 9px 13px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 13px;
    color: var(--text-main);
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.btn-reset:hover { background: var(--line); }
.btn-icon {
    width: 30px;
    height: 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--text-main);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: all .15s;
}
.btn-icon:hover             { border-color: var(--accent); color: var(--accent); background: #eaf4fc; }
.btn-icon.del:hover         { border-color: var(--danger); color: var(--danger); background: #fdf1f0; }
.btn-icon.view-btn:hover    { border-color: var(--success); color: var(--success); background: #eaf7ef; }
.btn-delete-icon {
    background: var(--danger);
    color: white;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: none;
    cursor: pointer;
    border: none;
    align-items: center;
    justify-content: center;
}

/* ── Search ─────────────────────────────────────────────────────────────────── */
.search-pill-container {
    display: flex;
    align-items: center;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 50px;
    padding: 2px 5px 2px 15px;
    width: 320px;
}
.search-input {
    flex-grow: 1;
    border: none;
    padding: 8px;
    outline: none;
    background: transparent;
    font-size: 13px;
}
.search-box { flex: 1; min-width: 240px; position: relative; }
.search-box input {
    width: 100%;
    padding: 10px 40px 10px 38px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 14px;
    color: var(--text-main);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.search-box input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(52,152,219,.15);
}
.search-box .si {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 14px;
    pointer-events: none;
}
.search-box .clr {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    display: none;
    padding: 2px 5px;
}
.search-box .clr:hover { color: var(--danger); }
.search-box .clr.show  { display: block; }

/* ── Filter selects ─────────────────────────────────────────────────────────── */
.filter-group { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.filter-group label {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    white-space: nowrap;
}
select.filter-sel,
div.filter-sel {
    padding: 9px 30px 9px 12px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 13px;
    color: var(--text-main);
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237f8c8d' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: border-color .15s;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
select.filter-sel:focus,
div.filter-sel:focus     { border-color: var(--accent); }
div.filter-sel           { cursor: pointer; user-select: none; width: 130px; box-sizing: border-box; }
div.filter-sel.active    { border-color: var(--accent); color: var(--accent); }

/* ── File upload ────────────────────────────────────────────────────────────── */
.file-upload-wrapper { display: flex; align-items: center; gap: 5px; }
.custom-file-label {
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #ccc;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    height: 36px;
    box-sizing: border-box;
    color: #555;
    min-width: 120px;
}
#csv_file, #xls_file { display: none; }

/* ── Result meta ────────────────────────────────────────────────────────────── */
.result-meta {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.result-meta strong { color: var(--text-main); }
.filters-active-badge {
    background: #eaf4fc;
    border: 1px solid #a8d4f0;
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ── Tables ─────────────────────────────────────────────────────────────────── */
.table-wrapper, .table-wrap {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    position: relative;
}
.table-wrapper { max-height: 65vh; }
.table-wrapper::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar       { width: 8px; height: 8px; }
.table-wrapper::-webkit-scrollbar-track,
.table-wrap::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 10px; }
.table-wrapper::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb { background: #ccc; border-radius: 10px; }
.table-wrapper::-webkit-scrollbar-thumb:hover,
.table-wrap::-webkit-scrollbar-thumb:hover { background: var(--accent); }

table           { width: 100%; border-collapse: collapse; min-width: 1100px; }
thead th        { background: var(--side-bar); color: #fff; font-weight: 600; font-size: 12px; padding: 12px 14px; text-align: left; white-space: nowrap; position: sticky; top: 0; z-index: 10; }
tbody tr        { border-bottom: 1px solid var(--cream); transition: background .1s; }
tbody tr:hover  { background: #f0f6ff; }
tbody tr:last-child { border-bottom: none; }
td              { padding: 11px 14px; font-size: 13px; vertical-align: top; border-bottom: 1px solid #eee; }
td.nowrap       { white-space: nowrap; }

/* ── Highlight (search match) ───────────────────────────────────────────────── */
.highlight { background: #fff176; font-weight: bold; border-radius: 2px; }

/* ── Pagination ─────────────────────────────────────────────────────────────── */
.pagination-bar {
    margin-top: 20px;
    background: var(--white);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.pagination { display: flex; gap: 6px; align-items: center; justify-content: center; margin-top: 22px; flex-wrap: wrap; }
.page-link, .page-btn {
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-main);
    background: var(--white);
    font-family: var(--font);
    font-size: 13px;
    cursor: pointer;
    transition: all .15s;
    display: inline-block;
}
.page-link:hover, .page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn.active  { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.page-btn.disabled { opacity: .4; cursor: default; pointer-events: none; }
.page-info { font-size: 12px; color: var(--muted); padding: 7px 8px; }

/* ── Modals ─────────────────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 1000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 30px 16px;
    overflow-y: auto;
}
.modal-overlay.open { display: flex; }
.modal {
    background: var(--white);
    border-radius: 6px;
    width: 100%;
    max-width: 940px;
    box-shadow: 0 8px 40px rgba(0,0,0,.18);
    display: flex;
    flex-direction: column;
}
.modal-header {
    background: var(--side-bar);
    padding: 18px 24px;
    border-radius: 6px 6px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.modal-header h2     { font-size: 16px; font-weight: 600; color: #fff; }
.modal-header .modal-pid { font-size: 11px; color: rgba(255,255,255,.45); margin-left: 10px; }
.modal-close {
    background: none; border: none;
    color: rgba(255,255,255,.65);
    font-size: 22px; cursor: pointer; line-height: 1;
    padding: 4px 8px; transition: color .15s;
}
.modal-close:hover { color: #fff; }
.modal-body   { padding: 24px; overflow-y: auto; }
.modal-footer {
    padding: 15px 24px;
    border-top: 1px solid var(--line);
    display: flex; align-items: center;
    justify-content: flex-end; gap: 10px;
    flex-shrink: 0;
}

/* ── Confirm overlay ────────────────────────────────────────────────────────── */
.confirm-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 2000; display: none;
    align-items: center; justify-content: center;
}
.confirm-overlay.open { display: flex; }
.confirm-box {
    background: var(--white);
    border-radius: 6px;
    padding: 30px 26px;
    max-width: 400px; width: 90%;
    box-shadow: 0 8px 40px rgba(0,0,0,.2);
    text-align: center;
}
.confirm-box i          { font-size: 34px; color: var(--danger); margin-bottom: 12px; }
.confirm-box h3         { font-size: 16px; font-weight: 700; color: var(--text-main); margin-bottom: 8px; }
.confirm-box p          { font-size: 13px; color: var(--muted); margin-bottom: 20px; line-height: 1.5; }
.confirm-box .cbtns     { display: flex; gap: 10px; justify-content: center; }

/* ── Toast ──────────────────────────────────────────────────────────────────── */
.toast {
    position: fixed; bottom: 28px; right: 28px;
    background: var(--side-bar); color: #fff;
    padding: 11px 20px;
    border-radius: var(--radius);
    font-size: 13px; font-weight: 600;
    box-shadow: 0 4px 18px rgba(0,0,0,.2);
    z-index: 3000;
    transform: translateY(20px); opacity: 0;
    transition: all .3s; pointer-events: none;
}
.toast.show    { transform: translateY(0); opacity: 1; }
.toast.success { border-left: 4px solid var(--success); }
.toast.error   { border-left: 4px solid var(--danger); }

/* ── Spinner ────────────────────────────────────────────────────────────────── */
.spinner-overlay {
    position: absolute; inset: 0;
    background: rgba(255,255,255,.75);
    display: none; align-items: center; justify-content: center;
    border-radius: 6px; z-index: 10;
}
.spinner-overlay.show { display: flex; }
.spin {
    width: 30px; height: 30px;
    border: 3px solid var(--line);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: rot .7s linear infinite;
}
@keyframes rot { to { transform: rotate(360deg); } }
.modal-relative { position: relative; }

/* ── Form fields ────────────────────────────────────────────────────────────── */
.section        { margin-bottom: 24px; }
.section-title  { font-size: 13px; font-weight: 700; color: var(--side-bar); padding-bottom: 7px; border-bottom: 1px solid var(--line); margin-bottom: 14px; display: flex; align-items: center; gap: 7px; }
.grid-2         { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3         { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.field          { display: flex; flex-direction: column; gap: 4px; }
.field label    { font-weight: 600; font-size: 12px; color: var(--text-main); }
.field label .req { color: var(--danger); margin-left: 2px; }
input[type=text].fi,
input[type=tel].fi,
input[type=date].fi,
input[type=email].fi,
select.fi,
textarea.fi {
    width: 100%; padding: 8px 12px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-family: var(--font); font-size: 13px;
    color: var(--text-main);
    transition: border-color .15s, box-shadow .15s;
    outline: none; appearance: none;
}
input.fi:focus, select.fi:focus, textarea.fi:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(52,152,219,.15);
}
select.fi {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237f8c8d' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px;
}
textarea.fi { min-height: 68px; resize: vertical; }

/* ── Searchable select (ss-*) ───────────────────────────────────────────────── */
.ss-wrap    { position: relative; }
.ss-input   { width: 100%; padding: 8px 32px 8px 12px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); font-family: var(--font); font-size: 13px; color: var(--text-main); outline: none; transition: border-color .15s; }
.ss-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(52,152,219,.15); }
.ss-clear   { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--muted); cursor: pointer; font-size: 18px; line-height: 1; display: none; z-index: 5; }
.ss-clear:hover { color: var(--danger); }
.ss-clear.vis   { display: block; }
.ss-dd      { position: absolute; top: 100%; left: 0; right: 0; background: var(--white); border: 1px solid var(--accent); border-top: none; border-radius: 0 0 var(--radius) var(--radius); max-height: 180px; overflow-y: auto; z-index: 900; display: none; box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.ss-dd.open { display: block; }
.ss-opt     { padding: 8px 12px; cursor: pointer; font-size: 13px; border-bottom: 1px solid var(--cream); transition: background .1s; }
.ss-opt:hover, .ss-opt.sel { background: #eaf4fc; }
.ss-opt.sel { color: var(--accent); font-weight: 600; }
.ss-nores   { padding: 14px; text-align: center; color: var(--muted); font-size: 13px; cursor: default; }

/* ── View modal ─────────────────────────────────────────────────────────────── */
.view-grid          { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 22px; }
.view-field label   { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; display: block; margin-bottom: 3px; }
.view-field p       { font-size: 13px; color: var(--text-main); word-break: break-word; }
.view-field.full    { grid-column: 1 / -1; }
.view-section-title { font-size: 13px; font-weight: 700; color: var(--side-bar); border-bottom: 1px solid var(--line); padding-bottom: 7px; margin: 20px 0 12px; grid-column: 1 / -1; display: flex; align-items: center; gap: 7px; }
.authors-grid       { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; grid-column: 1 / -1; }
.author-detail-card { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 13px; }
.author-detail-card .a-title { font-weight: 700; color: var(--side-bar); margin-bottom: 5px; font-size: 12px; }
.author-detail-card .a-row   { display: flex; gap: 5px; margin-top: 3px; font-size: 12px; }
.author-detail-card .a-lbl   { font-weight: 600; color: var(--muted); min-width: 76px; font-size: 11px; }
.file-link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-size: 13px; text-decoration: none; }
.file-link:hover { color: var(--deep-blue); text-decoration: underline; }

/* ── Table badges / chips ───────────────────────────────────────────────────── */
.pid-badge      { display: inline-block; background: var(--deep-blue); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px; letter-spacing: .04em; white-space: nowrap; }
.title-cell     { max-width: 280px; }
.title-cell .ptitle { font-weight: 600; color: var(--text-main); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.title-cell .pmeta  { font-size: 11px; color: var(--muted); margin-top: 3px; }
.journal-cell   { max-width: 200px; }
.journal-cell .jname { font-weight: 500; line-height: 1.35; }
.journal-cell .jmeta { font-size: 11px; color: var(--muted); }
.index-tags     { display: flex; flex-wrap: wrap; gap: 4px; max-width: 200px; }
.index-tag      { display: inline-block; padding: 2px 7px; background: var(--cream); border: 1px solid var(--line); border-radius: 10px; font-size: 10px; font-weight: 600; color: var(--text-main); white-space: nowrap; }
.index-tag.scopus { background: #e8f4fd; border-color: #a8d4f0; color: #1e6fa5; }
.index-tag.wos    { background: #eaf7ef; border-color: #a8dbb5; color: #1a6b3a; }
.index-tag.abdc   { background: #fef9e7; border-color: #f9e79f; color: #7d6608; }
.author-chips   { display: flex; flex-wrap: wrap; gap: 4px; max-width: 220px; }
.author-chip    { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 600; white-space: nowrap; }
.author-chip.bwu     { background: #eaf7ef; color: #1a6b3a; border: 1px solid #a8dbb5; }
.author-chip.student { background: #e8f4fd; color: #1e6fa5; border: 1px solid #a8d4f0; }
.author-chip.other   { background: #f4f4f4; color: #555; border: 1px solid #ddd; }
.author-chip.corr    { background: #fef3e2; color: #874700; border: 1px solid #f5cba7; }
.quartile-badge { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 11px; font-weight: 700; }
.q1  { background: #d5f5e3; color: #1a6b3a; }
.q2  { background: #d6eaf8; color: #1a5276; }
.q3  { background: #fef9e7; color: #7d6608; }
.q4  { background: #fde8e8; color: #922b21; }
.qna { background: var(--cream); color: var(--muted); }
.action-cell { white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.empty-state    { padding: 60px 20px; text-align: center; color: var(--muted); }
.empty-state i  { font-size: 40px; margin-bottom: 14px; display: block; color: var(--line); }

/* ── Author edit blocks ─────────────────────────────────────────────────────── */
.checkbox-grid-sm   { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 7px; }
.check-item         { display: flex; align-items: center; gap: 7px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 7px 10px; cursor: pointer; font-size: 12px; transition: border-color .15s, background .15s; }
.check-item:hover   { border-color: var(--accent); background: #eaf4fc; }
.check-item input[type=checkbox] { accent-color: var(--accent); width: 13px; height: 13px; flex-shrink: 0; }
.author-block-edit       { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px; margin-bottom: 10px; }
.author-block-edit-title { font-size: 12px; font-weight: 700; color: var(--side-bar); margin-bottom: 9px; }
.sub-label   { font-size: 11px; font-weight: 600; color: var(--muted); margin-bottom: 3px; display: block; }
.student-fg  { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.other-fg    { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.nil-notice-sm { background: #eef6ff; border: 1px solid #c5d9f0; border-radius: var(--radius); padding: 6px 10px; font-size: 11px; color: var(--deep-blue); margin-bottom: 8px; }
.nil-grid-sm { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.code-disp   { padding: 8px 12px; background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); font-size: 13px; color: var(--muted); }
.code-disp.hv { color: var(--deep-blue); font-weight: 700; background: #eef6ff; border-color: var(--accent); }

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
    .grid-2, .grid-3, .view-grid  { grid-template-columns: 1fr; }
    .authors-grid                  { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
    .student-fg, .other-fg, .nil-grid-sm { grid-template-columns: 1fr; }
}