/* CellHEALTH chat surface: 100% pure black ChatGPT standard */
.chat-page {
  height: 100dvh;
  max-height: 100dvh;
  display: grid;
  grid-template-columns: var(--chat-sidebar-width, 260px) minmax(0, 1fr) var(--chat-context-width, 420px);
  gap: 8px;
  padding: 8px;
  background: #000000 !important;
  color: #f3f4f6;
  font-family: var(--font-body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  overflow: hidden;
  box-sizing: border-box;
  transition: grid-template-columns .28s cubic-bezier(.22, 1, .36, 1);
}

/* Monokrom / Siyah-Beyaz Standart: Emojiler ve Simgeler */
.icon,
.emoji,
.chat-icon,
.tab-icon,
.entry-icon,
.nav-icon,
.metric-icon,
.panel-icon,
span[role="img"],
[data-emoji],
svg.icon,
svg.chat-icon,
svg.nav-icon,
svg.tab-icon {
  filter: grayscale(100%) !important;
  -webkit-filter: grayscale(100%) !important;
}

/* Animasyon & Etkileşim Frekansı Standardı (Raycast Sıfır Gecikme Kuralı) */
.command-palette,
.quick-search,
.keyboard-nav,
[data-keyboard-action],
kbd {
  transition: none !important;
  animation: none !important;
}

/* Yüksek frekanslı buton, sekme ve liste geçişleri: Ultra hızlı (<= 0.1s) */
button,
.tab,
.quick-card,
.entry,
.chat-history-item {
  transition-duration: 0.1s !important;
}

.chat-history-group-title {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.02em;
  color: #8a94a6;
  padding: 4px 6px 2px;
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.chat-header-panel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 13px;
  background: linear-gradient(180deg, #2b3952 0%, #172131 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #ffffff !important;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.chat-header-panel-btn:hover {
  background: linear-gradient(180deg, #354766 0%, #1e2a3e 100%) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}
.chat-header-panel-btn:active {
  transform: translateY(1px) scale(0.98);
}
.chat-header-panel-btn .panel-btn-icon {
  flex-shrink: 0;
  stroke: #ffffff;
}
.chat-context-icon-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #090b10 !important;
  color: #8a94a6;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.1s ease, color 0.1s ease, background 0.1s ease;
}
.chat-context-icon-toggle:hover {
  background: #131722 !important;
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}
.chat-context-icon-toggle.is-active {
  background: #131722 !important;
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}
.chat-context-icon-toggle:active {
  transform: scale(0.96);
}
.chat-context-collapse-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #090b10 !important;
  color: #8a94a6;
  cursor: pointer;
  padding: 0;
  margin-top: 1px;
  transition: all 0.1s ease;
}
.chat-context-collapse-btn:hover {
  background: #131722 !important;
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}
.chat-context-collapse-btn:active {
  transform: scale(0.96);
}
.chat-context-title-wrap {
  flex: 1;
  min-width: 0;
}

/* Monokrom / Siyah-Beyaz Standart: Emojiler, Simgeler ve Logolar */
.icon,
.emoji,
.chat-icon,
.tab-icon,
.entry-icon,
.nav-icon,
.metric-icon,
.panel-icon,
.brand-logo,
.topbar-logo,
.chat-sidebar-brand-img,
.admin-mark img,
.topbar-brand-link img,
.brand img,
span[role="img"],
[data-emoji],
svg.icon,
svg.chat-icon,
svg.nav-icon,
svg.tab-icon {
  filter: grayscale(100%) brightness(1.1) !important;
  -webkit-filter: grayscale(100%) brightness(1.1) !important;
}

/* Animasyon & Etkileşim Frekansı Standardı (Raycast Sıfır Gecikme Kuralı) */
.command-palette,
.quick-search,
.keyboard-nav,
[data-keyboard-action],
kbd {
  transition: none !important;
  animation: none !important;
}

/* Yüksek frekanslı buton, sekme ve liste geçişleri: Ultra hızlı (<= 0.1s) */
button,
.tab,
.quick-card,
.entry,
.chat-history-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 10px 12px !important;
  border-radius: 8px !important;
  color: #e2e8f0 !important;
  background: transparent !important;
  background-color: transparent !important;
  border: 1px solid transparent !important;
  box-shadow: none !important;
  transition: border-color 0.1s ease, background 0.1s ease, color 0.1s ease;
}
.chat-history-item:hover,
.chat-history-item.menu-active {
  background: #090b10 !important;
  background-color: #090b10 !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: #ffffff !important;
}
.chat-history-item.active {
  background: #090b10 !important;
  background-color: #090b10 !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}
.chat-history-item.active:hover {
  border-color: rgba(255, 255, 255, 0.35) !important;
}

.chat-page.sidebar-collapsed {
  grid-template-columns: 60px minmax(0, 1fr) var(--chat-context-width, 420px);
}
.chat-page.context-closed {
  grid-template-columns: var(--chat-sidebar-width, 260px) minmax(0, 1fr);
}
.chat-page.sidebar-collapsed.context-closed {
  grid-template-columns: 60px minmax(0, 1fr);
}
.chat-context-panel.is-closed {
  display: none !important;
}

.chat-user-profile-wrap {
  position: relative;
  width: 100%;
}
.chat-user-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}
.chat-user-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.chat-avatar {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  border-radius: 50%;
  background: #090b10 !important;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chat-user-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-settings-gear-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #090b10 !important;
  color: #8a94a6;
  cursor: pointer;
  padding: 0;
  transition: all 0.1s ease;
}
.chat-settings-gear-btn:hover,
.chat-settings-gear-btn.active {
  background: #131722 !important;
  border-color: rgba(255, 255, 255, 0.24);
  color: #ffffff;
}
.chat-settings-gear-btn:active {
  transform: scale(0.96);
}
.chat-user-settings-popover {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #090b10 !important;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.95);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.chat-popover-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.chat-popover-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: #8a94a6;
  padding: 2px 6px;
}
.chat-popover-lang-group {
  display: flex;
  gap: 4px;
}
.chat-popover-lang-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 4px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #000000 !important;
  color: #cbd5e1;
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.1s ease;
}
.chat-popover-lang-btn:hover {
  background: #131722 !important;
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}
.chat-popover-lang-btn.active {
  background: linear-gradient(180deg, #2b3952 0%, #172131 100%) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
  color: #ffffff !important;
  font-weight: 700;
}
.chat-popover-lang-flag {
  font-size: 0.82rem;
}
.chat-popover-check {
  font-size: 0.72rem;
  color: #60a5fa;
}
.chat-popover-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 0;
}
.chat-popover-item-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: #e2e8f0;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  text-align: left;
  box-sizing: border-box;
  transition: all 0.1s ease;
}
.chat-popover-item-btn:hover {
  background: #131722 !important;
  border-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}
.chat-popover-logout {
  color: #f87171 !important;
}
.chat-popover-logout:hover {
  background: rgba(239, 68, 68, 0.12) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: #fca5a5 !important;
}

:root {
  color-scheme: dark;
  --font-heading: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-body: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --line-height-body: 1.6;
  --font-scale: 1;

  /* Section & Panel Text Sizes */
  --section-heading-size: 1.05rem;
  --section-desc-size: 0.8rem;
  --tab-group-label-size: 0.7rem;
  --entry-title-size: 0.9rem;
  --entry-meta-size: 0.75rem;
  --entry-value-size: 0.85rem;
  --stat-label-size: 0.7rem;
  --stat-value-size: 1.1rem;
  --timeline-card-title-size: 0.9rem;
  --timeline-card-sub-size: 0.78rem;
  --timeline-group-label-size: 1.05rem;
  --chat-message-size: 0.88rem;
  --form-label-size: 0.75rem;
  --form-input-size: 0.85rem;

  /* Pure Neutral Dark Slate Palette (AGENTS.md - No Green) */
  --bg: #000000;
  --bg-panel: #090b10;
  --panel: #090b10;
  --panel-border: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.08);
  --text: #e2e8f0;
  --text-muted: #8a94a6;
  --text-white: #ffffff;

  /* Accent & Status Tokens */
  --accent: #090b10;
  --accent-bright: #34496e;
  --burgundy: #7a2f34;
  --danger: #7a2f34;
  --good: #166534;
  --success: #166534;
  --warning: #7a2f34;

  /* Gölge & Cam Efektleri */
  --shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.2);
  --blur: blur(8px);

  /* Geometri: Fibonacci ölçeği 0 / 4 / 8 / 13 / 21 / 34 / 55 */
  --btn-padding-y: 8px;
  --btn-padding-x: 13px;
  --btn-radius: 8px;
  --btn-font-size: 0.9rem;
  --btn-gap: 8px;

  /* Tab Bar Değişkenleri */
  --tabbar-gap: 4px;
  --tabbar-padding: 4px;
  --tabbar-radius: 21px;
  --tab-gap: 8px;
  --tab-radius: 13px;
  --tab-padding-y: 8px;
  --tab-padding-x: 13px;
  --tab-font-size: 0.9rem;

  /* Layout & Grid (Fibonacci Standartları) */
  --grid-gap: 8px;
  --panel-padding: 21px;
  --panel-radius: 13px;
  --app-frame-padding-x: 16px;
  --app-frame-padding-y: 13px;
  --section-heading-margin-bottom: 13px;
  --topbar-padding-y: 13px;
  --topbar-padding-top: 8px;
  --topbar-padding-bottom: 8px;
  --topbar-padding-x: 21px;
  --topbar-min-height: 55px;
  --topbar-radius: 21px;
  --topbar-content-gap: 8px;
  --topbar-border-width: 1px;
  --topbar-margin-top: 0px;
  --topbar-margin-bottom: 8px;
}

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

html {
  font-size: calc(16px * var(--font-scale, 1));
}

html,
body,
#root {
  min-height: 100%;
}

