/**
 * Стили системы учёта выручки
 * Цветовая схема: красный, белый, зелёный
 * Автор: MiniMax Agent
 */

:root {
    --primary-red: #dc2626;
    --primary-red-dark: #b91c1c;
    --primary-red-light: #fecaca;
    --primary-green: #16a34a;
    --primary-green-dark: #15803d;
    --primary-green-light: #bbf7d0;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
}

/* Контейнер */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Навигация */
.navbar {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
    color: var(--white);
    padding: 0.75rem 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
}

.navbar-brand svg {
    width: 32px;
    height: 32px;
}

.navbar-menu {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    flex-wrap: wrap;
}

.navbar-menu a {
    color: var(--white);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    transition: background-color 0.2s;
    font-size: 0.95rem;
}

.navbar-menu a:hover,
.navbar-menu a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    text-align: right;
    font-size: 0.875rem;
}

.user-info .name {
    font-weight: 600;
}

.user-info .role {
    opacity: 0.9;
    font-size: 0.8rem;
}

/* Кнопки */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--primary-red);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-red-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-success {
    background-color: var(--primary-green);
    color: var(--white);
}

.btn-success:hover {
    background-color: var(--primary-green-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--gray-200);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background-color: var(--gray-300);
}

.btn-danger {
    background-color: #ef4444;
    color: var(--white);
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-red);
    color: var(--primary-red);
}

.btn-outline:hover {
    background-color: var(--primary-red);
    color: var(--white);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1.1rem;
}

.btn-icon {
    padding: 0.5rem;
    min-width: 2.5rem;
    height: 2.5rem;
}

/* Карточки */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2, .card-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-800);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    background-color: var(--gray-50);
    border-top: 1px solid var(--gray-200);
}

/* Формы */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
}

.form-label.required::after {
    content: ' *';
    color: var(--primary-red);
}

.form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: var(--white);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px var(--primary-red-light);
}

.form-control.is-invalid {
    border-color: #ef4444;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.form-text {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

.invalid-feedback {
    font-size: 0.875rem;
    color: #ef4444;
    margin-top: 0.25rem;
}

/* Таблицы */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.table th,
.table td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.table th {
    background-color: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
    white-space: nowrap;
}

.table tbody tr:hover {
    background-color: var(--gray-50);
}

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

.table .text-right {
    text-align: right;
}

.table .text-center {
    text-align: center;
}

.table .amount {
    font-weight: 600;
    font-family: 'Consolas', monospace;
    white-space: nowrap;
}

.table .amount.positive {
    color: var(--primary-green);
}

.table .amount.negative {
    color: var(--primary-red);
}

/* Бейджи */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-success {
    background-color: var(--primary-green-light);
    color: var(--primary-green-dark);
}

.badge-danger {
    background-color: var(--primary-red-light);
    color: var(--primary-red-dark);
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-info {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-secondary {
    background-color: var(--gray-200);
    color: var(--gray-700);
}

/* Алерты */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.alert-success {
    background-color: var(--primary-green-light);
    color: var(--primary-green-dark);
    border-left: 4px solid var(--primary-green);
}

.alert-danger {
    background-color: var(--primary-red-light);
    color: var(--primary-red-dark);
    border-left: 4px solid var(--primary-red);
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

/* Сетка */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: -0.75rem;
}

.col {
    flex: 1;
    padding: 0.75rem;
}

.col-auto {
    flex: 0 0 auto;
    width: auto;
    padding: 0.75rem;
}

.col-6 { flex: 0 0 50%; max-width: 50%; padding: 0.75rem; }
.col-4 { flex: 0 0 33.333%; max-width: 33.333%; padding: 0.75rem; }
.col-3 { flex: 0 0 25%; max-width: 25%; padding: 0.75rem; }
.col-12 { flex: 0 0 100%; max-width: 100%; padding: 0.75rem; }

/* Страница входа */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 50%, var(--primary-green-dark) 100%);
    padding: 1rem;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
    color: var(--white);
    padding: 2rem;
    text-align: center;
}

.login-header h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.login-header p {
    opacity: 0.9;
    font-size: 0.95rem;
}

.login-body {
    padding: 2rem;
}

/* Главная страница */
.main-content {
    padding: 1.5rem 0;
}

.page-header {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
}

/* Статистика */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 1.75rem;
    height: 1.75rem;
}

