/* ============================================================
   Znymkari · цех импорта — минимальный CSS.
   Цвета фирменные, но без витринных эффектов.
   ============================================================ */

:root {
    --pink: #ff5ebc;
    --bg: #0a0a12;
    --bg-2: #131322;
    --bg-3: #1b1b2e;
    --text: #e8e8ef;
    --muted: #888;
    --muted-2: #555;
    --ok: #3ecf72;
    --warn: #f0b132;
    --err: #ff5c5c;
    --border: #2a2a3e;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
                 Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

a { color: var(--pink); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Шапка ===== */

.topbar {
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 10;
}
.topbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.brand { font-weight: 700; color: var(--text); }
.brand:hover { text-decoration: none; color: var(--pink); }
.nav { display: flex; gap: 20px; }
.nav a { color: var(--muted); font-size: 14px; }
.nav a:hover { color: var(--pink); text-decoration: none; }

/* ===== Контейнер ===== */

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 24px 64px;
}

h1 { font-size: 26px; margin: 0 0 8px; }
h2 { font-size: 20px; margin: 32px 0 12px; }
.sub { color: var(--muted); margin: 0 0 24px; }

/* ===== Кнопки ===== */

.btn {
    display: inline-block;
    padding: 9px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-3);
    color: var(--text);
    cursor: pointer;
    font-size: 14px;
    transition: background .15s;
}
.btn:hover { background: #242440; text-decoration: none; }
.btn-primary { background: var(--pink); border-color: var(--pink); color: #fff; }
.btn-primary:hover { background: #e04ea8; }
.btn-danger { background: #4a1420; border-color: #6a1f30; color: #ffb8c2; }
.btn-danger:hover { background: #5a1825; }
.btn-sm { padding: 5px 10px; font-size: 13px; }

/* ===== Карточки (дом) ===== */

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 24px 0;
}
.card-btn {
    display: block;
    padding: 24px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-align: center;
    color: var(--text);
    transition: border-color .15s, transform .1s;
}
.card-btn:hover {
    border-color: var(--pink);
    text-decoration: none;
    transform: translateY(-2px);
}
.card-btn .icon { font-size: 32px; display: block; margin-bottom: 8px; }
.card-btn .label { font-size: 17px; font-weight: 600; }
.card-btn .hint { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ===== Сводка ===== */

.summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin: 24px 0;
}
.summary-item {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
}
.summary-item .value { font-size: 22px; font-weight: 700; }
.summary-item .label { font-size: 13px; color: var(--muted); }

/* ===== Таблицы ===== */

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}
th, td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
th {
    background: var(--bg-3);
    color: var(--muted);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .3px;
}
tr:last-child td { border-bottom: none; }

/* ===== Статусы ===== */

.st { display: inline-block; padding: 2px 8px; border-radius: 6px;
      font-size: 12px; font-weight: 600; }
.st-pending   { background: #33334d; color: #bbb; }
.st-running   { background: #2b3d5e; color: #8ec7ff; }
.st-done      { background: #1e3a26; color: var(--ok); }
.st-failed    { background: #4a1420; color: var(--err); }
.st-cancelled { background: #3a3a3a; color: #aaa; }
.st-stalled   { background: #4a3a14; color: var(--warn); }

/* ===== Прогресс-бар ===== */

.progress-bar {
    width: 100%;
    height: 22px;
    background: var(--bg-3);
    border-radius: 11px;
    overflow: hidden;
    margin: 12px 0;
}
.progress-bar .fill {
    height: 100%;
    background: linear-gradient(90deg, var(--pink), #ff88cc);
    transition: width .4s;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 600; color: #fff;
}

.progress-info { color: var(--muted); font-size: 13px; }
.progress-info span { color: var(--text); }

/* ===== Лог ===== */

.log-box {
    background: #05050a;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
    font-family: ui-monospace, "SF Mono", Consolas, monospace;
    font-size: 12px;
    color: #cfcfe0;
    max-height: 320px;
    overflow-y: auto;
    white-space: pre-wrap;
    line-height: 1.55;
}

/* ===== Модалка ===== */

.modal-bg {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.65);
    display: none;
    align-items: center; justify-content: center;
    z-index: 100;
}
.modal-bg.open { display: flex; }
.modal {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    width: min(500px, 92vw);
}
.modal h3 { margin: 0 0 16px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--muted);
               margin-bottom: 6px; }
.field select, .field input {
    width: 100%;
    padding: 9px 12px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
}
.modal-actions { display: flex; gap: 10px; justify-content: flex-end;
                 margin-top: 20px; }

/* ===== Сообщения ===== */

.messages { list-style: none; padding: 0; margin: 0 0 20px; }
.msg {
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 14px;
}
.msg-success { background: #1e3a26; color: var(--ok); }
.msg-error   { background: #4a1420; color: var(--err); }
.msg-info    { background: #2b3d5e; color: #8ec7ff; }

/* ===== Футер ===== */

.footer {
    text-align: center;
    color: var(--muted-2);
    font-size: 12px;
    padding: 24px;
    border-top: 1px solid var(--border);
}

/* ===== Мелочи ===== */

.muted { color: var(--muted); }
.mono  { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.row-actions { display: flex; gap: 8px; }

/* Золотой заголовок для главной */
h1.gold-title {
    color: #e5c158; /* Золотой оттенок */
    text-shadow: 0 0 10px rgba(229, 193, 88, 0.3);
}

/* Заголовки внутренних страниц и стрелка */
.page-header-flex {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}
.back-arrow {
    color: #888;
    text-decoration: none;
    font-size: 24px;
    transition: color 0.2s;
}
.back-arrow:hover {
    color: #fff;
}

/* Хлебные крошки */
.breadcrumbs {
    font-size: 14px;
    color: #888;
    margin-bottom: 15px;
}
.breadcrumbs a {
    color: #c97cff; /* Розово-фиолетовый, как ссылки */
    text-decoration: none;
}
.breadcrumbs a:hover {
    text-decoration: underline;
}
.breadcrumbs span {
    margin: 0 8px;
    color: #555;
}

/* ===== Новое оформление ===== */
.gold-title { color: #e5c158; text-shadow: 0 0 12px rgba(229, 193, 88, 0.4); }
.page-header-flex { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.page-header-flex h1 { margin: 0; }
.back-arrow { color: var(--muted); text-decoration: none; font-size: 28px; line-height: 1; transition: color 0.2s; display: inline-flex; align-items: center; }
.back-arrow:hover { color: var(--pink); text-decoration: none; }
.breadcrumbs { font-size: 13px; color: var(--muted); margin-bottom: 24px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--pink); }
.breadcrumbs span { margin: 0 8px; color: var(--muted-2); }