body {
  color: var(--text);
  font-family: var(--font-body);
  background: var(--bg);
  background-image: radial-gradient(at 50% 0%, rgba(44, 58, 87, 0.12) 0px, transparent 60%);
  background-attachment: fixed;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Monokrom / Siyah-Beyaz Standart: Emojiler ve Simgeler */
.icon,
.emoji,
.chat-icon,
.tab-icon,
.entry-icon,
.nav-icon,
.metric-icon,
.panel-icon,
span[role="img"],
[data-emoji],
svg.icon,
svg.chat-icon,
svg.nav-icon,
svg.tab-icon {
  filter: grayscale(100%) !important;
  -webkit-filter: grayscale(100%) !important;
}

/* Animasyon & Etkileşim Frekansı Standardı (Raycast Sıfır Gecikme Kuralı) */
.command-palette,
.quick-search,
.keyboard-nav,
[data-keyboard-action],
kbd {
  transition: none !important;
  animation: none !important;
}

/* Yüksek frekanslı buton, sekme ve liste geçişleri: Ultra hızlı (<= 0.1s) */
button,
.tab,
.quick-card,
.entry,
.chat-history-item {
  transition-duration: 0.1s !important;
}

/* App Layout Frame & Global Responsive Architecture */
.app-frame {
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
  min-height: 100vh;
  padding: var(--app-frame-padding-y, 13px) var(--app-frame-padding-x, 16px);
  display: flex;
  flex-direction: column;
  gap: var(--grid-gap, 13px);
  box-sizing: border-box;
}

/* 💻 PC Masaüstü Ekranları (Viewport > 1024px) */
@media (min-width: 1025px) {
  html:not([data-device="mobile"]):not([data-device="tablet"]) .app-frame {
    min-height: 100vh;
    padding: 24px 24px 12px 24px;
  }

  html:not([data-device="mobile"]):not([data-device="tablet"]) .dashboard-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: var(--grid-gap, 21px);
    flex: 1;
    min-height: 0;
    overflow: hidden;
    align-content: stretch;
  }

  html:not([data-device="mobile"]):not([data-device="tablet"]) .dashboard-left-col,
  html:not([data-device="mobile"]):not([data-device="tablet"]) .dashboard-right-col {
    display: flex;
    flex-direction: column;
    gap: var(--grid-gap, 21px);
    height: 100%;
    overflow-y: auto;
    padding-right: 6px;
  }

  html:not([data-device="mobile"]):not([data-device="tablet"]) .entry-list {
    max-height: calc(100vh - 390px);
    overflow-y: auto;
    padding-right: 8px;
  }
}

/* 📱 Tablet Ekranları (Viewport 768px - 1024px veya data-device="tablet") */
@media (max-width: 1024px) {
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
  }

  .app-frame {
    padding: 16px 14px !important;
    gap: 16px !important;
    height: auto !important;
    min-height: 100vh;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  .topbar {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 14px !important;
    padding: 20px 18px !important;
  }

  .topbar-right {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 10px !important;
  }

  .dashboard-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
  }

  .dashboard-left-col,
  .dashboard-right-col {
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    padding-right: 0 !important;
    gap: 16px !important;
  }

  .panel {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .tab-bar,
  .tabbar-grouped {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    max-width: 100% !important;
    width: 100% !important;
    -webkit-overflow-scrolling: touch;
    padding: 4px 0 !important;
    box-sizing: border-box !important;
  }

  .tab-item {
    flex-shrink: 0 !important;
    min-height: 44px !important;
    padding: 8px 16px !important;
    font-size: 0.9rem !important;
  }

  .btn {
    min-height: 44px !important;
  }

  .entry-list {
    max-height: 450px !important;
    overflow-y: auto !important;
  }
}

html[data-device="tablet"] .app-frame {
  padding: 16px;
  gap: 16px;
  height: auto;
  min-height: 100vh;
  overflow-y: auto;
}

/* 📲 Mobil Telefon Ekranları (Viewport < 768px veya data-device="mobile") */
@media (max-width: 767px) {
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
  }

  .app-frame {
    padding: 12px 10px !important;
    gap: 12px !important;
    height: auto !important;
    min-height: 100vh;
    overflow-x: hidden !important;
  }

  .topbar {
    padding: 16px 14px !important;
    border-radius: 16px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }

  .topbar h1 {
    font-size: 1.6rem !important;
  }

  .topbar-right {
    width: 100% !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  .dashboard-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
  }

  .dashboard-left-col,
  .dashboard-right-col {
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    padding-right: 0 !important;
    gap: 12px !important;
  }

  .panel {
    padding: 16px 14px !important;
    border-radius: 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .tab-bar {
    display: flex !important;
    overflow-x: auto !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 4px !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }

  .tab-item {
    scroll-snap-align: start;
    flex-shrink: 0 !important;
    min-height: 44px !important;
    padding: 8px 14px !important;
    font-size: 0.85rem !important;
  }

  .btn {
    min-height: 44px !important;
    width: 100% !important;
    justify-content: center !important;
  }

  .entry-list {
    max-height: 380px !important;
    overflow-y: auto !important;
  }

  input[type="text"],
  input[type="email"],
  input[type="number"],
  textarea,
  select {
    min-height: 44px !important;
    font-size: 16px !important; /* Prevents auto-zoom on iOS Safari */
  }
}

html[data-device="mobile"] .app-frame {
  padding: 12px 10px !important;
  gap: 12px !important;
  height: auto !important;
  min-height: 100vh;
  overflow-x: hidden !important;
}

/* Premium Custom Scrollbars */
.dashboard-grid::-webkit-scrollbar,
.page-shell::-webkit-scrollbar,
.entry-list::-webkit-scrollbar,
.chat::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.dashboard-grid::-webkit-scrollbar-track,
.page-shell::-webkit-scrollbar-track,
.entry-list::-webkit-scrollbar-track,
.chat::-webkit-scrollbar-track {
  background: transparent;
}

.dashboard-grid::-webkit-scrollbar-thumb,
.page-shell::-webkit-scrollbar-thumb,
.entry-list::-webkit-scrollbar-thumb,
.chat::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

.dashboard-grid::-webkit-scrollbar-thumb:hover,
.page-shell::-webkit-scrollbar-thumb:hover,
.entry-list::-webkit-scrollbar-thumb:hover,
.chat::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}


/* Header & Typography */
.topbar {
  min-height: var(--topbar-min-height, 0px);
  border-radius: var(--topbar-radius, 24px);
  padding-top: var(--topbar-padding-top, var(--topbar-padding-y, 28px));
  padding-bottom: var(--topbar-padding-bottom, var(--topbar-padding-y, 28px));
  padding-left: var(--topbar-padding-x, 32px);
  padding-right: var(--topbar-padding-x, 32px);
  margin-top: var(--topbar-margin-top, 0px);
  margin-bottom: var(--topbar-margin-bottom, 24px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  border: var(--topbar-border-width, 1px) solid var(--panel-border);
  background: var(--panel);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow);
}

.topbar .eyebrow {
  font-size: calc(var(--topbar-eyebrow-size, 0.75rem) * 0.6);
  margin-bottom: var(--topbar-content-gap, 6px);
}

.topbar .trust-badge {
  font-size: 0.6rem;
}

.topbar h1 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: var(--topbar-title-size, 2.25rem);
  background: linear-gradient(135deg, var(--text-white) 40%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
  margin-bottom: var(--topbar-content-gap, 6px);
}

.topbar p {
  color: var(--text-muted);
  font-size: var(--topbar-subtitle-size, 0.95rem);
  max-width: 600px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 100%;
}

.version-badge {
  display: inline-block;
  vertical-align: middle;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text-muted);
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  -webkit-text-fill-color: var(--text-muted);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  font-weight: 700;
  color: #e2e8f0;
}

/* Barış Design - Başlık ve Vurgu Standartları */
h1.hero-title,
.hero-title {
  color: #ffffff;
}

h1.hero-title .highlight,
.hero-title .highlight,
h1 .highlight,
h2 .highlight,
span.highlight {
  display: inline-block;
  background: linear-gradient(180deg, #ffffff 10%, #94a3b8 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

/* Status Chips */
.status-chip {
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.02);
  white-space: nowrap;
}

.status-chip.ready {
  color: var(--good);
  border-color: rgba(16, 185, 129, 0.2);
  background: rgba(16, 185, 129, 0.05);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.1);
}

.status-chip.offline,
.status-chip.checking {
  color: var(--text-muted);
}

/* Tabs & Navigation */
.tabbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px !important;
  padding: 8px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: #090b10 !important;
}

.tab {
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  color: #8a94a6 !important;
  padding: 6px 13px !important;
  font-weight: 500 !important;
  font-size: 0.85rem !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px !important;
  transition: none !important;
  animation: none !important;
}

.tab svg {
  stroke: currentColor;
  opacity: 0.85;
}

.tab:hover {
  color: #ffffff !important;
  background: #0e1118 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

.tab.active {
  color: #ffffff !important;
  background: #000000 !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  box-shadow: none !important;
}

.tabbar-grouped {
  align-items: flex-start;
  gap: 4px;
}

.tab-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 8px;
  border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.tab-group:last-child {
  border-right: none !important;
}

.tab-group-label {
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8a94a6 !important;
  padding: 0 4px;
}

.tab-group-items {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tab-gap);
}

/* Panels */
.panel {
  border-radius: var(--panel-radius);
  padding: var(--panel-padding);
  border: 1px solid var(--panel-border);
  background: var(--panel);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.panel:hover {
  border-color: rgba(255, 255, 255, 0.09);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--grid-gap, 13px);
  margin-bottom: var(--section-heading-margin-bottom, 13px);
}

.section-heading h2 {
  font-family: var(--font-heading);
  font-size: var(--section-heading-size, 1.5rem);
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: -0.01em;
}

.section-heading p {
  color: var(--text-muted);
  font-size: var(--section-desc-size, 0.9rem);
  margin-top: 4px;
}

/* Dashboard Grid Layout */
.dashboard-grid {
  display: grid;
  gap: var(--grid-gap);
  grid-template-columns: 1fr;
}

/* Hero Panel & Highlight/Stats */
.hero-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
  background-image: 
    radial-gradient(circle at top right, rgba(99, 102, 241, 0.08), transparent 45%),
    linear-gradient(to bottom, var(--panel), var(--panel));
}

