﻿/* ---- Переменные ---- */
:root {
    /* Палитра */
    --cream: #F5F0E8;
    --cream-dark: #EDE6D6;
    --green: #4A7C3F;
    --green-light: #6AAF5E;
    --green-dark: #2F5228;
    --white: #FFFFFF;
    /* Текст */
    --text-dark: #2C2C2C;
    --text-secondary: #6B6B6B;
    /* Статусы заказов */
    --status-new-bg: #FEF3C7;
    --status-new-text: #92400E;
    --status-assigned-bg: #DBEAFE;
    --status-assigned-text: #1E40AF;
    --status-inprogress-bg: #E0E7FF;
    --status-inprogress-text: #4338CA;
    --status-completed-bg: #D1FAE5;
    --status-completed-text: #065F46;
    --status-cancelled-bg: #FEE2E2;
    --status-cancelled-text: #991B1B;
    /* Прочее */
    --border: #E5E7EB;
    --primary: var(--green);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(74,124,63,0.12);
    --shadow-lg: 0 8px 32px rgba(74,124,63,0.20);
    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

/* ---- Сброс ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ---- База ---- */
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 18px;
    line-height: 1.6;
    background-color: var(--cream);
    color: var(--text-dark);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---- Шапка ---- */
.site-header {
    background-color: var(--green-dark);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

    .site-header .container {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

.logo {
    color: var(--cream);
    font-size: 22px;
    font-weight: 700;
    text-decoration: none;
}

nav a {
    color: var(--cream);
    text-decoration: none;
    margin-left: 24px;
    font-size: 17px;
    transition: color 0.2s;
}

    nav a:hover {
        color: var(--green-light);
    }

.btn-nav {
    background-color: var(--green-light);
    color: var(--white) !important;
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

    .btn-nav:hover {
        background-color: var(--green) !important;
    }

/* ---- Кнопки ---- */
.btn,
.btn-primary,
.btn-secondary,
.btn-outline {
    display: inline-block;
    padding: 14px 32px;
    border-radius: var(--radius-md);
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    text-align: center;
}

.btn-primary {
    background-color: var(--green);
    color: var(--white);
}

    .btn-primary:hover:not(:disabled) {
        background-color: var(--green-dark);
    }

    .btn-primary:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.btn-secondary {
    background-color: var(--cream-dark);
    color: var(--text-dark);
}

    .btn-secondary:hover {
        background-color: var(--cream);
        color: var(--text-dark);
    }

.btn-outline {
    background-color: transparent;
    color: var(--green);
    border: 2px solid var(--green);
}

    .btn-outline:hover {
        background-color: var(--green);
        color: var(--white);
    }

/* ---- Карточки ---- */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
}

/* ---- Формы ---- */
.label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.input {
    width: 100%;
    padding: 14px 16px;
    font-size: 18px;
    border: 2px solid var(--cream-dark);
    border-radius: var(--radius-md);
    background: var(--white);
    color: var(--text-dark);
    outline: none;
    transition: border-color 0.2s;
}

    .input:focus {
        border-color: var(--green);
    }

/* Нативные инпуты (для совместимости) */
input[type="text"],
input[type="tel"],
input[type="number"] {
    width: 100%;
    padding: 14px 16px;
    font-size: 18px;
    border: 2px solid var(--cream-dark);
    border-radius: var(--radius-md);
    background: var(--white);
    color: var(--text-dark);
    outline: none;
    transition: border-color 0.2s;
}

    input[type="text"]:focus,
    input[type="tel"]:focus,
    input[type="number"]:focus {
        border-color: var(--green);
    }

.error-message {
    background: var(--status-cancelled-bg);
    color: var(--status-cancelled-text);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 500;
}

/* ---- Статусы заказов ---- */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-new {
    background: var(--status-new-bg);
    color: var(--status-new-text);
}

.status-assigned {
    background: var(--status-assigned-bg);
    color: var(--status-assigned-text);
}

.status-inprogress {
    background: var(--status-inprogress-bg);
    color: var(--status-inprogress-text);
}

.status-completed {
    background: var(--status-completed-bg);
    color: var(--status-completed-text);
}

.status-cancelled {
    background: var(--status-cancelled-bg);
    color: var(--status-cancelled-text);
}

/* ---- Футер ---- */
.site-footer {
    background-color: var(--green-dark);
    color: var(--cream);
    text-align: center;
    padding: 24px 0;
    font-size: 16px;
    margin-top: 60px;
}

/* ---- Анимации ---- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

    .fade-in.visible {
        opacity: 1;
        transform: translateY(0);
    }

    .fade-in:nth-child(2) {
        transition-delay: 0.1s;
    }

    .fade-in:nth-child(3) {
        transition-delay: 0.2s;
    }

    .fade-in:nth-child(4) {
        transition-delay: 0.3s;
    }

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(74, 124, 63, 0.5);
    }

    70% {
        box-shadow: 0 0 0 14px rgba(74, 124, 63, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(74, 124, 63, 0);
    }
}

.btn-pulse {
    animation: pulse 2s infinite;
}

/* ---- Специфичные компоненты лендинга ---- */
.hero-wave {
    display: block;
    margin-top: -2px;
}

.hero-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
}

.step-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 32px 24px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

.step-number {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--green), var(--green-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 22px;
    font-weight: 700;
    margin: 0 auto 16px;
}

/* ---- Утилиты ---- */
.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

.mt-4 {
    margin-top: 32px;
}

.mt-5 {
    margin-top: 48px;
}
/* ---- Админка ---- */
:root {
    --admin-bg: #F2EFE9;
    --admin-sidebar-bg: #2B2B2B;
    --admin-header-bg: #3A3A3A;
    --admin-card-bg: #FFFFFF;
    --admin-border: #D9D4CB;
    --admin-text: #2C2C2C;
    --admin-text-muted: #7A7570;
    --admin-accent: #6B7B5E;
    --admin-accent-hover: #556149;
    --admin-danger: #C0392B;
    --admin-danger-bg: #FDECEA;
    --admin-success: #2E7D52;
    --admin-success-bg: #E8F5EE;
    --admin-warning: #8A6800;
    --admin-warning-bg: #FFF8E1;
    --admin-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

.admin-header {
    background-color: var(--admin-header-bg);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.admin-header__inner {
    display: flex;
    align-items: center;
    gap: 24px;
}

.admin-badge {
    background: var(--admin-accent);
    color: white;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.admin-header__inner nav {
    flex: 1;
}

    .admin-header__inner nav a {
        color: #C8C4BC;
        text-decoration: none;
        margin-right: 24px;
        font-size: 15px;
        transition: color 0.2s;
    }

        .admin-header__inner nav a:hover,
        .admin-header__inner nav a.active {
            color: #FFFFFF;
        }

.admin-main {
    background: var(--admin-bg);
    padding: 40px 0;
    min-height: calc(100vh - 140px);
}

    /* Карточки в админке */
    .admin-main .card {
        background: var(--admin-card-bg);
        border: 1px solid var(--admin-border);
        box-shadow: var(--admin-shadow);
        border-radius: var(--radius-md);
    }

    /* Кнопки в админке */
    .admin-main .btn-primary {
        background-color: var(--admin-accent);
        color: #fff;
    }

        .admin-main .btn-primary:hover:not(:disabled) {
            background-color: var(--admin-accent-hover);
        }

    .admin-main .btn-secondary {
        background-color: #ECEAE4;
        color: var(--admin-text);
        border: 1px solid var(--admin-border);
    }

        .admin-main .btn-secondary:hover {
            background-color: #E0DDD6;
        }

/* Статистические плитки */
.admin-stat-card {
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    box-shadow: var(--admin-shadow);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-stat-card__value {
    font-size: 32px;
    font-weight: 700;
    color: var(--admin-text);
    line-height: 1;
}

.admin-stat-card__label {
    font-size: 13px;
    color: var(--admin-text-muted);
}

/* === Layout === */
.cabinet {
    max-width: 800px;
    margin: 40px auto;
}

.cabinet__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.cabinet__welcome {
    margin-bottom: 32px;
}

.cabinet__welcome-sub {
    color: var(--text-secondary);
    font-size: 15px;
    margin: 0;
}

.cabinet__welcome-addr {
    font-size: 20px;
    font-weight: 600;
    margin: 4px 0 0;
}

/* === Section toggle === */
.section-toggle {
    width: 100%;
    text-align: left;
    cursor: pointer;
    margin-bottom: 16px;
    padding: 24px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: white;
    transition: border-color 0.2s, background 0.2s;
}

.section-toggle--active {
    border-color: var(--primary);
    background: #f9fdf7;
}

.section-toggle__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-toggle__label {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-toggle__icon {
    font-size: 32px;
}

.section-toggle__title {
    margin: 0;
    font-size: 24px;
}

.section-toggle__chevron {
    font-size: 24px;
    transition: transform 0.2s;
}

.section-toggle__chevron--open {
    transform: rotate(180deg);
}

/* === Order card === */
.order-card {
    padding: 20px;
    border: 2px solid var(--border);
    border-radius: 12px;
}

.order-card--done {
    opacity: 0.75;
}

.order-card__head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
}

.order-card__title {
    margin: 0 0 8px;
    font-size: 18px;
}

.order-card__date {
    color: var(--text-secondary);
    margin: 0;
    font-size: 15px;
}

.order-card__slot {
    margin: 4px 0 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.order-card__executor {
    margin: 8px 0 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

.order-card__price {
    font-size: 24px;
    font-weight: bold;
    margin-top: 8px;
}

.order-card__actions {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
}

.order-card__rating {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.order-card__rating-title {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 600;
}

.order-card__stars {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.order-card__star {
    font-size: 36px;
    cursor: pointer;
    opacity: 0.3;
    transition: transform 0.1s, opacity 0.1s;
}

.order-card__star--active {
    transform: scale(1.2);
    opacity: 1;
}

.order-card__rated {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-secondary);
}

/* === Service card === */
.service-card {
    padding: 20px;
    border: 2px solid var(--border);
    border-radius: 12px;
    margin-bottom: 16px;
}

.service-card__title {
    margin: 0 0 12px;
    font-size: 20px;
}

.service-card__desc {
    color: var(--text-secondary);
    margin: 0 0 16px;
    font-size: 16px;
}

.service-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.service-card__price {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary);
}

/* === Time slot picker === */
.timeslot-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.timeslot-option--selected {
    border-color: var(--primary);
    background: #f9fdf7;
}

.timeslot-option__left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.timeslot-option__price {
    font-weight: 600;
    color: var(--primary);
}

/* === Confirm modal === */
.confirm-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.confirm-modal__card {
    max-width: 400px;
    width: 90%;
    padding: 32px;
    text-align: center;
}

.confirm-modal__icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.confirm-modal__title {
    margin: 0 0 12px;
    font-size: 20px;
}

.confirm-modal__desc {
    color: var(--text-secondary);
    margin: 0 0 24px;
    font-size: 15px;
}

.confirm-modal__actions {
    display: flex;
    gap: 12px;
}

.btn-danger {
    background: #c0392b;
    border-color: #c0392b;
    color: white;
}

/* Success notification */
.success-message {
    background: var(--status-completed-bg);
    color: var(--status-completed-text);
    padding: 12px 16px;
    border-radius: 8px;
}

/* Order card: notes row */
.order-card__notes {
    margin: 8px 0 0;
    font-size: 14px;
    color: var(--text-secondary);
}

/* Order card: right column (executor) */
.order-card__right {
    text-align: right;
}

.order-card__price-sm {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary);
    margin-top: 8px;
}

.order-card__action-btn {
    width: 100%;
    font-size: 16px;
    padding: 14px;
    margin-top: 12px;
}

/* Modifier */
.btn-warning {
    background: #e67e22;
    border-color: #e67e22;
    color: white;
}

/* Section toggle: count badge */
.section-toggle__badge {
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: bold;
}
/* === Admin executor card === */
.executor-card {
}

.executor-card--pending {
    border-left: 4px solid var(--status-assigned-text);
}

.executor-card--blocked {
    border-left: 4px solid var(--status-cancelled-text);
    opacity: 0.85;
}

.executor-card__inner {
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.executor-card__name {
    margin: 0 0 4px;
    font-size: 18px;
}

.executor-card__phone {
    margin: 0 0 6px;
    color: var(--text-secondary);
    font-size: 13px;
}

.executor-card__meta {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.executor-card__stats {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.executor-card__actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.executor-card__btn {
    font-size: 14px;
    padding: 8px 16px;
}

.executor-card__btn--danger {
    color: var(--status-cancelled-text);
}

/* === Admin order card === */
.admin-order-card {
    padding: 20px 24px;
}

.admin-order-card__inner {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 16px;
}

.admin-order-card__left {
    flex: 1;
}

.admin-order-card__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.admin-order-card__date {
    font-size: 13px;
    color: var(--text-secondary);
}

.admin-order-card__address {
    font-size: 15px;
    margin-bottom: 4px;
}

.admin-order-card__executor {
    font-size: 13px;
    color: var(--text-secondary);
}

.admin-order-card__notes {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.admin-order-card__right {
    text-align: right;
    white-space: nowrap;
}

.admin-order-card__price {
    font-size: 20px;
    font-weight: 700;
}

.admin-order-card__scheduled {
    font-size: 13px;
    color: var(--text-secondary);
}

.admin-order-card__cancel {
    margin-top: 10px;
}

/* === Tab bar (shared: executors + orders) === */
.tab-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.tab-bar__btn {
    font-size: 14px;
    padding: 8px 16px;
}

.tab-bar__badge {
    background: #e74c3c;
    color: white;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 7px;
    margin-left: 8px;
}

/* === Admin stat grid === */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 32px;
}
/* === Notifications bell === */
.notif-bell {
    position: relative;
    cursor: pointer;
    padding: 8px;
}

.notif-bell__icon {
    font-size: 24px;
}

.notif-bell__badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #e74c3c;
    color: white;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 5px;
    min-width: 18px;
    text-align: center;
}

/* === Toast уведомления === */
.toast-stack {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 2000;
    max-width: 340px;
}

.toast {
    background: white;
    border-left: 4px solid var(--primary);
    border-radius: 10px;
    padding: 14px 18px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    animation: toast-in 0.3s ease;
}

.toast__title {
    font-weight: 600;
    font-size: 15px;
    margin: 0 0 4px;
}

.toast__body {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}