/* ==========================================================================
   Acil Usta Burada - Portal (Account, Appointments, Booking) Stylesheet
   ========================================================================== */

.portal-page {
    --portal-red: var(--primary, #e02b20);
    --portal-ink: var(--text-main, #0f172a);
    --portal-muted: var(--text-muted, #64748b);
    --portal-line: var(--border, #e2e8f0);
    color: var(--portal-ink);
    background: var(--bg-page, #f8fafc);
    font-size: 14px;
}

.portal-page h1, .portal-page h2, .portal-page h3, .portal-page h4 {
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.025em;
}

.portal-page .portal-container {
    width: min(1200px, calc(100% - 36px));
    margin-inline: auto;
}

/* ==========================================================================
   Portal Hero Section
   ========================================================================== */
.portal-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: linear-gradient(135deg, #0b1324 0%, #172554 100%);
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.portal-hero > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right 20%;
    z-index: -2;
    filter: brightness(0.28) contrast(1.15);
}

.portal-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(11, 19, 36, 0.96) 0%, rgba(15, 23, 42, 0.88) 45%, rgba(15, 23, 42, 0.4) 100%);
}

.portal-hero-inner {
    min-height: 220px;
    padding-block: 36px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.portal-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: #94a3b8;
    margin-bottom: 12px;
}

.portal-breadcrumb a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.15s;
}

.portal-breadcrumb a:hover {
    color: #fff;
}

.portal-breadcrumb span {
    color: #64748b;
}

.portal-hero h1 {
    color: #fff;
    font-size: clamp(32px, 3.8vw, 46px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1.2px;
    margin: 0 0 10px;
}

.portal-hero h1 em {
    font-style: normal;
    color: #ff523d;
    background: linear-gradient(135deg, #ff6b57, #e02b20);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.portal-hero-inner > div > p {
    font-size: 14.5px;
    line-height: 1.5;
    color: #cbd5e1;
    max-width: 560px;
    margin: 0;
}

.portal-hero-perks {
    display: flex;
    gap: 20px;
    color: white;
    margin-top: 20px;
    flex-wrap: wrap;
}

.portal-hero-perks > div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.portal-hero-perks > div > span {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full, 9999px);
    color: #fff;
    flex-shrink: 0;
}

.portal-hero-perks svg {
    width: 18px;
    height: 18px;
}

.portal-hero-perks p {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.3;
}

.portal-hero-perks b {
    display: block;
    font-weight: 700;
    color: #fff;
}

.portal-hero-perks small {
    display: block;
    font-size: 11px;
    color: #94a3b8;
}

.portal-handwriting {
    display: none;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 700;
    color: #fbbf24;
    text-align: right;
    font-style: italic;
    opacity: 0.9;
}

@media (min-width: 992px) {
    .portal-handwriting {
        display: block;
    }
}

/* ==========================================================================
   Booking Layout & Wizard Progress
   ========================================================================== */
.booking-container {
    padding-block: 32px 64px;
}

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

.booking-progress {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    padding-bottom: 20px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--portal-line);
}

.booking-progress a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    text-decoration: none;
    color: var(--portal-muted);
    font-size: 11.5px;
    font-weight: 600;
    padding: 6px 4px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.booking-progress a span {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #e2e8f0;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.booking-progress a:hover {
    color: var(--portal-ink);
}

.booking-progress a:hover span {
    background: #cbd5e1;
    color: #0f172a;
}

.booking-progress a[aria-current="step"] {
    color: var(--portal-red);
}

.booking-progress a[aria-current="step"] span {
    background: var(--portal-red);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(224, 43, 32, 0.15);
}

/* ==========================================================================
   Booking Form & Sections
   ========================================================================== */
.portal-panel {
    border: 1px solid var(--portal-line);
    border-radius: 16px;
    background: #ffffff;
    padding: 28px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03);
}

.booking-form {
    display: grid;
    gap: 28px;
}

.booking-section {
    display: grid;
    gap: 16px;
    padding-top: 4px;
}

.booking-section-title {
    margin-bottom: 4px;
}

.booking-section-title h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--portal-ink);
    margin: 0 0 4px;
}

.booking-section-title p {
    font-size: 13.5px;
    color: var(--portal-muted);
    margin: 0;
}

.portal-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.portal-field .required {
    color: var(--portal-red);
}

.portal-field select,
.portal-field input[type="text"],
.portal-field input[type="tel"],
.portal-field input[type="email"],
.portal-field textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    color: var(--portal-ink);
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    min-height: 44px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}

