/* ===========================
   Agaah Counseling Center
   Refined UI – Midnight Blue & Cream
=========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #faf2dc;                    /* your beloved warm cream */
    --surface: #fffaf0;               /* soft warm white for cards */
    --primary: #2e3b4e;               /* warm slate navy – gentle but professional */
    --primary-light: #43546b;         /* lighter warm navy for hover effects */
    --accent: #c49a5c;                /* amber gold – inviting and warm */
    --text: #2c333e;                  /* warm dark grey for readability */
    --text-soft: #6b5f4e;             /* warm taupe grey for secondary text */
    --border: #e5d7b5;                /* warm beige border */
    --danger-bg: #ffeaea;
    --danger-text: #a71d2a;
    --radius: 18px;
    --radius-sm: 10px;
    --shadow-sm: 0 4px 12px rgba(0,0,0,0.04);
    --shadow: 0 12px 32px rgba(0,0,0,0.06);
    --shadow-lg: 0 24px 48px rgba(0,0,0,0.09);
    --transition: 0.25s ease;
    --max-content-width: 1200px;
}

/* ---------- Base ---------- */
body {
    font-family: 'Segoe UI', 'Vazirmatn', Tahoma, sans-serif;
    background: var(--bg);
    min-height: 100vh;
    padding: 40px 20px;
    color: var(--text);
    line-height: 1.6;
}

/* Direction-aware */
body.ltr { direction: ltr; text-align: left; }
body.rtl { direction: rtl; text-align: right; }
body.ltr .lang-switch { justify-content: flex-start; }
body.rtl .lang-switch { justify-content: flex-end; }
body.ltr .intro { border-left: 5px solid var(--primary); border-right: none; }
body.rtl .intro { border-right: 5px solid var(--primary); border-left: none; }
body.ltr .logout-link { text-align: right; }
body.rtl .logout-link { text-align: left; }

.page-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 40px 32px;           /* comfortable breathing space */
}

.container {
    width: 100%;
    max-width: var(--max-content-width);   /* 1200px – defined in :root */
    background: var(--surface);
    border-radius: var(--radius);
    padding: 48px 48px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.03);
}

.container.large {
    max-width: 100%;               /* large pages use full width */
}

/* Wrapper for tables (use in templates if you prefer, but not strictly needed) */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 20px 0;
}

