/* ==========================================================================
   DentCell Modals, Bottom Sheets, Dental Odontogram & Interactive Viewers
   ========================================================================== */

.modal-backdrop {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border-radius: inherit;
  overflow: hidden;
  animation: fadeIn 0.2s ease-out;
}

.modal-container {
  width: 100%;
  max-width: 412px;
  background: var(--bg-card);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  animation: slideUpModal 0.28s var(--ease-smooth);
}

@keyframes slideUpModal {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-handle-bar {
  display: flex;
  justify-content: center;
  padding: 10px 0 4px;
}

.modal-handle {
  width: 40px;
  height: 4px;
  background: var(--slate-300);
  border-radius: var(--radius-full);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--slate-900);
}

.btn-close-modal {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--slate-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--slate-600);
  transition: all var(--transition-fast);
}
.btn-close-modal:hover {
  background: var(--slate-200);
}

.modal-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 12px 20px 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 10px;
}

/* 5.1 Ziyaret Detayı Alt Menü Eylemleri */
.visit-action-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.visit-action-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--slate-50);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  font-weight: 700;
  color: var(--slate-800);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.visit-action-btn:hover {
  background: #eff6ff;
  border-color: var(--primary-300);
  color: var(--primary-700);
}

.visit-action-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Privacy Toggle Row (Profilinde Görünmesin) */
.privacy-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--slate-50);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

.switch-label {
  display: flex;
  flex-direction: column;
}

.switch-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--slate-900);
}

.switch-desc {
  font-size: 0.75rem;
  color: var(--slate-500);
}

/* Toggle Switch Control */
.toggle-switch {
  position: relative;
  width: 48px;
  height: 26px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--slate-300);
  transition: 0.25s;
  border-radius: 34px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.25s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: var(--primary-600);
}

input:checked + .toggle-slider:before {
  transform: translateX(22px);
}

/* ==========================================================================
   INTERACTIVE 32-TEETH DENTAL ODONTOGRAM / TEETH SIMULATOR
   ========================================================================== */
.dental-odontogram {
  background: #ffffff;
  color: #0f172a;
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: var(--shadow-card);
}

.odontogram-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.odontogram-arch-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: #0284c7;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.teeth-row {
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  gap: 3px;
  margin-bottom: 8px;
  align-items: center;
}

.tooth-item {
  height: 38px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 3px 1px;
  font-size: 0.62rem;
  font-weight: 800;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.tooth-item:hover {
  border-color: #0284c7;
  color: #0284c7;
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.2);
}

.tooth-item.selected {
  border-color: #f59e0b !important;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3) !important;
  transform: translateY(-2px) scale(1.08);
  z-index: 5;
}

.tooth-item.implant {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
}

