/* =========================================================
   Vazirmatn
   ========================================================= */

@font-face {
    font-family: 'Vazirmatn';
    src: url('/fonts/Vazirmatn-RD-Thin.ttf') format('truetype');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('/fonts/Vazirmatn-RD-ExtraLight.ttf') format('truetype');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('/fonts/Vazirmatn-RD-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('/fonts/Vazirmatn-RD-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('/fonts/Vazirmatn-RD-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('/fonts/Vazirmatn-RD-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('/fonts/Vazirmatn-RD-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('/fonts/Vazirmatn-RD-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('/fonts/VAZIRMATN-RD-BLACK.TTF') format('truetype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}


/* =========================================================
   Base
   ========================================================= */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #f59e0b;
    --info: #0891b2;
    --text: #1e293b;
    --muted: #64748b;
    --border: #e2e8f0;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 22px;
    --shadow-sm: 0 4px 14px rgba(15, 23, 42, .06);
    --shadow-md: 0 10px 30px rgba(15, 23, 42, .10);
    --shadow-lg: 0 20px 60px rgba(15, 23, 42, .16);
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);

    /* DatePicker compat */
    --dp-text: var(--text);
    --dp-surface: var(--surfaceStrong);
}


html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: 'Vazirmatn', sans-serif;
    direction: rtl;
    background: #f4f7fb;
    color: var(--text);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}


*,
*::before,
*::after {
    box-sizing: border-box;
}


button,
input,
textarea,
select {
    font-family: 'Vazirmatn', sans-serif;
}


button,
a,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}


button {
    touch-action: manipulation;
}


:focus {
    outline: none;
}


::selection {
    background: rgba(37, 99, 235, .18);
}


/* =========================================================
   Typography
   ========================================================= */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
}


a,
.btn-link {
    color: #006bb7;
}

.mt-3 {
    margin-top: 15px;
}

/* =========================================================
   Blazor Validation
   ========================================================= */

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}


.invalid {
    outline: 1px solid var(--danger);
}


.validation-message {
    color: var(--danger);
    font-size: 12px;
    margin-top: 6px;
    display: block;
}


/* =========================================================
   Blazor Error UI
   ========================================================= */

#blazor-error-ui {
    background: #fff7cc;
    bottom: 0;
    left: 0;
    box-shadow: 0 -1px 8px rgba(0, 0, 0, .15);
    display: none;
    padding: 12px calc(20px + var(--safe-right)) calc(12px + var(--safe-bottom)) calc(20px + var(--safe-left));
    position: fixed;
    width: 100%;
    z-index: 100000;
}


    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: calc(12px + var(--safe-right));
        top: 8px;
    }


/* =========================================================
   iOS Safe Area
   ========================================================= */

.status-bar-safe-area {
    display: none;
}


@supports (-webkit-touch-callout: none) {

    .status-bar-safe-area {
        display: block;
        position: sticky;
        top: 0;
        width: 100%;
        height: var(--safe-top);
        z-index: 1;
    }
}


/* =========================================================
   GLOBAL LOADING
   ========================================================= */

.global-loading-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    width: 100dvw;
    height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: calc(24px + var(--safe-top)) calc(24px + var(--safe-right)) calc(24px + var(--safe-bottom)) calc(24px + var(--safe-left));
    background: rgba(15, 23, 42, .42);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 20000;
    animation: loadingOverlayIn .18s ease-out;
}


.global-loading-box {
    width: min(320px, calc(100vw - 40px));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 28px 24px;
    border-radius: 24px;
    background: rgba(255, 255, 255, .96);
    border: 1px solid rgba(255, 255, 255, .7);
    box-shadow: 0 25px 70px rgba(0, 0, 0, .20);
    text-align: center;
}


.loading-spinner {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 4px solid #e2e8f0;
    border-top-color: var(--primary);
    animation: loadingSpin .8s linear infinite;
}


.loading-text {
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.8;
    text-align: center;
}


@keyframes loadingSpin {

    to {
        transform: rotate(360deg);
    }
}


@keyframes loadingOverlayIn {

    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}


/* =========================================================
   TOAST
   ========================================================= */

.toast-container {
    position: fixed;
    top: calc(20px + var(--safe-top));
    right: calc(20px + var(--safe-right));
    width: min(420px, calc(100vw - 40px));
    z-index: 30000;
    pointer-events: none;
    direction: rtl;
}


.custom-toast {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-height: 72px;
    padding: 15px 17px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .96);
    border: 1px solid rgba(255, 255, 255, .7);
    box-shadow: 0 15px 45px rgba(15, 23, 42, .18);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    overflow: hidden;
    animation: toastIn .28s cubic-bezier(.2, .8, .2, 1);
    pointer-events: auto;
}


    .custom-toast::before {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        right: 0;
        width: 5px;
        background: var(--primary);
    }


.toast-content {
    flex: 1;
    min-width: 0;
    padding-right: 4px;
}


.toast-title {
    margin-bottom: 3px;
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.5;
}


.toast-message {
    color: #475569;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.7;
    overflow-wrap: anywhere;
}


.toast-close {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #64748b;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, transform .15s ease;
}


    .toast-close:hover {
        background: #f1f5f9;
        color: #0f172a;
    }


    .toast-close:active {
        transform: scale(.92);
    }


/* Toast Types */

.toast-success::before {
    background: var(--success);
}


.toast-error::before {
    background: var(--danger);
}


.toast-warning::before {
    background: var(--warning);
}


.toast-info::before {
    background: var(--info);
}


.toast-success {
    background: linear-gradient( 135deg, rgba(240, 253, 244, .98), rgba(255, 255, 255, .97) );
}


.toast-error {
    background: linear-gradient( 135deg, rgba(254, 242, 242, .98), rgba(255, 255, 255, .97) );
}


.toast-warning {
    background: linear-gradient( 135deg, rgba(255, 251, 235, .98), rgba(255, 255, 255, .97) );
}


.toast-info {
    background: linear-gradient( 135deg, rgba(240, 249, 255, .98), rgba(255, 255, 255, .97) );
}


@keyframes toastIn {

    from {
        opacity: 0;
        transform: translate3d(25px, -10px, 0) scale(.96);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}


/* =========================================================
   Appointment Booking
   ========================================================= */

.booking-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr) 300px;
    gap: 15px;
    width: 100%;
    padding: 15px;
}


/* =========================================================
   Glass Card
   ========================================================= */

.glass-card {
    background: rgba(255, 255, 255, .92);
    border-radius: 18px;
    padding: 15px;
    border: 1px solid rgba(226, 232, 240, .8);
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease;
}


@media (hover: hover) {

    .glass-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }
}


/* =========================================================
   Inputs
   ========================================================= */

.inp {
    width: 100%;
    min-height: 48px;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 0 15px;
    background: #f6f8fb;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text);
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}


    .inp:focus {
        background: white;
        border-color: rgba(37, 99, 235, .35);
        box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
    }


/* =========================================================
   Buttons
   ========================================================= */

.booking-btn-primary,
.booking-btn-success,
.booking-btn-danger,
.booking-btn-warning {
    border: none;
    color: white;
    cursor: pointer;
    font-weight: 600;
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
    touch-action: manipulation;
}


.booking-btn-primary {
    width: 100%;
    min-height: 48px;
    border-radius: 12px;
    background: var(--primary);
}


.booking-btn-success,
.booking-btn-danger,
.booking-btn-warning {
    width: 40%;
    min-height: 40px;
    border-radius: 12px;
    text-align: center;
}


.booking-btn-success {
    background: var(--success);
}


.booking-btn-danger {
    background: var(--danger);
}


.booking-btn-warning {
    background: var(--warning);
}


@media (hover: hover) {

    .booking-btn-primary:hover,
    .booking-btn-success:hover,
    .booking-btn-danger:hover,
    .booking-btn-warning:hover {
        filter: brightness(.96);
        box-shadow: 0 6px 18px rgba(15, 23, 42, .12);
    }
}


.booking-btn-primary:active,
.booking-btn-success:active,
.booking-btn-danger:active,
.booking-btn-warning:active {
    transform: scale(.98);
}


/* =========================================================
   Patient
   ========================================================= */

.patient-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 15px;
    padding: 15px;
    border-radius: 12px;
    background: #f7fafc;
}


/* =========================================================
   Services
   ========================================================= */

.service-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 14px;
    cursor: pointer;
    background: white;
    border: 1px solid #edf2f7;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}


@media (hover: hover) {

    .service-card:hover {
        transform: translateY(-2px);
        border-color: var(--primary);
    }
}


.service-card.selected {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}


/* =========================================================
   Calendar
   ========================================================= */

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 10px;
}


    .calendar-header button {
        width: 40px;
        height: 40px;
        flex: 0 0 auto;
        border: none;
        border-radius: 50%;
        background: #f1f5f9;
        cursor: pointer;
        display: flex;
        justify-content: center;
        align-items: center;
        touch-action: manipulation;
    }


.week-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 10px;
    text-align: center;
    font-weight: 700;
}


.week-day {
    text-align: center;
}


.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
}


.calendar-empty {
    min-height: 90px;
}


.calendar-day {
    position: relative;
    min-height: 90px;
    background: white;
    border-radius: 16px;
    padding: 10px;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .04);
}


    .calendar-day.today {
        border: 3px solid var(--primary);
    }


        .calendar-day.today::after {
            content: 'امروز';
            position: absolute;
            top: 5px;
            left: 5px;
            background: var(--primary);
            color: white;
            padding: 2px 6px;
            border-radius: 6px;
            font-size: 10px;
        }


    .calendar-day.selected {
        background: var(--primary);
        color: white;
    }


@media (hover: hover) {

    .calendar-day:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-sm);
    }
}


.appointment-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}


.capacity-number {
    font-size: 24px;
    font-weight: 700;
}


/* =========================================================
   Capacity
   ========================================================= */

.color-guide {
    width: 170px;
    min-height: 25px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    padding: 5px;
    font-size: 12px;
}


.capacity-high {
    border-right: 6px solid #16a34a;
    background: #16a34a;
}


.capacity-medium {
    border-right: 6px solid #ffc107;
    background: #ffc107;
}


.capacity-min {
    border-right: 6px solid #ff8300;
    background: #ff8300;
}


.capacity-full {
    border-right: 6px solid #583a1a;
    background: #583a1a;
}


.capacity-low {
    border-right: 6px solid #dc2626;
    background: #dc2626;
}


.capacity-badge {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 12px;
}


/* =========================================================
   Time Grid
   ========================================================= */

.time-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 10px;
    margin-top: 15px;
}


.time-btn {
    min-height: 55px;
    border: 1px dashed #e1e1e1;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: transform .18s ease, background .18s ease;
    text-align: center;
    touch-action: manipulation;
}


    .time-btn.selected {
        background: var(--primary);
        color: white;
        border: none;
    }


@media (hover: hover) {

    .time-btn:hover {
        transform: translateY(-2px);
    }
}


/* =========================================================
   Reservation
   ========================================================= */

.day-reservation {
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 10px;
    background: #f8fafc;
    border-right: 4px solid var(--primary);
}


.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #edf2f7;
}

.summary-row-total-price {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #edf2f7;
}

small-total-price {
    padding: 3px 8px;
    border-radius: 7px;
    background: #f1f8ff;
    border: 1px solid #dceeff;
    color: #4380b5;
    font-size: smaller;
}


/* =========================================================
   Modal
   ========================================================= */

.modal-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    width: 100dvw;
    height: 100dvh;
    background: rgba(15, 23, 42, .50);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: calc(20px + var(--safe-top)) calc(20px + var(--safe-right)) calc(20px + var(--safe-bottom)) calc(20px + var(--safe-left));
    z-index: 10000;
    overflow-y: auto;
}


.modal-box {
    width: min(500px, 100%);
    max-height: calc(100dvh - 40px - var(--safe-top) - var(--safe-bottom));
    overflow-y: auto;
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: var(--shadow-lg);
}


/* =========================================================
   Modal Validation
   ========================================================= */

.modal-validation-error {
    margin-top: 5px;
    color: var(--danger);
    font-size: 13px;
    font-weight: 500;
}


.modal-validation-message {
    color: var(--danger);
    font-size: 13px;
    margin-top: 0;
    margin-bottom: 10px;
}


.modal-validation-summary-errors {
    background: #fef2f2;
    color: var(--danger);
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 15px;
}


.modal-input-validation-error {
    border: 1px solid var(--danger) !important;
}


/* =========================================================
   Timeline
   ========================================================= */

.timeline {
    margin-top: 20px;
}


.timeline-item {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}


.timeline-dot {
    width: 12px;
    height: 12px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--primary);
    margin-top: 6px;
}


