/* ===== AT CLINIC CRM - STYLE.CSS ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #14b8a6;
  --primary-dark: #0d9488;
  --primary-light: rgba(20, 184, 166, 0.15);
  --secondary: #1e293b;
  --accent: #6366f1;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  --bg-main: #0f172a;
  --bg-card: #1e293b;
  --bg-card2: #162032;
  --bg-sidebar: #0b1628;
  --bg-hover: rgba(255, 255, 255, 0.05);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --border: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(20, 184, 166, 0.4);

  --sidebar-width: 220px;
  --topbar-height: 65px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  scrollbar-gutter: stable;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: clip;
  width: 100%;
  max-width: 100vw;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 100;
  transition: var(--transition);
  overflow: hidden;
}

.sidebar.collapsed {
  width: 70px;
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-item span:not(.badge),
.sidebar.collapsed .user-details {
  display: none;
}

.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 12px;
}

.sidebar.collapsed .nav-item .badge {
  display: none;
}

.sidebar.collapsed .logo {
  justify-content: center;
}

.sidebar.collapsed .user-info {
  justify-content: center;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 12px;
  border-bottom: 1px solid var(--border);
  min-height: 60px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.4);
}

.logo-title {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.logo-sub {
  display: block;
  font-size: 10px;
  color: var(--primary);
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.sidebar-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: var(--transition);
}

.sidebar-toggle:hover {
  color: var(--primary);
  background: var(--primary-light);
}

/* ===== NAV ===== */
.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  overflow-y: auto;
  overflow-x: hidden;
}

.nav-section {
  margin-bottom: 24px;
}

.nav-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0 8px;
  margin-bottom: 6px;
}

.nav-label.nav-label-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
}

.nav-label.nav-label-toggle:hover {
  color: var(--text-secondary);
}

.nav-label.nav-label-toggle:focus-visible {
  outline: 2px solid rgba(20, 184, 166, 0.45);
  outline-offset: 2px;
  border-radius: 6px;
}

.nav-label-text {
  min-width: 0;
}

.nav-label-chevron {
  font-size: 10px;
  transition: transform 0.2s ease, color 0.2s ease;
  color: inherit;
  flex-shrink: 0;
}

.sidebar:not(.collapsed) .nav-section.is-collapsed > .nav-item {
  display: none;
}

.sidebar:not(.collapsed) .nav-section.is-collapsed > .nav-label {
  margin-bottom: 0;
}

.sidebar:not(.collapsed) .nav-section.is-collapsed .nav-label-chevron {
  transform: rotate(-90deg);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 2px;
  transition: var(--transition);
  position: relative;
  white-space: nowrap;
  min-width: 0;
}
.nav-item span:not(.badge) {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.nav-item i {
  width: 18px;
  text-align: center;
  flex-shrink: 0;
  font-size: 15px;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.2), rgba(20, 184, 166, 0.05));
  color: var(--primary);
  border: 1px solid rgba(20, 184, 166, 0.2);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--primary);
  border-radius: 0 4px 4px 0;
}

.sidebar .randevu-count-badge {
  display: none !important;
}

.badge {
  margin-left: auto;
  background: var(--primary);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  flex-shrink: 0;
}

.badge-warning {
  background: var(--warning);
}

.badge-success {
  background: var(--success);
}

/* ===== SIDEBAR FOOTER ===== */
.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.user-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.user-role {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
}

/* Sadece ikonlar kalsın: ad / rol metnini gizle (sidebar-footer hariç) */
.user-info .user-details {
  display: none;
}
.sidebar-footer .user-info .user-details {
  display: block;
}
.sidebar-footer .user-details .user-role,
.sidebar-footer .user-details span:not(.user-name) {
  display: none;
}

.logout-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: var(--transition);
}

.logout-btn:hover {
  color: var(--danger);
}
.logout-btn-text {
  margin-left: 4px;
  font-size: 11px;
}
.sidebar.collapsed .logout-btn-text {
  display: none;
}

/* Sidebar kapalıyken sadece çıkış ikonu kalsın */
.sidebar.collapsed .sidebar-footer .user-avatar {
  display: none;
}
.sidebar.collapsed .sidebar-footer .user-details {
  display: none;
}
.sidebar.collapsed .sidebar-footer .user-info {
  justify-content: center;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.sidebar.collapsed~.main-content {
  margin-left: 70px;
}

/* ===== TOPBAR ===== */
.topbar {
  height: var(--topbar-height);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 90;
  flex-shrink: 0;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-profile-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.topbar-profile-btn {
  border-radius: 999px;
  overflow: hidden;
  padding: 0;
}

.topbar-profile-initials {
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  background: linear-gradient(135deg, rgba(20,184,166,0.18), rgba(99,102,241,0.16));
}

.topbar-profile-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 230px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 950;
  overflow: hidden;
}

.topbar-profile-menu.active {
  display: block;
  animation: topbarProfileMenuIn 0.18s ease;
}

@keyframes topbarProfileMenuIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.topbar-profile-head {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card2);
}

