/* Палитра под Discord */
:root {
    --bg-0: #0e0f14;
    --bg-1: #15171f;
    --bg-2: #1c1f29;
    --bg-3: #232735;
    --line: rgba(255, 255, 255, 0.06);
    --line-strong: rgba(255, 255, 255, 0.12);
    --text: #e9eaf0;
    --muted: #9aa0b4;
    --accent: #5865F2;
    --accent-2: #7d6cff;
    --success: #57F287;
    --warning: #FEE75C;
    --danger: #ED4245;
    --pink: #EB459E;
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.45);
    --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.25);
    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 10px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg-0);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-feature-settings: "ss01", "cv11";
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
code, .mono { font-family: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace; }

/* Фоновое сияние */
.aurora {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(60% 50% at 12% 8%, rgba(88, 101, 242, 0.30), transparent 60%),
        radial-gradient(50% 40% at 88% 0%, rgba(235, 69, 158, 0.18), transparent 60%),
        radial-gradient(60% 50% at 50% 100%, rgba(125, 108, 255, 0.18), transparent 60%);
    filter: blur(40px);
    pointer-events: none;
}

/* Шапка */
.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    background: rgba(14, 15, 20, 0.65);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.brand-text { font-size: 16px; letter-spacing: 0.2px; }

.topnav { display: flex; gap: 22px; align-items: center; }
.topnav a {
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.15s ease;
}
.topnav a:hover { color: var(--text); }
.topnav-user {
    color: var(--muted);
    font-size: 12px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    background: var(--bg-2);
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
}
.topnav-form { margin: 0; }
.topnav-logout {
    background: var(--bg-2);
    border: 1px solid var(--line);
    color: var(--muted);
    font: inherit;
    font-size: 13px;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.topnav-logout:hover {
    color: var(--text);
    border-color: rgba(237, 66, 69, 0.45);
    background: rgba(237, 66, 69, 0.08);
}

/* Аутентификация */
.auth {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}
.auth-card {
    width: 100%;
    max-width: 440px;
    background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 32px;
}
.auth-head h1 {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.01em;
    background: linear-gradient(180deg, #fff, #c5cae2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.auth-head p {
    color: var(--muted);
    margin: 0 0 22px;
    line-height: 1.55;
}
.auth-error {
    background: rgba(237, 66, 69, 0.12);
    border: 1px solid rgba(237, 66, 69, 0.4);
    color: #ffd1d2;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.5;
}
.auth-error a { color: #fff; text-decoration: underline; }
.auth-form { display: grid; gap: 14px; }
.auth-form label {
    display: grid;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
}
.auth-form label span { color: var(--muted); }
.auth-form input[type="text"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-3);
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.auth-form input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(88, 101, 242, 0.2);
}
.auth-form button {
    margin-top: 8px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border: none;
    color: #fff;
    font: inherit;
    font-weight: 700;
    font-size: 14px;
    padding: 12px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.15s ease;
}
.auth-form button:hover { filter: brightness(1.08); }
.auth-form button:active { transform: translateY(1px); }
.auth-hint {
    margin-top: 14px;
    background: var(--bg-3);
    border: 1px solid var(--line);
    color: var(--muted);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.5;
}
.auth-foot {
    margin-top: 18px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}
.auth-foot a { color: var(--accent-2); }
.auth-foot a:hover { text-decoration: underline; }

.status-pill {
    margin-bottom: 16px;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 13px;
    text-align: center;
    border: 1px solid var(--line);
}
.status-pill.is-pending {
    background: rgba(254, 231, 92, 0.10);
    border-color: rgba(254, 231, 92, 0.35);
    color: #ffe79a;
}
.status-pill.is-ok {
    background: rgba(87, 242, 135, 0.12);
    border-color: rgba(87, 242, 135, 0.4);
    color: #b8ffd0;
}
.status-pill.is-error {
    background: rgba(237, 66, 69, 0.12);
    border-color: rgba(237, 66, 69, 0.4);
    color: #ffd1d2;
}

/* Контейнер */
.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 32px;
}

/* Hero */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 32px;
    margin-bottom: 28px;
}
.hero-text h1 {
    margin: 0 0 10px;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(180deg, #fff, #b6bbcf);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.lead {
    color: var(--muted);
    max-width: 520px;
    line-height: 1.55;
    margin: 0;
}

.summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 12px;
}
.summary-card {
    padding: 16px 18px;
    background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    min-width: 140px;
}
.summary-card.accent-mute { border-color: rgba(88, 101, 242, 0.35); }
.summary-card.accent-ban  { border-color: rgba(237, 66, 69, 0.35); }
.summary-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.summary-value { font-size: 26px; font-weight: 700; margin-top: 6px; }

/* Тулбар */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin: 24px 0 18px;
}
.search {
    flex: 1;
    min-width: 220px;
    padding: 12px 16px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search::placeholder { color: var(--muted); }
.search:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(88, 101, 242, 0.2);
}

.filter { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
    padding: 10px 14px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.chip:hover { color: var(--text); }
.chip.is-active {
    color: #fff;
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.2), rgba(125, 108, 255, 0.2));
    border-color: rgba(125, 108, 255, 0.55);
}

