/* ==================== БАЗОВЫЕ СТИЛИ ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Корпоративные цвета */
    --primary-blue: #3c6cf2;
    --primary-blue-dark: #2a52d4;
    --primary-blue-light: #5a82f5;
    --light-blue: #e8f0fe;
    --light-blue-2: #f0f5ff;
    --orange: #f97316;
    --orange-dark: #ea580c;
    --orange-light: #fed7aa;
    
    /* Нейтральные */
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-900: #111827;
    
    /* Тени */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-700);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==================== АНИМАЦИИ ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.animate-fade-in {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.animate-slide-in {
    animation: slideInLeft 0.6s ease-out forwards;
    opacity: 0;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ==================== ШАПКА ==================== */
header {
    background: var(--white);
    border-bottom: 3px solid var(--primary-blue);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    gap: 60px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.logo-section img {
    height: 56px;
    width: auto;
}

.logo-text h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.3;
}

.logo-text p {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-top: 2px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 8px;
}

nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

nav a:hover {
    background-color: var(--light-blue);
    color: var(--primary-blue);
    transform: translateY(-1px);
}

nav a.active {
    background-color: var(--primary-blue);
    color: var(--white);
}

nav a i {
    font-size: 1rem;
}

/* ==================== ГЛАВНЫЙ БЛОК ==================== */
.hero {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    border-radius: 12px;
    padding: 64px 48px;
    text-align: center;
    margin: 32px 0;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: 5%;
    width: 200px;
    height: 200px;
    background: rgba(249, 115, 22, 0.08);
    border-radius: 50%;
}

.hero h2 {
    color: var(--white);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    max-width: 700px;
    margin: 0 auto 32px;
    position: relative;
    z-index: 1;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--orange);
    color: var(--white);
    padding: 14px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.btn-primary:hover {
    background-color: var(--orange-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(249, 115, 22, 0.3);
}

/* ==================== СЕКЦИИ ==================== */
.section {
    margin: 48px 0;
}

.section-title {
    text-align: center;
    color: var(--gray-900);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 16px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue), var(--orange));
    border-radius: 2px;
}

/* ==================== КАРТОЧКИ УСЛУГ — ВАРИАНТ 2 ==================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    background: var(--white);
    padding: 36px 28px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--orange));
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.service-card h3 {
    color: var(--gray-900);
    font-size: 1.0625rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    line-height: 1.5;
}

.service-card i {
    color: var(--orange);
    font-size: 1.5rem;
}

/* ==================== ИНФОРМАЦИОННЫЕ КАРТОЧКИ ==================== */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.info-card {
    background: var(--white);
    padding: 32px 28px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 3px solid var(--primary-blue);
}

.info-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.info-card i {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 20px;
    display: inline-block;
}

.info-card h3 {
    color: var(--gray-900);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.info-card p {
    color: var(--gray-500);
    font-size: 0.9375rem;
    line-height: 1.7;
}

/* ==================== ФОРМЫ ==================== */
.form-container {
    max-width: 800px;
    margin: 40px auto;
    background: var(--white);
    padding: 48px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.form-container h2 {
    color: var(--gray-900);
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
}

.form-container > h2 + p {
    text-align: center;
    color: var(--gray-500);
    margin-bottom: 32px;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
    font-size: 0.9375rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(60, 108, 242, 0.1);
}

/* Календарь и временные слоты */
.calendar-container {
    margin: 20px 0;
}

.time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.time-slot {
    background: var(--light-blue);
    border: 2px solid var(--primary-blue);
    border-radius: 8px;
    padding: 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.time-slot:hover:not(.unavailable):not(.past-time) {
    background: var(--primary-blue);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(60, 108, 242, 0.2);
}

.time-slot.selected {
    background: var(--orange);
    border-color: var(--orange);
    color: var(--white);
    transform: scale(1.05);
}

.time-slot.unavailable,
.time-slot.past-time {
    background: var(--gray-100);
    border-color: var(--gray-200);
    color: var(--gray-400);
    cursor: not-allowed;
}

/* ==================== УВЕДОМЛЕНИЯ ==================== */
.notification {
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    animation: slideInDown 0.3s ease-out;
}

@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.notification.success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.notification.error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.notification.info {
    background: var(--light-blue);
    color: var(--primary-blue-dark);
    border-left: 4px solid var(--primary-blue);
}

.close-notification {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    padding: 0 4px;
    line-height: 1;
}

.close-notification:hover {
    opacity: 1;
}

/* ==================== ПОДВАЛ ==================== */
.site-footer {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    color: var(--white);
    padding: 48px 0 32px;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: auto 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.footer-logo img {
    height: 72px;
    opacity: 0.95;
}

.footer-section h4 {
    color: var(--white);
    font-size: 1.0625rem;
    font-weight: 600;
    margin-bottom: 16px;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--orange);
}

.footer-section p {
    margin-bottom: 10px;
    opacity: 0.9;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-section i {
    color: var(--orange);
    width: 18px;
    text-align: center;
}

/* QR-коды */
.qr-container {
    display: flex;
    gap: 20px;
    margin-top: 16px;
}

.qr-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.qr-item img {
    width: 100px;
    height: 100px;
    background: var(--white);
    padding: 4px;
    border-radius: 6px;
}

.qr-item span {
    font-size: 0.8125rem;
    opacity: 0.9;
}

/* ==================== АДМИН-ПАНЕЛЬ ==================== */
.admin-login-container {
    max-width: 420px;
    margin: 80px auto;
    background: var(--white);
    padding: 48px;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
}

.admin-login-container h2 {
    text-align: center;
    color: var(--gray-900);
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.admin-login-container > p {
    text-align: center;
    color: var(--gray-500);
    margin-bottom: 32px;
    font-size: 0.9375rem;
}

.admin-panel {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    margin: 32px auto;
}

.admin-menu {
    background: var(--gray-900);
    padding: 24px;
}

.admin-menu h3 {
    color: var(--white);
    font-size: 1.125rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-menu ul {
    list-style: none;
}

.admin-menu li {
    margin-bottom: 8px;
}

.admin-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--gray-300);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.admin-menu a:hover,
.admin-menu a.active {
    background: var(--primary-blue);
    color: var(--white);
}

.admin-content {
    padding: 32px;
}

.admin-content h2 {
    color: var(--gray-900);
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.admin-content > h2 + p {
    color: var(--gray-500);
    margin-bottom: 24px;
}

/* Таблица записей */
.table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    margin-bottom: 32px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

thead {
    background: var(--gray-100);
}

th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--gray-700);
    border-bottom: 2px solid var(--gray-200);
}

td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-100);
}

tbody tr:hover {
    background: var(--light-blue-2);
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 500;
}

.status-badge.confirmed {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.completed {
    background: var(--light-blue);
    color: var(--primary-blue-dark);
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    margin-right: 8px;
}

.action-btn.edit-btn {
    background: var(--light-blue);
    color: var(--primary-blue);
}

.action-btn.edit-btn:hover {
    background: var(--primary-blue);
    color: var(--white);
}

.action-btn.delete-btn {
    background: #fee2e2;
    color: #991b1b;
}

.action-btn.delete-btn:hover {
    background: #ef4444;
    color: var(--white);
}

/* Статистика */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    padding: 24px;
    background: var(--light-blue-2);
    border-radius: 12px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-value.total { color: var(--primary-blue); }
.stat-value.confirmed { color: #10b981; }
.stat-value.cancelled { color: #ef4444; }
.stat-value.completed { color: var(--orange); }

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* ==================== АДАПТИВНОСТЬ ==================== */
@media (max-width: 1024px) {
    .services-grid,
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    header {
        padding: 0;
    }

    .header-content {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 0;
        align-items: center;
    }

    .logo-section {
        flex-direction: row;
        gap: 10px;
        flex-shrink: 0;
    }

    .logo-section img {
        height: 36px;
    }

    .logo-text h1 {
        font-size: 0.95rem;
        line-height: 1.2;
    }

    .logo-text p {
        display: none;
    }

    nav {
        width: 100%;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 2px;
    }

    nav a {
        font-size: 0.8rem;
        padding: 7px 10px;
    }

    .hero {
        padding: 40px 24px;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .services-grid,
    .info-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }

    .footer-logo {
        display: flex;
        justify-content: center;
    }

    .footer-section h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-section p {
        justify-content: center;
    }

    .qr-container {
        justify-content: center;
    }

    .form-container {
        padding: 32px 24px;
    }

    .time-slots {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-menu {
        padding: 16px;
    }

    .admin-content {
        padding: 20px;
    }

    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .time-slots {
        grid-template-columns: 1fr;
    }

    .stats-container {
        grid-template-columns: 1fr;
    }
}
