:root {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --surface-2: #f8fbff;
    --text: #162033;
    --muted: #162033;
    --line: #e5ebf3;
    --primary: #3b82f6;
    --primary-2: #2563eb;
    --dark: #0f172a;
    --success: #16a34a;
    --danger: #dc2626;
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
    --radius: 22px;

    --body-bg: #f4f7fb;

    --header-bg: linear-gradient(135deg, #1d4ed8 0%, #2563eb 45%, #4f46e5 100%);
    --header-text: #eff6ff;
    --header-btn-bg: #ffffff;
    --header-btn-text: #1e3a8a;
    --header-outline-border: rgba(255, 255, 255, 0.38);

    --footer-bg: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 45%, #3730a3 100%);
    --footer-text: #dbeafe;

}

/* =========================
   Reset / Base
========================= */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    direction: rtl;
}

body {
    font-family: 'Assistant', sans-serif;
    background: var(--body-bg);
    color: var(--text);
    min-height: 100vh;
}

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

img {
    max-width: 100%;
    display: block;
}

/* =========================
   Layout
========================= */

.site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: min(1160px, calc(100% - 32px));
    margin-inline: auto;
}

.page-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 34px 0 52px;
    flex: 1;
}

.page-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
    align-items: start;
}

.section {
    padding: 12px 0 42px;
}

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

.section-head h2 {
    margin: 0;
    font-size: 2rem;
}

.section-head p {
    margin: 6px 0 0;
    color: var(--muted);
}

.grid {
    display: grid;
    gap: 18px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* =========================
   Header / Navbar
========================= */

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--header-bg);
    color: var(--header-text);
    backdrop-filter: blur(10px) saturate(120%);
    -webkit-backdrop-filter: blur(10px) saturate(120%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.35);
}

.topbar,
.topbar a,
.topbar strong,
.topbar span {
    color: var(--header-text);
}

.topbar a:hover {
    color: #ffffff;
}

.topbar small {
    color: #dbeafe;
}
.topbar .btn {
    min-height: 44px;
    border-radius: 14px;
    font-weight: 800;
}

/* הסידור */
.nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 0;
}

/* לוגו */
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--header-text);
}

.brand-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 12px;
}

.brand strong {
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1.2;
}

.brand span {
    opacity: 0.9;
    font-weight: 600;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    box-shadow: var(--shadow);
}

/* תפריט */
.main-nav {
    display: flex;
    gap: 20px;
    align-items: center;
    color: var(--header-text);
}

.main-nav a {
    padding: 8px 14px;
    border-radius: 10px;
    transition: 0.2s;
}

.main-nav a.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.28);
}

.main-nav a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
}

/* פעולות */
.nav-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}
/* =========================
   Buttons
========================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-weight: 700;
    transition: 0.22s ease;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    box-shadow: 0 14px 30px rgba(59, 130, 246, 0.28);
}

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

.btn-outline {
    border-color: var(--line);
    background: #fff;
    color: var(--text);
}



.topbar .btn-dark {
    background: var(--header-btn-bg);
    color: var(--header-btn-text);
    border-color: var(--header-btn-bg);
}

.topbar .btn-dark:hover {
    opacity: 0.9;
}

.topbar .btn-outline {
    background: transparent;
    color: var(--header-text);
    border-color: var(--header-outline-border);
}

.topbar .btn-outline:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.55);
}

.btn-full {
    width: 100%;
}

/* =========================
   Hero
========================= */

.hero {
    padding: 44px 0 28px;
}

.hero-card {
    background: radial-gradient(circle at top right, #eef6ff 0, #ffffff 48%, #fdfdff 100%);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: 32px;
    padding: 34px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 26px;
    align-items: center;
}

.chip {
    display: inline-flex;
    background: #eaf3ff;
    color: var(--primary-2);
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.94rem;
    margin-bottom: 14px;
}

.hero h1 {
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.05;
    margin: 0 0 12px;
}

.hero p {
    font-size: 1.12rem;
    color: var(--muted);
    margin: 0 0 22px;
    max-width: 56ch;
}

.hero-visual {
    background: linear-gradient(145deg, #1e293b, #334155);
    color: #fff;
    border-radius: 28px;
    padding: 26px;
    min-height: 320px;
    display: grid;
    align-content: space-between;
    box-shadow: var(--shadow);
    animation: hero-visual-spin 900ms ease-out 1;
    transform-origin: center;
}

@keyframes hero-visual-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-visual {
        animation: none;
    }
}

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

.mini-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 16px;
    border-radius: 18px;
}

/* =========================
   Cards / Panels
========================= */