.portal-field select:focus,
.portal-field input:focus,
.portal-field textarea:focus {
    outline: none;
    border-color: var(--portal-red);
    box-shadow: 0 0 0 3px rgba(224, 43, 32, 0.12);
}

.portal-field textarea {
    min-height: 90px;
    resize: vertical;
    line-height: 1.45;
}

.field-counter {
    align-self: flex-end;
    font-size: 11.5px;
    color: #94a3b8;
    margin-top: -8px;
}

/* Service & Choice Chips */
.booking-service-fields {
    display: grid;
    gap: 16px;
}

.problem-options {
    border: 0;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}

.problem-options legend {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

#booking-problems {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.choice-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.choice-chip:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.choice-chip input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.choice-chip:has(input:checked) {
    border-color: var(--portal-red);
    background: rgba(224, 43, 32, 0.06);
    color: var(--portal-red);
    font-weight: 600;
    box-shadow: 0 0 0 1px var(--portal-red);
}

/* Address Fields Grid */
.booking-address-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

/* ==========================================================================
   Date & Time Picker Layout
   ========================================================================== */
.booking-date-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 20px;
    align-items: start;
}

/* Calendar Card */
.calendar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.calendar-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.calendar-heading h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--portal-ink);
    text-transform: capitalize;
}

.calendar-heading button {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #475569;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.calendar-heading button:hover:not(:disabled) {
    border-color: #cbd5e1;
    background: #f1f5f9;
    color: #0f172a;
}

.calendar-heading button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
    font-size: 11.5px;
    font-weight: 700;
    color: #94a3b8;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 8px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-days span {
    aspect-ratio: 1;
}

.calendar-days button {
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0;
}

.calendar-days button:hover:not(:disabled) {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e1;
}

.calendar-days button[aria-current="date"] {
    position: relative;
    font-weight: 700;
    color: var(--portal-red);
}

.calendar-days button[aria-current="date"]::after {
    content: "";
    position: absolute;
    bottom: 3px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--portal-red);
}

.calendar-days button[aria-pressed="true"] {
    background: var(--portal-red) !important;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(224, 43, 32, 0.3);
}

.calendar-days button[aria-pressed="true"]::after {
    background: #ffffff;
}

.calendar-days button:disabled {
    color: #cbd5e1;
    cursor: not-allowed;
    pointer-events: none;
}

/* Time Picker Card */
.time-picker {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    margin: 0;
    background: #ffffff;
    display: grid;
    gap: 12px;
}

.time-picker legend {
    font-size: 14px;
    font-weight: 700;
    color: var(--portal-ink);
    padding: 0 4px;
}

#selected-date-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--portal-muted);
    margin: 0;
}

#booking-times {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    max-height: 240px;
    overflow-y: auto;
    padding-right: 4px;
}

.time-chip {
    padding: 8px 10px;
    font-size: 12px;
    justify-content: center;
}

.urgent-time-chip {
    grid-column: span 2;
    border-color: #f87171 !important;
    background: #fff1f2 !important;
    color: #be123c !important;
    font-weight: 700 !important;
}

.urgent-time-chip:has(input:checked) {
    background: #ffe4e6 !important;
    box-shadow: 0 0 0 1px #e11d48 !important;
}

.availability-note {
    font-size: 11.5px;
    color: #94a3b8;
    margin: 0;
    line-height: 1.4;
}

/* ==========================================================================
   Problem Detail & Photo Upload
   ========================================================================== */
.booking-problem-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.photo-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 4px;
}

.photo-field label span {
    color: #94a3b8;
    font-weight: 400;
}

.photo-field p {
    font-size: 12px;
    color: var(--portal-muted);
    margin: 0 0 10px;
}

.photo-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 24px 16px;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
}

.photo-upload:hover {
    border-color: var(--portal-red);
    background: #fff5f5;
}

.photo-upload svg {
    width: 32px;
    height: 32px;
    color: #64748b;
}

.photo-upload b {
    font-size: 13px;
    color: #0f172a;
}

.photo-upload small {
    font-size: 11px;
    color: #94a3b8;
}

.photo-field input[type="file"] {
    display: none;
}

.photo-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.photo-thumb {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #cbd5e1;
}

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

.photo-thumb-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    background: rgba(15, 23, 42, 0.75);
    color: #fff;
    border-radius: 50%;
    border: 0;
    font-size: 11px;
    display: grid;
    place-items: center;
    cursor: pointer;
}

/* ==========================================================================
   Booking Sidebar & Summary
   ========================================================================== */