.capacity-card {
    padding: 15px;
    border-radius: 15px;
    background: #eff6ff;
    margin-bottom: 15px;
}


/* =========================================================
   Scheduler
   ========================================================= */

.booking-grid {
    display: grid;
    grid-template-columns: 260px 300px minmax(0, 1fr) 280px;
    gap: 15px;
    min-height: 100dvh;
}


.scheduler {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 800px;
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}


.scheduler-row {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    align-items: center;
    min-height: 60px;
    border-radius: 12px;
    cursor: pointer;
    transition: background .18s ease;
}


    .scheduler-row.free {
        background: #f8fafc;
    }


    .scheduler-row.reserved {
        background: #fee2e2;
    }


    .scheduler-row.selected {
        background: var(--primary);
        color: white;
    }


.scheduler-time {
    text-align: center;
    font-weight: 700;
}


.day-scheduler {
    position: relative;
    min-height: 2000px;
}


.time-row {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    height: 40px;
}


.time-label {
    text-align: center;
    font-size: 13px;
    color: #64748b;
}


.time-line {
    border-top: 1px solid #e2e8f0;
}


.appointment-block {
    position: absolute;
    right: 80px;
    left: 10px;
    border-radius: 12px;
    padding: 10px;
    overflow: hidden;
    cursor: pointer;
}


.visit {
    background: #dbeafe;
    border-right: 5px solid var(--primary);
}


.sono {
    background: #fef3c7;
    border-right: 5px solid var(--warning);
}


.lab {
    background: #dcfce7;
    border-right: 5px solid var(--success);
}


/* =========================================================
   Server
   ========================================================= */

.server-card {
    border-radius: 20px;
    border: none;
    transition: transform .2s ease;
}


@media (hover: hover) {

    .server-card:hover {
        transform: translateY(-3px);
    }
}


.server-icon {
    font-size: 80px;
}


.server-value {
    font-size: 22px;
    font-weight: 600;
}


.server-title {
    color: #6c757d;
    font-size: 14px;
}


.server-section {
    border-radius: 15px;
    background: #f8f9fa;
    padding: 15px;
}


/* =========================================================
   Foreign National
   ========================================================= */

.foreign-national-option {
    direction: rtl;
    margin-bottom: 15px;
}


    .foreign-national-option label {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        cursor: pointer;
        user-select: none;
    }


    .foreign-national-option input[type="checkbox"] {
        width: 18px;
        height: 18px;
        cursor: pointer;
        margin: 0;
    }


/* =========================================================
   Responsive - Tablet
   ========================================================= */

@media (max-width: 1100px) {

    .booking-layout {
        grid-template-columns: 1fr;
    }

    .booking-grid {
        grid-template-columns: 1fr 1fr;
    }

    .time-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}


/* =========================================================
   Tablet - iPad / Samsung Tablet
   ========================================================= */

@media (min-width: 768px) and (max-width: 1024px) {

    .booking-layout {
        padding: 12px;
        gap: 12px;
    }

    .glass-card {
        padding: 16px;
    }

    .calendar-grid {
        gap: 8px;
    }

    .calendar-day {
        min-height: 82px;
        padding: 8px;
    }

    .time-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 8px;
    }

    .booking-grid {
        grid-template-columns: 1fr;
    }

    .toast-container {
        width: min(440px, calc(100vw - 32px));
        top: calc(16px + var(--safe-top));
        right: calc(16px + var(--safe-right));
    }
}


/* =========================================================
   Mobile - iPhone / Samsung
   ========================================================= */

@media (max-width: 767px) {

    html,
    body {
        font-size: 14px;
    }


    .booking-layout {
        display: flex;
        flex-direction: column;
        padding: 8px calc(8px + var(--safe-right)) calc(12px + var(--safe-bottom)) calc(8px + var(--safe-left));
        gap: 10px;
    }


    .glass-card {
        padding: 12px;
        margin: 0;
        border-radius: 16px;
    }


    .booking-grid {
        display: flex;
        flex-direction: column;
        min-height: auto;
        gap: 10px;
    }


    .calendar-grid {
        gap: 5px;
    }


    .calendar-empty {
        min-height: 60px;
    }


    .calendar-day {
        min-height: 64px;
        padding: 6px;
        border-radius: 12px;
        font-size: 12px;
    }


        .calendar-day.today {
            border-width: 2px;
        }


            .calendar-day.today::after {
                top: 3px;
                left: 3px;
                font-size: 8px;
                padding: 2px 4px;
            }


    .capacity-number {
        font-size: 19px;
    }


    .week-row {
        font-size: 11px;
    }


    .time-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
    }


    .time-btn {
        min-height: 48px;
        border-radius: 10px;
    }


    .color-guide {
        width: 100%;
        min-height: 30px;
    }


    .booking-btn-primary {
        min-height: 50px;
    }


    .booking-btn-success,
    .booking-btn-danger,
    .booking-btn-warning {
        width: 100%;
        min-height: 44px;
    }


    .calendar-header {
        margin-bottom: 12px;
    }


        .calendar-header button {
            width: 42px;
            height: 42px;
        }


    /* -----------------------------------------
       Modal
       ----------------------------------------- */

    .modal-overlay {
        align-items: flex-end;
        padding: 10px calc(10px + var(--safe-right)) calc(10px + var(--safe-bottom)) calc(10px + var(--safe-left));
    }


    .modal-box {
        width: 100%;
        max-height: calc(92dvh - var(--safe-top) - var(--safe-bottom));
        border-radius: 22px 22px 16px 16px;
        padding: 20px 16px calc(20px + var(--safe-bottom)) 16px;
        animation: modalMobileIn .22s ease-out;
    }


    @keyframes modalMobileIn {

        from {
            transform: translateY(30px);
            opacity: 0;
        }

        to {
            transform: translateY(0);
            opacity: 1;
        }
    }


    /* -----------------------------------------
       Toast
       ----------------------------------------- */

    .toast-container {
        top: auto;
        right: calc(10px + var(--safe-right));
        bottom: calc(12px + var(--safe-bottom));
        left: calc(10px + var(--safe-left));
        width: auto;
    }


    .custom-toast {
        width: 100%;
        min-height: 68px;
        padding: 13px 14px;
        border-radius: 17px;
    }


    .toast-title {
        font-size: 13px;
    }


    .toast-message {
        font-size: 12px;
        line-height: 1.8;
    }


    .toast-close {
        width: 34px;
        height: 34px;
    }


    /* -----------------------------------------
       Loading
       ----------------------------------------- */

    .global-loading-box {
        width: min( 290px, calc(100vw - 40px) );
        padding: 25px 20px;
        border-radius: 22px;
    }


    .loading-spinner {
        width: 44px;
        height: 44px;
    }


    .loading-text {
        font-size: 14px;
    }


    /* -----------------------------------------
       Scheduler
       ----------------------------------------- */

    .scheduler {
        max-height: 70dvh;
    }


    .scheduler-row {
        grid-template-columns: 70px minmax(0, 1fr);
        min-height: 54px;
    }


    .appointment-block {
        right: 65px;
        left: 5px;
        padding: 8px;
        border-radius: 10px;
    }
}


/* =========================================================
   Very Small Phones
   ========================================================= */

@media (max-width: 380px) {

    .calendar-day {
        min-height: 56px;
        padding: 4px;
        font-size: 11px;
    }


    .calendar-grid {
        gap: 3px;
    }


    .time-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }


    .custom-toast {
        padding: 12px;
    }
}


/* =========================================================
   Reduced Motion
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}


/* =========================================================
   LOGIN
   ========================================================= */

.login-page {
    min-height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    direction: rtl;
    font-family: Vazirmatn, "Segoe UI", sans-serif;
    background: linear-gradient(135deg, rgb(248, 245, 255) 0%, rgb(242, 246, 255) 45%, rgb(249, 251, 255) 100%);
}

.login-card {
    width: min(430px, 100%);
    background: rgba(255,255,255,.94);
    border: 1px solid rgba(255,255,255,.8);
    border-radius: 28px;
    padding: 38px 32px;
    box-shadow: 0 25px 70px rgba(15,23,42,.12), 0 4px 15px rgba(15,23,42,.05);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}


/* Logo */

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 34px;
    background: linear-gradient(135deg,#ec4899,#8b5cf6);
    box-shadow: 0 12px 30px rgba(236,72,153,.25);
}

.login-logo h1 {
    margin: 0;
    font-size: 25px;
    font-weight: 800;
    color: #172033;
}

.login-logo p {
    margin: 10px 0 0;
    color: #64748b;
    font-size: 14px;
    font-weight: 400;
}


/* Fields */

.login-field {
    margin-bottom: 20px;
}

    .login-field label {
        display: block;
        margin-bottom: 8px;
        font-size: 14px;
        font-weight: 700;
        color: #334155;
    }

.phone-input-wrapper {
    height: 54px;
    display: flex;
    align-items: center;
    direction: ltr;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    transition: .2s;
}

    .phone-input-wrapper:focus-within {
        border-color: #ec4899;
        box-shadow: 0 0 0 4px rgba(236,72,153,.10);
    }

.phone-prefix {
    padding: 0 14px;
    border-right: 1px solid #e2e8f0;
    font-size: 19px;
}

.phone-input {
    flex: 1;
    height: 100%;
    border: 0 !important;
    outline: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 14px;
    direction: ltr;
    text-align: left;
    font-family: Arial,sans-serif !important;
    font-size: 16px;
    font-weight: 600 !important;
}


/* Button */

.login-button {
    width: 100%;
    height: 54px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg,#ec4899,#8b5cf6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(236,72,153,.22);
    transition: transform .2s, box-shadow .2s;
}

    .login-button:hover:not(:disabled) {
        transform: translateY(-1px);
        box-shadow: 0 14px 30px rgba(236,72,153,.28);
    }

    .login-button:active:not(:disabled) {
        transform: scale(.98);
    }

    .login-button:disabled {
        opacity: .7;
        cursor: wait;
    }

.button-arrow {
    font-size: 20px;
}


/* Spinner */

.button-spinner {
    width: 19px;
    height: 19px;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: white;
    border-radius: 50%;
    animation: login-spin .7s linear infinite;
}

@keyframes login-spin {
    to {
        transform: rotate(360deg);
    }
}


/* OTP */

.otp-section {
    text-align: center;
}

.otp-icon {
    width: 62px;
    height: 62px;
    margin: 0 auto 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ecfdf5;
    color: #16a34a;
    font-size: 28px;
    font-weight: 900;
}

.otp-section h2 {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 800;
    color: #172033;
}

.otp-description {
    margin-bottom: 26px;
    color: #64748b;
    font-size: 14px;
    line-height: 2;
}

    .otp-description strong {
        direction: ltr;
        display: inline-block;
        color: #334155;
        font-family: Arial,sans-serif !important;
        font-weight: 700;
    }

.otp-input {
    width: 100%;
    height: 60px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    outline: none;
    text-align: center !important;
    direction: ltr;
    letter-spacing: 10px;
    padding-left: 10px;
    font-family: Arial,sans-serif !important;
    font-size: 24px;
    font-weight: 700 !important;
}

    .otp-input:focus {
        border-color: #ec4899;
        box-shadow: 0 0 0 4px rgba(236,72,153,.10);
    }


/* Error */

.login-error {
    margin: -5px 0 18px;
    padding: 11px 13px;
    border-radius: 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    font-size: 13px;
    text-align: right;
}


/* Change number */

.change-number-button {
    width: 100%;
    margin-top: 14px;
    height: 45px;
    border: 0;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    font-size: 13px;
}

    .change-number-button:hover {
        color: #ec4899;
    }


/* Validation */

.login-field .validation-message {
    margin-top: 7px;
    color: #dc2626;
    font-size: 12px;
}


/* Mobile */

@media (max-width: 600px) {

    .login-page {
        padding: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right));
        align-items: center;
    }

    .login-card {
        padding: 30px 22px;
        border-radius: 24px;
    }

    .login-logo {
        margin-bottom: 27px;
    }

    .login-logo-icon {
        width: 64px;
        height: 64px;
        border-radius: 19px;
        font-size: 30px;
    }

    .login-logo h1 {
        font-size: 22px;
    }

    .login-button {
        height: 56px;
    }
}


/* iPhone / Samsung portrait */

@media (max-width: 430px) {

    .login-page {
        padding: 16px;
    }

    .login-card {
        width: 100%;
        padding: 28px 20px;
    }

    .login-logo-icon {
        width: 60px;
        height: 60px;
    }

    .login-logo h1 {
        font-size: 21px;
    }

    .phone-input-wrapper {
        height: 56px;
    }

    .otp-input {
        height: 58px;
        font-size: 22px;
    }
}


