:root {
    --accent: #7aff00;
    --bg-page: #000000;
    --bg-card: rgba(15,15,15,0.8);
    --bg-card-border: rgba(122,255,0,0.08);
    --chip-bg: rgba(122,255,0,0.12);
    --chip-border: rgba(122,255,0,0.4);
    --text-primary: #fff;
    --text-secondary: #8a8a8a;
    --text-dim: #5e5e5e;
    --border-color: rgba(255,255,255,0.07);
    --radius-card: 16px;
    --radius-inner: 12px;
    --btn-bg: #7aff00;
    --btn-text: #000;
    --success: #7aff00;
    --error: #ff4d4d;
}

/* reset */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    margin: 0;
    padding: 0;
}

html, body {
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-family: -apple-system, system-ui, BlinkMacSystemFont, "Inter", Roboto, sans-serif;
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
}

/* фон — твой бренд */
body {
    background-image: url("logo-bg.jpg");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

/* затемняющий градиент для читаемости поверх фона */
.page-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(
        circle at 20% 20%,
        rgba(0,0,0,0) 0%,
        rgba(0,0,0,0.6) 40%,
        rgba(0,0,0,0.9) 80%
    );
    pointer-events: none;
    z-index: 0;
}

/* анимации появления */
@keyframes fadeUp {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }
    60% {
        opacity: 1;
        transform: translateY(0) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeCard {
    0% {
        opacity: 0;
        transform: translateY(12px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* обёртка страницы */
.page {
    position: relative;
    z-index: 1;
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
    padding: 16px;
    padding-bottom: 96px;
    animation: fadeCard 0.5s ease both;
}

/* карточка шапки */
.header-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-card);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    width: 100%;
    animation: fadeCard 0.5s ease both;
    animation-delay: 0.05s;
}

.brand-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: nowrap;
    min-width: 0;
}

.brand-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    background-color: #0f0f0f;
    border: 1px solid rgba(122,255,0,0.4);
}

.brand-meta {
    margin-left: 12px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.brand-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    word-break: break-word;
}

.brand-name::after {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-left: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.brand-tag {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.3;
}

.status-and-id {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

/* чип статуса */
.status-chip {
    font-size: 12px;
    font-weight: 600;
    background: var(--chip-bg);
    color: var(--accent);
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--chip-border);
    text-transform: uppercase;
    line-height: 1.2;
    transition: box-shadow 0.15s ease;
    box-shadow: 0 0 10px rgba(122,255,0,0.4);
}
.status-chip.yellow {
    background: rgba(255,215,0,0.12);
    border-color: rgba(255,215,0,0.4);
    color: #ffd700;
    box-shadow: 0 0 10px rgba(255,215,0,0.4);
}
.status-chip.green {
    background: rgba(0,255,128,0.12);
    border-color: rgba(0,255,128,0.4);
    color: #00ff80;
    box-shadow: 0 0 10px rgba(0,255,128,0.4);
}

.client-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    min-width: 0;
}
.client-label {
    font-size: 11px;
    color: var(--text-dim);
    line-height: 1.2;
}
.client-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.3;
    word-break: break-all;
}

/* меню в стиле iPhone */
.quick-menu {
    width: 100%;
    margin-bottom: 16px;
    animation: fadeCard 0.5s ease both;
    animation-delay: 0.1s;
}

.quick-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* состояние до появления. потом main.js добавит класс .show */
.qm-tile {
    appearance: none;
    border: 0;
    background: none;
    padding: 0;
    cursor: pointer;

    border-radius: 20px;
    position: relative;
    overflow: hidden;

    background: rgba(15,15,15,0.6);
    box-shadow:
        0 20px 60px rgba(0,0,0,0.9),
        0 0 16px rgba(122,255,0,0.15);
    border: 1px solid rgba(122,255,0,0.25);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    width: 100%;
    min-height: 100px;

    display: flex;
    align-items: stretch;
    justify-content: stretch;

    transition:
        transform 0.12s ease,
        box-shadow 0.12s ease,
        opacity 0.3s ease;

    /* стартовое состояние: невидимо и ниже */
    opacity: 0;
    transform: translateY(20px) scale(0.96);
}

/* конечное состояние: видно */
.qm-tile.show {
    animation: fadeUp 0.4s ease forwards;
}

.qm-tile:active {
    transform: scale(0.97);
}

.qm-inner {
    flex: 1;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    width: 100%;
    min-width: 0;
}

.qm-icon {
    font-size: 20px;
    line-height: 1;
    margin-bottom: 8px;
    color: var(--accent);
    text-shadow: 0 0 8px rgba(122,255,0,0.6);
    transition: filter 0.15s ease;
}

