/* ==========================================================================
   ServisFlow Pro - Luxury Dark Matte Glassmorphism Design System
   Exact 1:1 Implementation of the Reference Design (Channel Analytics Style)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  /* Matte Luxury Dark Color Palette */
  --bg-app: #121316;
  --bg-shell: #18191f;
  --bg-sidebar: #131418;
  --bg-card: #20222a;
  --bg-card-subtle: #191a21;
  --bg-row: #1d1f26;
  --bg-row-hover: #262933;
  --bg-sunken: #14151a;

  /* Borders */
  --border-glass: rgba(255, 255, 255, 0.07);
  --border-glass-hover: rgba(255, 255, 255, 0.15);
  --border-focus: #ff6b2c;

  /* Typography */
  --text-primary: #ffffff;
  --text-secondary: #9ea2b0;
  --text-muted: #656976;
  --text-dim: #444754;

  /* Accent Colors */
  --accent-orange: #ff6422;
  --accent-orange-glow: rgba(255, 100, 34, 0.4);
  --accent-mint: #4ade80;
  --accent-mint-glow: rgba(74, 222, 128, 0.35);
  --accent-yellow: #facc15;
  --accent-yellow-glow: rgba(250, 204, 21, 0.35);
  --accent-blue: #38bdf8;
  --accent-pink: #f472b6;

  /* Shadows */
  --shadow-window: 0 35px 80px -20px rgba(0, 0, 0, 0.9), 0 0 1px 1px rgba(255, 255, 255, 0.08) inset;
  --shadow-card: 0 15px 35px -10px rgba(0, 0, 0, 0.5);
  --shadow-orange-glow: 0 10px 30px -5px rgba(255, 100, 34, 0.5);
}

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

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-app);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Dynamic Ambient Warm Radial Glow behind the window */
.ambient-glow-background {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: 
    radial-gradient(circle at 45% 25%, rgba(255, 100, 34, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 75% 15%, rgba(250, 204, 21, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 60%, rgba(74, 222, 128, 0.06) 0%, transparent 45%),
    #121316;
}

/* Master Window Wrapper (The curved luxury OS frame) */
.luxury-app-frame {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
}

@media (min-width: 1024px) {
  .luxury-app-frame {
    margin: 1.5rem auto;
    padding: 0 1.25rem;
    min-height: calc(100vh - 3rem);
  }

  .luxury-window-shell {
    background: var(--bg-shell);
    border-radius: 36px;
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-window);
    overflow: hidden;
    display: flex;
    flex: 1;
    min-height: calc(100vh - 3rem);
  }
}

@media (max-width: 1023px) {
  .luxury-window-shell {
    background: var(--bg-shell);
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 100vh;
  }
}

/* Modern Full Sidebar with Icons and Labels */
.app-sidebar,
.slim-sidebar {
  width: 268px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.25rem 0.85rem;
  flex-shrink: 0;
  z-index: 50;
  transition: width 0.28s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), padding 0.2s ease;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.625rem 0.8rem;
  border-radius: 14px;
  color: var(--text-secondary, #9ea2b0);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
  transition: all 0.2s ease;
  width: 100%;
  border: 1px solid transparent;
  min-width: 0;
}

.sidebar-nav-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-nav-item.active {
  background: #252834;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.sidebar-label {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.sidebar-badge-text {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 2px 7px;
  border-radius: 9999px;
  flex-shrink: 0;
  margin-left: auto;
  line-height: 1.2;
}

.sidebar-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.sidebar-icon-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-icon-btn.active {
  background: #252834;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* Tooltip on hover */
.sidebar-icon-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: #232632;
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.15s ease;
  border: 1px solid var(--border-glass);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  z-index: 100;
}

.sidebar-icon-btn:hover[data-tooltip]::after {
  opacity: 1;
  visibility: visible;
  left: calc(100% + 16px);
}

/* Top Header Bar */
.luxury-header {
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-glass);
}

.luxury-search-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: 9999px;
  padding: 0.55rem 1.15rem 0.55rem 2.4rem;
  font-size: 0.8rem;
  color: #ffffff;
  width: 220px;
  transition: all 0.2s ease;
  outline: none;
}

