:root {
    --bg: #1f232c;
    --surface: #262b35;
    --surface-2: #303642;
    --text: #f7f8fb;
    --muted: #9da4b1;
    --line: rgba(255, 255, 255, 0.08);
    --primary: #ffcb05;
    --primary-2: #f0b800;
    --primary-soft: #3a3424;
    --accent: #ffcb05;
    --danger: #bf3d3d;
    --success: #32d583;
    --shadow: 0 18px 44px rgba(0, 0, 0, 0.26);
    --soft-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        linear-gradient(180deg, #fbf8ff 0%, var(--bg) 42%, #f4edff 100%);
    color: var(--text);
    font-family: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

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

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

.app-shell {
    width: min(1180px, 100%);
    min-height: 100vh;
    margin: 0 auto;
    padding: 20px;
}

.with-nav .app-shell {
    padding-bottom: 112px;
}

.auth-body {
    background:
        linear-gradient(135deg, rgba(124, 58, 237, 0.14), transparent 35%),
        linear-gradient(315deg, rgba(192, 38, 211, 0.12), transparent 32%),
        var(--bg);
}

.auth-body .app-shell {
    display: grid;
    place-items: center;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 25;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    padding: 14px;
    border: 1px solid rgba(230, 217, 248, 0.86);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 10px 28px rgba(76, 29, 149, 0.08);
    backdrop-filter: blur(18px);
}

.topbar-title {
    min-width: 150px;
}

.topbar h1,
.service-toolbar h2,
.summary-panel h2,
.settings-panel h2 {
    margin: 0;
    font-size: 28px;
    line-height: 1.1;
}

.topbar h1 {
    color: var(--primary-2);
}

.eyebrow,
.muted,
label span {
    color: var(--muted);
}

.eyebrow {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.muted {
    margin: 0 0 22px;
    line-height: 1.6;
}

.muted.compact {
    margin-bottom: 4px;
}

.avatar,
.brand-mark,
.icon-btn {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
}

.avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-weight: 800;
}

.topbar-location {
    position: relative;
    flex: 1;
    display: grid;
    justify-items: center;
    min-width: 0;
}

.location-display {
    width: min(520px, 100%);
    min-height: 46px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--text);
    padding: 0 13px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(76, 29, 149, 0.07);
    text-decoration: none;
}

.location-display span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 800;
    text-align: left;
}

.address-mobile {
    display: none !important;
}

.location-display i:first-child {
    color: var(--accent);
}

.location-display i:last-child {
    color: var(--muted);
    font-size: 13px;
}

.location-display.needs-location {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.14);
}

.checkout-hidden-form {
    display: none;
}

.location-required-note {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.4;
}

.auth-card,
.location-panel,
.summary-panel,
.profile-panel,
.settings-panel,
.order-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.service-card,
.checkout-item,
.review-panel,
.chat-header-panel,
.chat-composer,
.chat-messages {
    box-shadow: 0 10px 28px rgba(76, 29, 149, 0.08);
}

.auth-card {
    width: min(440px, 100%);
    padding: 30px;
}

.auth-card h1 {
    margin: 14px 0 8px;
    font-size: 30px;
}

.brand-mark {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 24px;
}

.stack-form,
.checkout-items,
.order-list,
.services-wrap.cards,
.settings-grid {
    display: grid;
    gap: 14px;
}

label {
    display: grid;
    gap: 7px;
    font-size: 14px;
    font-weight: 700;
}

input,
select {
    min-height: 46px;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    padding: 0 18px 0 13px;
    outline: none;
}

select {
    padding-right: 44px;
}

textarea {
    width: 100%;
    padding: 12px 44px 12px 13px;
}

input:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.16);
}

.two-col,
.field-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.field-row.tight {
    margin-top: 12px;
}

.quantity-row {
    display: grid;
    grid-template-columns: minmax(130px, 220px);
    gap: 12px;
}

.quantity-row.tight {
    margin-top: 12px;
}

.quantity-stepper {
    display: grid;
    grid-template-columns: 34px minmax(64px, 92px) 34px;
    align-items: center;
    gap: 8px;
}

.quantity-stepper .quantity-input {
    min-height: 38px;
    text-align: center;
    padding: 0 6px;
}

.quantity-limit {
    margin: 6px 0 0;
    color: var(--primary-2);
    font-size: 12px;
    font-weight: 800;
}

.qty-btn {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--primary-soft);
    color: var(--primary);
    cursor: pointer;
}

.qty-btn:hover {
    border-color: var(--primary);
}

.primary-btn,
.ghost-btn {
    min-height: 46px;
    border: 0;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 18px;
    cursor: pointer;
    font-weight: 800;
}

.primary-btn {
    background: var(--primary);
    color: #fff;
}

.primary-btn:hover {
    background: var(--primary-2);
}

.primary-btn.full {
    width: 100%;
}

.full-width {
    width: 100%;
}

.primary-btn:disabled {
    opacity: 0.68;
    cursor: wait;
}

.ghost-btn {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--primary-2);
}

.ghost-btn.is-disabled {
    opacity: 0.58;
    cursor: not-allowed;
    filter: grayscale(0.35);
}

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

.danger-primary {
    background: var(--danger);
}

.danger-primary:hover {
    background: #9f3030;
}

.small-btn {
    min-height: 38px;
    padding: 0 12px;
    font-size: 13px;
}

.checkout-remove-btn {
    aspect-ratio: 1;
    min-height: 40px;
    min-width: 40px;
    padding: 0;
}

.checkout-remove-btn i {
    font-size: 15px;
    line-height: 1;
}

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

.otp-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.otp-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--muted);
}

.divider::before,
.divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: var(--line);
}

.auth-switch {
    margin: 20px 0 0;
    color: var(--muted);
    text-align: center;
}

.auth-switch a {
    color: var(--primary);
    font-weight: 800;
}

.service-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.checkout-header-action {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 10px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--soft-shadow);
}

.checkout-selected-count {
    min-width: 96px;
    padding-left: 10px;
    font-weight: 900;
    white-space: nowrap;
}

.checkout-selected-count span:first-child {
    color: var(--primary);
    font-size: 20px;
}

.checkout-selected-count span + span {
    color: var(--muted);
    font-size: 13px;
}

.segmented {
    display: inline-flex;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.segmented a {
    width: 40px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    color: var(--muted);
}

.segmented a.selected {
    background: var(--primary);
    color: #fff;
}

.location-panel {
    display: grid;
    gap: 14px;
    padding: 16px;
    margin-bottom: 18px;
}

.address-page {
    width: 100%;
    max-width: none;
    margin: 0;
}

.address-head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
}

.address-head-title {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.address-head h2,
.address-head p {
    margin: 0;
    white-space: nowrap;
}

.address-form {
    width: 100%;
    margin-bottom: 0;
    box-shadow: none;
}

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

.address-required-note {
    grid-column: auto;
}

.address-map-panel .location-map {
    height: min(420px, 56vh);
}

.address-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    gap: 10px;
}

.map-panel {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--line);
}

.map-panel.is-hidden {
    display: none;
}

.location-map {
    height: 260px;
    background: var(--surface-2);
}

.order-location-map-panel {
    min-height: 260px;
    background: var(--surface-2);
}

.order-map-empty {
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
    padding: 12px 14px;
    color: var(--muted);
    font-weight: 800;
}

.map-locate {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 500;
}