/* Сетка карточек */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    color: inherit;
    position: relative;
    overflow: hidden;
}
.card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(88,101,242,0.08), transparent 30%);
    pointer-events: none;
}
.card:hover {
    transform: translateY(-2px);
    border-color: rgba(125, 108, 255, 0.45);
    box-shadow: var(--shadow-lg);
}

.card-head { display: flex; align-items: center; gap: 14px; position: relative; }
.avatar {
    width: 56px; height: 56px;
    border-radius: 14px;
    object-fit: cover;
    background: var(--bg-3);
    border: 1px solid var(--line-strong);
}
.avatar-fallback {
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), var(--pink));
    color: #fff;
}
.card-id { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.card-name {
    font-weight: 700;
    font-size: 16px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.card-position {
    color: var(--muted);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 22px;
    padding: 0 8px;
    border-radius: 7px;
    background: rgba(125, 108, 255, 0.18);
    color: #c7c0ff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    border: 1px solid rgba(125, 108, 255, 0.4);
}

.card-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    background: var(--bg-3);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 12px;
    position: relative;
}
.stat { text-align: center; }
.stat-value { font-size: 20px; font-weight: 700; }
.stat-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

.card-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 12px;
    position: relative;
}
.today-pill {
    background: rgba(88, 101, 242, 0.12);
    border: 1px solid rgba(88, 101, 242, 0.35);
    color: #c7cdff;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
}

/* Пустое состояние */
.empty {
    text-align: center;
    padding: 80px 32px;
    background: var(--bg-2);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-lg);
}
.empty.small { padding: 24px; }

/* Профиль сотрудника */
.back-link {
    display: inline-block;
    color: var(--muted);
    margin-bottom: 18px;
    font-size: 14px;
}
.back-link:hover { color: var(--text); }

.profile {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    margin-bottom: 28px;
}
@media (min-width: 900px) {
    .profile { grid-template-columns: 1.1fr 1.4fr; }
}

.profile-card {
    display: flex;
    gap: 20px;
    padding: 22px;
    background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    align-items: center;
    box-shadow: var(--shadow-sm);
}
.profile-avatar {
    width: 96px; height: 96px;
    border-radius: 22px;
    object-fit: cover;
    background: var(--bg-3);
    border: 1px solid var(--line-strong);
}
.profile-meta { min-width: 0; }
.profile-name {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.01em;
}
.profile-position {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    margin-bottom: 14px;
}
.profile-kv {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}
.profile-kv > div { display: flex; gap: 8px; align-items: baseline; }
.profile-kv dt { width: 110px; color: var(--muted); margin: 0; }
.profile-kv dd { margin: 0; color: var(--text); }
.profile-kv code {
    background: var(--bg-3);
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid var(--line);
    font-size: 12px;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.big-stat {
    padding: 18px;
    background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.big-stat-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.big-stat-value {
    font-size: 36px;
    font-weight: 800;
    margin: 8px 0 4px;
    background: linear-gradient(180deg, #fff, #c5cae2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.big-stat-sub { color: var(--muted); font-size: 13px; }
.big-stat.accent-ban  { border-color: rgba(237, 66, 69, 0.35); }
.big-stat.accent-other { border-color: rgba(254, 231, 92, 0.3); }
.big-stat.accent-total { border-color: rgba(87, 242, 135, 0.35); }

/* Отчёты */
.reports-head {
    display: flex; align-items: center; gap: 12px;
    margin: 24px 0 12px;
    flex-wrap: wrap;
}
.reports-head h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.reports-count {
    background: var(--bg-3);
    color: var(--muted);
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 12px;
    border: 1px solid var(--line);
}

.day-form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-wrap: wrap;
}
.day-form label {
    color: var(--muted);
    font-size: 13px;
}
.day-form input[type="date"] {
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    font: inherit;
    font-size: 13px;
    padding: 8px 10px;
    color-scheme: dark;
}
.day-form input[type="date"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.2);
    outline: none;
}
.day-form button {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border: none;
    color: #fff;
    font: inherit;
    font-weight: 600;
    font-size: 13px;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: filter 0.15s ease;
}
.day-form button:hover { filter: brightness(1.1); }
.day-reset {
    color: var(--muted);
    font-size: 13px;
    text-decoration: underline;
}
.day-reset:hover { color: var(--text); }

.day-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin: 0 0 14px;
}
.day-chips-label {
    color: var(--muted);
    font-size: 12px;
    margin-right: 4px;
}
.day-chip {
    display: inline-block;
    padding: 4px 10px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 12px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.day-chip:hover { color: var(--text); border-color: var(--line-strong); }
.day-chip.is-active {
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.25), rgba(125, 108, 255, 0.25));
    color: #fff;
    border-color: rgba(125, 108, 255, 0.55);
}
.day-chips-more {
    color: var(--muted);
    font-size: 12px;
    margin-left: 4px;
}

.report-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.report {
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: grid;
    gap: 8px;
}
.report.is-mute { border-left-color: var(--accent); }
.report.is-ban  { border-left-color: var(--danger); }
.report.is-other { border-left-color: var(--warning); }

