:root {
    --bg: #f7f7f9;
    --surface: #ffffff;
    --surface-soft: #f1f2f5;
    --text: #17181b;
    --muted: #777b84;
    --border: #e6e7eb;
    --primary: #18191c;
    --danger: #b42318;
    --radius: 20px;
    --shadow:
        0 8px 28px
        rgba(20, 20, 20, 0.07);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family:
        Tahoma,
        Arial,
        sans-serif;
}

body {
    padding-bottom: 92px;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.app-shell {
    width: min(
        100%,
        720px
    );

    margin: 0 auto;
    min-height: 100vh;
}

.topbar {
    padding:
        22px
        18px
        12px;

    background:
        rgba(
            247,
            247,
            249,
            0.96
        );

    position: sticky;
    top: 0;
    z-index: 10;

    backdrop-filter:
        blur(12px);
}

.brand-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.brand {
    font-size: 23px;
    font-weight: 800;
    letter-spacing: -0.7px;
}

.city {
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
}

.icon-button {
    border: 0;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow);
    display: grid;
    place-items: center;
}

.content {
    padding:
        10px
        18px
        30px;
}

.hero {
    padding:
        18px 0 16px;
}

.hero h1 {
    margin: 0;
    max-width: 520px;
    font-size: 28px;
    line-height: 1.55;
    letter-spacing: -1px;
}

.hero p {
    margin:
        8px
        0
        0;

    color: var(--muted);
    line-height: 1.9;
    font-size: 14px;
}

.search-box {
    margin-top: 19px;
    display: flex;
    gap: 10px;
}

.search-box input {
    width: 100%;
    height: 54px;

    border:
        1px
        solid
        var(--border);

    border-radius: 18px;
    background: var(--surface);

    padding:
        0
        17px;

    outline: none;

    transition:
        border-color .15s,
        box-shadow .15s;
}

.search-box input:focus {
    border-color: #aeb1b8;

    box-shadow:
        0 0 0 4px
        rgba(
            50,
            50,
            60,
            .05
        );
}

.search-button {
    min-width: 54px;
    height: 54px;
    border: 0;
    border-radius: 18px;
    background: var(--primary);
    color: white;
    font-size: 20px;
}

.section {
    margin-top: 22px;
}

.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 11px;
}

.section-title {
    font-weight: 800;
    font-size: 17px;
}

.section-note {
    color: var(--muted);
    font-size: 12px;
}

.card {
    background: var(--surface);

    border:
        1px
        solid
        var(--border);

    border-radius: var(--radius);

    padding: 16px;

    box-shadow:
        0 3px 18px
        rgba(
            20,
            20,
            20,
            .035
        );
}

.card + .card {
    margin-top: 10px;
}

.specialist-card {
    display: flex;
    align-items: center;
    gap: 13px;
}

.avatar {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    border-radius: 18px;
    background: var(--surface-soft);
    display: grid;
    place-items: center;
    font-size: 21px;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.specialist-main {
    flex: 1;
    min-width: 0;
}

.specialist-name {
    font-size: 15px;
    font-weight: 800;
}

.specialist-meta {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.7;
}

.chevron {
    color: #a1a4aa;
    font-size: 20px;
}

.empty-state {
    text-align: center;
    padding:
        36px
        20px;

    color: var(--muted);
}

.empty-icon {
    width: 62px;
    height: 62px;
    margin: 0 auto 13px;
    border-radius: 22px;
    background: var(--surface-soft);
    display: grid;
    place-items: center;
    font-size: 27px;
}

.loading {
    padding: 32px;
    color: var(--muted);
    text-align: center;
}

.error-box {
    background: #fff3f1;
    color: var(--danger);
    border-radius: 16px;
    padding: 13px 15px;
    line-height: 1.8;
    font-size: 13px;
    margin-top: 12px;
}

.bottom-nav {
    position: fixed;
    z-index: 20;

    bottom: 0;
    left: 50%;

    transform:
        translateX(-50%);

    width: min(
        100%,
        720px
    );

    height: 76px;

    background:
        rgba(
            255,
            255,
            255,
            .97
        );

    border-top:
        1px
        solid
        var(--border);

    display: grid;
    grid-template-columns:
        repeat(
            3,
            1fr
        );

    padding:
        7px
        11px
        env(
            safe-area-inset-bottom
        );

    backdrop-filter:
        blur(14px);
}

.nav-item {
    border: 0;
    background: transparent;
    color: #8a8d95;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 5px;
    font-size: 11px;
}

.nav-icon {
    font-size: 21px;
}

.nav-item.active {
    color: var(--text);
    font-weight: 800;
}

.auth-card {
    margin-top: 26px;
    text-align: center;
    padding: 27px 18px;
}

.auth-card h2 {
    margin:
        4px
        0
        7px;

    font-size: 20px;
}

.auth-card p {
    color: var(--muted);
    line-height: 1.9;
    font-size: 13px;
    margin:
        0
        0
        18px;
}

.primary-button {
    width: 100%;
    border: 0;
    height: 50px;
    border-radius: 16px;
    background: var(--primary);
    color: white;
    font-weight: 700;
}

.secondary-button {
    width: 100%;
    border:
        1px
        solid
        var(--border);

    height: 50px;
    border-radius: 16px;
    background: var(--surface);
    color: var(--text);
    font-weight: 700;
}

.page-title {
    font-size: 22px;
    font-weight: 850;
    margin:
        12px
        0
        5px;
}

.page-subtitle {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.8;
    margin-bottom: 18px;
}

.dev-badge {
    margin-top: 22px;
    text-align: center;
    color: #a0a3aa;
    font-size: 11px;
}

@media (
    min-width: 721px
) {
    body {
        padding-bottom: 105px;
    }

    .app-shell {
        border-left:
            1px
            solid
            var(--border);

        border-right:
            1px
            solid
            var(--border);
    }
}

/* =========================================================
   BOOKING FLOW V2
   ========================================================= */

.service-choice {
    width: 100%;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: right;
    transition:
        border-color .15s,
        transform .15s,
        box-shadow .15s;
}

.service-choice:active {
    transform: scale(.99);
}

.choice-selected {
    border-color: var(--text);
    box-shadow:
        0 0 0 2px
        rgba(20,20,20,.05);
}

.date-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding:
        2px
        1px
        8px;

    scrollbar-width: none;
}

