/* ==========================================
   Tizon Health - Master CSS (V62 - Rich Text Treatment Notes)
   ========================================== */

:root { 
    --dr-green: #2F5233; 
    --dr-gold: #B89742; 
    --dr-light-gold: #fdfaf0; 
    --bg-light: #f8fafc; 
    --text-dark: #1e293b; 
    --danger: #ef4444; 
    --whatsapp: #25d366; 
    --radius: 16px; 
    font-size: 17px; 
}

* { box-sizing: border-box; font-family: 'Heebo', sans-serif; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--dr-gold); border-radius: 10px; }

body { margin: 0; padding: 0; background: var(--bg-light); color: var(--text-dark); display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

#loginScreen { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, #0f172a 0%, var(--dr-green) 100%); z-index: 999999; display: flex; align-items: center; justify-content: center; padding:20px; }
.login-box { background: white; padding: 40px; border-radius: 20px; box-shadow: 0 30px 60px rgba(0,0,0,0.4); width: 100%; max-width: 450px; text-align: center; border-top: 8px solid var(--dr-gold); display: flex; flex-direction: column; gap: 15px; }

.header { background: var(--dr-green); padding: 15px 25px; display: none; align-items: center; justify-content: space-between; color: white; border-bottom: 4px solid var(--dr-gold); min-height: 80px; }
.app-container { display: none; flex: 1; overflow: hidden; position: relative; }
.sidebar { width: 280px; background: white; border-inline-end: 1px solid #e2e8f0; padding: 15px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; flex-shrink:0; z-index: 10; }
.content-area { flex: 1; padding: 30px; overflow-y: auto; background: white; overflow-x: hidden; padding-bottom: 120px; position: relative; }

.tab-btn { background: transparent; border: none; text-align: right; padding: 14px; font-size: 1.1rem; cursor: pointer; border-radius: 10px; color: #475569; font-weight: 600; display: flex; align-items: center; gap: 10px; transition: 0.3s; }
.tab-btn:hover { background: #f1f5f9; color: var(--dr-green); }
.tab-btn.active { background: var(--dr-green); color: white; box-shadow: 0 4px 12px rgba(47,82,51,0.2); }

.logout-link { background: rgba(255,255,255,0.15); color: white; padding: 8px 18px; border-radius: 8px; text-decoration: none; font-size: 0.95rem; font-weight: bold; transition: 0.3s; border: 1px solid rgba(255,255,255,0.3); display: inline-block; }
.logout-link:hover { background: var(--danger); border-color: var(--danger); color: white; }

.card { background: white; border-radius: var(--radius); padding: 25px; margin-bottom: 25px; border: 1px solid #e2e8f0; width: 100%; }
.card-green { border-top: 6px solid var(--dr-green); box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.card-gold { border-top: 6px solid var(--dr-gold); background: var(--dr-light-gold); }

.i-box { width: 100%; padding: 14px; border: 2px solid #e2e8f0; border-radius: 10px; font-size: 1.1rem; outline: none; transition: 0.3s; background: #f8fafc; }
.i-box:focus { border-color: var(--dr-green); background: white; }

[contenteditable="true"] { min-height: 150px; background: white; border: 2px solid #e2e8f0; border-radius: 10px; padding: 15px; font-size: 1.2rem; margin-bottom: 15px; line-height: 1.6; outline: none; word-wrap: break-word; position: relative; }
[contenteditable="true"]:focus { border-color: var(--dr-gold); box-shadow: 0 0 0 3px rgba(184,151,66,0.1); }
[contenteditable="true"]:empty:before { content: attr(data-placeholder); color: #94a3b8; pointer-events: none; display: block; }

.flow-btn { background: var(--dr-green); color: white; border: none; padding: 14px 20px; border-radius: 10px; cursor: pointer; font-weight: bold; font-size: 1.1rem; transition: 0.3s; width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;}
.flow-btn:hover { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,0.15); }

.wa-btn { background: white; color: var(--whatsapp); border: 2px solid var(--whatsapp); border-radius: 10px; padding: 10px 15px; cursor: pointer; font-weight: bold; font-size: 1.1rem; transition: 0.3s; display:inline-flex; align-items:center; justify-content:center; gap:5px; }
.wa-btn:hover { background: var(--whatsapp); color: white; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(37,211,102,0.2); }

.floating-toolbar { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: rgba(255,255,255,0.98); backdrop-filter: blur(10px); padding: 10px; border-radius: 50px; border: 2px solid var(--dr-gold); box-shadow: 0 15px 40px rgba(0,0,0,0.2); display: none; gap: 6px; z-index: 100000; align-items: center; flex-wrap: wrap; justify-content: center; width: auto; max-width: 95vw; }
.toolbar-sep { width: 2px; height: 30px; background: #e2e8f0; margin: 0 4px; }
.float-btn { background: white; border: 1px solid #cbd5e1; border-radius: 50%; min-width: 45px; height: 45px; cursor: pointer; font-size: 1.3rem; font-weight: bold; color: #475569; transition: 0.2s; display: flex; align-items: center; justify-content: center; padding:0;}
.float-btn:hover { background: #e2e8f0; color: var(--dr-green); transform: scale(1.1); }
.mic-float { background: #0ea5e9; color: white; border: none; font-size: 1.8rem; min-width: 55px; height: 55px; box-shadow: 0 4px 10px rgba(14,165,233,0.3); }
.mic-float:hover { background: #0284c7; color: white; transform: scale(1.1); }
.mic-float.recording { background: var(--danger); animation: pulse 1.5s infinite; color: white; }
.font-select { height: 40px; padding: 0 10px; border: 1px solid #cbd5e1; border-radius: 8px; background: white; font-size: 1rem; color: #475569; cursor: pointer; outline: none; }

.search-dropdown { display:none; position:absolute; top:110%; left:0; right:0; background:white; border:2px solid var(--dr-gold); z-index:9999; max-height:300px; overflow-y:auto; border-radius:12px; box-shadow:0 15px 35px rgba(0,0,0,0.15); }
.search-dropdown-item { padding:15px 20px; font-size:1.4rem; cursor:pointer; border-bottom:1px solid #f1f5f9; font-weight:bold; color:var(--dr-green); text-align:right; transition:0.2s; }
.search-dropdown-item:hover { background:#f0fdf4; padding-right:25px; }

.dash-cards-row { display: flex; flex-wrap: wrap; gap: 15px; margin-bottom: 25px; justify-content: flex-start; }
.action-card { flex: 1 1 130px; max-width: 180px; background: white; padding: 20px 10px; border-radius: 15px; text-align: center; cursor: pointer; border: 1px solid #e2e8f0; transition: 0.3s; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 130px; overflow: hidden; }
.action-card b { margin-top: 10px; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; max-width: 100%; font-size: 0.95rem; line-height: 1.2; }
.action-card:hover { border-color: var(--dr-green); box-shadow: 0 10px 20px rgba(0,0,0,0.05); transform:translateY(-2px); }

.shortcut-controls { display: none; position: absolute; top: -10px; right: -10px; gap: 5px; z-index: 10; }
.action-card.edit-mode { border: 2px dashed var(--danger); background:#fef2f2; }
.action-card.edit-mode .shortcut-controls { display: flex; }

.ctrl-btn { background: white; border-radius: 50%; border: 1px solid #ddd; width: 35px; height: 35px; cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center; box-shadow:0 4px 6px rgba(0,0,0,0.1); }
.btn-del { color: red; border-color: red; }
.btn-edit { color: #0ea5e9; border-color: #0ea5e9; }

.task-item { display: flex; align-items: center; justify-content: space-between; background: #f8fafc; padding: 15px; border-radius: 12px; margin-bottom: 10px; border: 1px solid #e2e8f0; font-size: 1.1rem; }
.task-done { text-decoration: line-through; color: #94a3b8; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 25px; }
.stat-box { background: white; padding: 25px; border-radius: 16px; border: 1px solid #e2e8f0; text-align: center; cursor: pointer; transition: 0.3s; }
.stat-box:hover { transform: translateY(-5px); border-color: var(--dr-green); box-shadow: 0 10px 20px rgba(0,0,0,0.08); }
.stat-val { font-size: 3rem; font-weight: 900; color: var(--dr-green); }

.crm-item { display: flex; justify-content: space-between; align-items: center; background: white; padding: 14px 18px; border-radius: 12px; margin-bottom: 8px; border: 1px solid #e2e8f0; flex-wrap: wrap; gap: 12px; transition: 0.2s; cursor: pointer; }
.crm-item:hover { border-color: var(--dr-green); box-shadow: 0 5px 15px rgba(0,0,0,0.05); transform: translateY(-1px); }
.archive-img { max-height: 180px; max-width: 100%; border-radius: 8px; cursor: pointer; border: 1px solid #e2e8f0; }

.draggable-list-item { display:flex; justify-content:space-between; align-items:center; padding:12px 15px; border-bottom:1px solid #e2e8f0; background:white; margin-bottom:5px; border-radius:8px; cursor:grab; transition: 0.2s; border: 1px solid transparent; }
.draggable-list-item:hover { background: #f8fafc; border-color: #cbd5e1; box-shadow: 0 2px 5px rgba(0,0,0,0.02); }
.draggable-list-item:active { cursor: grabbing; background: #f0fdf4; border-color: var(--dr-green); }
.drag-handle { cursor: grab; padding-left: 10px; color: #94a3b8; font-size: 1.2rem; }

.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.92); z-index: 100000; align-items: center; justify-content: center; backdrop-filter: blur(5px); padding:20px;}
.modal-card { background: white; width: 100%; max-width: 800px; border-radius: 20px; padding: 30px; position: relative; overflow-y: auto; max-height: 90vh; }

.cloud-badge { position: fixed; top: 20px; left: 20px; padding: 8px 15px; border-radius: 20px; font-weight: bold; font-size: 0.9rem; color: white; z-index: 100; box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.cloud-online { background: #10b981; }
.cloud-offline { background: var(--danger); }

#saveIndicator { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); background: var(--dr-green); color: white; padding: 10px 25px; border-radius: 30px; opacity: 0; transition: 0.3s; z-index: 100001; font-size: 1rem; }
#saveIndicator.show { opacity: 1; }

.tizon-watermark { position: fixed; bottom: 10px; left: 15px; font-size: 0.85rem; color: #94a3b8; font-weight: bold; pointer-events: none; user-select: none; z-index: 9999; opacity: 0.7; }
.close-modal-btn { position: absolute; top: 20px; left: 20px; background: rgba(239, 68, 68, 0.9); color: white; border: none; font-size: 1.8rem; font-weight:bold; cursor: pointer; border-radius: 50%; width: 45px; height: 45px; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 15px rgba(0,0,0,0.5); transition: 0.2s; z-index: 1000001; }
.close-modal-btn:hover { background: red; transform: scale(1.1); }

/* יומן הטיפולים - כרטיסיות */
.treatment-card { background: white; border: 1px solid #e2e8f0; border-right: 5px solid var(--dr-green); border-radius: 12px; padding: 15px; margin-bottom: 15px; box-shadow: 0 2px 8px rgba(0,0,0,0.03); transition: 0.3s; }
.treatment-card:hover { box-shadow: 0 5px 15px rgba(0,0,0,0.08); border-color:#cbd5e1; }
.treatment-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #f1f5f9; padding-bottom: 10px; margin-bottom: 10px; font-weight: bold; color: var(--dr-gold); font-size: 1.2rem; }
.treatment-header button { background: none; border: none; cursor: pointer; color: var(--danger); font-size: 1.2rem; padding: 5px; transition:0.2s; }
.treatment-header button:hover { transform: scale(1.1); }
.treatment-body { font-size: 1.1rem; line-height: 1.6; }
.t-row { margin-bottom: 5px; }
.t-notes { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #e2e8f0; color: #475569; white-space: pre-wrap; }

.admin-only, .admin-only-flex { display: none !important; }
body.is-admin .admin-only { display: block !important; }
body.is-admin .admin-only-flex { display: flex !important; }

@media(max-width: 850px) { 
    :root { font-size: 16px; } 
    .app-container { flex-direction: column; } 
    .sidebar { width: 100%; flex-direction: row; height: auto; border-bottom: 1px solid #e2e8f0; overflow-x: auto; padding: 10px; } 
    .tab-btn { flex: 0 0 auto; white-space: nowrap; padding: 10px 15px; }
    .content-area { padding: 15px; padding-bottom: 180px; }
    .floating-toolbar { bottom: 10px; width: 98%; padding: 8px; border-radius:15px; flex-wrap:wrap;}
    .float-btn { min-width: 32px; height: 32px; font-size: 1rem; }
    .mic-float { min-width: 40px; height: 40px; font-size: 1.4rem; }
    .dash-cards-row { justify-content: center; }
    .action-card { flex: 1 1 calc(33% - 15px); max-width: 160px; min-height: 110px; padding: 10px; }
    .dashboard-header { flex-direction: column; align-items: flex-start !important; gap: 10px; }
    .tizon-watermark { display: none; }
}

@media(max-width: 500px) {
    .action-card { flex: 1 1 calc(50% - 15px); max-width: 100%; min-height: 100px; }
}

@media print { 
    @page { margin: 15mm 15mm 20mm 15mm; size: A4 portrait; }
    html, body { display: block !important; height: auto !important; min-height: auto !important; width: 100% !important; margin: 0 !important; padding: 0 !important; background: white !important; color: black !important; font-size: 14px !important; line-height: 1.5 !important; overflow: visible !important; } 
    body > *:not(#printSection) { display: none !important; } 
    #printSection { display: block !important; position: relative !important; width: 100% !important; max-width: 100% !important; margin: 0 !important; padding: 0 0 40px 0 !important; direction: rtl; overflow: visible !important; } 
    .print-section-block { page-break-inside: avoid; margin-bottom: 20px; width: 100%; display: block; }
    .print-header { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 2px solid #ccc !important; padding-bottom: 10px; margin-bottom: 20px; }
    .print-header img { max-height: 40px !important; width: auto !important; margin-bottom: 5px; }
    .print-title { font-size: 18px !important; font-weight: bold; color: #000 !important; border-bottom: 2px solid #ccc !important; padding-bottom: 5px; margin-top: 15px; margin-bottom: 10px; page-break-after: avoid; }
    .print-text { font-size: 14px !important; white-space: pre-wrap !important; word-wrap: break-word !important; overflow-wrap: break-word !important; max-width: 100% !important; display: block; page-break-before: auto; }
    img.archive-img, #printSection img:not(.print-header img) { max-width: 80% !important; height: auto !important; max-height: 300px !important; page-break-inside: avoid; display: block; margin: 10px auto; }
    .tizon-print-watermark { position: fixed !important; bottom: 0 !important; left: 0 !important; right: 0 !important; text-align: center !important; font-size: 11px !important; color: #94a3b8 !important; background: white !important; padding: 5px 0 !important; border-top: 1px dashed #cbd5e1 !important; z-index: 9999 !important; }
    * { float: none !important; box-shadow: none !important; }
}
/* ==========================================
   LOGIN SCREEN V2 - New Design
   ========================================== */
@keyframes fadeSlideUp { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:translateY(0)} }

#loginScreen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(150deg, #0d1f12 0%, #1a3a20 50%, #0b1a0e 100%);
    z-index: 999999; display: flex; flex-direction: column; align-items: center;
    justify-content: center; padding: 16px; gap: 18px; overflow-y: auto;
}

.login-brand { text-align: center; animation: fadeSlideUp 0.4s ease both; }
.login-brand-logo {
    width: 54px; height: 54px; background: var(--dr-gold); border-radius: 14px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.7rem; font-weight: 900; color: #0d1f12; margin-bottom: 8px;
    box-shadow: 0 4px 20px rgba(184,151,66,0.4);
}
.login-brand-name { font-size: 1.6rem; font-weight: 800; color: #fff; letter-spacing: 1px; }
.login-brand-sub { font-size: 0.72rem; color: rgba(255,255,255,0.4); margin-top: 3px; }

.auth-card {
    background: #fff; border-radius: 20px; width: 100%; max-width: 400px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.5); overflow: hidden;
    animation: fadeSlideUp 0.45s ease 0.08s both;
}
.auth-tabs {
    display: flex; background: #f1f5f9; padding: 5px; gap: 3px;
    border-bottom: 1px solid #e2e8f0;
}
.auth-tab {
    flex: 1; padding: 8px 4px; border: none; border-radius: 9px;
    background: transparent; font-size: 0.76rem; font-weight: 600;
    color: #64748b; cursor: pointer; transition: 0.2s; white-space: nowrap;
    font-family: inherit;
}
.auth-tab.active { background: #fff; color: var(--dr-green); box-shadow: 0 1px 4px rgba(0,0,0,0.1); }
.auth-tab:hover:not(.active) { color: var(--dr-green); }

.auth-section { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 11px; }
.auth-section-title {
    font-size: 0.75rem; font-weight: 700; color: #94a3b8;
    text-transform: uppercase; letter-spacing: 0.5px;
    border-bottom: 1px solid #f1f5f9; padding-bottom: 5px;
}
.auth-field-group { display: flex; flex-direction: column; gap: 4px; }
.auth-label { font-size: 0.78rem; font-weight: 600; color: #475569; }
.auth-input {
    width: 100%; padding: 10px 13px; border: 1.5px solid #e2e8f0;
    border-radius: 10px; font-size: 0.92rem; outline: none; transition: 0.2s;
    background: #f8fafc; color: var(--text-dark); font-family: inherit;
}
.auth-input:focus { border-color: var(--dr-green); background: #fff; box-shadow: 0 0 0 3px rgba(47,82,51,0.07); }
.auth-input::placeholder { color: #cbd5e1; }

.pwd-toggle {
    position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
    background: none; border: none; font-size: 1rem; cursor: pointer;
    padding: 4px; opacity: 0.55; transition: 0.2s;
}
.pwd-toggle:hover { opacity: 1; }

.remember-label { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: #64748b; cursor: pointer; font-weight: 600; }

.auth-error {
    color: var(--danger); font-weight: 600; font-size: 0.82rem;
    background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px;
    padding: 7px 11px; margin: 0; text-align: center;
}
.auth-btn-primary {
    width: 100%; padding: 12px; border: none; border-radius: 11px;
    background: linear-gradient(135deg, #2F5233, #3d6b42);
    color: #fff; font-weight: 700; font-size: 0.95rem; cursor: pointer;
    transition: 0.2s; display: flex; align-items: center; justify-content: center;
    gap: 7px; box-shadow: 0 4px 14px rgba(47,82,51,0.28); font-family: inherit;
}
.auth-btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.auth-btn-primary:active { transform: translateY(0); filter: brightness(0.97); }
.auth-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.auth-btn-link {
    background: none; border: none; color: var(--dr-green); font-weight: 600;
    font-size: 0.82rem; cursor: pointer; text-align: center; padding: 3px;
    transition: 0.2s; font-family: inherit;
}
.auth-btn-link:hover { text-decoration: underline; }

.distributor-badge {
    background: linear-gradient(135deg, #fdfaf0, #fef9e7);
    border: 1.5px solid var(--dr-gold); border-radius: 9px;
    padding: 9px 13px; font-weight: 700; font-size: 0.95rem;
    color: #92720a; text-align: center;
}

/* ==========================================
   דוחות התקדמות - מפת דרכים
   ========================================== */
.progress-report-card {
    background: white; border-radius: 12px; padding: 15px;
    margin-bottom: 12px; border: 1px solid #e2e8f0;
    border-right: 4px solid var(--dr-green);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04); transition: 0.2s;
}
.progress-report-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.08); }
.progress-report-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 10px; flex-wrap: wrap; gap: 8px;
    border-bottom: 1px solid #f1f5f9; padding-bottom: 10px;
}
.progress-report-body {
    font-size: 1rem; line-height: 1.7; color: #334155;
    white-space: pre-wrap; word-break: break-word;
}

/* ==========================================
   יומן טיפולים - שדרוג
   ========================================== */
.trt-add-btn {
    width: 100%; padding: 14px; margin-bottom: 16px;
    background: linear-gradient(135deg, var(--dr-gold), #d4aa4a);
    color: white; border: none; border-radius: 12px;
    font-size: 1.1rem; font-weight: 700; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    transition: 0.2s; box-shadow: 0 4px 12px rgba(184,151,66,0.3);
    font-family: inherit;
}
.trt-add-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }

.trt-form-card {
    background: #f0fdf4; border-radius: 16px; padding: 20px;
    margin-bottom: 20px; border: 1px solid #bbf7d0;
    box-shadow: 0 4px 16px rgba(47,82,51,0.08);
}
.trt-section {
    background: white; border: 1px solid #e2e8f0;
    padding: 14px; border-radius: 10px; margin-bottom: 14px;
}
.trt-section-title {
    display: block; color: var(--dr-green);
    margin-bottom: 8px; font-size: 0.95rem;
}

.rating-btn {
    padding: 5px 10px; border: 1.5px solid #e2e8f0; border-radius: 8px;
    background: white; cursor: pointer; font-size: 0.85rem;
    transition: 0.15s; font-family: inherit;
}
.rating-btn:hover { border-color: var(--dr-gold); background: #fdfaf0; }
.rating-active { background: #fef9c3 !important; border-color: var(--dr-gold) !important; font-weight: bold; }

.trt-stat {
    background: #f1f5f9; border-radius: 20px; padding: 6px 14px;
    font-size: 0.88rem; color: #475569;
}
.trt-stat-green { background: #dcfce7; color: #15803d; }
.trt-stat-red   { background: #fee2e2; color: #dc2626; }
.trt-stat-gold  { background: #fef9c3; color: #92400e; }

.trt-badge {
    display: inline-block; padding: 2px 9px; border-radius: 20px;
    font-size: 0.78rem; font-weight: 600;
}
.trt-badge-green { background: #dcfce7; color: #15803d; }
.trt-badge-red   { background: #fee2e2; color: #dc2626; }
.trt-badge-blue  { background: #dbeafe; color: #1d4ed8; }
.trt-badge-gray  { background: #f1f5f9; color: #475569; }

.trt-icon-btn {
    border: none; border-radius: 8px; padding: 5px 10px;
    cursor: pointer; font-size: 0.95rem; transition: 0.15s;
}
.trt-btn-blue { background: #dbeafe; color: #1d4ed8; }
.trt-btn-blue:hover { background: #bfdbfe; }
.trt-btn-red  { background: #fee2e2; color: #dc2626; }
.trt-btn-red:hover  { background: #fecaca; }

/* ==========================================
   מודול דיקור מתקדם
   ========================================== */
.acu-card {
    background: var(--acu-bg, #f8fafc);
    border: 2px solid var(--acu-border, #e2e8f0);
    border-radius: 12px; padding: 12px 14px;
    cursor: pointer; transition: 0.15s; position: relative;
    min-height: 80px; display: flex; flex-direction: column; gap: 4px;
}
.acu-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
    border-width: 2px;
}
.acu-card-selected {
    box-shadow: 0 0 0 3px var(--acu-border, #2F5233) !important;
    transform: translateY(-2px);
}
.acu-card-code {
    font-weight: 800; font-size: 1rem; color: #1e293b;
    letter-spacing: 0.3px;
}
.acu-card-desc {
    font-size: 0.8rem; color: #475569; line-height: 1.4;
    flex: 1;
}
.acu-card-meridian {
    font-size: 0.72rem; font-weight: 700; color: var(--acu-border, #64748b);
    opacity: 0.8; margin-top: auto;
}
.acu-card-check {
    position: absolute; top: 8px; left: 8px;
    background: var(--dr-green); color: white;
    width: 22px; height: 22px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; font-weight: bold;
}
.acu-tag {
    background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.4);
    color: white; padding: 4px 10px; border-radius: 20px;
    font-size: 0.82rem; font-weight: 600; cursor: pointer;
    transition: 0.15s; display: inline-flex; align-items: center; gap: 4px;
}
.acu-tag:hover { background: rgba(255,255,255,0.35); }

/* ==========================================
   טופס טיפול - עיצוב מחדש
   ========================================== */
.trt-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
@media(max-width: 600px) { .trt-row { grid-template-columns: 1fr; } }

.trt-field { display: flex; flex-direction: column; gap: 6px; }
.trt-field-full { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }

.trt-label {
    font-size: 0.88rem; font-weight: 700; color: #475569;
    display: block;
}
.trt-input { margin: 0 !important; width: 100%; }

.trt-actions {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 2px solid #e2e8f0;
}
@media(max-width: 600px) { .trt-actions { grid-template-columns: 1fr 1fr; } }

.trt-btn-save { background: var(--dr-green) !important; font-size: 1.05rem !important; padding: 14px !important; }
.trt-btn-file { background: white !important; color: var(--dr-green) !important; border: 2px solid var(--dr-green) !important; }
.trt-btn-cancel { background: var(--danger) !important; }

.rating-btn {
    padding: 8px 12px !important;
    font-size: 1rem !important;
    min-width: 52px;
}

/* ==========================================
   טופס טיפול - 3 עמודות לרוחב
   ========================================== */
.trt-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    align-items: start;
}
.trt-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.trt-block {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.trt-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #64748b;
    display: block;
}
@media(max-width: 850px) {
    .trt-grid { grid-template-columns: 1fr 1fr; }
}
@media(max-width: 550px) {
    .trt-grid { grid-template-columns: 1fr; }
}
.rating-btn {
    padding: 6px 8px !important;
    font-size: 1.2rem !important;
    min-width: 40px !important;
    border-radius: 8px !important;
}

/* כפתור מפת דיקור - בולט */
.acu-map-btn {
    width: 100%;
    padding: 10px 14px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--dr-green), #3d6b42);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 3px 10px rgba(47,82,51,0.25);
    transition: 0.2s;
}
.acu-map-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }

/* צ'אט צוות */
#teamChat::-webkit-scrollbar { width: 4px; }
#teamChat::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 99px; }
@media(max-width:850px) {
    #tab1 > div[style*="grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================
   התיקים שלי - עיצוב משופר
   ========================================== */
@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;500;600;700;800;900&display=swap');

.crm-item {
    font-family: 'Heebo', sans-serif;
}
.crm-item b {
    font-size: 1.05rem !important;
    font-weight: 700;
    color: var(--dr-green);
    letter-spacing: 0.2px;
    display: block;
    margin-bottom: 2px;
}
.crm-item:hover {
    border-color: var(--dr-green);
    box-shadow: 0 4px 12px rgba(47,82,51,0.08);
    transform: translateY(-1px);
}

/* גופן כללי - Heebo לכל האלמנטים */
body, input, select, textarea, button, label, span, div, a, h1, h2, h3, h4, p, td, th, li {
    font-family: 'Heebo', sans-serif !important;
}
h1, h2, h3 {
    font-weight: 700;
    letter-spacing: -0.3px;
}
.i-box, select, input, textarea {
    font-size: 1rem !important;
    line-height: 1.5;
}

/* אזור הדבקת קבצים */
.paste-drop-zone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 2.5px dashed #cbd5e1;
    border-radius: 12px;
    padding: 16px 20px;
    text-align: center;
    color: #64748b;
    cursor: pointer;
    transition: 0.2s;
    background: #f8fafc;
    user-select: none;
    font-size: 0.9rem;
}
.paste-drop-zone:hover, .paste-drop-hover {
    border-color: var(--dr-green) !important;
    color: var(--dr-green) !important;
    background: #f0fdf4 !important;
}

/* ==========================================
   דוחות קליניקה
   ========================================== */
.report-kpi {
    background: white;
    border-radius: 12px;
    padding: 16px 18px;
    border: 1px solid #e2e8f0;
    text-align: center;
}
.report-kpi-val {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dr-green);
    line-height: 1;
    margin-bottom: 6px;
}
.report-kpi-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

#tab_reports_custom {
    width: 100%;
    max-width: 100%;
    padding: 20px;
    box-sizing: border-box;
}
#analyticsContainer {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.staff-report-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
    transition: 0.15s;
}
.staff-report-row:last-child { border-bottom: none; }
.staff-report-row:hover { background: #f8fafc; border-radius: 8px; padding-right: 8px; }