.report-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--muted);
    font-size: 12px;
}
.report-type {
    color: var(--text);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.08em;
}
.report-body { font-size: 14px; line-height: 1.45; }
.report-body code {
    background: var(--bg-3);
    padding: 1px 6px;
    border-radius: 4px;
    border: 1px solid var(--line);
}
.report-details {
    margin-top: 4px;
    color: var(--muted);
    white-space: pre-wrap;
}
.report-foot {
    display: flex;
    gap: 14px;
    align-items: center;
    color: var(--muted);
    font-size: 12px;
    flex-wrap: wrap;
}
.report-foot a { color: var(--accent-2); }
.report-foot a:hover { text-decoration: underline; }
.report-id { margin-left: auto; }

.report-shots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}
.shot {
    display: block;
    width: 120px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-3);
    border: 1px solid var(--line);
    transition: transform 0.18s ease, border-color 0.18s ease;
    position: relative;
}
.shot:hover {
    transform: translateY(-2px);
    border-color: rgba(125, 108, 255, 0.55);
}
.shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.shot-fallback {
    display: none;
    position: absolute;
    inset: 0;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
    padding: 8px;
}
.shot-broken { display: flex; }
.shot-broken .shot-fallback { display: flex; }

/* Подвал */
.footer {
    display: none;
}

/* Адаптивность */
@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; }
    .summary { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
    .container { padding: 20px; }
    .topbar { padding: 14px 20px; }
    .summary { grid-template-columns: 1fr 1fr; }
    .profile-stats { grid-template-columns: 1fr; }
    .profile-card { flex-direction: column; align-items: flex-start; text-align: left; }
}


/* Страница повышений */
.section-title {
    margin: 28px 0 14px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.promo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px;
    margin-bottom: 12px;
}
.promo-card {
    background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 18px;
    display: grid;
    gap: 14px;
}
.promo-head {
    display: flex;
    align-items: center;
    gap: 14px;
}
.promo-id { flex: 1; min-width: 0; }
.promo-id .card-name { font-size: 15px; }
.promo-id .card-position { font-size: 12px; }
.mono-link {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    color: var(--muted);
}
.mono-link:hover { color: var(--text); }
.promo-badge {
    background: var(--bg-3);
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 12px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.promo-body { display: grid; gap: 6px; }
.promo-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
}
.promo-value { color: var(--text); font-weight: 500; }
.promo-form { display: grid; gap: 10px; }
.promo-form textarea {
    background: var(--bg-3);
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
    font: inherit;
    font-size: 13px;
    padding: 10px 12px;
    resize: vertical;
    min-height: 56px;
}
.promo-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(88, 101, 242, 0.2);
}
.promo-actions {
    display: flex;
    gap: 8px;
}
.btn-approve, .btn-reject {
    flex: 1;
    border: none;
    color: #fff;
    font: inherit;
    font-weight: 700;
    font-size: 13px;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: filter 0.15s ease;
}
.btn-approve { background: linear-gradient(135deg, #2eb872, #57F287); }
.btn-reject { background: linear-gradient(135deg, #c43a3c, #ED4245); }
.btn-approve:hover, .btn-reject:hover { filter: brightness(1.08); }


/* Выговоры */
.warning-form {
    margin: 0;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 14px;
}
.warning-form-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: stretch;
}
.warning-form select,
.warning-form input[type="text"] {
    background: var(--bg-3);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    font: inherit;
    font-size: 13px;
    padding: 10px 12px;
    color-scheme: dark;
}
.warning-form input[type="text"] {
    flex: 1;
    min-width: 200px;
}
.warning-form select:focus,
.warning-form input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.2);
}
.btn-warn-issue {
    background: linear-gradient(135deg, #c43a3c, #ED4245);
    border: none;
    color: #fff;
    font: inherit;
    font-weight: 700;
    font-size: 13px;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: filter 0.15s ease;
}
.btn-warn-issue:hover { filter: brightness(1.08); }


/* Переключатель типа выговора (карточки-радио) */
.warning-type-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

/* Стандартный input полностью скрываем, навигация по Tab сохраняется. */
.warn-type-card input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    appearance: none;
    -webkit-appearance: none;
}

.warn-type-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-3);
    border: 1px solid var(--line);
    border-radius: 14px;
    cursor: pointer;
    transition: border-color 0.18s ease,
                background 0.18s ease,
                box-shadow 0.18s ease,
                transform 0.12s ease;
    user-select: none;
    color: var(--text);
}

.warn-type-card:hover {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.02);
}
.warn-type-card:active { transform: scale(0.99); }

.warn-type-card:focus-within {
    outline: none;
    box-shadow: 0 0 0 3px rgba(125, 108, 255, 0.25);
}

.warn-type-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    font-size: 18px;
    line-height: 1;
}

.warn-type-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.2;
    flex: 1;
    min-width: 0;
}
.warn-type-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}
.warn-type-desc {
    font-size: 11px;
    color: var(--muted);
}

.warn-type-check {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    border-radius: 50%;
    background: transparent;
    border: 1px solid var(--line-strong);
    color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    transition: background 0.18s ease,
                border-color 0.18s ease,
                color 0.18s ease;
}

