/**
 * Стили для системы поставщиков
 * L-Green Theme
 */

/* Общие стили */
.supplier-register-form,
.supplier-login-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.supplier-register-form h2,
.supplier-login-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    font-size: 28px;
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #34495e;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

.form-group input.error,
.form-group textarea.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.error-message {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
    display: block;
}

.button {
    background: #27ae60;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.button:hover {
    background: #219a52;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

.button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.button-secondary {
    background: #95a5a6;
}

.button-secondary:hover {
    background: #7f8c8d;
}

/* Уведомления */
.notice {
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 8px;
    font-weight: 500;
}

.notice-success {
    background: #d5f4e6;
    color: #27ae60;
    border-left: 4px solid #27ae60;
}

.notice-error {
    background: #fadbd8;
    color: #e74c3c;
    border-left: 4px solid #e74c3c;
}

/* Дашборд поставщика */
.supplier-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
    background: #27ae60;
    color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(39, 174, 96, 0.3);
}

.dashboard-header h1 {
    margin: 0 0 10px 0;
    font-size: 36px;
    font-weight: 700;
}

.dashboard-header p {
    margin: 0;
    font-size: 18px;
    opacity: 0.9;
}

/* Навигация дашборда */
.dashboard-nav {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    background: white;
    border-radius: 15px;
    padding: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
    gap: 10px;
}

.nav-item {
    padding: 12px 24px;
    text-decoration: none;
    color: #2c3e50;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-item:hover {
    background: #f8f9fa;
    color: #27ae60;
    transform: translateY(-2px);
}

.nav-item.active {
    background: #27ae60;
    color: white;
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.5s;
}

.nav-item:hover::before {
    left: 100%;
}

/* Контент дашборда */
.dashboard-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* Статистические карточки */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    color: #2c3e50;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: slideInUp 0.6s ease-out;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e8ed;
}

.stat-card:nth-child(2) {
    background: white;
}

.stat-card:nth-child(3) {
    background: white;
}

.stat-card:nth-child(4) {
    background: white;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.stat-card h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 500;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
    position: relative;
    z-index: 1;
}

/* Таблицы */
.orders-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.orders-table th,
.orders-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e1e8ed;
}

.orders-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
}

.orders-table tr:hover {
    background: #f8f9fa;
}

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

/* Адаптивность */
@media (max-width: 768px) {
    .supplier-dashboard {
        padding: 10px;
    }
    
    .dashboard-header {
        padding: 20px 15px;
    }
    
    .dashboard-header h1 {
        font-size: 28px;
    }
    
    .dashboard-header p {
        font-size: 16px;
    }
    
    .dashboard-nav {
        flex-direction: column;
        padding: 15px;
    }
    
    .nav-item {
        text-align: center;
        margin-bottom: 5px;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .dashboard-content {
        padding: 20px 15px;
    }
    
    .orders-table {
        font-size: 14px;
    }
    
    .orders-table th,
    .orders-table td {
        padding: 10px 8px;
    }
}

/* Мобильное меню */
.mobile-nav {
    position: relative;
}

.mobile-menu-toggle {
    display: none;
    background: #27ae60;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .mobile-nav {
        display: none;
    }
    
    .mobile-nav.active {
        display: block;
    }
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Индикаторы загрузки */
.loading {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
    font-size: 18px;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e1e8ed;
    border-top: 2px solid #27ae60;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Уведомления о восстановлении и автосохранении */
.restore-notice,
.autosave-indicator {
    background: #3498db;
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    font-size: 14px;
    animation: fadeIn 0.3s ease-in;
}

.autosave-indicator {
    background: #27ae60;
    text-align: center;
}

/* Модальные окна */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.3s ease-in;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideInUp 0.3s ease-out;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #7f8c8d;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #e74c3c;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

body.modal-open {
    overflow: hidden;
}
/* Элементы с анимацией при скролле */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Улучшенные стили для форм */
.form-group input:valid {
    border-color: #27ae60;
}

.form-group input:invalid:not(:placeholder-shown) {
    border-color: #e74c3c;
}

/* Стили для статусов в админке */
.status-approved {
    color: #27ae60;
    font-weight: 600;
}

.status-pending {
    color: #f39c12;
    font-weight: 600;
}

/* Стили для кнопок в админке */
.approve-supplier,
.reject-supplier {
    margin-right: 5px;
    margin-bottom: 5px;
}

/* Дополнительные утилиты */
.text-center {
    text-align: center;
}

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

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

.p-20 {
    padding: 20px;
}

/* Стили для таблиц в админке */
.suppliers-list table {
    margin-top: 20px;
}

.suppliers-list th {
    background: #f8f9fa;
    font-weight: 600;
}

.suppliers-list td {
    vertical-align: middle;
}

/* Стили для уведомлений в админке */
.wrap .notice {
    margin: 20px 0;
}

/* Адаптивные таблицы */
@media (max-width: 768px) {
    .suppliers-list table,
    .suppliers-list thead,
    .suppliers-list tbody,
    .suppliers-list th,
    .suppliers-list td,
    .suppliers-list tr {
        display: block;
    }
    
    .suppliers-list thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .suppliers-list tr {
        border: 1px solid #ccc;
        margin-bottom: 10px;
        padding: 10px;
        border-radius: 8px;
    }
    
    .suppliers-list td {
        border: none;
        position: relative;
        padding-left: 50%;
        padding-top: 10px;
        padding-bottom: 10px;
    }
    
    .suppliers-list td:before {
        content: attr(data-label) ": ";
        position: absolute;
        left: 6px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: bold;
    }
}