* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 15px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

h1, h2 {
    color: white;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    font-size: 1.5em;
}

/* Навигация */
.nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.nav a {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    background: rgba(255,255,255,0.2);
    border-radius: 25px;
    transition: background 0.3s;
    font-size: 0.9em;
}

.nav a:hover {
    background: rgba(255,255,255,0.3);
}

/* Сетка заказов - 2 колонки на мобильных */
.orders-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 30px;
}

@media (min-width: 768px) {
    .orders-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
}

@media (min-width: 1024px) {
    .orders-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

/* Карточка заказа */
.order-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    position: relative;
}

.order-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

/* Слайдер изображений */
.card-slider {
    position: relative;
    width: 100%;
    height: 140px;
    overflow: hidden;
    background: #f0f0f0;
}

@media (min-width: 768px) {
    .card-slider {
        height: 180px;
    }
}

.slider-container {
    display: flex;
    transition: transform 0.3s ease;
    height: 100%;
}

.slider-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
}

.slider-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 10;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.slider-dot.active {
    background: white;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.slider-arrow:hover {
    background: rgba(0,0,0,0.7);
}

.slider-arrow.left {
    left: 8px;
}

.slider-arrow.right {
    right: 8px;
}

.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 3em;
}

/* Тело карточки */
.order-card-body {
    padding: 10px;
}

@media (min-width: 768px) {
    .order-card-body {
        padding: 15px;
    }
}

.order-card-title {
    font-size: 0.9em;
    color: #333;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
}

@media (min-width: 768px) {
    .order-card-title {
        font-size: 1em;
    }
}

.order-card-price {
    font-size: 1.1em;
    color: #667eea;
    font-weight: bold;
    margin-bottom: 8px;
}

@media (min-width: 768px) {
    .order-card-price {
        font-size: 1.3em;
    }
}

.order-card-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: bold;
    margin-bottom: 8px;
}

@media (min-width: 768px) {
    .order-card-status {
        padding: 5px 12px;
        font-size: 0.85em;
    }
}

.status-new { background: #e3f2fd; color: #1976d2; }
.status-in-progress { background: #fff3e0; color: #f57c00; }
.status-completed { background: #e8f5e9; color: #388e3c; }

/* Кнопки */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 0.85em;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    text-align: center;
    width: 100%;
    margin-top: 8px;
}

@media (min-width: 768px) {
    .btn {
        padding: 12px 25px;
        font-size: 0.95em;
    }
}

.btn:hover {
    transform: scale(1.03);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8em;
    margin-right: 5px;
    width: auto;
}

.btn-danger {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.btn-success {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.btn-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.btn-contacts {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: #333;
    font-weight: bold;
}

/* Кнопка контактов на карточке */
.btn-card-contacts {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: transform 0.2s, background 0.3s;
}

.btn-card-contacts:hover {
    transform: scale(1.1);
    background: white;
}

/* Админ панель - адаптивная таблица */
.admin-panel {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    margin-bottom: 30px;
}

@media (min-width: 768px) {
    .admin-panel {
        padding: 30px;
    }
}

.admin-stats {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.admin-stats strong {
    font-size: 1.5em;
}

/* Адаптивная таблица для мобильных */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.admin-table th,
.admin-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.admin-table th {
    background: #f5f5f5;
    font-weight: bold;
    font-size: 0.9em;
}

@media (max-width: 768px) {
    .admin-table {
        border: 0;
    }
    
    .admin-table thead {
        display: none;
    }
    
    .admin-table tr {
        display: block;
        border: 1px solid #e0e0e0;
        border-radius: 10px;
        margin-bottom: 15px;
        padding: 10px;
        background: #fafafa;
    }
    
    .admin-table td {
        display: block;
        text-align: right;
        padding: 8px 0;
        border-bottom: 1px solid #eee;
        position: relative;
    }
    
    .admin-table td:last-child {
        border-bottom: 0;
        text-align: left;
    }
    
    .admin-table td::before {
        content: attr(data-label);
        float: left;
        font-weight: bold;
        color: #667eea;
        text-transform: uppercase;
        font-size: 0.85em;
    }
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 25px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
    color: #333;
    font-size: 1.3em;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.8em;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

/* Контакты в модалке */
.contact-info {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2em;
    flex-shrink: 0;
}

.contact-details {
    flex: 1;
}

.contact-label {
    font-size: 0.85em;
    color: #999;
    margin-bottom: 3px;
}

.contact-value {
    font-size: 1.1em;
    color: #333;
    font-weight: 500;
}

.contact-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Форма заказа */
.order-form {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    max-width: 600px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .order-form {
        padding: 30px;
    }
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: bold;
    font-size: 0.95em;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* Загрузка файлов */
.file-upload {
    border: 2px dashed #667eea;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s, background 0.3s;
    background: #f9f9ff;
}

.file-upload:hover {
    border-color: #764ba2;
    background: #f0f0ff;
}

.file-upload input {
    display: none;
}

.preview-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
    margin-top: 15px;
}

.preview-images img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s;
}

.preview-images img:hover {
    transform: scale(1.05);
}

/* Комментарии и отзывы */
.comments-section,
.reviews-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-top: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.comment,
.review {
    border-bottom: 1px solid #e0e0e0;
    padding: 15px 0;
}

.comment:last-child,
.review:last-child {
    border-bottom: none;
}

.comment-author,
.review-author {
    font-weight: bold;
    color: #667eea;
    margin-bottom: 5px;
    font-size: 0.95em;
}

.comment-date,
.review-date {
    font-size: 0.85em;
    color: #999;
    margin-bottom: 10px;
}

.rating {
    color: #ffc107;
    font-size: 1.2em;
    margin-bottom: 10px;
}

/* Уведомления */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    color: white;
    font-weight: bold;
    z-index: 2000;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease;
    max-width: calc(100% - 40px);
}

.notification.success {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.notification.error {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Статистика на главной */
.home-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .home-stats {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
    }
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.stat-number {
    font-size: 1.8em;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.85em;
    color: #666;
}

/* Пустое состояние */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    color: white;
    background: rgba(0,0,0,0.3);
    padding: 40px 20px;
    border-radius: 15px;
}

.empty-state-icon {
    font-size: 4em;
    margin-bottom: 15px;
}

.empty-state-text {
    font-size: 1.1em;
    margin-bottom: 20px;
}