.date-strip::-webkit-scrollbar {
    display: none;
}

.date-chip {
    flex: 0 0 auto;
    min-width: 94px;
    min-height: 46px;

    border:
        1px
        solid
        var(--border);

    border-radius: 15px;
    background: var(--surface);
    color: var(--text);
    padding: 8px 12px;
    font-size: 12px;
}

.date-selected {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.slot-grid {
    display: grid;
    grid-template-columns:
        repeat(3, 1fr);
    gap: 9px;
}

.slot-button {
    min-height: 46px;
    border:
        1px
        solid
        var(--border);

    border-radius: 14px;
    background: var(--surface);
    color: var(--text);
    font-weight: 700;
}

.slot-selected {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.review-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;

    padding:
        12px
        0;

    border-bottom:
        1px
        solid
        var(--border);

    font-size: 13px;
}

.review-row:last-child {
    border-bottom: 0;
}

.review-row span {
    color: var(--muted);
}

.review-row strong {
    text-align: left;
    font-weight: 800;
}


/* =========================================================
   CUSTOMER ACCOUNT V3
   ========================================================= */

.auth-pending-note {
    margin-top: 12px;
    color: var(--muted);
    font-size: 11px;
}

.segmented {
    display: grid;
    grid-template-columns:
        repeat(2, 1fr);

    padding: 4px;
    margin-bottom: 16px;

    border-radius: 16px;
    background: var(--surface-soft);
}

.segmented button {
    min-height: 42px;
    border: 0;
    border-radius: 13px;
    background: transparent;
    color: var(--muted);
}

.segmented .segment-active {
    background: var(--surface);
    color: var(--text);
    font-weight: 800;
    box-shadow:
        0 2px 10px
        rgba(20,20,20,.06);
}

.appointment-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.appointment-card {
    width: 100%;
    text-align: right;
    border: 1px solid var(--border);
}

.appointment-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.appointment-service {
    font-size: 15px;
    font-weight: 850;
}

.appointment-specialist {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

.appointment-status {
    height: fit-content;
    padding: 5px 8px;
    border-radius: 10px;
    background: var(--surface-soft);
    font-size: 10px;
    white-space: nowrap;
}

.appointment-info {
    margin-top: 14px;
    padding-top: 12px;

    border-top:
        1px
        solid
        var(--border);

    display: flex;
    flex-direction: column;
    gap: 7px;

    color: var(--muted);
    font-size: 12px;
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 13px;
}

.profile-avatar {
    width: 58px;
    height: 58px;

    display: grid;
    place-items: center;

    border-radius: 20px;
    background: var(--surface-soft);

    font-size: 25px;
}

.profile-name {
    font-size: 17px;
    font-weight: 850;
}

.field-label {
    display: block;
    margin-bottom: 7px;
    font-size: 12px;
    font-weight: 700;
}

.form-input {
    width: 100%;
    min-height: 50px;

    padding:
        0
        14px;

    border:
        1px
        solid
        var(--border);

    border-radius: 15px;
    outline: none;
    background: var(--surface);
}

.form-input:focus {
    border-color: #aeb1b8;

    box-shadow:
        0 0 0 4px
        rgba(50,50,60,.05);
}

.danger-text {
    color: var(--danger);
}

.notification-card {
    width: 100%;
    text-align: right;
    margin-bottom: 10px;
}

.notification-unread {
    border-color: #bfc1c7;
}

.notification-title {
    font-weight: 850;
    font-size: 14px;
}

.notification-body {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.9;
}


/* =========================================================
   SPECIALIST PANEL V4
   ========================================================= */

.specialist-content {
    padding-bottom: 105px;
}

.specialist-bottom-nav {
    grid-template-columns:
        repeat(4, 1fr);
}

.readiness-card {
    margin-bottom: 18px;
    border-color: #e4b9b5;
}

.readiness-ready {
    border-color: #b5d9c0;
}

.readiness-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.readiness-missing {
    margin-top: 10px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.9;
}

.panel-appointment {
    margin-bottom: 10px;
}

.row-actions {
    margin-top: 12px;
}

.compact-button {
    height: 40px;
}

.floating-actions {
    position: sticky;
    bottom: 18px;
    z-index: 7;

    display: grid;
    grid-template-columns:
        1fr 1fr;

    gap: 8px;
    margin-top: 18px;
}

.calendar-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.service-edit-form {
    margin-bottom: 10px;
}

.service-edit-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.switch-row {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
}

.working-day {
    margin-bottom: 9px;
}

.hour-row {
    display: grid;
    grid-template-columns:
        1fr auto 1fr;

    gap: 8px;
    align-items: center;
    margin-top: 10px;
}

.textarea-input {
    min-height: 100px;
    padding-top: 12px;
    resize: vertical;
}

.workplace-result {
    width: 100%;
    display: block;
    text-align: right;
    margin-bottom: 8px;
}

.block-card {
    margin-top: 9px;
}

.settings-link {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: right;
    margin-bottom: 9px;
}

/* NOBAT SPECIALIST V4.1 BEGIN */

.v41-profile-card {
    margin-bottom: 14px;
}

.v41-profile-main {
    display: flex;
    align-items: center;
    gap: 14px;
}

.v41-profile-avatar {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: rgba(0,0,0,.04);
    font-size: 29px;
}

.v41-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.v41-profile-copy {
    min-width: 0;
}

.v41-profile-name {
    font-weight: 900;
    font-size: 18px;
}

.v41-profile-handle {
    margin-top: 4px;
    direction: ltr;
    text-align: right;
    font-size: 13px;
    opacity: .68;
}

.v41-profile-phone {
    margin-top: 3px;
    direction: ltr;
    text-align: right;
    font-size: 12px;
    opacity: .55;
}

.v41-profile-bio {
    margin-top: 13px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    line-height: 1.9;
    opacity: .75;
}

.v41-section-title {
    font-size: 16px;
    font-weight: 900;
}

.v41-muted {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.8;
    opacity: .64;
}

.v41-ready-card,
.v41-readiness-card,
.v41-link-card,
.v41-edit-card {
    margin-bottom: 14px;
}

.v41-ready-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.v41-ready-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.05);
    font-weight: 900;
    flex: 0 0 auto;
}