.stat-icon.red {
    background-color: var(--primary-red-light);
    color: var(--primary-red);
}

.stat-icon.green {
    background-color: var(--primary-green-light);
    color: var(--primary-green);
}

.stat-icon.blue {
    background-color: #dbeafe;
    color: #2563eb;
}

.stat-icon.yellow {
    background-color: #fef3c7;
    color: #d97706;
}

/* Карточки статистики для структуры */
.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    transition: box-shadow 0.2s, transform 0.2s;
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-red);
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.stat-content h3 {
    font-size: 0.875rem;
    color: var(--gray-500);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.stat-content .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
}

/* Новости и акции */
.news-card,
.promo-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 1.5rem;
    transition: box-shadow 0.2s;
}

.news-card:hover,
.promo-card:hover {
    box-shadow: var(--shadow-lg);
}

.news-image,
.promo-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border-radius: var(--radius);
}

.news-content,
.promo-content {
    padding: 1.25rem;
}

.news-title,
.promo-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.news-meta,
.promo-meta {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 0.75rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.news-text,
.promo-text {
    color: var(--gray-600);
    line-height: 1.7;
}

.promo-dates {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background-color: var(--primary-green-light);
    border-top: 1px solid var(--gray-200);
    font-size: 0.875rem;
    color: var(--primary-green-dark);
    font-weight: 500;
}

/* Боковая панель (админка) */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: linear-gradient(180deg, var(--gray-800) 0%, var(--gray-900) 100%);
    color: var(--white);
    flex-shrink: 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--gray-700);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--white);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
}

.sidebar-menu {
    padding: 1rem 0;
}

.sidebar-menu-title {
    padding: 0.75rem 1.25rem 0.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-400);
    font-weight: 600;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: var(--gray-300);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.sidebar-menu a:hover {
    background-color: var(--gray-700);
    color: var(--white);
}

.sidebar-menu a.active {
    background-color: var(--primary-red);
    color: var(--white);
}

.sidebar-menu a svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.admin-content {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
}

/* Модальное окно */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: auto;
    transform: scale(0.95);
    transition: transform 0.2s;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-500);
    padding: 0.25rem;
}

.modal-close:hover {
    color: var(--gray-700);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Пагинация */
.pagination {
    display: flex;
    gap: 0.25rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.pagination a,
.pagination span {
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-size: 0.95rem;
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
    transition: all 0.2s;
}

.pagination a:hover {
    background-color: var(--gray-100);
    border-color: var(--gray-400);
}

.pagination .active {
    background-color: var(--primary-red);
    border-color: var(--primary-red);
    color: var(--white);
}

.pagination .disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Утилиты */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-success { color: var(--primary-green); }
.text-danger { color: var(--primary-red); }
.text-muted { color: var(--gray-500); }
.font-bold { font-weight: 700; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.hidden { display: none !important; }

/* Сетка */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.5rem;
}
.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 0.5rem;
}
.col-md-4 {
    flex: 0 0 33.333%;
    max-width: 33.333%;
    padding: 0 0.5rem;
}
.col-md-3 {
    flex: 0 0 25%;
    max-width: 25%;
    padding: 0 0.5rem;
}

/* Кнопки */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
    color: white;
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
    color: white;
}
.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}
.btn-warning:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}
.btn-info:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background: var(--gray-500);
    color: white;
}
.btn-secondary:hover {
    background: var(--gray-600);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--gray-300);
    color: var(--gray-700);
}
.btn-outline:hover {
    border-color: var(--primary-red);
    color: var(--primary-red);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 0.875rem 1.5rem;
    font-size: 1.1rem;
}

.btn-block {
    display: flex;
    width: 100%;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .admin-content {
        margin-left: 0;
    }

    .col-4, .col-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 768px) {
    .navbar-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .navbar-menu {
        width: 100%;
        justify-content: flex-start;
    }

    .col-6, .col-4, .col-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .table th,
    .table td {
        padding: 0.625rem 0.5rem;
        font-size: 0.875rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }

    .card-body {
        padding: 1rem;
    }

    .btn {
        width: 100%;
    }

    .login-card {
        margin: 0 0.5rem;
    }
}

/* Загрузка файлов */
.file-upload {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.file-upload:hover {
    border-color: var(--primary-red);
    background-color: var(--primary-red-light);
}

.file-upload input {
    display: none;
}

.file-upload svg {
    width: 3rem;
    height: 3rem;
    color: var(--gray-400);
    margin-bottom: 0.75rem;
}

.file-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.file-preview-item {
    position: relative;
    width: 100px;
    height: 100px;
}

.file-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius);
}