/* ---------- Typography ---------- */
.logo {
    text-align: center;
    font-size: 42px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.subtitle {
    text-align: center;
    color: var(--text-soft);
    font-size: 16px;
    margin-bottom: 32px;
    font-weight: 400;
}

.intro {
    background: #ffebc9;
    border-radius: var(--radius-sm);
    padding: 24px;
    margin-bottom: 32px;
    color: #3d4555;
    line-height: 1.8;
    font-size: 15px;
}

/* ---------- Form Elements ---------- */
label {
    display: block;
    margin-bottom: 6px;
    margin-top: 24px;
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

input, select, textarea {
    width: 100%;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    font-size: 15px;
    transition: var(--transition);
    color: var(--text);
    outline: none;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(11, 30, 61, 0.08);
}

/* ---------- Buttons ---------- */
button, .btn {
    display: inline-block;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: white;
    font-size: 15px;
    font-weight: 600;
    padding: 14px 32px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    text-align: center;
    margin-top: 10px;
    letter-spacing: 0.3px;
}

button:hover, .btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(11, 30, 61, 0.2);
}

.btn-back {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 12px 28px;
    margin-top: 24px;
}

.btn-back:hover {
    background: rgba(11, 30, 61, 0.05);
    color: var(--primary);
    box-shadow: none;
    transform: translateY(-1px);
}

.btn.primary {
    background: var(--primary);
    width: 100%;
    padding: 16px;
    font-size: 16px;
    border-radius: 12px;
    margin-top: 24px;
}

.btn-delete {
    background: #c0392b;
    color: white;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
}

.btn-delete:hover {
    background: #a93226;
    color: white;
    text-decoration: none;
}

.buttons {
    display: flex;
    gap: 14px;
    margin-top: 32px;
}

/* ---------- Messages ---------- */
.error {
    background: var(--danger-bg);
    color: var(--danger-text);
    padding: 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
}

.messages {
    list-style: none;
    padding: 0;
    margin-bottom: 24px;
}
.messages li {
    background: #eef2f5;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    color: var(--primary);
    font-weight: 500;
}

/* ---------- Data Tables (admin, therapist, etc.) ---------- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.data-table thead th {
    background: var(--primary);
    color: white;
    padding: 16px 20px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.data-table tbody td {
    padding: 14px 20px;
    text-align: center;
    border-bottom: 1px solid #f0ede5;
    font-size: 14px;
    color: var(--text);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:hover {
    background: #fcf9f2;
}

/* ---------- Slot Booking Table ---------- */
.session-type-desc {
    color: var(--text-soft);
    margin-bottom: 28px;
    font-size: 15px;
    text-align: center;
    background: #f9f6f0;
    padding: 12px 20px;
    border-radius: 30px;
    display: inline-block;
}

.slot-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.slot-table thead th {
    background: var(--primary);
    color: white;
    padding: 14px 18px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.slot-table tbody td {
    padding: 14px 18px;
    text-align: center;
    border-bottom: 1px solid #f0ede5;
    font-size: 14px;
}

.slot-table tbody tr:last-child td {
    border-bottom: none;
}

.slot-table tbody tr:hover:not(.disabled-row) {
    background: #fcf9f2;
}

.disabled-row {
    background: #f5f2ec;
    opacity: 0.7;
    pointer-events: none;
}

.disabled-row td {
    color: #999;
}

.radio-cell input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* ---------- Badges ---------- */
.badge {
    display: inline-block;
    padding: 5px 16px;
    border-radius: 24px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge-initial { background: #e6d7c3; color: #5a4a3a; }
.badge-regular { background: #d0ddea; color: #0f2138; }
.badge-free { background: #d4edda; color: #155724; }
.badge-booked { background: #f8d7da; color: #721c24; }
.badge-cancelled { background: #eee0e0; color: #9e4040; }
.badge-handled { background: #e0f0e3; color: #2a6230; }
.badge-pending { background: #fff1d4; color: #8a5c1c; }

/* ---------- Chat Box ---------- */
.chat-box {
    border: 1px solid #e8dfd0;
    border-radius: var(--radius-sm);
    padding: 24px;
    max-height: 450px;
    overflow-y: auto;
    background: var(--surface);
    margin-bottom: 24px;
}

.message {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

body.ltr .message.me { align-items: flex-end; }
body.ltr .message.other { align-items: flex-start; }
body.rtl .message.me { align-items: flex-end; }
body.rtl .message.other { align-items: flex-start; }

.message strong {
    font-size: 13px;
    margin-bottom: 4px;
    color: var(--text-soft);
}

.message p {
    background: #f1ede5;
    padding: 12px 18px;
    border-radius: 18px;
    max-width: 75%;
    color: var(--text);
    line-height: 1.6;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.message.me p {
    background: #dce6f1;
}

/* ---------- Calendar Grid (therapist) ---------- */
.week-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 28px 0;
}

.day-card {
    width: 90px;
    padding: 16px 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.day-card:hover {
    background: #f6f2ea;
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.day-card.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.day-card.today {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(184, 134, 63, 0.2);
}

.day-name {
    font-size: 12px;
    display: block;
    margin-bottom: 6px;
    opacity: 0.8;
}

.day-number {
    font-size: 22px;
    font-weight: 700;
    display: block;
    line-height: 1.2;
}

.day-month {
    font-size: 12px;
    display: block;
    margin-top: 4px;
    opacity: 0.8;
}

/* Time grid inside calendar */
.time-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.time-slot {
    padding: 14px 8px;
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.slot-empty {
    background: #f9f7f1;
    border: 2px dashed var(--accent);
    color: var(--accent);
}

.slot-empty:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.slot-available {
    background: #e2f0e4;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.slot-booked {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    cursor: not-allowed;
}

.slot-cancelled {
    background: #f0e0e0;
    border: 1px solid #e0c0c0;
    color: #a04040;
    cursor: not-allowed;
}

/* ---------- Misc ---------- */
.lang-switch {
    display: flex;
    margin-bottom: 20px;
    gap: 8px;
}

.lang-switch button {
    height: 36px;
    padding: 0 16px;
    font-size: 13px;
    border-radius: 20px;
    background: var(--surface);
    color: var(--primary);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
}

.lang-switch button:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.logout-link {
    margin-bottom: 16px;
}

.logout-link a {
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    padding: 6px 16px;
    border-radius: 20px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.logout-link a:hover {
    background: rgba(11, 30, 61, 0.05);
    border-color: var(--primary);
    text-decoration: none;
}

.step-indicator {
    text-align: center;
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--text-soft);
}

#therapyBox { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .page-wrapper { padding: 20px 12px; }
    .container { padding: 32px 24px; }
}

/* Action buttons grouping */
.action-buttons {
    display: flex;
    gap: 12px;
    margin-left: auto;        /* push to the right */
}

/* Ensure the back button doesn't stretch */
.buttons .btn-back {
    flex-shrink: 0;
}

/* ------- Registration button row ------- */
.buttons-row {
    display: flex;
    justify-content: space-between;
    align-items: stretch;          /* makes all children same height */
    gap: 12px;
    margin-top: 32px;
}

.nav-buttons {
    display: flex;
    gap: 12px;
}

/* Make anchor buttons and <button> elements identical */
.buttons-row .btn,
.buttons-row button {
    padding: 12px 28px;            /* uniform padding */
    font-size: 15px;
    line-height: 1.4;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: auto;                 /* let padding decide height */
    margin-top: 0;                /* remove top margin */
}

/* =========================
   CLIENT PANEL DASHBOARD
========================= */
.welcome-header {
    text-align: center;
    margin-bottom: 32px;
}

.welcome-header h2 {
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 6px;
}

.welcome-sub {
    color: var(--text-soft);
    font-size: 15px;
}

.dashboard-card {
    background: var(--surface);
    border: 1px solid #ede7db;
    border-radius: var(--radius);
    padding: 24px 28px;
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    align-items: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.dashboard-card:hover {
    box-shadow: var(--shadow);
}

.card-icon {
    font-size: 36px;
    min-width: 50px;
    text-align: center;
}

.card-content {
    flex: 1;
}

.card-content h3 {
    font-size: 18px;
    color: var(--primary);
    margin-bottom: 14px;
}

.info-row {
    display: flex;
    gap: 10px;
    padding: 6px 0;
    font-size: 15px;
}

.info-label {
    font-weight: 600;
    color: var(--text);
    min-width: 90px;
}

.not-assigned {
    color: var(--accent);
    font-style: italic;
}

/* Appointment highlight */
.appointment-highlight {
    background: #eef2f7;
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.app-date {
    font-weight: 700;
    font-size: 16px;
    color: var(--primary);
}

.app-time {
    color: var(--text-soft);
}

.app-type {
    background: var(--primary);
    color: white;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.no-appointment {
    color: var(--text-soft);
    margin-bottom: 4px;
}

.app-hint {
    color: var(--accent);
    font-size: 14px;
}

/* Action Grid */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-top: 32px;
}

.action-btn {
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    padding: 24px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.action-btn:hover {
    background: var(--primary-light);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(11, 30, 61, 0.2);
    color: white;
    text-decoration: none;
}

.action-icon {
    font-size: 32px;
}

.action-text {
    font-size: 14px;
    font-weight: 600;
}

/* =========================
   BOOKING PAGE – TIMELINE CARDS
========================= */
.session-type-header {
    text-align: center;
    margin-top: 20px; 
    margin-bottom: 20px;
    font-size: 15px;
    background: #f9f6f0;
    color: var(--text);
    padding: 12px 24px;
    border-radius: 30px;
    display: inline-block;
    width: 100%;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 500;
}

.slot-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 30px;
}

.slot-card-v2 {
    background: var(--surface);
    border: 1px solid #e8e0cf;
    border-radius: var(--radius-sm);
    padding: 18px 22px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

/* Colored left‑border for available slots */
.slot-card-v2:not(.disabled) {
    border-left: 5px solid var(--primary);      /* LTR default – overridden for RTL */
}

html[dir="rtl"] .slot-card-v2:not(.disabled) {
    border-left: 1px solid #e8e0cf;
    border-right: 5px solid var(--primary);
}

.slot-card-v2:hover:not(.disabled) {
    border-color: var(--primary);
    background: #f5f1e8;
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.slot-card-v2.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f5f3ee;
    border-color: #ddd6c8;
    border-left: 5px solid #ddd6c8;
}

html[dir="rtl"] .slot-card-v2.disabled {
    border-left: 1px solid #ddd6c8;
    border-right: 5px solid #ddd6c8;
}

.slot-card-v2 input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    margin-right: 20px;              /* LTR */
    flex-shrink: 0;
    cursor: pointer;
}

html[dir="rtl"] .slot-card-v2 input[type="radio"] {
    margin-right: 0;
    margin-left: 20px;
}

.slot-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex: 1;
}

.slot-date-time {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.slot-date {
    font-weight: 700;
    color: var(--primary);
    font-size: 17px;
    line-height: 1.3;
}

.slot-time {
    font-weight: 600;
    color: var(--text);
    font-size: 16px;
    background: #f0ede5;
    padding: 3px 12px;
    border-radius: 20px;
}

.slot-badges {
    display: flex;
    gap: 10px;
    align-items: center;
}

.type-badge {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.type-initial {
    background: #e6d7c3;
    color: #5a4a3a;
}

.type-regular {
    background: #d0ddea;
    color: #0f2138;
}

.status-badge {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.status-available {
    background: #d4edda;
    color: #155724;
}

.status-booked {
    background: #f8d7da;
    color: #721c24;
}

.status-cancelled {
    background: #f0e0e0;
    color: #a04040;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-soft);
}

.empty-state .hint {
    font-size: 14px;
    color: var(--accent);
    margin-top: 8px;
}

/* primary button already exists – no change */

/* =========================
   EDIT PROFILE PAGE
========================= */
.form-section {
    background: var(--surface);
    border: 1px solid #ede7db;
    border-radius: var(--radius);
    padding: 28px 30px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.section-heading {
    font-size: 18px;
    color: var(--primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ece5d5;
}

.form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1 1 220px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    margin-top: 0;
    margin-bottom: 6px;
}

/* Make the primary button full width on small screens but not on desktop */
@media (min-width: 768px) {
    .btn.primary {
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
        display: block;
    }
}

/* =========================
   EDIT PROFILE BUTTON ROW
========================= */
/* Edit profile button row */
.form-buttons {
    display: flex;
    gap: 16px;
    margin-top: 28px;
    align-items: stretch;          /* same height */
}

.form-buttons .btn-back,
.form-buttons .btn.primary {
    flex: 1;                      /* equal width */
    padding: 14px 24px;
    font-size: 15px;
    margin-top: 0;
    border-radius: var(--radius-sm);
}

/* Remove the old desktop max-width and margin auto */
.btn.primary {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    display: block;
}

/* =========================
   TICKET LIST (INBOX CARDS)
========================= */
.ticket-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 30px;
}

.ticket-card {
    background: var(--surface);
    border: 1px solid #e8e0cf;
    border-radius: var(--radius-sm);
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.ticket-card:hover {
    border-color: var(--primary);
    background: #f5f1e8;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text);
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    flex-wrap: wrap;
}

.ticket-subject {
    font-weight: 700;
    font-size: 16px;
    color: var(--primary);
    line-height: 1.4;
}

.ticket-time {
    font-size: 13px;
    color: var(--text-soft);
    white-space: nowrap;
}

.ticket-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticket-role-badge {
    background: #eef2f7;
    color: var(--primary);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.ticket-arrow {
    color: var(--primary);
    font-size: 18px;
}

.empty-message {
    text-align: center;
    color: var(--text-soft);
    margin: 40px 0;
}

/* =========================
   TICKET DETAIL – MODERN CHAT
========================= */
.ticket-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.ticket-detail-header h2 {
    font-size: 22px;
    color: var(--primary);
    margin: 0;
}

.ticket-closed-badge {
    background: #f0e0e0;
    color: #a04040;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.chat-box {
    background: #faf8f3;
    border: 1px solid #e8e0cf;
    border-radius: var(--radius);
    padding: 24px;
    max-height: 500px;
    overflow-y: auto;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-message {
    display: flex;
    max-width: 75%;
}

.chat-message.incoming {
    align-self: flex-start;
}

.chat-message.outgoing {
    align-self: flex-end;
}

.message-bubble {
    background: white;
    border: 1px solid #e6ddcd;
    border-radius: 18px;
    padding: 14px 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    width: 100%;
}

.outgoing .message-bubble {
    background: #e3ebf3;
    border-color: #c3d4e6;
}

.message-sender {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 6px;
}

.message-text {
    font-size: 14px;
    color: var(--text);
    line-height: 1.6;
    word-wrap: break-word;
}

.message-time {
    font-size: 11px;
    color: var(--text-soft);
    text-align: right;
    margin-top: 8px;
}

.chat-empty {
    text-align: center;
    color: var(--text-soft);
    padding: 30px 0;
}

.chat-empty .hint {
    font-size: 14px;
    color: var(--accent);
    margin-top: 8px;
}

/* Chat input form */
.chat-form {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.chat-form textarea {
    flex: 1;
    resize: none;
    padding: 14px 18px;
    border-radius: 18px;
    border: 1px solid #d6cfbe;
    background: var(--surface);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.chat-form textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(11, 30, 61, 0.08);
}

.chat-form .btn {
    padding: 14px 28px;
    border-radius: 18px;
    margin-top: 0;
    white-space: nowrap;
}

.chat-closed-message {
    background: #fff2f2;
    color: #a04040;
    padding: 16px;
    border-radius: var(--radius-sm);
    text-align: center;
    font-weight: 500;
    margin-bottom: 24px;
}

/* =========================
   ADMIN PANEL STATS CARDS
========================= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid #ede7db;
    border-radius: var(--radius);
    padding: 24px 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.stat-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 30px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 14px;
    color: var(--text-soft);
    margin-top: 6px;
}

/* =========================
   ADMIN CLIENT LIST PAGE
========================= */
.page-header {
    margin-bottom: 30px;
}

.page-header h2 {
    font-size: 26px;
    color: var(--primary);
    margin-bottom: 6px;
}

.page-subtitle {
    color: var(--text-soft);
    font-size: 15px;
}

/* Polished table with softer row styles */
.polished-table {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.polished-table tbody tr {
    transition: background 0.2s ease;
}

.polished-table tbody td {
    vertical-align: middle;
}

.client-name {
    font-weight: 600;
    color: var(--text);
    display: block;
}

.client-username {
    font-size: 12px;
    color: var(--text-soft);
}

.therapist-name {
    font-weight: 500;
    color: var(--primary);
}

.not-assigned {
    color: var(--accent);
    font-style: italic;
}

.actions-cell {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Compact buttons inside tables */
.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 6px;
    margin-top: 0;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Responsive table wrapper */
.table-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

/* =========================
   CLIENT DETAIL PAGE
========================= */
.detail-card {
    background: var(--surface);
    border: 1px solid #ede7db;
    border-radius: var(--radius);
    padding: 28px 30px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.detail-card-header {
    border-bottom: 1px solid #ece5d5;
    padding-bottom: 12px;
    margin-bottom: 20px;
}

.detail-card-header h3 {
    font-size: 18px;
    color: var(--primary);
    margin: 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 16px;
    color: var(--text);
    font-weight: 500;
}

.reason-box {
    background: #faf8f3;
    border: 1px solid #e8e0cf;
    border-radius: var(--radius-sm);
    padding: 20px;
    font-size: 15px;
    line-height: 1.8;
    color: var(--text);
    white-space: pre-wrap;
}

.detail-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.detail-actions .btn {
    margin-top: 0;
}

/* =========================
   ASSIGN THERAPIST PAGE
========================= */
.assign-card {
    max-width: 600px;
    margin: 0 auto;
}

.assign-card .form-group {
    margin-bottom: 24px;
}

.nice-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: var(--surface) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231e3a5f' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>") no-repeat right 16px center;
    background-size: 16px;
    padding-right: 44px;   /* space for the arrow */
    cursor: pointer;
    font-size: 16px;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    width: 100%;
    transition: var(--transition);
}

.nice-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(11, 30, 61, 0.08);
    outline: none;
}

.detail-actions .btn.primary {
    padding: 14px 40px;
}

/* =========================
   ASSIGN THERAPIST PAGE
========================= */
.assign-card {
    max-width: 600px;
    margin: 0 auto;
}

/* Fix the dropdown arrow position for RTL so it never touches the text */
.nice-select {
    background: var(--surface) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231e3a5f' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>") no-repeat;
    background-size: 16px;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    width: 100%;
    transition: var(--transition);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* LTR: arrow on the right */
html[dir="ltr"] .nice-select {
    background-position: right 16px center;
    padding-right: 44px;
}

/* RTL: arrow on the left – prevents overlapping text */
html[dir="rtl"] .nice-select {
    background-position: left 16px center;
    padding-left: 44px;
    padding-right: 18px;
}

.nice-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(11, 30, 61, 0.08);
    outline: none;
}

/* Button row with clear gap */
.assign-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;                     /* comfortable spacing */
    margin-top: 10px;
}

/* =========================
   THERAPIST LIST PAGE
========================= */
.therapist-name {
    font-weight: 600;
    color: var(--text);
    display: block;
}

.therapist-username {
    font-size: 12px;
    color: var(--text-soft);
}

/* Already have .actions-cell, .btn-sm, .polished-table, .table-container from client list page – reuse them */

/* Optional: smooth delete button match */
.btn-delete.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 6px;
    margin-top: 0;
}

/* =========================
   ADD THERAPIST PAGE
========================= */
.add-therapist-card {
    max-width: 600px;
    margin: 0 auto;
}

.add-therapist-card .form-group {
    margin-bottom: 20px;
}

/* =========================
   MANAGE SESSIONS UPGRADE
========================= */
.calendar-card {
    background: var(--surface);
    border: 1px solid #ede7db;
    border-radius: var(--radius);
    padding: 24px 28px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-sm);
}

.selected-day-card {
    background: var(--primary);
    color: white;
    text-align: center;
    padding: 16px 24px;
    border-radius: var(--radius-sm);
    margin: 20px 0;
}

.selected-day-card h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.slots-card {
    background: var(--surface);
    border: 1px solid #ede7db;
    border-radius: var(--radius);
    padding: 24px 28px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-sm);
}

/* =========================
   TOAST NOTIFICATION
========================= */
.toast-message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    font-weight: 500;
    font-size: 15px;
}

.toast-message.success {
    background: #e0f4e5;
    color: #1e7e34;
    border: 1px solid #c3e6cb;
}

.toast-icon {
    font-weight: 700;
    font-size: 18px;
}

/* =========================
   THERAPIST REFER CLIENT PAGE
========================= */
.refer-card {
    max-width: 600px;
    margin: 0 auto;
}

.refer-card textarea {
    min-height: 100px;
}

/* Referral button row */
.refer-actions {
    display: flex;
    gap: 16px;
    margin-top: 10px;
}

.refer-actions .btn {
    flex: 1;  
    text-align: center;
    margin-top: 0;
}

/* =========================
   HANDLE REFERRAL PAGE
========================= */
.handle-referral-card {
    max-width: 650px;
    margin: 0 auto;
}

.referral-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.info-full {
    grid-column: 1 / -1;          /* full width for note */
}

.info-label {
    font-weight: 600;
    color: var(--text-soft);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.info-value {
    font-size: 16px;
    color: var(--text);
    font-weight: 500;
}

.info-note {
    background: #faf8f3;
    border: 1px solid #e8e0cf;
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
}

/* Half‑and‑half buttons */
.handle-actions {
    display: flex;
    gap: 16px;
}

.handle-actions .btn {
    flex: 1;
    text-align: center;
    margin-top: 0;
    padding: 14px 24px;
}

/* =========================
   LANDING PAGE
========================= */
.landing-hero {
    text-align: center;
    margin-bottom: 48px;
}

.landing-hero .logo {
    font-size: 52px;
    margin-bottom: 12px;
}

.landing-tagline {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 20px;
}

.landing-description {
    max-width: 700px;
    margin: 0 auto;
    color: var(--text-soft);
    font-size: 16px;
    line-height: 1.8;
}

.landing-section {
    margin-bottom: 48px;
    text-align: center;
}

.section-title {
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 28px;
}

.landing-features {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
}

.feature-card {
    background: var(--surface);
    border: 1px solid #ede7db;
    border-radius: var(--radius);
    padding: 28px 24px;
    flex: 1 1 250px;
    max-width: 300px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.feature-icon {
    font-size: 36px;
    display: block;
    margin-bottom: 14px;
}

.feature-card h4 {
    font-size: 18px;
    color: var(--primary);
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.6;
}

/* Statistics boxes */
.landing-stats {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.stat-box {
    background: var(--surface);
    border: 1px solid #ede7db;
    border-radius: var(--radius);
    padding: 32px 40px;
    text-align: center;
    min-width: 180px;
    flex: 1 1 200px;
    max-width: 280px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.stat-box:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.stat-number {
    font-size: 40px;
    font-weight: 700;
    color: var(--primary);
    display: block;
    line-height: 1.2;
}

.stat-label {
    font-size: 15px;
    color: var(--text-soft);
    margin-top: 8px;
}

/* Make the primary button in the landing CTA not full-width */
.landing-btn-primary.btn.primary {
    width: auto;
}

.price-tag {
    background: var(--primary);
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 8px;
}

/* Disabled button style (for Join Session) */
button.btn:disabled,
.btn.disabled {
    background: #cbd5e1;            /* soft grey */
    color: #64748b;
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: none;
    transform: none;
    pointer-events: none;           /* prevents hover effects */
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-soft);
}

.price-input {
    margin-top: 8px;
}

.status-badge {
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
}
.status-pending {
    background: #fff1d4;
    color: #8a5c1c;
}
.status-booked {
    background: #d4edda;
    color: #155724;
}

/* Help Button */
.help-btn {
    background: #f5e6d3;  /* کرم */
    color: #1e3a8a;  /* آبی پررنگ */
    border: 2px solid #2563eb;
    border-radius: 40px;
    padding: 8px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.help-btn:hover {
    background: #e8d5bc;
    border-color: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.2);
}

.help-icon {
    font-size: 1.2rem;
}

/* Popup Overlay */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.popup-card {
    background: #fef9f0;  /* کرم روشن */
    width: 90%;
    max-width: 500px;
    border-radius: 28px;
    box-shadow: 0 25px 45px -12px rgba(0,0,0,0.3);
    overflow: hidden;
    animation: slideUp 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    border: 1px solid #e2c9a7;
}

@keyframes slideUp {
    from {
        transform: translateY(40px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.popup-header {
    background: #f5e6d3;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 2px solid #2563eb;  /* خط آبی پررنگ */
}

.popup-icon {
    font-size: 2rem;
}

.popup-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: #1e3a8a;  /* آبی پررنگ */
    flex: 1;
}

.popup-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #9ca3af;
    transition: color 0.2s;
    line-height: 1;
}

.popup-close:hover {
    color: #dc2626;
}

.popup-body {
    padding: 24px;
}

.popup-body p {
    font-weight: 500;
    color: #5b3e1a;
    margin-bottom: 20px;
    border-left: 4px solid #2563eb;  /* آبی پررنگ */
    padding-left: 12px;
    background: #fef7e8;
    border-radius: 8px;
}

.process-step {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    background: #ffffff;
    padding: 8px 12px;
    border-radius: 60px;
    transition: all 0.2s;
    border: 1px solid #e2c9a7;
}

.process-step:hover {
    background: #fef7e8;
    transform: translateX(4px);
    border-color: #2563eb;
}

.step-number {
    background: #2563eb;  /* آبی پررنگ */
    color: white;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 40px;
    font-weight: 800;
    font-size: 1rem;
}

.step-text {
    font-size: 1rem;
    color: #3b2a1a;
    font-weight: 500;
}

.popup-footer {
    padding: 16px 24px 24px;
    text-align: center;
}

.got-it-btn {
    background: #2563eb;  /* آبی پررنگ */
    border: none;
    color: white;
    padding: 10px 28px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(37, 99, 235, 0.3);
}

.got-it-btn:hover {
    background: #1d4ed8;
    transform: scale(1.02);
}

/* تنظیمات RTL برای زبان فارسی */
body.rtl .process-step {
    flex-direction: row-reverse;
}

body.rtl .popup-body p {
    border-left: none;
    border-right: 4px solid #2563eb;
    padding-left: 0;
    padding-right: 12px;
}

body.rtl .process-step:hover {
    transform: translateX(-4px);
}

/* Make disabled buttons obviously inactive */
button.btn:disabled,
button.btn[disabled] {
    background: #cbd5e1 !important;   /* soft grey */
    color: #64748b !important;
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: none;
    transform: none;
}

.satisfaction-options {
    display: flex;
    gap: 20px;
    margin-top: 8px;
}
.satisfaction-options label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: normal;
    cursor: pointer;
}
.satisfaction-options input[type="radio"] {
    width: auto;
    margin: 0;
}

/* CTA BUTTONS (Register + Login) */
.cta-row {
    display: flex;
    gap: 20px;
    justify-content: center;
    max-width: 480px;
    margin: 0 auto;
}

.cta-btn {
    flex: 1;
    padding: 16px 28px;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.25s ease;
    letter-spacing: 0.3px;
    display: inline-block;
}

.cta-primary {
    background: var(--primary);
    color: white;
    border: 2px solid var(--primary);
}

.cta-primary:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(11, 30, 61, 0.25);
    text-decoration: none;
}

.cta-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.cta-outline:hover {
    background: rgba(11, 30, 61, 0.06);
    color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(11, 30, 61, 0.1);
    text-decoration: none;
}

/* Responsive stacking for small screens */
@media (max-width: 400px) {
    .cta-row {
        flex-direction: column;
        gap: 14px;
    }
    .therapist-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== FORCE BEAUTIFUL THERAPIST CARDS ===== */
.landing-section .therapist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.landing-section .therapist-card {
    background: #fffdf7 !important;
    border: 1px solid #ede7db !important;
    border-radius: 18px !important;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(0,0,0,0.06);
    transition: all 0.25s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.landing-section .therapist-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 48px rgba(0,0,0,0.09);
    border-color: #2e3b4e !important;
}

.landing-section .therapist-img {
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: #faf6ee;
    display: flex;
    align-items: center;
    justify-content: center;
}

.landing-section .therapist-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.landing-section .therapist-card:hover .therapist-img img {
    transform: scale(1.05);
}

.landing-section .placeholder-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0e8d8, #e8ddcc);
}

.landing-section .placeholder-icon {
    font-size: 64px;
    opacity: 0.7;
}

.landing-section .therapist-info {
    padding: 24px 20px 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.landing-section .therapist-info h4 {
    font-size: 21px;
    color: #2e3b4e;
    margin-bottom: 8px;
    font-weight: 700;
}

.landing-section .therapist-category {
    display: inline-block;
    background: #2e3b4e;
    color: white;
    padding: 5px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.landing-section .therapist-bio {
    color: #6b5f4e;
    font-size: 14px;
    line-height: 1.7;
    margin-top: 6px;
    flex: 1;
}

/* ===== نابودی سایز بزرگ عکس درمانگرها ===== */
#therapistsModal {
    align-items: center !important;
    padding-top: 20px !important;
}

#therapistsModal .modal-box {
    max-width: 850px !important;      /* پاپ‌آپ باریک‌تر */
    width: 95% !important;
    padding: 20px 15px !important;    /* فاصله داخلی کمتر */
}

#therapistsModal .therapist-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
    gap: 15px !important;
    margin-top: 10px !important;
}

#therapistsModal .therapist-card {
    max-width: 220px !important;
    margin: 0 auto !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05) !important;
}

#therapistsModal .therapist-img {
    height: 120px !important;         /* ارتفاع عکس نصف قبل */
}

#therapistsModal .therapist-info {
    padding: 10px 8px 14px !important;
}

#therapistsModal .therapist-info h4 {
    font-size: 16px !important;
    margin-bottom: 4px !important;
}

#therapistsModal .therapist-category {
    padding: 3px 10px !important;
    font-size: 11px !important;
    margin-bottom: 8px !important;
}

#therapistsModal .therapist-bio {
    font-size: 12px !important;
    line-height: 1.4 !important;
}

/* تضمین کوچکی عکس‌های پاپ‌آپ درمانگران */
#therapistsModal .therapist-img {
    height: 140px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

#therapistsModal .therapist-img img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
}

/* Guide Modal Styles */

/* Modal Overlay */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Modal Box */
.modal-box {
    background: #fef9f0;
    width: 90%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 28px;
    box-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    position: relative;
}

@keyframes slideUp {
    from {
        transform: translateY(40px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Close Button */
.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    color: #9ca3af;
    transition: color 0.2s;
    line-height: 1;
    z-index: 10;
}

.close-modal:hover {
    color: #dc2626;
}

/* RTL Support for Close Button */
body.rtl .close-modal {
    right: auto;
    left: 20px;
}

/* Modal Header */
.modal-header {
    text-align: center;
    padding: 30px 20px 10px;
    border-bottom: 2px solid #2563eb;
    margin-bottom: 20px;
}

.modal-header h3 {
    color: #1e3a8a;
    font-size: 1.6rem;
    margin-bottom: 10px;
}

.modal-subtitle {
    color: #5b3e1a;
    font-size: 0.95rem;
    display: inline-block;
    padding-bottom: 5px;
}

/* Steps Container */
.steps-container {
    background: #fef7e8;
    border-radius: 16px;
    padding: 20px;
    margin: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Step Item */
.step-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 12px 15px;
    border-radius: 50px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.step-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.step-highlight {
    background: linear-gradient(135deg, #2563eb10, #fef7e8);
    border: 1px solid #2563eb30;
}

.step-highlight .step-text {
    color: #1e3a8a;
    font-weight: bold;
}

/* Step Number */
.step-number {
    background: #2563eb;
    color: white;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
    flex-shrink: 0;
}

.step-highlight .step-number {
    background: #1e3a8a;
}

/* Step Text */
.step-text {
    color: #3b2a1a;
    font-size: 1rem;
    flex: 1;
}

/* Info Boxes */
.info-box {
    border-radius: 12px;
    padding: 16px;
    margin: 20px;
    text-align: right;
}

.info-box h4 {
    color: #1e3a8a;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-box p {
    color: #3b2a1a;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 8px 0;
}

/* Time Info */
.time-info {
    background: #e0e7ff;
}

/* Payment Info */
.payment-info {
    background: #fef3c7;
    border-right: 4px solid #2563eb;
}

/* Support Footer */
.support-footer {
    background: #f5e6d3;
    border-radius: 12px;
    padding: 15px;
    margin: 20px;
    text-align: center;
}

.support-footer p {
    margin: 5px 0;
    color: #3b2a1a;
    font-size: 0.9rem;
}

/* RTL Specific Adjustments */
body.rtl .step-item:hover {
    transform: translateX(-5px);
}

body.rtl .payment-info {
    border-right: none;
    border-left: 4px solid #2563eb;
}

body.rtl .info-box {
    text-align: right;
}

/* Scrollbar Styling for Modal Box */
.modal-box::-webkit-scrollbar {
    width: 8px;
}

.modal-box::-webkit-scrollbar-track {
    background: #f5e6d3;
    border-radius: 10px;
}

.modal-box::-webkit-scrollbar-thumb {
    background: #2563eb;
    border-radius: 10px;
}

.modal-box::-webkit-scrollbar-thumb:hover {
    background: #1e3a8a;
}

.collab-footer{
    background:#e0e7ff;
    border-radius:12px;
    padding:15px;
    margin:0 20px 20px 20px;
    text-align:center;
}

/* ===== Fix card spacing (prevent items touching borders) ===== */
.time-slot,
.slot-card-v2,
.day-card,
.modal-box,
.detail-card,
.calendar-card,
.slots-card {
    padding: 16px 14px !important;   /* internal breathing room */
    word-wrap: break-word;
    box-sizing: border-box;
}

/* Ensure buttons inside cards don't overflow */
.time-slot .btn-xs,
.time-slot a {
    margin: 4px 2px;
    display: inline-block;
}

/* Ensure slot‑row items wrap properly and have gap */
.slot-row {
    flex-wrap: wrap;
    gap: 12px !important;
}

/* Smooth out any tight corners */
.slot-card-v2,
.time-slot {
    border-radius: 12px !important;
}

/* ===== Footer Logo Styles ===== */
.landing-footer-logo {
    text-align: left;
    padding: 40px 0 30px;
    margin-top: 40px;
    border-top: 1px solid #ede7db;
}

.footer-logo-img {
    width: 40px;
    height: auto;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.footer-logo-img:hover {
    opacity: 0.8;
}

/* نسخه موبایل */
@media (max-width: 768px) {
    .landing-footer-logo {
        padding: 30px 0 20px;
    }
    
    .footer-logo-img {
        width: 50px;
    }
}

/* =========================
   CONTACT US MODAL – SOCIAL LINKS
========================= */
.social-links {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fffdf7;
    border: 1px solid #ede7db;
    border-radius: 14px;
    padding: 14px 18px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s ease;
}

.social-link:hover {
    background: #f5f1e8;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
    text-decoration: none;
    color: var(--text);
}

.social-icon {
    font-size: 24px;
    min-width: 32px;
    text-align: center;
}

.social-name {
    font-weight: 600;
    color: var(--primary);
    min-width: 80px;
}

.social-id {
    color: var(--text-soft);
    direction: ltr;
    text-align: left;
    flex: 1;
}

/* =========================
   SESSION RULES MODAL
========================= */
.rules-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rule-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #fefdf7;
    border: 1px solid #e8e0cf;
    border-radius: 12px;
    padding: 14px 18px;
    transition: all 0.2s ease;
}

.rule-item:hover {
    background: #f5f1e8;
    border-color: var(--primary);
}

.rule-number {
    background: var(--primary);
    color: white;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.rule-item span:last-child {
    color: var(--text);
    line-height: 1.6;
}

/* RTL adjustment for social links */
body.rtl .social-id {
    direction: ltr;
    text-align: left;
}

body.rtl .social-link {
    flex-direction: row;
}

body.ltr .social-link {
    flex-direction: row;
}

/* Force RTL alignment for guide modal text blocks */
body.rtl .modal-box .info-box,
body.rtl .modal-box .info-box h4,
body.rtl .modal-box .info-box p {
    text-align: right !important;
    direction: rtl !important;
}

/* Also force the rules list to be RTL (though it already is) */
body.rtl .rules-list .rule-item span:last-child {
    text-align: right;
    direction: rtl;
}

/* =========================
   RECEIPT UPLOAD PAGE – CLEAN & BEAUTIFUL
========================= */
.receipt-summary-card,
.bank-card-card,
.upload-card-container {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.receipt-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 10px;
}

.receipt-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #fcf9f2;
    border-radius: 10px;
}

.price-highlight {
    background: #eef2f7;
    border: 1px solid var(--primary);
}

.amount-value {
    font-weight: 800;
    font-size: 18px;
    color: var(--primary);
}

.bank-card-visual {
    background: linear-gradient(135deg, var(--primary), #1a2942);
    border-radius: 16px;
    padding: 28px 24px;
    color: white;
    text-align: left;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    margin: 20px 0;
}

.card-chip-icon {
    font-size: 32px;
    margin-bottom: 20px;
}

.card-number-large {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 4px;
    margin-bottom: 16px;
    font-family: 'Courier New', monospace;
}

.card-owner-large {
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.9;
}

.credit-note-note {
    margin-top: 16px;
    font-size: 13px;
    color: var(--accent);
    font-weight: 600;
    background: #fff8ec;
    padding: 10px 14px;
    border-radius: 10px;
    border-left: 4px solid var(--accent);
}

.upload-instruction-text {
    color: var(--text-soft);
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}

.drop-zone {
    border: 2px dashed #d6cfbe;
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s ease;
    background: #fffdf7;
    cursor: pointer;
    margin-bottom: 24px;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--primary);
    background: #f0f4fa;
}

.drop-zone.has-file {
    border-color: #28a745;
    background: #f0fff4;
}

.drop-zone input[type="file"] {
    display: none;
}

.drop-content {
    pointer-events: none;
}

.upload-icon-large {
    font-size: 48px;
    margin-bottom: 12px;
}

.browse-btn {
    pointer-events: auto;
    margin-top: 12px;
}

.file-name-display {
    margin-top: 12px;
    font-weight: 600;
    color: #28a745;
    font-size: 14px;
}

.submit-btn-large {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    border-radius: 12px;
}

@media (max-width: 600px) {
    .receipt-detail-grid {
        grid-template-columns: 1fr;
    }
    .bank-card-visual {
        padding: 20px;
    }
    .card-number-large {
        font-size: 18px;
    }
}