/* Жёлтая карточка — выбрана */
.warn-type-card.warn-type-verbal:has(input:checked) {
    border-color: rgba(254, 231, 92, 0.6);
    background: rgba(254, 231, 92, 0.08);
    box-shadow: 0 0 0 3px rgba(254, 231, 92, 0.12);
}
.warn-type-card.warn-type-verbal:has(input:checked) .warn-type-icon {
    background: rgba(254, 231, 92, 0.18);
}
.warn-type-card.warn-type-verbal:has(input:checked) .warn-type-check {
    background: #FEE75C;
    border-color: #FEE75C;
    color: #20232a;
}

/* Красная карточка — выбрана */
.warn-type-card.warn-type-red:has(input:checked) {
    border-color: rgba(237, 66, 69, 0.6);
    background: rgba(237, 66, 69, 0.10);
    box-shadow: 0 0 0 3px rgba(237, 66, 69, 0.15);
}
.warn-type-card.warn-type-red:has(input:checked) .warn-type-icon {
    background: rgba(237, 66, 69, 0.20);
}
.warn-type-card.warn-type-red:has(input:checked) .warn-type-check {
    background: #ED4245;
    border-color: #ED4245;
    color: #fff;
}

@media (max-width: 540px) {
    .warning-type-toggle { grid-template-columns: 1fr; }
}


/* Подиум — топ работников дня */
.podium-section { margin: 8px 0 28px; }
.podium {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 14px;
    align-items: end;
}
.podium-slot { display: flex; }
.podium-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 18px 14px;
    background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    color: inherit;
    transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
    position: relative;
    overflow: hidden;
}
.podium-card:hover {
    transform: translateY(-3px);
    border-color: rgba(125, 108, 255, 0.4);
    box-shadow: var(--shadow-lg);
}
.podium-second .podium-card { padding-top: 22px; }
.podium-third .podium-card { padding-top: 22px; }
.podium-first .podium-card-first {
    padding: 28px 14px 22px;
    border-color: rgba(254, 231, 92, 0.5);
    background:
        radial-gradient(70% 60% at 50% -10%, rgba(254, 231, 92, 0.16), transparent 70%),
        linear-gradient(180deg, var(--bg-2), var(--bg-1));
    box-shadow: 0 16px 36px rgba(254, 231, 92, 0.08), var(--shadow-sm);
}
.podium-crown {
    position: absolute;
    top: 8px;
    font-size: 22px;
    line-height: 1;
}
.podium-place {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 800;
    font-size: 13px;
    background: var(--bg-3);
    border: 1px solid var(--line);
    color: var(--muted);
}
.podium-card-first .podium-place {
    background: linear-gradient(135deg, #FEE75C, #f0a000);
    color: #1d1f27;
    border-color: transparent;
}
.podium-second .podium-place { color: #d8d8d8; }
.podium-third .podium-place { color: #cd7f32; }

.podium-avatar {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    object-fit: cover;
    background: var(--bg-3);
    border: 1px solid var(--line-strong);
}
.podium-avatar-big {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    border-color: rgba(254, 231, 92, 0.5);
}
.podium-name {
    font-weight: 700;
    font-size: 15px;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}
.podium-position {
    color: var(--muted);
    font-size: 12px;
}
.podium-stats {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
}
.podium-total {
    background: var(--bg-3);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 2px 10px;
    font-weight: 700;
    font-size: 12px;
}
.podium-empty {
    flex: 1;
    text-align: center;
    padding: 28px 14px;
    color: var(--muted);
    font-size: 13px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-lg);
    background: var(--bg-2);
}

@media (max-width: 720px) {
    .podium {
        grid-template-columns: 1fr;
    }
    .podium-second { order: 2; }
    .podium-first { order: 1; }
    .podium-third { order: 3; }
}

/* Лента отчётов */
.feed-section { margin: 28px 0 28px; }
.feed-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}
.feed-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--accent);
}
.feed-item.is-mute { border-left-color: var(--accent); }
.feed-item.is-ban { border-left-color: var(--danger); }
.feed-item.is-other { border-left-color: var(--warning); }

.feed-author {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    min-width: 56px;
}
.feed-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--bg-3);
    border: 1px solid var(--line);
}
.feed-avatar.avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}
.feed-author-name {
    font-size: 12px;
    color: var(--muted);
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.feed-author-name:hover { color: var(--text); }

.feed-body { display: grid; gap: 6px; min-width: 0; }
.feed-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--muted);
}
.feed-type {
    background: var(--bg-3);
    color: var(--text);
    padding: 2px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.feed-violator code {
    background: var(--bg-3);
    padding: 1px 8px;
    border-radius: 6px;
    border: 1px solid var(--line);
    font-size: 12px;
    color: var(--text);
}
.feed-time { margin-left: auto; }
.feed-details {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
}
.feed-shots {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.shot.shot-mini {
    width: 80px;
    height: 60px;
    border-radius: 8px;
}

/* Заголовок секции "Все сотрудники" */
.staff-section { margin-top: 28px; margin-bottom: 4px; }

/* Библиотека */
.library-search {
    display: flex;
    gap: 10px;
    margin: 6px 0 22px;
    flex-wrap: wrap;
}
.library-search input[type="search"] {
    flex: 1;
    min-width: 240px;
    padding: 12px 16px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    color: var(--text);
    font: inherit;
    font-size: 14px;
}
.library-search input[type="search"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(88, 101, 242, 0.2);
}
.library-search button {
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border: none;
    color: #fff;
    font: inherit;
    font-weight: 700;
    font-size: 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: filter 0.15s ease;
}
.library-search button:hover { filter: brightness(1.08); }

.violator-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.violator-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text);
    font-size: 13px;
    transition: border-color 0.15s, background 0.15s, transform 0.12s;
}
.violator-chip:hover {
    border-color: rgba(125, 108, 255, 0.4);
    background: rgba(125, 108, 255, 0.05);
    transform: translateY(-1px);
}
.violator-name {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 12px;
}
.violator-count {
    background: var(--bg-3);
    border: 1px solid var(--line);
    color: var(--muted);
    border-radius: 999px;
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 700;
}