.booking-sidebar {
    display: grid;
    gap: 20px;
    position: sticky;
    top: 96px;
}

.booking-summary {
    display: grid;
    gap: 16px;
}

.booking-summary h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--portal-ink);
    margin: 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--portal-line);
}

.summary-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13px;
}

.summary-item svg {
    width: 20px;
    height: 20px;
    color: var(--portal-red);
    flex-shrink: 0;
    margin-top: 2px;
}

.summary-item div {
    flex: 1;
    min-width: 0;
}

.summary-item h3 {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 2px;
}

.summary-item p {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--portal-ink);
    margin: 0;
    word-break: break-word;
}

.summary-item a {
    font-size: 12px;
    font-weight: 600;
    color: var(--portal-red);
    text-decoration: none;
    align-self: flex-start;
}

.summary-item a:hover {
    text-decoration: underline;
}

.estimate-price {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: #16a34a;
    letter-spacing: -0.5px;
    margin: 2px 0 4px;
}

.portal-primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    background: var(--portal-red);
    color: #ffffff !important;
    font-size: 15px;
    font-weight: 700;
    border: 0;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(224, 43, 32, 0.28);
    transition: all 0.15s ease;
}

.portal-primary-button:hover {
    background: #c8231a;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(224, 43, 32, 0.35);
}

.portal-primary-button.full {
    width: 100%;
    min-height: 48px;
}

.booking-privacy {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

.booking-privacy svg {
    width: 16px;
    height: 16px;
    color: #16a34a;
    flex-shrink: 0;
}

.booking-support {
    display: grid;
    gap: 12px;
}

.booking-support > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.booking-support svg {
    width: 28px;
    height: 28px;
    color: var(--portal-red);
}

.booking-support h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--portal-ink);
    margin: 0;
}

.booking-support h2 small {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--portal-muted);
}

.booking-support p {
    font-size: 13px;
    color: #475569;
    line-height: 1.45;
    margin: 0;
}

/* ==========================================================================
   How It Works & Trust Sections
   ========================================================================== */
.booking-how {
    margin-top: 56px;
    padding-top: 40px;
    border-top: 1px solid var(--portal-line);
    display: grid;
    gap: 28px;
}

.portal-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.portal-section-heading h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--portal-ink);
    margin: 0 0 4px;
}

.portal-section-heading p {
    font-size: 14px;
    color: var(--portal-muted);
    margin: 0;
}

.portal-section-heading a {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--portal-red);
    text-decoration: none;
}

.booking-how-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.booking-how-grid article {
    position: relative;
    border: 1px solid var(--portal-line);
    border-radius: 14px;
    background: #ffffff;
    padding: 24px 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.booking-how-grid article > span {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--portal-red);
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    flex-shrink: 0;
}

.booking-how-grid article svg {
    display: none;
}

.booking-how-grid h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--portal-ink);
    margin: 0 0 4px;
}

.booking-how-grid p {
    font-size: 13px;
    color: var(--portal-muted);
    line-height: 1.45;
    margin: 0;
}

.booking-trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.booking-trust-grid article {
    border: 1px solid var(--portal-line);
    border-radius: 12px;
    background: #ffffff;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.booking-trust-grid svg {
    width: 24px;
    height: 24px;
    color: var(--portal-red);
    flex-shrink: 0;
}

.booking-trust-grid h3 {
    font-size: 13px;
    font-weight: 700;
    color: var(--portal-ink);
    margin: 0 0 2px;
}

.booking-trust-grid p {
    font-size: 12px;
    color: var(--portal-muted);
    margin: 0;
}

/* ==========================================================================
   Account Portal Styles (Hesabım: Overview, Appointments, Orders, Favorites)
   ========================================================================== */

/* Icon safety net: inline SVG'ler boyut almadan sayfayı bozmasın */
.account-layout svg,
.account-page dialog svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.account-page .portal-hero-inner {
    min-height: 190px;
}

.account-layout {
    display: grid;
    grid-template-columns: 272px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    padding-block: 32px 48px;
}

/* ---------- Sidebar ---------- */
.account-sidebar {
    display: grid;
    gap: 18px;
    align-self: start;
    min-width: 0;
    border: 1px solid var(--portal-line);
    border-radius: 18px;
    padding: 22px 14px 14px;
    background: #ffffff;
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.03));
}

.account-user {
    text-align: center;
    padding: 0 6px 18px;
    border-bottom: 1px solid var(--portal-line);
}