.tooth-item.crown {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.tooth-item.rootcanal {
  background: #ea580c;
  border-color: #ea580c;
  color: #ffffff;
}

.tooth-item.filling {
  background: #8b5cf6;
  border-color: #8b5cf6;
  color: #ffffff;
}

.tooth-item.extracted {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #64748b;
}

.tooth-item.healthy {
  background: #f8fafc;
  color: #334155;
}

.tooth-code {
  font-size: 0.62rem;
  font-family: var(--font-mono);
}

.tooth-sub-tag {
  font-size: 0.5rem;
  font-weight: 700;
  line-height: 1;
}

/* Selected Tooth Live Info Box */
.tooth-live-info-card {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-top: 10px;
  animation: fadeIn 0.2s ease-out;
}

.tooth-live-info-title {
  font-size: 0.84rem;
  font-weight: 800;
  color: #0369a1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tooth-live-info-desc {
  font-size: 0.75rem;
  color: #334155;
  margin-top: 4px;
  line-height: 1.35;
}

/* ==========================================================================
   RADIOLOGY DICOM VIEWER
   ========================================================================== */
.xray-viewer-box {
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.xray-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: #111827;
  padding: 10px;
  border-radius: var(--radius-md);
  margin-top: 10px;
}

.btn-xray-tool {
  color: #9ca3af;
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
}

.btn-xray-tool.active, .btn-xray-tool:hover {
  color: #38bdf8;
}

/* ==========================================================================
   3D SMILE DESIGN INTERACTIVE SIMULATOR
   ========================================================================== */
.smile-sim-container {
  background: linear-gradient(180deg, #0f172a, #1e293b);
  border-radius: var(--radius-xl);
  padding: 16px;
  color: #fff;
  text-align: center;
}

.smile-shade-pills {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 12px 0;
}

.shade-pill {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  background: #334155;
  color: #cbd5e1;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.shade-pill.active {
  background: #ffffff;
  color: #0f172a;
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

/* Notifications list */
.notification-item-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: var(--slate-50);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
}

.notification-icon-wrap {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #eff6ff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ==========================================================================
   PRODUCT TOUR & PRESENTATION CAROUSEL
   ========================================================================== */
.tour-hero-card {
  background: linear-gradient(145deg, #1e40af, #0f172a);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 20px 16px;
  text-align: center;
  margin-bottom: 14px;
  box-shadow: 0 10px 25px rgba(30, 64, 175, 0.35);
  position: relative;
  overflow: hidden;
}

.tour-hero-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin: 0 auto 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.tour-feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0;
}

.tour-feature-item {
  background: var(--slate-50);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 12px 10px;
  text-align: center;
  transition: all 0.2s ease;
}

.tour-feature-item:hover {
  border-color: var(--primary-500);
  background: #eff6ff;
  transform: translateY(-2px);
}

.tour-feature-icon {
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.tour-feature-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--slate-900);
}

.tour-feature-desc {
  font-size: 0.68rem;
  color: var(--slate-500);
  margin-top: 2px;
}

/* ==========================================================================
   OFFICIAL GİB E-INVOICE PAPER DESIGN (PRINTABLE & DOWNLOADABLE)
   ========================================================================== */
.invoice-paper {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 16px;
  color: #0f172a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.invoice-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid #2563eb;
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.invoice-gib-logo {
  font-size: 0.72rem;
  font-weight: 800;
  color: #dc2626;
  border: 1.5px solid #dc2626;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 4px;
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 0.75rem;
}

.invoice-table th {
  background: #f1f5f9;
  color: #334155;
  padding: 6px 8px;
  text-align: left;
  font-weight: 700;
  border-bottom: 1px solid #cbd5e1;
}

.invoice-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #f1f5f9;
}

/* Stepper buttons */
.stepper-control {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
}

.stepper-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--slate-100);
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--slate-700);
  transition: all 0.15s ease;
}

.stepper-btn:hover {
  background: var(--primary-600);
  color: #fff;
}

.stepper-val {
  width: 38px;
  text-align: center;
  font-weight: 800;
  font-size: 0.88rem;
}

/* ==========================================================================
   ODONTOGRAM SWITCH (ADULT 32 vs CHILD 20 PEDIATRIC)
   ========================================================================== */
.odontogram-switch-bar {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.12);
  gap: 4px;
}

.btn-arch-type {
  flex: 1;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-arch-type.active {
  background: var(--primary-600);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
}

/* ==========================================================================
   CALENDAR VIEW SWITCHER & DOCTOR / ROOM FILTERS
   ========================================================================== */
.cal-view-tabs {
  display: flex;
  background: var(--slate-100);
  padding: 3px;
  border-radius: var(--radius-lg);
  gap: 4px;
}

.cal-view-tab-btn {
  flex: 1;
  padding: 6px 8px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--slate-600);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cal-view-tab-btn.active {
  background: #ffffff;
  color: var(--primary-700);
  box-shadow: var(--shadow-xs);
}

.cal-filters-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.cal-filter-select {
  flex: 1;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 6px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--slate-800);
}

/* ==========================================================================
   PROFESSIONAL CALENDAR GRID MATRIX & APPOINTMENT WIDGET
   ========================================================================== */
.calendar-widget {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-xl);
  padding: 16px 14px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  width: 100%;
  box-sizing: border-box;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 0 2px;
}