/* iPad / Samsung Tablet */

@media (min-width: 601px) and (max-width: 1100px) {

    .login-card {
        width: 440px;
    }
}


/* Landscape mobile */

@media (max-height: 600px) and (orientation: landscape) {

    .login-page {
        align-items: flex-start;
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .login-card {
        padding: 22px 28px;
    }

    .login-logo {
        margin-bottom: 18px;
    }

    .login-logo-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 10px;
    }
}




/* Login Style */

* {
    box-sizing: border-box;
}


.login-page {
    min-height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    direction: rtl;
    font-family: "Vazirmatn", "Segoe UI", sans-serif;
    background: linear-gradient( 135deg, #f8f5ff 0%, #f2f6ff 45%, #f9fbff 100% );
}


/* ========================================= */
/* Background Shapes                         */
/* ========================================= */

.background-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    opacity: .45;
    pointer-events: none;
}


.shape-1 {
    width: 420px;
    height: 420px;
    top: -180px;
    right: -120px;
    background: radial-gradient( circle, rgba(137, 95, 255, .22), transparent 70% );
}


.shape-2 {
    width: 500px;
    height: 500px;
    bottom: -260px;
    left: -180px;
    background: radial-gradient( circle, rgba(67, 154, 255, .18), transparent 70% );
}


.shape-3 {
    width: 250px;
    height: 250px;
    top: 45%;
    left: 25%;
    background: radial-gradient( circle, rgba(220, 100, 200, .10), transparent 70% );
}


/* ========================================= */
/* Wrapper                                   */
/* ========================================= */

.login-wrapper {
    width: 100%;
    max-width: 470px;
    padding: 25px;
    position: relative;
    z-index: 2;
    animation: loginAppear .6s ease;
}


@keyframes loginAppear {

    from {
        opacity: 0;
        transform: translateY(20px) scale(.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* ========================================= */
/* Card                                      */
/* ========================================= */

.login-card {
    padding: 42px 40px 25px;
    border-radius: 28px;
    background: rgba(255, 255, 255, .78);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, .85);
    box-shadow: 0 25px 70px rgba(60, 45, 100, .12);
}


/* ========================================= */
/* Brand                                     */
/* ========================================= */

.brand {
    text-align: center;
    margin-bottom: 38px;
}

.brand-logo {
    width: 82px;
    height: 82px;

    margin: 0 auto 16px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 24px;

    background: rgba(255, 255, 255, .9);

    border: 1px solid rgba(255, 255, 255, .95);

    box-shadow:
        0 14px 35px rgba(70, 50, 110, .14);

    overflow: hidden;
}

.brand-logo img {
    width: 72px;
    height: 72px;

    object-fit: contain;

    display: block;
}
.brand-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    color: white;
    font-size: 28px;
    background: linear-gradient( 135deg, #8064e8, #a878e8 );
    box-shadow: 0 12px 25px rgba(128, 100, 232, .30);
}


.brand-name {
    font-size: 23px;
    font-weight: 800;
    color: #262333;
}


.brand-subtitle {
    margin-top: 6px;
    font-size: 13px;
    color: #8b8798;
}


/* ========================================= */
/* Content                                   */
/* ========================================= */

.login-content {
    animation: contentAppear .35s ease;
}


@keyframes contentAppear {

    from {
        opacity: 0;
        transform: translateX(10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}


.login-title {
    font-size: 25px;
    font-weight: 800;
    color: #282435;
    text-align: center;
}


.login-description {
    margin-top: 9px;
    margin-bottom: 30px;
    text-align: center;
    font-size: 14px;
    line-height: 1.8;
    color: #8a8795;
}


    .login-description strong {
        color: #6852bd;
        direction: ltr;
        display: inline-block;
    }


/* ========================================= */
/* Input                                     */
/* ========================================= */

.input-wrapper {
    margin-bottom: 20px;
}


    .input-wrapper label {
        display: block;
        margin-bottom: 9px;
        font-size: 13px;
        font-weight: 700;
        color: #4a4655;
    }


.input-container {
    position: relative;
}


.input-icon {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    font-size: 18px;
    color: #927de0;
    z-index: 2;
}


.login-input {
    width: 100%;
    height: 55px;
    border-radius: 15px;
    border: 1px solid #e5e1ed;
    background: rgba(255,255,255,.72);
    padding: 0 48px 0 16px;
    font-size: 16px;
    color: #302c39;
    outline: none;
    transition: .2s ease;
}


    .login-input:focus {
        border-color: #8b72df;
        background: white;
        box-shadow: 0 0 0 4px rgba(139,114,223,.10);
    }


    .login-input::placeholder {
        color: #b4afbd;
    }


/* ========================================= */
/* OTP                                       */
/* ========================================= */

.otp-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #6e55c8;
    font-size: 25px;
    font-weight: bold;
    background: rgba(126, 99, 222, .10);
}


.otp-input {
    width: 100%;
    height: 65px;
    border-radius: 16px;
    border: 1px solid #e2deeb;
    background: white;
    text-align: center;
    letter-spacing: 14px;
    padding-right: 14px;
    font-size: 25px;
    font-weight: 800;
    color: #49358e;
    outline: none;
    transition: .2s ease;
}


    .otp-input:focus {
        border-color: #8b72df;
        box-shadow: 0 0 0 4px rgba(139,114,223,.10);
    }


/* ========================================= */
/* Error                                     */
/* ========================================= */

.error-message {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px 14px;
    margin-bottom: 18px;
    border-radius: 12px;
    background: #fff1f2;
    color: #c43f52;
    font-size: 13px;
    line-height: 1.7;
}


.error-icon {
    width: 21px;
    height: 21px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    font-size: 12px;
    font-weight: bold;
    background: #df5668;
}


/* ========================================= */
/* Button                                    */
/* ========================================= */

.login-button {
    width: 100%;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    border: none;
    border-radius: 15px;
    color: white;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient( 135deg, #7458d1, #9872e5 );
    box-shadow: 0 10px 25px rgba(116,88,209,.25);
    transition: .2s ease;
}


    .login-button:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 14px 30px rgba(116,88,209,.32);
    }


    .login-button:active:not(:disabled) {
        transform: translateY(0);
    }


    .login-button:disabled {
        opacity: .65;
        cursor: not-allowed;
    }


.button-arrow {
    font-size: 20px;
    transition: .2s ease;
}


.login-button:hover
.button-arrow {
    transform: translateX(-4px);
}


/* ========================================= */
/* Spinner                                   */
/* ========================================= */

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: white;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}


@keyframes spin {

    to {
        transform: rotate(360deg);
    }
}


/* ========================================= */
/* Change phone                              */
/* ========================================= */

.change-phone-button {
    width: 100%;
    margin-top: 15px;
    padding: 8px;
    border: none;
    background: transparent;
    color: #7564a8;
    font-size: 13px;
    cursor: pointer;
}


    .change-phone-button:hover {
        color: #5338a1;
    }


/* ========================================= */
/* Footer                                    */
/* ========================================= */

.login-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(0,0,0,.06);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 9px;
    color: #aaa6b2;
    font-size: 11px;
}


.footer-dot {
    color: #c4bfd0;
}


/* ========================================= */
/* Mobile                                    */
/* ========================================= */

@media (max-width: 520px) {

    .login-wrapper {
        padding: 15px;
    }


    .login-card {
        padding: 32px 24px 22px;
        border-radius: 23px;
    }


    .brand {
        margin-bottom: 30px;
    }


    .login-title {
        font-size: 22px;
    }


    .otp-input {
        letter-spacing: 10px;
    }
}



/* ========================================== */
/* Main Layout                                */
/* ========================================== */

.main-layout {
    min-height: 100vh;
    direction: rtl;
    background: #f7f7fa;
}


.topbar {
    height: 76px;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid #eceaf0;
    position: relative;
    z-index: 100;
}


.app-title {
    display: flex;
    align-items: center;
    gap: 12px;
}


.app-logo {
    width: 43px;
    height: 43px;
    min-width: 43px;
    max-width: 43px;
    min-height: 43px;
    max-height: 43px;
    flex: 0 0 43px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border-radius: 13px;
    border: 1px solid #baafdb;
    background: #ffffff;
    box-shadow: 0 7px 18px rgba(116, 88, 209, .22);
}

    .app-logo img {
        display: block;
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        object-position: center;
        margin: 0;
        padding: 0;
    }


.app-name {
    font-size: 15px;
    font-weight: 800;
    color: #302c3b;
}


.app-caption {
    margin-top: 2px;
    font-size: 11px;
    color: #9b97a4;
}


/* ========================================= */
/* User Menu                                 */
/* ========================================= */

.user-menu {
    position: relative;
}


    .user-menu summary {
        list-style: none;
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 6px 10px;
        border-radius: 14px;
        cursor: pointer;
        transition: .2s ease;
    }


        .user-menu summary::-webkit-details-marker {
            display: none;
        }


        .user-menu summary:hover {
            background: #f5f3fa;
        }


.user-avatar,
.large-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    color: #6349b6;
    font-weight: 800;
    background: linear-gradient( 135deg, #eee8ff, #ded5ff );
}


.user-avatar {
    width: 42px;
    height: 42px;
    font-size: 15px;
}


.user-info {
    min-width: 100px;
}


.user-name {
    font-size: 13px;
    font-weight: 800;
    color: #373340;
    white-space: nowrap;
}


.user-role {
    margin-top: 2px;
    font-size: 10px;
    color: #8d8799;
}


.menu-arrow {
    margin-right: 5px;
    color: #aaa5b2;
    font-size: 15px;
}


/* ========================================= */
/* Dropdown                                  */
/* ========================================= */

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 285px;
    padding: 10px;
    border-radius: 18px;
    background: white;
    border: 1px solid #ece9f1;
    box-shadow: 0 20px 45px rgba(45,35,75,.13);
    animation: dropdownAppear .18s ease;
}


@keyframes dropdownAppear {

    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
}


.large-avatar {
    width: 46px;
    height: 46px;
    font-size: 16px;
}


.dropdown-name {
    font-size: 14px;
    font-weight: 800;
    color: #302c39;
}


.dropdown-role {
    margin-top: 4px;
    font-size: 11px;
    color: #8d8798;
}


.dropdown-divider {
    height: 1px;
    margin: 7px 4px;
    background: #efedf2;
}


.user-detail {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: #686371;
    font-size: 12px;
}


.logout-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-radius: 12px;
    text-decoration: none;
    color: #d64f61;
    font-size: 13px;
    font-weight: 700;
    transition: .2s ease;
}


    .logout-button:hover {
        background: #fff1f3;
        color: #c8394e;
    }


.login-link {
    padding: 9px 18px;
    border-radius: 11px;
    color: white;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    background: linear-gradient( 135deg, #7458d1, #9872e5 );
}


.page-content {
    min-height: calc(100vh - 76px);
    padding: 25px;
}


@media (max-width: 600px) {

    .topbar {
        padding: 0 15px;
    }


    .app-caption {
        display: none;
    }


    .user-info {
        display: none;
    }


    .user-dropdown {
        left: -5px;
        width: 260px;
    }


    .page-content {
        padding: 15px;
    }
}







/* =========================================================
   Reserved Bookings
   ========================================================= */

.reserved-bookings-card {
    padding: 20px;
    overflow: hidden;
}


/* ---------------------------------------------------------
   Header
   --------------------------------------------------------- */

.reserved-bookings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #edf0f5;
}

.reserved-bookings-title {
    margin: 0;
    color: #252b3a;
    font-size: 19px;
    font-weight: 800;
}

.reserved-bookings-subtitle {
    margin-top: 5px;
    color: #8a93a3;
    font-size: 12px;
}


/* ---------------------------------------------------------
   Counter
   --------------------------------------------------------- */

.reserved-count {
    min-width: 65px;
    height: 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient( 135deg, rgba(116, 88, 209, .10), rgba(152, 114, 229, .08) );
    border: 1px solid rgba(116, 88, 209, .12);
}

    .reserved-count span {
        color: #6852bd;
        font-size: 18px;
        font-weight: 800;
        line-height: 1;
    }

    .reserved-count small {
        margin-top: 4px;
        color: #8c849d;
        font-size: 10px;
    }


/* ---------------------------------------------------------
   Grid
   --------------------------------------------------------- */

.reserved-bookings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 14px;
    max-height: 650px;
    overflow-y: auto;
    padding: 3px 4px 5px 2px;
    scrollbar-width: thin;
    scrollbar-color: #cfc7e8 transparent;
}


