* { box-sizing: border-box; }
html, body { height: 100%; }
body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: #f5f7fa;
    color: #243447;
}
header {
    background: linear-gradient(135deg, #4a6fa5, #1e3c72);
    color: #fff;
    padding: 20px 0;
}
.shell { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 1.5rem; font-weight: 800; }
.brand span { color: #ffd166; }
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    border-radius: 8px;
    padding: 10px 16px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: #fff; color: #1e3c72; }
.btn-outline { background: transparent; border: 1.5px solid #4a6fa5; color: #4a6fa5; }
.btn-success { background: #2a9d8f; color: #fff; }
.btn-danger { background: #dc3545; color: #fff; }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.header-light { border-color: rgba(255,255,255,0.65); color: #fff; }
main { padding: 24px 0 40px; }
.card { background: #fff; border-radius: 14px; box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06); padding: 20px; margin-bottom: 20px; }
h1, h2, h3 { margin: 0 0 12px; color: #1e3c72; }
.muted { color: #6b7a90; }
.archive-subtitle { opacity: 0.9; margin-top: 4px; }
.info-box {
    background: #fff3cd;
    border-left: 4px solid #d39e00;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    color: #856404;
    font-size: 0.92rem;
}
.info-box-danger {
    background: #f8f9fa;
    border-left-color: #dc3545;
    color: #7a1f2a;
}
.info-box-primary {
    background: #eef6ff;
    border-left-color: #4a6fa5;
    color: #1e3c72;
}
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.toolbar-mb-16 { margin-bottom: 16px; }
.toolbar-panel {
    padding: 14px;
    border: 1px solid #e5ebf2;
    border-radius: 12px;
    background: #fcfdff;
}
.toolbar-stack {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 220px;
}
.field {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d7e0ea;
    border-radius: 8px;
    font: inherit;
    background: #fff;
}
.search-max { max-width: 420px; }
.input-max { max-width: 160px; }
.label-strong { font-weight: 800; color: #1e3c72; }
.layout { display: grid; gap: 16px; }
.list { display: grid; gap: 12px; }
.item { background: #fff; border: 1px solid #e8edf2; border-radius: 14px; padding: 14px 16px; }
.item-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.item-title { font-weight: 800; color: #1e3c72; }
.item-ref { font-size: 0.84rem; margin-top: 4px; }
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}
.badge-ok { background: #d4edda; color: #155724; }
.badge-warn { background: #fff3cd; color: #856404; }
.badge-info { background: #d1ecf1; color: #0c5460; }
.badge-neutral { background: #edf2f7; color: #475569; }
.meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; color: #6b7a90; font-size: 0.82rem; }
.empty-state { padding: 28px 16px; text-align: center; color: #718096; background: #fafcff; border: 1px dashed #dbe6f3; border-radius: 8px; }
.loading { display: inline-flex; align-items: center; gap: 8px; color: #4a6fa5; }
.spinner { width: 16px; height: 16px; border: 2px solid #d7e1ee; border-top-color: #4a6fa5; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.table-head {
    display: grid;
    grid-template-columns: 1.3fr 1fr 0.9fr 0.9fr auto;
    gap: 12px;
    color: #4a6fa5;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 0 16px;
}
.status-gap-12 { margin-top: 12px; margin-bottom: 0; }
body.modal-open {
    overflow: hidden;
}
@media (max-width: 900px) {
    .table-head { display: none; }
}
