@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #f4f6f8;
    --panel: #ffffff;
    --panel-soft: #f8fafc;
    --ink: #18202a;
    --muted: #667085;
    --line: #dde3ea;
    --red: #c7352f;
    --red-dark: #982822;
    --amber: #b5791f;
    --blue: #28638f;
    --green: #2d7a56;
    --shadow: 0 18px 48px rgba(23, 32, 42, .08);
    --glass: rgba(255, 255, 255, .72);
    --glass-strong: rgba(255, 255, 255, .88);
    --glass-line: rgba(151, 161, 176, .28);
    --glass-shadow: 0 18px 45px rgba(24, 32, 42, .12);
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Raleway", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        linear-gradient(135deg, rgba(244, 246, 248, .96), rgba(231, 235, 240, .98)),
        var(--bg);
    letter-spacing: 0;
}

button,
input {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

.app-body {
    min-height: 100vh;
}

.shell {
    min-height: 100vh;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
}

.brand-mark {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, .72);
    box-shadow: inset 0 0 0 1px rgba(24, 32, 42, .08), 0 10px 26px rgba(24, 32, 42, .08);
    overflow: hidden;
}

.brand-mark img {
    display: block;
    width: 82%;
    height: 82%;
    object-fit: contain;
}

.brand strong {
    display: block;
    font-size: 17px;
    font-weight: 800;
}

.brand small {
    display: block;
    margin-top: 2px;
    color: #aab3bf;
    font-size: 12px;
    font-weight: 600;
}

.brand.large .brand-mark {
    width: 46px;
    height: 46px;
}

.main {
    min-width: 0;
    padding: 28px;
}

.topbar {
    position: sticky;
    top: 18px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
    padding: 12px;
    border: 1px solid var(--glass-line);
    border-radius: 18px;
    background: var(--glass);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(22px) saturate(1.45);
    -webkit-backdrop-filter: blur(22px) saturate(1.45);
}

.topbar-title {
    display: flex;
    align-items: center;
    gap: 22px;
    min-width: 280px;
}

.eyebrow {
    margin: 0 0 5px;
    color: var(--red);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 0;
    font-size: 27px;
    font-weight: 800;
}

h2 {
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: 800;
}

.top-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    flex: 1;
}

.primary-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.main-menu {
    position: relative;
}

.main-menu summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 13px;
    border: 1px solid rgba(151, 161, 176, .24);
    border-radius: 14px;
    color: #344054;
    background: rgba(255, 255, 255, .56);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .82);
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    list-style: none;
    transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.main-menu summary svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.main-menu summary::-webkit-details-marker {
    display: none;
}

.main-menu summary::after {
    content: "";
    width: 7px;
    height: 7px;
    margin-left: 2px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    opacity: .55;
}

.main-menu[open] {
    z-index: 10;
}

.main-menu[open] summary {
    color: var(--red);
    border-color: rgba(199, 53, 47, .24);
    background: rgba(255, 255, 255, .84);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .92), 0 10px 24px rgba(199, 53, 47, .09);
}

.main-menu[open] summary::after {
    transform: translateY(2px) rotate(225deg);
}

.main-menu-panel {
    position: absolute;
    left: 0;
    top: 100%;
    display: grid;
    width: 294px;
    max-height: min(70vh, 680px);
    overflow: auto;
    padding: 10px;
    border: 1px solid var(--glass-line);
    border-radius: 0 0 16px 16px;
    background: var(--glass-strong);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(22px) saturate(1.35);
    -webkit-backdrop-filter: blur(22px) saturate(1.35);
}

.main-menu:nth-last-child(-n+2) .main-menu-panel {
    left: auto;
    right: 0;
}

.main-menu-panel a,
.menu-group strong {
    display: flex;
    align-items: center;
    min-height: 36px;
    padding: 0 11px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 800;
}

.main-menu-panel a:hover {
    color: var(--red);
    background: rgba(199, 53, 47, .08);
}