.hero-copy h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.3;
}

.hero-copy p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 8px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 8px;
}

/* Stat Cards */
.stat-card {
  padding: 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.07);
  box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.4);
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.stat-card:hover::after {
  opacity: 1;
}

.stat-label-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-label {
  color: var(--text-muted);
  font-size: var(--stat-label-size, 0.8rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0;
}

.stat-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-white);
  font-size: 1.1rem;
}

.stat-card:nth-child(1) .stat-icon { color: var(--accent-rose); background: rgba(244, 63, 94, 0.08); }
.stat-card:nth-child(2) .stat-icon { color: var(--accent-cyan); background: rgba(6, 182, 212, 0.08); }
.stat-card:nth-child(3) .stat-icon { color: var(--accent-violet); background: rgba(139, 92, 246, 0.08); }
.stat-card:nth-child(4) .stat-icon { color: var(--good); background: rgba(16, 185, 129, 0.08); }

.stat-value {
  font-family: var(--font-heading);
  font-size: var(--stat-value-size, 1.6rem);
  font-weight: 700;
  color: var(--text-white);
  line-height: 1.2;
}

.stat-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Quick Links Panel */
.quick-links {
  display: flex;
  flex-direction: column;
}

.quick-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quick-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  background: rgba(255, 255, 255, 0.015);
  color: var(--text);
  font-weight: 600;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  text-align: left;
}

.quick-card:hover {
  background: rgba(99, 102, 241, 0.06);
  border-color: rgba(99, 102, 241, 0.15);
  transform: translateX(4px);
}

.quick-card strong {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
}

.quick-card span {
  font-size: 0.78rem;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.08);
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
  transition: all 0.25s;
}

.quick-card:hover span {
  background: var(--accent-cyan);
  color: var(--bg);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

/* Highlights Grid */
.highlights-panel,
.summary-panel {
  grid-column: 1 / -1;
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.highlight-card {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  background: rgba(255, 255, 255, 0.01);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  min-height: 110px;
  transition: all 0.25s ease;
}

.highlight-card:hover {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}

.highlight-card.accent {
  border-color: rgba(6, 182, 212, 0.15);
  background: linear-gradient(180deg, rgba(6, 182, 212, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
}

.highlight-card.accent:hover {
  border-color: rgba(6, 182, 212, 0.3);
  background: linear-gradient(180deg, rgba(6, 182, 212, 0.07) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.highlight-card span {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.highlight-card strong {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--text-white);
  line-height: 1.4;
}

/* Summary Grid */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.summary-item {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  background: rgba(255, 255, 255, 0.01);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.25s ease;
}

.summary-item:hover {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.06);
}

.summary-item span {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
}

.summary-item strong {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--text-white);
}

/* Page Shell & Form Editor */
.page-shell {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Form Styles */
.editor {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  background: rgba(5, 8, 16, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 20px;
  border-radius: 20px;
  align-items: end;
}

.editor-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.editor input,
.editor select,
.editor textarea {
  background: rgba(5, 8, 16, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  color: var(--text-white);
  padding: 12px 16px;
  font-size: var(--form-input-size, 0.9rem);
  outline: none;
  transition: all 0.25s ease;
  width: 100%;
}

.editor input[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.field-error {
  color: var(--danger);
  font-size: 0.75rem;
  padding-left: 2px;
}

.editor input:focus, 
.editor select:focus, 
.editor textarea:focus {
  border-color: var(--accent);
  background: rgba(5, 8, 16, 0.9);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.editor button {
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 700;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  grid-column: span 1;
}

/* Inputs, Textareas and Dropdowns in general */
button, input, select, textarea {
  font-family: var(--font-body);
}

input[type="file"] {
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  background: rgba(5, 8, 16, 0.4);
  color: var(--text-muted);
  padding: 16px;
  cursor: pointer;
  transition: all 0.25s ease;
}

input[type="file"]:hover {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.03);
}

/* Entry Lists */
.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding: 0 4px;
}

.list-header strong {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--text-white);
}

.list-header span {
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 10px;
  border-radius: 20px;
  color: var(--text-muted);
  font-weight: 600;
}

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

.entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  background: rgba(255, 255, 255, 0.01);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.entry:hover {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.06);
  transform: translateX(3px);
}

.entry strong {
  font-family: var(--font-heading);
  font-size: var(--entry-title-size, 1.1rem);
  color: var(--text-white);
  font-weight: 600;
  margin-bottom: 4px;
  display: block;
}

.entry .meta {
  font-size: var(--entry-meta-size, 0.85rem);
  color: var(--text-muted);
}

.entry-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.entry-actions span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.06);
  padding: 4px 10px;
  border-radius: 12px;
}

.empty {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  border-radius: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.005);
}

.load-more-btn {
  align-self: center;
  margin-top: 4px;
  padding: 10px 20px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.load-more-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-white);
}

/* Button Colors */
button:not(.tab):not(.ghost):not(.danger) {
  color: var(--text-white);
  background: var(--accent);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--btn-radius);
  padding: var(--btn-padding-y) var(--btn-padding-x);
  font-size: var(--btn-font-size);
}

button:not(.tab):not(.ghost):not(.danger):hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
  filter: brightness(1.08);
}

button:not(.tab):not(.ghost):not(.danger):active {
  transform: translateY(1px);
}

.ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: all 0.25s;
  border-radius: var(--btn-radius);
  padding: var(--btn-padding-y) var(--btn-padding-x);
  font-size: var(--btn-font-size);
  font-weight: 600;
}

.ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.danger {
  color: var(--text-white);
  background: linear-gradient(135deg, var(--accent-rose), #ff6b87);
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.2);
  transition: all 0.25s;
  border-radius: var(--btn-radius);
  padding: var(--btn-padding-y) var(--btn-padding-x);
  font-size: var(--btn-font-size);
  font-weight: 600;
  border: none;
  cursor: pointer;
}

.danger:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 20px rgba(244, 63, 94, 0.35);
  transform: translateY(-1px);
}

/* Chat (Ollama) Panel */
.chat-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  background: rgba(255, 255, 255, 0.01);
  padding: 12px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  margin-bottom: 16px;
}

.chat-toolbar label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
}

.chat-toolbar select {
  width: auto;
  min-width: 160px;
  background: rgba(5, 8, 16, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 12px;
  color: var(--text-white);
}

.chat-toolbar .helper {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.chat {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 400px;
  overflow-y: auto;
  padding: 16px;
  border-radius: 18px;
  background: rgba(5, 8, 16, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.bubble {
  max-width: 80%;
  border-radius: 16px;
  padding: 12px 16px;
  font-size: var(--chat-message-size, 0.92rem);
  line-height: 1.45;
  border: 1px solid rgba(255, 255, 255, 0.03);
  white-space: pre-wrap;
}

.bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(99, 102, 241, 0.05) 100%);
  border-color: rgba(99, 102, 241, 0.2);
  border-bottom-right-radius: 4px;
  color: var(--text-white);
}

.bubble.assistant {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.015);
  border-color: rgba(255, 255, 255, 0.04);
  border-bottom-left-radius: 4px;
}

.bubble-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 14px 16px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typing-bounce 1.1s infinite ease-in-out;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.15s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typing-bounce {
  0%, 60%, 100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.chat-templates {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.templates-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}

.templates-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.templates-pills::-webkit-scrollbar {
  height: 4px;
}

.templates-pills::-webkit-scrollbar-track {
  background: transparent;
}

.templates-pills::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}

.template-pill {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-white);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.template-pill:hover {
  background: rgba(99, 102, 241, 0.12) !important;
  border-color: rgba(99, 102, 241, 0.3) !important;
  color: var(--text-white) !important;
}

.template-pill:active {
  transform: scale(0.97);
}

.chat-compose {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  align-items: stretch;
}

.chat-compose textarea {
  flex: 1;
  min-height: 50px;
  height: 50px;
  background: rgba(5, 8, 16, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: var(--text-white);
  padding: 12px 16px;
  outline: none;
  resize: none;
  transition: all 0.25s;
}

.chat-compose textarea:focus {
  border-color: var(--accent);
  background: rgba(5, 8, 16, 0.9);
}

.chat-compose button {
  height: 50px;
  padding: 0 24px;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-weight: 700;
}

/* Footer & Subtitles */
.footer-note {
  color: var(--text-muted);
  text-align: center;
  font-size: 0.8rem;
  padding: 12px 0 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  margin-top: 12px;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .highlight-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .upload-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .app-frame {
    padding: 24px 16px;
  }
  
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px;
  }
  
  .topbar h1 {
    font-size: 1.8rem;
  }
  
  .editor {
    grid-template-columns: 1fr;
  }
  
  .editor button {
    grid-column: 1 / -1;
  }
  
  .tabbar {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  
  .tab {
    white-space: nowrap;
    padding: 10px 16px;
  }
  
  .summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-stats {
    grid-template-columns: 1fr;
  }
  
  .highlight-grid {
    grid-template-columns: 1fr;
  }
  
  .entry {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .entry-actions {
    width: 100%;
    justify-content: flex-end;
    margin-top: 10px;
  }
}

/* Cihaza özel görünüm rotaları: /panel/ (PC), /panel/tablet/, /panel/mobile/ */
html[data-device="tablet"] .hero-stats,
html[data-device="mobile"] .hero-stats {
  grid-template-columns: repeat(2, 1fr);
}

html[data-device="tablet"] .highlight-grid,
html[data-device="mobile"] .highlight-grid {
  grid-template-columns: repeat(2, 1fr);
}

html[data-device="tablet"] .upload-panel,
html[data-device="mobile"] .upload-panel {
  grid-template-columns: 1fr;
}

html[data-device="mobile"] .summary-grid,
html[data-device="mobile"] .metrics-summary-grid,
html[data-device="mobile"] .hero-stats,
html[data-device="mobile"] .highlight-grid {
  grid-template-columns: 1fr;
}

/* Telefon rotası her zaman tek sütun + doğal sayfa kaydırma kullanır,
   pencere geniş olsa bile (masaüstü kabuğu min-width:1025px'te !important ile kilitli). */
html[data-device="mobile"] .app-frame {
  padding: 24px 16px;
  height: auto;
  min-height: 100vh;
  display: grid;
  overflow: visible;
}

html[data-device="mobile"] .dashboard-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  flex: initial;
  overflow: visible;
}

html[data-device="mobile"] .dashboard-left-col,
html[data-device="mobile"] .dashboard-right-col {
  height: auto;
  overflow-y: visible;
}

html[data-device="mobile"] .topbar {
  flex-direction: column;
  align-items: flex-start;
  padding: 20px 24px;
}

html[data-device="mobile"] .topbar h1 {
  font-size: 1.8rem;
}

html[data-device="mobile"] .topbar-right {
  width: 100%;
  justify-content: space-between;
  margin-top: 12px;
}

html[data-device="mobile"] .sync-section {
  align-items: flex-start;
}

html[data-device="mobile"] .sync-error-text,
html[data-device="mobile"] .sync-success-text {
  text-align: left;
}

html[data-device="mobile"] .editor {
  grid-template-columns: 1fr;
}

html[data-device="mobile"] .editor button {
  grid-column: 1 / -1;
}

html[data-device="tablet"] .tabbar,
html[data-device="mobile"] .tabbar {
  overflow-x: auto;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
}

html[data-device="tablet"] .tab,
html[data-device="mobile"] .tab {
  white-space: nowrap;
  padding: 10px 16px;
}

html[data-device="mobile"] .entry {
  flex-direction: column;
  align-items: flex-start;
}

html[data-device="mobile"] .entry-actions {
  width: 100%;
  justify-content: flex-end;
  margin-top: 10px;
}

/* Sync Section Styles */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sync-section {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  position: relative;
  gap: 4px;
}

.sync-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent)) !important;
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.2) !important;
  color: var(--text-white);
  border: none;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--btn-radius);
  padding: var(--btn-padding-y) var(--btn-padding-x);
  font-size: var(--btn-font-size);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sync-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.35) !important;
  filter: brightness(1.08);
}

