/* ── Dashboard layout ── */
.dashboard-layout {
    display: flex;
    align-items: stretch;
    background: #f4f6f8;
    padding: 2rem 1.5rem;
    gap: 1.5rem;
}

/* ── Sidebar (pnav) ── */
.pnav {
    width: 240px;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid rgba(2,128,144,0.12);
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 0 1rem;
    position: sticky;
    top: 2rem;
    align-self: flex-start;
    min-height: calc(100vh - 72px - 4rem);
}

.pnav__user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px 1.25rem;
    border-bottom: 1px solid rgba(2,128,144,0.1);
    margin-bottom: 0.75rem;
}

.pnav__avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #028090 0%, #00A896 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.pnav__avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pnav__user-name {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pnav__user-email {
    font-size: 11px;
    color: #9AA5AB;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pnav__links {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 12px;
    flex: 1;
    overflow-y: auto;
}

.pnav__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    text-decoration: none;
    color: #5C6B73;
    font-size: 14px;
    font-weight: 500;
    border-radius: 10px;
    transition: background 0.18s, color 0.18s;
}

.pnav__item:hover {
    background: var(--color-primary-light-blue);
    color: var(--color-primary-blue);
}

.pnav__item--active {
    background: var(--color-primary-light-blue);
    color: var(--color-primary-blue);
    font-weight: 700;
}

.pnav__icon {
    font-size: 15px;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.pnav__bottom {
    padding: 0 12px;
    border-top: 1px solid rgba(2,128,144,0.1);
    padding-top: 12px;
    margin-top: 12px;
}

.pnav__item--logout {
    color: #dc3545;
}

.pnav__item--logout:hover {
    background: rgba(220,53,69,0.07);
    color: #dc3545;
}

/* hide sidebar on mobile, use top navbar toggle instead */
@media (max-width: 1023px) {
    .pnav {
        display: none;
    }
}

/* ── Main content ── */
.dashboard-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.profile-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.75rem 2rem;
    box-shadow: 0 2px 16px rgba(0,0,0,0.07);
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ── Profile body (fills remaining height) ── */
.profile-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.profile-body__sections {
    flex: 1;
    display: flex;
    gap: 0;
}

.profile-section-panel {
    flex: 1;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.profile-section-panel:first-child {
    padding-left: 0;
}

.profile-section-panel:last-child {
    padding-right: 0;
}

.profile-section-divider {
    width: 1px;
    background: rgba(2,128,144,0.12);
    margin: 0 0.5rem;
    flex-shrink: 0;
}

.profile-body__notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: rgba(2,128,144,0.05);
    border: 1px solid rgba(2,128,144,0.15);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 12px;
    color: #5C6B73;
    line-height: 1.5;
    margin-top: 1.25rem;
}

.profile-body__notice i {
    color: var(--color-primary-blue);
    margin-top: 2px;
    flex-shrink: 0;
}

/* ── Horizontal profile header ── */
.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 1.25rem;
}

.profile-header__avatar {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    border: 2px solid var(--color-primary-blue);
    background: linear-gradient(135deg, rgba(2,128,144,0.07) 0%, rgba(2,128,144,0.25) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 1.6rem;
    font-weight: 400;
    color: #05668D;
}

.profile-header__img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: none;
    position: absolute;
    inset: 0;
}

.profile-header__camera {
    position: absolute;
    bottom: 0; right: 0;
    width: 24px; height: 24px;
    background: var(--color-primary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.profile-header__camera img {
    width: 12px; height: 12px;
    filter: brightness(0) invert(1);
}

.profile-header__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-header__name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.profile-header__email {
    font-size: 13px;
    color: #5C6B73;
    margin: 0;
}

.profile-header__hint {
    font-size: 11px;
    color: #9AA5AB;
    margin: 4px 0 0;
}

.profile-card__divider {
    border-top: 1px solid var(--color-primary-blue);
    margin-bottom: 1.25rem;
    opacity: 0.4;
}

/* ── Info section ── */
.info-section__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}

.info-section__header img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.info-section__title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.info-section__subtitle {
    font-size: 12px;
    color: #9AA5AB;
    margin: 0;
}

/* ── Info table ── */
.info-table {
    border: 1px solid rgba(2,128,144,0.35);
    border-radius: 12px;
    overflow: hidden;
}

.info-table__row {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-top: 1px solid rgba(2,128,144,0.2);
    gap: 8px;
}

.info-table__row--first {
    border-top: none;
}

.info-table__label {
    font-size: 13px;
    color: #555;
    width: 110px;
    flex-shrink: 0;
}

.info-table__value {
    flex: 1;
    font-size: 13px;
    color: #1a1a1a;
    word-break: break-word;
}

.info-table__lock {
    width: 14px;
    opacity: 0.4;
    flex-shrink: 0;
}

/* ── Phone field ── */
.phone-field__label {
    font-size: 13px;
    font-weight: 600;
    color: #045575;
    margin-bottom: 8px;
}

.phone-field__input-wrap {
    position: relative;
}

.phone-field__icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
}

