:root {
    --primary: #0B1F3A;
    --secondary: #FFFFFF;
    --accent: #2563EB;
    --bg: #f4f7fb;
    --surface: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --stroke: #dbe4f0;
    --success: #059669;
    --danger: #dc2626;
    --shadow: 0 18px 36px rgba(11, 31, 58, 0.1);
    --card-padding: 13px;
    --card-gap: 8px;
    --icon-size: 23px;
    --radius: 16px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    font-family: "Plus Jakarta Sans", sans-serif;
    background: radial-gradient(circle at 12% 8%, #fdfefe 0%, #e9f0f9 55%, #dfe8f4 100%);
    color: var(--text);
    transition: background-color 300ms ease, color 300ms ease;
}

body.theme-transition,
body.theme-transition * {
    transition: background-color 300ms ease, color 300ms ease, border-color 300ms ease, opacity 300ms ease;
}

body {
    display: flex;
    justify-content: center;
}

.app-wrapper {
    width: min(100%, 480px);
    height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    background: transparent;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    padding-left: var(--safe-left);
    padding-right: var(--safe-right);
}

.content-area {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    position: relative;
}

.view {
    display: none;
    height: 100%;
    padding: calc(20px + var(--safe-top)) 18px calc(94px + var(--safe-bottom));
}

.view.active {
    display: block;
}

.scrollable {
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.scrollable::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.brand-name {
    font-family: "Belleza", sans-serif;
    text-transform: lowercase;
    letter-spacing: 0.06em;
}

.splash-logo {
    font-family: "Belleza", sans-serif;
    text-transform: lowercase;
    letter-spacing: 0.06em;
    font-size: 2.4rem;
    color: var(--primary);
}

.brand-name {
    margin: 0;
    font-size: 2rem;
    color: var(--primary);
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid var(--stroke);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface) 86%, transparent);
}

.status-indicator .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8;
}

.status-indicator.open .dot {
    background: var(--success);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 20%, transparent);
}

.status-indicator.closed .dot {
    background: var(--danger);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 20%, transparent);
}

.status-indicator .label {
    font-size: 0.74rem;
    color: var(--muted);
    white-space: nowrap;
}

.hours-message {
    border: 1px solid var(--stroke);
    border-radius: 14px;
    padding: 11px 12px;
    margin-bottom: 14px;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    box-shadow: var(--shadow);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.hours-message.hidden {
    display: none;
}

.hours-message-copy strong {
    display: block;
    margin-bottom: 3px;
    font-size: 0.84rem;
}

.hours-message-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.38;
}

.hours-message-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hours-follow-btn {
    border: none;
    background: transparent;
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    white-space: nowrap;
    padding: 2px 0;
}

.hours-close-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid var(--stroke);
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    color: var(--muted);
    display: grid;
    place-items: center;
    cursor: pointer;
}

.section-label {
    font-weight: 700;
    letter-spacing: 0.08em;
    font-size: 0.72rem;
    color: var(--muted);
    margin: 8px 2px 10px;
}

.home-content {
    position: relative;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--card-gap);
}

.svc-card {
    background: color-mix(in srgb, var(--surface) 93%, transparent);
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
    padding: var(--card-padding);
    min-height: 122px;
    box-shadow: var(--shadow);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
    cursor: pointer;
}

.svc-card:active {
    transform: translateY(1px);
}

.icon-box {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    color: var(--accent);
}

.icon-box i {
    font-size: var(--icon-size);
}

.svc-info h3 {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.2;
}

.badge {
    margin-top: 6px;
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 999px;
}

.badge.available {
    background: color-mix(in srgb, var(--success) 14%, transparent);
    color: var(--success);
}

.locked {
    opacity: 0.84;
}

