/* ===== OZON MANAGER — ОСНОВНЫЕ СТИЛИ ===== */

:root {
    --ozon-blue: #005bff;
    --ozon-dark: #0d2b80;
    --status-new: #9e9e9e;
    --status-waiting: #0dcaf0;
    --status-reserved: #FFC107;
    --status-delivered: #f44336;
    --status-realized: #4caf50;
    --status-return: #FF9800;
    --status-return-processed: #9c27b0;
    --status-international: #2196f3;
    --status-cancelled: #424242;
}

/* === ШРИФТ === */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.875rem;
    background-color: #f5f6fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* === NAVBAR === */
.bg-ozon {
    background: linear-gradient(135deg, var(--ozon-blue) 0%, var(--ozon-dark) 100%) !important;
}

/* === СТАТУСНЫЕ БЕЙДЖИ === */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.status-new { background: #e0e0e0; color: #424242; }
.status-reserved { background: #fff3cd; color: #856404; border: 1px solid #ffc107; }
.status-delivered { background: #f8d7da; color: #842029; border: 1px solid #f44336; }
.status-realized { background: #d1f2d1; color: #1b5e20; border: 1px solid #4caf50; }
.status-waiting { background: #cff4fc; color: #055160; border: 1px solid #0dcaf0; }
.status-return { background: #ffe0b2; color: #e65100; border: 1px solid #FF9800; }
.status-return_processed { background: #e1bee7; color: #4a148c; border: 1px solid #9c27b0; }
.status-international { background: #bbdefb; color: #0d47a1; border: 1px solid #2196f3; }
.status-cancelled { background: #424242; color: #fff; }

/* === СТРОКИ ТАБЛИЦЫ (ЦВЕТНАЯ ПОДСВЕТКА) === */
.order-row-new { border-left: 4px solid var(--status-new); }
.order-row-waiting { border-left: 4px solid var(--status-waiting); background-color: rgba(13, 202, 240, 0.06); }
.order-row-reserved { border-left: 4px solid var(--status-reserved); background-color: rgba(255, 193, 7, 0.04); }
.order-row-delivered { border-left: 4px solid var(--status-delivered); background-color: rgba(244, 67, 54, 0.04); }
.order-row-realized { border-left: 4px solid var(--status-realized); background-color: rgba(76, 175, 80, 0.04); }
.order-row-return { border-left: 4px solid var(--status-return); background-color: rgba(255, 152, 0, 0.04); }
.order-row-return_processed { border-left: 4px solid var(--status-return-processed); }
.order-row-international { border-left: 4px solid var(--status-international); background-color: rgba(33, 150, 243, 0.04); }
.order-row-cancelled { border-left: 4px solid var(--status-cancelled); opacity: 0.7; }

/* === STAT CARDS === */
.stat-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
    color: inherit;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12) !important;
}

.stat-icon { font-size: 1.8rem; line-height: 1; }

.stat-yellow .card-body { border-left: 4px solid var(--status-reserved); }
.stat-red .card-body { border-left: 4px solid var(--status-delivered); }
.stat-green .card-body { border-left: 4px solid var(--status-realized); }
.stat-orange .card-body { border-left: 4px solid var(--status-return); }
.stat-blue .card-body { border-left: 4px solid var(--status-international); }

/* === КАРТОЧКИ === */
.card {
    border-radius: 10px;
}

.card-header {
    font-size: 0.9rem;
}

/* === ТАБЛИЦЫ === */
.table th {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #666;
}

.table td { vertical-align: middle; }

/* === МОНО-ШРИФТ === */
.fw-mono { font-family: 'Cascadia Code', 'Consolas', 'Courier New', monospace; }

/* === СИНХРОНИЗАЦИЯ === */
.sync-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #333;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: opacity 0.3s ease;
}

.sync-indicator.sync-saved { background: #198754; }
.sync-indicator.sync-error { background: #dc3545; }
.sync-indicator.sync-offline { background: #6c757d; }

/* === TOAST === */
.toast-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 11000;
}

/* === FOOTER === */
footer {
    margin-top: auto;
    font-size: 0.75rem;
}

/* === АДАПТИВНОСТЬ === */
@media (max-width: 768px) {
    .table-responsive { font-size: 0.8rem; }
    .stat-icon { font-size: 1.2rem; }
    .fs-2 { font-size: 1.3rem !important; }
}

/* === СКРОЛЛБАР === */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #999; }

/* === АНИМАЦИИ === */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.2s ease; }

/* === ПУЛЬСАЦИЯ ДЛЯ НОТИФИКАЦИЙ === */
@keyframes pulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Мигающий бейдж в навбаре */
@keyframes blink-badge {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}
.badge-blink {
    animation: blink-badge 1.2s ease-in-out infinite;
}

/* === АНИМАЦИЯ КНОПКИ СИНХРОНИЗАЦИИ === */
@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
.spin-icon {
    display: inline-block;
    animation: spin 0.8s linear infinite;
}

/* === СТРАНИЦА ВХОДА === */
body:has(.min-vh-100) {
    background: transparent !important;
}