.topbar-profile-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-profile-role {
  margin-top: 2px;
  font-size: 11px;
  color: var(--text-muted);
}

.topbar-profile-action {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
}

.topbar-profile-action:last-child {
  border-bottom: none;
}

.topbar-profile-action:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.topbar-profile-action.danger:hover {
  background: rgba(239,68,68,0.12);
  color: var(--danger);
}

.topbar-profile-action i {
  width: 14px;
  text-align: center;
}

.menu-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 18px;
  padding: 6px;
  border-radius: 6px;
  transition: var(--transition);
}

.menu-btn:hover {
  color: var(--primary);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.breadcrumb .active {
  color: var(--text-primary);
  font-weight: 500;
}

.breadcrumb i {
  font-size: 10px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  height: 38px;
  padding: 0 14px;
  width: 220px;
  transition: var(--transition);
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

.search-box i {
  color: var(--text-muted);
  font-size: 13px;
}

.search-box input {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 13px;
  height: 100%;
  width: 100%;
  outline: none;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.icon-btn {
  width: 38px;
  height: 38px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: var(--transition);
  font-size: 15px;
}

.icon-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.icon-btn.whatsapp-btn:hover {
  border-color: #25d366;
  color: #25d366;
}

.notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--bg-main);
}

.date-display {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  min-width: fit-content;
}

/* ===== PAGE CONTENT ===== */
.page-content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.page-header p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.header-actions {
  display: flex;
  gap: 10px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(20, 184, 166, 0.45);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.btn-success {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: white;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.btn-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-warning {
  background: var(--warning);
  color: white;
}

.btn-info {
  background: var(--info);
  color: white;
}

.btn-sm {
  padding: 7px 12px;
  font-size: 12px;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.btn-icon {
  padding: 8px;
}

/* ===== STATS GRID ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--border-hover);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  flex-shrink: 0;
}

.stat-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 4px;
}

.stat-value {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-change {
  font-size: 11px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-change.positive {
  color: var(--success);
}

.stat-change.negative {
  color: var(--danger);
}

.stat-change.neutral {
  color: var(--text-muted);
}

/* ===== DASHBOARD GRID ===== */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.dashboard-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 16px;
}

/* ===== CARDS ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  border-color: rgba(20, 184, 166, 0.2);
}

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

.card-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-header h3 i {
  color: var(--primary);
}

.card-body {
  padding: 20px;
}

.view-all {
  font-size: 12px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.view-all:hover {
  opacity: 0.8;
}

.select-sm {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  padding: 4px 8px;
  font-size: 12px;
  outline: none;
  cursor: pointer;
}

/* ===== APPOINTMENTS ===== */
.appointment-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 350px; /* 5 randevu görünür */
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  scroll-behavior: smooth;
}

.appointment-list::-webkit-scrollbar {
  width: 4px;
}
.appointment-list::-webkit-scrollbar-track {
  background: transparent;
}
.appointment-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 99px;
}
.appointment-list::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

.appointment-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.appointment-item:hover {
  border-color: var(--primary);
  transform: translateX(2px);
}

.appt-time {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  min-width: 45px;
}

.appt-info {
  flex: 1;
}

.appt-patient {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.appt-treatment {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.appt-doctor {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.appt-status {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.status-confirmed {
  background: rgba(20, 184, 166, 0.15);
  color: var(--primary);
}

.status-waiting {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.status-completed {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.status-cancelled {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

/* ===== DOCTOR PERFORMANCE ===== */
.doctor-perf-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.doctor-perf-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.doctor-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.doctor-perf-info {
  flex: 1;
}

.doctor-name {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.perf-bar {
  height: 5px;
  background: var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.perf-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 1s ease;
}

.doctor-revenue {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}

/* ===== WHATSAPP CARD ===== */
.whatsapp-card .card-header {
  border-bottom-color: rgba(37, 211, 102, 0.2);
}

.wa-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--success);
}

.wa-status .dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.wa-status.disconnected {
  color: var(--text-muted);
}

.wa-status.disconnected .dot {
  background: var(--text-muted);
  animation: none;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.7;
    transform: scale(1.2);
  }
}

.wa-quick {
  margin-bottom: 16px;
}

.wa-actions {
  display: flex;
  gap: 8px;
  flex-direction: column;
  gap: 8px;
}

.wa-stats {
  display: flex;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.wa-stat {
  text-align: center;
  flex: 1;
}

.wa-stat-num {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: #25d366;
}

.wa-stat-label {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ===== FORM CONTROLS ===== */
.form-control {
  width: 100%;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 10px 12px;
  font-size: 13px;
  outline: none;
  transition: var(--transition);
  font-family: inherit;
  display: block;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

.form-control::placeholder {
  color: var(--text-muted);
}

select.form-control option {
  background: var(--bg-card);
}

.mb-2 {
  margin-bottom: 8px;
}

.mb-3 {
  margin-bottom: 12px;
}

.mb-4 {
  margin-bottom: 16px;
}

/* ===== TABLES ===== */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--bg-card2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  vertical-align: middle;
}

tbody tr:hover {
  background: var(--bg-hover);
}

tbody tr:last-child td {
  border-bottom: none;
}

.td-primary {
  color: var(--text-primary) !important;
  font-weight: 600;
}

.td-price {
  color: var(--primary) !important;
  font-weight: 700;
}

.td-success {
  color: var(--success) !important;
  font-weight: 600;
}

.td-warning {
  color: var(--warning) !important;
  font-weight: 600;
}

.td-danger {
  color: var(--danger) !important;
  font-weight: 600;
}

/* ===== NOTIFICATIONS ===== */
.notif-panel {
  position: fixed;
  right: -380px;
  top: 0;
  bottom: 0;
  width: 360px;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  z-index: 1100;
  transition: right 0.2s ease-out;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
}

.notif-panel.active {
  right: 0;
}

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

.notif-header h4 {
  font-size: 16px;
  font-weight: 600;
}

.notif-header button {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
}

.notif-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.notif-item {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.notif-item:hover {
  background: var(--bg-hover);
}

.notif-item.unread {
  background: rgba(20, 184, 166, 0.05);
}

.notif-item-main {
  flex: 1;
  min-width: 0;
}

.notif-item-arrow {
  align-self: center;
  color: var(--text-muted);
  font-size: 12px;
  opacity: 0.8;
}

.notif-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: white;
  flex-shrink: 0;
}

.bg-teal {
  background: var(--primary);
}

.bg-green {
  background: #25d366;
}

.bg-yellow {
  background: var(--warning);
}

.bg-purple {
  background: var(--accent);
}

.bg-red {
  background: var(--danger);
}

.notif-content p {
  font-size: 13px;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.notif-detail-modal {
  max-width: 560px;
}

#notifDetailModal {
  z-index: 1300;
}

#notifDetailModal.active {
  z-index: 1300;
}

#notifDetailModal .modal {
  position: relative;
  z-index: 1301;
}

.notif-detail-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.notif-detail-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 13px;
  color: var(--text-secondary);
}

.notif-detail-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notif-detail-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card2);
}

.notif-detail-label {
  min-width: 120px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.25px;
}

.notif-detail-value {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--text-primary);
  text-align: right;
  word-break: break-word;
}

.notif-detail-empty {
  padding: 18px 14px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: var(--bg-card2);
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

.notif-content span {
  font-size: 11px;
  color: var(--text-muted);
}

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1050;
  backdrop-filter: blur(4px);
}

.overlay.active {
  display: block;
}

/* ===== PAGE-SPECIFIC LAYOUTS ===== */
.filters-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.filter-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 7px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.search-filter {
  flex: 1;
  max-width: 300px;
}

/* ===== MODAL ===== */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 300;
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
}

.modal-backdrop.active {
  display: flex;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

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

.modal-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg-card);
}