.luxury-search-pill:focus {
  width: 280px;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Bento Card Style */
.bento-card-dark {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 28px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: visible;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.bento-card-dark:hover {
  border-color: var(--border-glass-hover);
}

/* Hero Card (Row 1 Left) */
.hero-analytics-card {
  border-radius: 28px;
  position: relative;
  overflow: hidden;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.25rem;
  background-color: #21232c;
  background-size: cover;
  background-position: center right;
  border: 1px solid var(--border-glass);
}

.hero-analytics-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(23, 24, 30, 0.95) 0%, rgba(25, 26, 33, 0.8) 45%, rgba(25, 26, 33, 0.3) 100%);
  pointer-events: none;
  z-index: 1;
}

/* The Signature Floating Frosted Glass Overlay Bar */
.floating-metrics-capsule {
  position: relative;
  z-index: 10;
  background: rgba(38, 41, 52, 0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.metric-col-item {
  display: flex;
  flex-direction: column;
  padding: 0.35rem 0.85rem;
}

.metric-col-item .metric-val {
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
  font-family: 'Plus Jakarta Sans', sans-serif;
  letter-spacing: -0.02em;
}

.metric-col-item .metric-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: 0.25rem;
}

/* Warm Glowing Orange Capsule in the bar (The exact $3,6k Sales capsule) */
.glowing-orange-capsule {
  background: linear-gradient(135deg, rgba(255, 100, 34, 0.9) 0%, rgba(249, 115, 22, 0.85) 100%);
  border-radius: 18px;
  padding: 0.55rem 1.25rem;
  box-shadow: 0 8px 24px rgba(255, 100, 34, 0.45);
}

.glowing-orange-capsule .metric-val {
  color: #ffffff !important;
}

.glowing-orange-capsule .metric-label {
  color: rgba(255, 255, 255, 0.9) !important;
}

/* White Pill CTA Button (The "Start Now" button) */
.btn-white-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #ffffff;
  color: #0f1015;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.65rem 1.5rem;
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  border: none;
  cursor: pointer;
}

.btn-white-pill:hover {
  background: #f1f3f9;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(255, 255, 255, 0.2);
}

.btn-white-pill:active {
  transform: translateY(0);
}

/* Dark Pill CTA Button */
.btn-dark-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.65rem 1.35rem;
  border-radius: 9999px;
  text-decoration: none;
  border: 1px solid var(--border-glass);
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-dark-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Arrow Circle Button (The `>` in the floating bar) */
.circle-arrow-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #191a22;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-glass);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.circle-arrow-btn:hover {
  background: #252834;
  transform: scale(1.08);
}

/* Table Row Pill (The exact rounded rows from the reference) */
.luxury-row-pill {
  background: var(--bg-row);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.luxury-row-pill:hover {
  background: var(--bg-row-hover);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

/* Sparklines */
.sparkline-svg {
  display: block;
  overflow: visible;
}

/* Inputs & Form Controls */
.luxury-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 0.75rem 1.15rem;
  font-size: 0.85rem;
  color: #ffffff;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}

.luxury-input:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px rgba(255, 100, 34, 0.15);
}

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

select.luxury-input option {
  background-color: #1a1c24;
  color: #ffffff;
}

/* Quick Chips */
.luxury-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.luxury-chip:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.luxury-chip.active {
  background: var(--accent-orange);
  color: #ffffff;
  border-color: var(--accent-orange);
  box-shadow: 0 4px 14px rgba(255, 100, 34, 0.35);
}

/* Modals */
.modal-backdrop,
.luxury-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 11, 14, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-content-shell,
.luxury-modal-content {
  background: var(--bg-card, #1a1c24);
  border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.12));
  border-radius: 28px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.8);
  max-width: 580px;
  width: 100%;
  overflow: hidden;
  animation: modalIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Pattern Canvas */
#pattern-canvas, #new-pattern-canvas, #edit-pattern-canvas {
  background: #14151b;
  border-radius: 20px;
  border: 1px solid var(--border-glass);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   Light Mode Theme Variables & Component Adaptations
   Seamless luxury clean aesthetic when switched from dark mode
   ========================================================================== */

html.light,
html:not(.dark) {
  --bg-app: #f1f4f9;
  --bg-shell: #ffffff;
  --bg-sidebar: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-subtle: #f8fafc;
  --bg-row: #ffffff;
  --bg-row-hover: #f1f5f9;
  --bg-sunken: #edf2f7;

  --border-glass: rgba(15, 23, 42, 0.08);
  --border-glass-hover: rgba(15, 23, 42, 0.16);
  --border-focus: #ff6422;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-dim: #94a3b8;

  --shadow-window: 0 25px 60px -15px rgba(15, 23, 42, 0.1), 0 0 1px 1px rgba(0, 0, 0, 0.04) inset;
  --shadow-card: 0 8px 24px -4px rgba(15, 23, 42, 0.06);
}