.locked .icon-box {
    background: color-mix(in srgb, #94a3b8 20%, transparent);
    color: #64748b;
}

.locked-badge {
    background: color-mix(in srgb, #64748b 17%, transparent);
    color: #475569;
}

.lock-icon {
    position: absolute;
    right: 12px;
    top: 10px;
    font-size: 0.8rem;
    color: #64748b;
}

.svc-card.shake {
    animation: lockShake 240ms ease;
}

@keyframes lockShake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    50% { transform: translateX(4px); }
    75% { transform: translateX(-2px); }
    100% { transform: translateX(0); }
}

.primary-btn,
.ghost-btn {
    border: none;
    border-radius: 12px;
    width: 100%;
    padding: 12px 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
}

.primary-btn {
    background: linear-gradient(120deg, var(--primary), var(--accent));
    color: #fff;
}

.ghost-btn {
    background: transparent;
    border: 1px solid var(--stroke);
    color: var(--muted);
}

.view-heading {
    margin: 2px 0 14px;
    font-size: 1.12rem;
}

.action-card {
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    border: 1px solid var(--stroke);
    border-radius: 16px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    box-shadow: var(--shadow);
    cursor: pointer;
}

.icon-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1rem;
}

.wa-bg { background: rgba(16, 185, 129, 0.16); color: #059669; }
.gray-bg { background: rgba(148, 163, 184, 0.2); color: #475569; }

.icon-yellow { color: #d97706; }
.icon-indigo { color: #4338ca; }
.icon-green { color: #059669; }
.icon-pink { color: #db2777; }

.online-status,
.sub-label,
.center-note {
    margin: 0;
    color: var(--muted);
    font-size: 0.78rem;
}

.support-live-badge {
    margin-left: auto;
    margin-right: 6px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 4px 7px;
    border: 1px solid transparent;
}

.support-live-badge.online {
    color: #047857;
    background: rgba(16, 185, 129, 0.16);
    border-color: rgba(5, 150, 105, 0.25);
}

.support-live-badge.offline {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(220, 38, 38, 0.26);
}

.support-quote {
    margin: 6px 2px 10px;
    font-size: 0.76rem;
    color: var(--muted);
    text-align: center;
}

.card-content h3 {
    margin: 0 0 2px;
    font-size: 0.95rem;
}

.arrow { margin-left: auto; color: var(--muted); }

.settings-container {
    padding-bottom: 14px;
}

.settings-group {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.settings-item {
    border: 1px solid var(--stroke);
    border-radius: 14px;
    padding: 12px;
    display: flex;
    gap: 10px;
    align-items: center;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    box-shadow: var(--shadow);
    cursor: pointer;
}

.settings-item.active {
    border-color: color-mix(in srgb, var(--accent) 50%, var(--stroke));
}

.radio-indicator {
    margin-left: auto;
    width: 16px;
    height: 16px;
    border: 1px solid var(--stroke);
    border-radius: 50%;
    position: relative;
}

.settings-item.active .radio-indicator::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--accent);
}

.item-text-stack {
    display: flex;
    flex-direction: column;
}

.item-text-stack small {
    color: var(--muted);
}

.copyright {
    text-align: center;
    color: var(--muted);
    font-size: 0.74rem;
    margin-top: 10px;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6, 11, 20, 0.44);
    display: none;
    align-items: flex-end;
    z-index: 20;
}

.modal-overlay.active {
    display: flex;
}

.modal-sheet {
    width: min(100%, 480px);
    margin-inline: auto;
    background: var(--surface);
    border-top-left-radius: 22px;
    border-top-right-radius: 22px;
    padding: 12px 16px 18px;
    box-shadow: 0 -12px 30px rgba(2, 6, 23, 0.24);
    max-height: 89dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scroll-padding-bottom: 120px;
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--muted) 55%, transparent) transparent;
    scrollbar-gutter: stable;
}

.modal-sheet::-webkit-scrollbar {
    width: 8px;
}

.modal-sheet::-webkit-scrollbar-track {
    background: transparent;
}

.modal-sheet::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: color-mix(in srgb, var(--muted) 52%, transparent);
}

.modal-sheet::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, var(--muted) 72%, transparent);
}

.sheet-handle {
    width: 58px;
    height: 5px;
    border-radius: 999px;
    background: #cbd5e1;
    margin: 4px auto 12px;
}

.modal-sheet h2 {
    margin: 2px 0 14px;
}

.input-stack {
    display: grid;
    gap: 10px;
    padding-bottom: 8px;
}

.booking-actions {
    position: sticky;
    bottom: max(0px, var(--safe-bottom));
    display: grid;
    gap: 10px;
    margin-top: 4px;
    padding-top: 10px;
    padding-bottom: 4px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), color-mix(in srgb, var(--surface) 98%, transparent) 22%);
    z-index: 1;
}

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

.input-box {
    display: grid;
    gap: 6px;
}