.phone-field__input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border: 1px solid rgba(2,128,144,0.5);
    border-radius: 50px;
    font-size: 14px;
    outline: none;
}

.phone-field__input:focus {
    border-color: var(--color-primary-blue);
    box-shadow: 0 0 0 3px rgba(2,128,144,0.1);
}

.phone-field__hint {
    font-size: 12px;
    color: #9AA5AB;
    margin-top: 6px;
}

/* ── Save button ── */
.profile-save-row {
    display: flex;
    justify-content: center;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(2,128,144,0.1);
}

.profile-save-btn {
    background: linear-gradient(180deg, #028090 0%, #00A896 100%);
    border: none;
    color: #fff;
    padding: 9px 28px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.profile-save-btn:hover {
    opacity: 0.88;
}

/* ── History content wrapper ── */
.history-content {
    padding: 0;
}

.history-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ── History cards ── */
.history-link {
    text-decoration: none;
}

.history-card {
    background: #fff;
    border: 1px solid rgba(2,128,144,0.14);
    border-radius: 14px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    transition: box-shadow 0.18s, border-color 0.18s;
}

.history-card:hover {
    box-shadow: 0 4px 16px rgba(2,128,144,0.12);
    border-color: rgba(2,128,144,0.3);
}

.history-card--cancelled {
    opacity: 0.65;
    border-color: rgba(0,0,0,0.1);
}

.history-card__left {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.history-card__title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 420px;
}

.history-card__doctor {
    font-size: 13px;
    color: var(--color-primary-blue);
    margin: 0;
    font-weight: 500;
}

.history-card__doctor i,
.history-card__date i {
    font-size: 12px;
    margin-right: 4px;
    opacity: 0.7;
}

.history-card__date {
    font-size: 12px;
    color: var(--color-text-gray);
    margin: 0;
}

.history-card__right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.history-card__badge {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 50px;
    white-space: nowrap;
}

.history-card__badge--upcoming {
    background: linear-gradient(135deg, #028090, #00A896);
    color: #fff;
}

.history-card__badge--completed,
.history-card__badge--details {
    background: #E6FAF5;
    color: #00A896;
    border: 1px solid rgba(0,168,151,0.4);
}

.history-card__badge--cancelled {
    background: #f8f8f8;
    color: #999;
    border: 1px solid #ddd;
}

.history-card__badge--review {
    background: #fff8e1;
    color: #f59e0b;
    border: 1px solid rgba(245,158,11,0.35);
}

.history-card__badge--unknown {
    background: #f0f0f0;
    color: #888;
}

.history-card__review-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1.5px solid rgba(2,128,144,0.4);
    background: transparent;
    color: var(--color-primary-blue);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.18s;
}

.history-card__review-btn:hover {
    background: var(--color-primary-light-blue);
}

/* ── Help tabs ── */
.help-tabs__bar {
    display: flex;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
}

.help-tabs__btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: #fff;
    color: #028090;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.help-tabs__btn--active {
    background: linear-gradient(180deg, #028090 0%, #00A896 100%);
    color: #fff;
}

.help-panel {
    display: none;
    border: 1px solid rgba(2,128,144,0.4);
    border-radius: 16px;
    padding: 1.5rem;
}

.help-panel--active {
    display: block;
}

.help-panel__title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.help-panel__subtitle {
    font-size: 13px;
    color: #9AA5AB;
    margin-bottom: 1rem;
}

.assis-form {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.assis-form label {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    margin-top: 12px;
}

.assis-form select {
    width: 100%;
    padding: 12px 44px 12px 16px;
    border: 1.5px solid rgba(2,128,144,0.3);
    border-radius: 12px;
    font-size: 14px;
    color: #1a1a1a;
    background-color: #f8fffe;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23028090' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.assis-form select:focus {
    border-color: var(--color-primary-blue);
    box-shadow: 0 0 0 3px rgba(2,128,144,0.12);
    background-color: #fff;
}

.assis-form select option {
    color: #1a1a1a;
    padding: 8px;
}

.assis-form input,
.assis-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(2,128,144,0.4);
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    resize: vertical;
}

.assis-form input:focus,
.assis-form textarea:focus {
    border-color: var(--color-primary-blue);
    box-shadow: 0 0 0 3px rgba(2,128,144,0.1);
}

.upload-container {
    border: 1px dashed rgba(2,128,144,0.5);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    cursor: pointer;
    margin-top: 8px;
}

.assis-btn {
    align-self: center;
    margin-top: 16px;
    background: linear-gradient(180deg, #028090 0%, #00A896 100%);
    border: none;
    color: #fff;
    padding: 10px 36px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
}

.error-message {
    color: red;
    font-size: 12px;
    display: none;
    margin-top: 2px;
}

/* ── Responsive ── */
@media (max-width: 1023px) {
    .dashboard-layout {
        padding: 1rem;
        gap: 1rem;
    }

    .dashboard-content {
        min-width: 0;
    }

    /* Profile card */
    .profile-card {
        padding: 1.25rem 1rem;
    }

    /* Stack profile panels vertically */
    .profile-body__sections {
        flex-direction: column;
    }

    .profile-section-divider {
        width: 100%;
        height: 1px;
        margin: 0;
    }

    .profile-section-panel {
        padding: 1rem 0;
    }

    .profile-section-panel:first-child {
        padding-top: 0;
    }

    .profile-section-panel:last-child {
        padding-bottom: 0;
    }

    /* Info table rows: stack label above value */
    .info-table__row {
        flex-wrap: wrap;
        gap: 4px;
    }

    .info-table__label {
        width: 100%;
        font-size: 11px;
        color: #9AA5AB;
        text-transform: uppercase;
        letter-spacing: 0.4px;
    }

    .info-table__value {
        font-size: 14px;
        font-weight: 500;
    }

    .info-table__lock {
        margin-left: auto;
    }

    /* History cards: stack title/badge vertically on small screens */
    .history-card {
        flex-wrap: wrap;
        gap: 10px;
    }

    .history-card__title {
        max-width: 100%;
        white-space: normal;
    }

    .history-card__right {
        flex-direction: row;
        align-items: center;
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 600px) {
    .dashboard-layout {
        padding: 0.75rem;
    }

    .profile-card {
        padding: 1rem 0.875rem;
        border-radius: 12px;
    }

    .profile-header__avatar {
        width: 60px;
        height: 60px;
        font-size: 1.3rem;
    }

    .profile-header__name {
        font-size: 1rem;
    }

    .history-card {
        padding: 14px 14px;
    }

    .bk-pagination {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* ── Review Modal ── */
.rv-modal-dialog {
    max-width: 440px;
}

.rv-modal {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,0.14);
}

.rv-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 22px 24px 16px;
    border-bottom: 1px solid rgba(2,128,144,0.1);
}

.rv-modal__label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--color-primary-blue);
    margin: 0 0 2px;
}

.rv-modal__title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.rv-modal__close {
    background: #f4f6f8;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5C6B73;
    font-size: 14px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.18s;
}

.rv-modal__close:hover {
    background: #e0e4e6;
}

.rv-modal__doctor {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: #f8fffe;
    border-bottom: 1px solid rgba(2,128,144,0.08);
}

.rv-modal__doctor-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(2,128,144,0.2);
    flex-shrink: 0;
}

.rv-modal__doctor-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-primary-blue);
    margin: 0;
}