.menu-group {
    display: grid;
    gap: 2px;
    margin: 5px 0;
    padding: 7px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.menu-group strong {
    color: var(--red);
    min-height: 28px;
}

.global-search {
    width: min(320px, 100%);
    height: 42px;
    border-color: rgba(151, 161, 176, .28);
    border-radius: 14px;
    background: rgba(255, 255, 255, .68);
}

.topbar-account {
    display: grid;
    justify-items: end;
    gap: 5px;
    min-width: 54px;
}

.topbar-account-name {
    color: #6b7280;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    text-align: right;
}

.user-pill,
.badge {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid rgba(151, 161, 176, .28);
    border-radius: 14px;
    color: #344054;
    background: rgba(255, 255, 255, .66);
    font-size: 13px;
    font-weight: 700;
}

.badge {
    min-height: 28px;
    color: var(--green);
    background: #eef8f2;
    border-color: #d4eadc;
}

.button,
.icon-button {
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 800;
}

.button {
    min-height: 42px;
    padding: 0 14px;
}

.button.primary {
    color: #fff;
    background: var(--red);
}

.button.primary:hover {
    background: var(--red-dark);
}

.button.ghost {
    color: #344054;
    background: rgba(255, 255, 255, .66);
    border: 1px solid rgba(151, 161, 176, .28);
}

.icon-button {
    width: 38px;
    height: 38px;
    color: #344054;
    background: #fff;
    border: 1px solid var(--line);
}

.icon-button svg,
.edit-contact-button svg,
.logout-button svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.logout-button {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .7);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.stat-card,
.panel,
.module-card,
.login-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.stat-card {
    padding: 18px;
    border-left-width: 4px;
}

.stat-card span,
.stat-card small {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.stat-card strong {
    display: block;
    margin: 8px 0 6px;
    font-size: 30px;
    font-weight: 800;
}

.stat-card.red {
    border-left-color: var(--red);
}

.stat-card.amber {
    border-left-color: var(--amber);
}

.stat-card.blue {
    border-left-color: var(--blue);
}

.stat-card.green {
    border-left-color: var(--green);
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, .8fr);
    gap: 18px;
}

.mt {
    margin-top: 18px;
}

.mb {
    margin-bottom: 18px;
}

.panel {
    padding: 20px;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.timeline {
    display: grid;
    gap: 12px;
}

.timeline-item {
    position: relative;
    padding: 12px 14px 12px 38px;
    border-radius: 8px;
    background: var(--panel-soft);
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 16px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #b8c2ce;
}

.timeline-item.done::before {
    background: var(--green);
}

.timeline-item b,
.timeline-item span {
    display: block;
}

.timeline-item b {
    margin-bottom: 3px;
    font-size: 14px;
}

.timeline-item span,
.muted {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.task-list {
    display: grid;
    gap: 8px;
}

.task-list span {
    padding: 11px 12px;
    border-radius: 8px;
    background: var(--panel-soft);
    color: #344054;
    font-size: 13px;
    font-weight: 700;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.table-tools {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.table-tools input[type="search"] {
    max-width: 340px;
    height: 38px;
}

.column-filters {
    position: relative;
}

.column-filters summary {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: #344054;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    list-style: none;
}

.column-filters summary::-webkit-details-marker {
    display: none;
}

.column-filters[open] {
    z-index: 4;
}

.column-filters[open]::before {
    content: "";
    position: fixed;
    inset: 0;
}

.column-filters label {
    display: block;
}

.column-filters select {
    width: 100%;
    min-height: 36px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: #344054;
    background: #fff;
    font-size: 13px;
}

.column-filters > label {
    margin-top: 8px;
}

.column-filters[open] {
    padding: 0;
}

.column-filters[open] > label {
    position: relative;
    z-index: 1;
    width: 260px;
    padding: 8px;
    margin: 0;
    background: #fff;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
}

.column-filters[open] > label:first-of-type {
    margin-top: 8px;
    border-top: 1px solid var(--line);
    border-radius: 8px 8px 0 0;
}

.column-filters[open] > label:last-of-type {
    border-bottom: 1px solid var(--line);
    border-radius: 0 0 8px 8px;
    box-shadow: var(--shadow);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th,
td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    color: #475467;
    background: #f8fafc;
    font-weight: 800;
}

th.sortable {
    cursor: pointer;
    user-select: none;
}

th.sortable::after {
    content: "↕";
    margin-left: 7px;
    color: #98a2b3;
    font-size: 11px;
}

th.sortable.sort-asc::after {
    content: "↑";
    color: var(--red);
}

th.sortable.sort-desc::after {
    content: "↓";
    color: var(--red);
}

tr:last-child td {
    border-bottom: 0;
}

.active-personnel-wrap {
    border-radius: 12px;
}

.active-personnel-table {
    min-width: 1730px;
    font-size: 13px;
}

.active-personnel-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    color: #2f3742;
    background: rgba(244, 246, 248, .94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    white-space: nowrap;
}

.active-personnel-table td {
    padding: 9px 10px;
    vertical-align: top;
    background: rgba(255, 255, 255, .72);
}

.active-personnel-table tbody tr:nth-child(odd) td {
    background: rgba(238, 241, 245, .72);
}

.active-personnel-table td strong {
    display: block;
    font-size: 14px;
    font-weight: 800;
}

.active-personnel-table td small {
    display: block;
    margin-top: 2px;
    color: #6b7280;
    font-size: 11px;
    font-weight: 700;
}

.active-personnel-table td.edit-cell {
    width: 52px;
    text-align: right;
}

.secondary-member-mark {
    display: inline-grid;
    width: 18px;
    height: 18px;
    margin-left: 5px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--red);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    vertical-align: text-top;
}

.token-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    min-width: 110px;
}

.personnel-token {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    max-width: 180px;
    padding: 3px 7px;
    border: 1px solid rgba(24, 32, 42, .14);
    border-radius: 7px;
    color: #2f3742;
    background: rgba(255, 255, 255, .7);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.25;
}

.rank-token {
    color: #f04438;
    background: #15191f;
    border-color: #15191f;
}

.function-token {
    color: #c7352f;
    border-color: rgba(199, 53, 47, .22);
    background: rgba(199, 53, 47, .08);
}

.badge-token {
    color: #855d0c;
    border-color: rgba(181, 121, 31, .22);
    background: rgba(181, 121, 31, .1);
}

.honor-token {
    color: #28638f;
    border-color: rgba(40, 99, 143, .22);
    background: rgba(40, 99, 143, .1);
}

.evidence-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid rgba(151, 161, 176, .24);
    border-radius: 8px;
    color: #475467;
    background: rgba(255, 255, 255, .54);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
}

.evidence-button span {
    display: grid;
    width: 18px;
    height: 18px;
    place-items: center;
    border-radius: 6px;
    color: currentColor;
    background: transparent;
    line-height: 1;
}

.badge-evidence span {
    background: transparent;
}

.honor-evidence span {
    background: transparent;
}

.evidence-button:hover {
    color: var(--red);
    border-color: rgba(199, 53, 47, .24);
    background: rgba(255, 255, 255, .78);
}

.edit-contact-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(151, 161, 176, .24);
    border-radius: 9px;
    color: #475467;
    background: rgba(255, 255, 255, .56);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .76);
    cursor: pointer;
}