.sync-btn:active:not(:disabled) {
  transform: translateY(1px);
}

.sync-btn:disabled {
  opacity: 0.8;
  cursor: not-allowed;
}

.sync-icon {
  flex-shrink: 0;
}

.spin {
  animation: spin 1.2s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.sync-progress-bar-container {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  position: absolute;
  bottom: -6px;
  left: 0;
}

.sync-progress-bar {
  height: 100%;
  background: var(--accent-cyan);
  transition: width 0.3s ease;
}

.sync-error-text {
  font-size: 0.75rem;
  color: var(--accent-rose);
  margin-top: 2px;
  max-width: 250px;
  text-align: right;
}

.sync-success-text {
  font-size: 0.75rem;
  color: var(--good);
  margin-top: 2px;
  text-align: right;
}

@media (max-width: 768px) {
  .topbar-right {
    width: 100%;
    justify-content: space-between;
    margin-top: 12px;
  }
  .sync-section {
    align-items: flex-start;
  }
  .sync-error-text,
  .sync-success-text {
    text-align: left;
  }
}

/* Metrics Tabs Styles */
.metrics-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.badge.steps {
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.06);
  border-color: rgba(6, 182, 212, 0.15);
}

.badge.heart-rate {
  color: var(--accent-rose);
  background: rgba(244, 63, 94, 0.06);
  border-color: rgba(244, 63, 94, 0.15);
}

.badge.sleep {
  color: var(--accent-violet);
  background: rgba(139, 92, 246, 0.06);
  border-color: rgba(139, 92, 246, 0.15);
}

.heart-pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-rose);
  border-radius: 50%;
  display: inline-block;
  animation: pulse 1.2s infinite alternate;
}

@keyframes pulse {
  0% {
    transform: scale(0.8);
    box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.7);
  }
  100% {
    transform: scale(1.2);
    box-shadow: 0 0 8px 3px rgba(244, 63, 94, 0);
  }
}

@media (max-width: 768px) {
  .metrics-summary-grid {
    grid-template-columns: 1fr;
  }
}

.clear-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(244, 63, 94, 0.05) !important;
  color: var(--accent-rose) !important;
  border: 1px solid rgba(244, 63, 94, 0.2) !important;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--btn-radius);
  padding: var(--btn-padding-y) var(--btn-padding-x);
  font-size: var(--btn-font-size);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: none !important;
}

.settings-menu-wrap {
  position: relative;
}

.settings-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  flex: 0 0 40px;
  color: var(--text) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid var(--panel-border) !important;
  border-radius: var(--btn-radius);
  cursor: pointer;
  transition: all 0.2s ease;
}

.topbar-right .settings-icon-btn {
  min-width: 40px;
  max-width: 40px;
  white-space: nowrap;
}

.settings-icon-btn:hover,
.settings-icon-btn[aria-expanded="true"] {
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.35);
}

.settings-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1000;
  width: 280px !important;
  min-width: 280px !important;
  max-width: 280px !important;
  padding: 10px !important;
  background: #090b10 !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 12px !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.95) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  box-sizing: border-box !important;
}

.settings-user-header {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  padding: 4px 6px 6px !important;
}

.settings-user-label {
  font-size: 0.68rem !important;
  font-weight: 600 !important;
  color: #8a94a6 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
}

.settings-user-email {
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  color: #ffffff !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.settings-divider {
  height: 1px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  margin: 2px 0 !important;
}

.settings-section {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.settings-section-label {
  font-size: 0.68rem !important;
  font-weight: 600 !important;
  color: #8a94a6 !important;
  padding: 2px 4px !important;
}

.settings-lang-group {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 4px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.settings-lang-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  padding: 6px 2px !important;
  border-radius: 6px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: #000000 !important;
  color: #cbd5e1 !important;
  font-size: 0.74rem !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
  transition: all 0.1s ease !important;
  white-space: nowrap !important;
}

.settings-lang-btn:hover {
  background: #131722 !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}

.settings-lang-btn.active {
  background: linear-gradient(180deg, #2b3952 0%, #172131 100%) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}

.settings-lang-flag {
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  opacity: 0.8 !important;
}

.settings-lang-text {
  font-size: 0.74rem !important;
}

.settings-lang-check {
  font-size: 0.7rem !important;
  color: #60a5fa !important;
}

.settings-menu-item {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  width: 100% !important;
  padding: 8px 10px !important;
  border: 1px solid transparent !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: #e2e8f0 !important;
  font: inherit !important;
  font-size: 0.82rem !important;
  font-weight: 500 !important;
  text-align: left !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
  transition: all 0.1s ease !important;
}

.settings-menu-item svg {
  flex: 0 0 16px !important;
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
}

.settings-menu-item span {
  flex: 0 1 auto !important;
  text-align: left !important;
  margin: 0 !important;
}

.settings-menu-item:hover {
  background: #131722 !important;
  border-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.settings-clear-item {
  color: #fbbf24 !important;
}

.settings-clear-item:hover {
  background: rgba(251, 191, 36, 0.12) !important;
  border-color: rgba(251, 191, 36, 0.3) !important;
  color: #fef08a !important;
}

.settings-logout-item {
  color: #f87171 !important;
}

.settings-logout-item:hover {
  background: rgba(239, 68, 68, 0.12) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: #fca5a5 !important;
}

/* Klinik Zaman Çizelgesi (swimlane) — osteosarc.com Timeline paneli piksel ölçülerine hizalandı
   (bkz. share data/Osteosarc_Arayuz_Ebat_Butunlesik_Rapor.md §3.2 ve §5) */
.clinical-swimlane {
  display: flex;
  flex-direction: column;
  min-width: 640px;
}

.swimlane-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--panel-border);
}

.swimlane-header strong {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-white);
}

.swimlane-header p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.swimlane-row {
  display: flex;
  border: 1px solid var(--panel-border);
  border-top: none;
  border-radius: 0 0 6px 6px;
  margin-bottom: 4px;
  overflow: hidden;
}

.swimlane-row:first-child {
  border-top: 1px solid var(--panel-border);
  border-radius: 6px 6px 0 0;
}

.swimlane-row-last {
  margin-bottom: 0;
}

.swimlane-label-col {
  flex-shrink: 0;
  width: 180px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  border-right: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.015);
}

.swimlane-label-col strong {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-white);
}

.swimlane-label-sub {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-muted);
}

.swimlane-chart-col {
  flex: 1;
  min-width: 0;
  padding: 4px 8px;
}

.swimlane-download-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 0.8rem;
}

.swimlane-download-label {
  color: var(--text-muted);
  font-weight: 600;
}

.swimlane-download-link {
  display: inline-flex;
  align-items: center;
  padding: 3.2px 9.6px;
  border-radius: 4px;
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-white);
  font-size: 0.78rem;
  transition: background 0.1s, border-color 0.1s;
}

.swimlane-download-link:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--accent-cyan);
}

.chart-mark {
  cursor: pointer;
  outline: none;
}

.chart-mark:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}

.chart-tooltip {
  position: fixed;
  z-index: 60;
  pointer-events: none;
  background: var(--bg-darker);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.76rem;
  box-shadow: var(--shadow);
  max-width: 220px;
}

.chart-tooltip-date {
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 4px;
}

.chart-tooltip-row {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
}

.chart-tooltip-row + .chart-tooltip-row {
  margin-top: 2px;
}

.chart-tooltip-swatch {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

.chart-tooltip-label {
  color: var(--text-muted);
}

.chart-tooltip-value {
  margin-left: auto;
  font-weight: 600;
  color: var(--text);
}

/* Style Customizer Panel */
.theme-customizer-toggle {
  display: none !important;
}

.theme-customizer-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 380px;
  max-width: 100vw;
  height: 100vh;
  background: rgba(10, 15, 30, 0.95);
  backdrop-filter: blur(20px);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.7);
  z-index: 10000;
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