.modal-footer-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
}

/* Randevu detayı alt aksiyonları: daha okunaklı ve dokunma dostu */
.appt-detail-footer {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0.01));
}
.appt-detail-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-card2);
}
.appt-detail-section-head {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.appt-detail-status-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}
.appt-detail-status-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}
.appt-detail-section-help {
  font-size: 11px;
  line-height: 1.25;
  color: var(--text-muted);
}
.appt-detail-footer-buttons {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.appt-detail-footer-buttons .appt-detail-status-btn {
  width: 100%;
}
.appt-detail-action-buttons {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.appt-detail-footer .btn {
  font-family: inherit;
  font-size: 12px;
}
.appt-detail-footer .appt-detail-btn {
  width: 100%;
  padding: 12px 14px;
  min-height: 68px;
  display: inline-flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  border-radius: 14px;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
  font-weight: 600;
  font-size: 12px;
  text-align: left;
  position: relative;
}
.appt-detail-footer .appt-detail-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.12);
}
.appt-detail-btn-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid currentColor;
  opacity: 0.92;
}
.appt-detail-btn-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.appt-detail-btn-copy strong {
  font-size: 13px;
  line-height: 1.2;
}
.appt-detail-btn-copy small {
  font-size: 11px;
  line-height: 1.3;
  color: var(--text-muted);
}
.appt-detail-footer .appt-detail-btn i {
  font-size: 14px;
  opacity: 0.96;
}
.appt-detail-status-btn {
  min-width: 0;
}
.appt-detail-status-group .appt-detail-btn {
  min-height: 50px;
  padding: 7px 8px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  border-radius: 12px;
}
.appt-detail-status-group .appt-detail-btn-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 8px;
  border-width: 0;
  background: rgba(255, 255, 255, 0.08);
}
.appt-detail-status-btn-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  font-size: 11px;
  line-height: 1.1;
  font-weight: 700;
  white-space: normal;
  text-align: center;
}
.appt-detail-status-group .appt-detail-btn i {
  font-size: 12px;
}
.appt-detail-status-btn.active {
  font-weight: 700;
  box-shadow: 0 0 0 2px currentColor inset;
  transform: none;
}
.appt-detail-status-btn.active::after {
  content: '✓';
  position: absolute;
  top: 5px;
  right: 5px;
  width: 12px;
  height: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: currentColor;
  color: #fff;
  font-size: 7px;
  opacity: 0.95;
}
#apptDetailBtnRandevu {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(20,184,166,0.06);
}
#apptDetailBtnRandevu:hover:not(.active) { background: rgba(20,184,166,0.12); }
#apptDetailBtnRandevu.active {
  background: rgba(20,184,166,0.2);
  border-color: var(--primary);
  color: var(--primary);
}
#apptDetailBtnTamamlandi {
  border-color: #10b981;
  color: #10b981;
  background: rgba(16,185,129,0.06);
}
#apptDetailBtnTamamlandi:hover:not(.active) { background: rgba(16,185,129,0.12); }
#apptDetailBtnTamamlandi.active {
  background: rgba(16,185,129,0.2);
  border-color: #10b981;
  color: #10b981;
}
#apptDetailBtnIptal {
  border-color: var(--danger);
  color: var(--danger);
  background: rgba(239,68,68,0.06);
}
#apptDetailBtnIptal:hover:not(.active) { background: rgba(239,68,68,0.12); }
#apptDetailBtnIptal.active { background: rgba(239,68,68,0.2); }
#apptDetailBtnErtelendi {
  border-color: #f59e0b;
  color: #f59e0b;
  background: rgba(245,158,11,0.08);
}
#apptDetailBtnErtelendi:hover:not(.active) { background: rgba(245,158,11,0.14); }
#apptDetailBtnErtelendi.active { background: rgba(245,158,11,0.2); }
.appt-detail-btn-edit {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(20,184,166,0.08);
}
.appt-detail-btn-edit:hover {
  background: rgba(20,184,166,0.16);
  border-color: var(--primary);
  color: var(--primary);
}
.appt-detail-btn-edit i {
  font-size: 13px;
}
.appt-detail-btn-close {
  border-color: #64748b !important;
  color: #cbd5e1 !important;
  background: rgba(100,116,139,0.14) !important;
}
.appt-detail-btn-close:hover {
  background: rgba(100,116,139,0.28) !important;
  border-color: #94a3b8 !important;
  color: #f8fafc !important;
}
.appt-detail-action-buttons .appt-detail-btn {
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}
.appt-detail-action-buttons .appt-detail-btn .appt-detail-btn-copy {
  gap: 0;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.appt-detail-action-buttons .appt-detail-btn .appt-detail-btn-copy small {
  display: none;
}
.appt-detail-btn-icon-only {
  min-width: 40px;
  padding: 10px;
}
.appt-detail-btn-icon-only i {
  margin: 0;
}

/* ===== FORM ROW ===== */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== SUMMARY CARDS ===== */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.summary-card .sc-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin: 0 auto 12px;
  color: white;
}