html.light .ambient-glow-background,
html:not(.dark) .ambient-glow-background {
  background: 
    radial-gradient(circle at 45% 25%, rgba(255, 100, 34, 0.07) 0%, transparent 45%),
    radial-gradient(circle at 75% 15%, rgba(250, 204, 21, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 85% 60%, rgba(74, 222, 128, 0.05) 0%, transparent 45%),
    #f1f4f9;
}

html.light .luxury-window-shell,
html:not(.dark) .luxury-window-shell {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: var(--shadow-window);
}

html.light .app-sidebar,
html.light .slim-sidebar,
html:not(.dark) .app-sidebar,
html:not(.dark) .slim-sidebar {
  background: #f8fafc;
  border-right-color: rgba(15, 23, 42, 0.08);
}

html.light .sidebar-nav-item,
html:not(.dark) .sidebar-nav-item {
  color: #64748b;
}

html.light .sidebar-nav-item:hover,
html:not(.dark) .sidebar-nav-item:hover {
  color: #0f172a;
  background: rgba(15, 23, 42, 0.05);
}

html.light .sidebar-nav-item.active,
html:not(.dark) .sidebar-nav-item.active {
  background: #e2e8f0;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

html.light .sidebar-icon-btn,
html:not(.dark) .sidebar-icon-btn {
  color: #64748b;
}

html.light .sidebar-icon-btn:hover,
html:not(.dark) .sidebar-icon-btn:hover {
  color: #0f172a;
  background: rgba(15, 23, 42, 0.05);
}

html.light .sidebar-icon-btn.active,
html:not(.dark) .sidebar-icon-btn.active {
  background: #e2e8f0;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

html.light .sidebar-icon-btn[data-tooltip]::after,
html:not(.dark) .sidebar-icon-btn[data-tooltip]::after {
  background: #1e293b;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

html.light .luxury-header,
html:not(.dark) .luxury-header {
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

html.light .luxury-search-pill,
html:not(.dark) .luxury-search-pill {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.1);
  color: #0f172a;
}

html.light .luxury-search-pill:focus,
html:not(.dark) .luxury-search-pill:focus {
  background: #ffffff;
  border-color: var(--accent-orange);
}

html.light .bento-card-dark,
html:not(.dark) .bento-card-dark {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.05);
}

html.light .luxury-row-pill,
html:not(.dark) .luxury-row-pill {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.08);
}

html.light .luxury-row-pill:hover,
html:not(.dark) .luxury-row-pill:hover {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.15);
  box-shadow: 0 8px 20px -3px rgba(15, 23, 42, 0.06);
}

html.light .luxury-input,
html:not(.dark) .luxury-input {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.12);
  color: #0f172a;
}

html.light .luxury-input:focus,
html:not(.dark) .luxury-input:focus {
  background: #ffffff;
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px rgba(255, 100, 34, 0.15);
}

html.light select.luxury-input option,
html:not(.dark) select.luxury-input option {
  background-color: #ffffff;
  color: #0f172a;
}

html.light .luxury-chip,
html:not(.dark) .luxury-chip {
  background: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.08);
  color: #475569;
}

html.light .luxury-chip:hover,
html:not(.dark) .luxury-chip:hover {
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.18);
  background: #e2e8f0;
}

html.light .luxury-chip.active,
html:not(.dark) .luxury-chip.active {
  background: var(--accent-orange);
  color: #ffffff;
  border-color: var(--accent-orange);
}

html.light .btn-dark-pill,
html:not(.dark) .btn-dark-pill {
  background: #f1f5f9;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.1);
}

html.light .btn-dark-pill:hover,
html:not(.dark) .btn-dark-pill:hover {
  background: #e2e8f0;
}

html.light .circle-arrow-btn,
html:not(.dark) .circle-arrow-btn {
  background: #f1f5f9;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.1);
}

html.light .circle-arrow-btn:hover,
html:not(.dark) .circle-arrow-btn:hover {
  background: #e2e8f0;
}

html.light .floating-metrics-capsule,
html:not(.dark) .floating-metrics-capsule {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
}

