/* ==========================================================================
   ZUMO Admin — надстройка над zumo-id.css (те же цвета, шрифт, компоненты).
   ========================================================================== */

.admin-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.admin-top-side { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: flex-end; }

.admin-me { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }

.admin-me-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.admin-shell {
    flex: 1;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 24px 12px;
    border-right: 1px solid var(--line);
}

.admin-nav a {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
}

.admin-nav a:hover { background: var(--surface-2); }

.admin-nav a.active { background: var(--accent-soft); color: var(--accent-text); }

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

.admin-main h1 { margin-top: 0; }

.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 28px; }

.section-head .section-title { margin: 0 0 12px; }

.section-head a, .admin-main td a, .list-sub a { color: var(--accent-text); font-weight: 600; text-decoration: none; }

/* --- Цифры на обзоре --- */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin: 8px 0 8px; }

.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; }

.stat-value { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }

.stat-label { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* --- Фильтры и вкладки --- */
.filter { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0 16px; }

.filter input, .filter select {
    min-height: 42px;
    border: 1.5px solid var(--line);
    background: var(--surface);
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    font: inherit;
    font-size: 15px;
}

.filter input { flex: 1 1 260px; }

.filter input:focus, .filter select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--focus); }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }

.tabs a {
    padding: 7px 14px;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--line);
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

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

/* --- Таблицы --- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }

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

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

.table th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; white-space: nowrap; }

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

.small { font-size: 13px; }

/* --- Статусы --- */
.status { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: var(--radius-pill); white-space: nowrap; }

.status-ok { background: var(--ok-soft); color: var(--ok); }

.status-bad { background: var(--error-soft); color: var(--error); }

.status-wait { background: #FFF4D6; color: #7A5600; }

.reason { font-style: italic; }

.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; font-size: 14px; }

.pager a { color: var(--accent-text); font-weight: 600; text-decoration: none; }

.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; margin-bottom: 8px; }

.admin-grid .card { padding: 22px 22px; }

.admin-grid .section-title { margin-top: 0; }

.button.danger { background: var(--error); color: #fff; }

.button.danger:hover { background: #B42318; }

.form-panel { margin-top: 24px; max-width: 520px; }

@media (prefers-color-scheme: dark) {
    .tabs a.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
    .status-wait { background: #33290F; color: #FDC83A; }
    .button.danger { color: #0A111C; }
}

/* --- Телефон: меню становится полосой вкладок --- */
@media (max-width: 860px) {
    .admin-shell { grid-template-columns: minmax(0, 1fr); }
    .admin-nav {
        flex-direction: row;
        overflow-x: auto;
        padding: 8px 12px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        scrollbar-width: none;
    }
    .admin-nav a { white-space: nowrap; padding: 8px 12px; font-size: 14px; }
    .admin-main { padding: 18px 16px 48px; }
    .admin-me-name { display: none; }
    .table th, .table td { padding: 10px 12px; }
}

.admin-top .brand-name { white-space: nowrap; }

@media (max-width: 520px) {
    .admin-top { padding: 12px 16px; }
    .admin-top .lang select { padding-left: 12px; padding-right: 28px; }
}