.summary-card .sc-value {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.summary-card .sc-label {
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== TAGS ===== */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.tag-teal {
  background: rgba(20, 184, 166, 0.15);
  color: var(--primary);
}

.tag-purple {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent);
}

.tag-yellow {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.tag-green {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.tag-red {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

.tag-gray {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-secondary);
}

/* ===== AVATAR STACK ===== */
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: white;
}

/* ===== PROGRESS ===== */
.progress {
  height: 6px;
  background: var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  transition: width 1s ease;
}

/* ===== ACTION BUTTONS IN TABLE ===== */
.action-btns {
  display: flex;
  gap: 6px;
  align-items: center;
}

.act-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: var(--transition);
}

.act-btn-edit {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent);
}

.act-btn-edit:hover {
  background: var(--accent);
  color: white;
}

.act-btn-wa {
  background: rgba(37, 211, 102, 0.15);
  color: #25d366;
}

.act-btn-wa:hover {
  background: #25d366;
  color: white;
}

.act-btn-delete {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

.act-btn-delete:hover {
  background: var(--danger);
  color: white;
}

.act-btn-view {
  background: rgba(20, 184, 166, 0.15);
  color: var(--primary);
}

.act-btn-view:hover {
  background: var(--primary);
  color: white;
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
}

.page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card2);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.page-btn:hover,
.page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.4;
  display: block;
}

.empty-state p {
  font-size: 14px;
}

/* ===== RESPONSIVE ===== */

/* --- Tablet (1200px) --- */
@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .dashboard-grid-3 {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 1024px) {
  :root {
    --sidebar-width: 220px;
  }

  .dashboard-grid-3 {
    grid-template-columns: 1fr;
  }

  .hakedis-period-selector {
    flex-direction: column;
    align-items: flex-start;
  }

  .hakedis-amounts {
    flex-wrap: wrap;
    gap: 10px;
  }
}

