/* assets/css/style.css - Основные стили для складской системы */

:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --light: #f8fafc;
    --dark: #1e293b;
    --dark-bg: #0f172a;
}

/* Базовые стили */
body {
    background: var(--light);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ============ САЙДБАР ============ */
.sidebar {
    min-height: 100vh;
    background: linear-gradient(180deg, var(--dark) 0%, var(--dark-bg) 100%);
    box-shadow: 4px 0 20px rgba(0,0,0,0.1);
}

.sidebar .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 12px 20px;
    border-radius: 10px;
    margin: 4px 12px;
    transition: all 0.3s;
}

.sidebar .nav-link:hover, 
.sidebar .nav-link.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

.sidebar .nav-link i {
    margin-right: 10px;
}

/* ============ КАРТОЧКИ ============ */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-2px);
}

.stat-card {
    border-left: 4px solid var(--primary);
}

.stat-card.clients { border-left-color: #8b5cf6; }
.stat-card.products { border-left-color: #06b6d4; }
.stat-card.orders { border-left-color: #f59e0b; }
.stat-card.sales { border-left-color: #10b981; }

.table-card {
    overflow: hidden;
}

.table-card .card-header {
    background: white;
    border-bottom: 2px solid var(--light);
    font-weight: 600;
}

/* ============ КНОПКИ ============ */
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* ============ БЕЙДЖИ СТАТУСОВ ============ */
.badge-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-processing { background: #fef3c7; color: #92400e; }
.badge-shipping { background: #dbeafe; color: #1e40af; }
.badge-partial_payment { background: #fed7aa; color: #9a3412; }
.badge-completed { background: #d1fae5; color: #065f46; }
.badge-cancelled { background: #fee2e2; color: #991b1b; }

/* ============ МОДАЛЬНЫЕ ОКНА ============ */
.modal-content {
    border-radius: 15px;
    border: none;
}

.modal-header {
    border-bottom: 2px solid var(--light);
    border-radius: 15px 15px 0 0;
}

/* ============ ФОРМЫ ============ */
.form-control:focus, 
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* ============ ТОВАРЫ ============ */
.product-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
}

/* ============ ПОИСК ============ */
.search-box {
    position: relative;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary);
}

.search-box input {
    padding-left: 40px;
    border-radius: 10px;
}

/* ============ ПОЛЯ ТОЛЬКО ДЛЯ ЧТЕНИЯ ============ */
input[readonly].bg-light {
    background-color: #e9ecef !important;
    cursor: not-allowed;
}

/* ============ АНИМАЦИИ ============ */
.text-danger.fw-bold {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============ АДАПТИВНОСТЬ ============ */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -100%;
        z-index: 1000;
        width: 250px;
        transition: left 0.3s;
    }
    
    .sidebar.show {
        left: 0;
    }
    
    .main-content {
        margin-left: 0;
    }
}

/* ============ ВЕРХНЯЯ ПАНЕЛЬ ============ */
.main-content {
    min-height: 100vh;
}

.top-bar {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* ============ ФЛАГИ ============ */
.fi {
    margin-right: 5px;
    border-radius: 2px;
    box-shadow: 0 0 2px rgba(0,0,0,0.2);
}

.dropdown-item .fi {
    margin-right: 8px;
}

/* ============ ГРУППЫ КНОПОК ============ */
.btn-group {
    margin-bottom: 15px;
}

.btn-group .btn {
    border-radius: 5px !important;
    margin-right: 5px;
}

/* ============ ИНФОРМАЦИЯ О СОЗДАТЕЛЕ ============ */
.creator-info {
    background: #f8f9fa;
    border-left: 3px solid var(--primary);
    font-size: 0.85rem;
}

.creator-info i {
    color: var(--primary);
}

/* ============ ТАБЛИЦЫ ============ */
.table-danger {
    background-color: #f8d7da !important;
}

.list-group-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============ УВЕДОМЛЕНИЯ ============ */
.notification-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

/* ============ СТРАНИЦА ВХОДА ============ */
.login-card {
    border: none;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 400px;
    width: 100%;
    background: white;
    position: relative;
}

.login-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px 20px 0 0;
    padding: 30px;
    text-align: center;
    position: relative;
}

.language-selector {
    position: absolute;
    top: 15px;
    right: 15px;
}

.language-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.language-btn:hover {
    background: rgba(255,255,255,0.3);
}

.language-dropdown {
    position: absolute;
    top: 45px;
    right: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    display: none;
    z-index: 1000;
    min-width: 120px;
}

.language-dropdown.show {
    display: block;
}

.language-dropdown a {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    color: #333;
    text-decoration: none;
    transition: background 0.3s;
}

.language-dropdown a:hover {
    background: #f0f0f0;
}

.language-dropdown a:first-child {
    border-radius: 8px 8px 0 0;
}

.language-dropdown a:last-child {
    border-radius: 0 0 8px 8px;
}

.btn-login {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 12px;
    border-radius: 10px;
    width: 100%;
    font-weight: 600;
    transition: transform 0.3s;
}

.btn-login:hover {
    transform: translateY(-2px);
    color: white;
}

.default-credentials {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    font-size: 14px;
}

/* ============ ПРОФИЛЬ ============ */
.profile-card {
    border: none;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.profile-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px 20px 0 0;
    padding: 30px;
}

/* ============ ОТЧЕТЫ ============ */
.col-md-2-4 {
    flex: 0 0 auto;
    width: 20%;
    padding: 0 12px;
}

@media (max-width: 768px) {
    .col-md-2-4 {
        width: 100%;
        margin-bottom: 15px;
    }
}

.text-purple {
    color: #8b5cf6 !important;
}

/* ============ ПРЕДПРОСМОТР ИКОНОК ============ */
#iconPreview {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#iconPreviewElement {
    transition: all 0.3s;
}