@media (max-width: 600px) {
  .theme-customizer-toggle {
    bottom: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
  }

  .theme-customizer-drawer {
    width: 100vw;
    right: -100vw;
  }
}

.theme-customizer-drawer.open {
  right: 0;
}

.theme-customizer-header {
  padding: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.theme-customizer-header h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-white);
}

.theme-customizer-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
}

.theme-customizer-close:hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.05);
}

.theme-customizer-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.theme-customizer-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.theme-customizer-section h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-left: 3px solid var(--accent);
  padding-left: 8px;
  margin-bottom: 4px;
}

.theme-customizer-control {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.theme-customizer-control-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.theme-customizer-control-label span.value {
  color: var(--text-white);
  font-family: monospace;
  font-weight: 600;
}

.theme-customizer-control input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  transition: background 0.3s;
}

.theme-customizer-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
  transition: transform 0.1s, background-color 0.2s;
}

.theme-customizer-control input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: var(--text-white);
}

.theme-customizer-control-color {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 8px 12px;
  border-radius: 10px;
}

.theme-customizer-control-color input[type="color"] {
  -webkit-appearance: none;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  background: none;
}

.theme-customizer-control-color input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.theme-customizer-control-color input[type="color"]::-webkit-color-swatch {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
}

.theme-customizer-control-color span {
  font-size: 0.85rem;
  color: var(--text-white);
}

.theme-customizer-footer {
  padding: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.theme-customizer-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.85rem !important;
}

.theme-customizer-btn.secondary {
  background: rgba(255, 255, 255, 0.05) !important;
  color: var(--text-white) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.theme-customizer-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.1) !important;
}

/* CSS Code Export Area */
.theme-customizer-code-box {
  margin-top: 12px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 12px;
  font-family: monospace;
  font-size: 0.75rem;
  color: #34d399;
  max-height: 120px;
  overflow-y: auto;
  white-space: pre-wrap;
  user-select: all;
}

/* Panel Controls Overlay */
.panel-header-controls {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.15;
  transition: opacity 0.2s;
  z-index: 10;
}

.panel:hover .panel-header-controls {
  opacity: 1;
}

.panel-span-toggle {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: var(--text-muted) !important;
  padding: 4px 8px !important;
  font-size: 0.72rem !important;
  border-radius: 6px !important;
  cursor: pointer;
  box-shadow: none !important;
  transition: all 0.2s;
  font-weight: 600;
}

.panel-span-toggle:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: var(--text-white) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

.panel-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: grab;
  padding: 4px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.2s, color 0.2s;
}

.panel-drag-handle:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-white);
}

.panel-drag-handle:active {
  cursor: grabbing;
}

/* Customizer Tab Bar Styles */
.theme-customizer-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 16px;
}

.theme-customizer-tab-btn {
  flex: 1;
  background: transparent !important;
  border: none !important;
  color: var(--text-muted) !important;
  padding: 12px 6px !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  cursor: pointer;
  text-align: center;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transition: all 0.2s;
}

.theme-customizer-tab-btn:hover {
  color: var(--text-white) !important;
  background: rgba(255, 255, 255, 0.02) !important;
  transform: none !important;
}

.theme-customizer-tab-btn.active {
  color: var(--accent) !important;
  border-bottom: 2px solid var(--accent) !important;
}




/* Consent gate (KVKK + tıbbi feragatname) */
.consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(1, 3, 10, 0.85);
  backdrop-filter: var(--blur);
}

.consent-modal {
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: var(--panel-padding);
  border-radius: var(--panel-radius);
  border: 1px solid var(--panel-border);
  background: var(--bg);
  box-shadow: var(--shadow);
}

.consent-modal h2 {
  font-family: var(--font-heading);
  margin-bottom: 8px;
}

