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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f4f4;
    padding: 20px;
}

nav {
    background: #ADD8E6;
    padding: 15px 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

nav a {
    color: #333;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 5px;
    transition: background 0.3s;
}

nav a:hover {
    background: rgba(255,255,255,0.5);
    border-radius: 5px;
}

nav span {
    margin-left: auto;
    font-weight: bold;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

h1 {
    margin-bottom: 20px;
    color: #333;
    font-size: 28px;
}

h2 {
    margin-bottom: 15px;
    color: #555;
    font-size: 22px;
}

form {
    max-width: 400px;
    margin: 0 auto;
}

input, textarea, select {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #ADD8E6;
    box-shadow: 0 0 5px rgba(173,216,230,0.5);
}

button, .btn {
    background: #333;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
    text-decoration: none;
    display: inline-block;
}

button:hover, .btn:hover {
    background: #555;
}

.message {
    padding: 12px;
    margin: 15px 0;
    border-radius: 5px;
    text-align: center;
}

.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.product-card {
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 8px;
    background: #f9f9f9;
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-card h3 {
    margin-bottom: 10px;
    color: #333;
}

.price {
    font-size: 24px;
    color: #28a745;
    font-weight: bold;
    margin: 10px 0;
}

/* Стили для статусов заявок */
.status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.status-new {
    background: #fff3cd;
    color: #856404;
}

.status-learning {
    background: #d1ecf1;
    color: #0c5460;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

/* Таблицы */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background: #ADD8E6;
    color: #333;
    font-weight: 600;
}

tr:hover {
    background: #f5f5f5;
}

/* Карточки статистики для админа */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #f0f0f0;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.stat-card h3 {
    font-size: 32px;
    color: #333;
    margin-bottom: 5px;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 25px;
    border-radius: 10px;
    width: 500px;
    max-width: 90%;
}

/* Рейтинг звездами */
.rating {
    color: #ffc107;
    font-size: 20px;
    letter-spacing: 2px;
}

/* Отзывы */
.review-box {
    border: 1px solid #ddd;
    padding: 15px;
    margin: 15px 0;
    border-radius: 8px;
    background: #fafafa;
}

/* Адаптивность */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 15px;
    }
    
    nav {
        flex-direction: column;
        align-items: stretch;
    }
    
    nav a {
        text-align: center;
    }
    
    nav span {
        margin-left: 0;
        text-align: center;
    }
    
    table, thead, tbody, th, td, tr {
        display: block;
    }
    
    th {
        display: none;
    }
    
    td {
        padding: 10px;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 50%;
    }
    
    td:before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        width: 45%;
        font-weight: bold;
    }
    
    .products {
        grid-template-columns: 1fr;
    }
}

/* Кнопки действий */
.btn-small {
    padding: 5px 12px;
    font-size: 12px;
}

.btn-large {
    padding: 12px 30px;
    font-size: 18px;
}

/* Hero секция на главной */
.hero {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    margin-bottom: 30px;
}

.hero h1 {
    color: white;
    font-size: 48px;
}

/* Бейджи */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
}

.badge-admin {
    background: #ff4444;
    color: white;
}

.badge-user {
    background: #4CAF50;
    color: white;
}