.input-box label {
    font-size: 0.72rem;
    letter-spacing: 0.07em;
    color: var(--muted);
    font-weight: 700;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--stroke);
    border-radius: 10px;
    padding: 10px;
    font-family: inherit;
    font-size: 0.92rem;
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    color: var(--text);
    outline: none;
}

input:focus,
textarea:focus,
select:focus {
    border-color: color-mix(in srgb, var(--accent) 55%, var(--stroke));
}

.tab-bar {
    position: fixed;
    left: 50%;
    width: min(calc(100vw - 24px), 456px);
    transform: translateX(-50%);
    bottom: 0;
    height: calc(74px + var(--safe-bottom));
    padding: 8px 8px calc(8px + var(--safe-bottom));
    border: 1px solid color-mix(in srgb, var(--stroke) 65%, transparent);
    border-radius: 24px 24px 0 0;
    background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, transparent), color-mix(in srgb, var(--surface) 86%, transparent));
    backdrop-filter: blur(14px);
    display: flex;
    gap: 8px;
    box-shadow: 0 -10px 34px rgba(8, 16, 34, 0.2);
    overflow: hidden;
    z-index: 12;
}

.tab-item {
    border-radius: 14px;
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    text-align: center;
    color: var(--muted);
    cursor: pointer;
    font-size: 0.74rem;
    position: relative;
    z-index: 2;
    transition: color 220ms ease, transform 220ms ease;
    user-select: none;
}

.tab-item i {
    font-size: 1.05rem;
    transition: transform 220ms ease;
}

.tab-item span {
    transition: opacity 220ms ease, transform 220ms ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tab-item.active {
    color: var(--accent);
    transform: translateY(-1px);
}

.tab-item.active i {
    transform: translateY(-1px) scale(1.03);
}

.tab-item.active span {
    transform: translateY(-1px);
}

.tab-glider {
    position: absolute;
    top: 8px;
    left: 8px;
    height: 58px;
    width: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 26%, transparent), color-mix(in srgb, var(--accent) 10%, transparent));
    border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.2);
    z-index: 1;
    pointer-events: none;
    transform: translateX(0);
    transition: transform 320ms cubic-bezier(0.2, 0.9, 0.2, 1), width 260ms ease;
}

.splash-screen {
    position: fixed;
    inset: 0;
    background: linear-gradient(145deg, #f5f8fd, #e0e9f7);
    display: grid;
    place-items: center;
    z-index: 50;
    align-content: center;
    gap: 14px;
    transition: opacity 450ms ease;
}

.splash-loader {
    width: 160px;
    height: 3px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.28);
    position: relative;
}

.splash-loader::after {
    content: "";
    position: absolute;
    left: -50%;
    width: 50%;
    top: 0;
    bottom: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    animation: lineLoad 1.05s linear infinite;
}

@keyframes lineLoad {
    to { transform: translateX(320%); }
}

.splash-screen.hide {
    opacity: 0;
    pointer-events: none;
}

@media (min-width: 920px) {
    body {
        padding: 24px;
        align-items: center;
    }

    .app-wrapper {
        width: min(100%, 1120px);
        height: calc(100vh - 48px);
        min-height: 700px;
        border-radius: 28px;
        border: 1px solid color-mix(in srgb, var(--stroke) 72%, transparent);
        background: color-mix(in srgb, var(--surface) 88%, transparent);
        box-shadow: 0 34px 58px rgba(8, 16, 34, 0.18);
        backdrop-filter: blur(8px);
    }

    .view {
        padding: calc(28px + var(--safe-top)) 24px calc(110px + var(--safe-bottom));
    }

    .home-content {
        max-width: 1000px;
    }

    .service-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
    }

    .modal-sheet {
        width: min(100%, 620px);
    }

    .tab-bar {
        width: min(calc(100vw - 96px), 1072px);
        bottom: 20px;
        border-radius: 20px;
    }
}

@media (max-width: 360px) {
    .view {
        padding-inline: 12px;
    }

    .tab-bar {
        width: min(calc(100vw - 16px), 464px);
        gap: 4px;
    }

    .tab-item {
        font-size: 0.68rem;
    }

    .svc-info h3 {
        font-size: 0.88rem;
    }

    .input-row {
        grid-template-columns: 1fr;
    }
}
