:root {
    --bg: #f6f2eb;
    --panel: rgba(255, 255, 255, 0.82);
    --text: #1f2933;
    --muted: #68727d;
    --line: rgba(31, 41, 51, 0.1);
    --brand: #0f766e;
    --brand-deep: #115e59;
    --danger: #b91c1c;
    --success: #166534;
    --shadow: 0 24px 60px rgba(31, 41, 51, 0.09);
    --radius: 24px;
    --font: "Segoe UI", "IBM Plex Sans Arabic", "Tahoma", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    color: var(--text);
}

button,
input,
select,
textarea {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

.page-shell {
    width: min(1180px, calc(100% - 28px));
    margin: 0 auto;
    padding: 24px 0 48px;
}

.site-bar,
.top-actions,
.section-head,
.share-row,
.booking-head,
.booking-actions,
.detail-list,
.hours-mini,
.booking-meta,
.ai-buttons {
    display: flex;
    gap: 12px;
}

.site-bar,
.section-head,
.share-row,
.booking-head,
.booking-actions {
    justify-content: space-between;
    align-items: center;
}

.top-actions,
.detail-list,
.hours-mini,
.booking-meta,
.ai-buttons {
    flex-wrap: wrap;
}

.site-bar {
    margin-bottom: 20px;
}

.eyebrow,
.meta-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
}

.brand-title {
    font-size: 1.2rem;
    font-weight: 800;
}

.ghost-link,
.lang-link,
.button-link {
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.65);
}

.panel,
.stat-card,
.flash {
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.panel {
    padding: 22px;
}

.flash {
    padding: 14px 18px;
    margin-bottom: 20px;
}

.flash.success {
    color: var(--success);
}

.flash.error {
    color: var(--danger);
}

.section-head {
    margin-bottom: 14px;
}

.section-head h2,
.section-head h1 {
    margin: 0;
}

.muted {
    color: var(--muted);
}

.pill {
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(15, 118, 110, 0.08);
    border: 1px solid rgba(15, 118, 110, 0.12);
    font-weight: 600;
}

.code-block,
.ai-result {
    border-radius: 16px;
    padding: 14px;
    background: rgba(31, 41, 51, 0.04);
    border: 1px solid rgba(31, 41, 51, 0.08);
    word-break: break-word;
    white-space: pre-wrap;
}

.ai-result:empty {
    display: none;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.stacked-form,
label {
    display: grid;
    gap: 8px;
}

.compact-form {
    margin-top: 18px;
}

.full-row {
    grid-column: 1 / -1;
}

label span,
.field-label {
    font-size: 0.92rem;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--text);
}

textarea {
    resize: vertical;
}

button,
.button-link {
    border: 0;
    border-radius: 14px;
    padding: 12px 16px;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(135deg, var(--brand), var(--brand-deep));
    color: white;
}

button.secondary,
.button-link {
    background: rgba(15, 118, 110, 0.08);
    color: var(--brand-deep);
    border: 1px solid rgba(15, 118, 110, 0.12);
}

button.danger {
    background: rgba(185, 28, 28, 0.1);
    color: var(--danger);
    border: 1px solid rgba(185, 28, 28, 0.12);
}

.button-link.disabled {
    pointer-events: none;
    opacity: 0.5;
}

.form-actions {
    display: flex;
    justify-content: flex-start;
}

.slot-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.slot-button {
    background: rgba(15, 118, 110, 0.08);
    color: var(--brand-deep);
    border: 1px solid rgba(15, 118, 110, 0.12);
}

.slot-button.active {
    background: linear-gradient(135deg, var(--brand), var(--brand-deep));
    color: white;
}

.detail-list,
.hours-mini {
    display: grid;
    gap: 12px;
}

.detail-list div,
.hours-mini div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.detail-list div:last-child,
.hours-mini div:last-child {
    border-bottom: 0;
}

.stats-grid {
    display: grid;
    gap: 18px;
    margin-bottom: 18px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stat-card span {
    color: var(--muted);
}

.stat-card strong {
    font-size: 2rem;
}

.chips,
.booking-list {
    display: grid;
    gap: 14px;
}

.chip-card,
.booking-card {
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--line);
}

.chip-card {
    display: grid;
    gap: 10px;
    align-items: center;
    grid-template-columns: 1fr auto;
}

.chip-card span,
.booking-meta span {
    color: var(--muted);
    font-size: 0.92rem;
}

.hours-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
}

.hour-row {
    display: grid;
    gap: 10px;
    align-items: center;
    grid-template-columns: 1.2fr auto 1fr 1fr;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--line);
}

.toggle-line {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-line input {
    width: auto;
}

.booking-note {
    margin: 0 0 12px;
    color: var(--muted);
}

.inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
}

.badge-pending {
    color: #9a3412;
    background: rgba(251, 146, 60, 0.18);
}

.badge-confirmed {
    color: #166534;
    background: rgba(34, 197, 94, 0.18);
}

.badge-cancelled {
    color: #991b1b;
    background: rgba(239, 68, 68, 0.16);
}

.badge-completed {
    color: #1d4ed8;
    background: rgba(59, 130, 246, 0.14);
}

@media (max-width: 980px) {
    .site-bar,
    .section-head,
    .share-row,
    .booking-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .form-grid,
    .hour-row,
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .page-shell {
        width: min(100% - 18px, 100%);
        padding-top: 18px;
    }

    .panel {
        padding: 18px;
        border-radius: 20px;
    }

    .chip-card {
        grid-template-columns: 1fr;
    }
}
