:root {
    --bg: #f5f7fb;
    --card: #ffffff;
    --border: #e1e6f0;
    --fg: #0e1116;
    --muted: #6b7280;
    --brand: #003DA5;               /* Фирменный синий PROMPART — для лого, фокуса, ссылок */
    --primary: #1e56c6;             /* Кнопки — немного светлее фирменного */
    --primary-hover: #003DA5;       /* Hover возвращает в фирменный */
    --brand-soft: #e6ecf7;
    --ok: #1f9e4b;
    --bad: #d12e2e;
}
* { box-sizing: border-box; }
body {
    margin: 0; padding: 2rem;
    font-family: -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
    background: var(--bg); color: var(--fg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
.container { max-width: 1000px; margin: 0 auto; }
h1, h2, h3 { margin-top: 0; color: var(--fg); }
header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 2rem; padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
}
header .brand {
    display: flex; align-items: center; gap: .9rem;
    text-decoration: none; color: inherit;
}
header .logo {
    height: 32px; width: auto;
    border-radius: 4px;
    display: block;
}
header h1 {
    font-size: 1.1rem; margin: 0;
    font-weight: 600; letter-spacing: -0.01em;
}
header h1 .sub {
    display: block; font-size: .8rem; font-weight: 400;
    color: var(--muted); margin-top: .1rem;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Buttons */
.btn, button {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .55rem 1.1rem; border-radius: 7px;
    background: var(--primary); color: white; border: 1px solid var(--primary);
    cursor: pointer; font-size: .95rem; font-family: inherit; font-weight: 500;
    transition: all .14s ease;
    box-shadow: 0 1px 2px rgba(0, 61, 165, .18);
}
.btn:hover, button:hover {
    background: var(--primary-hover); border-color: var(--primary-hover);
    text-decoration: none; color: white;
    box-shadow: 0 2px 6px rgba(0, 61, 165, .28);
}
.btn.secondary, button.secondary {
    background: white; color: var(--brand);
    border: 1px solid var(--border); box-shadow: none;
}
.btn.secondary:hover, button.secondary:hover {
    background: var(--brand-soft); border-color: var(--brand);
    color: var(--brand);
    box-shadow: none;
}

.card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: 10px; padding: 1.5rem; margin-bottom: 1rem;
    box-shadow: 0 1px 2px rgba(14, 17, 22, .04);
}
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 500; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--brand-soft); }

form.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
form.grid .full { grid-column: 1 / -1; }
label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: .3rem; font-weight: 500; }
input[type=text], input[type=date], input[type=number], input[type=email],
textarea, select {
    width: 100%; padding: .55rem .75rem; border-radius: 6px;
    border: 1px solid var(--border); background: white; color: var(--fg);
    font-family: inherit; font-size: .95rem;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, textarea:focus, select:focus {
    border-color: var(--brand); outline: none;
    box-shadow: 0 0 0 3px rgba(0, 61, 165, .12);
}

/* File drop zone — заменяет системный "Choose file" */
.file-drop {
    position: relative;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 1.6rem 1rem;
    border: 1.5px dashed var(--border); border-radius: 10px;
    background: #fafbff;
    cursor: pointer;
    transition: all .15s ease;
    text-align: center;
}
.file-drop:hover, .file-drop.is-dragging {
    border-color: var(--brand);
    background: var(--brand-soft);
}
.file-drop input[type=file] {
    position: absolute; inset: 0; opacity: 0; cursor: pointer;
}
.file-drop .icon {
    width: 34px; height: 34px; color: var(--brand);
    margin-bottom: .5rem;
}
.file-drop .title {
    font-weight: 500; font-size: .95rem; color: var(--fg);
}
.file-drop .hint-line {
    font-size: .8rem; color: var(--muted); margin-top: .25rem;
}
.file-drop .filename {
    display: none;
    margin-top: .4rem; padding: .25rem .6rem;
    background: var(--brand); color: white;
    border-radius: 4px; font-size: .82rem; font-weight: 500;
}
.file-drop.has-file .filename { display: inline-block; }
.file-drop.has-file .title { display: none; }

.error { color: var(--bad); font-size: .8rem; margin-top: .25rem; }
.npd-ok { color: var(--ok); font-size: .85rem; font-weight: 500; }
.npd-bad { color: var(--bad); font-size: .85rem; font-weight: 500; }
.hint { color: var(--muted); font-size: .85rem; }
.empty { text-align: center; padding: 3rem; color: var(--muted); }
.row-actions { display: flex; gap: .5rem; justify-content: flex-end; }
.badge {
    display: inline-block; padding: .15rem .55rem; border-radius: 4px;
    background: var(--brand-soft); color: var(--brand);
    font-size: .78rem; font-weight: 500;
}
.divider {
    display: flex; align-items: center; gap: .75rem;
    color: var(--muted); font-size: .8rem;
    text-transform: uppercase; letter-spacing: .05em;
    margin: .25rem 0;
}
.divider::before, .divider::after {
    content: ""; flex: 1; height: 1px; background: var(--border);
}