.edit-contact-button:hover {
    color: var(--red);
    border-color: rgba(199, 53, 47, .24);
    background: rgba(255, 255, 255, .82);
}

.has-lightbox {
    overflow: hidden;
}

.evidence-lightbox[hidden] {
    display: none;
}

.evidence-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 24px;
}

.evidence-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(24, 32, 42, .42);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.contact-lightbox[hidden] {
    display: none;
}

.contact-lightbox {
    position: fixed;
    inset: 0;
    z-index: 110;
    display: grid;
    place-items: center;
    padding: 24px;
}

.contact-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(24, 32, 42, .42);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.contact-lightbox-panel {
    position: relative;
    z-index: 1;
    width: min(860px, 100%);
    max-height: min(88vh, 860px);
    overflow: auto;
    border: 1px solid var(--glass-line);
    border-radius: 20px;
    background: var(--glass-strong);
    box-shadow: 0 28px 80px rgba(24, 32, 42, .28);
    backdrop-filter: blur(24px) saturate(1.35);
    -webkit-backdrop-filter: blur(24px) saturate(1.35);
}

.contact-lightbox-panel header {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px 12px;
    border-bottom: 1px solid var(--glass-line);
    background: rgba(255, 255, 255, .78);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.contact-editor-form {
    padding: 18px 20px 20px;
}

.contact-editor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}

.contact-editor-grid label {
    display: grid;
    gap: 7px;
}

.contact-editor-grid .full {
    grid-column: 1 / -1;
}

.contact-editor-grid textarea {
    width: 100%;
    min-height: 120px;
    padding: 11px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    color: var(--ink);
    background: #fff;
    font: inherit;
    resize: vertical;
}

.contact-editor-grid textarea:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(199, 53, 47, .12);
    outline: none;
}

.contact-editor-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.evidence-lightbox-panel {
    position: relative;
    z-index: 1;
    width: min(640px, 100%);
    max-height: min(80vh, 720px);
    overflow: auto;
    border: 1px solid var(--glass-line);
    border-radius: 18px;
    background: var(--glass-strong);
    box-shadow: 0 28px 80px rgba(24, 32, 42, .28);
    backdrop-filter: blur(24px) saturate(1.35);
    -webkit-backdrop-filter: blur(24px) saturate(1.35);
}