/* ---------------------------------------------------------
   Booking Card
   --------------------------------------------------------- */

.reserved-booking-item {
    position: relative;
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 125px;
    padding: 10px;
    background: rgba(255, 255, 255, .92);
    border: 1px solid #ece9f2;
    border-radius: 17px;
    box-shadow: 0 4px 14px rgba(45, 35, 75, .055);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

@media (hover: hover) {

    .reserved-booking-item:hover {
        transform: translateY(-2px);
        border-color: rgba(116, 88, 209, .22);
        box-shadow: 0 10px 28px rgba(45, 35, 75, .10);
    }
}


/* ---------------------------------------------------------
   Time
   --------------------------------------------------------- */

.reserved-time {
    min-height: 92px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    justify-content: center;
    border-radius: 15px;
    background: linear-gradient( 145deg, #f0ebff, #e8e1ff );
    border: 1px solid rgba(116, 88, 209, .12);
}

.reserved-time-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 31px;
    height: 31px;
    margin-bottom: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .75);
    font-size: 15px;
}

.reserved-time-value {
    direction: ltr;
    color: #5d45aa;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: .5px;
}


/* ---------------------------------------------------------
   Patient Information
   --------------------------------------------------------- */

.reserved-patient-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.reserved-patient-name {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 2px;
    color: #292532;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reserved-info-icon {
    flex: 0 0 auto;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #f4f1ff;
    font-size: 12px;
}

.reserved-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.reserved-info-label {
    flex: 0 0 auto;
    color: #96919f;
    font-size: 13px;
    font-weight: 500;
}

.reserved-info-value {
    min-width: 0;
    color: #55505f;
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ltr {
    direction: ltr;
    text-align: left;
}


/* ---------------------------------------------------------
   Reservation Method
   --------------------------------------------------------- */

.reserved-method-badge {
    max-width: 110px;
    padding: 3px 8px;
    border-radius: 7px;
    background: #f1f8ff;
    border: 1px solid #dceeff;
    color: #4380b5;
    font-size: 9px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* ---------------------------------------------------------
   Actions
   --------------------------------------------------------- */

.reserved-booking-actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    justify-content: center;
}


.resend-sms-button {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 12px;
    background: #f0fdf4;
    color: #16a34a;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(22, 163, 74, .08);
    transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}

    .resend-sms-button:hover {
        transform: translateY(-2px);
        background: #16a34a;
        color: white;
        box-shadow: 0 7px 18px rgba(22, 163, 74, .20);
    }

    .resend-sms-button:active {
        transform: scale(.94);
    }

.sms-icon {
    font-size: 17px;
}

.sms-text {
    display: none;
}

.transfer-button {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 12px;
    background: #fdf5f0;
    color: #a36416;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(22, 163, 74, .08);
    transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}

    .transfer-button:hover {
        transform: translateY(-2px);
        background: #a35116;
        color: white;
        box-shadow: 0 7px 18px rgba(22, 163, 74, .20);
    }

    .transfer-button:active {
        transform: scale(.94);
    }

.transfer-icon {
    font-size: 17px;
}

.transfer-text {
    display: none;
}


.payment-button {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 12px;
    background: #f6ecff;
    color: #a36416;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(22, 163, 74, .08);
    transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}

    .payment-button:hover {
        transform: translateY(-2px);
        background: #c48bf6;
        color: white;
        box-shadow: 0 7px 18px rgba(22, 163, 74, .20);
    }

    .payment-button:active {
        transform: scale(.94);
    }

.payment-icon {
    font-size: 17px;
}

.payment-text {
    display: none;
}


.cancel-reservation-button {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 12px;
    background: #c7b9b9;
    color: #a36416;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(22, 163, 74, .08);
    transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}

    .cancel-reservation-button:hover {
        transform: translateY(-2px);
        background: #d68181;
        color: white;
        box-shadow: 0 7px 18px rgba(22, 163, 74, .20);
    }

    .cancel-reservation-button:active {
        transform: scale(.94);
    }

.cancel-reservation-icon {
    font-size: 17px;
}

.cancel-reservation-text {
    display: none;
}

/* ---------------------------------------------------------
   Empty State
   --------------------------------------------------------- */

.reserved-empty {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 18px;
    background: linear-gradient( 145deg, #faf9ff, #f7f9fc );
    border: 1px dashed #ddd8eb;
}

.reserved-empty-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    border-radius: 50%;
    background: #f0ebff;
    font-size: 26px;
}

.reserved-empty-title {
    color: #4a4655;
    font-size: 14px;
    font-weight: 800;
}

.reserved-empty-text {
    margin-top: 6px;
    color: #96919f;
    font-size: 12px;
}


/* =========================================================
   Tablet
   ========================================================= */

@media (max-width: 1100px) {

    .reserved-bookings-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .reserved-booking-item {
        grid-template-columns: 72px minmax(0, 1fr) auto;
        gap: 10px;
    }

    .reserved-time {
        min-height: 88px;
    }

    .reserved-time-value {
        font-size: 19px;
    }
}


/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 767px) {

    .reserved-bookings-card {
        padding: 14px;
    }

    .reserved-bookings-header {
        margin-bottom: 15px;
    }

    .reserved-bookings-title {
        font-size: 16px;
    }

    .reserved-bookings-subtitle {
        font-size: 11px;
    }

    .reserved-count {
        min-width: 55px;
        height: 46px;
    }

    .reserved-bookings-grid {
        grid-template-columns: 1fr;
        max-height: none;
        gap: 10px;
        padding: 2px;
    }

    .reserved-booking-item {
        grid-template-columns: 70px minmax(0, 1fr) auto;
        min-height: 115px;
        padding: 11px;
        border-radius: 15px;
        gap: 10px;
    }

    .reserved-time {
        min-height: 90px;
    }

    .reserved-time-value {
        font-size: 18px;
    }

    .reserved-patient-name {
        font-size: 13px;
    }

    .reserved-info-row {
        gap: 5px;
    }

    .reserved-info-label {
        font-size: 9px;
    }

    .reserved-info-value {
        font-size: 10px;
    }

    .resend-sms-button {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .transfer-button {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }
}


/* =========================================================
   Very Small Phones
   ========================================================= */

@media (max-width: 400px) {

    .reserved-booking-item {
        grid-template-columns: 62px minmax(0, 1fr) 36px;
        gap: 8px;
        padding: 9px;
    }

    .reserved-time {
        min-height: 82px;
    }

    .reserved-time-value {
        font-size: 16px;
    }

    .reserved-time-icon {
        width: 27px;
        height: 27px;
        font-size: 13px;
    }

    .reserved-patient-name {
        font-size: 12px;
    }

    .reserved-info-label {
        font-size: 8px;
    }

    .reserved-info-value {
        font-size: 9px;
    }

    .reserved-method-badge {
        max-width: 80px;
        font-size: 8px;
    }
}



/* =========================================================
   Reserved Patients - Toggle Button
   ========================================================= */

.reserved-list-toggle {
    width: 100%;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 18px;
    border: 1px solid rgba(116, 88, 209, .15);
    border-radius: 14px;
    background: linear-gradient( 135deg, rgba(116, 88, 209, .08), rgba(152, 114, 229, .12) );
    color: #59429f;
    font-family: "Vazirmatn", sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 5px 16px rgba(80, 60, 130, .06);
    transition: background .2s ease, border-color .2s ease, box-shadow .2s ease, transform .15s ease;
}


/* آیکن فلش */

.reserved-toggle-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: rgba(116, 88, 209, .12);
    color: #7458d1;
    font-size: 11px;
    font-weight: 900;
    transition: transform .2s ease, background .2s ease;
}


/* تعداد نوبت‌ها */

.reserved-count-badge {
    min-width: 27px;
    height: 27px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: linear-gradient( 135deg, #7458d1, #9872e5 );
    color: white;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(116, 88, 209, .20);
}


/* Hover */

@media (hover: hover) {

    .reserved-list-toggle:hover {
        background: linear-gradient( 135deg, rgba(116, 88, 209, .13), rgba(152, 114, 229, .18) );
        border-color: rgba(116, 88, 209, .28);
        box-shadow: 0 8px 22px rgba(80, 60, 130, .10);
        transform: translateY(-1px);
    }

        .reserved-list-toggle:hover .reserved-toggle-icon {
            background: rgba(116, 88, 209, .18);
        }
}


/* Active */

.reserved-list-toggle:active {
    transform: scale(.985);
}


/* وقتی لیست باز است */

.reserved-list-toggle.is-open {
    background: linear-gradient( 135deg, rgba(116, 88, 209, .14), rgba(152, 114, 229, .20) );
    border-color: rgba(116, 88, 209, .25);
}

    .reserved-list-toggle.is-open .reserved-toggle-icon {
        background: #7458d1;
        color: white;
    }


/* موبایل */

@media (max-width: 600px) {

    .reserved-list-toggle {
        min-height: 50px;
        padding: 9px 12px;
        border-radius: 13px;
        font-size: 13px;
    }

    .reserved-toggle-icon {
        width: 26px;
        height: 26px;
        border-radius: 8px;
    }

    .reserved-count-badge {
        min-width: 25px;
        height: 25px;
        padding: 0 7px;
    }
}

.reservation-sms-button {
    min-height: 38px;
    padding: 7px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid rgba(116, 88, 209, .18);
    border-radius: 10px;
    background: rgba(116, 88, 209, .07);
    color: #674fb7;
    font-family: "Vazirmatn", sans-serif;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .15s ease, box-shadow .2s ease;
}

    .reservation-sms-button:hover {
        background: linear-gradient( 135deg, #7458d1, #9872e5 );
        border-color: transparent;
        color: white;
        box-shadow: 0 6px 16px rgba(116, 88, 209, .22);
        transform: translateY(-1px);
    }

    .reservation-sms-button:active {
        transform: scale(.96);
    }

    .reservation-sms-button span:first-child {
        font-size: 15px;
    }

@media (max-width: 600px) {
    .reservation-sms-button {
        width: 100%;
        min-height: 42px;
    }
}


/* =========================================================
   Confirm Dialog
   ========================================================= */

.confirm-overlay {
    position: fixed;
    inset: 0;
    width: 100dvw;
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, .48);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    z-index: 50000;
    animation: confirmOverlayIn .18s ease-out;
}


.confirm-dialog {
    width: min(420px, 100%);
    padding: 28px 26px 22px;
    border-radius: 24px;
    background: rgba(255,255,255,.96);
    border: 1px solid rgba(255,255,255,.85);
    box-shadow: 0 25px 70px rgba(30,20,60,.20), 0 5px 20px rgba(30,20,60,.08);
    text-align: center;
    animation: confirmDialogIn .22s cubic-bezier(.2,.8,.2,1);
}


.confirm-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(116,88,209,.10);
    color: #7458d1;
    font-size: 25px;
    font-weight: 800;
}


.confirm-content {
    margin-bottom: 25px;
}


.confirm-title {
    margin-bottom: 10px;
    color: #302c3b;
    font-size: 18px;
    font-weight: 800;
}


.confirm-message {
    color: #716c7d;
    font-size: 14px;
    font-weight: 500;
    line-height: 2;
}


.confirm-actions {
    display: flex;
    gap: 10px;
}


    .confirm-actions button {
        flex: 1;
        height: 46px;
        border: none;
        border-radius: 12px;
        font-family: "Vazirmatn", sans-serif;
        font-size: 13px;
        font-weight: 700;
        cursor: pointer;
        transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
    }


.confirm-cancel {
    background: #f5f3f8;
    color: #686273;
}


    .confirm-cancel:hover {
        background: #ebe8f0;
    }