.coverage-status {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: -2px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.coverage-status.is-ok {
    color: #15803d;
}

.coverage-status.is-error {
    color: #dc2626;
}

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

.service-card {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 13px;
    align-items: start;
    min-height: 152px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    cursor: pointer;
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.services-wrap.grid .service-card {
    grid-template-columns: 1fr auto;
}

.services-wrap.grid .service-photo,
.services-wrap.grid .service-copy {
    grid-column: 1 / -1;
}

.service-card.is-selected {
    border-color: var(--primary);
    box-shadow: 0 10px 24px rgba(124, 58, 237, 0.16);
}

.service-card.is-selected::after {
    content: "\f00c";
    position: absolute;
    top: 12px;
    left: 12px;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--primary);
    color: #111111;
    font-family: "Font Awesome 6 Free";
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.service-card:hover {
    transform: translateY(-2px);
}

.service-limit {
    display: inline-flex;
    width: fit-content;
    margin-top: 8px;
    padding: 5px 8px;
    border-radius: 8px;
    background: var(--primary-soft);
    color: var(--primary-2);
    font-size: 12px;
    font-weight: 800;
}

.service-check {
    position: absolute;
    width: 1px;
    height: 1px;
    min-height: 1px;
    opacity: 0;
    pointer-events: none;
}

.service-photo {
    position: relative;
    width: 92px;
    aspect-ratio: 4 / 3;
    margin-top: 22px;
    overflow: hidden;
    border-radius: 8px;
    background: var(--surface-2);
    box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.08);
}

.services-wrap.grid .service-photo {
    width: 100%;
    margin-top: 24px;
}

.service-photo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.service-photo-loading img {
    opacity: 0;
}

.service-image-loader {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: grid;
    place-items: center;
    gap: 8px;
    align-content: center;
    padding: 12px;
    background: linear-gradient(135deg, rgba(247, 243, 255, 0.98), rgba(255, 255, 255, 0.94));
    color: var(--primary-2);
    text-align: center;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.service-photo.is-loaded .service-image-loader {
    opacity: 0;
    visibility: hidden;
}

.service-image-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(124, 58, 237, 0.16);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: service-image-spin 0.85s linear infinite;
}

.service-image-bar {
    position: relative;
    width: min(112px, 80%);
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(124, 58, 237, 0.14);
}

.service-image-bar span {
    position: absolute;
    inset: 0 auto 0 0;
    width: 42%;
    border-radius: inherit;
    background: var(--primary);
    animation: service-image-progress 1.05s ease-in-out infinite;
}

.service-image-status {
    color: #4c1d95;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.2;
}

.service-photo.is-error .service-image-loader {
    background: #fff7ed;
    color: #b45309;
}

.service-photo.is-error .service-image-spinner,
.service-photo.is-error .service-image-bar {
    display: none;
}

.service-photo.is-error .service-image-status {
    color: #92400e;
}

@keyframes service-image-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes service-image-progress {
    0% {
        transform: translateX(-110%);
    }

    55% {
        transform: translateX(55%);
    }

    100% {
        transform: translateX(250%);
    }
}

.compact-photo {
    width: 86px;
    margin-top: 0;
}

.service-copy h3,
.checkout-copy h3 {
    margin: 0 0 7px;
    font-size: 18px;
    line-height: 1.2;
}

.service-copy p,
.checkout-copy p {
    margin: 0 0 12px;
    color: var(--muted);
    line-height: 1.45;
}

.service-copy strong span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.favorite-form {
    margin: 0;
}

.favorite-toggle {
    align-items: center;
    aspect-ratio: 1;
    display: inline-flex;
    justify-content: center;
    min-height: 40px;
    min-width: 40px;
    padding: 0;
    white-space: nowrap;
}

.favorite-toggle i {
    font-size: 17px;
    line-height: 1;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--muted);
    cursor: pointer;
}

.icon-btn.liked {
    color: var(--danger);
}

.checkout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
    align-items: start;
}

.review-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
    align-items: start;
}

.review-main {
    display: grid;
    gap: 14px;
}

.review-panel {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.review-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 14px;
}

.review-head h2 {
    margin: 0;
}

.review-location {
    margin-bottom: 0;
}

.review-fee {
    align-self: start;
    white-space: nowrap;
    color: var(--muted);
    font-weight: 800;
}

.checkout-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: start;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.checkout-item .service-photo {
    margin: 0;
}

.line-total {
    white-space: nowrap;
}

.summary-panel,
.settings-panel,
.profile-panel {
    padding: 18px;
}

.profile-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

.profile-avatar {
    width: 58px;
    height: 58px;
    font-size: 18px;
    box-shadow: 0 14px 28px rgba(124, 58, 237, 0.18);
}

.profile-identity h2,
.profile-identity p {
    margin: 0;
}

.profile-identity h2 {
    color: var(--text);
    font-size: 18px;
    font-weight: 900;
    line-height: 1.15;
}

.profile-identity p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.summary-panel {
    position: sticky;
    top: 20px;
}

.summary-location,
.cash-note,
.settings-row,
.order-foot {
    display: flex;
    align-items: center;
    gap: 12px;
}

.summary-location {
    margin: 16px 0;
    padding: 12px;
    border-radius: 8px;
    background: var(--surface-2);
}

.summary-location span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    line-height: 1.4;
}

.field-help {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
}

.field-help i {
    color: var(--primary-2);
}

.locked-field,
.locked-field:disabled,
.locked-field[readonly] {
    cursor: not-allowed;
    color: var(--muted);
    background: rgba(157, 164, 177, 0.08);
}

.security-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid rgba(255, 203, 5, 0.24);
    border-radius: 8px;
    background: rgba(255, 203, 5, 0.09);
    padding: 10px 12px;
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
}

.security-note i,
.security-row i {
    color: var(--primary-2);
}

dl {
    margin: 0 0 16px;
}

dl div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
}

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

dd {
    margin: 0;
    font-weight: 900;
}

.total-row {
    font-size: 20px;
}

.cash-note {
    margin-bottom: 16px;
    color: var(--success);
    font-weight: 800;
}

.order-card {
    padding: 16px;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.order-card:hover {
    border-color: rgba(124, 58, 237, 0.28);
    box-shadow: 0 16px 34px rgba(41, 31, 80, 0.10);
    transform: translateY(-1px);
}

.order-card:focus-visible {
    outline: 3px solid rgba(124, 58, 237, 0.24);
    outline-offset: 3px;
}

.order-head,
.order-items div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
}

.order-head {
    align-items: start;
    margin-bottom: 14px;
}

.order-head h2 {
    margin: 0 0 3px;
    font-size: 18px;
}

.order-head span,
.order-items span,
.order-foot span {
    color: var(--muted);
}

.order-items {
    display: grid;
    gap: 9px;
    padding: 12px 0;
    border-block: 1px solid var(--line);
}

.order-foot {
    justify-content: space-between;
    margin-top: 13px;
}

.order-actions {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.order-detail-head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
}

.order-detail-head-title {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.order-detail-head-title h2,
.order-detail-head-title p,
.order-detail-head-title span {
    margin: 0;
    white-space: nowrap;
}

.order-detail-head-title h2 {
    min-width: 0;
}

.order-detail-date {
    color: var(--muted);
}

.date-mobile {
    display: none;
}

.order-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
    gap: 16px;
}

.order-detail-main {
    min-width: 0;
}

.order-detail-panel {
    display: grid;
    gap: 14px;
}

.order-detail-panel h3,
.order-detail-summary h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 900;
    color: var(--primary-2);
}

.order-detail-items {
    display: grid;
    gap: 10px;
}

.order-detail-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.order-detail-item-main {
    min-width: 0;
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
}

.order-detail-photo {
    width: 88px;
    margin-top: 0;
    align-self: start;
}