.file-preview-item .remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: var(--primary-red);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

/* Табы */
.tabs {
    display: flex;
    gap: 0.25rem;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 1.5rem;
}

.tab {
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    border: none;
    background: none;
    font-size: 0.95rem;
    color: var(--gray-600);
    position: relative;
    transition: color 0.2s;
}

.tab:hover {
    color: var(--gray-800);
}

.tab.active {
    color: var(--primary-red);
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary-red);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Фильтры */
.filters {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.filters-row .form-group {
    margin-bottom: 0;
    min-width: 150px;
}

/* Прогресс бар */
.progress {
    height: 8px;
    background-color: var(--gray-200);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
    border-radius: 9999px;
    transition: width 0.3s ease;
}

/* Переключатель мобильного меню */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
    padding: 0.5rem;
}

@media (max-width: 1024px) {
    .menu-toggle {
        display: block;
    }
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* Печать */
@media print {
    .navbar,
    .sidebar,
    .btn,
    .filters,
    .pagination {
        display: none !important;
    }

    .admin-content {
        margin-left: 0 !important;
    }

    .card {
        box-shadow: none;
        break-inside: avoid;
    }
}

/* Bootstrap-подобные утилиты для цветовой индикации */
.bg-danger {
    background-color: #dc2626 !important;
}

.bg-success {
    background-color: #16a34a !important;
}

.bg-warning {
    background-color: #f59e0b !important;
}

.bg-info {
    background-color: #3b82f6 !important;
}

.bg-primary {
    background-color: var(--primary-red) !important;
}

.bg-secondary {
    background-color: var(--gray-500) !important;
}

.bg-white {
    background-color: white !important;
}

.bg-danger-light {
    background-color: var(--primary-red-light) !important;
}

.bg-success-light {
    background-color: var(--primary-green-light) !important;
}

.bg-warning-light {
    background-color: #fef3c7 !important;
}

.bg-info-light {
    background-color: #dbeafe !important;
}

.text-white {
    color: white !important;
}

.text-warning {
    color: #f59e0b !important;
}

.text-info {
    color: #3b82f6 !important;
}

.text-primary {
    color: var(--primary-red) !important;
}

.text-success {
    color: #16a34a !important;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.25rem;
}

.badge-primary {
    background-color: var(--primary-red);
    color: white;
}

.badge-success {
    background-color: #16a34a;
    color: white;
}

.badge-warning {
    background-color: #f59e0b;
    color: white;
}

.badge-info {
    background-color: #3b82f6;
    color: white;
}

.badge-danger {
    background-color: #dc2626;
    color: white;
}

.badge-secondary {
    background-color: var(--gray-500);
    color: white;
}

.badge-outline {
    background-color: transparent;
    border: 1px solid currentColor;
}

.table-primary {
    background-color: rgba(220, 38, 38, 0.1);
}

.table-info {
    background-color: rgba(59, 130, 246, 0.1);
}

.table-warning {
    background-color: rgba(245, 158, 11, 0.1);
}

.table-success {
    background-color: rgba(22, 163, 74, 0.1);
}

.table-danger {
    background-color: rgba(220, 38, 38, 0.1);
}

/* Модальное окно детализации отчёта */
.detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem;
    overflow-y: auto;
}

.detail-modal.active {
    display: flex;
}

.detail-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 900px;
    margin: 2rem auto;
    box-shadow: var(--shadow-lg);
}

.detail-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.detail-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-500);
    padding: 0.25rem 0.5rem;
    line-height: 1;
}

.detail-close:hover {
    color: var(--gray-700);
}

.detail-body {
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
}

/* ===== Revenue2 unified interface polish ===== */
:root {
    --r2-red: #e1262f;
    --r2-red-dark: #b81723;
    --r2-navy: #1b2a41;
    --r2-navy-soft: #26364d;
    --r2-blue: #2878e8;
    --r2-green: #16a56b;
    --r2-amber: #e99716;
    --r2-bg: #f4f7fb;
    --r2-surface: #ffffff;
    --r2-border: #e2e8f0;
    --r2-muted: #718096;
}

.main-content {
    background:
        radial-gradient(circle at 100% 0%, rgba(40,120,232,.045), transparent 26%),
        var(--r2-bg);
}