.v41-ready-title {
    font-weight: 900;
}

.v41-ready-text {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.8;
    opacity: .65;
}

.v41-readiness-progress {
    margin-top: 5px;
    font-size: 12px;
    opacity: .62;
}

.v41-readiness-items {
    margin-top: 14px;
    display: grid;
    gap: 8px;
}

.v41-readiness-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-top: 1px solid var(--border);
}

.v41-readiness-status {
    width: 26px;
    height: 26px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.045);
    flex: 0 0 auto;
    font-weight: 900;
}

.v41-readiness-done {
    opacity: .65;
}

.v41-readiness-body {
    flex: 1 1 auto;
    min-width: 0;
}

.v41-readiness-name {
    font-weight: 800;
    font-size: 13px;
}

.v41-readiness-desc {
    margin-top: 2px;
    font-size: 11px;
    line-height: 1.7;
    opacity: .6;
}

.v41-small-action {
    flex: 0 0 auto;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--card);
    padding: 7px 10px;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.v41-direct-link {
    margin-top: 12px;
    padding: 11px;
    border-radius: 12px;
    background: rgba(0,0,0,.035);
    direction: ltr;
    text-align: left;
    overflow-wrap: anywhere;
    font-size: 11px;
    line-height: 1.7;
}

.v41-link-actions {
    margin-top: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.v41-edit-card .field-label {
    margin-top: 14px;
}

.v41-edit-card .field-label:first-of-type {
    margin-top: 12px;
}

.v41-edit-card .primary-button {
    margin-top: 16px;
}

.v41-bio {
    min-height: 100px;
    resize: vertical;
}

.v41-message {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 13px;
    background: rgba(0,0,0,.04);
    font-size: 13px;
    font-weight: 750;
    line-height: 1.8;
}

.v41-quick-section {
    margin-top: 18px;
}

.v41-quick-section .section-title {
    margin-bottom: 10px;
}

.v41-quick-section .settings-link {
    margin-bottom: 8px;
}

/* NOBAT SPECIALIST V4.1 END */

/* NOBAT SPECIALIST V4.2 BEGIN */

.v42-detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.v42-detail-card {
    margin-bottom: 12px;
}

.v42-detail-title {
    font-size: 16px;
    font-weight: 900;
    margin-bottom: 10px;
}

.v42-info-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 9px 0;
    border-top: 1px solid var(--border);
}