.order-detail-item-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.order-detail-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.order-detail-item-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.order-detail-item span {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.order-detail-item > strong {
    flex: 0 0 auto;
    color: var(--primary-2);
}

.order-detail-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.order-overflow {
    position: relative;
    flex: 0 0 auto;
}

.order-chat-button,
.order-menu-toggle {
    height: 36px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
}

.order-chat-button {
    min-width: 74px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 900;
    text-decoration: none;
}

.order-menu-toggle {
    width: 36px;
}

.order-chat-button:hover,
.order-menu-toggle:hover {
    border-color: rgba(124, 58, 237, 0.28);
    background: var(--primary-soft);
    color: var(--primary-strong);
}

.order-menu {
    position: absolute;
    z-index: 30;
    top: calc(100% + 8px);
    right: 0;
    min-width: 168px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 18px 44px rgba(31, 35, 44, 0.16);
}

.order-menu.is-hidden {
    display: none;
}

.order-menu a,
.order-menu button {
    width: 100%;
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    padding: 8px 10px;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.order-menu a:hover,
.order-menu button:hover {
    background: var(--primary-soft);
    color: var(--primary-strong);
}

.order-menu .danger-menu-item {
    color: var(--danger);
}

.order-menu .danger-menu-item:hover {
    background: rgba(191, 61, 61, 0.10);
    color: var(--danger);
}

.address-line {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.address-line .address-text {
    min-width: 0;
}

.order-address-line {
    align-items: flex-start;
    flex: 1 1 auto;
    line-height: 1.4;
}

.order-address-line .address-text,
.order-address-line .address-full,
.order-address-line .address-mobile {
    min-width: 0;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
}

.order-address-line i {
    flex: 0 0 auto;
    margin-top: 2px;
}

.cancel-order-form,
.cancel-reason,
.feedback-order-form,
.feedback-note {
    display: grid;
    gap: 12px;
    margin-top: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff9f9;
}

.cancel-order-form.is-hidden,
.feedback-order-form.is-hidden {
    display: none;
}

.cancel-order-form textarea,
.feedback-order-form textarea {
    width: 100%;
    min-height: 92px;
    resize: vertical;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 44px 12px 13px;
    outline: none;
}

.cancel-reason-template,
.feedback-template {
    margin-bottom: 10px;
}

.cancel-order-form textarea:focus {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(191, 61, 61, 0.14);
}

.feedback-order-form {
    background: var(--primary-soft);
}

.feedback-rating-field {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.feedback-rating-field legend {
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
}

.feedback-rating-options {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.feedback-rating-option {
    position: relative;
    --rating-color: #f5b301;
    --rating-soft: rgba(245, 179, 1, 0.16);
    min-width: 0;
    min-height: 58px;
    display: grid;
    place-items: center;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
}

.feedback-rating-option:hover {
    border-color: var(--rating-color);
    background: var(--rating-soft);
}

.feedback-rating-5 {
    --rating-color: #ffcb05;
    --rating-soft: rgba(255, 203, 5, 0.18);
}

.feedback-rating-4 {
    --rating-color: #f59e0b;
    --rating-soft: rgba(245, 158, 11, 0.16);
}

.feedback-rating-3 {
    --rating-color: #22c55e;
    --rating-soft: rgba(34, 197, 94, 0.14);
}

.feedback-rating-2 {
    --rating-color: #f97316;
    --rating-soft: rgba(249, 115, 22, 0.14);
}

.feedback-rating-1 {
    --rating-color: #ef4444;
    --rating-soft: rgba(239, 68, 68, 0.13);
}

.feedback-rating-option input {
    position: absolute;
    width: 1px;
    min-height: 0;
    height: 1px;
    margin: 0;
    padding: 0;
    opacity: 0;
    pointer-events: none;
}

.feedback-rating-option .feedback-rating-stars {
    display: inline-flex;
    gap: 2px;
    color: var(--rating-color);
    font-size: 13px;
    filter: drop-shadow(0 1px 0 rgba(17, 17, 17, 0.08));
}

.feedback-rating-option small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
}

.feedback-rating-option:has(input:checked) {
    border-color: var(--rating-color);
    background: var(--rating-soft);
    color: var(--rating-color);
    box-shadow: inset 0 0 0 1px var(--rating-color);
}

.feedback-rating-option:has(input:checked) small {
    color: #22262f;
}

.feedback-template-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.feedback-template-grid button {
    min-height: 36px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    padding: 0 12px;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.feedback-template-grid button:hover,
.feedback-template-grid button.is-selected {
    border-color: var(--primary);
    background: rgba(255, 203, 5, 0.14);
    color: var(--primary);
}

.feedback-order-form textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.14);
}

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

.cancel-actions > *,
.feedback-actions > *,
.confirm-modal-actions > *,
.order-detail-actions > * {
    min-width: 0;
}

.cancel-actions > :only-child,
.feedback-actions > :only-child,
.confirm-modal-actions > :only-child,
.order-detail-actions > :only-child {
    grid-column: 1 / -1;
}

.cancel-reason,
.feedback-note {
    background: var(--surface-2);
}

.cancel-reason strong,
.cancel-reason p,
.feedback-note strong,
.feedback-note p {
    margin: 0;
}

.cancel-reason p,
.feedback-note p {
    color: var(--muted);
    line-height: 1.5;
}

.feedback-stars {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: #d4a90a;
    font-size: 14px;
    font-weight: 900;
}

.feedback-stars span {
    margin-left: 5px;
    color: var(--muted);
    font-size: 12px;
}

.order-card-stars {
    margin-top: 7px;
    display: flex;
}

.order-head .order-card-stars,
.order-head .order-card-stars i {
    color: #ffcb05;
}

.status-badge {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 5px 10px;
    background: var(--surface-2);
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
    text-transform: capitalize;
}

.status-completed {
    color: var(--success);
}

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

.status-badge-updated {
    animation: statusPulse 1.4s ease;
}

@keyframes statusPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 203, 5, 0.5);
        transform: translateY(0);
    }

    35% {
        box-shadow: 0 0 0 6px rgba(255, 203, 5, 0.12);
        transform: translateY(-1px);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 203, 5, 0);
        transform: translateY(0);
    }
}

.settings-grid {
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
}