/* Откат отчёта */
.report-revert {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
}
.btn-revert {
    list-style: none;
    cursor: pointer;
    padding: 6px 12px;
    background: var(--bg-3);
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    transition: color 0.15s, border-color 0.15s, background 0.15s;
    user-select: none;
}
.btn-revert::-webkit-details-marker { display: none; }
.btn-revert:hover {
    color: #ffd1d2;
    border-color: rgba(237, 66, 69, 0.45);
    background: rgba(237, 66, 69, 0.08);
}
.report-revert[open] .btn-revert {
    color: #ffd1d2;
    border-color: rgba(237, 66, 69, 0.5);
}
.report-revert-form {
    display: flex;
    gap: 6px;
    align-items: center;
    margin: 0;
    flex-wrap: wrap;
    width: 100%;
    max-width: 480px;
}
.report-revert-form input[type="text"] {
    flex: 1;
    min-width: 200px;
    background: var(--bg-3);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    font: inherit;
    font-size: 12px;
    padding: 8px 10px;
}
.report-revert-form input:focus {
    outline: none;
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(237, 66, 69, 0.18);
}
.btn-revert-confirm {
    background: linear-gradient(135deg, #c43a3c, #ED4245);
    border: none;
    color: #fff;
    font: inherit;
    font-weight: 700;
    font-size: 12px;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: filter 0.15s ease;
}
.btn-revert-confirm:hover { filter: brightness(1.08); }


/* Прогресс до повышения и стаж в карточке */
.promo-progress { margin: 24px 0; }
.promo-progress-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}
.promo-progress-card {
    padding: 16px;
    background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.promo-progress-label {
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.promo-progress-value {
    font-size: 22px;
    font-weight: 800;
    margin: 6px 0 4px;
    background: linear-gradient(180deg, #fff, #c5cae2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.promo-progress-sub {
    color: var(--muted);
    font-size: 12px;
}

.promo-skip-form { margin-top: 10px; }
.btn-promo-skip {
    appearance: none;
    cursor: pointer;
    border: 1px solid rgba(125, 108, 255, 0.55);
    background: linear-gradient(180deg, rgba(125, 108, 255, 0.18), rgba(88, 101, 242, 0.10));
    color: #e9eaf0;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.02em;
    padding: 8px 12px;
    border-radius: 10px;
    transition: filter 0.15s ease, transform 0.15s ease;
    margin-top: 10px;
}
.btn-promo-skip:hover { filter: brightness(1.12); }
.btn-promo-skip:active { transform: translateY(1px); }

/* Модалка подтверждения «пропустить время» */
body.is-modal-open { overflow: hidden; }
.promo-skip-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.promo-skip-modal[hidden] { display: none; }
.promo-skip-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 9, 14, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.promo-skip-modal-card {
    position: relative;
    z-index: 1;
    width: min(440px, 100%);
    background: linear-gradient(180deg, var(--bg-2, #161823), var(--bg-1, #0e0f14));
    border: 1px solid rgba(125, 108, 255, 0.45);
    border-radius: 16px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
    padding: 22px 22px 18px;
    animation: promo-skip-in 0.18s ease-out;
}
@keyframes promo-skip-in {
    from { transform: translateY(8px) scale(0.98); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}
.promo-skip-modal-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 800;
    background: linear-gradient(135deg, #5865F2, #EB459E);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.promo-skip-modal-text {
    margin: 0 0 8px;
    color: #e9eaf0;
    font-size: 14px;
    line-height: 1.5;
}
.promo-skip-modal-note {
    margin: 0 0 16px;
    color: var(--muted, #9aa0b4);
    font-size: 12px;
    line-height: 1.5;
}
.promo-skip-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}
.promo-skip-modal-actions .promo-skip-form { margin: 0; }
.btn-modal-cancel,
.btn-modal-confirm {
    appearance: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    padding: 9px 16px;
    border-radius: 10px;
    transition: filter 0.15s ease, transform 0.15s ease;
}
.btn-modal-cancel {
    background: transparent;
    color: #c7cad8;
    border: 1px solid var(--line, #2a2d3a);
}
.btn-modal-cancel:hover { background: rgba(255, 255, 255, 0.04); }
.btn-modal-confirm {
    color: #fff;
    border: 1px solid rgba(125, 108, 255, 0.6);
    background: linear-gradient(135deg, #5865F2, #7d6cff);
}
.btn-modal-confirm:hover { filter: brightness(1.1); }
.btn-modal-confirm:active { transform: translateY(1px); }

.profile-stats-shards { margin: 18px 0 6px; }
.shards-stat {
    border-color: rgba(125, 108, 255, 0.45);
    background:
        radial-gradient(80% 60% at 50% 0%, rgba(125, 108, 255, 0.10), transparent 60%),
        linear-gradient(180deg, var(--bg-2), var(--bg-1));
}

/* Страница стеклышек */
.shards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 14px;
    margin-bottom: 12px;
}
.shards-card {
    position: relative;
    background:
        radial-gradient(85% 70% at 100% 0%, rgba(125, 108, 255, 0.10), transparent 60%),
        linear-gradient(180deg, var(--bg-2), var(--bg-1));
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 18px;
    display: grid;
    gap: 16px;
    overflow: hidden;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.shards-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--pink));
    opacity: 0.7;
}
.shards-card:hover {
    transform: translateY(-2px);
    border-color: rgba(125, 108, 255, 0.45);
    box-shadow: var(--shadow-lg);
}
.shards-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
}
.shards-id { display: grid; gap: 4px; min-width: 0; }
.shards-id .card-name {
    font-size: 15px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.shards-id .card-name:hover { color: var(--text); text-decoration: underline; }
.shards-balance {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background:
        radial-gradient(120% 100% at 50% 0%, rgba(125, 108, 255, 0.22), transparent 70%),
        rgba(125, 108, 255, 0.08);
    border: 1px solid rgba(125, 108, 255, 0.4);
    padding: 8px 16px;
    border-radius: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    line-height: 1;
}
.shards-balance-emoji { font-size: 15px; }
.shards-balance-value {
    font-weight: 800;
    font-size: 22px;
    background: linear-gradient(180deg, #e3deff, #b3a6ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.shards-form {
    display: grid;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}
.shards-op-toggle {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.shards-op-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 8px;
    background: var(--bg-3);
    border: 1px solid var(--line);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.12s;
    user-select: none;
}
.shards-op-card:hover { border-color: var(--line-strong); }
.shards-op-card:active { transform: scale(0.98); }
.shards-op-card input[type="radio"] {
    position: absolute;
    width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    appearance: none; -webkit-appearance: none;
}
.shards-op-icon {
    font-size: 13px;
    line-height: 1;
    font-weight: 800;
}
.shards-op-label { font-size: 12px; font-weight: 600; color: var(--muted); }
.shards-op-grant:has(input:checked) {
    border-color: rgba(87, 242, 135, 0.55);
    background: rgba(87, 242, 135, 0.10);
    box-shadow: 0 0 0 3px rgba(87, 242, 135, 0.12);
}
.shards-op-grant:has(input:checked) .shards-op-label { color: #b8ffd0; }
.shards-op-revoke:has(input:checked) {
    border-color: rgba(237, 66, 69, 0.55);
    background: rgba(237, 66, 69, 0.10);
    box-shadow: 0 0 0 3px rgba(237, 66, 69, 0.12);
}
.shards-op-revoke:has(input:checked) .shards-op-label { color: #ffd1d2; }
.shards-op-set:has(input:checked) {
    border-color: rgba(125, 108, 255, 0.55);
    background: rgba(125, 108, 255, 0.10);
    box-shadow: 0 0 0 3px rgba(125, 108, 255, 0.12);
}
.shards-op-set:has(input:checked) .shards-op-label { color: #c7c0ff; }

.shards-form-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.shards-form-row input[type="number"] {
    width: 120px;
    background: var(--bg-3);
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
    font: inherit;
    font-size: 13px;
    padding: 10px 12px;
    color-scheme: dark;
}
.shards-form-row input[type="text"] {
    flex: 1;
    min-width: 200px;
    background: var(--bg-3);
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
    font: inherit;
    font-size: 13px;
    padding: 10px 12px;
}
.shards-form-row input:focus {
    outline: none;
    border-color: var(--accent-2);
    box-shadow: 0 0 0 3px rgba(125, 108, 255, 0.2);
}
.btn-shards-apply {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border: none;
    color: #fff;
    font: inherit;
    font-weight: 700;
    font-size: 13px;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.12s ease;
}
.btn-shards-apply:hover { filter: brightness(1.1); }
.btn-shards-apply:active { transform: translateY(1px); }

.shards-delta {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 12px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.shards-delta.is-plus {
    color: #b8ffd0;
    background: rgba(87, 242, 135, 0.12);
    border: 1px solid rgba(87, 242, 135, 0.35);
}
.shards-delta.is-minus {
    color: #ffd1d2;
    background: rgba(237, 66, 69, 0.12);
    border: 1px solid rgba(237, 66, 69, 0.35);
}

.actor-inline {
    display: inline-block;
    margin-left: 8px;
    color: var(--muted, #9aa0b4);
    font-size: 12px;
    line-height: 1.4;
}
.actor-inline strong {
    color: #c7cad8;
    font-weight: 600;
    margin-right: 4px;
}


/* Верхний индикатор загрузки страницы */
.page-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    z-index: 9999;
    background: linear-gradient(90deg, var(--accent), var(--pink));
    box-shadow: 0 0 10px rgba(88, 101, 242, 0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.page-progress.is-active {
    opacity: 1;
    animation: page-progress-anim 2.2s ease-out forwards;
}
@keyframes page-progress-anim {
    0% { width: 0; }
    25% { width: 45%; }
    55% { width: 72%; }
    85% { width: 90%; }
    100% { width: 96%; }
}

/* Спиннер на кнопках */
.btn-warn-issue, .btn-warn-remove {
    position: relative;
}
.btn-spinner {
    display: none;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btn-spin 0.6s linear infinite;
}
.js-submit-btn.is-loading .btn-label { display: none; }
.js-submit-btn.is-loading .btn-spinner { display: inline-block; }
.js-submit-btn.is-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
    cursor: progress;
}
@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

/* Страница выговоров: компактные карточки сотрудников */
.warn-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}
.warn-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    color: inherit;
    overflow: hidden;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.warn-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(88,101,242,0.06), transparent 30%);
    pointer-events: none;
}
.warn-card.has-active::after {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--warning), var(--danger));
    opacity: 0.7;
}
.warn-card:hover {
    transform: translateY(-2px);
    border-color: rgba(125, 108, 255, 0.45);
    box-shadow: var(--shadow-lg);
}
.warn-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    position: relative;
}
.warn-card-head .avatar { width: 48px; height: 48px; border-radius: 12px; }
.warn-card-id { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.warn-card-id .card-name {
    font-size: 15px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.warn-card-counters {
    display: flex;
    gap: 8px;
    position: relative;
}
.warn-pill {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 700;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--bg-3);
    font-variant-numeric: tabular-nums;
}
.warn-pill-limit { color: var(--muted); font-weight: 600; font-size: 12px; }
.warn-pill-verbal {
    border-color: rgba(254, 231, 92, 0.4);
    color: #ffe79a;
    background: rgba(254, 231, 92, 0.08);
}
.warn-pill-red {
    border-color: rgba(237, 66, 69, 0.4);
    color: #ffd1d2;
    background: rgba(237, 66, 69, 0.08);
}
.warn-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    position: relative;
    font-size: 12px;
}
.warn-card-status {
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
}
.warn-card-status.is-active {
    color: #ffd1d2;
    background: rgba(237, 66, 69, 0.10);
    border-color: rgba(237, 66, 69, 0.3);
}
.warn-card-status.is-clean {
    color: #b8ffd0;
    background: rgba(87, 242, 135, 0.08);
    border-color: rgba(87, 242, 135, 0.3);
}
.warn-card-total { color: var(--muted); }

@media (max-width: 540px) {
    .warn-grid { grid-template-columns: 1fr; }
}

/* Страница одного сотрудника: дашборд выговоров */
.warn-detail {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}
@media (max-width: 900px) {
    .warn-detail { grid-template-columns: 1fr; }
}

.warn-detail-side {
    display: grid;
    gap: 16px;
    position: sticky;
    top: 88px;
}
@media (max-width: 900px) {
    .warn-detail-side { position: static; }
}

/* Карточка профиля в сайдбаре */
.warn-profile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 24px 20px 20px;
    background:
        radial-gradient(90% 60% at 50% 0%, rgba(125, 108, 255, 0.12), transparent 65%),
        linear-gradient(180deg, var(--bg-2), var(--bg-1));
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.warn-profile-avatar {
    width: 84px;
    height: 84px;
    border-radius: 22px;
    object-fit: cover;
    background: var(--bg-3);
    border: 1px solid var(--line-strong);
}
.warn-profile-avatar.avatar-fallback { font-size: 28px; }
.warn-profile-name {
    margin: 10px 0 0;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.01em;
}
.warn-profile-position {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}
.warn-profile-link {
    margin-top: 4px;
    color: var(--accent-2);
    font-size: 13px;
    font-weight: 600;
}
.warn-profile-link:hover { text-decoration: underline; }

.warn-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
    margin: 14px 0 4px;
}
.warn-summary-card {
    padding: 14px 12px;
    background: var(--bg-3);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    text-align: center;
}
.warn-summary-verbal { border-color: rgba(254, 231, 92, 0.32); background: rgba(254, 231, 92, 0.06); }
.warn-summary-red { border-color: rgba(237, 66, 69, 0.32); background: rgba(237, 66, 69, 0.06); }
.warn-summary-value {
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.warn-summary-value span {
    font-size: 16px;
    font-weight: 600;
    color: var(--muted);
}
.warn-summary-top {
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
    margin-top: 6px;
}

/* Панель выдачи выговора */
.warn-issue-panel {
    padding: 18px;
    background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.warn-panel-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 14px;
}
.warn-issue-panel .warning-form {
    margin: 0;
    padding: 0;
    background: none;
    border: none;
}
.warn-issue-panel .warning-type-toggle {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 12px;
}
.warn-issue-panel textarea {
    width: 100%;
    background: var(--bg-3);
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
    font: inherit;
    font-size: 13px;
    padding: 11px 12px;
    resize: vertical;
    min-height: 48px;
    margin-bottom: 12px;
}
.warn-issue-panel textarea:focus {
    outline: none;
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(237, 66, 69, 0.18);
}
.warn-issue-panel .btn-warn-issue {
    width: 100%;
    padding: 12px;
    font-size: 14px;
}

/* Правая колонка: блоки истории */
.warn-detail-main {
    display: grid;
    gap: 18px;
}
.warn-block {
    padding: 18px;
    background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.warn-block-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.warn-block-head h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* Флеш-сообщения на странице выговоров */
.warn-flash {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    margin-bottom: 18px;
    border: 1px solid var(--line);
}
.warn-flash.is-ok {
    color: #b8ffd0;
    background: rgba(87, 242, 135, 0.10);
    border-color: rgba(87, 242, 135, 0.35);
}
.warn-flash.is-error {
    color: #ffd1d2;
    background: rgba(237, 66, 69, 0.10);
    border-color: rgba(237, 66, 69, 0.4);
}

.warn-empty {
    text-align: center;
    color: #b8ffd0;
    font-size: 13px;
    padding: 12px;
    background: rgba(87, 242, 135, 0.06);
    border: 1px solid rgba(87, 242, 135, 0.25);
    border-radius: 12px;
}
.warn-empty-muted {
    color: var(--muted);
    font-size: 13px;
    padding: 14px 16px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: 12px;
}
.report-removed { color: var(--muted); font-size: 12px; }

/* Карточки выговоров (новое оформление) */
.warn-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}
.warn-item {
    position: relative;
    display: grid;
    gap: 10px;
    padding: 14px 16px 14px 20px;
    background: var(--bg-3);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.warn-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}
.warn-item.is-verbal::before { background: linear-gradient(180deg, #ffe066, #f5c518); }
.warn-item.is-red::before { background: linear-gradient(180deg, #ff6b6e, var(--danger)); }
.warn-item.is-removed { opacity: 0.7; }
.warn-item.is-removed::before { background: var(--line-strong); }
.warn-item.is-verbal:not(.is-removed) { border-color: rgba(254, 231, 92, 0.22); }
.warn-item.is-red:not(.is-removed) { border-color: rgba(237, 66, 69, 0.28); }

.warn-item-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.warn-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
}
.warn-tag-verbal {
    color: #ffe79a;
    background: rgba(254, 231, 92, 0.12);
    border-color: rgba(254, 231, 92, 0.4);
}
.warn-tag-red {
    color: #ffd1d2;
    background: rgba(237, 66, 69, 0.12);
    border-color: rgba(237, 66, 69, 0.4);
}
.warn-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.warn-status.is-active {
    color: #b8ffd0;
    background: rgba(87, 242, 135, 0.10);
    border: 1px solid rgba(87, 242, 135, 0.3);
}
.warn-status.is-off {
    color: var(--muted);
    background: var(--bg-3);
    border: 1px solid var(--line);
}
.warn-item-date {
    margin-left: auto;
    color: var(--muted);
    font-size: 11px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.warn-item-reason {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    white-space: pre-wrap;
    word-break: break-word;
}
.warn-item-removed {
    font-size: 12px;
    line-height: 1.5;
    color: var(--muted);
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px 12px;
}
.warn-item-removed strong { color: var(--text); }
.warn-item-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 4px;
    border-top: 1px solid var(--line);
    margin-top: 2px;
}
.warn-item-id {
    margin-left: auto;
    color: var(--muted);
    font-size: 12px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
}

/* Снятие выговора — компактная раскрывашка */
.warn-remove {
    margin: 0;
    flex: 1;
    min-width: 0;
}
.warn-remove-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    cursor: pointer;
    padding: 6px 12px;
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    user-select: none;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.warn-remove-toggle::-webkit-details-marker { display: none; }
.warn-remove-toggle::before { content: "✕"; font-size: 11px; }
.warn-remove-toggle:hover {
    color: #b8ffd0;
    border-color: rgba(87, 242, 135, 0.4);
    background: rgba(87, 242, 135, 0.06);
}
.warn-remove[open] .warn-remove-toggle {
    color: #b8ffd0;
    border-color: rgba(87, 242, 135, 0.45);
}
.warn-remove-form {
    display: flex;
    gap: 6px;
    align-items: center;
    margin: 10px 0 0;
}
.warn-remove-form input[type="text"] {
    flex: 1;
    min-width: 0;
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    font: inherit;
    font-size: 12px;
    padding: 8px 10px;
}
.warn-remove-form input:focus {
    outline: none;
    border-color: rgba(87, 242, 135, 0.5);
    box-shadow: 0 0 0 3px rgba(87, 242, 135, 0.15);
}
.btn-warn-remove {
    background: linear-gradient(135deg, #2eb872, #57F287);
    border: none;
    color: #06231a;
    font: inherit;
    font-weight: 700;
    font-size: 12px;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
    transition: filter 0.15s ease;
}
.btn-warn-remove:hover { filter: brightness(1.08); }

/* Кнопка "Управление выговорами" в профиле */
.btn-manage-warnings {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.16), rgba(125, 108, 255, 0.16));
    border: 1px solid rgba(125, 108, 255, 0.45);
    border-radius: 10px;
    color: #d7d2ff;
    font-size: 13px;
    font-weight: 600;
    transition: filter 0.15s ease, transform 0.12s ease, border-color 0.15s ease;
}
.btn-manage-warnings:hover {
    filter: brightness(1.12);
    border-color: rgba(125, 108, 255, 0.7);
    color: #fff;
}
.btn-manage-warnings:active { transform: translateY(1px); }