.consent-intro {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.consent-text {
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: var(--panel);
  padding: 16px;
  margin-bottom: 16px;
  max-height: 220px;
  overflow-y: auto;
  font-size: 0.85rem;
}

.consent-text h3 {
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.consent-text p {
  color: var(--text-muted);
  margin-bottom: 8px;
}

.consent-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  cursor: pointer;
  font-size: 0.9rem;
}

.consent-checkbox input {
  margin-top: 3px;
  accent-color: var(--accent);
}

.consent-error {
  color: var(--danger);
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.consent-accept-btn {
  width: 100%;
  padding: var(--btn-padding-y) var(--btn-padding-x);
  border-radius: var(--btn-radius);
  border: none;
  background: var(--accent);
  color: var(--text-white);
  font-size: var(--btn-font-size);
  font-weight: 600;
  cursor: pointer;
}

.consent-accept-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.consent-settings h2 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.consent-settings p {
  font-size: 0.9rem;
  margin-bottom: 12px;
}

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

.consent-withdraw-btn {
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid var(--danger);
  background: transparent;
  color: var(--danger);
  font-weight: 600;
  cursor: pointer;
}

.consent-withdraw-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.consent-cancel-btn {
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  background: transparent;
  color: inherit;
  cursor: pointer;
}

/* Evrensel sağlık belgesi modeli - Barış Design (Pure Dark Slate) */
.document-safety-note {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-left: 3px solid rgba(255, 255, 255, 0.24) !important;
  border-radius: 8px !important;
  background: #000000 !important;
  color: #8a94a6 !important;
  font-size: 0.82rem !important;
  line-height: 1.4 !important;
}

.document-safety-note strong { color: #ffffff !important; font-weight: 600; white-space: nowrap; }
.document-safety-note span { color: #8a94a6 !important; }
.document-safety-note.compact { font-size: 0.8rem !important; padding: 8px 13px !important; }

.health-category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  margin-top: 13px;
}

.health-category-card {
  min-height: 174px;
  padding: 21px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 8px !important;
  background: #090b10 !important;
  display: flex;
  flex-direction: column;
  transition: border-color 0.1s ease, background 0.1s ease;
}

.health-category-card:hover {
  border-color: rgba(255, 255, 255, 0.18) !important;
  background: #0e1118 !important;
  transform: none !important;
}

.health-category-card.priority {
  border-color: rgba(255, 255, 255, 0.14) !important;
  background: #090b10 !important;
}

.health-category-topline, .health-category-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.health-category-icon {
  color: #e2e8f0 !important;
  font-size: 1.25rem !important;
  filter: grayscale(100%) !important;
}

.health-category-order {
  color: #8a94a6 !important;
  font: 600 0.75rem var(--font-body);
  letter-spacing: 0.1em;
}

.health-category-card h3 {
  margin: 13px 0 6px !important;
  color: #ffffff !important;
  font: 600 0.96rem/1.3 var(--font-heading);
}

.health-category-card p {
  color: #8a94a6 !important;
  font-size: 0.8rem !important;
  line-height: 1.5;
}

.health-category-footer {
  margin-top: auto;
  padding-top: 13px;
  color: #8a94a6 !important;
  font-size: 0.78rem !important;
}

.health-category-card .text-button,
.text-button {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 6px 13px !important;
  border-radius: 8px !important;
  background: #000000 !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #ffffff !important;
  font: 500 0.8rem var(--font-body) !important;
  cursor: pointer !important;
  transition: all 0.1s ease !important;
  text-decoration: none !important;
}

.health-category-card .text-button:hover,
.text-button:hover {
  background: #131722 !important;
  border-color: rgba(255, 255, 255, 0.28) !important;
  color: #ffffff !important;
}

.document-records { margin-top: 21px; }

.import-flow-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 13px !important;
  border-radius: 8px !important;
  background: #000000 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #8a94a6 !important;
  font-size: 0.8rem !important;
}
.import-flow-strip span { color: #8a94a6 !important; display: inline-flex; align-items: center; gap: 4px; }
.import-flow-strip b { color: #ffffff !important; font-weight: 600; margin-right: 4px; }
.import-flow-strip i { color: #8a94a6 !important; font-style: normal; }

@media (max-width: 800px) {
  .health-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .import-flow-strip { overflow-x: auto; justify-content: flex-start; white-space: nowrap; }
}

@media (max-width: 520px) {
  .health-category-grid { grid-template-columns: 1fr; }
  .document-safety-note { flex-direction: column; gap: 4px; }
}

/* AI Import Styles - Barış Design (Pure Dark Slate & Fibonacci) */
.ai-import-header-action {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.ai-import-header-action label {
  color: #8a94a6 !important;
  font-size: 0.82rem !important;
  font-weight: 500 !important;
}

#ai-model-select {
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 13px !important;
  border-radius: 8px !important;
  background: #000000 !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #ffffff !important;
  font-size: 0.85rem !important;
  font-family: var(--font-body) !important;
  outline: none !important;
  cursor: pointer !important;
}

.ai-cloud-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 0.8rem !important;
  color: #8a94a6 !important;
  font-weight: 500 !important;
}

.ai-cloud-badge .cloud-dot {
  color: #166534 !important;
  font-size: 0.7rem !important;
}

.ai-import-container {
  display: flex;
  flex-direction: column;
  gap: 13px !important;
}

.ai-import-dropzone {
  border: 1px dashed rgba(255, 255, 255, 0.18) !important;
  border-radius: 8px !important;
  padding: 34px 21px !important;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.1s ease, background 0.1s ease;
  background: #000000 !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ai-import-dropzone:hover,
.ai-import-dropzone.drag-over {
  border-color: rgba(255, 255, 255, 0.32) !important;
  background: #0e1118 !important;
}

.ai-import-dropzone svg {
  stroke: #8a94a6 !important;
  opacity: 0.7 !important;
  margin-bottom: 8px !important;
}

.ai-import-dropzone p strong {
  color: #ffffff !important;
  font-size: 0.95rem !important;
}

.ai-import-dropzone p {
  color: #8a94a6 !important;
  margin: 2px 0 !important;
}

.ai-import-status {
  padding: 8px 13px !important;
  border-radius: 8px !important;
  font-size: 0.85rem !important;
  background: #090b10 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #e2e8f0 !important;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-import-status.busy {
  border: 1px solid rgba(255, 255, 255, 0.24) !important;
}

.ai-import-status.done {
  border: 1px solid var(--good, #166534) !important;
  color: #ffffff !important;
}

.ai-import-file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-import-results {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ai-import-category-group h4 {
  font-family: var(--font-heading);
}

.ai-import-editable-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px; margin-top: 6px; }
.ai-import-editable-fields label { display: grid; gap: 3px; color: var(--text-muted); font-size: 0.68rem; }
.ai-import-editable-fields input { min-width: 0; padding: 5px 7px; border: 1px solid var(--panel-border); border-radius: 6px; background: rgba(0, 0, 0, 0.18); color: var(--text); font: inherit; }
.ai-import-uncertainty { margin-top: 8px; color: #fbbf24; font-size: 0.75rem; }

.ai-import-item {
  display: flex !important;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px !important;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
}

.ai-import-item.approved {
  border-left: 3px solid var(--good);
}

.ai-import-item.needs_review {
  border-left: 3px solid #fbbf24;
  background: rgba(251, 191, 36, 0.06);
}

.ai-import-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.ai-import-count {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.ai-import-action-divider {
  width: 1px;
  height: 24px;
  margin: 0 2px;
  background: var(--panel-border);
}

.ai-import-add-button {
  background: var(--good) !important;
  color: #07110b !important;
  font-weight: 700;
}

.ai-import-checkbox {
  display: flex;
  align-items: center;
  padding-top: 2px;
}

.ai-import-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.confidence-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}

.confidence-badge.high {
  background: rgba(16, 185, 129, 0.15);
  color: var(--good);
}

.confidence-badge.medium {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

.confidence-badge.low {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

.typing-dot-group {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.ai-import-dropzone p {
  margin: 0;
  color: var(--text);
}

/* Onboarding Modal */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(3, 7, 18, 0.92);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.onboarding-modal {
  background: #090b10 !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 16px !important;
  padding: 34px 28px !important;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.95) !important;
  color: #e2e8f0;
}

.onboarding-header {
  text-align: center;
  margin-bottom: 24px;
}

.onboarding-header h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: #ffffff !important;
  background: none !important;
  -webkit-text-fill-color: initial !important;
}

.onboarding-header p {
  font-size: 0.86rem;
  color: #8a94a6;
  line-height: 1.45;
  margin: 0;
}

.profile-questions-modal {
  max-width: 480px;
  padding: 34px 28px !important;
}

.profile-progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 28px;
}

.profile-progress-step {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #8a94a6;
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
}

.profile-progress-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: #8a94a6;
  font-size: 0.72rem;
  font-weight: 700;
}

.profile-progress-step.active {
  background: #131722;
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-weight: 600;
}

.profile-progress-step.active span {
  background: linear-gradient(180deg, #2b3952 0%, #172131 100%);
  color: #ffffff;
  box-shadow: none;
}

.profile-question-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-question-content label,
.profile-label {
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 600;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.profile-question-content label span {
  color: #8a94a6;
  font-size: 0.78rem;
  font-weight: 400;
}

.profile-question-content input[type="text"],
.profile-question-content input[type="number"],
.profile-question-content input:not([type]) {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #ffffff;
  background: #000000 !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 10px !important;
  outline: none;
  transition: all 0.1s ease;
  margin-bottom: 8px;
  box-sizing: border-box;
}

.profile-question-content input:focus {
  border-color: rgba(255, 255, 255, 0.35) !important;
  background: #000000 !important;
  box-shadow: 0 0 0 3px rgba(52, 73, 110, 0.4) !important;
}

#profile-age {
  min-height: 52px;
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 1px;
  margin-top: 4px;
  max-width: 140px;
  margin-left: auto;
  margin-right: auto;
}

.profile-helper {
  color: #8a94a6;
  font-size: 0.82rem;
  text-align: center;
  margin: 4px 0 0;
}

.gender-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.gender-option {
  min-height: 48px;
  padding: 10px 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: #000000;
  color: #cbd5e1;
  font-size: 0.86rem;
  font-weight: 600;
  text-align: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.1s ease;
  display: flex;
  align-items: center;
}

.gender-option:hover {
  background: #131722;
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.gender-option.selected {
  background: linear-gradient(180deg, #2b3952 0%, #172131 100%) !important;
  border-color: rgba(255, 255, 255, 0.28) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

.profile-error {
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(122, 47, 52, 0.2);
  border: 1px solid rgba(122, 47, 52, 0.6);
  color: #f87171;
  font-size: 0.82rem;
  font-weight: 500;
}

.profile-question-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 24px;
}

.profile-question-actions button {
  min-height: 42px;
  padding: 10px 21px;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.1s ease;
}

.profile-question-actions button:not(.ghost) {
  flex: 1;
  background: linear-gradient(180deg, #2b3952 0%, #172131 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  box-shadow: none !important;
  text-align: center;
}

.profile-question-actions button:not(.ghost):hover:not(:disabled) {
  background: linear-gradient(180deg, #354766 0%, #1e2a3e 100%) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  transform: none !important;
}

.profile-question-actions button:not(.ghost):active:not(:disabled) {
  transform: translateY(1px) scale(0.98) !important;
}

.profile-question-actions button.ghost {
  background: #000000;
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  min-width: 90px;
}

.profile-question-actions button.ghost:hover:not(:disabled) {
  background: #131722;
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.profile-question-actions button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.onboarding-steps {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 21px;
}

.onboarding-step {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #8a94a6;
}

.onboarding-step .step-number {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #8a94a6;
}

.onboarding-step.active .step-number {
  background: linear-gradient(180deg, #2b3952 0%, #172131 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.onboarding-step.active {
  color: #ffffff;
  font-weight: 600;
}

.onboarding-files {
  margin-top: 16px;
}

.onboarding-status {
  text-align: center;
  padding: 16px;
  font-size: 0.9rem;
  color: #8a94a6;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.onboarding-status.error {
  color: #f87171;
}

.onboarding-results {
  text-align: center;
  margin-top: 16px;
}

.onboarding-results-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.onboarding-badge {
  padding: 4px 10px;
  border-radius: 6px;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 600;
}

.onboarding-footer {
  margin-top: 16px;
  text-align: center;
  padding-top: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ===== ZAMAN ÇİZELGESİ (TIMELINE) ===== */
.timeline-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px;
}

.timeline-header {
  margin-bottom: 32px;
}

.timeline-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.timeline-header-top h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: #ffffff !important;
}

.timeline-header-top p {
  margin: 0;
  font-size: 0.82rem;
  color: #8a94a6 !important;
}

.timeline-zoom {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.timeline-zoom-btn {
  width: 34px !important;
  height: 34px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  background: #000000 !important;
  color: #ffffff !important;
  font-size: 0.9rem !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.1s ease, background 0.1s ease;
}

.timeline-zoom-btn:hover {
  border-color: rgba(255, 255, 255, 0.28) !important;
  background: #131722 !important;
}

.timeline-zoom-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #8a94a6 !important;
  min-width: 36px;
  text-align: center;
}

.timeline-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.timeline-filter-chip {
  padding: 6px 13px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  background: #000000 !important;
  color: #8a94a6 !important;
  font-size: 0.8rem !important;
  font-weight: 500;
  cursor: pointer;
  transition: none !important;
  animation: none !important;
}

.timeline-filter-chip:hover {
  background: #0e1118 !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
  color: #ffffff !important;
}

.timeline-filter-chip.active {
  background: #131722 !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
}

.timeline-body {
  position: relative;
}

.timeline-empty {
  text-align: center;
  padding: 55px 21px;
  color: #8a94a6 !important;
  font-size: 0.9rem;
}

/* Devam Eden Tedaviler */
.timeline-ongoing {
  margin-bottom: 34px;
  padding-bottom: 21px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.timeline-ongoing-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #8a94a6 !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 13px;
}

.timeline-ongoing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 13px;
}

.timeline-ongoing-card {
  background: #090b10 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 8px !important;
  padding: 13px 21px !important;
  transition: border-color 0.1s ease, background 0.1s ease;
}

.timeline-ongoing-card:hover {
  background: #0e1118 !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
}

/* Zaman Grupları */
.timeline-group {
  margin-bottom: 28px;
}

.timeline-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.timeline-group-dot {
  width: 8px !important;
  height: 8px !important;
  border-radius: 50%;
  background: #ffffff !important;
  flex-shrink: 0;
}

.timeline-group-label {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff !important;
}

.timeline-group-count {
  font-size: 0.72rem;
  color: #8a94a6 !important;
  background: #000000 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 2px 8px;
  border-radius: 8px !important;
}

/* Timeline Items (Alternating Cards) */
.timeline-items {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.timeline-dot {
  width: 8px !important;
  height: 8px !important;
  border-radius: 50%;
  background: #ffffff !important;
  box-shadow: none !important;
  z-index: 2;
  margin-top: 6px;
}

.timeline-item:hover .timeline-dot {
  transform: none !important;
}

.timeline-card {
  flex: 1;
  background: #090b10 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 8px !important;
  padding: 13px 21px !important;
  transition: border-color 0.1s ease, background 0.1s ease;
  cursor: default;
}

.timeline-card:hover {
  background: #0e1118 !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  transform: none !important;
}

.timeline-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.timeline-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px !important;
  border-radius: 8px !important;
  background: #000000 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #e2e8f0 !important;
  font-size: 0.72rem !important;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.timeline-date {
  font-size: 0.75rem;
  color: #8a94a6 !important;
  white-space: nowrap;
  font-weight: 500;
}

.timeline-card-title {
  font-size: 0.95rem !important;
  font-weight: 600;
  color: #ffffff !important;
  margin-bottom: 2px;
}

.timeline-card-subtitle {
  font-size: 0.82rem !important;
  color: #8a94a6 !important;
  line-height: 1.4;
}

.timeline-card-detail {
  font-size: 0.75rem;
  color: #8a94a6 !important;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  line-height: 1.4;
}

/* Mobile */
@media (max-width: 640px) {
  .timeline-container {
    padding: 16px 10px;
  }
  .timeline-header-top {
    flex-direction: column;
  }
  .timeline-ongoing-grid {
    grid-template-columns: 1fr;
  }
  .timeline-items {
    padding-left: 24px;
  }
  .timeline-dot {
    left: -18px;
    width: 10px;
    height: 10px;
  }
}

/* Drag reorder handle */
.timeline-reorder-handle {
  cursor: grab;
  color: var(--text-tertiary, #4b5563);
  font-size: 0.85rem;
  user-select: none;
  opacity: 0;
  transition: opacity 0.15s;
}

.timeline-group-header:hover .timeline-reorder-handle,
.timeline-ongoing-header:hover .timeline-reorder-handle {
  opacity: 1;
}

.timeline-reorder-handle:active {
  cursor: grabbing;
}

/* Tooltip */
.timeline-tooltip {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  background: rgba(3, 7, 18, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px 14px;
  max-width: 260px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  animation: timelineTooltipIn 0.15s ease-out;
}

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

.timeline-tooltip-category {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.timeline-tooltip-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-white);
  margin-bottom: 2px;
}

.timeline-tooltip-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.timeline-tooltip-date {
  font-size: 0.7rem;
  color: var(--text-tertiary, #6b7280);
  margin-top: 4px;
}

.timeline-tooltip-detail {
  font-size: 0.72rem;
  color: var(--text-tertiary, #6b7280);
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Text-Only Frameless Button Utility */
.btn-text, .btn-frameless, button.btn-text, button.btn-frameless {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: var(--accent) !important;
  padding: 8px 14px;
  font-weight: 600;
  transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1), opacity 0.2s;
}

.btn-text:hover, .btn-frameless:hover, button.btn-text:hover, button.btn-frameless:hover {
  background: rgba(99, 102, 241, 0.08) !important;
  color: var(--accent) !important;
}

.btn-text:active, .btn-frameless:active, button.btn-text:active, button.btn-frameless:active {
  transform: scale(0.97) !important;
}

/* ==========================================================================
   Clerk Custom Auth Modal Styling (CellHealth Theme)
   ========================================================================== */
.cl-card, .clerk-custom-card {
  background: rgba(11, 17, 32, 0.94) !important;
  backdrop-filter: blur(24px) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 30px rgba(16, 185, 129, 0.1) !important;
  border-radius: 24px !important;
}

.cl-headerTitle {
  font-family: var(--font-heading, 'Outfit', sans-serif) !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  color: #ffffff !important;
}

.cl-headerSubtitle {
  color: #9ca3af !important;
}

.cl-card, .clerk-custom-card {
  background: rgba(19, 23, 34, 0.94) !important;
  backdrop-filter: blur(24px) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 30px rgba(44, 58, 87, 0.2) !important;
  border-radius: 24px !important;
}

.cl-headerTitle {
  font-family: var(--font-heading, 'Outfit', sans-serif) !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  color: #ffffff !important;
}

.cl-headerSubtitle {
  color: #9ca3af !important;
}

.cl-formButtonPrimary, .clerk-custom-button {
  background: linear-gradient(135deg, #2c3a57, #34496e) !important;
  border-radius: 12px !important;
  font-weight: 600 !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(44, 58, 87, 0.35) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.cl-formButtonPrimary:hover, .clerk-custom-button:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(52, 73, 110, 0.5) !important;
  opacity: 0.95 !important;
}

.cl-socialButtonsBlockButton, .clerk-social-button {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #f3f4f6 !important;
  border-radius: 12px !important;
  transition: all 0.2s ease !important;
}

.cl-socialButtonsBlockButton:hover, .clerk-social-button:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(52, 73, 110, 0.4) !important;
}

.cl-formFieldInput {
  background: rgba(19, 23, 34, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
  border-radius: 10px !important;
}

.cl-formFieldInput:focus {
  border-color: #34496e !important;
  box-shadow: 0 0 0 2px rgba(52, 73, 110, 0.3) !important;
}

/* Hide Development Mode Warning Banner & Clean Footer */
[class*="developmentModeWarning"],
[class*="devModeWarning"],
.cl-internal-development-mode-warning,
.cl-internal-1dauvgg {
  display: none !important;
}

/* ==========================================================================
   Custom Native Auth Modal Styling (CellHealth Theme)
   ========================================================================== */
.custom-auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(9, 11, 16, 0.88);
  backdrop-filter: blur(20px);
  padding: 20px;
}

.custom-auth-modal {
  width: 100%;
  max-width: 420px;
  background: rgba(19, 23, 34, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 30px rgba(44, 58, 87, 0.2);
  padding: 32px;
  color: #ffffff;
  font-family: var(--font-body, 'Helvetica Neue', Helvetica, Arial, sans-serif);
}

.custom-auth-header {
  text-align: center;
  margin-bottom: 24px;
}

.custom-auth-logo {
  font-family: var(--font-heading, 'Helvetica Neue', Helvetica, Arial, sans-serif);
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #2c3a57, #34496e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

.custom-auth-header h2 {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 6px;
}

.custom-auth-header p {
  font-size: 0.85rem;
  color: #9ca3af;
}

.custom-auth-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.85rem;
  margin-bottom: 18px;
  text-align: center;
}

.custom-auth-google-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.custom-auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 18px 0;
  color: #6b7280;
  font-size: 0.78rem;
}

.custom-auth-divider::before,
.custom-auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.custom-auth-divider span {
  padding: 0 12px;
}

.custom-auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.custom-auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.custom-auth-field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #d1d5db;
}

.custom-auth-field input {
  background: rgba(19, 23, 34, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s ease;
}

.custom-auth-field input:focus {
  border-color: #34496e;
  box-shadow: 0 0 0 3px rgba(52, 73, 110, 0.3);
}

.custom-auth-submit-btn {
  background: linear-gradient(135deg, #2c3a57, #34496e);
  color: #ffffff;
  border: none;
  padding: 14px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(44, 58, 87, 0.35);
  transition: all 0.2s ease;
  margin-top: 4px;
}

.custom-auth-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(52, 73, 110, 0.5);
}

.custom-auth-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.custom-auth-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 0.85rem;
  color: #9ca3af;
}

.auth-toggle-btn {
  background: transparent;
  border: none;
  color: #34496e;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  padding: 0 4px;
}

/* Medical Disclaimer Banner & Panel Notice - Barış Design (Pure Dark Slate) */
.global-disclaimer-banner {
  background: #090b10 !important;
  border: 1px solid rgba(122, 47, 52, 0.4) !important;
  border-radius: 8px !important;
  padding: 8px 13px !important;
  font-size: 0.82rem !important;
  color: #8a94a6 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-bottom: 13px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  line-height: 1.4 !important;
}

.global-disclaimer-banner .disclaimer-icon {
  width: 16px !important;
  height: 16px !important;
  flex-shrink: 0 !important;
  stroke: #8a94a6 !important;
}

.global-disclaimer-banner span {
  color: #8a94a6 !important;
}

.global-disclaimer-banner strong,
.global-disclaimer-banner b {
  color: #e2e8f0 !important;
}

.custom-auth-disclaimer {
  background: #090b10 !important;
  border: 1px solid rgba(122, 47, 52, 0.4) !important;
  border-radius: 8px !important;
  padding: 8px 13px !important;
  font-size: 0.8rem !important;
  color: #8a94a6 !important;
  margin-top: 13px !important;
  text-align: center !important;
  line-height: 1.4 !important;
}
/* Admin: restricted black workspace */
.admin-shell { min-height: 100dvh; background: #0a0b0d; color: #f2f4f5; padding: 36px clamp(18px, 4vw, 64px) 64px; font-family: inherit; }
.admin-auth-shell { display: grid; place-items: center; }
.admin-login-card { width: min(100%, 420px); padding: 34px; background: #101216; border: 1px solid #24282f; border-radius: 16px; box-shadow: 0 20px 70px rgba(0,0,0,.32); }
.admin-mark, .admin-kicker { color: #8f9aa5; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }
.admin-login-card h1, .admin-header h1 { margin: 9px 0 5px; font-size: clamp(32px, 5vw, 54px); line-height: 1; letter-spacing: -.06em; }
.admin-muted { color: #8d96a0; line-height: 1.55; }
.admin-form { display: grid; gap: 15px; margin-top: 28px; }
.admin-form label { display: grid; gap: 7px; color: #b4bcc5; font-size: 13px; }
.admin-form input { min-height: 44px; padding: 0 12px; color: #f4f6f7; background: #0b0d10; border: 1px solid #2a3038; border-radius: 8px; outline: none; font: inherit; font-size: 13px; }
.admin-form input:focus { border-color: #8dd8bd; box-shadow: 0 0 0 3px rgba(141,216,189,.12); }
.admin-primary-button, .admin-danger-button, .admin-quiet-button, .admin-delete-button { border: 0; border-radius: 8px; min-height: 38px; padding: 0 14px; cursor: pointer; font: inherit; font-weight: 700; transition: transform .2s ease, background .2s ease, opacity .2s ease; }
.admin-primary-button { background: #b4e9d2; color: #122019; }
.admin-primary-button:hover, .admin-danger-button:hover, .admin-quiet-button:hover, .admin-delete-button:hover { transform: translateY(-1px); }
.admin-primary-button:disabled, .admin-danger-button:disabled, .admin-quiet-button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.admin-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; max-width: 1500px; margin: 0 auto 34px; }
.admin-header-actions { display: flex; gap: 12px; align-items: center; }
.admin-session { color: #8f9aa5; font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; }
.admin-quiet-button { background: #191d22; color: #d6dce1; border: 1px solid #2a3038; }
.admin-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 1500px; margin: 0 auto 24px; border: 1px solid #252a31; border-radius: 12px; overflow: hidden; background: #111419; }
.admin-summary-grid div { padding: 18px 20px; border-right: 1px solid #252a31; }
.admin-summary-grid div:last-child { border-right: 0; }
.admin-summary-grid span { display: block; color: #89939d; font-size: 12px; margin-bottom: 10px; }
.admin-summary-grid strong { font: 600 22px ui-monospace, SFMono-Regular, Menlo, monospace; font-variant-numeric: tabular-nums; }
.admin-toolbar, .admin-table-wrap { max-width: 1500px; margin: 0 auto; }
.admin-toolbar { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 16px; }
.admin-scope-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.admin-scope-tabs button { background: transparent; color: #8f9aa5; border: 1px solid transparent; border-radius: 7px; padding: 10px 12px; cursor: pointer; font: inherit; font-size: 13px; }
.admin-scope-tabs button.active { color: #d7f2e5; background: #16231e; border-color: #315845; }
.admin-upload { display: flex; gap: 8px; align-items: center; }
.admin-file-button { max-width: 250px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 10px 12px; border: 1px dashed #3b444d; border-radius: 7px; color: #aab3bc; font-size: 12px; cursor: pointer; }
.admin-file-button input { display: none; }
.admin-notice, .admin-banner { max-width: 1500px; margin: 0 auto 16px; padding: 12px 14px; border-radius: 8px; font-size: 13px; }
.admin-notice { color: #c6f1dc; background: #14271f; border: 1px solid #315845; }
.admin-error { color: #ffaaa6; }
.admin-banner { background: #2a1718; border: 1px solid #713f40; }
.admin-table-wrap { background: #101216; border: 1px solid #252a31; border-radius: 12px; overflow: hidden; }
.admin-table-head { display: flex; justify-content: space-between; align-items: center; padding: 22px 22px 16px; }
.admin-table-head h2 { margin: 5px 0 0; font-size: 20px; letter-spacing: -.03em; }
.admin-table-scroll { overflow-x: auto; }
.admin-table-scroll table { width: 100%; min-width: 1180px; border-collapse: collapse; font-size: 12px; }
.admin-table-scroll th { color: #75808a; text-align: left; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; padding: 12px 16px; border-top: 1px solid #252a31; border-bottom: 1px solid #252a31; white-space: nowrap; }
.admin-table-scroll td { padding: 14px 16px; color: #c6cdd3; border-bottom: 1px solid #1d2127; vertical-align: top; white-space: nowrap; }
.admin-table-scroll tr:hover td { background: #14181d; }
.admin-table-scroll small { display: block; margin-top: 4px; color: #66717c; font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; }
.admin-source, .admin-status { display: inline-block; padding: 5px 7px; border-radius: 4px; font-size: 10px; font-weight: 700; }
.admin-source.synthetic { color: #b8d6ff; background: #142538; }
.admin-source.real { color: #c6f1dc; background: #14271f; }
.admin-status.ok { color: #c6f1dc; background: #14271f; }.admin-status.bad { color: #ffaaa6; background: #2a1718; }.admin-status.neutral { color: #c4cbd2; background: #22272e; }
.admin-delete-button { color: #ffaaa6; background: transparent; border: 1px solid #713f40; min-height: 28px; font-size: 11px; }
.admin-empty { text-align: center; padding: 55px !important; color: #75808a !important; }
.admin-record-details summary { color: #b4e9d2; cursor: pointer; font-weight: 700; }.admin-record-details pre { max-width: 420px; max-height: 260px; overflow: auto; margin: 8px 0 0; padding: 10px; color: #b9c4cc; background: #0b0d10; border: 1px solid #252a31; border-radius: 6px; white-space: pre-wrap; font: 10px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.admin-modal-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; background: rgba(0,0,0,.72); font-family: var(--font-body); }
.admin-confirm-modal { width: min(100%, 440px); padding: 26px; background: #15181d; border: 1px solid #3d444c; border-radius: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.admin-confirm-modal h2 { margin: 6px 0 12px; font-size: 24px; letter-spacing: -.04em; }.admin-confirm-modal p { color: #adb5bd; line-height: 1.55; }
.admin-modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }.admin-danger-button { color: #fff; background: #a74747; }
@media (max-width: 800px) { .admin-header, .admin-toolbar { align-items: flex-start; flex-direction: column; }.admin-summary-grid { grid-template-columns: repeat(2, 1fr); }.admin-summary-grid div:nth-child(2) { border-right: 0; }.admin-summary-grid div:nth-child(-n+2) { border-bottom: 1px solid #252a31; }.admin-upload { width: 100%; }.admin-file-button { flex: 1; } }

/* ==========================================================================
   Topbar Right Actions - Barış Design (Pure Dark Slate & Fibonacci 34px)
   ========================================================================== */
.topbar-right {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

.topbar-right .lang-toggle-container {
  display: inline-flex !important;
  align-items: center !important;
}

.topbar-right .lang-toggle-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  padding: 0 13px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  background: #090b10 !important;
  color: #ffffff !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  outline: none !important;
  box-shadow: none !important;
  transition: all 0.1s ease !important;
}

.topbar-right .lang-toggle-btn:hover,
.topbar-right .lang-toggle-container.is-open .lang-toggle-btn {
  background: #131722 !important;
  border-color: rgba(255, 255, 255, 0.24) !important;
  color: #ffffff !important;
}

.topbar-right .chat-launch-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  padding: 0 16px !important;
  border-radius: 13px !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  background: linear-gradient(180deg, #2b3952 0%, #172131 100%) !important;
  color: #ffffff !important;
  font-size: 0.84rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.topbar-right .chat-launch-link:hover {
  background: linear-gradient(180deg, #354766 0%, #1e2a3e 100%) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  transform: translateY(-1px) !important;
}

.topbar-right .chat-launch-link:active {
  transform: translateY(1px) scale(0.98) !important;
}

.topbar-right .user-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  padding: 0 13px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  background: #090b10 !important;
  box-sizing: border-box !important;
}

.topbar-right .user-badge-email {
  font-size: 0.85rem !important;
  color: #e2e8f0 !important;
  font-weight: 500 !important;
}

.topbar-right .user-badge-logout {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  color: #8a94a6 !important;
  font-size: 0.82rem !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  text-decoration: none !important;
  transition: color 0.1s ease !important;
}

.topbar-right .user-badge-logout:hover {
  color: #ffffff !important;
}

.topbar-right .settings-icon-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  padding: 0 !important;
  border-radius: 8px !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  background: #090b10 !important;
  color: #e2e8f0 !important;
  cursor: pointer !important;
  box-shadow: none !important;
  transition: all 0.1s ease !important;
}

.topbar-right .settings-icon-btn:hover,
.topbar-right .settings-icon-btn[aria-expanded="true"] {
  background: #131722 !important;
  border-color: rgba(255, 255, 255, 0.24) !important;
  color: #ffffff !important;
}

.topbar-right .settings-icon-btn svg {
  width: 16px !important;
  height: 16px !important;
}

/* Language Toggle UI */
.lang-toggle-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  z-index: 1000;
}

.lang-toggle-container.is-open {
  z-index: 100000;
}

.lang-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px !important;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  background: rgba(255, 255, 255, 0.05);
  color: var(--text, #e2e8f0);
  font-family: var(--font-body, inherit);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  line-height: 1;
  white-space: nowrap;
}

.lang-toggle-btn:hover,
.lang-toggle-btn:focus-visible,
.lang-toggle-container.is-open .lang-toggle-btn {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent-bright, rgba(255, 255, 255, 0.2));
  color: var(--text-white, #ffffff);
}

.lang-toggle-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke: currentColor;
}

.lang-code-text {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted, #8a94a6);
  transition: color 0.15s ease;
}

.lang-toggle-btn:hover .lang-code-text,
.lang-toggle-container.is-open .lang-code-text {
  color: var(--text-white, #ffffff);
}

.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 144px;
  background: var(--bg-darker, #0d1117);
  border: 1px solid var(--panel-border, rgba(255, 255, 255, 0.12));
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: dropdownPop 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Chat sidebar footer positioning: open upwards and to the right */
.chat-sidebar .lang-dropdown-menu {
  top: auto;
  bottom: calc(100% + 8px);
  left: 0;
  right: auto;
}

/* Header & nav stacking contexts to prevent being covered */
header.top,
.top,
.topbar,
.corporate-nav,
.admin-header,
.chat-header,
nav.main-nav {
  position: relative;
  z-index: 1000;
}

.topbar-right,
.admin-header-actions,
.corporate-nav-actions,
.chat-header-actions {
  position: relative;
  z-index: 1001;
}

@keyframes dropdownPop {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: var(--text-muted, #9ca3af);
  font-family: var(--font-body, 'Helvetica Neue', Helvetica, Arial, sans-serif);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.lang-option:hover,
.lang-option:focus-visible {
  background: rgba(99, 102, 241, 0.15);
  color: var(--text, #ffffff);
  outline: none;
}

.lang-option.active {
  background: rgba(99, 102, 241, 0.25);
  color: var(--text-white, #ffffff);
}

.lang-flag {
  font-size: 1rem;
  line-height: 1;
  display: inline-block;
  flex-shrink: 0;
}

.lang-label {
  flex: 1;
  white-space: nowrap;
}

.lang-check {
  color: var(--accent-bright, #34496e);
  font-size: 0.85rem;
  font-weight: 800;
  flex-shrink: 0;
}

/* ==========================================================================
   Topbar Brand & User Profile Group - Barış Design (Pure Dark Slate & Fibonacci)
   ========================================================================== */
.topbar-brand-group {
  display: inline-flex !important;
  align-items: center !important;
  gap: 13px !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 1rem !important;
  background: none !important;
  -webkit-text-fill-color: initial !important;
}

.topbar-brand-link {
  display: inline-flex !important;
  align-items: center !important;
  text-decoration: none !important;
  line-height: 0 !important;
  transition: none !important;
}

.topbar-logo {
  height: 21px !important;
  width: auto !important;
  object-fit: contain !important;
  display: block !important;
}

.topbar-user-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 4px 13px !important;
  border-radius: 21px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  line-height: 1.4 !important;
  transition: none !important;
}

.topbar-user-name {
  color: #ffffff !important;
  font-size: 0.9rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
}

.topbar-user-sep {
  color: #8a94a6 !important;
  opacity: 0.5 !important;
  font-weight: 400 !important;
  user-select: none !important;
}

.topbar-user-meta {
  color: #8a94a6 !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
}