.settings-row {
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.settings-row strong {
    text-align: right;
    overflow-wrap: anywhere;
}

.verify-email-form {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.danger-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 18px;
    color: var(--danger);
    font-weight: 900;
}

.empty-state {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 54px 20px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    background: var(--surface);
    text-align: center;
}

.empty-state i {
    color: var(--primary);
    font-size: 38px;
}

.empty-state h2,
.empty-state p {
    margin: 0;
}

.empty-state p {
    color: var(--muted);
}

.chat-page {
    display: grid;
    grid-template-rows: auto minmax(220px, calc(100vh - 300px)) auto;
    gap: 14px;
}

.chat-header-panel,
.chat-composer {
    display: grid;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.chat-header-panel {
    display: flex;
    justify-content: flex-start;
    gap: 14px;
}

.chat-header-title {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.chat-header-panel h2,
.chat-header-panel p,
.chat-header-panel span {
    margin: 0;
    white-space: nowrap;
}

.chat-header-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    text-transform: capitalize;
}

.chat-messages {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbf8ff;
}

.chat-bubble {
    width: min(72%, 560px);
    min-width: min(280px, 86vw);
    display: grid;
    gap: 6px;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.chat-bubble.mine {
    align-self: flex-end;
    border-color: rgba(124, 58, 237, 0.28);
    background: var(--primary-soft);
}

.chat-bubble.theirs {
    align-self: flex-start;
}

.chat-meta {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 12px;
}

.chat-meta span {
    min-width: 0;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-meta strong {
    color: var(--text);
}

.chat-bubble p {
    margin: 0;
    line-height: 1.38;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.chat-attachment {
    width: min(260px, 100%);
    max-height: 260px;
    display: block;
    border-radius: 8px;
    object-fit: cover;
}

.empty-chat {
    margin: auto;
    display: grid;
    justify-items: center;
    gap: 8px;
    color: var(--muted);
}

.empty-chat i {
    color: var(--primary);
    font-size: 34px;
}

.empty-chat p {
    margin: 0;
}

.chat-typing {
    min-height: 24px;
    display: flex;
    align-items: center;
    padding: 0 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.chat-typing[hidden] {
    display: none;
}

.chat-composer {
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.chat-composer textarea {
    width: 100%;
    min-height: 46px;
    max-height: 130px;
    resize: vertical;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 13px;
    outline: none;
}

.chat-composer textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.16);
}

.file-pill {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--muted);
    cursor: pointer;
}

.file-pill input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.send-btn {
    width: 46px;
    min-width: 46px;
    padding: 0;
}

.attachment-name {
    grid-column: 2 / -1;
    min-height: 18px;
    color: var(--muted);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bottom-nav {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 20;
    transform: translateX(-50%);
    width: min(620px, calc(100% - 32px));
    max-width: 620px;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 8px;
    border: 1px solid rgba(230, 217, 248, 0.94);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.bottom-nav a {
    display: grid;
    justify-items: center;
    gap: 4px;
    padding: 8px 4px;
    border-radius: 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.bottom-nav i {
    font-size: 17px;
}

.bottom-nav a.active {
    background: var(--primary-soft);
    color: var(--primary);
}

.toast-root {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 1000;
    display: grid;
    gap: 10px;
    width: min(360px, calc(100vw - 36px));
}

.toast {
    display: flex;
    align-items: start;
    gap: 11px;
    padding: 13px 14px;
    border-radius: 8px;
    background: #241b35;
    color: #fff;
    box-shadow: var(--shadow);
    animation: toast-in 0.22s ease;
}

.toast.action-toast {
    text-decoration: none;
    cursor: pointer;
}

.toast.action-toast:hover {
    filter: brightness(1.06);
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--danger);
}

.toast.info {
    background: var(--primary);
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(36, 27, 53, 0.42);
    backdrop-filter: blur(10px);
}

.modal-open {
    overflow: hidden;
}

.confirm-modal {
    width: min(420px, 100%);
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid rgba(230, 217, 248, 0.96);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(76, 29, 149, 0.22);
}

.confirm-modal-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 20px;
}

.confirm-modal-icon.danger {
    background: #fff0f0;
    color: var(--danger);
}

.confirm-modal h2,
.confirm-modal p {
    margin: 0;
}

.confirm-modal h2 {
    color: var(--text);
    font-size: 20px;
    font-weight: 900;
}

.confirm-modal p {
    margin-top: 6px;
    color: var(--muted);
    line-height: 1.5;
}

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

.terms-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1210;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(36, 27, 53, 0.48);
    backdrop-filter: blur(10px);
}

.terms-modal-backdrop.is-hidden {
    display: none;
}

.terms-modal {
    width: min(760px, 100%);
    max-height: min(86vh, 820px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
    border: 1px solid rgba(230, 217, 248, 0.96);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(76, 29, 149, 0.22);
    outline: none;
}

body.auth-body .terms-modal,
body.with-nav .terms-modal {
    border-color: var(--line);
    background: #262b35;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

.terms-modal-header,
.terms-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    background: #ffffff;
}

body.auth-body .terms-modal-header,
body.auth-body .terms-modal-footer,
body.with-nav .terms-modal-header,
body.with-nav .terms-modal-footer {
    background: #262b35;
}

.terms-modal-header {
    border-bottom: 1px solid rgba(230, 217, 248, 0.88);
}

body.auth-body .terms-modal-header,
body.with-nav .terms-modal-header {
    border-bottom-color: var(--line);
}

.terms-modal-footer {
    border-top: 1px solid rgba(230, 217, 248, 0.88);
}

body.auth-body .terms-modal-footer,
body.with-nav .terms-modal-footer {
    border-top-color: var(--line);
}

.terms-eyebrow {
    display: block;
    margin-bottom: 4px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.terms-modal h2,
.terms-modal h3,
.terms-modal p {
    margin: 0;
}

.terms-modal h2 {
    color: var(--text);
    font-size: 22px;
    font-weight: 900;
}

.terms-modal-header p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.terms-modal-body {
    overflow-y: auto;
    padding: 18px;
    color: var(--text);
}

.terms-modal-body h3 {
    margin-top: 22px;
    color: var(--text);
    font-size: 16px;
    font-weight: 900;
}

.terms-modal-body h3:first-of-type {
    margin-top: 18px;
}

.terms-modal-body p {
    margin-top: 12px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.72;
}

.terms-modal-footer {
    justify-content: flex-end;
}

.terms-modal-footer .small-btn {
    min-width: 116px;
}

/* Shared UI polish pass */
.content {
    animation: page-in 0.18s ease both;
}

@keyframes page-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.topbar,
.auth-card,
.service-card,
.checkout-item,
.review-panel,
.summary-panel,
.settings-panel,
.profile-panel,
.order-card,
.chat-header-panel,
.chat-composer,
.chat-messages,
.empty-state {
    border-color: rgba(233, 222, 250, 0.98);
    box-shadow: var(--soft-shadow);
}

.topbar {
    top: 10px;
}

.topbar h1,
.service-toolbar h2,
.summary-panel h2,
.review-head h2,
.settings-panel h2 {
    letter-spacing: 0;
}

.location-display,
input,
select,
textarea,
.primary-btn,
.ghost-btn,
.icon-btn,
.qty-btn,
.file-pill,
.service-limit,
.status-badge,
.confirm-modal {
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

input,
select,
textarea {
    font-weight: 700;
}

input::placeholder,
textarea::placeholder {
    color: #9b8bab;
}

.primary-btn:hover,
.ghost-btn:hover,
.icon-btn:hover,
.qty-btn:hover,
.file-pill:hover {
    transform: translateY(-1px);
}

.primary-btn:active,
.ghost-btn:active,
.icon-btn:active,
.qty-btn:active,
.file-pill:active {
    transform: translateY(0);
}

.service-toolbar {
    padding: 2px 2px 0;
}

.services-wrap.grid {
    gap: 16px;
}

.service-card {
    min-height: 100%;
    box-shadow: var(--soft-shadow);
}

.service-card:hover {
    border-color: rgba(124, 58, 237, 0.34);
    box-shadow: var(--shadow);
}

.service-card.is-selected {
    background: linear-gradient(180deg, #fff 0%, #fbf8ff 100%);
}

.service-check {
    border-radius: 7px;
    box-shadow: 0 2px 10px rgba(76, 29, 149, 0.1);
}

.service-copy {
    display: grid;
    align-content: start;
    gap: 8px;
}

.service-copy p,
.checkout-copy p {
    margin-bottom: 6px;
}

.checkout-grid,
.review-grid,
.settings-grid {
    gap: 20px;
}

.checkout-item {
    align-items: center;
}

.checkout-copy {
    min-width: 0;
}

.quantity-row.tight {
    grid-template-columns: repeat(2, minmax(118px, 220px));
    align-items: end;
}

.quantity-stepper {
    grid-template-columns: 36px minmax(58px, 88px) 36px;
}

.quantity-stepper .quantity-input,
.quantity-stepper .day-input {
    min-height: 38px;
    text-align: center;
    padding: 0 6px;
    font-weight: 900;
}

.summary-panel {
    top: 92px;
}

.summary-location,
.cash-note {
    align-items: flex-start;
}

.summary-location i,
.cash-note i {
    margin-top: 3px;
}

.order-card {
    display: grid;
    gap: 12px;
}

.order-foot {
    gap: 14px;
}

.order-actions {
    justify-content: flex-end;
}

.cancel-order-form,
.feedback-order-form,
.cancel-reason,
.feedback-note {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.52);
}

.chat-page {
    min-height: calc(100vh - 178px);
}

.chat-bubble.mine {
    color: var(--text);
}

.bottom-nav {
    border-radius: 8px;
    box-shadow: 0 18px 48px rgba(76, 29, 149, 0.18);
}

.bottom-nav a {
    position: relative;
    min-width: 0;
}

.bottom-nav a.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 10px 22px rgba(124, 58, 237, 0.22);
}

.bottom-nav a.active i {
    transform: translateY(-1px);
}

.toast {
    font-weight: 800;
}

.modal-backdrop {
    animation: modal-fade 0.16s ease both;
}

.confirm-modal {
    animation: modal-pop 0.18s ease both;
}

@keyframes modal-fade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modal-pop {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

@media (max-width: 980px) {
    .services-wrap.grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .checkout-grid,
    .review-grid,
    .settings-grid {
        grid-template-columns: 1fr;
    }

    .summary-panel {
        position: static;
    }

    .checkout-item {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .checkout-item .line-total {
        grid-column: 2;
        justify-self: start;
    }
}

@media (max-width: 640px) {
    .app-shell {
        padding: 12px 12px 14px;
    }

    .with-nav .app-shell {
        padding-bottom: 124px;
    }

    .topbar {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: start;
        top: 8px;
        margin-bottom: 16px;
        padding: 12px;
        border-radius: 8px;
    }

    .topbar-title {
        min-width: 0;
    }

    .topbar-location {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-items: stretch;
        order: 3;
    }

    .avatar {
        grid-column: 2;
        grid-row: 1;
    }

    .location-display {
        width: 100%;
    }

    .address-head {
        align-items: center;
        flex-direction: row;
        gap: 8px;
    }

    .address-head .ghost-btn {
        width: auto;
        min-height: 34px;
        padding-inline: 10px;
        font-size: 11px;
        white-space: nowrap;
    }

    .address-head-title {
        min-width: 0;
        flex: 1;
        gap: 7px;
    }

    .address-head-title p {
        font-size: 11px;
    }

    .address-head-title h2 {
        min-width: 0;
        font-size: 15px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .address-fields {
        grid-template-columns: 1fr;
    }

    .address-map-panel .location-map {
        height: min(360px, 48vh);
    }

    .order-location-map-panel {
        min-height: 220px;
    }

    .address-full {
        display: none !important;
    }

    .address-mobile {
        display: inline !important;
    }

    .topbar h1,
    .service-toolbar h2 {
        font-size: 23px;
    }

    .auth-card {
        padding: 22px;
    }

    .two-col,
    .field-row,
    .services-wrap.grid,
    .checkout-item,
    .review-grid,
    .order-detail-grid {
        grid-template-columns: 1fr;
    }

    .order-detail-head {
        gap: 8px;
        align-items: center;
        flex-wrap: nowrap;
        overflow: hidden;
    }

    .order-detail-head .status-badge {
        flex: 0 0 auto;
        width: auto;
        padding: 5px 8px;
        font-size: 9px;
        white-space: nowrap;
    }

    .order-detail-head .ghost-btn {
        min-height: 34px;
        padding-inline: 10px;
        font-size: 11px;
        white-space: nowrap;
    }

    .order-detail-head-title {
        flex: 1 1 auto;
        gap: 6px;
        overflow: hidden;
    }

    .order-detail-head-title p {
        flex: 0 0 auto;
        font-size: 10px;
    }

    .order-detail-head-title h2 {
        flex: 1 1 82px;
        font-size: 11px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .order-detail-date {
        flex: 0 1 auto;
        min-width: 0;
        overflow: hidden;
        color: var(--muted);
        font-size: 9px;
        text-overflow: ellipsis;
    }

    .order-detail-date .date-full {
        display: none;
    }

    .order-detail-date .date-mobile {
        display: inline;
    }

    .chat-header-panel {
        flex-wrap: nowrap;
        gap: 8px;
        overflow: hidden;
    }

    .chat-header-panel .ghost-btn {
        min-height: 34px;
        padding-inline: 10px;
        font-size: 11px;
        white-space: nowrap;
    }

    .chat-header-title {
        flex: 1 1 auto;
        gap: 6px;
        overflow: hidden;
    }

    .chat-header-title p {
        flex: 0 0 auto;
        font-size: 10px;
    }

    .chat-header-title h2 {
        flex: 1 1 82px;
        font-size: 11px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .chat-header-meta {
        flex: 0 0 auto;
        gap: 4px;
        font-size: 9px;
    }

    .order-detail-item {
        display: grid;
        grid-template-columns: 1fr;
    }

    .order-detail-item-main {
        grid-template-columns: 76px minmax(0, 1fr);
    }

    .order-detail-photo {
        width: 76px;
    }

    .order-detail-item > strong {
        justify-self: end;
    }

    .service-toolbar {
        align-items: start;
        flex-direction: column;
    }

    .checkout-header-action {
        width: 100%;
        justify-content: space-between;
    }

    .checkout-header-action .primary-btn {
        min-width: 118px;
    }

    .service-card,
    .services-wrap.grid .service-card {
        grid-template-columns: 92px minmax(0, 1fr) auto;
        gap: 12px;
        padding: 13px;
    }

    .services-wrap.grid .service-photo,
    .services-wrap.grid .service-copy {
        grid-column: auto;
    }

    .services-wrap.grid .service-photo {
        width: 92px;
    }

    .service-photo {
        margin-top: 22px;
    }

    .service-copy h3,
    .checkout-copy h3 {
        font-size: 16px;
    }

    .service-copy p,
    .checkout-copy p {
        font-size: 13px;
    }

    .checkout-item {
        grid-template-columns: 74px minmax(0, 1fr);
        gap: 12px;
        padding: 13px;
    }

    .checkout-item .service-photo {
        width: 74px;
    }

    .checkout-copy > .flex {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
        gap: 8px;
    }

    .checkout-copy .danger-btn {
        justify-self: end;
    }

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

    .quantity-stepper {
        grid-template-columns: 32px minmax(48px, 1fr) 32px;
        gap: 6px;
    }

    .line-total {
        grid-column: 2;
        justify-self: start;
        font-size: 16px;
    }

    .review-fee {
        justify-self: end;
    }

    .order-foot {
        display: grid;
        align-items: start;
    }

    .order-actions {
        width: 100%;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 8px;
    }

    .order-actions strong {
        width: 100%;
        text-align: right;
    }

    .chat-page {
        min-height: calc(100vh - 214px);
        grid-template-rows: auto minmax(330px, 1fr) auto;
    }

    .chat-bubble {
        width: 92%;
    }

    .chat-composer {
        grid-template-columns: 42px minmax(0, 1fr) 42px;
        gap: 8px;
        padding: 10px;
    }

    .file-pill,
    .send-btn {
        width: 42px;
        min-width: 42px;
        height: 42px;
    }

    .bottom-nav {
        bottom: max(10px, env(safe-area-inset-bottom));
        width: calc(100% - 24px);
        max-width: calc(100% - 24px);
        padding: 8px;
    }

    .bottom-nav a {
        padding: 7px 2px;
        font-size: 11px;
    }

    .toast-root {
        top: 12px;
        right: 12px;
        width: calc(100vw - 24px);
    }

    .confirm-modal {
        padding: 16px;
    }
}

/* Maxim-inspired app-wide theme */
body.with-nav {
    min-height: 100dvh;
    background: #22262f;
    color: var(--text);
}

.with-nav .app-shell {
    width: min(100%, 1180px);
    max-width: 1180px;
    padding-top: max(18px, env(safe-area-inset-top));
}

.with-nav .content {
    animation: page-in 0.18s ease both;
}

.with-nav .topbar {
    border-color: var(--line);
    background: rgba(34, 38, 47, 0.96);
    box-shadow: none;
}

.with-nav .app-wordmark {
    display: inline-flex;
    align-items: baseline;
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: 0;
}

.with-nav .app-wordmark .wordmark-dot {
    color: #ee251d;
}

.with-nav .topbar h1,
.with-nav .service-toolbar h2,
.with-nav .summary-panel h2,
.with-nav .review-head h2,
.with-nav .settings-panel h2,
.with-nav .order-head h2,
.with-nav .chat-header-panel h2 {
    color: #ffffff;
}

.with-nav .topbar h1 {
    margin-top: 10px;
    font-size: 20px;
    font-weight: 800;
}

.with-nav .muted,
.with-nav label span,
.with-nav .topbar h1 + p {
    color: var(--muted);
}

.with-nav .avatar {
    background: var(--primary);
    color: #111111;
}

.with-nav .location-display {
    border-color: var(--line);
    background: rgba(31, 35, 44, 0.72);
    color: #ffffff;
    box-shadow: none;
}

.with-nav .location-display i,
.with-nav .location-display i:first-child,
.with-nav .location-display i:last-child {
    color: #d8dbe2;
}

.with-nav .location-display.needs-location {
    border-color: rgba(255, 203, 5, 0.72);
    background: rgba(31, 35, 44, 0.94);
    box-shadow: 0 0 0 3px rgba(255, 203, 5, 0.13);
}

.with-nav .auth-card,
.with-nav .location-panel,
.with-nav .summary-panel,
.with-nav .profile-panel,
.with-nav .settings-panel,
.with-nav .order-card,
.with-nav .order-detail-head,
.with-nav .order-detail-panel,
.with-nav .review-panel,
.with-nav .service-card,
.with-nav .checkout-item,
.with-nav .chat-header-panel,
.with-nav .chat-composer,
.with-nav .chat-messages,
.with-nav .empty-state,
.with-nav .confirm-modal {
    border-color: var(--line);
    background: var(--surface);
    color: var(--text);
    box-shadow: none;
}

.with-nav input,
.with-nav select,
.with-nav textarea {
    border-color: var(--line);
    background: rgba(31, 35, 44, 0.72);
    color: #ffffff;
    box-shadow: none;
}

.with-nav input:focus,
.with-nav select:focus,
.with-nav textarea:focus,
.with-nav .chat-composer textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 203, 5, 0.16);
}

.with-nav input::placeholder,
.with-nav textarea::placeholder {
    color: #777e8d;
}

.with-nav input:disabled {
    color: #7c8492;
    background: #242933;
}

.with-nav .primary-btn,
.with-nav .primary-btn:hover,
.with-nav .bg-roy-500,
.with-nav .hover\:bg-roy-700:hover {
    background: var(--primary) !important;
    color: #0f1115 !important;
}

.with-nav .primary-btn {
    border-radius: 999px !important;
    font-weight: 800;
}

.with-nav .primary-btn:hover {
    background: #ffd51f !important;
}

.with-nav .ghost-btn,
.with-nav .icon-btn,
.with-nav .qty-btn,
.with-nav .file-pill {
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: #f7f8fb;
}

.with-nav .ghost-btn:hover,
.with-nav .icon-btn:hover,
.with-nav .qty-btn:hover,
.with-nav .file-pill:hover {
    border-color: rgba(255, 203, 5, 0.44);
    background: rgba(255, 255, 255, 0.07);
}

.with-nav .danger-btn,
.with-nav .danger-link,
.with-nav .text-red-600 {
    color: #ff7a7a !important;
}

.with-nav .danger-primary,
.with-nav .bg-red-600 {
    background: #d94b4b !important;
    color: #ffffff !important;
}

.with-nav .border-violet-100,
.with-nav .border-red-100 {
    border-color: var(--line) !important;
}

.with-nav .bg-white {
    background: var(--surface) !important;
}

.with-nav .bg-violet-50,
.with-nav .bg-violet-100 {
    background: var(--surface-2) !important;
}

.with-nav .text-roy-500,
.with-nav .text-roy-700,
.with-nav .text-slate-900 {
    color: #ffffff !important;
}

.with-nav .text-slate-500 {
    color: var(--muted) !important;
}

.with-nav .service-toolbar {
    align-items: flex-start;
    padding: 10px 2px 4px;
}

.with-nav .service-toolbar h2 {
    margin-top: 4px;
    font-size: 26px;
    font-weight: 800;
}

.with-nav .service-toolbar .muted {
    color: #8f95a2 !important;
    font-size: 13px;
    text-transform: none;
}

.with-nav nav[aria-label="Service categories"] a {
    border-color: var(--line) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    color: #f7f8fb !important;
    border-radius: 999px !important;
}

.with-nav nav[aria-label="Service categories"] a.bg-roy-500 {
    border-color: var(--primary) !important;
    background: var(--primary) !important;
    color: #111111 !important;
}

.with-nav nav[aria-label="Service categories"] span {
    background: rgba(0, 0, 0, 0.14) !important;
    color: inherit;
}

.with-nav .service-card {
    overflow: hidden;
    border-radius: 8px !important;
    background: rgba(31, 35, 44, 0.72);
    box-shadow: none;
}

.with-nav .service-card:hover {
    border-color: rgba(255, 203, 5, 0.42);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

.with-nav .service-card.is-selected {
    border-color: var(--primary);
    background: rgba(48, 54, 66, 0.92);
    box-shadow: 0 0 0 1px rgba(255, 203, 5, 0.24);
}

.with-nav .service-check {
    accent-color: var(--primary);
}

.with-nav .service-photo {
    background: #1b1f27;
    box-shadow: inset 0 0 0 1px var(--line);
}

.with-nav .service-limit,
.with-nav .status-badge {
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 999px;
}

.with-nav .favorite-form .icon-btn {
    background: rgba(31, 35, 44, 0.88);
    color: var(--primary);
}

.with-nav .icon-btn.liked,
.with-nav .favorite-form .icon-btn.liked {
    color: #ff5f6d;
}

.with-nav .bottom-nav {
    border-color: var(--line);
    background: rgba(34, 38, 47, 0.95);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
}

.with-nav .checkout-header-action {
    border-color: var(--line);
    background: rgba(34, 38, 47, 0.82);
    box-shadow: none;
}

.with-nav .checkout-selected-count span:first-child {
    color: var(--primary);
}

.with-nav .bottom-nav a {
    color: var(--muted);
}

.with-nav .bottom-nav a.active {
    background: var(--primary);
    color: #111111;
    border-radius: 999px;
}

.with-nav .summary-location,
.with-nav .cash-note,
.with-nav .cancel-reason,
.with-nav .feedback-note,
.with-nav .cancel-order-form,
.with-nav .feedback-order-form {
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.04);
}

.with-nav .summary-location i,
.with-nav .cash-note i,
.with-nav .address-line i {
    color: var(--primary);
}

.with-nav .order-card,
.with-nav .profile-panel,
.with-nav .settings-panel,
.with-nav .empty-state {
    border-radius: 8px !important;
    background: rgba(31, 35, 44, 0.72);
    box-shadow: none;
}

.with-nav .order-card:hover {
    border-color: rgba(223, 203, 115, 0.34);
    box-shadow: none;
}

.with-nav .order-menu,
.with-nav .order-chat-button,
.with-nav .order-menu-toggle {
    border-color: var(--line);
    background: #1f232c;
    color: var(--text);
}

.with-nav .order-chat-button:hover,
.with-nav .order-menu-toggle:hover {
    background: rgba(223, 203, 115, 0.12);
    color: var(--primary);
}

.with-nav .order-menu a,
.with-nav .order-menu button {
    color: var(--text);
}

.with-nav .order-menu a:hover,
.with-nav .order-menu button:hover {
    background: rgba(223, 203, 115, 0.12);
    color: var(--primary);
}

.with-nav .order-menu .danger-menu-item,
.with-nav .order-menu .danger-menu-item:hover {
    color: #fca5a5;
}

.with-nav .order-head h2,
.with-nav .settings-panel h2,
.with-nav .empty-state h2 {
    font-weight: 800;
}

.with-nav .order-items,
.with-nav .settings-row {
    background: transparent;
}

.with-nav .settings-row {
    min-width: 0;
}

.with-nav .settings-row strong {
    min-width: 0;
    overflow-wrap: anywhere;
}

.with-nav .stack-form label,
.with-nav .verify-email-form label,
.with-nav .cancel-order-form label,
.with-nav .feedback-order-form label {
    gap: 10px;
}

.with-nav .profile-panel input,
.with-nav .settings-panel input,
.with-nav .cancel-order-form textarea,
.with-nav .feedback-order-form textarea {
    min-height: 54px;
    border-width: 0 0 1px;
    border-radius: 0;
    background: rgba(31, 35, 44, 0.54);
    padding: 12px 44px 12px 0;
    font-size: 17px;
    font-weight: 500;
}

.with-nav .profile-panel select,
.with-nav .settings-panel select,
.with-nav .cancel-order-form select,
.with-nav .feedback-order-form select {
    min-height: 54px;
    border-width: 0 0 1px;
    border-radius: 0;
    background: rgba(31, 35, 44, 0.54);
    padding: 0 44px 0 0;
    font-size: 17px;
    font-weight: 500;
}

.with-nav textarea {
    min-height: 96px;
    padding-top: 12px;
    padding-bottom: 12px;
    resize: vertical;
}

.with-nav .empty-state {
    max-width: 470px;
    margin-inline: auto;
    padding: 36px 20px;
}

.with-nav .empty-state i {
    font-size: 36px;
    margin-bottom: 14px;
}

.with-nav .cash-note {
    color: var(--success);
}

.with-nav dl div,
.with-nav .settings-row,
.with-nav .order-items {
    border-color: var(--line);
}

.with-nav dt,
.with-nav .summary-location span,
.with-nav .order-head span,
.with-nav .order-items span,
.with-nav .order-foot span,
.with-nav .service-copy p,
.with-nav .checkout-copy p,
.with-nav .service-copy strong span,
.with-nav .cancel-reason p,
.with-nav .feedback-note p,
.with-nav .chat-header-panel p,
.with-nav .chat-meta,
.with-nav .empty-state p,
.with-nav .attachment-name {
    color: var(--muted);
}

.with-nav dd,
.with-nav .line-total,
.with-nav .order-actions strong,
.with-nav .checkout-copy strong,
.with-nav .service-copy strong,
.with-nav .settings-row strong {
    color: #ffffff;
}

.with-nav .status-pending {
    background: var(--primary-soft);
    color: var(--primary);
}

.with-nav .status-confirmed,
.with-nav .status-out_for_delivery {
    background: rgba(76, 195, 255, 0.14);
    color: #7dd3fc;
}

.with-nav .status-completed {
    background: rgba(50, 213, 131, 0.14);
    color: var(--success);
}

.with-nav .status-cancelled {
    background: rgba(255, 95, 109, 0.14);
    color: #ff7a7a;
}

.with-nav .empty-state {
    border-style: dashed;
}

.with-nav .empty-state i,
.with-nav .empty-chat i {
    color: var(--primary);
}

.with-nav .chat-messages {
    background: #1f232c;
}

.with-nav .chat-bubble {
    border-color: var(--line);
    background: var(--surface);
}

.with-nav .chat-bubble.mine {
    border-color: rgba(255, 203, 5, 0.34);
    background: #383426;
}

.with-nav .chat-meta strong {
    color: #ffffff;
}

.with-nav .toast.info,
.with-nav .toast.success {
    background: var(--primary);
    color: #111111;
}

.with-nav .modal-backdrop {
    background: rgba(15, 17, 21, 0.72);
}

.with-nav .confirm-modal-icon {
    background: var(--primary-soft);
    color: var(--primary);
}

.with-nav .confirm-modal h2 {
    color: #ffffff;
}

.with-nav .confirm-modal p {
    color: var(--muted);
}

/* Maxim-inspired auth screens */
.auth-body {
    min-height: 100dvh;
    background: #22262f;
    color: #f7f8fb;
}

.auth-body .app-shell {
    width: 100%;
    max-width: none;
    min-height: 100dvh;
    padding: 0;
    display: block;
}

.auth-body .content {
    min-height: 100dvh;
    animation: none;
}

.maxim-auth-screen {
    width: min(100%, 470px);
    min-height: 100dvh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    padding: max(34px, env(safe-area-inset-top)) 18px max(128px, calc(env(safe-area-inset-bottom) + 112px));
    background: #22262f;
    color: #f7f8fb;
}

.maxim-auth-top {
    padding: 68px 10px 26px;
    text-align: center;
}

.maxim-wordmark {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    color: #ffffff;
    font-size: clamp(42px, 12vw, 58px);
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: 0;
}

.maxim-wordmark .wordmark-dot {
    color: #ee251d;
}

.maxim-auth-top h1 {
    margin: 52px 0 0;
    color: #ffffff;
    font-size: clamp(20px, 5.2vw, 26px);
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: 0;
}

.maxim-auth-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.country-row {
    width: 100%;
    min-height: 58px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 0;
    background: rgba(31, 35, 44, 0.72);
    color: #f7f8fb;
    padding: 0 0 0 2px;
    text-align: left;
    cursor: pointer;
}

.country-row span:not(.ph-flag) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 22px;
    font-weight: 500;
}

.country-row i {
    color: #d8dbe2;
    font-size: 30px;
}

.ph-flag {
    position: relative;
    width: 30px;
    height: 22px;
    display: inline-block;
    overflow: hidden;
    border-radius: 2px;
    background: linear-gradient(180deg, #2456b8 0 50%, #d92727 50% 100%);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.ph-flag::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 15px;
    background: #ffffff;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.ph-flag::after {
    content: "";
    position: absolute;
    top: 8px;
    left: 4px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f8cd00;
}

.maxim-field {
    display: grid;
    gap: 10px;
    color: #8f95a2;
    font-size: 18px;
    font-weight: 500;
}

.maxim-field > span:first-child {
    color: #8f95a2;
    font-size: 18px;
    font-weight: 500;
}

.maxim-field input,
.phone-input-wrap {
    width: 100%;
    min-height: 58px;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 0;
    background: rgba(31, 35, 44, 0.54);
    color: #ffffff;
    box-shadow: none;
}

.maxim-field input {
    padding: 0 18px 0 0;
    font-size: 24px;
    font-weight: 500;
}

.maxim-field input:focus {
    border-color: rgba(255, 203, 5, 0.72);
    box-shadow: none;
}

.maxim-field input::placeholder {
    color: #777e8d;
}

.phone-input-wrap {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
}

.phone-input-wrap input {
    min-height: 56px;
    border: 0;
    background: transparent;
}

.dial-code {
    color: #ffffff;
    font-size: 24px;
    font-weight: 500;
}

.legal-copy {
    margin: 12px 28px 0;
    color: #f4f5f8;
    font-size: 17px;
    line-height: 1.36;
    text-align: center;
}

.legal-copy a {
    color: #80bdc9;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-social-block {
    margin-top: 4px;
}

.maxim-auth-screen .divider {
    margin: 0 0 14px;
    color: #747b8a;
    font-size: 13px;
}

.maxim-auth-screen .divider::before,
.maxim-auth-screen .divider::after {
    background: rgba(255, 255, 255, 0.08);
}

.maxim-auth-screen .oauth-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.maxim-auth-screen .ghost-btn {
    min-height: 46px;
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #f7f8fb;
    border-radius: 8px;
}

.auth-bottom {
    width: 100%;
    margin-top: 12px;
    padding-top: 6px;
}

.maxim-submit,
.maxim-auth-screen .primary-btn.maxim-submit {
    width: 100%;
    min-height: 66px;
    border-radius: 999px;
    background: #ffcb05;
    color: #080808;
    font-size: 22px;
    font-weight: 500;
    box-shadow: 0 -10px 34px rgba(15, 18, 24, 0.16);
}

.maxim-submit:hover,
.maxim-auth-screen .primary-btn.maxim-submit:hover {
    background: #ffd51f;
    color: #080808;
}

.maxim-submit:active,
.maxim-auth-screen .primary-btn.maxim-submit:active {
    transform: translateY(1px);
}

.maxim-auth-screen .auth-switch {
    margin: 20px 0 0;
    color: #aab0bb;
    font-size: 14px;
    text-align: center;
}

.maxim-auth-screen .auth-switch a {
    color: #ffcb05;
    font-weight: 800;
}

.auth-register-screen .maxim-auth-top {
    padding-top: 42px;
}

.auth-register-screen .maxim-auth-top h1 {
    margin-top: 34px;
}

.auth-name-grid {
    gap: 18px;
}

.otp-form {
    flex: 0 0 auto;
}

.maxim-auth-screen .otp-note {
    justify-content: flex-start;
    margin: 0;
    color: #aab0bb;
    font-size: 15px;
    line-height: 1.5;
}

.otp-secondary-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.otp-secondary-actions form {
    min-width: 0;
}

.otp-secondary-actions .ghost-btn {
    width: 100%;
    padding: 0 10px;
    font-size: 13px;
}

@media (min-width: 641px) {
    .maxim-auth-screen {
        padding-left: 28px;
        padding-right: 28px;
    }
}

@media (max-width: 380px) {
    .checkout-item {
        grid-template-columns: 64px minmax(0, 1fr);
        gap: 10px;
    }

    .checkout-item .service-photo {
        width: 64px;
    }

    .quantity-row.tight {
        grid-template-columns: minmax(0, 1fr);
    }

    .maxim-auth-top {
        padding-top: 44px;
    }

    .maxim-auth-top h1 {
        margin-top: 34px;
    }

    .legal-copy {
        margin-left: 8px;
        margin-right: 8px;
        font-size: 15px;
    }

    .maxim-submit,
    .maxim-auth-screen .primary-btn.maxim-submit {
        min-height: 60px;
        font-size: 20px;
    }
}

/* Mobile density tune-up */
@media (max-width: 640px) {
    body {
        font-size: 14px;
    }

    .app-shell,
    .with-nav .app-shell {
        padding: 0 10px 82px;
    }

    .with-nav .app-shell {
        padding-top: 0;
    }

    .topbar,
    .with-nav .topbar {
        top: 0;
        gap: 9px;
        width: 100vw;
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        margin-bottom: 10px;
        padding: 9px;
        border-radius: 0 0 8px 8px;
    }

    .with-nav .app-wordmark {
        font-size: 20px;
    }

    .avatar,
    .with-nav .avatar {
        width: 38px;
        height: 38px;
        font-size: 13px;
    }

    .location-display,
    .with-nav .location-display {
        min-height: 38px;
        grid-template-columns: 14px minmax(0, 1fr) 14px;
        gap: 5px;
        padding: 0 8px;
        font-size: 12px;
    }

    .location-display i,
    .with-nav .location-display i {
        font-size: 12px;
    }

    .service-toolbar,
    .with-nav .service-toolbar {
        gap: 8px;
        margin-bottom: 10px;
        padding: 0;
    }

    .topbar h1,
    .service-toolbar h2,
    .with-nav .topbar h1,
    .with-nav .service-toolbar h2,
    .with-nav .summary-panel h2,
    .with-nav .review-head h2,
    .with-nav .settings-panel h2,
    .with-nav .order-head h2,
    .with-nav .chat-header-panel h2 {
        font-size: 19px;
        line-height: 1.12;
    }

    .profile-identity {
        gap: 10px;
    }

    .profile-avatar {
        width: 48px;
        height: 48px;
        font-size: 15px;
    }

    .profile-identity h2 {
        font-size: 15px;
    }

    .profile-identity p {
        font-size: 11px;
    }

    .muted,
    .muted.compact,
    .with-nav .muted,
    .with-nav .service-toolbar .muted,
    .with-nav dt,
    .with-nav .summary-location span,
    .with-nav .order-head span,
    .with-nav .order-items span,
    .with-nav .order-foot span,
    .with-nav .service-copy p,
    .with-nav .checkout-copy p,
    .with-nav .service-copy strong span,
    .with-nav .cancel-reason p,
    .with-nav .feedback-note p,
    .with-nav .chat-header-panel p,
    .with-nav .chat-meta,
    .with-nav .empty-state p,
    .with-nav .attachment-name {
        font-size: 12px;
        line-height: 1.35;
    }

    .checkout-header-action {
        gap: 8px;
    }

    .checkout-selected-count {
        padding: 5px 8px;
        font-size: 12px;
    }

    .checkout-selected-count span:first-child,
    .with-nav .checkout-selected-count span:first-child {
        font-size: 17px;
    }

    .primary-btn,
    .ghost-btn,
    .with-nav .primary-btn,
    .with-nav .ghost-btn {
        min-height: 38px;
        gap: 6px;
        padding: 0 12px;
        font-size: 13px;
    }

    .small-btn,
    .with-nav .small-btn {
        min-height: 34px;
        padding: 0 9px;
        font-size: 12px;
    }

    nav[aria-label="Service categories"] {
        gap: 7px;
        margin-bottom: 10px !important;
    }

    .with-nav nav[aria-label="Service categories"] a,
    nav[aria-label="Service categories"] a {
        min-height: 34px;
        gap: 6px;
        padding: 0 11px;
        font-size: 12px;
    }

    .services-wrap.grid,
    .order-list,
    .checkout-items,
    .review-main,
    .settings-grid,
    .order-detail-page,
    .order-detail-main {
        gap: 10px;
    }

    .service-card,
    .services-wrap.grid .service-card,
    .with-nav .service-card,
    .checkout-item,
    .with-nav .checkout-item,
    .order-card,
    .with-nav .order-card,
    .order-detail-head,
    .order-detail-panel,
    .with-nav .order-detail-head,
    .with-nav .order-detail-panel,
    .summary-panel,
    .with-nav .summary-panel,
    .review-panel,
    .with-nav .review-panel,
    .profile-panel,
    .settings-panel,
    .with-nav .profile-panel,
    .with-nav .settings-panel {
        gap: 9px;
        padding: 10px !important;
    }

    .service-card,
    .services-wrap.grid .service-card,
    .with-nav .service-card {
        grid-template-columns: 72px minmax(0, 1fr) auto;
        min-height: 112px;
    }

    .service-photo,
    .services-wrap.grid .service-photo,
    .with-nav .service-photo {
        width: 72px;
        margin-top: 16px;
    }

    .compact-photo,
    .checkout-item .service-photo {
        width: 64px;
        margin-top: 0;
    }

    .service-copy h3,
    .checkout-copy h3,
    .with-nav .service-copy h3,
    .with-nav .checkout-copy h3,
    .order-head h2,
    .settings-panel h2,
    .empty-state h2,
    .with-nav .order-head h2,
    .with-nav .settings-panel h2,
    .with-nav .empty-state h2 {
        margin-bottom: 5px;
        font-size: 14px;
        line-height: 1.18;
    }

    .service-copy strong,
    .checkout-copy strong,
    .line-total,
    .order-actions strong,
    .settings-row strong,
    .with-nav .service-copy strong,
    .with-nav .checkout-copy strong,
    .with-nav .line-total,
    .with-nav .order-actions strong,
    .with-nav .settings-row strong {
        font-size: 13px;
    }

    .service-limit,
    .status-badge,
    .with-nav .service-limit,
    .with-nav .status-badge {
        padding: 4px 7px;
        font-size: 10px;
    }

    .favorite-form .ghost-btn,
    .favorite-toggle,
    .icon-btn,
    .with-nav .icon-btn {
        width: 34px;
        height: 34px;
        min-height: 34px;
        font-size: 13px;
    }

    .checkout-item {
        grid-template-columns: 64px minmax(0, 1fr);
    }

    .quantity-row.tight {
        gap: 8px;
    }

    .quantity-stepper {
        grid-template-columns: 30px minmax(42px, 1fr) 30px;
    }

    .qty-btn {
        min-height: 32px;
    }

    .quantity-input,
    .day-input,
    input,
    select,
    textarea,
    .with-nav input,
    .with-nav select,
    .with-nav textarea,
    .with-nav .profile-panel input,
    .with-nav .settings-panel input,
    .with-nav .cancel-order-form textarea,
    .with-nav .feedback-order-form textarea,
    .with-nav .profile-panel select,
    .with-nav .settings-panel select,
    .with-nav .cancel-order-form select,
    .with-nav .feedback-order-form select {
        min-height: 42px;
        padding: 9px 12px;
        font-size: 14px;
    }

    textarea,
    .with-nav textarea {
        min-height: 78px;
    }

    .order-detail-item {
        gap: 8px;
    }

    .order-detail-item-main {
        grid-template-columns: 62px minmax(0, 1fr);
        gap: 9px;
    }

    .order-detail-photo {
        width: 62px;
    }

    .order-detail-item span {
        font-size: 12px;
    }

    .bottom-nav,
    .with-nav .bottom-nav {
        left: 0;
        right: 0;
        bottom: 0;
        transform: none;
        width: 100vw;
        max-width: 100vw;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        justify-items: stretch;
        gap: 4px;
        margin: 0;
        padding: 6px 6px max(6px, env(safe-area-inset-bottom));
        border-radius: 8px 8px 0 0;
    }

    .bottom-nav a,
    .with-nav .bottom-nav a {
        width: 100%;
        min-width: 0;
        display: grid;
        place-items: center;
        gap: 3px;
        padding: 6px 2px;
        font-size: 10px;
        text-align: center;
    }

    .bottom-nav i,
    .with-nav .bottom-nav i {
        font-size: 15px;
    }

    .chat-page {
        min-height: calc(100vh - 170px);
    }

    .chat-composer,
    .with-nav .chat-composer {
        grid-template-columns: 38px minmax(0, 1fr) 38px;
        gap: 6px;
        padding: 8px !important;
    }

    .file-pill,
    .send-btn {
        width: 38px;
        min-width: 38px;
        height: 38px;
    }

    .empty-state,
    .with-nav .empty-state {
        padding: 24px 14px;
    }

    .empty-state i,
    .with-nav .empty-state i {
        font-size: 28px;
    }

    .modal-backdrop,
    .terms-modal-backdrop {
        padding: 10px;
    }

    .terms-modal-body {
        padding: 12px;
    }

    .terms-modal-body p {
        font-size: 12px;
        line-height: 1.55;
    }

    .terms-modal-body h3 {
        margin-top: 16px;
        font-size: 13px;
    }

    .terms-modal-header,
    .terms-modal-footer {
        padding: 10px 12px;
    }

    .maxim-auth-screen {
        padding: max(20px, env(safe-area-inset-top)) 16px max(92px, calc(env(safe-area-inset-bottom) + 82px));
    }

    .maxim-auth-top {
        padding: 38px 8px 18px;
    }

    .maxim-wordmark {
        font-size: clamp(32px, 10vw, 42px);
    }

    .maxim-auth-top h1 {
        margin-top: 28px;
        font-size: clamp(17px, 4.5vw, 21px);
        line-height: 1.16;
    }

    .maxim-auth-form {
        gap: 16px;
    }

    .country-row,
    .maxim-field input,
    .maxim-auth-screen .ghost-btn {
        min-height: 48px;
        font-size: 15px;
    }

    .phone-input-wrap .dial-code,
    .phone-input-wrap input {
        font-size: 18px;
    }

    .legal-copy {
        font-size: 13px;
        line-height: 1.45;
    }

    .maxim-submit,
    .maxim-auth-screen .primary-btn.maxim-submit {
        min-height: 54px;
        font-size: 18px;
    }

    .auth-bottom {
        margin-top: 8px;
    }

    .maxim-auth-screen .auth-switch {
        margin-top: 14px;
        font-size: 12px;
    }
}