/* ============ MOBİL 768px ============ */
@media (max-width: 768px) {

  .sidebar {
    transform: translateX(-100%);
    z-index: 1100;
    box-shadow: var(--shadow-lg);
    width: 285px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .sidebar.collapsed {
    width: 285px;
    transform: translateX(-100%);
  }

  .sidebar.collapsed .logo-text,
  .sidebar.collapsed .nav-label,
  .sidebar.collapsed .nav-item span,
  .sidebar.collapsed .user-details {
    display: block;
  }

  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .topbar {
    padding: 0 12px;
    height: 56px;
    position: sticky;
    top: 0;
    z-index: 300;
  }

  .search-box {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    width: min(40vw, 150px);
    min-width: 0;
    padding: 0 10px;
    border-radius: 999px;
  }

  .search-box i {
    font-size: 12px;
  }

  .search-box input {
    font-size: 12px;
    min-width: 0;
  }

  .date-display {
    display: none;
  }

  .topbar-right {
    gap: 8px;
    margin-left: auto;
  }

  .topbar-right .topbar-profile-wrap {
    flex-shrink: 0;
    position: relative;
    z-index: 1;
  }

  .topbar-right .search-box {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: min(50vw, 190px);
    max-width: 190px;
    z-index: 0;
  }

  .topbar-profile-menu {
    min-width: 210px;
    right: -4px;
  }

  .topbar-profile-action {
    padding: 10px 11px;
    font-size: 12px;
  }

  .breadcrumb span:first-child {
    display: none;
  }

  .breadcrumb i {
    display: none;
  }

  .page-content {
    padding: 14px 12px 90px;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
  }

  .page-header h1 {
    font-size: 20px;
    margin: 0;
  }

  .page-header p {
    font-size: 12px;
    margin: 0;
  }

  .header-actions {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }

  .header-actions .btn {
    flex: 1;
    justify-content: center;
    font-size: 12px;
    padding: 9px 10px;
    min-width: 110px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
  }

  .stat-card {
    padding: 12px 10px;
    gap: 8px;
  }

  .stat-icon {
    width: 38px;
    height: 38px;
    font-size: 16px;
    flex-shrink: 0;
  }

  .stat-value {
    font-size: 17px;
  }

  .stat-label {
    font-size: 10px;
  }

  .stat-change {
    font-size: 10px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 14px;
  }

  .dashboard-grid-3 {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .card {
    border-radius: 10px;
  }

  .card-header {
    padding: 12px 14px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .card-header h3 {
    font-size: 13px;
  }

  .card-body {
    padding: 12px;
  }

  .summary-cards {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .table-wrapper {
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
  }

  table {
    min-width: 560px;
  }

  thead th {
    padding: 10px 10px;
    font-size: 10px;
    white-space: nowrap;
  }

  tbody td {
    padding: 11px 10px;
    font-size: 12px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 12px;
  }

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

  .form-control {
    font-size: 16px;
  }

  select.form-control {
    font-size: 16px;
  }

  .modal {
    width: 96%;
    margin: 12px auto;
    border-radius: var(--radius);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .modal-body {
    padding: 14px;
    max-height: 65vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    min-height: 0;
  }

  .modal-header {
    padding: 14px 16px;
  }

  .modal-footer {
    padding: 10px 14px;
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
  }

  .modal-footer .btn {
    flex: 1;
    justify-content: center;
    min-width: 100px;
  }

  .appt-detail-footer .btn {
    flex: none;
    min-width: auto;
  }
  .appt-detail-footer .appt-detail-btn {
    padding: 10px;
    font-size: 11px;
    min-height: 60px;
  }
  .appt-detail-footer-buttons,
  .appt-detail-action-buttons {
    gap: 6px;
  }
  .appt-detail-section {
    padding: 10px;
    border-radius: 12px;
  }
  .appt-detail-btn-icon {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    border-radius: 10px;
  }

  .filters-bar {
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 12px;
  }

  .filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
  }

  .filter-btn {
    padding: 6px 12px;
    font-size: 11px;
  }

  .page-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  .page-tab {
    font-size: 12px;
    padding: 8px 12px;
    white-space: nowrap;
  }

  .period-tabs {
    flex-wrap: wrap;
    gap: 4px;
  }

  .period-tab {
    font-size: 11px;
    padding: 6px 12px;
  }

  .action-btns {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
  }

  .act-btn {
    width: 34px;
    height: 34px;
    font-size: 13px;
  }

  .icon-btn {
    width: 36px;
    height: 36px;
  }

  .avatar {
    width: 30px;
    height: 30px;
    font-size: 10px;
    border-radius: 8px;
  }

  .tag {
    font-size: 10px;
    padding: 3px 7px;
  }

  .badge {
    font-size: 9px;
    padding: 2px 5px;
  }

  .hakedis-card-header {
    flex-wrap: wrap;
    gap: 10px;
  }

  .hakedis-amounts {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }

  .ha-item {
    text-align: left;
    flex: 1;
    min-width: 120px;
  }

  .hakedis-period-selector {
    flex-direction: column;
    gap: 12px;
    padding: 12px;
  }

  #hDateStart,
  #hDateEnd {
    width: 130px !important;
  }

  .plan-card-header {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px;
  }

  .plan-timeline {
    padding-left: 24px;
  }

  .plan-timeline::before {
    left: 9px;
  }

  .plan-step-dot {
    left: -24px;
    width: 18px;
    height: 18px;
    font-size: 9px;
  }

  .pagination {
    flex-wrap: wrap;
    gap: 4px;
  }

  .page-btn {
    min-width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .notif-panel {
    width: 100%;
    right: -100%;
    transition-duration: 0.15s;
  }

  .notif-panel.active {
    right: 0;
  }

  .toast {
    min-width: unset;
    width: calc(100vw - 32px);
  }

  .toast-container {
    right: 16px;
    bottom: 80px;
    left: 16px;
  }

  .wa-template-item {
    flex-wrap: wrap;
  }

  .wa-template-item .btn {
    width: 100%;
    justify-content: center;
  }

  .appt-doctor {
    display: none;
  }

  .progress {
    height: 5px;
  }

  canvas {
    max-height: 220px !important;
  }

  .cal-stat-strip {
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .cal-strip-item {
    min-width: 140px;
    padding: 8px 10px;
    flex-shrink: 0;
  }

  .msg-layout {
    grid-template-columns: 1fr !important;
    height: calc(100vh - 140px) !important;
  }

  .msg-main {
    display: none;
  }

  .msg-main.mobile-show {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 600;
  }
}

/* ============ KÜÇÜK MOBİL 480px ============ */
@media (max-width: 480px) {
  .search-box {
    height: 36px;
    width: min(45vw, 140px);
    padding: 0 9px;
    gap: 5px;
  }

  .search-box i {
    font-size: 11px;
  }

  .search-box input {
    font-size: 11px;
  }

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

  .stat-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px 8px;
    gap: 6px;
  }

  .stat-icon {
    width: 34px;
    height: 34px;
    font-size: 14px;
  }

  .stat-value {
    font-size: 15px;
  }

  .page-header h1 {
    font-size: 18px;
  }

  .topbar {
    padding: 0 10px;
    height: 52px;
  }

  .topbar-profile-menu {
    min-width: 196px;
    right: -2px;
  }

  .menu-btn {
    font-size: 16px;
    width: 36px;
    height: 36px;
  }

  .breadcrumb {
    display: none;
  }

  .card-header {
    padding: 10px 12px;
  }

  .card-header h3 {
    font-size: 12px;
  }

  .card-body {
    padding: 10px;
  }

  tbody td {
    padding: 9px 8px;
    font-size: 11px;
  }

  thead th {
    padding: 8px 8px;
    font-size: 9px;
  }

  .modal-backdrop {
    align-items: flex-end;
  }

  .modal-backdrop.active {
    z-index: 500;
  }

  #notifDetailModal.active {
    z-index: 1350;
  }

  .modal {
    width: 100%;
    margin: 0 0 70px 0;
    border-radius: var(--radius) var(--radius) 0 0;
    max-height: calc(100vh - 90px);
    position: fixed;
    bottom: 0;
    top: auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  @keyframes modalIn {
    from {
      opacity: 0;
      transform: translateY(100%);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .modal-body {
    padding: 12px;
    max-height: 50vh;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
  }

  .header-actions .btn {
    font-size: 11px;
    padding: 8px 10px;
  }

  .summary-cards {
    grid-template-columns: 1fr;
  }

  .toast-container {
    bottom: 70px;
  }

  .filter-btn {
    font-size: 10px;
    padding: 5px 10px;
  }

  .act-btn {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  canvas {
    max-height: 180px !important;
  }

  .wa-float-btn,
  .msg-float-btn {
    width: 44px;
    height: 44px;
    font-size: 19px;
    bottom: 68px;
    right: 12px;
  }

  .mobile-bottom-nav {
    height: 56px;
  }

  .mob-nav-item {
    font-size: 9px;
    gap: 2px;
    padding: 4px 6px;
  }

  .mob-nav-item i {
    font-size: 16px;
  }
}

/* ===== MOBİL ALT NAVİGASYON ÇUBUĞU ===== */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--bg-sidebar);
  border-top: 1px solid var(--border);
  z-index: 400;
  padding: 0 8px;
  align-items: center;
  justify-content: space-around;
  backdrop-filter: blur(20px);
}

@media (min-width: 769px) {
  .mobile-bottom-nav {
    display: none !important;
  }
  .mob-nav-item {
    display: none !important;
  }
}

.mob-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 10px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 10px;
  transition: var(--transition);
  position: relative;
  flex: 1;
}

.mob-nav-item i {
  font-size: 18px;
}

.mob-nav-item.active,
.mob-nav-item:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.mob-nav-badge {
  position: absolute;
  top: 4px;
  right: 10px;
  background: var(--danger);
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 10px;
  line-height: 1.4;
}

/* Mobil mesajlaşma float butonu (sağ alt) – mavi sohbet ikonu */
.wa-float-btn,
.msg-float-btn {
  display: none;
  position: fixed;
  bottom: 72px;
  right: 16px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: white;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.45);
  z-index: 390;
  text-decoration: none;
  transition: var(--transition);
  animation: floatPulseMsg 3s infinite;
  border: none;
  cursor: pointer;
}

.wa-float-btn.quick-media-fab {
  background: linear-gradient(135deg, #14b8a6, #0d9488);
  box-shadow: 0 4px 20px rgba(20, 184, 166, 0.45);
  font-size: 24px;
  animation: none;
}

@keyframes floatPulseMsg {
  0%, 100% { box-shadow: 0 4px 20px rgba(59, 130, 246, 0.45); }
  50%      { box-shadow: 0 4px 28px rgba(59, 130, 246, 0.6); }
}

.wa-float-btn:hover,
.msg-float-btn:hover {
  transform: scale(1.1);
  color: white;
}

/* Mobilde göster */
@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex;
  }

  .wa-float-btn,
  .msg-float-btn {
    display: none !important;
  }

  .wa-float-btn.quick-media-fab {
    display: inline-flex !important;
  }
}

/* Mobil hızlı görsel yükleme */
.quick-media-modal {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.18);
}

.quick-media-modal .quick-media-header {
  align-items: center;
  gap: 10px;
  background: var(--bg-card2);
  border-bottom: 1px solid var(--border);
}

.quick-media-modal .quick-media-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.quick-media-modal .quick-media-title-wrap h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.quick-media-modal .quick-media-title-wrap p {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
}

.quick-media-modal .modal-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-main);
}