.portal-avatar {
    width: 60px;
    height: 60px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    border-radius: 50%;
    background: #f1f5f9;
    color: var(--portal-red);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.5px;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
    margin: 0 auto 12px;
}

.portal-avatar.large {
    width: 88px;
    height: 88px;
    font-size: 28px;
}

.portal-avatar.warm {
    background: linear-gradient(135deg, #fff1e6 0%, #ffe0cc 100%);
    color: #c2410c;
}

.portal-avatar.cool {
    background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
    color: #1d4ed8;
}

.portal-avatar.rose {
    background: linear-gradient(135deg, #ffe4e6 0%, #fce7f3 100%);
    color: #be123c;
}

.account-user h2 {
    font-size: 18px;
    font-weight: 800;
    color: var(--portal-ink);
    margin: 0 0 4px;
    overflow-wrap: anywhere;
}

.account-user p {
    margin: 2px 0;
    color: var(--portal-muted);
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    overflow-wrap: anywhere;
}

.account-user p svg {
    width: 14px;
    height: 14px;
}

.membership {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 6px 12px;
    border-radius: 9999px;
    border: 1px solid #fde68a;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    color: #b45309;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.membership svg {
    width: 15px;
    height: 15px;
    color: #f59e0b;
}

a.membership:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.22);
    color: #92400e;
}

.membership.compact {
    margin: 0;
    padding: 4px 10px;
    font-size: 12px;
}

.membership.compact svg {
    width: 13px;
    height: 13px;
}

/* ---------- Sidebar navigation ---------- */
.account-navigation {
    display: grid;
    gap: 2px;
}

.account-navigation button {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    text-align: left;
    padding: 10px 14px;
    color: #475569;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    min-height: 42px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.account-navigation button svg {
    color: #94a3b8;
    transition: color 0.15s ease;
}

.account-navigation button:hover {
    background: #f8fafc;
    color: var(--portal-ink);
}

.account-navigation button:hover svg {
    color: var(--portal-ink);
}

.account-navigation button[aria-current="page"] {
    background: rgba(224, 43, 32, 0.08);
    color: var(--portal-red);
    font-weight: 700;
}

.account-navigation button[aria-current="page"] svg {
    color: var(--portal-red);
}

.account-navigation button[aria-current="page"]::before {
    content: "";
    position: absolute;
    left: -1px;
    top: 9px;
    bottom: 9px;
    width: 3px;
    border-radius: 3px;
    background: var(--portal-red);
}

.account-navigation button:focus-visible,
.portal-soft-button:focus-visible,
.portal-outline-button:focus-visible,
.portal-text-button:focus-visible,
.order-row:focus-visible,
.favorite-remove:focus-visible {
    outline: 2px solid var(--portal-red);
    outline-offset: 2px;
}

/* ---------- Sidebar help box ---------- */
.account-help {
    padding: 18px 16px;
    border-radius: 14px;
    border: 1px solid #fde2df;
    background: linear-gradient(160deg, #fff5f4 0%, #ffffff 75%);
}

.account-help > svg {
    width: 30px;
    height: 30px;
    color: var(--portal-red);
    margin-bottom: 8px;
}

.account-help h3 {
    font-size: 14.5px;
    font-weight: 800;
    color: var(--portal-ink);
    margin: 0 0 4px;
}

.account-help p {
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--portal-muted);
    margin: 0 0 12px;
}

.account-help .portal-soft-button {
    width: 100%;
}

/* ---------- Shared portal buttons ---------- */
.portal-soft-button,
.portal-outline-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 9px 16px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.portal-soft-button {
    border: 1px solid transparent;
    background: rgba(224, 43, 32, 0.08);
    color: var(--portal-red);
}

.portal-soft-button:hover {
    background: rgba(224, 43, 32, 0.14);
    color: var(--portal-red);
}

.portal-soft-button span {
    transition: transform 0.15s ease;
}

.portal-soft-button:hover span {
    transform: translateX(3px);
}

.portal-outline-button {
    min-height: 36px;
    padding: 7px 12px;
    font-size: 12.5px;
    border: 1px solid var(--portal-line);
    background: #ffffff;
    color: var(--portal-ink);
}

.portal-outline-button:hover {
    border-color: var(--portal-red);
    color: var(--portal-red);
}

.portal-text-button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
    border: 0;
    background: none;
    color: var(--portal-red);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

.portal-text-button span {
    transition: transform 0.15s ease;
}

.portal-text-button:hover {
    color: #c8231a;
}

.portal-text-button:hover span {
    transform: translateX(3px);
}

.portal-primary-button svg {
    width: 18px;
    height: 18px;
}