.page-header,
.page-header-flex {
    margin-bottom: 1.15rem;
}

.page-title,
.page-header h1,
.page-header-flex h1 {
    color: #172033;
    font-weight: 800;
    letter-spacing: -.02em;
}

.card {
    border: 1px solid var(--r2-border);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(23,32,51,.055);
    background: rgba(255,255,255,.98);
    transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.card:hover {
    box-shadow: 0 12px 30px rgba(23,32,51,.08);
    border-color: #d6deea;
}
.card-header {
    background: linear-gradient(180deg, #fff 0%, #fbfcfe 100%);
    border-bottom: 1px solid var(--r2-border);
    padding: 1rem 1.2rem;
}
.card-header h2,
.card-header h3,
.card-header h4 { color: #172033; font-weight: 750; }
.card-body { padding: 1.2rem; }

.filters,
.report-filters {
    background: rgba(255,255,255,.98);
    border: 1px solid var(--r2-border);
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(23,32,51,.045);
}

.form-label,
.form-group label {
    color: #526174;
    font-weight: 650;
    font-size: .84rem;
}
.form-control,
.form-select {
    border: 1px solid #d6deea;
    border-radius: 10px;
    background-color: #fff;
    min-height: 40px;
    box-shadow: inset 0 1px 2px rgba(23,32,51,.02);
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.form-control:hover,
.form-select:hover { border-color: #bcc8d8; }
.form-control:focus,
.form-select:focus {
    border-color: rgba(40,120,232,.7);
    box-shadow: 0 0 0 3px rgba(40,120,232,.12);
    background:#fff;
}

.btn {
    border-radius: 10px;
    font-weight: 650;
    box-shadow: 0 3px 9px rgba(23,32,51,.07);
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(23,32,51,.10); }
.btn-primary { background: linear-gradient(135deg, var(--r2-red), var(--r2-red-dark)); border-color: var(--r2-red-dark); }
.btn-success { background: linear-gradient(135deg, #1caf70, #138657); border-color: #138657; }
.btn-warning { background: linear-gradient(135deg, #f3ad2f, #df8b0a); border-color: #d98100; color:#fff; }
.btn-info { background: linear-gradient(135deg, #3389ed, #1e66bd); border-color:#1e66bd; }
.btn-secondary { background: linear-gradient(135deg, #607086, #46566c); border-color:#46566c; }

.alert {
    border: 0;
    border-left: 4px solid currentColor;
    border-radius: 12px;
    box-shadow: 0 5px 18px rgba(23,32,51,.045);
}

.table-responsive {
    border-radius: 14px;
    border: 1px solid var(--r2-border);
    background: #fff;
    box-shadow: 0 6px 20px rgba(23,32,51,.04);
}
.table {
    margin-bottom: 0;
    background: #fff;
}
.table th,
.table td {
    border-color: #e7ecf3;
    vertical-align: middle;
}
.table thead th,
.table th {
    background: linear-gradient(180deg, #f3f6fa 0%, #eaf0f6 100%);
    color: #33445a;
    font-weight: 750;
    border-bottom: 1px solid #d9e1eb;
    white-space: nowrap;
}
.table tbody tr:nth-child(even) td { background: #fbfcfe; }
.table tbody tr:hover td { background: #f1f6fc; }
.table tfoot td,
.table .total-row td {
    background: #e9eef5 !important;
    color: #26364d;
    font-weight: 750;
    border-top: 2px solid #c2ccd9;
}
.table .amount { font-variant-numeric: tabular-nums; }

.badge {
    border-radius: 999px;
    padding: .34rem .62rem;
    font-weight: 700;
    letter-spacing: .01em;
}

.modal-content,
.detail-content {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(23,32,51,.22);
}

@media (max-width: 768px) {
    .card { border-radius: 13px; }
    .table-responsive { border-radius: 11px; }
    .btn { min-height: 38px; }
}

/* ========================================================================== */
/* Revenue2 Public UI Refresh — 2026-09-22                                      */
/* ========================================================================== */

body.public-shell {
    --public-bg: #f4f6fa;
    --public-surface: rgba(255,255,255,.96);
    --public-navy: #101827;
    --public-navy-soft: #182235;
    --public-red: #e1262f;
    --public-red-dark: #bd1821;
    --public-blue: #2f6fed;
    --public-cyan: #00a7c7;
    --public-green: #22a06b;
    --public-amber: #e89a20;
    background:
        radial-gradient(circle at 12% 4%, rgba(225,38,47,.075), transparent 28rem),
        radial-gradient(circle at 88% 10%, rgba(47,111,237,.075), transparent 30rem),
        var(--public-bg);
    color: #263244;
}

body.public-shell::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(15,23,42,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(15,23,42,.018) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(to bottom, black, transparent 75%);
    z-index: -1;
}

.public-topbar {
    position: sticky;
    top: 0;
    z-index: 1100;
    background: linear-gradient(118deg, #0f1725 0%, #152238 65%, #1a2740 100%);
    color: #fff;
    box-shadow: 0 12px 30px rgba(15,23,42,.20);
    border-bottom: 3px solid var(--public-red);
}

.public-topbar-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.public-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: #fff;
    text-decoration: none;
    flex: 0 0 auto;
}

.public-brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #f4434c, #c71721);
    box-shadow: 0 9px 20px rgba(225,38,47,.30), inset 0 1px rgba(255,255,255,.24);
}

.public-brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.public-brand-copy strong { font-size: 1.05rem; letter-spacing: .01em; }
.public-brand-copy small { color: #8fa0b9; margin-top: 5px; font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; }

.public-nav {
    display: flex;
    align-items: center;
    gap: 5px;
    flex: 1 1 auto;
    justify-content: center;
    margin: 0;
}
.public-nav li { list-style: none; }
.public-nav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #cbd5e1 !important;
    text-decoration: none;
    padding: 10px 13px !important;
    border-radius: 10px;
    font-weight: 650;
    font-size: .88rem !important;
    transition: .18s ease;
    border: 1px solid transparent;
}
.public-nav a .nav-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #53627a;
    transition: .18s ease;
}
.public-nav a:hover {
    color: #fff !important;
    background: rgba(255,255,255,.07) !important;
    border-color: rgba(255,255,255,.07);
    transform: translateY(-1px);
}
.public-nav a.active {
    color: #fff !important;
    background: linear-gradient(135deg, rgba(225,38,47,.97), rgba(190,24,33,.97)) !important;
    box-shadow: 0 8px 20px rgba(225,38,47,.25);
}
.public-nav a.active .nav-dot { background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.16); }

.public-user-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    flex: 0 0 auto;
}
.public-user-chip {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #fff;
    text-decoration: none;
    padding: 6px 9px 6px 6px;
    border-radius: 13px;
    border: 1px solid rgba(255,255,255,.09);
    background: rgba(255,255,255,.045);
    transition: .18s ease;
}
.public-user-chip:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.16); }
.public-avatar { width: 35px; height: 35px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: #24334b; }
.public-avatar img { width: 100%; height: 100%; object-fit: cover; }
.public-avatar-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-weight: 800; background: linear-gradient(145deg, #2f6fed, #00a7c7); color: #fff; }
.public-user-copy { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.public-user-copy strong { max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .82rem; }
.public-user-copy small { color: #91a1ba; font-size: .69rem; margin-top: 3px; }
.public-icon-btn {
    width: 41px;
    height: 41px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #d8e1ed;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.09);
    transition: .18s ease;
}
.public-icon-btn:hover { color: #fff; transform: translateY(-1px); background: rgba(255,255,255,.10); }
.public-icon-btn.danger:hover { background: rgba(225,38,47,.22); border-color: rgba(225,38,47,.35); }
.public-menu-toggle { display: none; color: #fff; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.10); border-radius: 10px; }

.public-attention-wrap { padding: 18px 0 0; }
.public-attention-card {
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(225,38,47,.13);
    border-left: 5px solid var(--public-red);
    border-radius: 16px;
    padding: 15px 18px;
    box-shadow: 0 10px 26px rgba(31,41,55,.07);
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 18px;
}
.public-attention-heading { display: flex; align-items: center; gap: 10px; }
.public-attention-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #f0444d, #c41720); box-shadow: 0 7px 18px rgba(225,38,47,.22); }
.public-attention-heading div { display: flex; flex-direction: column; }
.public-attention-heading strong { font-size: .92rem; color: #9d1720; }
.public-attention-heading small { color: #8b98aa; font-size: .72rem; margin-top: 2px; }
.public-attention-items { display: grid; gap: 7px; }
.public-attention-item { display: flex; gap: 10px; justify-content: space-between; align-items: center; padding: 9px 12px; border-radius: 10px; background: #f7f9fc; border: 1px solid #edf0f5; }
.public-attention-item strong { font-size: .82rem; color: #334155; }
.public-attention-item span { font-size: .78rem; color: #68758a; text-align: right; }
.public-attention-item.is-warning { border-left: 3px solid #e89a20; }
.public-attention-item.is-critical { border-left: 3px solid #e1262f; background: #fff7f7; }

body.public-shell .main-content { padding: 30px 0 48px; }
body.public-shell .container { max-width: 1500px; padding-left: 22px; padding-right: 22px; }
body.public-shell .page-header,
body.public-shell .page-header-flex {
    background: linear-gradient(125deg, rgba(255,255,255,.97), rgba(250,251,254,.94));
    border: 1px solid rgba(148,163,184,.19);
    border-radius: 18px;
    padding: 20px 22px;
    margin-bottom: 22px;
    box-shadow: 0 12px 32px rgba(15,23,42,.065);
    position: relative;
    overflow: hidden;
}
body.public-shell .page-header::before,
body.public-shell .page-header-flex::before {
    content: '';
    position: absolute;
    width: 145px;
    height: 145px;
    right: -45px;
    top: -70px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(225,38,47,.12), transparent 68%);
}
body.public-shell .page-title {
    color: #172033;
    font-size: clamp(1.35rem, 2vw, 1.78rem);
    letter-spacing: -.025em;
    display: flex;
    align-items: center;
    gap: 10px;
}
body.public-shell .page-title svg { color: var(--public-red); }

body.public-shell .card,
body.public-shell .report-filters,
body.public-shell .filters {
    background: var(--public-surface);
    border: 1px solid rgba(148,163,184,.18);
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(15,23,42,.065);
}
body.public-shell .card { overflow: hidden; }
body.public-shell .card:hover { box-shadow: 0 16px 34px rgba(15,23,42,.09); }
body.public-shell .card-header {
    background: linear-gradient(120deg, #fafbfe, #f4f7fb);
    border-bottom: 1px solid #e8edf3;
    padding: 15px 18px;
}
body.public-shell .card-body { padding: 20px; }
body.public-shell .filters,
body.public-shell .report-filters { padding: 15px 17px !important; margin-bottom: 20px; }

body.public-shell .btn {
    border-radius: 10px;
    font-weight: 700;
    letter-spacing: .005em;
    box-shadow: none;
}
body.public-shell .btn-primary { background: linear-gradient(135deg, #e83a43, #c91c26); color: #fff; }
body.public-shell .btn-primary:hover { background: linear-gradient(135deg, #d92832, #ae121b); box-shadow: 0 8px 18px rgba(225,38,47,.20); }
body.public-shell .btn-success { background: linear-gradient(135deg, #27ae76, #178e5a); }
body.public-shell .btn-success:hover { background: linear-gradient(135deg, #209d69, #137c4e); }
body.public-shell .btn-secondary { background: #e9edf3; color: #354258; }
body.public-shell .btn-secondary:hover { background: #dde3eb; }
body.public-shell .btn-warning { background: linear-gradient(135deg, #f3ad35, #d88a16); color: #fff; }
body.public-shell .btn-info { background: linear-gradient(135deg, #259bd7, #1479b8); color: #fff; }
body.public-shell .btn-outline-secondary { border: 1px solid #cfd7e3; color: #475569; background: #fff; }
body.public-shell .btn-outline-danger { border: 1px solid #efb4b8; color: #c81d27; background: #fff; }
body.public-shell .btn-block { width: 100%; }

body.public-shell .form-control {
    min-height: 42px;
    border-radius: 10px;
    border: 1px solid #d9e0e9;
    background: #fff;
    box-shadow: inset 0 1px 2px rgba(15,23,42,.025);
}
body.public-shell .form-control:focus {
    border-color: rgba(225,38,47,.55);
    box-shadow: 0 0 0 4px rgba(225,38,47,.10);
}
body.public-shell .form-label { color: #445066; font-weight: 700; font-size: .86rem; }

body.public-shell .stats-grid { gap: 16px; }
body.public-shell .stat-card {
    position: relative;
    border: 1px solid rgba(148,163,184,.15);
    border-radius: 16px;
    background: rgba(255,255,255,.97);
    box-shadow: 0 12px 28px rgba(15,23,42,.065);
    padding: 17px 18px;
    text-align: left;
    overflow: hidden;
}
body.public-shell .stat-card::after {
    content: '';
    position: absolute;
    width: 88px;
    height: 88px;
    right: -35px;
    bottom: -42px;
    border-radius: 50%;
    background: rgba(47,111,237,.055);
}
body.public-shell .stat-card:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(15,23,42,.095); }
body.public-shell .stat-icon {
    width: 48px !important;
    height: 48px !important;
    border-radius: 13px !important;
    color: #fff !important;
    box-shadow: 0 8px 20px rgba(15,23,42,.13);
}
body.public-shell .stat-icon svg { width: 23px; height: 23px; }
body.public-shell .stat-content h3 { color: #718096; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .055em; }
body.public-shell .stat-content .value { color: #172033; font-size: 1.42rem; letter-spacing: -.02em; }

body.public-shell .table-responsive {
    border-radius: 13px;
    border: 1px solid #e8edf3;
    background: #fff;
    box-shadow: 0 6px 18px rgba(15,23,42,.035);
}
body.public-shell .table {
    font-size: .91rem;
    background: #fff;
}
body.public-shell .table th {
    background: linear-gradient(180deg, #f4f7fb, #eef2f7) !important;
    color: #3c485b;
    font-size: .76rem;
    letter-spacing: .035em;
    text-transform: uppercase;
    font-weight: 800;
    border-bottom: 1px solid #dfe6ef;
    padding: 12px 13px;
}
body.public-shell .table td { padding: 12px 13px; border-bottom-color: #eef1f5; }
body.public-shell .table tbody tr:nth-child(even) { background: #fbfcfe; }
body.public-shell .table tbody tr:hover { background: #f6f9fd; }
body.public-shell .table tfoot td { background: #f1f5f9; font-weight: 800; }

/* Специализированные отчётные таблицы — сохраняем смысл цветов, улучшаем геометрию */
body.public-shell .weekly-report-table,
body.public-shell .yearly-report-table,
body.public-shell .cash-sheet-table {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(15,23,42,.055);
}
body.public-shell .weekly-report-table th,
body.public-shell .weekly-report-table td,
body.public-shell .yearly-report-table th,
body.public-shell .yearly-report-table td { padding-top: 11px !important; padding-bottom: 11px !important; }

body.public-shell .report-section { margin-bottom: 26px; }
body.public-shell .section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 13px;
    color: #1d2939;
}
body.public-shell .report-cards { gap: 14px !important; }
body.public-shell .report-card {
    border: 1px solid rgba(148,163,184,.18) !important;
    border-radius: 16px !important;
    background: linear-gradient(135deg, #fff, #fbfcff) !important;
    box-shadow: 0 10px 26px rgba(15,23,42,.055) !important;
    transition: .2s ease !important;
}
body.public-shell .report-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 17px 36px rgba(15,23,42,.10) !important;
    border-color: rgba(225,38,47,.20) !important;
}
body.public-shell .report-card .card-icon {
    border-radius: 13px !important;
    background: linear-gradient(145deg, rgba(225,38,47,.11), rgba(47,111,237,.10)) !important;
    color: var(--public-red) !important;
}
body.public-shell .report-card .card-content h3 { color: #1f2a3c !important; }
body.public-shell .report-card .card-content p { color: #718096 !important; }
body.public-shell .report-card .card-arrow { color: var(--public-red) !important; }

body.public-shell .document-card {
    border: 1px solid rgba(148,163,184,.18) !important;
    border-radius: 15px !important;
    background: #fff !important;
    box-shadow: 0 10px 25px rgba(15,23,42,.055) !important;
    overflow: hidden;
    margin-bottom: 14px !important;
}
body.public-shell .document-card-header {
    background: linear-gradient(135deg, #ffffff, #f5f7fb) !important;
    color: #172033 !important;
    padding: 16px 18px !important;
    border-left: 4px solid var(--public-red);
    transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}
body.public-shell .document-card-header:hover {
    background: linear-gradient(135deg, #fff7f7, #f7f9fc) !important;
}
body.public-shell .document-card-header h4 {
    color: #172033 !important;
    font-weight: 750;
    letter-spacing: .01em;
}
body.public-shell .document-card-header .file-info {
    color: #718096 !important;
    opacity: 1 !important;
    margin-top: 4px;
}
body.public-shell .document-card-header svg {
    color: var(--public-red) !important;
    flex: 0 0 auto;
}
body.public-shell .document-card-body { padding: 18px !important; }
body.public-shell .document-card .btn-download { border-radius: 9px !important; background: linear-gradient(135deg, #27ae76, #168d58) !important; }

body.public-shell .notification-item {
    border-radius: 13px;
    border: 1px solid #e7ecf2;
    background: #fff;
    box-shadow: 0 7px 18px rgba(15,23,42,.04);
}
body.public-shell .notification-item.unread { border-left: 4px solid var(--public-red); background: #fffafa; }

body.public-shell .badge { border-radius: 999px; padding: 5px 9px; font-size: .69rem; letter-spacing: .035em; }
body.public-shell .alert { border-radius: 12px; box-shadow: 0 7px 18px rgba(15,23,42,.04); }

/* Полезные Bootstrap-подобные классы, которые используются в старой разметке */
body.public-shell .mb-3 { margin-bottom: 1rem !important; }
body.public-shell .mb-4 { margin-bottom: 1.5rem !important; }
body.public-shell .mt-3 { margin-top: 1rem !important; }
body.public-shell .mr-2 { margin-right: .5rem !important; }
body.public-shell .mr-3 { margin-right: 1rem !important; }
body.public-shell .d-flex { display: flex !important; }
body.public-shell .justify-content-between { justify-content: space-between !important; }
body.public-shell .align-items-start { align-items: flex-start !important; }
body.public-shell .text-muted { color: #7b8798 !important; }
body.public-shell .text-center { text-align: center !important; }
body.public-shell .text-right { text-align: right !important; }
body.public-shell .py-5 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
body.public-shell .row { margin-left: -8px; margin-right: -8px; }
body.public-shell [class*="col-md-"] { padding-left: 8px; padding-right: 8px; }
@media (min-width: 769px) {
    body.public-shell .col-md-3 { flex: 0 0 25%; max-width: 25%; }
    body.public-shell .col-md-4 { flex: 0 0 33.333%; max-width: 33.333%; }
    body.public-shell .col-md-6 { flex: 0 0 50%; max-width: 50%; }
}

/* Главная — чуть больше характера */
body.public-shell .dashboard-welcome {
    background: linear-gradient(120deg, #fff 0%, #f9fbff 65%, #fff6f6 100%);
}
body.public-shell .dashboard-welcome .page-title { margin-bottom: 4px; }
body.public-shell .page-kicker { color: var(--public-red); text-transform: uppercase; letter-spacing: .11em; font-weight: 800; font-size: .68rem; margin-bottom: 6px; }
body.public-shell .page-subtitle { color: #7b8798; font-size: .88rem; }

@media (max-width: 1120px) {
    .public-topbar-inner { gap: 12px; }
    .public-user-copy { display: none; }
    .public-nav a { padding-left: 9px !important; padding-right: 9px !important; }
}

@media (max-width: 900px) {
    .public-topbar-inner { flex-wrap: wrap; min-height: 68px; padding-top: 10px; padding-bottom: 10px; }
    .public-menu-toggle { display: grid; place-items: center; margin-left: auto; width: 42px; height: 42px; }
    .public-user-actions { order: 3; margin-left: 0; }
    .public-nav {
        display: none;
        order: 4;
        flex: 0 0 100%;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        padding: 8px 0 4px;
    }
    .public-nav.active { display: flex; }
    .public-nav a { width: 100%; justify-content: flex-start; }
    .public-attention-card { grid-template-columns: 1fr; }
    .public-attention-item { align-items: flex-start; flex-direction: column; gap: 3px; }
    .public-attention-item span { text-align: left; }
}

@media (max-width: 640px) {
    body.public-shell .container { padding-left: 12px; padding-right: 12px; }
    .public-brand-copy small { display: none; }
    .public-brand-mark { width: 39px; height: 39px; }
    .public-user-chip { padding-right: 6px; }
    body.public-shell .main-content { padding-top: 18px; }
    body.public-shell .page-header,
    body.public-shell .page-header-flex { padding: 16px; border-radius: 14px; }
    body.public-shell .stats-grid { grid-template-columns: 1fr; gap: 11px; }
    body.public-shell .card-body { padding: 15px; }
    body.public-shell .filters,
    body.public-shell .report-filters { padding: 13px !important; }
}