.quick-media-modal .quick-media-search-area {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.quick-media-modal .quick-media-form-group {
  margin: 0;
  position: relative;
}

.quick-media-modal .quick-media-search-area .form-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.35px;
}

.quick-media-modal .quick-media-search-area .form-control {
  font-size: 13px;
  padding: 9px 11px;
  min-height: 38px;
}

.quick-media-modal .quick-media-search-area .form-control::placeholder {
  font-size: 13px;
}

.quick-media-modal .quick-media-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
  padding: 6px;
  display: grid;
  gap: 6px;
  z-index: 40;
  box-shadow: 0 14px 30px rgba(2, 6, 23, 0.25);
}

.quick-media-modal .quick-media-results[hidden] {
  display: none !important;
}

.quick-media-modal .quick-media-result-item {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.24);
  color: var(--text-primary);
  padding: 10px 11px;
  text-align: left;
  display: grid;
  gap: 3px;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.quick-media-modal .quick-media-result-item:hover {
  border-color: rgba(20, 184, 166, 0.24);
  background: rgba(20, 184, 166, 0.08);
}

.quick-media-modal .quick-media-result-item.active {
  border-color: rgba(20, 184, 166, 0.34);
  background: rgba(20, 184, 166, 0.12);
}

.quick-media-modal .quick-media-result-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.quick-media-modal .quick-media-result-meta,
.quick-media-modal .quick-media-result-empty {
  font-size: 11px;
  color: var(--text-muted);
}