/* ---------- Content area ---------- */
.account-content {
    min-width: 0;
    display: grid;
    gap: 20px;
    align-content: start;
}

.account-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 20px;
}

.account-heading h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--portal-ink);
    margin: 0 0 4px;
}

.account-heading p {
    font-size: 14px;
    color: var(--portal-muted);
    margin: 0;
}

.demo-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 9999px;
    border: 1px solid var(--portal-line);
    background: #ffffff;
    color: var(--portal-muted);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.demo-label::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

/* ---------- Stats ---------- */
.account-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.account-stats article {
    display: flex;
    gap: 14px;
    align-items: center;
    min-width: 0;
    border: 1px solid var(--portal-line);
    padding: 16px;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: var(--shadow-xs, 0 1px 2px rgba(15, 23, 42, 0.04));
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.account-stats article:hover {
    transform: translateY(-2px);
    border-color: #fecaca;
    box-shadow: var(--shadow-md, 0 6px 16px rgba(0, 0, 0, 0.06));
}

.account-stats article > div {
    min-width: 0;
}

.stat-bubble {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    color: var(--portal-red);
    background: rgba(224, 43, 32, 0.08);
    flex-shrink: 0;
}

.stat-bubble svg {
    width: 22px;
    height: 22px;
}

.stat-bubble.green {
    background: #ecfdf5;
    color: #059669;
}

.stat-bubble.rose {
    background: #fff1f2;
    color: #e11d48;
}

.stat-bubble.orange {
    background: #fff7ed;
    color: #ea580c;
}

.account-stats strong {
    font-size: 24px;
    font-weight: 800;
    color: var(--portal-ink);
    display: block;
    line-height: 1;
}

.account-stats h3 {
    font-size: 13px;
    font-weight: 700;
    margin: 5px 0 2px;
    color: var(--portal-ink);
}

.account-stats p {
    font-size: 12px;
    line-height: 1.4;
    color: var(--portal-muted);
    margin: 0;
}

/* ---------- Overview grids ---------- */
.account-upper,
.account-lower {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
}

.account-content .portal-panel {
    min-width: 0;
    padding: 22px;
}

.portal-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.portal-panel-heading h2 {
    font-size: 17px;
    font-weight: 800;
    color: var(--portal-ink);
    margin: 0;
}

.portal-empty-text {
    margin: 0;
    padding: 18px;
    border: 1px dashed var(--portal-line);
    border-radius: 12px;
    color: var(--portal-muted);
    font-size: 13px;
    text-align: center;
}

/* ---------- Appointment card ---------- */
.appointment-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.appointment-card {
    border: 1px solid var(--portal-line);
    border-radius: 14px;
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.appointment-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.appointment-cover {
    position: relative;
    height: 104px;
    overflow: hidden;
    background: linear-gradient(135deg, #0b1324 0%, #1e3a8a 100%);
}

.appointment-photo {
    position: absolute;
    inset: 0;
    background: url("/theme/img/usta-1.png") right 25% / cover no-repeat;
    opacity: 0.5;
}

.appointment-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(11, 19, 36, 0.85) 0%, rgba(11, 19, 36, 0.2) 100%);
}

.appointment-service-icon {
    position: absolute;
    left: 16px;
    bottom: 16px;
    z-index: 1;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #ffffff;
    color: var(--portal-red);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.appointment-service-icon svg {
    width: 24px;
    height: 24px;
}

.appointment-cover .portal-status {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 1;
}

.appointment-copy {
    padding: 16px 18px;
}

.appointment-copy h3 {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 800;
    color: var(--portal-ink);
}

.appointment-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    font-size: 12.5px;
    color: #475569;
    margin-bottom: 10px;
}

.appointment-meta > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.appointment-meta svg {
    width: 15px;
    height: 15px;
    color: var(--portal-red);
}

.appointment-location {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 0 0 14px;
    font-size: 12.5px;
    line-height: 1.5;
    color: #475569;
}

.appointment-location svg {
    width: 15px;
    height: 15px;
    margin-top: 2px;
    color: var(--portal-red);
}

.appointment-professional {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 12px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--portal-line);
    background: #f8fafc;
}

.appointment-professional .portal-avatar {
    width: 42px;
    height: 42px;
    margin: 0;
    font-size: 14px;
    border-width: 2px;
}

.appointment-professional > div {
    flex: 1;
    min-width: 110px;
    display: grid;
    gap: 2px;
}

.appointment-professional > div > b {
    font-size: 13.5px;
    color: var(--portal-ink);
}