html.light .floating-metrics-capsule .metric-col-item:not(.glowing-orange-capsule) .metric-val,
html:not(.dark) .floating-metrics-capsule .metric-col-item:not(.glowing-orange-capsule) .metric-val {
  color: #0f172a;
}

html.light .floating-metrics-capsule .metric-col-item:not(.glowing-orange-capsule) .metric-label,
html:not(.dark) .floating-metrics-capsule .metric-col-item:not(.glowing-orange-capsule) .metric-label {
  color: #64748b;
}

/* Teknisyen notları ve sunken kutular */
html.light .bg-\[\#14151b\],
html.light .bg-\[\#14151a\],
html.light .bg-\[\#121316\],
html.light .bg-\[\#161720\],
html.light .bg-\[\#18191f\],
html.light .bg-\[\#1d1f26\],
html.light .bg-\[\#20222a\],
html:not(.dark) .bg-\[\#14151b\],
html:not(.dark) .bg-\[\#14151a\],
html:not(.dark) .bg-\[\#121316\],
html:not(.dark) .bg-\[\#161720\],
html:not(.dark) .bg-\[\#18191f\],
html:not(.dark) .bg-\[\#1d1f26\],
html:not(.dark) .bg-\[\#20222a\] {
  background-color: #f1f5f9;
  border-color: rgba(15, 23, 42, 0.08);
}

html.light #pattern-canvas,
html.light #new-pattern-canvas,
html.light #edit-pattern-canvas,
html:not(.dark) #pattern-canvas,
html:not(.dark) #new-pattern-canvas,
html:not(.dark) #edit-pattern-canvas {
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.04);
}

html.light #device-drawer,
html:not(.dark) #device-drawer {
  background: rgba(255, 255, 255, 0.98);
  border-left-color: rgba(15, 23, 42, 0.1);
  box-shadow: -10px 0 50px rgba(0, 0, 0, 0.1);
}

html.light #device-drawer > div:first-child,
html:not(.dark) #device-drawer > div:first-child {
  background: #f8fafc;
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

html.light #drawer-overlay,
html:not(.dark) #drawer-overlay {
  background: rgba(15, 23, 42, 0.4);
}

/* ==========================================================================
   Light Mode Overhaul: High-Contrast Typography, Crisp Labels & Turuncu Accents
   ========================================================================== */

/* 1. Başlıklar ve Genel Metinler: Koyu ve Net */
html.light h1,
html.light h2:not(.hero-analytics-card h2),
html.light h3,
html.light h4,
html.light .text-white:not([class*="bg-slate-900"]):not([class*="bg-black"]):not([class*="bg-slate-800"]):not(.bg-\[\#ff6422\]):not([class*="bg-brand"]):not([class*="bg-emerald-600"]):not([class*="bg-indigo-600"]):not([class*="bg-rose-600"]):not(.btn-white-pill):not(.glowing-orange-capsule *):not(.hero-analytics-card h2):not(.hero-analytics-card .text-white):not([class*="!text-white"]) {
  color: #0f172a;
}

/* 2. Siyah ve Koyu Butonlar: DAİMA Saf Beyaz Yazı */
html.light .bg-slate-900,
html.light .bg-slate-900 *,
html.light .bg-black,
html.light .bg-black *,
html.light .bg-slate-800,
html.light .bg-slate-800 *,
html.light [class*="bg-slate-900"],
html.light [class*="bg-slate-900"] *,
html.light [class*="!text-white"] {
  color: #ffffff !important;
}

/* 3. Turuncu Butonlar ve Vurgular: DAİMA Saf Beyaz Yazı */
html.light .bg-\[\#ff6422\],
html.light .bg-\[\#ff6422\] *,
html.light .bg-orange-500,
html.light .bg-orange-600 {
  color: #ffffff !important;
}

/* 4. Form Etiketleri (Labels) & Başlıklar: Asla silik gri değil, Koyu ve Okunaklı */
html.light label,
html.light .text-slate-300,
html.light .text-slate-400:not(.column-count):not(.badge):not(.sparkline-label) {
  color: #0f172a !important;
  font-weight: 700 !important;
}

html.light p.text-slate-400,
html.light span.text-slate-400,
html.light .text-slate-500 {
  color: #475569 !important;
}

/* 5. Girdi Alanları (Inputs & Selects): Beyaz Zemin, Koyu Yazı, Turuncu Odak */
html.light .luxury-input {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
  font-weight: 600;
}

html.light .luxury-input::placeholder {
  color: #94a3b8 !important;
  font-weight: 400;
}

html.light .luxury-input:focus {
  background: #ffffff !important;
  border-color: #ff6422 !important;
  box-shadow: 0 0 0 3px rgba(255, 100, 34, 0.15) !important;
}

/* 6. Hızlı Çipler (Arıza Şikayeti, Emanet Aksesuar): Üzerine gelince Turuncu! */
html.light .quick-chip,
html.light .fault-chip,
html.light .accessory-chip {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
  font-weight: 700 !important;
}

html.light .quick-chip:hover,
html.light .fault-chip:hover,
html.light .accessory-chip:hover {
  background: #ff6422 !important;
  color: #ffffff !important;
  border-color: #ff6422 !important;
  box-shadow: 0 4px 14px rgba(255, 100, 34, 0.3) !important;
}

/* 7. Cihaz Türü Butonları (Telefon, Tablet, Laptop vb.) */
html.light input[name="device_type"] + span {
  background: #f8fafc !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
  font-weight: 700 !important;
}

html.light input[name="device_type"] + span:hover {
  border-color: #ff6422 !important;
  color: #ff6422 !important;
}

html.light input[name="device_type"]:checked + span,
input[name="device_type"]:checked + span {
  background: #ff6422 !important;
  color: #ffffff !important;
  border-color: #ff6422 !important;
  box-shadow: 0 4px 14px rgba(255, 100, 34, 0.35) !important;
}

html.light input[name="device_type"]:checked + span *,
input[name="device_type"]:checked + span * {
  color: #ffffff !important;
}

/* 8. Üst Bar Arama ve Modallar */
html.light #header-search-dropdown {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.15) !important;
}

html.light #header-search-dropdown .search-result-item:hover {
  background: #f1f5f9 !important;
}

html.light .modal-content-shell,
html.light .luxury-modal-content,
html.light #delivery-modal > div,
html.light #new-movement-modal > div,
html.light #categories-modal > div,
html.light #def-modal > div {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 25px 70px rgba(15, 23, 42, 0.25) !important;
}

/* Kasa Kategorileri Yönet Butonu */
.category-manage-btn {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  transition: all 0.2s ease;
}
.category-manage-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}
html.light .category-manage-btn,
html:not(.dark) .category-manage-btn {
  border-color: #cbd5e1 !important;
  background: #f8fafc !important;
  color: #1e293b !important;
}
html.light .category-manage-btn:hover,
html:not(.dark) .category-manage-btn:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
}

/* 9. Teslimat Modalı Ödeme Seçenekleri */
.delivery-payment-card {
  background: #f8fafc !important;
  color: #1e293b !important;
  border: 1px solid #cbd5e1 !important;
  transition: all 0.2s ease;
  cursor: pointer;
}

.delivery-payment-card * {
  color: #1e293b !important;
  transition: all 0.2s ease;
}

.delivery-payment-card:hover {
  background: #f1f5f9 !important;
  border-color: #ff6422 !important;
  color: #0f172a !important;
}

.delivery-payment-card:hover * {
  color: #0f172a !important;
}

html.dark .delivery-payment-card {
  background: #1d1f26 !important;
  color: #cbd5e1 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

html.dark .delivery-payment-card * {
  color: #cbd5e1 !important;
}

html.dark .delivery-payment-card:hover {
  background: #252833 !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
}

html.dark .delivery-payment-card:hover * {
  color: #ffffff !important;
}

/* Seçili (Checked) Durum */
input[name="delivery_payment_method"]:checked + .delivery-payment-card,
html.light input[name="delivery_payment_method"]:checked + .delivery-payment-card,
html.dark input[name="delivery_payment_method"]:checked + .delivery-payment-card {
  background: #ff6422 !important;
  border-color: #ff6422 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(255, 100, 34, 0.35) !important;
}

input[name="delivery_payment_method"]:checked + .delivery-payment-card *,
html.light input[name="delivery_payment_method"]:checked + .delivery-payment-card *,
html.dark input[name="delivery_payment_method"]:checked + .delivery-payment-card * {
  color: #ffffff !important;
}

/* 10. Satır Pilleri (Devices & Movements) & Tablolar */
html.light .luxury-row-pill {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03) !important;
}

html.light .luxury-row-pill:hover {
  background: #f8fafc !important;
  border-color: rgba(255, 100, 34, 0.35) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06) !important;
}

html.light .luxury-row-pill .text-white {
  color: #0f172a !important;
  font-weight: 700 !important;
}

html.light .luxury-row-pill select {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

html.light .bento-card-dark {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

html.light table tbody tr {
  color: #0f172a !important;
}

html.light table thead th {
  color: #475569 !important;
  font-weight: 700 !important;
}

/* ========================================================
   11. Açılır / Kapanır Kenar Çubuğu (Collapsible Sidebar)
   ======================================================== */
.app-sidebar {
  transition: width 0.28s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), padding 0.2s ease !important;
}

/* Daraltılmış Mod (Collapsed - Sadece İkonlar: 76px) */
.app-sidebar.collapsed {
  width: 76px !important;
  padding: 1.25rem 0.5rem !important;
}

.app-sidebar.collapsed .sidebar-full-info,
.app-sidebar.collapsed .sidebar-label,
.app-sidebar.collapsed .sidebar-badge-text {
  display: none !important;
}

.app-sidebar.collapsed .sidebar-nav-item {
  justify-content: center !important;
  padding: 0.65rem 0.5rem !important;
  position: relative;
}

.app-sidebar.collapsed .sidebar-nav-item i {
  margin: 0 !important;
}

.app-sidebar.collapsed .sidebar-dot-badge {
  display: block !important;
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background-color: #ff6422;
  box-shadow: 0 0 8px rgba(255, 100, 34, 0.7);
}

/* Tooltip on collapsed nav items */
.app-sidebar.collapsed .sidebar-nav-item[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: #181920;
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.15s ease;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  z-index: 1000;
}

html.light .app-sidebar.collapsed .sidebar-nav-item[data-tooltip]::after {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.app-sidebar.collapsed .sidebar-nav-item:hover[data-tooltip]::after {
  opacity: 1;
  visibility: visible;
  left: calc(100% + 16px);
}

/* ========================================================
   12. Üst Menü Düzeni (Top Navigation Bar Layout - Executive Mode)
   ======================================================== */
.top-navbar-strip {
  display: none !important;
}

.top-nav-brand {
  display: none;
}

.sidebar-mode-title {
  display: block;
}

.top-nav-page-header {
  display: none;
}

/* Aktif Top Nav Modu */
html.layout-top-nav .top-nav-brand,
.luxury-window-shell.layout-top-nav .top-nav-brand,
.layout-top-nav .top-nav-brand {
  display: flex !important;
}

html.layout-top-nav .sidebar-mode-title,
.luxury-window-shell.layout-top-nav .sidebar-mode-title,
.layout-top-nav .sidebar-mode-title {
  display: none !important;
}

html.layout-top-nav .top-nav-page-header,
.luxury-window-shell.layout-top-nav .top-nav-page-header,
.layout-top-nav .top-nav-page-header {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-glass);
}

/* Şık Cam Şerit - Executive Top Bar */
html.layout-top-nav .top-navbar-strip,
.luxury-window-shell.layout-top-nav .top-navbar-strip,
.layout-top-nav .top-navbar-strip {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.75rem;
  background: rgba(18, 19, 25, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

html.light.layout-top-nav .top-navbar-strip,
html.light .luxury-window-shell.layout-top-nav .top-navbar-strip,
html.light .layout-top-nav .top-navbar-strip {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.05);
}

@media (min-width: 1024px) {
  html.layout-top-nav #app-sidebar,
  .luxury-window-shell.layout-top-nav #app-sidebar,
  .layout-top-nav #app-sidebar {
    display: none !important;
  }
  
  html.layout-top-nav #header-sidebar-toggle,
  .luxury-window-shell.layout-top-nav #header-sidebar-toggle,
  .layout-top-nav #header-sidebar-toggle {
    display: none !important;
  }
}

html.layout-top-nav .luxury-window-shell,
.luxury-window-shell.layout-top-nav {
  flex-direction: column !important;
}

.top-navbar-strip::-webkit-scrollbar {
  display: none;
}

/* Üst Menü Elemanları - Executive Pills */
.top-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.95rem;
  border-radius: 14px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
  flex-shrink: 0;
  position: relative;
}

.top-nav-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

/* Aktif Sekme (Koyu Tema) */
.top-nav-item.active {
  background: linear-gradient(135deg, rgba(255, 100, 34, 0.18) 0%, rgba(32, 35, 46, 0.95) 100%);
  color: #ffffff;
  font-weight: 700;
  border: 1px solid rgba(255, 100, 34, 0.45);
  box-shadow: 0 4px 20px rgba(255, 100, 34, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.top-nav-item.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: #ff6422;
  border-radius: 9999px;
  box-shadow: 0 0 10px #ff6422;
}

/* Aktif Sekme (Aydınlık Tema) */
html.light .top-nav-item {
  color: #475569;
}
html.light .top-nav-item:hover {
  color: #0f172a;
  background: #f1f5f9;
  border-color: #e2e8f0;
}
html.light .top-nav-item.active {
  background: #ffffff;
  color: #0f172a;
  font-weight: 700;
  border: 1px solid rgba(255, 100, 34, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(255, 100, 34, 0.15);
}
html.light .top-nav-item.active::after {
  box-shadow: none;
}

/* ========================================================
   13. Özel Sağ Tık Menüsü (Luxury Custom Context Menu)
   ======================================================== */
.app-context-menu {
  position: fixed;
  z-index: 99999;
  min-width: 250px;
  background: rgba(22, 23, 30, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  padding: 0.5rem;
  display: none;
  opacity: 0;
  transform: scale(0.96) translateY(-6px);
  transform-origin: top left;
  transition: opacity 0.16s cubic-bezier(0.16, 1, 0.3, 1), transform 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.app-context-menu.active {
  display: block;
  opacity: 1;
  transform: scale(1) translateY(0);
}

html.light .app-context-menu {
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.04) inset;
}

.context-menu-header {
  padding: 0.5rem 0.75rem 0.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 0.35rem;
}

html.light .context-menu-header {
  border-bottom-color: rgba(15, 23, 42, 0.06);
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.8rem;
  border-radius: 12px;
  color: #cbd5e1;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  width: 100%;
  text-align: left;
  background: transparent;
}

.context-menu-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.06);
}

html.light .context-menu-item {
  color: #334155;
}

html.light .context-menu-item:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #e2e8f0;
}

.context-menu-separator {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0.35rem 0.5rem;
}

html.light .context-menu-separator {
  background: rgba(15, 23, 42, 0.08);
}

.context-menu-item.disabled {
  opacity: 0.35;
  pointer-events: none;
}

.context-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999999;
  background: rgba(18, 19, 22, 0.95);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.65rem 1.1rem;
  border-radius: 16px;
  font-size: 0.8125rem;
  font-weight: 700;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 100, 34, 0.2);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  backdrop-filter: blur(16px);
  transform: translateY(12px);
  opacity: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.context-toast.active {
  transform: translateY(0);
  opacity: 1;
}

html.light .context-toast {
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.15), 0 0 0 1px rgba(255, 100, 34, 0.2);
}

/* ==========================================================================
   Page Transition %0 - %100 Ultra-Fast Animated Loading System
   ========================================================================== */
#page-transition-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 999999;
  pointer-events: none;
  overflow: visible;
}

#page-transition-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ff6422, #f59e0b, #4ade80);
  box-shadow: 0 0 12px rgba(255, 100, 34, 0.9), 0 0 24px rgba(255, 100, 34, 0.4);
  transition: width 0.18s cubic-bezier(0.1, 0.8, 0.25, 1), opacity 0.25s ease;
  border-radius: 0 4px 4px 0;
}

#page-transition-pill {
  position: fixed;
  top: 14px;
  right: 20px;
  z-index: 999999;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 800;
  background: rgba(18, 19, 22, 0.92);
  color: #ff6422;
  border: 1px solid rgba(255, 100, 34, 0.4);
  border-radius: 999px;
  padding: 3px 9px;
  backdrop-filter: blur(12px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), 0 0 12px rgba(255, 100, 34, 0.2);
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-6px) scale(0.95);
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease, border-color 0.2s ease;
}

#page-transition-pill.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

#page-transition-pill.completed {
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.5);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), 0 0 15px rgba(74, 222, 128, 0.25);
}

html.light #page-transition-pill {
  background: rgba(255, 255, 255, 0.95);
  color: #ea580c;
  border-color: rgba(234, 88, 12, 0.35);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

html.light #page-transition-pill.completed {
  color: #16a34a;
  border-color: rgba(22, 163, 74, 0.4);
}



