﻿/* =================================================================== */
/* Editor pages: manage tables, forms, import wizard, versions, login. */
/* =================================================================== */

.page-wrap { max-width: 1080px; }
.page-wrap-narrow { max-width: 640px; }

.page-actions { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
    .page-actions .filter-input { flex: 1; min-width: 180px; max-width: 340px; padding: 9px 13px; border: 1px solid var(--line-2); border-radius: 8px; font-size: 14px; background: var(--surface); font-family: inherit; }
        .page-actions .filter-input:focus { outline: none; border-color: var(--gold-2); box-shadow: 0 0 0 3px var(--gold-soft); }
    .page-actions .spacer { margin-left: auto; }

/* plain manage table (non-interactive rows, explicit action buttons) */
.mtable { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--sd); }
    .mtable thead th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); font-weight: 700; padding: 12px 15px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
    .mtable tbody td { padding: 12px 15px; border-bottom: 1px solid var(--surface-3); vertical-align: middle; }
    .mtable tbody tr:last-child td { border-bottom: 0; }
    .mtable tbody tr:hover { background: var(--surface-2); }
    .mtable .cell-actions { text-align: right; white-space: nowrap; }
        .mtable .cell-actions form { display: inline; }
    .mtable .cell-dim { color: var(--text-2); font-size: 13px; }

/* Rows that open a detail drawer */
.lao-row { cursor: pointer; }

/* Big, readable citation count on the tasks table */
.cite-count { display: inline-block; font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--gold-ink); background: var(--gold-soft); border: 1px solid var(--gold-line); padding: 2px 12px; border-radius: 12px; min-width: 44px; }
    .cite-count.zero { color: var(--text-2); background: var(--surface-3); border-color: var(--line); }

/* status pills */
.pill { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 3px 10px; border-radius: 12px; display: inline-block; }
    .pill.on { background: var(--en-soft); color: var(--en); }
    .pill.off { background: var(--surface-3); color: var(--text-2); }
    .pill.gold { background: var(--gold-soft); color: var(--gold-ink); }

/* task edit: per-source authority sections; filled sources light up gold */
.auth-edit { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 10px; overflow: hidden; }
    .auth-edit > summary { list-style: none; cursor: pointer; padding: 10px 14px; background: var(--surface-2); font-size: 13px; font-weight: 600; color: var(--text-2); display: flex; align-items: center; gap: 8px; transition: background .12s, color .12s; }
        .auth-edit > summary::-webkit-details-marker { display: none; }
        .auth-edit > summary .ae-ct { margin-left: auto; font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--gold-ink); }
    .auth-edit.filled { border-color: var(--gold-line); }
        .auth-edit.filled > summary { background: var(--gold-soft); color: var(--gold-ink); font-weight: 700; }
    .auth-edit .auth-edit-body { padding: 12px 14px; border-top: 1px solid var(--line); }

/* task edit: yes / no flag toggles, colored like the drawer's attr boxes */
.flag-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.flag-toggle { border: 1px solid var(--line); border-radius: 8px; padding: 11px 13px; background: var(--surface); }
    .flag-toggle .f-lab { font-size: 11.5px; color: var(--text-2); text-transform: uppercase; letter-spacing: .03em; font-weight: 700; margin-bottom: 8px; }
.flag-opts { display: flex; gap: 6px; }
.fopt { flex: 1; border: 1px solid var(--line-2); background: var(--surface); border-radius: 6px; padding: 7px 6px; font-size: 12.5px; font-weight: 600; color: var(--text-2); transition: all .12s; font-family: inherit; }
    .fopt:hover { border-color: var(--line-strong); color: var(--text); }
    .fopt.on-yes { background: var(--en-soft); border-color: var(--en); color: #1e5941; }
    .fopt.on-cond { background: var(--gold-soft); border-color: var(--gold); color: var(--gold-ink); }
    .fopt.on-no { background: #f6e7e3; border-color: var(--danger); color: #7c2c1c; }

/* task edit: case divisions as separated, boxed checkbox items */
.case-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); gap: 8px; }
.case-chk { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); font-size: 13px; color: var(--text-2); cursor: pointer; transition: all .12s; }
    .case-chk:hover { border-color: var(--line-strong); }
    .case-chk input { width: 16px; height: 16px; accent-color: var(--gold); cursor: pointer; flex: none; margin: 0; }
    .case-chk.on { background: var(--gold-soft); border-color: var(--gold-line); color: var(--gold-ink); font-weight: 600; }

/* import wizard */
.import-scopes { display: flex; flex-direction: column; gap: 9px; margin-bottom: 14px; }
.scope-row { display: flex; align-items: flex-start; gap: 10px; padding: 11px 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
    .scope-row input { width: 16px; height: 16px; margin-top: 1px; accent-color: var(--gold); cursor: pointer; }
    .scope-row .sr-txt b { display: block; font-size: 13.5px; color: var(--text); margin-bottom: 2px; }
    .scope-row .sr-txt span { font-size: 12.5px; color: var(--text-2); line-height: 1.5; }

.diff-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 18px; }
.diff-tile { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; text-align: center; }
    .diff-tile .d-num { font-family: var(--font-display); font-size: 24px; font-weight: 700; }
    .diff-tile .d-lab { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); font-weight: 700; margin-top: 3px; }
    .diff-tile.added .d-num { color: var(--en); }
    .diff-tile.removed .d-num { color: var(--danger); }
    .diff-tile.changed .d-num { color: var(--gold); }

.diff-list { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 11px 14px; margin-bottom: 12px; }
    .diff-list h4 { margin: 0 0 7px; font-size: 12px; color: var(--text-2); }
    .diff-list .id-chips { display: flex; flex-wrap: wrap; gap: 5px; }
    .diff-list .id-chip { font-family: var(--font-mono); font-size: 12px; background: var(--surface-3); color: var(--text-2); padding: 2px 8px; border-radius: 5px; }

/* login */
.login-card { max-width: 400px; margin: 8vh auto 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sd-md); overflow: hidden; }
    .login-card .login-head { background: var(--ink); color: #fff; padding: 20px 24px; }
        .login-card .login-head h2 { margin: 0; font-family: var(--font-display); font-size: 19px; font-weight: 700; }
        .login-card .login-head p { margin: 3px 0 0; font-size: 11.5px; color: var(--rail-text); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
    .login-card .login-body { padding: 22px 24px; }