.appointment-professional > div > span {
    font-size: 12.5px;
    color: var(--portal-muted);
}

.star {
    color: #f59e0b;
}

.appointment-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
    gap: 10px;
    padding: 0 18px 18px;
}

.appointment-actions button {
    min-height: 44px;
    font-size: 13.5px;
    padding: 10px 14px;
}

/* ---------- Status pill ---------- */
.portal-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #dcfce7;
    color: #15803d;
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 9999px;
    white-space: nowrap;
}

.portal-status svg {
    width: 12px;
    height: 12px;
}

.portal-status.blue {
    background: #e0f2fe;
    color: #0369a1;
}

.portal-status.neutral {
    background: #f1f5f9;
    color: #64748b;
}

/* ---------- Orders ---------- */
.account-orders {
    display: grid;
    gap: 10px;
}

.order-row {
    width: 100%;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto 14px;
    grid-template-areas: "img desc result arrow";
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--portal-line);
    border-radius: 12px;
    background: #ffffff;
    color: inherit;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.order-row:hover {
    transform: translateY(-1px);
    border-color: #fecaca;
    box-shadow: var(--shadow-sm, 0 2px 6px rgba(0, 0, 0, 0.05));
}

.order-row > span:last-child {
    grid-area: arrow;
    color: #94a3b8;
    font-size: 22px;
    line-height: 1;
}

.order-image {
    grid-area: img;
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 10px;
    background: #f1f5f9;
    color: #475569;
}

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

.order-image svg {
    width: 24px;
    height: 24px;
}

.order-description {
    grid-area: desc;
    display: grid;
    gap: 2px;
    min-width: 0;
}

.order-description strong {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--portal-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.order-description small {
    font-size: 12px;
    color: var(--portal-muted);
}

.order-result {
    grid-area: result;
    display: grid;
    justify-items: end;
    gap: 6px;
}

.order-result b {
    font-size: 14px;
    font-weight: 800;
    color: var(--portal-ink);
    white-space: nowrap;
}

/* ---------- Favorites ---------- */
.favorite-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    gap: 12px;
}

.favorite-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    padding: 18px 10px 12px;
    border: 1px solid var(--portal-line);
    border-radius: 14px;
    background: #ffffff;
    text-align: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.favorite-card:hover {
    transform: translateY(-2px);
    border-color: #fecaca;
    box-shadow: var(--shadow-md, 0 6px 16px rgba(0, 0, 0, 0.06));
}

.favorite-card .portal-avatar {
    width: 56px;
    height: 56px;
    font-size: 18px;
    margin: 0 0 10px;
}

.favorite-card h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--portal-ink);
    margin: 0 0 2px;
}

.favorite-card p {
    font-size: 12px;
    color: var(--portal-muted);
    margin: 0 0 6px;
}

.favorite-card > div {
    font-size: 12.5px;
    margin-bottom: 12px;
}

.favorite-card > div span {
    color: var(--portal-muted);
}

.favorite-card .portal-soft-button {
    width: 100%;
    min-height: 36px;
    margin-top: auto;
    padding: 7px 10px;
    font-size: 12.5px;
}

.favorite-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #fff1f2;
    color: #e11d48;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.favorite-remove svg {
    width: 15px;
    height: 15px;
}

.favorite-remove:hover {
    background: #e11d48;
    color: #ffffff;
}

/* ---------- Profile data ---------- */
.profile-data {
    display: grid;
    margin: 0 0 16px;
}

.profile-data > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px dashed var(--portal-line);
}

.profile-data > div:last-child {
    border-bottom: 0;
}

.profile-data dt {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--portal-muted);
}

.profile-data dt svg {
    width: 16px;
    height: 16px;
    color: #94a3b8;
}

.profile-data dd {
    margin: 0;
    min-width: 0;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--portal-ink);
    text-align: right;
    overflow-wrap: anywhere;
}

/* ---------- Addresses ---------- */
.address-grid {
    display: grid;
    gap: 12px;
}

.address-grid article {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--portal-line);
    border-radius: 12px;
    background: #ffffff;
}

.address-grid article > svg {
    box-sizing: border-box;
    width: 38px;
    height: 38px;
    padding: 9px;
    border-radius: 10px;
    background: rgba(224, 43, 32, 0.08);
    color: var(--portal-red);
}

.address-grid article > div {
    flex: 1;
    min-width: 0;
}

.address-grid h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--portal-ink);
    margin: 0 0 4px;
}

.address-grid p {
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--portal-muted);
    margin: 0;
    overflow-wrap: anywhere;
}