.evidence-lightbox-panel header {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 18px 12px;
    border-bottom: 1px solid var(--glass-line);
    background: rgba(255, 255, 255, .78);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.evidence-lightbox-panel h2 {
    margin: 0;
}

.evidence-lightbox-list {
    display: grid;
    gap: 8px;
    padding: 16px 18px 18px;
}

.evidence-item {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 12px;
    padding: 11px 12px;
    border: 1px solid rgba(151, 161, 176, .22);
    border-radius: 12px;
    background: rgba(255, 255, 255, .64);
}

.evidence-item > span {
    color: var(--red);
    font-weight: 800;
}

.evidence-item strong,
.evidence-item small {
    display: block;
}

.evidence-item small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.empty-state {
    display: grid;
    gap: 6px;
    padding: 28px;
    border: 1px dashed #c6ced8;
    border-radius: 8px;
    color: var(--muted);
    background: #fbfcfd;
    text-align: center;
}

.empty-state strong {
    color: var(--ink);
}

.import-summary,
.module-grid {
    display: grid;
    gap: 14px;
}

.import-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 18px;
}

.import-summary div {
    padding: 16px;
    border-radius: 8px;
    background: var(--panel-soft);
}

.import-summary b,
.import-summary span {
    display: block;
}

.import-summary b {
    margin-bottom: 4px;
    font-size: 24px;
}

.import-summary span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.module-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.module-card {
    min-height: 170px;
    padding: 18px;
}

.module-icon {
    display: grid;
    width: 34px;
    height: 34px;
    margin-bottom: 14px;
    place-items: center;
    border-radius: 8px;
    color: var(--red);
    background: #fff0ef;
}

.module-card p {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.subnav-stack {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-tabs a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: #475467;
    background: #fff;
    font-size: 13px;
    font-weight: 800;
}

.filter-tabs.secondary a {
    font-weight: 700;
}

.filter-tabs a.active {
    color: #fff;
    border-color: var(--red);
    background: var(--red);
}

.raw-table-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 18px;
}

.raw-table-list span {
    padding: 6px 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: #475467;
    background: #f8fafc;
    font-size: 12px;
    font-weight: 700;
}

.login-body {
    min-height: 100vh;
    background:
        linear-gradient(110deg, rgba(32, 39, 48, .94), rgba(32, 39, 48, .84)),
        url("/public/assets/login-bg.jpg") center/cover;
}

.login-screen {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 28px;
}

.login-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    width: min(980px, 100%);
    gap: 28px;
    align-items: center;
}

.login-copy {
    color: #fff;
}

.login-copy h1 {
    max-width: 560px;
    margin: 42px 0 14px;
    font-size: 40px;
}

.login-copy p {
    max-width: 560px;
    color: #d4dbe5;
    font-size: 17px;
    line-height: 1.6;
}

.login-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 26px;
}

.login-stats span {
    padding: 8px 11px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 8px;
    color: #edf2f7;
    background: rgba(255, 255, 255, .08);
    font-size: 12px;
    font-weight: 800;
}

.login-card {
    display: grid;
    gap: 16px;
    padding: 24px;
}

.login-card h2 {
    font-size: 24px;
}

label {
    display: grid;
    gap: 7px;
    color: #344054;
    font-size: 13px;
    font-weight: 800;
}

input {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: var(--ink);
    background: #fff;
    outline: none;
}

input:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(199, 53, 47, .12);
}

.alert {
    padding: 12px;
    border-radius: 8px;
    color: #8a211d;
    background: #fff0ef;
    font-size: 13px;
    font-weight: 700;
}

.alert.success {
    color: #166534;
    background: #eef8f2;
}

@media (max-width: 1080px) {
    .stats-grid,
    .module-grid,
    .import-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .main {
        padding: 20px;
    }

    .topbar,
    .panel-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar-title {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .top-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .topbar-account {
        width: 100%;
        justify-items: end;
    }

    .primary-nav {
        display: grid;
        width: 100%;
        grid-template-columns: 1fr;
    }

    .global-search {
        width: 100%;
    }

    .contact-editor-grid {
        grid-template-columns: 1fr;
    }

    .contact-lightbox,
    .evidence-lightbox {
        padding: 14px;
    }

    .main-menu,
    .main-menu summary {
        width: 100%;
    }

    .main-menu-panel {
        left: 0;
        right: auto;
        width: min(100%, 360px);
    }

    .table-tools {
        flex-direction: column;
    }

    .table-tools input[type="search"],
    .column-filters,
    .column-filters[open] > label {
        width: 100%;
        max-width: none;
    }

    .stats-grid,
    .module-grid,
    .import-summary,
    .login-panel {
        grid-template-columns: 1fr;
    }

    .login-copy h1 {
        font-size: 31px;
    }
}