.calendar-month-title {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.btn-back-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-back-circle:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.btn-back-circle:active {
  transform: scale(0.95);
}

.calendar-grid-days {
  display: grid !important;
  grid-template-columns: repeat(7, 1fr) !important;
  gap: 4px !important;
  width: 100% !important;
  box-sizing: border-box;
}

.cal-day-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  padding: 6px 0;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.cal-day-cell {
  height: 38px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  user-select: none;
  background: transparent;
  border: 1px solid transparent;
}

.cal-day-cell:hover:not(.active) {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.cal-day-cell:active {
  transform: scale(0.95);
}

.cal-day-cell.active {
  background: #0284c7 !important;
  color: #ffffff !important;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
  border-color: #0284c7;
}

.cal-day-cell.has-event::after {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 4.5px;
  height: 4.5px;
  border-radius: 50%;
  background: #0284c7;
}

.cal-day-cell.active.has-event::after {
  background: #ffffff !important;
}

/* Conflict Warning Card */
.conflict-warning-card {
  background: #fef2f2;
  border: 1.5px solid #f87171;
  border-radius: var(--radius-md);
  padding: 10px 12px;
  color: #991b1b;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  animation: pulseLogo 2s infinite;
}

/* ==========================================================================
   EMPTY STATE BOXES
   ========================================================================== */
.empty-state-card {
  text-align: center;
  padding: 28px 16px;
  background: var(--bg-card);
  border: 1.5px dashed var(--border-subtle);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--slate-500);
}

.empty-state-icon {
  font-size: 2.2rem;
  margin-bottom: 8px;
  opacity: 0.8;
}

.empty-state-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--slate-800);
}

.empty-state-desc {
  font-size: 0.75rem;
  color: var(--slate-500);
  margin-top: 2px;
  max-width: 240px;
}

/* ==========================================================================
   AUDIT LOG & KVKK LEGAL DOCUMENT DESIGN
   ========================================================================== */
.audit-log-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.78rem;
}

.audit-log-badge {
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  flex-shrink: 0;
}

.kvkk-paper {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  font-size: 0.8rem;
  color: var(--slate-800);
  line-height: 1.55;
}

.kvkk-section-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--primary-800);
  margin: 12px 0 4px;
}

/* ==========================================================================
   T.C. SAĞLIK BAKANLIĞI E-NABIZ USS & SAĞLIKNET ENTEGRASYON STİLLERİ
   ========================================================================== */
.enabiz-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 800;
}

.enabiz-badge.synced {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.enabiz-uss-card {
  background: #ffffff;
  border: 1.5px solid #fee2e2;
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.08);
}

.enabiz-header-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #ef4444;
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.enabiz-logo-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 800;
  color: #b91c1c;
}

.enabiz-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 0.75rem;
  background: #f8fafc;
  padding: 10px;
  border-radius: var(--radius-md);
  margin-bottom: 10px;
}

/* Printable Patient Registration QR Poster */
.qr-poster-card {
  background: #ffffff;
  border: 2px solid #0284c7;
  border-radius: 20px;
  padding: 24px 16px;
  text-align: center;
  box-shadow: 0 10px 25px rgba(2, 132, 199, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.qr-poster-logo {
  font-size: 2.2rem;
  margin-bottom: 4px;
}

.qr-poster-clinic-name {
  font-size: 1.15rem;
  font-weight: 900;
  color: #0369a1;
}

.qr-poster-badge {
  display: inline-block;
  background: #e0f2fe;
  color: #0284c7;
  font-weight: 800;
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 20px;
  margin: 6px 0 14px;
}

.qr-poster-image-box {
  width: 190px;
  height: 190px;
  background: #ffffff;
  border: 3px solid #0284c7;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.qr-poster-footer-text {
  font-size: 0.75rem;
  color: var(--slate-500);
  margin-top: 14px;
  max-width: 260px;
  line-height: 1.35;
}

/* Pending Requests & Approvals */
.pending-request-card {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-radius: var(--radius-lg);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pending-request-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pending-actions-row {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.pending-actions-row .btn {
  flex: 1;
  font-size: 0.72rem;
  padding: 5px 8px;
  font-weight: 800;
}

/* Financial Summary Modal Card */
.financial-summary-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-xl);
  padding: 16px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.fin-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.fin-big-amount {
  font-size: 1.6rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.fin-stat-col {
  text-align: right;
}

.fin-status-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-top: 2px;
}

.fin-status-paid {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.fin-status-due {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.fin-progress-bar {
  width: 100%;
  height: 6px;
  background: #f1f5f9;
  border-radius: 3px;
  overflow: hidden;
  margin: 10px 0;
}

.fin-progress-fill {
  height: 100%;
  border-radius: 3px;
}