.confirm-ok {
    color: white;
    background: linear-gradient( 135deg, #7458d1, #9872e5 );
    box-shadow: 0 7px 18px rgba(116,88,209,.22);
}


    .confirm-ok:hover {
        box-shadow: 0 10px 24px rgba(116,88,209,.30);
        transform: translateY(-1px);
    }


.confirm-actions button:active {
    transform: scale(.97);
}


@keyframes confirmOverlayIn {

    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}


@keyframes confirmDialogIn {

    from {
        opacity: 0;
        transform: translateY(15px) scale(.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* Mobile */

@media (max-width: 600px) {

    .confirm-overlay {
        align-items: flex-end;
        padding: 10px;
    }

    .confirm-dialog {
        width: 100%;
        padding: 25px 20px 18px;
        border-radius: 23px 23px 16px 16px;
    }

    .confirm-icon {
        width: 54px;
        height: 54px;
    }

    .confirm-title {
        font-size: 17px;
    }

    .confirm-message {
        font-size: 13px;
    }

    .confirm-actions button {
        height: 48px;
    }
}



/* =========================================================
   Reserved Reservations
   ========================================================= */

.reservation-list-card {
    overflow: hidden;
}

.reservation-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 18px;
}

.reservation-list-title {
    margin: 0;
    font-size: 19px;
    font-weight: 800;
    color: #302c3b;
}

.reservation-list-count {
    margin-top: 4px;
    color: #8d8799;
    font-size: 12px;
}


/* Toggle */

.reservation-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid #e4def3;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8f5ff, #f4f0ff);
    color: #674fb1;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s ease;
}

    .reservation-toggle-btn:hover {
        background: linear-gradient(135deg, #f0ebff, #ebe4ff);
        border-color: #cfc3ec;
        transform: translateY(-1px);
    }

.toggle-icon {
    font-size: 17px;
    line-height: 1;
}


/* Search */

.reservation-search {
    position: relative;
    display: flex;
    align-items: center;
    height: 52px;
    margin-bottom: 18px;
    border: 1px solid #e4e0eb;
    border-radius: 14px;
    background: #faf9fc;
    transition: .2s ease;
}

    .reservation-search:focus-within {
        background: white;
        border-color: #927de0;
        box-shadow: 0 0 0 4px rgba(139,114,223,.09);
    }

.reservation-search-icon {
    width: 48px;
    text-align: center;
    font-size: 18px;
    color: #927de0;
}

.reservation-search-input {
    flex: 1;
    width: 100%;
    height: 100%;
    border: 0;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: 13px;
    color: #302c39;
}

    .reservation-search-input::placeholder {
        color: #aaa5b4;
    }

.reservation-search-clear {
    width: 34px;
    height: 34px;
    margin-left: 8px;
    border: 0;
    border-radius: 50%;
    background: #eeeaf6;
    color: #766d82;
    cursor: pointer;
    font-size: 19px;
}


/* Grid */

.reservation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}


/* Item */

.reservation-item {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 14px;
    border: 1px solid #ebe8f0;
    border-radius: 16px;
    background: linear-gradient(135deg, #ffffff, #fbfaff);
    box-shadow: 0 4px 15px rgba(45,35,75,.045);
    transition: .2s ease;
}

    .reservation-item:hover {
        transform: translateY(-2px);
        border-color: #d9cff0;
        box-shadow: 0 10px 25px rgba(45,35,75,.09);
    }


/* Time */

.reservation-time {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: linear-gradient(135deg, #7458d1, #9872e5);
    color: white;
    font-family: Arial, sans-serif;
    font-size: 18px;
    font-weight: 800;
    direction: ltr;
    box-shadow: 0 7px 16px rgba(116,88,209,.20);
}


/* Patient */

.reservation-main {
    min-width: 0;
}

.reservation-patient-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #302c3b;
    font-size: 14px;
    font-weight: 800;
}

.reservation-details {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-top: 8px;
    color: #817b8d;
    font-size: 11px;
}

    .reservation-details span {
        white-space: nowrap;
    }


/* Actions */

.reservation-actions {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.reservation-action-btn {
    min-width: 78px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 0;
    border-radius: 10px;
    color: white;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: .18s ease;
}

    .reservation-action-btn:hover {
        transform: translateY(-1px);
    }

.sms-btn {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    box-shadow: 0 5px 12px rgba(22,163,74,.18);
}

.transfer-btn {
    background: linear-gradient(135deg, #7458d1, #9872e5);
    box-shadow: 0 5px 12px rgba(116,88,209,.18);
}


/* Empty */

.reservation-empty {
    padding: 45px 20px;
    text-align: center;
    border-radius: 16px;
    background: #faf9fc;
    border: 1px dashed #ddd7e8;
}

.reservation-empty-icon {
    font-size: 30px;
    margin-bottom: 10px;
}

.reservation-empty-title {
    color: #403b4a;
    font-weight: 800;
}

.reservation-empty-text {
    margin-top: 5px;
    color: #9993a3;
    font-size: 12px;
}

/* =========================================================
   Transfer Reservation Modal
   ========================================================= */

.transfer-modal {
    width: min(470px, 100%);
    padding: 25px;
    border-radius: 24px;
    background: rgba(255,255,255,.97);
    border: 1px solid rgba(255,255,255,.8);
    box-shadow: 0 25px 70px rgba(15,23,42,.20);
    animation: transferModalIn .22s ease-out;
}

@keyframes transferModalIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.transfer-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
}

.transfer-modal-title {
    font-size: 19px;
    font-weight: 800;
    color: #302c3b;
}

.transfer-modal-subtitle {
    margin-top: 5px;
    color: #96909f;
    font-size: 12px;
}

.transfer-modal-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: #f4f1f8;
    color: #777181;
    font-size: 21px;
    cursor: pointer;
}

.transfer-patient-card {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding: 13px;
    border-radius: 15px;
    background: #f8f6fc;
}

.transfer-patient-avatar {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg,#eee8ff,#ded5ff);
    color: #6349b6;
    font-weight: 800;
}

.transfer-patient-name {
    color: #383340;
    font-size: 14px;
    font-weight: 800;
}

.transfer-patient-phone {
    margin-top: 3px;
    direction: ltr;
    text-align: right;
    color: #918b9b;
    font-family: Arial,sans-serif;
    font-size: 11px;
}

.transfer-current {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 15px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f4f8ff;
    color: #667085;
    font-size: 12px;
}

    .transfer-current strong {
        direction: ltr;
        color: #475467;
        font-family: Arial,sans-serif;
    }

.transfer-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 18px;
}

.transfer-field label {
    display: block;
    margin-bottom: 7px;
    color: #4a4655;
    font-size: 12px;
    font-weight: 700;
}

.transfer-input {
    width: 100%;
    height: 50px;
    padding: 0 12px;
    border: 1px solid #e4e0eb;
    border-radius: 12px;
    background: #faf9fc;
    outline: none;
    font-family: inherit;
    font-size: 13px;
}

    .transfer-input:focus {
        background: white;
        border-color: #8b72df;
        box-shadow: 0 0 0 4px rgba(139,114,223,.09);
    }

.transfer-modal-actions {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 10px;
    margin-top: 22px;
}

.transfer-cancel-btn,
.transfer-confirm-btn {
    height: 48px;
    border: 0;
    border-radius: 12px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.transfer-cancel-btn {
    background: #f3f1f6;
    color: #696372;
}

.transfer-confirm-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: white;
    background: linear-gradient(135deg,#7458d1,#9872e5);
    box-shadow: 0 8px 20px rgba(116,88,209,.22);
}

    .transfer-confirm-btn:disabled {
        opacity: .65;
        cursor: wait;
    }

.confirm-btn {
    padding: 8px 14px;
    border-radius: 12px;
    border: 1px solid #9c87d8;
    background: rgb(128 97 216 / 22%);
    color: var(--text);
    font-weight: 900;
    cursor: pointer;
    transition: .12s ease;
}

    .confirm-btn:hover {
        background: rgba(255,255,255,.18);
        transform: translateY(-1px);
    }

@media (max-width: 900px) {

    .reservation-grid {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 600px) {

    .reservation-list-header {
        align-items: flex-start;
    }

    .reservation-list-title {
        font-size: 17px;
    }

    .reservation-toggle-btn {
        min-height: 38px;
        padding: 0 12px;
    }

    .reservation-item {
        grid-template-columns: 62px minmax(0, 1fr);
        gap: 10px;
    }

    .reservation-time {
        min-height: 50px;
        font-size: 16px;
    }

    .reservation-actions {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 7px;
        margin-top: 3px;
    }

    .reservation-action-btn {
        width: 100%;
    }

    .reservation-details {
        gap: 5px 9px;
    }

    .transfer-modal {
        width: 100%;
        padding: 21px 17px;
        border-radius: 22px;
    }

    .transfer-fields {
        grid-template-columns: 1fr;
    }

    .transfer-modal-actions {
        grid-template-columns: 1fr 1.4fr;
    }
}

/* =========================================================
   Persian Date / DateTime / DateRange Picker
   Glass + Pink | RTL | Responsive
   ========================================================= */

:root {
    /* ---------- Core ---------- */
    --dp-radius: 14px;
    --dp-radius-lg: 18px;
    --dp-pink: #ff69b4;
    --dp-pink-dark: #e91e63;
    --dp-pink-soft: rgba(255, 105, 180, .18);
    --dp-pink-hover: rgba(255, 105, 180, .24);
    --dp-shadow: 0 18px 45px rgba(0, 0, 0, .25);
    --dp-shadow-soft: 0 10px 26px rgba(0, 0, 0, .12);
    --dp-border: rgba(255, 255, 255, .16);
    --dp-border-strong: rgba(255, 255, 255, .22);
    --dp-glass: rgba(255, 255, 255, .08);
    --dp-glass-strong: rgba(255, 255, 255, .12);
    --dp-text: var(--text, #f8fafc);
    --dp-muted: var(--muted, #94a3b8);
    --dp-surface: var(--surface, #111827);
    --dp-surface-strong: var(--surfaceStrong, #0f172a);
    --dp-input-border: var(--inputBorder, rgba(255, 255, 255, .16));
    --dp-blur: var(--blur, 18px);
    --dp-safe-top: var(--safe-top, 0px);
    --dp-safe-bottom: var(--safe-bottom, 0px);
}


/* =========================================================
   LIGHT THEME
   ========================================================= */

body.light {
    --dp-glass: rgba(255, 255, 255, .72);
    --dp-glass-strong: rgba(255, 255, 255, .86);
    --dp-border: rgba(15, 23, 42, .10);
    --dp-border-strong: rgba(15, 23, 42, .16);
    --dp-text: var(--text, #1e293b);
    --dp-muted: var(--muted, #64748b);
    --dp-surface: var(--surface, #ffffff);
    --dp-surface-strong: var(--surfaceStrong, #f8fafc);
    --dp-input-border: var(--inputBorder, rgba(15, 23, 42, .12));
}


/* =========================================================
   COMMON WRAPPER
   ========================================================= */

.datepicker-wrapper,
.datetimepicker-wrapper,
.daterange-wrapper {
    position: relative;
    direction: rtl;
    font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
    width: 100%;
    color: var(--dp-text);
}


/* =========================================================
   INPUT CONTAINER
   ========================================================= */

.datepicker-input,
.datetimepicker-input,
.daterange-inputs {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    gap: 8px;
}


    /* =========================================================
   INPUT
   ========================================================= */

    .datepicker-input input,
    .datetimepicker-input input,
    .daterange-inputs input {
        width: 100%;
        height: 40px;
        flex: 1;
        border-radius: var(--dp-radius);
        border: 1px solid var(--dp-input-border);
        background: linear-gradient( 135deg, var(--surface, rgba(255,255,255,.08)), var(--surface2, rgba(255,255,255,.04)) );
        color: var(--dp-text);
        padding: 0 14px;
        padding-left: 44px;
        outline: none;
        text-align: center;
        font-family: 'Vazirmatn', Tahoma, sans-serif;
        font-size: 12px;
        font-weight: 600;
        box-shadow: var(--dp-shadow-soft);
        transition: border-color .18s ease, box-shadow .18s ease, transform .12s ease, background .18s ease;
    }


        .datepicker-input input::placeholder,
        .datetimepicker-input input::placeholder,
        .daterange-inputs input::placeholder {
            color: var(--dp-muted);
            font-size: 11.5px;
            font-weight: 600;
            opacity: .75;
        }


        .datepicker-input input:hover,
        .datetimepicker-input input:hover,
        .daterange-inputs input:hover {
            border-color: rgba(255, 105, 180, .30);
        }


        .datepicker-input input:focus,
        .datetimepicker-input input:focus,
        .daterange-inputs input:focus {
            border-color: rgba(255, 105, 180, .55);
            box-shadow: 0 12px 30px rgba(255, 105, 180, .18), var(--dp-shadow-soft);
            transform: translateY(-1px);
        }


/* =========================================================
   INPUT GLASS
   ========================================================= */

@supports (
    (-webkit-backdrop-filter: blur(10px)) or
    (backdrop-filter: blur(10px))
) {

    .datepicker-input input,
    .datetimepicker-input input,
    .daterange-inputs input {
        -webkit-backdrop-filter: blur(var(--dp-blur)) saturate(150%);
        backdrop-filter: blur(var(--dp-blur)) saturate(150%);
    }
}


/* =========================================================
   CALENDAR ICON
   ========================================================= */

.calendar-icon {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    cursor: pointer;
    user-select: none;
    border: 1px solid var(--dp-border);
    background: var(--dp-glass);
    color: var(--dp-text);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.10);
    z-index: 2;
    transition: transform .15s ease, background .15s ease, border-color .15s ease;
}


    .calendar-icon:hover {
        transform: translateY(-50%) scale(1.04);
        background: rgba(255, 105, 180, .16);
        border-color: rgba(255, 105, 180, .35);
    }


/* RTL */

.datepicker-wrapper[dir="rtl"] .calendar-icon,
.datetimepicker-wrapper[dir="rtl"] .calendar-icon {
    left: 8px;
    right: auto;
}


/* LTR */

.datepicker-wrapper[dir="ltr"] .calendar-icon,
.datetimepicker-wrapper[dir="ltr"] .calendar-icon {
    right: 8px;
    left: auto;
}


/* =========================================================
   CLEAR BUTTON
   ========================================================= */

.clear-icon {
    position: absolute;
    right: 34px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    cursor: pointer;
    font-size: 13px;
    color: var(--dp-muted);
    border-radius: 50%;
    z-index: 3;
    transition: background .15s ease, color .15s ease, transform .15s ease;
}


    .clear-icon:hover {
        background: rgba(255, 105, 180, .12);
        color: var(--dp-pink);
        transform: translateY(-50%) scale(1.05);
    }


/* =========================================================
   POPUP CONTAINER
   ========================================================= */

.datepicker-wrapper .popup,
.datetimepicker-wrapper .popup,
.daterange-wrapper .popup {
    position: absolute;
    top: calc(100% + 7px);
    left: 0;
    width: min(380px, calc(100vw - 20px));
    max-width: calc(100vw - 20px);
    padding: 12px;
    border-radius: var(--dp-radius-lg);
    border: 1px solid var(--dp-border-strong);
    color: var(--dp-text);
    background: radial-gradient(120% 170% at 0% 45%, rgb(128 96 215 / 19%) 0%, rgba(255, 105, 180, 0) 60%), radial-gradient(140% 160% at 85% 10%, rgba(255, 255, 255, .08) 0%, rgba(255, 255, 255, 0) 55%), linear-gradient(135deg, color-mix(in srgb, #fbfbfc 96%, transparent), color-mix(in srgb, #fbfbfc 86%, transparent));
    box-shadow: var(--dp-shadow);
    z-index: 9999;
    overflow: visible;
    animation: dpPopupIn .16s ease-out;
}


@keyframes dpPopupIn {

    from {
        opacity: 0;
        transform: translateY(-5px) scale(.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


.datepicker-wrapper .popup::after,
.datetimepicker-wrapper .popup::after,
.daterange-wrapper .popup::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient( 180deg, rgba(255,255,255,.10), transparent 48% );
}


/* =========================================================
   POPUP GLASS
   ========================================================= */

@supports (
    (-webkit-backdrop-filter: blur(10px)) or
    (backdrop-filter: blur(10px))
) {

    .datepicker-wrapper .popup,
    .datetimepicker-wrapper .popup,
    .daterange-wrapper .popup {
        -webkit-backdrop-filter: blur(var(--dp-blur)) saturate(160%);
        backdrop-filter: blur(var(--dp-blur)) saturate(160%);
    }
}


/* =========================================================
   HEADER
   ========================================================= */

.datepicker-header,
.datetimepicker-header,
.daterange-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 6px 10px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--dp-border);
}


/* =========================================================
   CUSTOM DROPDOWN
   ========================================================= */

.dp-dd {
    position: relative;
    min-width: 112px;
    flex: 1;
}


.dp-dd-btn {
    width: 100%;
    height: 36px;
    border-radius: 13px;
    border: 1px solid var(--dp-border);
    background: var(--dp-glass);
    color: var(--dp-text);
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 10px;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}


    .dp-dd-btn:hover {
        transform: translateY(-1px);
        background: rgba(255, 105, 180, .10);
        border-color: rgba(255, 105, 180, .30);
        box-shadow: 0 10px 24px rgba(0,0,0,.12);
    }


    .dp-dd-btn .chev {
        font-size: 11px;
        color: var(--dp-pink);
        transition: transform .15s ease;
    }


/* =========================================================
   DROPDOWN PANEL
   ========================================================= */

.dp-dd-panel {
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    width: 240px;
    max-height: 280px;
    padding: 10px;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid var(--dp-border-strong);
    background: radial-gradient( 120% 170% at 0% 45%, rgba(255,105,180,.18), transparent 60% ), linear-gradient( 135deg, var(--dp-surface), color-mix( in srgb, var(--dp-surface) 65%, transparent ) );
    box-shadow: 0 18px 45px rgba(0,0,0,.24);
    z-index: 20000;
}


@supports (
    (-webkit-backdrop-filter: blur(10px)) or
    (backdrop-filter: blur(10px))
) {

    .dp-dd-panel {
        -webkit-backdrop-filter: blur(var(--dp-blur)) saturate(160%);
        backdrop-filter: blur(var(--dp-blur)) saturate(160%);
    }
}


/* =========================================================
   DROPDOWN SEARCH
   ========================================================= */

.dp-dd-top {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
}


.dp-dd-search {
    flex: 1;
    height: 34px;
    border-radius: 11px;
    border: 1px solid var(--dp-border);
    background: rgba(255,255,255,.07);
    color: var(--dp-text);
    padding: 0 10px;
    outline: none;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-size: 11px;
}


body.light .dp-dd-search {
    background: rgba(255,255,255,.72);
    color: #0f172a;
}


.dp-dd-search:focus {
    border-color: rgba(255,105,180,.45);
    box-shadow: 0 0 0 3px rgba(255,105,180,.08);
}


/* =========================================================
   DROPDOWN CHIP
   ========================================================= */

.dp-dd-chip {
    height: 34px;
    padding: 0 10px;
    border-radius: 11px;
    border: 1px solid rgba(102,166,255,.30);
    background: rgba(102,166,255,.10);
    color: var(--dp-text);
    cursor: pointer;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-size: 11px;
    font-weight: 800;
}


/* =========================================================
   DROPDOWN LIST
   ========================================================= */

.dp-dd-list {
    max-height: 230px;
    overflow-y: auto;
    display: grid;
    gap: 5px;
    padding-left: 2px;
}


.dp-dd-item {
    width: 100%;
    min-height: 38px;
    border: 0;
    background: transparent;
    color: var(--dp-text);
    padding: 8px 10px;
    border-radius: 11px;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
    text-align: right;
    transition: background .12s ease, transform .12s ease;
}


    .dp-dd-item:hover {
        background: rgba(255,105,180,.10);
        transform: translateY(-1px);
    }


    .dp-dd-item.active {
        background: linear-gradient( 135deg, rgba(255,105,180,.22), rgba(233,30,99,.14) );
        border: 1px solid rgba(233,30,99,.22);
        color: var(--dp-pink);
    }


.dp-dd-empty {
    padding: 12px;
    text-align: center;
    color: var(--dp-muted);
    font-size: 11px;
}


/* =========================================================
   DROPDOWN SCROLLBAR
   ========================================================= */

.dp-dd-panel::-webkit-scrollbar,
.dp-dd-list::-webkit-scrollbar {
    width: 7px;
}


.dp-dd-panel::-webkit-scrollbar-thumb,
.dp-dd-list::-webkit-scrollbar-thumb {
    background: rgba(148,163,184,.35);
    border-radius: 999px;
}


/* =========================================================
   CALENDAR GRID
   ========================================================= */

.datepicker-grid,
.daterange-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    padding: 6px;
}


/* =========================================================
   DAY HEADER
   ========================================================= */

.day-header {
    height: 32px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 900;
    color: var(--dp-muted);
    background: rgba(255,255,255,.06);
    border: 1px solid var(--dp-border);
}


/* =========================================================
   DAY CELL
   ========================================================= */

.day-cell {
    height: 36px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-size: 12px;
    font-weight: 650;
    color: var(--dp-text);
    border: 1px solid var(--dp-border);
    background: rgba(255,255,255,.055);
    cursor: pointer;
    user-select: none;
    transition: transform .12s ease, background .12s ease, border-color .12s ease, box-shadow .12s ease;
}


    .day-cell:hover {
        background: rgba(255,105,180,.14);
        border-color: rgba(255,105,180,.28);
        transform: translateY(-1px);
    }


    .day-cell.today {
        border-color: rgba(255,105,180,.58);
        box-shadow: 0 7px 18px rgba(255,105,180,.15);
    }


    .day-cell.selected {
        border-color: rgba(255,105,180,.78);
        background: linear-gradient( 135deg, rgba(255,105,180,.34), rgba(255,134,194,.20) );
        color: #fff;
        box-shadow: 0 9px 22px rgba(255,105,180,.22);
    }


    .day-cell.empty {
        visibility: hidden;
        pointer-events: none;
    }


/* =========================================================
   ACTION BUTTONS
   ========================================================= */

.dp-action-btn,
.datepicker-wrapper .today-btn,
.datetimepicker-wrapper .today-btn,
.daterange-wrapper .daterange-today-btn,
.datepicker-wrapper .close-btn,
.datetimepicker-wrapper .close-btn,
.daterange-wrapper .daterange-close-btn {
    height: 36px;
    border-radius: 12px;
    border: 1px solid var(--dp-border);
    background: rgb(204 196 224);
    color: var(--dp-text);
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-size: 11px;
    font-weight: 850;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0,0,0,.10), inset 0 1px 0 rgba(255,255,255,.08);
    transition: transform .12s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}


    .dp-action-btn:hover,
    .datepicker-wrapper .today-btn:hover,
    .datetimepicker-wrapper .today-btn:hover,
    .daterange-wrapper .daterange-today-btn:hover {
        transform: translateY(-1px);
        background: rgba(255,105,180,.12);
        border-color: rgba(255,105,180,.34);
        box-shadow: 0 12px 26px rgba(233,30,99,.14);
    }


    .dp-action-btn.primary {
        border-color: rgba(255,105,180,.30);
        background: linear-gradient( 135deg, rgba(255,105,180,.22), rgba(233,30,99,.14) );
    }


    .dp-action-btn.icon,
    .datepicker-wrapper .close-btn,
    .datetimepicker-wrapper .close-btn,
    .daterange-wrapper .daterange-close-btn {
        width: 36px;
        padding: 0;
        display: grid;
        place-items: center;
    }


/* =========================================================
   DATETIMEPICKER
   ========================================================= */

.datetimepicker-time {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 6px;
    margin-top: 5px;
    border-top: 1px solid var(--dp-border);
}


    .datetimepicker-time input,
    .timepicker-input input {
        width: 58px;
        height: 38px;
        border-radius: 12px;
        border: 1px solid var(--dp-border);
        background: rgba(255,255,255,.07);
        color: var(--dp-text);
        text-align: center;
        font-family: 'Vazirmatn', Tahoma, sans-serif;
        font-size: 13px;
        font-weight: 800;
        outline: none;
        transition: border-color .18s ease, box-shadow .18s ease;
    }


        .datetimepicker-time input:focus,
        .timepicker-input input:focus {
            border-color: rgba(255,105,180,.50);
            box-shadow: 0 0 0 3px rgba(255,105,180,.08);
        }


    .datetimepicker-time .separator {
        font-size: 16px;
        font-weight: 900;
        color: var(--dp-pink);
    }


/* =========================================================
   TIME PICKER
   ========================================================= */

.timepicker-wrapper {
    position: relative;
    direction: rtl;
    width: 100%;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
}


.timepicker-input {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}


    .timepicker-input input {
        width: 100%;
        height: 40px;
        padding: 0 14px 0 42px;
    }


.time-icon {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    border: 1px solid var(--dp-border);
    background: var(--dp-glass);
    color: var(--dp-text);
    cursor: pointer;
    z-index: 2;
}


.timepicker-wrapper .popup {
    position: absolute;
    top: calc(100% + 7px);
    left: 0;
    width: min(330px, calc(100vw - 20px));
    padding: 12px;
    border-radius: var(--dp-radius-lg);
    border: 1px solid var(--dp-border-strong);
    background: var(--dp-surface-strong);
    color: var(--dp-text);
    box-shadow: var(--dp-shadow);
    z-index: 9999;
}


.time-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    max-height: 240px;
    overflow-y: auto;
    padding: 4px;
}


.time-item {
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--dp-border);
    background: rgba(255,255,255,.06);
    color: var(--dp-text);
    display: grid;
    place-items: center;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: background .12s ease, border-color .12s ease, transform .12s ease;
}


    .time-item:hover {
        background: rgba(255,105,180,.14);
        border-color: rgba(255,105,180,.30);
        transform: translateY(-1px);
    }


    .time-item.selected {
        background: linear-gradient( 135deg, rgba(255,105,180,.34), rgba(233,30,99,.20) );
        border-color: rgba(255,105,180,.65);
        color: #fff;
    }


/* =========================================================
   FOOTER
   ========================================================= */

.dp-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 6px 2px;
    margin-top: 4px;
    border-top: 1px solid var(--dp-border);
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 480px) {

    .datepicker-wrapper .popup,
    .datetimepicker-wrapper .popup,
    .daterange-wrapper .popup,
    .timepicker-wrapper .popup {
        left: 50%;
        transform: translateX(-50%);
        width: calc(100vw - 20px);
        max-width: 380px;
    }


    .datepicker-header,
    .datetimepicker-header,
    .daterange-header {
        gap: 5px;
    }


    .dp-dd {
        min-width: 0;
    }


    .day-cell {
        height: 34px;
        border-radius: 10px;
        font-size: 11px;
    }


    .day-header {
        height: 30px;
        font-size: 10px;
    }


    .datepicker-grid,
    .daterange-grid {
        gap: 4px;
        padding: 4px;
    }
}


/* =========================================================
   DISABLED
   ========================================================= */

.day-cell.disabled,
.time-item.disabled {
    opacity: .35;
    cursor: not-allowed;
    pointer-events: none;
}


/* =========================================================
   FOCUS ACCESSIBILITY
   ========================================================= */

.dp-dd-btn:focus-visible,
.dp-dd-item:focus-visible,
.dp-action-btn:focus-visible,
.day-cell:focus-visible,
.time-item:focus-visible,
.calendar-icon:focus-visible,
.time-icon:focus-visible {
    outline: 2px solid rgba(255,105,180,.65);
    outline-offset: 2px;
}


/* =========================================================
   PREVENT TEXT SELECTION
   ========================================================= */

.datepicker-wrapper .popup,
.datetimepicker-wrapper .popup,
.daterange-wrapper .popup,
.timepicker-wrapper .popup {
    user-select: none;
}


/* =========================================================
   INPUT RTL/LTR
   ========================================================= */

.datepicker-wrapper[dir="rtl"] input,
.datetimepicker-wrapper[dir="rtl"] input,
.timepicker-wrapper[dir="rtl"] input {
    padding-left: 44px;
    padding-right: 14px;
}


.datepicker-wrapper[dir="ltr"] input,
.datetimepicker-wrapper[dir="ltr"] input,
.timepicker-wrapper[dir="ltr"] input {
    padding-right: 44px;
    padding-left: 14px;
}


/* =========================================================
   REMOVE NATIVE SELECT ARROW IF STILL USED
   ========================================================= */

.datepicker-wrapper select,
.datetimepicker-wrapper select,
.daterange-wrapper select {
    height: 36px;
    border-radius: 12px;
    border: 1px solid var(--dp-border);
    background: rgb(207 200 226);
    color: var(--dp-text);
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-size: 11px;
    font-weight: 750;
    padding: 0 10px;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}


.datepicker-wrapper option,
.datetimepicker-wrapper option,
.daterange-wrapper option {
    background: var(--dp-surface);
    color: var(--dp-text);
}


/* =========================================================
   MOBILE SAFE AREA
   ========================================================= */

.datepicker-wrapper,
.datetimepicker-wrapper,
.daterange-wrapper,
.timepicker-wrapper {
    padding-bottom: env(safe-area-inset-bottom, 0px);
}


    /* =========================================================
   CENTERED DATEPICKER / DATETIMEPICKER
   ========================================================= */

    .datepicker-wrapper .overlay,
    .datetimepicker-wrapper .overlay,
    .daterange-wrapper .overlay {
        position: fixed !important;
        inset: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 20px !important;
        margin: 0 !important;
        background: rgba(0, 0, 0, .35) !important;
        z-index: 10000 !important;
    }


        /* خود کادر */

        .datepicker-wrapper .overlay .popup,
        .datetimepicker-wrapper .overlay .popup,
        .daterange-wrapper .overlay .popup {
            position: relative !important;
            top: auto !important;
            left: auto !important;
            right: auto !important;
            width: min(380px, calc(100vw - 30px)) !important;
            max-width: 380px !important;
            max-height: calc(100vh - 40px);
            overflow: visible !important;
            margin: 0 !important;
            transform: none !important;
            animation: dpCenterOpen .18s ease-out;
        }


@keyframes dpCenterOpen {

    from {
        opacity: 0;
        transform: scale(.94) translateY(8px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}


/* موبایل */

@media (max-width: 480px) {

    .datepicker-wrapper .overlay,
    .datetimepicker-wrapper .overlay,
    .daterange-wrapper .overlay {
        padding: 12px !important;
    }

        .datepicker-wrapper .overlay .popup,
        .datetimepicker-wrapper .overlay .popup,
        .daterange-wrapper .overlay .popup {
            width: 100% !important;
            max-width: 380px !important;
        }
}

.datetime-validation-error {
    width: 100%;
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(239, 68, 68, .10);
    border: 1px solid rgba(239, 68, 68, .25);
    color: #ef4444;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    animation: dpErrorIn .18s ease-out;
}

@keyframes dpErrorIn {
    from {
        opacity: 0;
        transform: translateY(-3px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================================
   LOGS
   ========================================================= */

.logs-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
    animation: logsFadeIn .2s ease;
}

.logs-modal {
    width: min(700px, 100%);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, .25);
    overflow: hidden;
    animation: logsModalIn .25s ease;
}

.logs-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid #eee;
}

    .logs-modal-header h5 {
        margin: 0 0 5px 0;
        font-size: 18px;
        font-weight: 700;
    }

.logs-patient-name {
    color: #666;
    font-size: 13px;
}

.logs-close-btn {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: #f3f4f6;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
    transition: .2s;
}

    .logs-close-btn:hover {
        background: #e5e7eb;
        transform: rotate(90deg);
    }

.logs-modal-body {
    padding: 18px 22px;
    overflow-y: auto;
}

.logs-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.log-item {
    padding: 15px;
    border: 1px solid #e9e9e9;
    border-radius: 14px;
    background: #fafafa;
    transition: .2s;
}

    .log-item:hover {
        border-color: #ddd;
        background: #fff;
        box-shadow: 0 5px 18px rgba(0, 0, 0, .06);
    }

.log-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.log-operation {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 8px;
    background: #fce7f3;
    color: #be185d;
    font-size: 12px;
    font-weight: 700;
}

.log-date {
    color: #777;
    font-size: 11px;
    direction: ltr;
}

.log-description {
    margin-bottom: 10px;
    color: #333;
    font-size: 14px;
    line-height: 1.8;
}

.log-user {
    color: #888;
    font-size: 12px;
}

.no-logs {
    padding: 50px 20px;
    text-align: center;
    color: #888;
}

.no-logs-icon {
    margin-bottom: 12px;
    font-size: 40px;
}

.logs-modal-footer {
    padding: 15px 22px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
}

.btn-close-modal {
    border: none;
    padding: 9px 22px;
    border-radius: 10px;
    background: #f3f4f6;
    color: #333;
    cursor: pointer;
}

    .btn-close-modal:hover {
        background: #e5e7eb;
    }

@keyframes logsFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes logsModalIn {
    from {
        opacity: 0;
        transform: translateY(15px) scale(.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* =========================================================
   PWA INSTALL BUTTON
   ========================================================= */

.pwa-install-button {
    height: 42px;
    padding: 0 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid rgba(116, 88, 209, .18);
    border-radius: 12px;
    background: linear-gradient( 135deg, #f2edff, #eee8ff );
    color: #6248b4;
    font-family: Vazirmatn, sans-serif;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(116, 88, 209, .10);
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

    .pwa-install-button:hover {
        transform: translateY(-1px);
        background: linear-gradient( 135deg, #ebe4ff, #e6ddff );
        box-shadow: 0 8px 20px rgba(116, 88, 209, .16);
    }

    .pwa-install-button:active {
        transform: scale(.97);
    }


/* =========================================================
   iOS INSTALL DIALOG
   ========================================================= */

.pwa-ios-overlay {
    position: fixed;
    inset: 0;
    z-index: 50000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(25, 20, 40, .48);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.pwa-ios-dialog {
    position: relative;
    width: min(420px, 100%);
    padding: 30px 26px;
    border-radius: 26px;
    background: rgba(255,255,255,.96);
    border: 1px solid rgba(255,255,255,.9);
    box-shadow: 0 30px 80px rgba(35,25,65,.25);
    text-align: right;
    animation: pwaDialogIn .25s ease;
}

@keyframes pwaDialogIn {

    from {
        opacity: 0;
        transform: translateY(20px) scale(.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.pwa-ios-close {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: #f3f1f7;
    color: #716b7e;
    font-size: 23px;
    cursor: pointer;
}

.pwa-ios-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: linear-gradient( 135deg, #7458d1, #9872e5 );
    color: white;
    font-size: 28px;
    box-shadow: 0 12px 28px rgba(116,88,209,.25);
}

.pwa-ios-dialog h3 {
    margin: 0 0 10px;
    text-align: center;
    color: #302c39;
    font-size: 20px;
    font-weight: 800;
}

.pwa-ios-dialog > p {
    margin: 0 0 20px;
    text-align: center;
    color: #777181;
    font-size: 13px;
}

.pwa-ios-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 14px;
    background: #f8f7fb;
    color: #4f4a58;
    font-size: 13px;
}

    .pwa-ios-step > span:first-child {
        width: 30px;
        height: 30px;
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: #eee8ff;
        color: #674db9;
        font-weight: 800;
    }

.pwa-ios-tip {
    margin-top: 18px;
    padding: 12px;
    border-radius: 12px;
    background: #f5f1ff;
    color: #6b5a9d;
    font-size: 11px;
    line-height: 1.9;
    text-align: center;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .pwa-install-button {
        width: 42px;
        padding: 0;
        font-size: 19px;
    }

        .pwa-install-button span:last-child {
            display: none;
        }

    .pwa-ios-overlay {
        align-items: flex-end;
        padding: 12px;
    }

    .pwa-ios-dialog {
        border-radius: 24px 24px 18px 18px;
        padding: 28px 20px 22px;
    }
}


/* =========================================================
   PWA FLOATING INSTALL
   ========================================================= */

.pwa-floating-install {
    position: fixed;
    top: 18px;
    right: 50%;
    transform: translateX(50%);
    z-index: 99999;
    animation: pwaFloatingIn .35s cubic-bezier(.2,.8,.2,1);
}


/* Button */

.pwa-floating-button {
    position: relative;
    min-width: 250px;
    min-height: 64px;
    padding: 9px 14px 9px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(255,255,255,.75);
    border-radius: 18px;
    background: linear-gradient(135deg, rgb(116 88 209 / 44%), rgba(152, 114, 229, .96));
    color: white;
    font-family: Vazirmatn, sans-serif;
    cursor: pointer;
    box-shadow: 0 15px 40px rgba(70,50,110,.25), 0 5px 15px rgba(70,50,110,.12);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: transform .2s ease, box-shadow .2s ease;
}


    /* Hover */

    .pwa-floating-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 20px 50px rgba(70,50,110,.30), 0 7px 20px rgba(70,50,110,.15);
    }


/* Icon */

.pwa-floating-icon {
    width: 43px;
    height: 43px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: rgba(255,255,255,.18);
    font-size: 22px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}


/* Text */

.pwa-floating-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
    text-align: right;
}

    .pwa-floating-text strong {
        font-size: 13px;
        font-weight: 800;
        line-height: 1.6;
    }

    .pwa-floating-text small {
        margin-top: 1px;
        font-size: 10px;
        opacity: .78;
        line-height: 1.5;
    }


/* Close */

.pwa-floating-close {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,.12);
    color: rgba(255,255,255,.8);
    font-size: 20px;
    line-height: 1;
    transition: background .15s ease, color .15s ease;
}

    .pwa-floating-close:hover {
        background: rgba(255,255,255,.22);
        color: white;
    }


/* Animation */

@keyframes pwaFloatingIn {

    from {
        opacity: 0;
        transform: translateX(50%) translateY(-20px) scale(.94);
    }

    to {
        opacity: 1;
        transform: translateX(50%) translateY(0) scale(1);
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .pwa-floating-install {
        top: 12px;
        right: 12px;
        left: 12px;
        transform: none;
        display: flex;
        justify-content: center;
    }

    .pwa-floating-button {
        width: 100%;
        max-width: 380px;
        min-height: 60px;
        border-radius: 17px;
    }

    @keyframes pwaFloatingIn {

        from {
            opacity: 0;
            transform: translateY(-15px) scale(.96);
        }

        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }
}


/* =========================================================
   SMALL PHONES
   ========================================================= */

@media (max-width: 380px) {

    .pwa-floating-button {
        min-height: 56px;
        padding: 7px 10px;
    }

    .pwa-floating-icon {
        width: 38px;
        height: 38px;
        font-size: 19px;
    }

    .pwa-floating-text strong {
        font-size: 12px;
    }

    .pwa-floating-text small {
        font-size: 9px;
    }
}


/* =========================================================
   PAYMENT MODAL
   ========================================================= */

.payment-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 50000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, .52);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}

.payment-modal {
    width: min(520px, 100%);
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
    padding: 26px;
    border-radius: 25px;
    background: rgba(255, 255, 255, .97);
    border: 1px solid rgba(255,255,255,.8);
    box-shadow: 0 30px 80px rgba(15,23,42,.22);
    animation: paymentModalIn .22s ease-out;
}

@keyframes paymentModalIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.payment-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

    .payment-modal-header h3 {
        margin: 0;
        color: #282435;
        font-size: 20px;
        font-weight: 800;
    }

    .payment-modal-header span {
        display: block;
        margin-top: 5px;
        color: #8b8798;
        font-size: 12px;
    }

.payment-close {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: #f5f3fa;
    color: #777181;
    font-size: 24px;
    cursor: pointer;
    transition: .2s ease;
}

    .payment-close:hover {
        background: #eeeafa;
        color: #49358e;
    }

.payment-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 22px;
}

    .payment-summary > div {
        padding: 13px 10px;
        border-radius: 15px;
        background: #f8f7fb;
        text-align: center;
    }

    .payment-summary span {
        display: block;
        margin-bottom: 5px;
        color: #8c8797;
        font-size: 11px;
    }

    .payment-summary strong {
        color: #373240;
        font-size: 13px;
        font-weight: 800;
    }

    .payment-summary .payment-debt {
        background: #fff7ed;
    }

        .payment-summary .payment-debt strong {
            color: #ea580c;
        }

.payment-field {
    margin-bottom: 16px;
}

    .payment-field label {
        display: block;
        margin-bottom: 7px;
        color: #494452;
        font-size: 13px;
        font-weight: 700;
    }

.payment-input {
    width: 100%;
    height: 50px;
    padding: 0 14px;
    border: 1px solid #e5e1ed;
    border-radius: 13px;
    outline: none;
    background: #faf9fc;
    color: #302c39;
    font-family: Vazirmatn, sans-serif;
    transition: .2s ease;
}

    .payment-input:focus {
        border-color: #8b72df;
        background: white;
        box-shadow: 0 0 0 4px rgba(139,114,223,.10);
    }

.payment-error {
    margin: 10px 0 15px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #c43f52;
    font-size: 12px;
    line-height: 1.8;
}

.payment-actions {
    display: flex;
    gap: 10px;
    margin-top: 22px;
}

.payment-cancel,
.payment-submit {
    flex: 1;
    height: 50px;
    border: none;
    border-radius: 13px;
    font-family: Vazirmatn, sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s ease;
}

.payment-cancel {
    background: #f2f1f5;
    color: #625d6c;
}

    .payment-cancel:hover {
        background: #e9e7ee;
    }

.payment-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: white;
    background: linear-gradient(135deg, #7458d1, #9872e5);
    box-shadow: 0 9px 22px rgba(116,88,209,.22);
}

    .payment-submit:hover:not(:disabled) {
        transform: translateY(-1px);
        box-shadow: 0 13px 27px rgba(116,88,209,.28);
    }

    .payment-submit:disabled {
        opacity: .65;
        cursor: wait;
    }

.payment-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: white;
    border-radius: 50%;
    animation: paymentSpin .7s linear infinite;
}

@keyframes paymentSpin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 600px) {

    .payment-modal-overlay {
        align-items: flex-end;
        padding: 10px;
    }

    .payment-modal {
        width: 100%;
        max-height: 92dvh;
        padding: 21px 17px;
        border-radius: 23px 23px 16px 16px;
    }

    .payment-summary {
        grid-template-columns: 1fr;
    }

        .payment-summary > div {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 11px 13px;
        }

        .payment-summary span {
            margin: 0;
        }

    .payment-actions {
        flex-direction: column-reverse;
    }
}




/* =========================================================
   PAYMENT MODAL
   ========================================================= */

.payment-modal-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    width: 100dvw;
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, .52);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 50000;
    direction: rtl;
}


.payment-modal {
    width: min(560px, 100%);
    max-height: calc( 100dvh - 40px );
    overflow-y: auto;
    background: rgba(255,255,255,.97);
    border: 1px solid rgba(255,255,255,.85);
    border-radius: 24px;
    padding: 22px;
    box-shadow: 0 30px 80px rgba(15,23,42,.22), 0 8px 25px rgba(15,23,42,.10);
    animation: paymentModalIn .22s ease-out;
}


@keyframes paymentModalIn {

    from {
        opacity: 0;
        transform: translateY(20px) scale(.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* Header */

.payment-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 18px;
}


    .payment-modal-header h3 {
        margin: 0;
        font-size: 20px;
        font-weight: 800;
        color: #292536;
    }


    .payment-modal-header span {
        display: block;
        margin-top: 5px;
        color: #8b8798;
        font-size: 13px;
    }


.payment-close {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    border: none;
    border-radius: 50%;
    background: #f5f3fa;
    color: #777080;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}


    .payment-close:hover {
        background: #fff0f3;
        color: #d34d61;
    }


    .payment-close:active {
        transform: scale(.92);
    }


/* Summary */

.payment-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}


    .payment-summary > div {
        padding: 13px;
        border-radius: 14px;
        background: #f8f7fb;
        border: 1px solid #eeebf3;
        text-align: center;
    }


    .payment-summary span {
        display: block;
        margin-bottom: 6px;
        font-size: 11px;
        color: #8b8797;
    }


    .payment-summary strong {
        display: block;
        font-size: 14px;
        font-weight: 800;
        color: #393443;
    }


    .payment-summary .payment-paid strong {
        color: #159447;
    }


    .payment-summary .payment-debt {
        background: #fff8ed;
        border-color: #f8dfb8;
    }


        .payment-summary .payment-debt strong {
            color: #d97706;
        }


    .payment-summary .payment-overpaid {
        grid-column: 1 / -1;
        background: #fff1f2;
        border-color: #fecdd3;
    }


        .payment-summary .payment-overpaid strong {
            color: #dc3545;
        }


/* Previous payments */

.previous-payments {
    margin-bottom: 20px;
    border: 1px solid #ece9f1;
    border-radius: 18px;
    background: #fbfafd;
    overflow: hidden;
}


.previous-payments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 14px 15px;
    border-bottom: 1px solid #eeeaf3;
    background: white;
}


    .previous-payments-header h4 {
        margin: 0;
        color: #35303f;
        font-size: 14px;
        font-weight: 800;
    }


    .previous-payments-header span {
        display: block;
        margin-top: 3px;
        color: #96909f;
        font-size: 11px;
    }


.previous-payments-total {
    color: #6750bd;
    font-size: 15px;
    font-weight: 800;
}


    .previous-payments-total small {
        font-size: 10px;
        font-weight: 500;
    }


/* Scroll */

.payments-scroll {
    max-height: 230px;
    overflow-y: auto;
    padding: 8px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #cfc8e3 transparent;
}


    .payments-scroll::-webkit-scrollbar {
        width: 6px;
    }


    .payments-scroll::-webkit-scrollbar-track {
        background: transparent;
    }


    .payments-scroll::-webkit-scrollbar-thumb {
        background: #d2cce2;
        border-radius: 20px;
    }


/* Payment item */

.payment-history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 7px;
    border-radius: 14px;
    background: white;
    border: 1px solid #eeeaf3;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}


    .payment-history-item:last-child {
        margin-bottom: 0;
    }


@media (hover: hover) {

    .payment-history-item:hover {
        transform: translateY(-1px);
        border-color: #dcd5ee;
        box-shadow: 0 6px 18px rgba(50,40,80,.07);
    }
}


.payment-history-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #f2edff;
    font-size: 19px;
}


.payment-history-info {
    flex: 1;
    min-width: 0;
}


.payment-history-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}


    .payment-history-top strong {
        color: #302c3a;
        font-size: 14px;
        font-weight: 800;
        white-space: nowrap;
    }


.payment-method-badge {
    padding: 4px 8px;
    border-radius: 8px;
    background: #f3f0fa;
    color: #716887;
    font-size: 10px;
    white-space: nowrap;
}


.payment-history-bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 12px;
    margin-top: 6px;
    color: #97919f;
    font-size: 10px;
    line-height: 1.7;
}


/* New payment */

.new-payment-section {
    padding-top: 3px;
}


.new-payment-title {
    margin-bottom: 14px;
    color: #3a3544;
    font-size: 14px;
    font-weight: 800;
}


.payment-field {
    margin-bottom: 14px;
}


    .payment-field label {
        display: block;
        margin-bottom: 7px;
        color: #514b5b;
        font-size: 12px;
        font-weight: 700;
    }


.payment-input {
    width: 100%;
    height: 50px;
    border: 1px solid #e3dfea;
    border-radius: 13px;
    padding: 0 14px;
    background: #faf9fc;
    color: #302c39;
    font-family: Vazirmatn, sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}


    .payment-input:focus {
        background: white;
        border-color: #8b72df;
        box-shadow: 0 0 0 4px rgba(139,114,223,.10);
    }


/* Error */

.payment-error {
    margin-bottom: 15px;
    padding: 11px 13px;
    border-radius: 11px;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #c7354b;
    font-size: 12px;
    line-height: 1.8;
}


/* Actions */

.payment-actions {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 10px;
    margin-top: 18px;
}


.payment-cancel,
.payment-submit {
    height: 50px;
    border: none;
    border-radius: 13px;
    font-family: Vazirmatn, sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}


.payment-cancel {
    background: #f1eff5;
    color: #686273;
}


.payment-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    background: linear-gradient( 135deg, #7458d1, #9872e5 );
    color: white;
    box-shadow: 0 8px 20px rgba(116,88,209,.20);
}


    .payment-submit:hover:not(:disabled) {
        transform: translateY(-1px);
        box-shadow: 0 12px 25px rgba(116,88,209,.28);
    }


.payment-cancel:hover {
    background: #e9e6ef;
}


.payment-cancel:active,
.payment-submit:active:not(:disabled) {
    transform: scale(.98);
}


.payment-submit:disabled {
    opacity: .65;
    cursor: wait;
}


/* Spinner */

.payment-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: white;
    border-radius: 50%;
    animation: paymentSpin .7s linear infinite;
}


@keyframes paymentSpin {

    to {
        transform: rotate(360deg);
    }
}


/* Mobile */

@media (max-width: 600px) {

    .payment-modal-overlay {
        align-items: flex-end;
        padding: 10px calc(10px + var(--safe-right)) calc(10px + var(--safe-bottom)) calc(10px + var(--safe-left));
    }


    .payment-modal {
        width: 100%;
        max-height: calc( 94dvh - var(--safe-top) - var(--safe-bottom) );
        padding: 18px 15px;
        border-radius: 22px 22px 16px 16px;
    }


    .payment-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }


        .payment-summary .payment-debt {
            grid-column: auto;
        }


        .payment-summary .payment-overpaid {
            grid-column: 1 / -1;
        }


    .payments-scroll {
        max-height: 200px;
    }


    .payment-history-item {
        padding: 10px;
    }


    .payment-history-icon {
        width: 36px;
        height: 36px;
        font-size: 17px;
    }


    .payment-history-top strong {
        font-size: 13px;
    }


    .payment-actions {
        grid-template-columns: 1fr 1.4fr;
    }
}


@media (max-width: 380px) {

    .payment-modal {
        padding: 16px 12px;
    }


    .payment-summary {
        gap: 7px;
    }


        .payment-summary > div {
            padding: 10px 7px;
        }


        .payment-summary strong {
            font-size: 12px;
        }


    .payment-history-bottom {
        font-size: 9px;
    }
}

.reservation-paid {
    background: #c7e8d2;
    border-color: #35a853;
}

.reservation-unpaid {
    background: #f4c3c3;
    border-color: #bd9090;
}

.reservation-partial {
    background: #f3c273;
    border-color: #f39c12;
}



.patient-phone-button {
    border: none;
    background: transparent;
    color: #168a5b;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 10px;
    transition: all 0.2s ease;
    direction: ltr;
}

    .patient-phone-button:hover {
        background: rgba(22, 138, 91, 0.10);
        transform: translateY(-1px);
    }

    .patient-phone-button:active {
        transform: scale(0.97);
    }