.quick-media-modal .quick-media-result-empty {
  padding: 12px 10px;
  text-align: center;
}

.quick-media-modal .quick-media-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.quick-media-modal .quick-media-field {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  background: var(--bg-card);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.quick-media-modal .quick-media-field:hover {
  border-color: rgba(15, 23, 42, 0.22);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
}

.quick-media-modal .quick-media-field.is-filled {
  border-color: rgba(15, 23, 42, 0.3);
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.08);
}

.quick-media-modal .quick-media-field label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.quick-media-modal .quick-media-field label span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.quick-media-modal .quick-media-field label small {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.quick-media-modal .quick-media-field input[type="file"] {
  font-size: 12px;
  padding: 6px;
}

.quick-media-modal .quick-media-field input[type="file"]::file-selector-button {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 10px;
  margin-right: 10px;
  background: var(--bg-card2);
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
}

.quick-media-modal .quick-media-field .quick-media-count {
  margin-top: 7px;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.quick-media-modal .quick-media-field.is-filled .quick-media-count {
  color: var(--text-primary);
}

.quick-media-modal .quick-media-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-card2);
}

@media (max-width: 768px) {
  .quick-media-modal {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px) !important;
  }

  .quick-media-modal .quick-media-header {
    padding: 12px 12px 10px;
  }

  .quick-media-modal .quick-media-title-wrap p {
    font-size: 11px;
  }

  .quick-media-modal .modal-body {
    padding: 12px;
    gap: 10px;
  }

  /* iOS Safari 16px altı inputlarda otomatik zoom yapıyor */
  .quick-media-modal .quick-media-search-area .form-control {
    font-size: 16px;
    padding: 7px 10px;
    min-height: 40px;
  }

  .quick-media-modal .quick-media-search-area .form-control::placeholder {
    font-size: 16px;
  }

  .quick-media-modal .quick-media-search-area,
  .quick-media-modal .quick-media-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .quick-media-modal .quick-media-field {
    padding: 9px;
  }

  .quick-media-modal .modal-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px 12px 12px;
  }

  .quick-media-modal .modal-footer .btn {
    width: 100%;
    justify-content: center;
  }
}


/* ===== TOOLTIP ===== */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card2);
  color: var(--text-primary);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 100;
}

[data-tooltip]:hover::after {
  opacity: 1;
}