.qm-label {
    font-size: 13px;
    line-height: 1.3;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-word;
    text-shadow: 0 0 8px rgba(0,0,0,0.8);
    transition: color 0.15s ease, text-shadow 0.15s ease;
}

/* карточки */
.card {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-card);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.9);
    width: 100%;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fadeCard 0.5s ease both;
}

/* каждая карточка появится чуть позже предыдущей */
.card:nth-of-type(1) { animation-delay: 0.15s; }
.card:nth-of-type(2) { animation-delay: 0.2s; }
.card:nth-of-type(3) { animation-delay: 0.25s; }

.section-head {
    margin-bottom: 16px;
}
.section-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}
.section-sub {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
    line-height: 1.4;
}

/* список услуг */
.services-list {
    margin-bottom: 16px;
}

.service-row {
    background: rgba(0,0,0,0.6);
    border-radius: var(--radius-inner);
    padding: 12px;
    margin-bottom: 12px;
    font-size: 14px;
    border: 1px solid var(--border-color);
    width: 100%;
}

.service-topline {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.service-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.4;
    padding-right: 8px;
    word-break: break-word;
}
.service-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    flex-shrink: 0;
}
.service-desc {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.4;
    margin-top: 6px;
    word-break: break-word;
}

.service-checkline {
    margin-top: 10px;
    display: flex;
    align-items: center;
    font-size: 13px;
    color: var(--text-secondary);
    gap: 8px;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

/* итоговая сумма */
.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}
.total-label {
    color: var(--text-secondary);
}
.total-value {
    color: var(--accent);
}

/* форма записи */
.input-label {
    font-size: 12px;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 4px;
    line-height: 1.3;
}

.input {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 14px;
    border-radius: var(--radius-inner);
    border: 1px solid var(--border-color);
    background: rgba(0,0,0,0.6);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.3;
    outline: none;
}

.input::placeholder {
    color: var(--text-dim);
}

.main-btn {
    width: 100%;
    padding: 14px;
    border-radius: var(--radius-inner);
    border: none;
    background: var(--btn-bg);
    color: var(--btn-text);
    font-weight: 600;
    font-size: 15px;
    line-height: 1.3;
    cursor: pointer;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
    box-shadow: 0 0 16px rgba(122,255,0,0.4);
}
.main-btn:active {
    opacity: 0.8;
    transform: scale(0.98);
}

.book-result {
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.4;
    min-height: 18px;
    color: var(--success);
    word-break: break-word;
}

/* история */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-item {
    background: rgba(0,0,0,0.6);
    border-radius: var(--radius-inner);
    padding: 12px;
    border: 1px solid var(--border-color);
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-primary);
    width: 100%;
    word-break: break-word;
}

.history-top {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
}
.booking-id {
    color: var(--text-primary);
    margin-right: 8px;
}
.booking-time {
    color: var(--text-secondary);
    font-size: 12px;
}

.history-services {
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 999px;
    text-transform: uppercase;
    line-height: 1.2;
    background: rgba(122,255,0,0.12);
    color: var(--accent);
    border: 1px solid rgba(122,255,0,0.4);
}
.status-badge.in_progress {
    color: #ffd700;
    background: rgba(255,215,0,0.12);
    border-color: rgba(255,215,0,0.4);
}
.status-badge.ready {
    color: #00ff80;
    background: rgba(0,255,128,0.12);
    border-color: rgba(0,255,128,0.4);
}
.status-badge.done {
    color: #7fd3ff;
    background: rgba(0,128,255,0.12);
    border-color: rgba(0,128,255,0.4);
}
.status-badge.in_queue {
    color: #ffd700;
    background: rgba(255,215,0,0.12);
    border-color: rgba(255,215,0,0.4);
}

/* футер */
.footer {
    text-align: center;
    color: var(--text-secondary);
    font-size: 11px;
    padding: 24px 0 40px;
    line-height: 1.4;
    width: 100%;
}
.footer-note {
    color: var(--text-secondary);
}

/* адаптация для очень узких экранов */
@media (max-width: 360px) {
    .brand-logo {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }
    .brand-name {
        font-size: 14px;
    }
    .brand-tag {
        font-size: 11px;
    }
    .client-value {
        font-size: 13px;
        word-break: break-all;
    }
    .main-btn {
        font-size: 14px;
        padding: 12px;
    }
    .qm-tile {
        min-height: 90px;
        border-radius: 16px;
    }
    .qm-icon {
        font-size: 18px;
    }
    .qm-label {
        font-size: 12px;
    }
}