.address-grid .portal-text-button {
    margin-top: 6px;
}

/* ---------- Notification switches ---------- */
.notification-list {
    display: grid;
}

.notification-list label {
    position: relative;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px dashed var(--portal-line);
    cursor: pointer;
}

.notification-list label:last-child {
    border-bottom: 0;
}

.notification-list label > svg {
    box-sizing: border-box;
    width: 36px;
    height: 36px;
    padding: 8px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #475569;
}

.notification-list b {
    display: block;
    font-size: 13.5px;
    color: var(--portal-ink);
}

.notification-list small {
    display: block;
    font-size: 12px;
    line-height: 1.4;
    color: var(--portal-muted);
}

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

.switch-track {
    position: relative;
    width: 44px;
    height: 24px;
    border-radius: 9999px;
    background: #cbd5e1;
    transition: background 0.2s ease;
}

.switch-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
    transition: transform 0.2s ease;
}

.notification-list input:checked + .switch-track {
    background: var(--portal-red);
}

.notification-list input:checked + .switch-track::after {
    transform: translateX(20px);
}

.notification-list input:focus-visible + .switch-track {
    outline: 2px solid var(--portal-red);
    outline-offset: 2px;
}

/* ---------- JS rendered detail views ---------- */
.account-detail-panel {
    display: grid;
    gap: 16px;
}

.new-appointment {
    justify-self: start;
}

.portal-note {
    font-size: 12.5px;
    color: var(--portal-muted);
    margin: 0;
}

.portal-edit-form {
    display: grid;
    gap: 14px;
    max-width: 560px;
}