.v42-info-row:first-of-type {
    border-top: 0;
}

.v42-info-label {
    flex: 0 0 auto;
    font-size: 12px;
    opacity: .58;
}

.v42-info-value {
    min-width: 0;
    text-align: left;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.75;
    overflow-wrap: anywhere;
}

.v42-phone-button {
    display: block;
    text-align: center;
    text-decoration: none;
    margin-top: 12px;
}

.v42-help {
    margin-bottom: 14px;
    font-size: 12px;
    line-height: 1.9;
    opacity: .65;
}

.v42-detail-card .field-label {
    margin-top: 13px;
}

.v42-detail-card .primary-button {
    margin-top: 16px;
}

.v42-success-box {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 13px;
    background: rgba(0,0,0,.045);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.8;
}

.v42-cancel-button {
    width: 100%;
    margin-top: 6px;
}

.v42-readonly-note {
    font-size: 13px;
    line-height: 1.9;
    opacity: .68;
}

.v42-open-detail-button {
    margin-left: 6px;
}

/* NOBAT SPECIALIST V4.2 END */

/* =========================================================
   NOBAT NAKHON — SPECIALIST WORKING HOURS V4.3
   ========================================================= */

.working-day {
    display: grid;
    gap: 14px;
}

.working-day-disabled {
    opacity: 0.68;
}

.working-day-title {
    font-weight: 700;
}

.working-interval-list {
    display: grid;
    gap: 10px;
}

.working-interval-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
    padding: 12px;
    border: 1px solid rgba(127, 127, 127, 0.2);
    border-radius: 14px;
}

.working-time-field {
    display: grid;
    gap: 6px;
}

.working-time-field label {
    font-size: 0.82rem;
    opacity: 0.78;
}

.working-time-field input {
    width: 100%;
}

.working-interval-remove {
    min-height: 42px;
    padding: 0 12px;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
}

.working-hours-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.working-hours-actions button {
    flex: 1 1 180px;
}

@media (max-width: 640px) {
    .working-interval-row {
        grid-template-columns: 1fr 1fr;
    }

    .working-interval-remove {
        grid-column: 1 / -1;
    }
}


/* =========================================================
   NOBAT NAKHON — SPECIALIST DIRECT LINK QR V4.4
   ========================================================= */

.v44-qr-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.52);
    backdrop-filter: blur(3px);
}

.v44-qr-overlay[hidden] {
    display: none !important;
}

.v44-qr-modal {
    width: min(100%, 420px);
    max-height: calc(100vh - 40px);
    overflow: auto;
    padding: 20px;
    border-radius: 22px;
    background: var(--surface, #ffffff);
    color: var(--text, #161616);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
}

.v44-qr-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.v44-qr-title {
    font-size: 1.15rem;
    font-weight: 800;
}

.v44-qr-subtitle {
    margin-top: 6px;
    font-size: 0.9rem;
    line-height: 1.8;
    opacity: 0.72;
}

.v44-qr-close {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.v44-qr-code-wrap {
    display: grid;
    place-items: center;
    margin: 22px auto 16px;
    padding: 14px;
    width: fit-content;
    max-width: 100%;
    border-radius: 18px;
    background: #ffffff;
}

#v44QrCanvas {
    display: block;
    width: min(280px, 72vw);
    height: auto;
    max-width: 100%;
}

.v44-qr-link {
    direction: ltr;
    overflow-wrap: anywhere;
    padding: 12px;
    border-radius: 12px;
    text-align: left;
    font-size: 0.78rem;
    line-height: 1.6;
    background: rgba(127, 127, 127, 0.1);
}

.v44-qr-error {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.7;
}

.v44-qr-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
}

@media (max-width: 480px) {
    .v44-qr-actions {
        grid-template-columns: 1fr;
    }
}

