/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: #2c3e50;
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    color: white;
    text-decoration: none;
}

.nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.nav a:hover {
    color: #3498db;
}

.cart-link {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -10px;
    right: -15px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
}

.user-menu {
    position: relative;
    cursor: pointer;
}

.user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #2c3e50;
    color: #333;
    min-width: 150px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-radius: 4px;
    z-index: 1001;
}

.user-dropdown a {
    display: block;
    padding: 0.5rem 1rem;
    color: #333;
}

.user-dropdown a:hover {
    background: #f4f4f4;
}

.user-menu:hover .user-dropdown {
    display: block;
}

/* Hero section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 4rem 2rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Services grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.service-card h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.service-card p {
    color: #7f8c8d;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.price {
    font-size: 1.5rem;
    color: #3498db;
    font-weight: bold;
    margin: 1rem 0;
}

.service-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn, .btn-cart {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s;
}

.btn {
    background: #3498db;
    color: white;
}

.btn:hover {
    background: #2980b9;
}

.btn-cart {
    background: #27ae60;
    color: white;
}

.btn-cart:hover {
    background: #229954;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    .nav {
        gap: 1rem;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
}


body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    background: #f4f4f4;
}

.header {
    background: #333;
    color: #fff;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav a {
    color: #fff;
    text-decoration: none;
    margin-left: 1rem;
}

.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 4rem 2rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
}

.price {
    font-size: 1.5rem;
    color: #667eea;
    font-weight: bold;
    margin: 1rem 0;
}

.btn, .btn-cart {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
}

.btn {
    background: #667eea;
    color: white;
}

.btn-cart {
    background: #28a745;
    color: white;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.cart-table th, .cart-table td {
    border: 1px solid #ddd;
    padding: 0.75rem;
    text-align: left;
}

.checkout-form {
    max-width: 500px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Админ-панель */
.admin-container {
    display: flex;
    min-height: 100vh;
}

.admin-content {
    flex: 1;
    padding: 20px;
    background: #f5f6fa;
}

.admin-sidebar {
    width: 250px;
    background: #2c3e50;
    color: white;
    padding: 2rem 1rem;
}

.admin-sidebar h3 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.admin-sidebar ul {
    list-style: none;
    padding: 0;
}

.admin-sidebar li {
    margin-bottom: 0.5rem;
}

.admin-sidebar a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 0.75rem;
    border-radius: 4px;
    transition: background 0.3s;
}

.admin-sidebar a:hover {
    background: #34495e;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #3498db;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.admin-table {
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.admin-table th {
    background: #34495e;
    color: white;
    padding: 1rem;
    text-align: left;
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid #ecf0f1;
}

.admin-table tr:hover {
    background: #f8f9fa;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
}

.status-new { background: #f39c12; color: white; }
.status-processing { background: #3498db; color: white; }
.status-completed { background: #27ae60; color: white; }
.status-cancelled { background: #e74c3c; color: white; }
.active { background: white; color: black; }
.inactive { background: #95a5a6; color: white; }

.btn-primary {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    margin: 0 0.25rem;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

/* Формы */
.admin-form {
    max-width: 600px;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
}

/* Рейтинг */
.rating-stars {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.star {
    color: #ddd;
    font-size: 1.1rem;
}

.star.active {
    color: #f39c12;
}

/* Авторизация */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-box {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.auth-box h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #333;
}

.auth-link {
    text-align: center;
    margin-top: 1rem;
}

/* Уведомления */
.error-message {
    background: #fee;
    color: #c33;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.success-message {
    background: #efe;
    color: #3c3;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.btn-cancel {
    background: #e74c3c;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.btn-cancel:hover {
    background: #c0392b;
}