.portal-edit-form label {
    display: grid;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.portal-edit-form input,
.portal-edit-form textarea {
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
    color: var(--portal-ink);
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.portal-edit-form textarea {
    min-height: 96px;
    resize: vertical;
    line-height: 1.45;
}

.portal-edit-form input:focus,
.portal-edit-form textarea:focus {
    outline: none;
    border-color: var(--portal-red);
    box-shadow: 0 0 0 3px rgba(224, 43, 32, 0.12);
}

.portal-edit-form .portal-primary-button {
    justify-self: start;
}

.portal-empty {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 28px 16px;
    text-align: center;
    color: var(--portal-muted);
}

.portal-empty > svg {
    box-sizing: border-box;
    width: 48px;
    height: 48px;
    padding: 11px;
    border-radius: 50%;
    background: rgba(224, 43, 32, 0.08);
    color: var(--portal-red);
}

.portal-empty h3 {
    margin: 0;
    font-size: 16px;
    color: var(--portal-ink);
}

.portal-empty p {
    max-width: 380px;
    margin: 0 0 6px;
    font-size: 13px;
    line-height: 1.5;
}

.pro-dialog {
    display: grid;
    justify-items: center;
    gap: 4px;
    text-align: center;
}

.pro-dialog p {
    margin: 0;
}

/* ---------- Bottom CTA ---------- */
.account-cta {
    position: relative;
    overflow: hidden;
    background: linear-gradient(110deg, #e02b20 0%, #ff5a3c 55%, #e02b20 100%);
    color: #ffffff;
}

.account-cta::before,
.account-cta::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.account-cta::before {
    width: 320px;
    height: 320px;
    right: -80px;
    top: -160px;
}

.account-cta::after {
    width: 200px;
    height: 200px;
    left: 30%;
    bottom: -140px;
}

.account-cta-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px 32px;
    padding-block: 28px;
}

.account-cta-copy h2 {
    color: #ffffff;
    font-size: clamp(20px, 2.4vw, 26px);
    font-weight: 800;
    margin: 0 0 4px;
}

.account-cta-copy p {
    color: rgba(255, 255, 255, 0.92);
    font-size: 14px;
    margin: 0;
}

.account-cta-list {
    display: grid;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 13.5px;
    font-weight: 600;
}

.account-cta-list li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.account-cta-list svg {
    box-sizing: border-box;
    width: 20px;
    height: 20px;
    padding: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.account-cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 22px;
    border-radius: 12px;
    background: #ffffff;
    color: var(--portal-red) !important;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.account-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
}

/* ---------- Account responsive ---------- */
@media (max-width: 1200px) {
    .account-layout {
        grid-template-columns: 240px minmax(0, 1fr);
        gap: 20px;
    }
    .account-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) and (min-width: 993px) {
    .account-upper,
    .account-lower {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 992px) {
    .account-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
        padding-block: 20px 36px;
    }

    .account-sidebar {
        gap: 14px;
        padding: 16px 14px 12px;
    }

    .account-user {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        column-gap: 14px;
        row-gap: 2px;
        padding: 0 0 14px;
        text-align: left;
    }

    .account-user > .portal-avatar {
        grid-row: 1 / span 4;
        width: 64px;
        height: 64px;
        font-size: 22px;
        margin: 0;
    }

    .account-user h2 {
        font-size: 17px;
        margin: 0;
    }

    .account-user p {
        justify-content: flex-start;
        margin: 0;
    }

    .account-user .membership {
        justify-self: start;
        margin-top: 6px;
    }

    /* Navigation: horizontal scrollable chips */
    .account-navigation {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        margin-inline: -14px;
        padding: 2px 14px 6px;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .account-navigation::-webkit-scrollbar {
        display: none;
    }

    .account-navigation button {
        flex: 0 0 auto;
        width: auto;
        gap: 8px;
        min-height: 40px;
        padding: 8px 14px;
        border-color: var(--portal-line);
        border-radius: 9999px;
        background: #ffffff;
        font-size: 13px;
        scroll-snap-align: start;
    }

    .account-navigation button[aria-current="page"] {
        border-color: #fecaca;
    }

    .account-navigation button[aria-current="page"]::before {
        display: none;
    }

    .account-help {
        display: none;
    }
}

@media (max-width: 768px) {
    .account-upper,
    .account-lower {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .appointment-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .account-heading h2 {
        font-size: 20px;
    }

    .account-heading p {
        font-size: 13px;
    }

    .account-cta-inner {
        flex-direction: column;
        align-items: stretch;
        padding-block: 24px;
    }

    .account-cta-button {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .account-page .portal-hero-inner {
        min-height: 150px;
    }

    .account-content {
        gap: 16px;
    }

    .account-content .portal-panel {
        padding: 16px 14px;
    }

    .account-stats {
        gap: 10px;
    }

    .account-stats article {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 14px;
    }

    .account-stats p {
        display: none;
    }

    .stat-bubble {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

    .stat-bubble svg {
        width: 20px;
        height: 20px;
    }

    .account-stats strong {
        font-size: 22px;
    }

    .appointment-copy {
        padding: 14px;
    }

    .portal-panel-heading {
        flex-wrap: wrap;
        gap: 6px 12px;
    }

    .appointment-actions {
        grid-template-columns: minmax(0, 1fr);
        padding: 0 14px 14px;
    }

    .appointment-professional .portal-outline-button {
        flex-basis: 100%;
    }

    .order-row {
        grid-template-columns: 48px minmax(0, 1fr) 12px;
        grid-template-areas:
            "img desc arrow"
            "img result arrow";
        gap: 4px 12px;
        padding: 10px;
    }

    .order-image {
        width: 48px;
        height: 48px;
    }

    .order-result {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 6px 10px;
        margin-top: 2px;
    }

    .favorite-grid {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        gap: 10px;
    }
}

@media (max-width: 420px) {
    .profile-data > div {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .profile-data dd {
        text-align: left;
    }

    .demo-label {
        white-space: normal;
    }

    .appointment-actions {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .account-stats article,
    .appointment-card,
    .order-row,
    .favorite-card,
    .account-cta-button,
    .membership {
        transition: none;
    }
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 992px) {
    .booking-layout {
        grid-template-columns: 1fr;
    }
    .booking-sidebar {
        position: static;
    }
    .booking-date-layout {
        grid-template-columns: 1fr;
    }
    .booking-problem-layout {
        grid-template-columns: 1fr;
    }
.account-stats {
        grid-template-columns: repeat(2, 1fr);
    }
.booking-trust-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .booking-how-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .portal-hero-inner {
        min-height: auto;
        padding-block: 24px 28px;
    }
    .portal-hero-perks {
        gap: 12px;
    }
    .booking-progress {
        display: flex;
        overflow-x: auto;
        padding-bottom: 12px;
        gap: 4px;
        scrollbar-width: none;
    }
    .booking-progress::-webkit-scrollbar {
        display: none;
    }
    .booking-progress a {
        flex-shrink: 0;
        font-size: 11px;
    }
    .portal-panel {
        padding: 18px 14px;
        border-radius: 12px;
    }
    .booking-address-fields {
        grid-template-columns: 1fr;
    }
    #booking-times {
        grid-template-columns: 1fr;
    }
    .urgent-time-chip {
        grid-column: span 1;
    }
    .booking-trust-grid {
        grid-template-columns: 1fr;
    }
}