.card {
    background: #ffffff;
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    border: 1px solid #e5ebf3;
    transition: 0.25s;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

.form-card,
.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.form-card,
.panel {
    border-radius: 28px;
    padding: 26px;
}

.card h2,
.card h3 {
    margin-top: 0;
}

.feature-card {
    background: linear-gradient(180deg, #fff 0, #fbfdff 100%);
}

.info-box {
    padding: 16px 18px;
    border-radius: 20px;
    background: #f8fbff;
    border: 1px solid var(--line);
}

.empty {
    padding: 22px;
    border: 1px dashed #cbd5e1;
    border-radius: 20px;
    text-align: center;
    color: var(--muted);
    background: #fff;
}

/* =========================
   Typography / Utility
========================= */

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

.kpi {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 6px;
}

.kpi-box {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    border-radius: 18px;
    padding: 20px;
    text-align: center;
}

.kpi-box .kpi {
    font-size: 2rem;
    font-weight: 800;
}

.kpi-box .label {
    opacity: 0.85;
}

.form-title {
    margin: 0 0 6px;
    font-size: 2rem;
}

.form-subtitle {
    margin: 0 0 22px;
    color: var(--muted);
}

.helper {
    font-size: 0.92rem;
    color: var(--muted);
}

/* =========================
   Forms
========================= */

.field {
    margin-bottom: 16px;
}

.field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.input,
.select,
.textarea {
    width: 100%;
    border: 1px solid #d9e2ee;
    background: #fff;
    border-radius: 16px;
    padding: 14px 16px;
    font: inherit;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input:focus,
.select:focus,
.textarea:focus {
    border-color: #8cb8ff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

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

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.slot-time-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.inline-form {
    display: inline;
}

/* =========================
   Alerts / Pills / Badges
========================= */

.alert {
    border-radius: 18px;
    padding: 14px 16px;
    margin-bottom: 18px;
    font-weight: 700;
}

.alert-success {
    background: #ecfdf3;
    border: 1px solid #b7ebc6;
    color: #166534;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.pill {
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    font-weight: 700;
    background: #fff;
}

.badge {
    padding: 8px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 800;
}

.badge-success {
    background: #ecfdf3;
    color: #166534;
}

.badge-warning {
    background: #fff7ed;
    color: #b45309;
}

.badge-info {
    background: #eff6ff;
    color: #1d4ed8;
}

.badge-danger {
    background: #fef2f2;
    color: #b91c1c;
}

/* =========================
   Stats / Lists
========================= */

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.stat {
    padding: 16px;
    border-radius: 20px;
    background: var(--surface-2);
    border: 1px solid var(--line);
}

.list {
    display: grid;
    gap: 12px;
}

.list-item {
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    background: #fff;
}

.actions-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tabs .pill {
    cursor: pointer;
}

.tabs .pill.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

/* =========================
   Tables
========================= */

.table-wrap {
    overflow: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 14px;
    border-bottom: 1px solid var(--line);
    text-align: right;
}

.table th {
    color: #334155;
    font-size: 0.95rem;
}

/* =========================
   Detail Blocks
========================= */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.value-box {
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
}

.value-box strong {
    display: block;
    margin-bottom: 6px;
}

/* =========================
   Footer
========================= */

.site-footer {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    background: var(--footer-bg);
    color: var(--footer-text);
}

.site-footer a,
.site-footer p,
.site-footer strong {
    color: var(--footer-text);
}

.footer-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    padding: 34px 0 40px;
}

.footer-row p {
    color: var(--footer-text);
    margin: 8px 0 0;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-links a {
    color: #dbeafe;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-copy {
    text-align: center;
    color: #C8A2C8;
    padding: 0 0 20px;
}

.footer-copy a {
    color: #C8A2C8;
    text-decoration: underline;
    text-decoration-color: #C8A2C8;
}

/* =========================
   Responsive
========================= */

@media (max-width: 980px) {
    .hero-card,
    .page-grid,
    .grid-3,
    .grid-2,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .main-nav {
        display: none;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .footer-row,
    .nav-row {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-actions {
        justify-content: stretch;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .slot-time-grid {
        grid-template-columns: 1fr;
    }
}

/* WhatsApp Floating Button - ללא רקע */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    left: 20px; /* RTL */
    width: 70px;
    height: 70px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: transparent; /* ❌ אין רקע */
    border-radius: 0;        /* ❌ אין עיגול */

    box-shadow: none;        /* ❌ אין צל */
    z-index: 9999;

    transition: transform 0.3s ease;
}

.whatsapp-float img {
    width: 55px;
    height: 55px;
}

.whatsapp-float:hover {
    transform: scale(1.15);
}
.clinic-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.clinic-gallery-item {
    overflow: hidden;
    border-radius: 20px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.clinic-gallery-item img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.clinic-gallery-item img:hover {
    transform: scale(1.05);
}

@media (max-width: 980px) {
    .clinic-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .clinic-gallery {
        grid-template-columns: 1fr;
    }
}
/* =========================
   Flatpickr / Time Picker
========================= */

.js-time-picker {
    direction: ltr;
    text-align: center;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.flatpickr-calendar {
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.14);
    font-family: 'Assistant', sans-serif;
    overflow: hidden;
}

.flatpickr-time {
    border-top: 1px solid var(--line);
    background: #fff;
}

.flatpickr-time .flatpickr-time-separator,
.flatpickr-time .flatpickr-am-pm {
    color: var(--muted);
    font-weight: 700;
}

.flatpickr-time input.flatpickr-hour,
.flatpickr-time input.flatpickr-minute {
    direction: ltr;
    text-align: center;
    font-weight: 800;
    color: var(--text);
    border-radius: 10px;
}

.flatpickr-time input.flatpickr-hour:hover,
.flatpickr-time input.flatpickr-minute:hover,
.flatpickr-time input.flatpickr-hour:focus,
.flatpickr-time input.flatpickr-minute:focus {
    background: #eef6ff;
    color: var(--primary-2);
}

.flatpickr-current-month,
.flatpickr-monthDropdown-months,
span.flatpickr-weekday {
    font-weight: 700;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: var(--primary);
    border-color: var(--primary);
}

.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover {
    background: var(--primary-2);
    border-color: var(--primary-2);
}

.flatpickr-day.today {
    border-color: var(--primary);
}

.flatpickr-day:hover {
    background: #eef6ff;
    border-color: #dbeafe;
}

/* שורת חלונות זמן - קצת יותר מאוזנת */
.time-slot-row {
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.time-slot-row:hover {
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.slot-time-grid .field {
    margin-bottom: 0;
}

/* התאמה למובייל */
@media (max-width: 640px) {
    .flatpickr-calendar {
        width: 100% !important;
        max-width: 320px;
    }

    .js-time-picker {
        font-size: 16px; /* מונע zoom אוטומטי במובייל */
    }
}
/* =========================
   Monthly Availability Calendar
========================= */

.availability-panel {
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #fff;
    padding: 18px;
    box-shadow: var(--shadow);
}

.availability-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.availability-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text);
    text-align: center;
}

.availability-weekdays,
.availability-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.availability-weekdays {
    margin-bottom: 10px;
}

.availability-weekdays div {
    text-align: center;
    font-weight: 800;
    color: var(--muted);
    padding: 8px 0;
}

.availability-day {
    min-height: 92px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    text-align: right;
    font: inherit;
}

.availability-day:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.availability-day.empty-day {
    visibility: hidden;
    pointer-events: none;
}

.availability-day .day-num {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text);
}

.availability-day .day-state {
    font-size: 0.85rem;
    font-weight: 700;
}

.availability-day.state-free {
    background: #f3fcf5;
    border-color: #bfe3c7;
}

.availability-day.state-free .day-state {
    color: #166534;
}

.availability-day.state-partial {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

.availability-day.state-partial .day-state {
    color: #b45309;
}

.availability-day.state-booked {
    background: #fff1f2;
    border-color: #f3b7bf;
}

.availability-day.state-booked .day-state {
    color: #be123c;
}

.availability-day.state-blocked {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}

.availability-day.state-blocked .day-state {
    color: #b91c1c;
}

.availability-day-details {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.availability-day-details h3 {
    margin: 0 0 12px;
    font-size: 1.1rem;
}

.availability-day-slots-list {
    display: grid;
    gap: 10px;
}

.availability-slot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}

.availability-slot-time {
    font-weight: 800;
    color: var(--text);
    direction: ltr;
}

.availability-slot-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.availability-slot-label {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
}

.availability-slot-label.free {
    background: #ecfdf3;
    color: #166534;
}

.availability-slot-label.partial {
    background: #fff7ed;
    color: #b45309;
}

.availability-slot-label.booked {
    background: #fef2f2;
    color: #b91c1c;
}

.availability-slot-label.blocked {
    background: #e2e8f0;
    color: #334155;
}

.availability-slot-source {
    color: var(--muted);
    font-size: 0.9rem;
}

@media (max-width: 980px) {
    .availability-weekdays,
    .availability-grid {
        gap: 8px;
    }

    .availability-day {
        min-height: 82px;
        padding: 10px;
    }
}

@media (max-width: 640px) {
    .availability-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .availability-title {
        order: -1;
    }

    .availability-weekdays,
    .availability-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .availability-weekdays div:nth-child(n+3) {
        display: none;
    }

    .availability-slot {
        flex-direction: column;
        align-items: flex-start;
    }
}
.opening-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.opening-row .field {
    flex: 1;
    min-width: 140px;
}

.availability-day.state-pending {
    background-color: #f7e7a1;
    border-color: #caa64b;
    color: #6b4f00;
}

.availability-day.state-pending .day-state {
    color: #7a5a00;
}

.quick-action {
    background: #fff;
    border: 1px solid #e5ebf3;
    border-radius: 16px;
    padding: 16px;
    transition: 0.2s;
    cursor: pointer;
}

.quick-action:hover {
    background: #f0f6ff;
    border-color: #3b82f6;
}