.rv-modal__doctor-spec {
    font-size: 12px;
    color: var(--color-text-gray);
    margin: 0;
}

.rv-modal__stars {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 24px 12px;
}

.rv-stars {
    display: flex;
    gap: 8px;
}

.rv-star {
    font-size: 28px;
    color: #d1d5db;
    cursor: pointer;
    transition: color 0.15s, transform 0.12s;
}

.rv-star:hover,
.rv-star--filled {
    color: var(--color-star-gold);
}

.rv-star:hover {
    transform: scale(1.15);
}

.rv-star-hint {
    font-size: 12px;
    color: var(--color-text-gray);
    margin: 0;
    font-weight: 500;
}

.rv-modal__form {
    padding: 8px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rv-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.rv-label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.rv-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid rgba(2,128,144,0.25);
    border-radius: 10px;
    font-size: 13px;
    outline: none;
    font-family: inherit;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.rv-input:focus {
    border-color: var(--color-primary-blue);
    box-shadow: 0 0 0 3px rgba(2,128,144,0.1);
}

.rv-textarea {
    resize: vertical;
    min-height: 90px;
}

.rv-msg {
    font-size: 13px;
    min-height: 18px;
}

.rv-submit-btn {
    background: linear-gradient(135deg, #028090 0%, #00A896 100%);
    border: none;
    color: #fff;
    padding: 11px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: opacity 0.18s;
}

.rv-submit-btn:hover {
    opacity: 0.88;
}

/* ── Booking history pagination ── */
.bk-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.bk-pagination__info {
    font-size: 13px;
    color: var(--color-text-gray);
}

.bk-pagination__controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.bk-page-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border: 1.5px solid rgba(2,128,144,0.2);
    background: #fff;
    color: var(--color-primary-blue);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.bk-page-btn:hover:not(:disabled) {
    background: var(--color-primary-light-blue);
    border-color: var(--color-primary-blue);
}

.bk-page-btn--active {
    background: linear-gradient(135deg, #028090, #00A896);
    color: #fff;
    border-color: transparent;
}

.bk-page-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.bk-page-ellipsis {
    font-size: 13px;
    color: var(--color-text-gray);
    padding: 0 4px;
}