/* ===== SPECIAL STYLES ===== */
.hakedis-period-selector {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.period-tabs {
  display: flex;
  gap: 6px;
}

.period-tab {
  padding: 7px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.period-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.hakedis-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  transition: var(--transition);
}

.hakedis-card:hover {
  border-color: rgba(20, 184, 166, 0.3);
}

.hakedis-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  cursor: pointer;
}

.hakedis-card-header .doc-info {
  flex: 1;
}

.hakedis-card-header .doc-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.hakedis-card-header .doc-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.hakedis-amounts {
  display: flex;
  gap: 20px;
  align-items: center;
}

.ha-item {
  text-align: right;
}

.ha-item .ha-label {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.ha-item .ha-value {
  display: block;
  font-size: 16px;
  font-weight: 700;
}

.hakedis-details {
  display: none;
  border-top: 1px solid var(--border);
}

.hakedis-details.open {
  display: block;
}

.wa-template-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wa-template-item {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: var(--transition);
}

.wa-template-item:hover {
  border-color: #25d366;
}

.wa-tpl-icon {
  width: 40px;
  height: 40px;
  background: rgba(37, 211, 102, 0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #25d366;
  font-size: 16px;
  flex-shrink: 0;
}

.wa-tpl-info {
  flex: 1;
}

.wa-tpl-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.wa-tpl-preview {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ===== FIYAT TABLE SPECIAL ===== */
.price-category-header {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.1), rgba(20, 184, 166, 0.05));
  border: 1px solid rgba(20, 184, 166, 0.2);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 12px;
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.price-category-header:first-child {
  margin-top: 0;
}

.pcat-icon {
  width: 32px;
  height: 32px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 13px;
}

.pcat-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}

.pcat-count {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-muted);
}

/* ===== CHART CARD ===== */
.chart-card .card-body {
  padding: 16px 20px;
}

/* ===== INLINE EDIT ===== */
.inline-edit {
  display: flex;
  align-items: center;
  gap: 6px;
}

.inline-edit input {
  background: var(--bg-card2);
  border: 1px solid var(--primary);
  border-radius: 6px;
  color: var(--text-primary);
  padding: 4px 8px;
  font-size: 13px;
  width: 100px;
  outline: none;
}

.inline-save {
  width: 26px;
  height: 26px;
  background: var(--success);
  border: none;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

/* ===== TOAST ===== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 280px;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease;
}
.toast-close {
  margin-left: auto;
  flex-shrink: 0;
  padding: 4px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
}
.toast-close:hover { color: var(--text-primary); background: var(--bg-card2); }

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast-icon {
  font-size: 18px;
}

.toast-success {
  border-left: 3px solid var(--success);
}

.toast-success .toast-icon {
  color: var(--success);
}

.toast-error {
  border-left: 3px solid var(--danger);
}

.toast-error .toast-icon {
  color: var(--danger);
}

.toast-warning {
  border-left: 3px solid var(--warning);
}

.toast-warning .toast-icon {
  color: var(--warning);
}

.toast-info {
  border-left: 3px solid var(--info);
}

.toast-info .toast-icon {
  color: var(--info);
}

.toast-text {
  flex: 1;
}

.toast-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.toast-msg {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ===== DOCTOR MANAGEMENT OVERHAUL ===== */
.dr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.dr-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  position: relative;
  transition: var(--transition);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dr-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-hover);
}

.dr-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dr-avatar-container {
  position: relative;
  flex-shrink: 0;
}

.dr-avatar-premium {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.dr-status-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 14px;
  height: 14px;
  background: var(--success);
  border: 3px solid var(--bg-card);
  border-radius: 50%;
}

.dr-info {
  flex: 1;
}

.dr-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.dr-spec {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
}

.dr-contact-icons {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.dr-contact-item {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.dr-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.dr-stat-box {
  background: var(--bg-card2);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.dr-stat-box:hover {
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.02);
}

.dr-stat-v {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  display: block;
}

.dr-stat-l {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.dr-progress-area {
  margin-top: 4px;
}

.dr-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 8px;
}

.dr-progress-bar {
  height: 8px;
  background: var(--bg-card2);
  border-radius: 10px;
  overflow: hidden;
}

.dr-progress-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 1s ease-out;
}

.dr-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.dr-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border);
  background: var(--bg-card2);
  color: var(--text-secondary);
}

.dr-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.dr-btn-wa {
  flex: 0 0 42px;
  color: #25d366;
}

.dr-btn-wa:hover {
  background: rgba(37, 211, 102, 0.1);
  border-color: #25d366;
  color: #25d366;
}

.dr-btn-msg {
  flex: 0 0 42px;
  color: var(--primary);
}

.dr-btn-msg:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.dr-btn-active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.dr-card-highlight {
  box-shadow: 0 0 0 2px var(--primary), var(--shadow-lg) !important;
}

.modal-section {
  margin-bottom: 24px;
}

.modal-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.color-option {
  cursor: pointer;
  position: relative;
}

.color-option input {
  display: none;
}

.color-circle {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 3px solid transparent;
  transition: var(--transition);
}

.color-option input:checked+.color-circle {
  border-color: white;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
