:root {
    --bg: #0f1419;
    --surface: #1a222d;
    --surface2: #222c3a;
    --border: rgba(255,255,255,.08);
    --text: #e8edf4;
    --muted: #8b9cb3;
    --vk: #5181b8;
    --vk-glow: rgba(81,129,184,.25);
    --tg: #2aabee;
    --tg-glow: rgba(42,171,238,.25);
    --ok: #3dd68c;
    --err: #ff6b6b;
    --warn: #ffb020;
    --radius: 14px;
    --shadow: 0 8px 32px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
body {
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    background-image:
        radial-gradient(ellipse 80% 50% at 20% -10%, var(--vk-glow), transparent),
        radial-gradient(ellipse 60% 40% at 90% 0%, var(--tg-glow), transparent);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
}
.wrap { max-width: 1180px; margin: 0 auto; padding: 24px 20px 40px; }
.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.header-main { flex: 1; min-width: 0; }
.header h1 { font-size: 1.35rem; font-weight: 700; margin: 0 0 12px; letter-spacing: -.02em; }
.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.admin-tab {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface2);
    color: var(--muted);
    text-decoration: none;
    font-size: 0.88rem;
    transition: background .15s, color .15s, border-color .15s;
}
.admin-tab:hover {
    color: var(--text);
    border-color: rgba(255,255,255,.16);
}
.admin-tab.active {
    color: var(--text);
    background: rgba(81,129,184,.18);
    border-color: rgba(81,129,184,.45);
}
.header h1 span { color: var(--muted); font-weight: 400; font-size: .9rem; margin-left: 8px; }
.btn-ghost {
    color: var(--muted);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 13px;
    transition: .15s;
}
.btn-ghost:hover { color: var(--text); background: var(--surface2); text-decoration: none; }
.stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}
@media (max-width: 640px) { .stats-row { grid-template-columns: 1fr; } }
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
}
.stat-card.vk::before { background: linear-gradient(90deg, var(--vk), #7b68ee); }
.stat-card.tg::before { background: linear-gradient(90deg, var(--tg), #229ed9); }
.stat-card .label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
    margin-bottom: 8px;
    font-weight: 600;
}
.stat-card .num { font-size: 1.75rem; font-weight: 800; line-height: 1; }
.stat-card.vk .num { color: #7eb0e8; }
.stat-card.tg .num { color: #5bc4f7; }
.stat-card .meta { margin-top: 8px; font-size: 12px; color: var(--muted); }
.stat-card .meta a { color: #9ec5f0; text-decoration: none; }
.stat-card .meta a:hover { text-decoration: underline; }
.stat-card.err-block { border-color: rgba(255,107,107,.3); }
.stat-card.err-block .num { font-size: 13px; color: var(--err); font-weight: 500; }
.stat-card-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.stat-card-body { min-width: 0; flex: 1; }
.stat-avatar {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,.12);
    box-shadow: 0 4px 16px rgba(0,0,0,.35);
}
.stat-card.vk .stat-avatar { border-color: rgba(81,129,184,.35); }
.stat-card.tg .stat-avatar { border-color: rgba(42,171,238,.35); }
.flash-bar { margin-bottom: 20px; display: grid; gap: 10px; }
.flash-bar.is-empty { display: none; margin-bottom: 0; }
button.is-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}
button.is-loading::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border: 2px solid rgba(255,255,255,.25);
    border-top-color: rgba(255,255,255,.92);
    border-radius: 50%;
    animation: btn-spin .65s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }
.flash {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    border: 1px solid transparent;
}
.flash.ok { background: rgba(61,214,140,.12); color: #7ef0b8; border-color: rgba(61,214,140,.25); }
.flash.err { background: rgba(255,107,107,.12); color: #ffaaaa; border-color: rgba(255,107,107,.25); }
.columns {
    display: block;
    margin-bottom: 20px;
}
.platform-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow: visible;
}
.platform-tabs {
    display: flex;
    gap: 8px;
    padding: 12px 16px 0;
    border-bottom: 1px solid var(--border);
    background: rgba(0, 0, 0, .12);
}
.platform-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: -1px;
}
.platform-tab:hover {
    color: var(--text);
    background: rgba(255, 255, 255, .03);
}
.platform-tab.active {
    color: var(--text);
    background: var(--surface);
    border-color: var(--border);
}
.platform-tab.vk.active {
    color: #9ec5f0;
}
.platform-tab.tg.active {
    color: #7dd3fc;
}
.platform-tab.max.active {
    color: #c4b5fd;
}
.platform-panels .platform-panel {
    border: none;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
}
.platform-panels .platform-panel[hidden] {
    display: none !important;
}
.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    min-height: 100%;
}
.panel-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.panel-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.panel-icon svg { display: block; }
.panel.vk .panel-icon { background: transparent; padding: 0; }
.panel.tg .panel-icon { background: transparent; padding: 0; }
.panel.max .panel-icon { background: transparent; padding: 0; }
.panel h2 { font-size: 1.05rem; margin: 0; font-weight: 700; }
.panel .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.post-info {
    background: var(--surface2);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
}
.panel.vk .post-info .views { color: #9ec5f0; }
.panel.tg .post-info .views { color: #7dd3fc; }
.panel.max .post-info .views { color: #c4b5fd; }
.post-info .views { font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.post-metrics { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; color: var(--muted); font-size: 13px; }
.field-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted);
    margin-bottom: 6px;
    font-weight: 600;
}
input[type=url], input[type=text], input[type=number], input[type=password], input[type=tel], input[type=datetime-local] {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface2);
    color: var(--text);
    font-size: 13px;
    transition: border-color .15s, box-shadow .15s;
    color-scheme: dark;
}
input[type=datetime-local]::-webkit-calendar-picker-indicator {
    filter: invert(0.85);
    cursor: pointer;
    opacity: 0.85;
}
input[type=datetime-local]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}
input:focus { outline: none; border-color: rgba(255,255,255,.2); }
.panel.vk input:focus { box-shadow: 0 0 0 3px var(--vk-glow); border-color: var(--vk); }
.panel.tg input:focus { box-shadow: 0 0 0 3px var(--tg-glow); border-color: var(--tg); }
.auth-page input:focus { box-shadow: 0 0 0 3px var(--tg-glow); border-color: var(--tg); }
input:disabled { opacity: .45; cursor: not-allowed; }
input::placeholder { color: #5a6a7e; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
button {
    padding: 10px 16px;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: transform .1s, opacity .15s;
}
button:active:not(:disabled) { transform: scale(.98); }
button:disabled { opacity: .4; cursor: not-allowed; }
.btn-info { background: #3a4f66; color: #e8edf4; }
.btn-info:hover:not(:disabled) { background: #4a617a; }
.panel.vk .btn-del { background: linear-gradient(135deg, #c44, #a33); color: #fff; }
.panel.tg .btn-del { background: linear-gradient(135deg, #e05555, #c04040); color: #fff; }
.btn-sched { background: linear-gradient(135deg, var(--warn), #e09010); color: #1a1200; }
.btn-save, .btn-primary { background: linear-gradient(135deg, var(--tg), #229ed9); color: #fff; }
.btn-danger { background: linear-gradient(135deg, #e05555, #b03030); color: #fff; }
.btn-xs {
    background: var(--surface2);
    color: var(--muted);
    padding: 5px 10px;
    font-size: 11px;
    border: 1px solid var(--border);
}
.btn-xs:hover { color: var(--text); }
.sched-block {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px dashed var(--border);
}
.sched-hint {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}
.sched-mode-tabs {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.sched-mode-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--muted);
    font-size: 12px;
    cursor: pointer;
    user-select: none;
}
.sched-mode-tab:has(input:checked) {
    color: var(--text);
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.04);
}
.sched-mode-tab input {
    margin: 0;
}
.sched-panel {
    margin-top: 12px;
}
.sched-row-stack {
    flex-direction: column;
    align-items: stretch;
}
.sched-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}
.sched-field input[type="datetime-local"] {
    width: 100%;
    max-width: 320px;
}
.sched-label {
    color: var(--muted);
    font-size: 13px;
}
.sched-row { display: flex; gap: 10px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.sched-row input[type=number] { width: 80px; text-align: center; }
.status-block {
    margin-top: auto;
    padding-top: 16px;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.6;
}
.status-line { display: flex; align-items: flex-start; gap: 8px; margin-top: 6px; }
.dot { flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; }
.dot.on { background: var(--ok); box-shadow: 0 0 8px rgba(61,214,140,.5); }
.dot.off { background: #4a5568; }
details { margin-top: 12px; font-size: 12px; color: var(--muted); }
details summary { cursor: pointer; user-select: none; }
details input { margin: 8px 0; }
.queue-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}
.queue-card h2 { font-size: 1.05rem; margin: 0; font-weight: 700; }
.queue-view-tab,
.queue-filter {
    font: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: none;
}
.queue-view-tab:focus-visible,
.queue-filter:focus-visible {
    outline: 2px solid rgba(125, 211, 252, .55);
    outline-offset: 2px;
}
.queue-panel[hidden] { display: none; }
.queue-item[hidden] { display: none; }
.queue-empty[hidden] { display: none; }
.queue-view-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.queue-view-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    background: var(--surface2);
    border: 1px solid var(--border);
    text-decoration: none;
    transition: .15s;
}
.queue-view-tab:hover {
    color: var(--text);
    text-decoration: none;
    border-color: rgba(255,255,255,.15);
}
.queue-view-tab.active {
    color: var(--text);
    background: #3a4f66;
    border-color: rgba(255,255,255,.2);
}
.queue-view-tab .cnt {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(0,0,0,.25);
    color: inherit;
}
.deleted-queue .deleted-item { align-items: flex-start; }
.deleted-queue .queue-item-line {
    flex-wrap: wrap;
    gap: 8px;
}
.deleted-views {
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}
.deleted-views-updated {
    color: var(--muted);
    font-size: 11px;
}
.deleted-item-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
}
.btn-xs.btn-refresh {
    background: rgba(88, 166, 255, .12);
    border-color: rgba(88, 166, 255, .35);
    color: #58a6ff;
    white-space: nowrap;
}
.btn-xs.btn-refresh:hover {
    background: rgba(88, 166, 255, .2);
}
.ord-stats-note.live {
    color: #58a6ff;
    font-size: 12px;
    margin-bottom: 8px;
}
.deleted-text {
    color: var(--text);
    font-size: 12px;
    line-height: 1.45;
    margin-top: 6px;
    opacity: .9;
    word-break: break-word;
}
.ord-stats-banner {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(88, 166, 255, .08);
    border: 1px solid rgba(88, 166, 255, .18);
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}
.ord-stats-hint {
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .08);
}
.ord-stats-hint--empty {
    color: var(--muted);
    font-size: 12px;
}
.ord-stats-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
}
.ord-stats-note.warn {
    color: #f0ad4e;
    font-size: 12px;
    margin-bottom: 8px;
}
.ord-stats-months {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
}
.ord-stats-note {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
    margin-bottom: 8px;
}
.ord-stats-month {
    display: grid;
    gap: 4px;
    font-size: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, .18);
}
.ord-stats-month-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
}
.ord-stats-month-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.ord-stats-month-name {
    font-weight: 600;
    text-transform: capitalize;
}
.ord-stats-month-period,
.ord-stats-month-deadline,
.ord-stats-method,
.ord-stats-views-range,
.ord-stats-submitted {
    color: var(--muted);
}
.ord-stats-month-status {
    font-weight: 600;
    white-space: nowrap;
}
.ord-stats-month-shows strong {
    color: var(--text);
}
.ord-stats-method--estimated_days {
    color: #f0ad4e;
}
.ord-stats-method--history {
    color: #3dd68c;
}
.ord-stats-month--submitted .ord-stats-month-status { color: #3dd68c; }
.ord-stats-month--pending .ord-stats-month-status { color: #58a6ff; }
.ord-stats-month--overdue .ord-stats-month-status { color: #ff7b72; }
.ord-stats-foot {
    margin-top: 8px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}
@media (max-width: 900px) {
    .ord-stats-month-line {
        flex-direction: column;
        align-items: flex-start;
    }
}
.queue-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}
.queue-head-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}
.queue-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.queue-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    background: var(--surface2);
    border: 1px solid var(--border);
    text-decoration: none;
    transition: .15s;
}
.queue-filter:hover { color: var(--text); text-decoration: none; border-color: rgba(255,255,255,.15); }
.queue-filter.active { color: var(--text); background: #3a4f66; border-color: rgba(255,255,255,.2); }
.queue-filter.vk.active { background: rgba(81,129,184,.35); border-color: rgba(81,129,184,.5); color: #cfe4ff; }
.queue-filter.tg.active { background: rgba(42,171,238,.3); border-color: rgba(42,171,238,.5); color: #b8e8ff; }
.queue-filter.max.active { background: rgba(139,92,246,.28); border-color: rgba(139,92,246,.5); color: #ddd6fe; }
.queue-filter .cnt {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(0,0,0,.25);
    color: inherit;
    opacity: .85;
}
.queue { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.queue-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
}
.queue-item-body {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
    flex: 1;
}
.platform-logo {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.platform-logo.vk {
    background: transparent;
    padding: 0;
}
.platform-logo.tg {
    background: transparent;
    padding: 0;
}
.platform-logo.max {
    background: transparent;
    padding: 0;
}
.platform-logo svg { display: block; }
.queue-item-text { min-width: 0; flex: 1; }
.queue-item-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
}
.queue-item-line a {
    word-break: break-all;
}
.queue-item-cancel {
    margin: 0;
    flex-shrink: 0;
}
.btn-cancel {
    padding: 7px 12px;
    white-space: nowrap;
}
.queue .when { color: var(--warn); font-weight: 700; }
.queue .date { color: var(--muted); font-size: 11px; margin-top: 4px; }
.badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    margin-right: 6px;
}
.badge.vk { background: rgba(81,129,184,.25); color: #9ec5f0; }
.badge.tg { background: rgba(42,171,238,.25); color: #7dd3fc; }
.foot {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.7;
    padding: 16px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.foot code {
    background: var(--surface2);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    word-break: break-all;
}
a { color: #7dd3fc; text-decoration: none; }
a:hover { text-decoration: underline; }
.warn-text { color: #ffb4b4; }
.empty-queue { color: var(--muted); margin: 0; font-size: 13px; }

/* Login & auth pages */
.auth-wrap { max-width: 420px; margin: 0 auto; padding: 40px 20px; }
.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
}
.auth-card h1 { font-size: 1.2rem; margin: 0 0 8px; }
.auth-card .lead { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.auth-back { margin-bottom: 16px; }

/* Minimal password gate */
body.login-minimal {
    display: grid;
    place-items: center;
    min-height: 100vh;
    background:
        radial-gradient(ellipse 70% 45% at 50% 0%, rgba(42, 171, 238, 0.16), transparent 55%),
        radial-gradient(ellipse 50% 40% at 80% 100%, rgba(81, 129, 184, 0.12), transparent 50%),
        #0b1016;
}
.login-minimal-wrap {
    width: min(100%, 380px);
    margin: 0;
    padding: 24px;
}
.login-gate { margin: 0; }
.login-gate-error {
    margin: 0 0 14px;
    text-align: center;
}
.login-field {
    display: flex;
    align-items: stretch;
    gap: 0;
    background: rgba(26, 34, 45, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    box-shadow:
        0 18px 50px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    overflow: hidden;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.login-field:focus-within {
    border-color: rgba(42, 171, 238, 0.55);
    box-shadow:
        0 18px 50px rgba(0, 0, 0, 0.45),
        0 0 0 4px rgba(42, 171, 238, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.login-password {
    flex: 1;
    margin: 0;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 18px 8px 18px 20px;
    font-size: 16px;
    letter-spacing: 0.08em;
    color: var(--text);
}
.login-password::placeholder {
    color: #6d7d92;
    letter-spacing: 0.02em;
}
.login-submit {
    flex: 0 0 auto;
    margin: 8px;
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 14px;
    display: inline-grid;
    place-items: center;
    background: linear-gradient(135deg, #2aabee, #1b8fd0);
    color: #fff;
    box-shadow: 0 8px 20px rgba(42, 171, 238, 0.28);
}
.login-submit:hover:not(:disabled) {
    filter: brightness(1.06);
}
.login-submit:active:not(:disabled) {
    transform: scale(0.97);
}

label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
/* Договор ОРД — select в стиле полей админки */
select.contract-select,
.contract-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    box-sizing: border-box;
    border: 1px solid var(--border);
    border-radius: 10px;
    background-color: var(--surface2);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238b9cb3' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px 8px;
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    line-height: 1.3;
    cursor: pointer;
    color-scheme: dark;
    transition: border-color .15s, box-shadow .15s;
}
select.contract-select:focus,
.contract-select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, .2);
    box-shadow: 0 0 0 3px rgba(81, 129, 184, .2);
}
select.contract-select option,
.contract-select option {
    background: var(--surface2);
    color: var(--text);
}
.sched-contract-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 8px;
    flex-wrap: wrap;
}
.sched-contract-row .sched-label {
    flex-shrink: 0;
}
.sched-contract-row .contract-select {
    flex: 1;
    min-width: 180px;
    max-width: 100%;
    padding: 11px 36px 11px 14px;
}
.queue-item-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
    flex-shrink: 0;
    min-width: 0;
}
.queue-contract-form {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    width: 100%;
    max-width: 320px;
}
.queue-contract-form .contract-select {
    flex: 1;
    min-width: 120px;
    max-width: 220px;
    padding: 8px 32px 8px 10px;
    font-size: 12px;
    border-radius: 8px;
}
.btn-contract {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: #3b4a6b;
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
.btn-contract:hover {
    background: #4a5d85;
    border-color: rgba(255, 255, 255, .2);
}
.queue-contract-line {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}
.queue-contract-current {
    display: none;
}

.vk-token-hint{font-size:12px;color:var(--muted);margin-top:8px;line-height:1.45}.vk-token-hint a{color:var(--vk)}.btn-vk-id{display:inline-block;padding:10px 16px;border-radius:8px;background:var(--vk);color:#fff!important;font-size:13px;font-weight:600;text-decoration:none}.btn-vk-id:hover{filter:brightness(1.08)}

.vk-auth-card {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(81, 129, 184, .08);
}
.vk-auth-card.needs-auth {
    border-color: rgba(255, 176, 32, .35);
    background: rgba(255, 176, 32, .06);
}
.vk-auth-card.authorized {
    border-color: rgba(61, 214, 140, .25);
    background: rgba(61, 214, 140, .06);
}
.vk-auth-head {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 12px;
}
.vk-auth-head strong { display: block; font-size: 14px; margin-bottom: 4px; }
.vk-auth-desc { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.btn-vk-auth { width: 100%; text-align: center; box-sizing: border-box; }
.vk-auth-manual { margin-top: 12px; font-size: 12px; color: var(--muted); }
.vk-auth-manual input[type=text] { width: 100%; margin-top: 8px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface2); color: var(--text); }

.login-next-hint{font-size:13px;color:var(--muted);line-height:1.5;margin:-8px 0 16px}
.login-next-hint strong{color:var(--text);font-weight:600}

/* ORD: кнопка "Подать акт" */
.btn-xs.btn-act {
    background: linear-gradient(135deg, #1a7f4b 0%, #2da65c 100%);
    color: #fff;
    border: none;
}
.btn-xs.btn-act:hover {
    background: linear-gradient(135deg, #15693e 0%, #259950 100%);
    color: #fff;
}

.btn-xs.btn-delete-now {
    background: linear-gradient(135deg, #8a3a12 0%, #c45a1a 100%);
    color: #fff;
    border: none;
}
.btn-xs.btn-delete-now:hover {
    background: linear-gradient(135deg, #73310f 0%, #a84c16 100%);
    color: #fff;
}

.ord-act-local-badge {
    display: inline-block;
    margin-top: 6px;
    font-size: 11px;
    color: #3dd68c;
    font-weight: 600;
}
.ord-act-local-badge code {
    font-family: var(--mono, monospace);
    font-size: 10px;
    background: rgba(61,214,140,.12);
    padding: 1px 4px;
    border-radius: 4px;
}

.ord-act-submit-form { display: block; margin-top: 6px; }
.ord-act-amount-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ord-act-amount-input {
    width: 130px;
    padding: 3px 6px;
    font-size: 12px;
    border: 1px solid var(--border, #3a3f52);
    border-radius: 5px;
    background: var(--input-bg, #1a1d2e);
    color: var(--text, #d0d4e8);
}
.ord-act-amount-input:focus { outline: none; border-color: #2da65c; }
.ord-act-amount-input.ord-act-amount-auto {
    border-color: #2da65c55;
    background: var(--input-bg, #1a1d2e);
    color: #7de89a;
}
.ord-act-amount-hint {
    font-size: 11px;
    color: #2da65c;
    opacity: 0.8;
    white-space: nowrap;
}

.ord-act-ord-badge {
    color: #7ac8f5;
}

/* Поисковый пикер договоров в формах расписания */
.sched-contract-picker {
    position: relative;
    width: 100%;
}
.sched-contract-search {
    width: 100%;
    box-sizing: border-box;
    padding: 7px 10px;
    border: 1px solid var(--border, #3a3f4b);
    border-radius: 6px;
    background: var(--input-bg, #1e2330);
    color: var(--text, #e8eaf0);
    font-size: 14px;
    outline: none;
}
.sched-contract-search:focus {
    border-color: var(--accent, #5b8dee);
}
.sched-contract-results {
    position: absolute;
    z-index: 200;
    top: calc(100% + 3px);
    left: 0;
    right: 0;
    max-height: 260px;
    overflow-y: auto;
    background: var(--card-bg, #252b3b);
    border: 1px solid var(--border, #3a3f4b);
    border-radius: 6px;
    padding: 4px 0;
    margin: 0;
    list-style: none;
    box-shadow: 0 6px 20px rgba(0,0,0,.35);
}
.sched-contract-opt {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text, #e8eaf0);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sched-contract-opt:hover {
    background: var(--hover, #2e3650);
}
.sched-contract-opt-empty {
    color: var(--muted, #7a8499);
    font-style: italic;
}

.vk-type-badge {
    display: inline-block;
    margin-right: 6px;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    vertical-align: middle;
}
.vk-type-story {
    background: rgba(180, 120, 255, 0.22);
    color: #d2b4ff;
}
.vk-type-clip {
    background: rgba(81, 129, 184, 0.22);
    color: #9ec5f0;
}
