/* ProPanel Workshop & CRM - Stripe/Linear Minimalist SaaS + Apple macOS Frosted Glass Theme */

:root {
  --bg-main: #f8fafc;
  --bg-canvas: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-card-elevated: #ffffff;
  --bg-sidebar: rgba(255, 255, 255, 0.92);
  --border-color: rgba(226, 232, 240, 0.85);
  --border-subtle: rgba(241, 245, 249, 0.9);
  --border-focus: #087f70;
  --text-main: #0f172a; /* slate-900 */
  --text-secondary: #334155; /* slate-700 */
  --text-muted: #64748b; /* slate-500 */
  --primary-accent: #087f70; /* Electric Indigo */
  --primary-accent-rgb: 79, 70, 229;
  --primary-hover: #066657;
  --primary-gradient: linear-gradient(180deg, #109482 0%, #087f70 100%);
  --primary-gradient-subtle: linear-gradient(135deg, rgba(8, 127, 112, 0.08) 0%, rgba(8, 127, 112, 0.02) 100%);
  --indigo-accent: #087f70;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --purple-color: #8b5cf6;
  --cyan-color: #06b6d4;
  
  /* Apple macOS Frosted Glass Tokens */
  --glass-bg: rgba(255, 255, 255, 0.82);
  --glass-border: rgba(255, 255, 255, 0.65);
  --glass-backdrop: blur(20px) saturate(180%);
  
  /* Stripe & Apple Multi-layer Soft Ambient Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.04), 0 1px 2px -1px rgba(15, 23, 42, 0.02);
  --shadow-md: 0 4px 16px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.02);
  --shadow-lg: 0 12px 32px -4px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.03);
  --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.06);
}

html {
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(at 0% 0%, rgba(8, 127, 112, 0.03) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(8, 127, 112, 0.03) 0px, transparent 50%),
    radial-gradient(at 50% 100%, rgba(241, 245, 249, 0.5) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: 'Inter', 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Apple macOS Smooth Thin Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.6);
}

/* Layout Elements */
#app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* Apple macOS Frosted Glass Sidebar */
.sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1040;
  transition: transform 0.3s ease;
  box-shadow: 1px 0 10px rgba(15, 23, 42, 0.02);
}

.sidebar-header {
  height: 64px;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.4);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text-main);
  text-decoration: none;
  letter-spacing: -0.025em;
}

.sidebar-brand-badge {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #109482 0%, #087f70 60%, #066657 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 800;
  font-size: 1.15rem;
  box-shadow: 0 4px 14px rgba(8, 127, 112, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar-brand img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
}

.sidebar-nav {
  padding: 1rem 0.75rem;
  flex: 1;
  overflow-y: auto;
}

.nav-category {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #94a3b8;
  font-weight: 700;
  padding: 0.85rem 0.75rem 0.35rem;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.58rem 0.85rem;
  color: #475569;
  font-weight: 500;
  font-size: 0.865rem;
  border-radius: 9px;
  margin-bottom: 0.25rem;
  transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  border: 1px solid transparent;
}

.sidebar-nav .nav-link:hover {
  color: var(--text-main);
  background-color: rgba(241, 245, 249, 0.85);
  transform: translateX(2px);
}

.sidebar-nav .nav-link.active {
  color: #087f70;
  background: linear-gradient(135deg, rgba(8, 127, 112, 0.12) 0%, rgba(8, 127, 112, 0.05) 100%);
  border: 1px solid rgba(8, 127, 112, 0.18);
  font-weight: 600;
  box-shadow: 0 2px 6px -1px rgba(8, 127, 112, 0.08);
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--border-color);
  background: rgba(248, 250, 252, 0.7);
  backdrop-filter: blur(10px);
}

/* Main Content Area */
.main-wrapper {
  flex: 1;
  margin-left: 260px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: margin-left 0.3s ease;
}

/* Apple macOS Floating Frosted Topbar */
.topbar {
  height: 64px;
  background-color: var(--glass-bg);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border-bottom: 1px solid var(--border-color);
  padding: 0 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.02);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.page-container {
  padding: 2rem;
  flex: 1;
}

/* Linear & Stripe Style Modern Cards */
.card-custom {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-custom:hover {
  border-color: rgba(8, 127, 112, 0.35);
  box-shadow: var(--shadow-md);
}

/* Metric Widget Cards - Apple / Linear Precision */
.metric-card {
  padding: 1.25rem 1.35rem;
  border-radius: 14px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.metric-card.cursor-pointer:hover, .card-custom.cursor-pointer:hover {
  transform: translateY(-2px);
  border-color: rgba(8, 127, 112, 0.4);
  box-shadow: 0 8px 24px -2px rgba(15, 23, 42, 0.08);
}

.cursor-pointer {
  cursor: pointer !important;
}

.metric-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3.5px;
  height: 100%;
  background: var(--primary-accent);
}

.metric-card-warning::after { background: var(--warning-color); }
.metric-card-info::after { background: var(--indigo-accent); }
.metric-card-success::after { background: var(--success-color); }

.metric-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.metric-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.metric-value {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

/* Status Badges - Apple macOS & Linear Clean Status Chips */
.badge-status, .badge-status-select {
  padding: 0.32rem 0.7rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.badge-status-select {
  padding-right: 1.65rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  box-shadow: none !important;
  background-position: right 0.5rem center;
  background-size: 10px 10px;
}

.badge-status-select:hover {
  filter: brightness(1.08);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
}

.badge-status-select option {
  background-color: #1e293b;
  color: #f8fafc;
  font-weight: 600;
}

.badge-beklemede { background-color: rgba(245, 158, 11, 0.1); color: #d97706; border: 1px solid rgba(245, 158, 11, 0.25); }
.badge-teklif_verildi { background-color: rgba(8, 127, 112, 0.1); color: #087f70; border: 1px solid rgba(8, 127, 112, 0.25); }
.badge-teklif_onaylandi, .badge-onaylandi { background-color: rgba(16, 185, 129, 0.1); color: #059669; border: 1px solid rgba(16, 185, 129, 0.25); }
.badge-teklif_red, .badge-reddedildi { background-color: rgba(239, 68, 68, 0.1); color: #dc2626; border: 1px solid rgba(239, 68, 68, 0.25); }
.badge-revize_talebi, .badge-revize_istendi { background-color: rgba(245, 158, 11, 0.1); color: #d97706; border: 1px solid rgba(245, 158, 11, 0.25); }
.badge-parca_bekliyor { background-color: rgba(139, 92, 246, 0.1); color: #7c3aed; border: 1px solid rgba(139, 92, 246, 0.25); }
.badge-fatura_kesilecek { background-color: rgba(14, 165, 233, 0.1); color: #0284c7; border: 1px solid rgba(14, 165, 233, 0.25); }
.badge-odeme_bekliyor, .badge-odeme_bekleniyor { background-color: rgba(249, 115, 22, 0.1); color: #ea580c; border: 1px solid rgba(249, 115, 22, 0.25); }
.badge-iade_edildi { background-color: rgba(100, 116, 139, 0.1); color: #475569; border: 1px solid rgba(100, 116, 139, 0.25); }
.badge-tamamlandi { background-color: rgba(16, 185, 129, 0.14); color: #047857; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-inceleniyor { background-color: rgba(8, 127, 112, 0.1); color: #109482; border: 1px solid rgba(8, 127, 112, 0.25); }
.badge-onay_bekliyor { background-color: rgba(249, 115, 22, 0.1); color: #ea580c; border: 1px solid rgba(249, 115, 22, 0.25); }
.badge-onarildi { background-color: rgba(16, 185, 129, 0.1); color: #059669; border: 1px solid rgba(16, 185, 129, 0.25); }
.badge-fatura_kesildi { background-color: rgba(14, 165, 233, 0.1); color: #0284c7; border: 1px solid rgba(14, 165, 233, 0.25); }
.badge-teslim_edildi { background-color: rgba(6, 182, 212, 0.1); color: #0891b2; border: 1px solid rgba(6, 182, 212, 0.25); }
.badge-iptal, .badge-silindi { background-color: rgba(239, 68, 68, 0.1); color: #dc2626; border: 1px solid rgba(239, 68, 68, 0.25); }

.btn-outline-orange { color: #ea580c; border-color: rgba(249, 115, 22, 0.4); }
.btn-outline-orange:hover, .btn-outline-orange.active { background-color: #f97316; color: #fff; }
.btn-outline-purple { color: #7c3aed; border-color: rgba(139, 92, 246, 0.4); }
.btn-outline-purple:hover, .btn-outline-purple.active { background-color: #8b5cf6; color: #fff; }
.btn-outline-teal { color: #0d9488; border-color: rgba(20, 184, 166, 0.4); }
.btn-outline-teal:hover, .btn-outline-teal.active { background-color: #14b8a6; color: #fff; }

/* Linear High-Readability Data Tables */
.table-custom {
  color: var(--text-main);
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.table-custom th {
  background-color: #f8fafc;
  color: #64748b;
  font-size: 0.69rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 1rem;
}

.table-custom td {
  border-bottom: 1px solid rgba(226, 232, 240, 0.75);
  padding: 0.95rem 1rem;
  vertical-align: middle;
  font-size: 0.875rem;
}

.table-custom tbody tr {
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.table-custom tbody tr:hover {
  background-color: rgba(241, 245, 249, 0.85);
}

/* Modern Stripe/Linear Buttons */
.btn {
  border-radius: 9px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary {
  background: var(--primary-gradient);
  border: 1px solid #066657;
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #109482 0%, #066657 100%);
  border-color: #055647;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(8, 127, 112, 0.3);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-outline-primary {
  color: #087f70;
  border-color: rgba(8, 127, 112, 0.35);
  background: rgba(8, 127, 112, 0.03);
}

.btn-outline-primary:hover {
  background: #087f70;
  color: #ffffff;
  border-color: #087f70;
  box-shadow: 0 4px 12px rgba(8, 127, 112, 0.25);
  transform: translateY(-1px);
}

.btn-outline-success {
  color: #059669;
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.02);
}

.btn-outline-success:hover {
  background: #10b981;
  color: #ffffff;
  border-color: #10b981;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
  transform: translateY(-1px);
}

.btn-outline-danger {
  color: #dc2626;
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.02);
}

.btn-outline-danger:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
  transform: translateY(-1px);
}

.btn-outline-secondary {
  color: #475569;
  border-color: rgba(203, 213, 225, 0.9);
  background: #ffffff;
}

.btn-outline-secondary:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
  transform: translateY(-1px);
}

/* Sticky Note Cards */
.sticky-note-card {
  border-radius: 14px;
  padding: 1.25rem;
  position: relative;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sticky-note-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.sticky-note-yellow { background-color: #fef9c3; color: #713f12; border: 1px solid #fef08a; }
.sticky-note-blue { background-color: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.sticky-note-green { background-color: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.sticky-note-purple { background-color: #f3e8ff; color: #6b21a8; border: 1px solid #e9d5ff; }
.sticky-note-red { background-color: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.sticky-note-gray { background-color: #f1f5f9; color: #1e293b; border: 1px solid #e2e8f0; }

/* AI Operation Center Card Accent */
.ai-ops-card {
  background: linear-gradient(145deg, rgba(238, 242, 255, 0.7), var(--bg-card));
  border: 1px solid rgba(8, 127, 112, 0.25);
  position: relative;
}

/* Empty state styling */
.empty-state {
  padding: 3.5rem 1.5rem;
  text-align: center;
}

.empty-state-icon {
  font-size: 2.75rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  opacity: 0.6;
}

/* Form Controls - Linear Precision */
.form-control-custom, .form-select-custom {
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  color: var(--text-main);
  border-radius: 9px;
  padding: 0.58rem 0.9rem;
  font-size: 0.875rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control-custom:focus, .form-select-custom:focus {
  background-color: #ffffff;
  border-color: #087f70;
  color: var(--text-main);
  box-shadow: 0 0 0 3px rgba(8, 127, 112, 0.16);
  outline: none;
}

/* Modal Dialogs - Apple macOS Glass Styling */
.modal-content {
  border-radius: 18px;
  border: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.02);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.modal-header {
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  padding: 1.25rem 1.5rem;
  background: rgba(248, 250, 252, 0.5);
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
}

.modal-footer {
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  padding: 1.1rem 1.5rem;
  background: rgba(248, 250, 252, 0.6);
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
}

.text-decoration-underline-hover:hover {
  text-decoration: underline !important;
  cursor: pointer;
}

/* Mobile Responsiveness & Backdrop */
.sidebar-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  pointer-events: none;
}
.sidebar-backdrop.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

@media (max-width: 991.98px) {
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    z-index: 1050 !important;
    width: 275px !important;
    max-width: 85vw !important;
    transform: translateX(-100%);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .sidebar.show {
    transform: translateX(0) !important;
  }
  .main-wrapper {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
  }
}

@media (max-width: 767.98px) {
  .modal-dialog {
    margin: 0.5rem auto !important;
    max-width: calc(100vw - 1rem) !important;
  }
  .modal-content {
    border-radius: 12px;
  }
  .modal-body {
    padding: 1rem 0.75rem !important;
  }
  .modal-footer {
    padding: 0.75rem !important;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .modal-footer > * {
    margin: 0 !important;
    flex: 1 1 auto;
  }
  .ws-page-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.75rem !important;
  }
  .ws-page-header > div:last-child {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .ws-page-header > div:last-child > .btn {
    flex: 1 1 auto;
  }
}

.table-responsive {
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  overflow-x: auto;
}

/* Servis Raporu, Teklif Belgesi ve Cari Mutabakat Print Styles */
@media print {
  @page {
    size: A4 portrait;
    margin: 6mm 8mm 6mm 8mm;
  }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }
  
  body {
    background-color: #ffffff !important;
    color: #000000 !important;
    font-size: 12px !important;
  }
  
  .sidebar, .top-header, .no-print, .modal-header, .modal-footer, .modal-backdrop {
    display: none !important;
  }

  .modal {
    position: static !important;
    display: block !important;
    overflow: visible !important;
    background: transparent !important;
  }

  .modal-dialog {
    max-width: 100% !important;
    margin: 0 !important;
  }

  .modal-content {
    border: none !important;
    box-shadow: none !important;
    background: #ffffff !important;
    color: #000000 !important;
  }

  .modal-body {
    padding: 0 !important;
  }

  #service-report-print-area, #quote-report-print-area, #cari-statement-print-area {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    background-color: #ffffff !important;
    color: #000000 !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .bg-primary {
    background-color: #087f70 !important;
    color: #ffffff !important;
  }

  .bg-light {
    background-color: #f8fafc !important;
  }
}

/* ==========================================================================
   AI OPERATIONS RIGHT-SIDE CHAT DRAWER & FLOATING TRIGGER WIDGET
   ========================================================================== */

/* Floating Trigger Button */
.btn-floating-ai {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1040;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 14px;
  border-radius: 50px;
  background: linear-gradient(135deg, #087f70 0%, #7c3aed 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 10px 25px -5px rgba(8, 127, 112, 0.5), 0 8px 10px -6px rgba(124, 58, 237, 0.4);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-floating-ai:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 14px 30px -5px rgba(8, 127, 112, 0.65), 0 10px 15px -5px rgba(124, 58, 237, 0.5);
  background: linear-gradient(135deg, #066657 0%, #6d28d9 100%);
}

.btn-floating-ai:active {
  transform: translateY(0) scale(0.98);
}

.ai-floating-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.ai-floating-icon {
  width: 22px;
  height: 22px;
  color: #fbbf24;
}

.ai-pulse-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 9px;
  height: 9px;
  background-color: #10b981;
  border: 2px solid #ffffff;
  border-radius: 50%;
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.ai-floating-label {
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: -0.01em;
}

/* Backdrop */
.ai-chat-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(2, 6, 23, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1045;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ai-chat-backdrop.show {
  opacity: 1;
  visibility: visible;
}

/* Right-Side Chat Drawer */
.ai-chat-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 440px;
  max-width: 100vw;
  background-color: var(--bg-card);
  border-left: 1px solid var(--border-color);
  box-shadow: -10px 0 35px -5px rgba(0, 0, 0, 0.5);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  overflow: hidden;
}

.ai-chat-drawer.show {
  transform: translateX(0);
}

/* Drawer Header */
.ai-chat-header {
  padding: 16px 20px;
  background: linear-gradient(180deg, var(--bg-card-hover) 0%, var(--bg-card) 100%);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.ai-avatar-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(8, 127, 112, 0.25) 0%, rgba(124, 58, 237, 0.25) 100%);
  border: 1px solid rgba(8, 127, 112, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-chat-title {
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--text-main);
}

.ai-chat-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.btn-icon-ai {
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--text-muted);
  border: 1px solid transparent;
  background: transparent;
  transition: all 0.15s ease;
}

.btn-icon-ai:hover {
  color: var(--text-main);
  background-color: var(--bg-card-hover);
  border-color: var(--border-color);
}

/* Presets Bar */
.ai-quick-presets-bar {
  padding: 10px 16px;
  background-color: rgba(15, 23, 42, 0.4);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

[data-theme="light"] .ai-quick-presets-bar {
  background-color: #f8fafc;
}

.ai-presets-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.ai-presets-scroll::-webkit-scrollbar {
  display: none;
}

.ai-preset-chip {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  background-color: var(--bg-card-hover);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.ai-preset-chip:hover {
  background-color: var(--primary-accent);
  color: #ffffff;
  border-color: var(--primary-accent);
  transform: translateY(-1px);
}

/* Chat Messages Container */
.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* User Message */
.chat-msg-user {
  align-self: flex-end;
  max-width: 85%;
  background: linear-gradient(135deg, #087f70 0%, #066657 100%);
  color: #ffffff;
  padding: 12px 16px;
  border-radius: 16px 16px 4px 16px;
  font-size: 0.88rem;
  line-height: 1.45;
  box-shadow: 0 4px 12px rgba(8, 127, 112, 0.25);
  word-break: break-word;
}

/* AI Message */
.chat-msg-ai {
  align-self: flex-start;
  max-width: 92%;
  display: flex;
  gap: 10px;
}

.chat-ai-avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #7c3aed 0%, #087f70 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.chat-ai-content {
  background-color: var(--bg-card-hover);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 13px 16px;
  border-radius: 4px 16px 16px 16px;
  font-size: 0.88rem;
  line-height: 1.5;
  box-shadow: var(--shadow-sm);
  word-break: break-word;
}

/* Interactive Action Card Inside Chat */
.ai-action-card {
  margin-top: 10px;
  padding: 14px;
  border-radius: 12px;
  background-color: var(--bg-card);
  border: 1.5px solid #179d88;
  box-shadow: 0 8px 20px -4px rgba(8, 127, 112, 0.2);
}

.ai-action-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.ai-action-type-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  background-color: rgba(8, 127, 112, 0.15);
  color: #65cbb3;
  border: 1px solid rgba(8, 127, 112, 0.3);
}

.ai-confidence-pill {
  font-size: 0.72rem;
  font-weight: 700;
  color: #10b981;
  background-color: rgba(16, 185, 129, 0.12);
  padding: 3px 8px;
  border-radius: 20px;
}

.ai-action-details-box {
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 0.82rem;
}

.ai-action-detail-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.ai-action-detail-row:last-child {
  margin-bottom: 0;
}

.ai-action-btn-confirm {
  width: 100%;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 8px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ai-action-btn-confirm:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
}

.ai-action-confirmed-banner {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  background-color: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #10b981;
  font-weight: 600;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Typing Animation */
.ai-typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
}

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

.ai-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.ai-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes ai-bounce {
  0%, 80%, 100% { transform: scale(0); opacity: 0.3; }
  40% { transform: scale(1); opacity: 1; }
}

/* Drawer Footer & Input */
.ai-chat-footer {
  padding: 14px 18px;
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
}

.ai-input-container {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 6px 8px 6px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ai-input-container:focus-within {
  border-color: #179d88;
  box-shadow: 0 0 0 3px rgba(8, 127, 112, 0.15);
}

.ai-chat-textarea {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 0.88rem;
  line-height: 1.4;
  resize: none;
  outline: none;
  max-height: 120px;
  padding: 4px 0;
}

.ai-chat-textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.ai-chat-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #087f70 0%, #7c3aed 100%);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.ai-chat-send-btn:hover {
  transform: scale(1.05);
}

.ai-chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.ai-shortcut-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ===================================================
   AI TRAINING STUDIO & PROMPT HUB CUSTOM STYLES
   =================================================== */

.ai-studio-tabs {
  display: flex;
  gap: 8px;
  background-color: var(--bg-card);
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  margin-bottom: 24px;
}

.ai-studio-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-studio-tab-btn:hover {
  color: var(--text-main);
  background-color: var(--bg-card-hover);
}

.ai-studio-tab-btn.active {
  background: linear-gradient(135deg, #087f70 0%, #066657 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(8, 127, 112, 0.35);
}

.ai-studio-tab-badge {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.2);
  color: inherit;
  font-weight: 700;
}

.ai-studio-tab-btn:not(.active) .ai-studio-tab-badge {
  background-color: var(--border-color);
  color: var(--text-muted);
}

/* Category Badges with Crystal Clear High Contrast */
.ai-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ai-cat-badge svg {
  width: 14px;
  height: 14px;
}

.ai-cat-teklif {
  background-color: rgba(8, 127, 112, 0.12);
  color: #066657;
  border: 1px solid rgba(8, 127, 112, 0.3);
}
[data-theme="dark"] .ai-cat-teklif {
  color: #93c5fd;
  background-color: rgba(8, 127, 112, 0.2);
}

.ai-cat-servis {
  background-color: rgba(245, 158, 11, 0.14);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
[data-theme="dark"] .ai-cat-servis {
  color: #fde68a;
  background-color: rgba(245, 158, 11, 0.2);
}

.ai-cat-tahsilat {
  background-color: rgba(16, 185, 129, 0.14);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
[data-theme="dark"] .ai-cat-tahsilat {
  color: #6ee7b7;
  background-color: rgba(16, 185, 129, 0.2);
}

.ai-cat-gider {
  background-color: rgba(239, 68, 68, 0.14);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.35);
}
[data-theme="dark"] .ai-cat-gider {
  color: #fca5a5;
  background-color: rgba(239, 68, 68, 0.2);
}

.ai-cat-stok {
  background-color: rgba(139, 92, 246, 0.14);
  color: #6d28d9;
  border: 1px solid rgba(139, 92, 246, 0.35);
}
[data-theme="dark"] .ai-cat-stok {
  color: #c4b5fd;
  background-color: rgba(139, 92, 246, 0.2);
}

.ai-cat-musteri {
  background-color: rgba(6, 182, 212, 0.14);
  color: #0e7490;
  border: 1px solid rgba(6, 182, 212, 0.35);
}
[data-theme="dark"] .ai-cat-musteri {
  color: #67e8f9;
  background-color: rgba(6, 182, 212, 0.2);
}

.ai-cat-fiyatlandirma {
  background-color: rgba(8, 127, 112, 0.14);
  color: #066657;
  border: 1px solid rgba(8, 127, 112, 0.35);
}
[data-theme="dark"] .ai-cat-fiyatlandirma {
  color: #a5b4fc;
  background-color: rgba(8, 127, 112, 0.2);
}

.ai-cat-oncelik {
  background-color: rgba(225, 29, 72, 0.14);
  color: #be123c;
  border: 1px solid rgba(225, 29, 72, 0.35);
}
[data-theme="dark"] .ai-cat-oncelik {
  color: #fda4af;
  background-color: rgba(225, 29, 72, 0.2);
}

.ai-cat-genel {
  background-color: rgba(100, 116, 139, 0.14);
  color: #334155;
  border: 1px solid rgba(100, 116, 139, 0.35);
}
[data-theme="dark"] .ai-cat-genel {
  color: #cbd5e1;
  background-color: rgba(100, 116, 139, 0.2);
}

/* Action Type Badges */
.ai-action-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.ai-action-pill-teklif {
  background-color: rgba(8, 127, 112, 0.12);
  color: #066657;
  border: 1px solid rgba(8, 127, 112, 0.3);
}
[data-theme="dark"] .ai-action-pill-teklif {
  color: #93c5fd;
  background-color: rgba(8, 127, 112, 0.2);
}

.ai-action-pill-servis {
  background-color: rgba(245, 158, 11, 0.12);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
[data-theme="dark"] .ai-action-pill-servis {
  color: #fde68a;
  background-color: rgba(245, 158, 11, 0.2);
}

.ai-action-pill-tahsilat {
  background-color: rgba(16, 185, 129, 0.12);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
[data-theme="dark"] .ai-action-pill-tahsilat {
  color: #6ee7b7;
  background-color: rgba(16, 185, 129, 0.2);
}

.ai-action-pill-gider {
  background-color: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
[data-theme="dark"] .ai-action-pill-gider {
  color: #fca5a5;
  background-color: rgba(239, 68, 68, 0.2);
}

.ai-action-pill-stok, .ai-action-pill-bilgi {
  background-color: rgba(139, 92, 246, 0.12);
  color: #6d28d9;
  border: 1px solid rgba(139, 92, 246, 0.3);
}
[data-theme="dark"] .ai-action-pill-stok, [data-theme="dark"] .ai-action-pill-bilgi {
  color: #c4b5fd;
  background-color: rgba(139, 92, 246, 0.2);
}

.ai-action-pill-musteri {
  background-color: rgba(6, 182, 212, 0.12);
  color: #0e7490;
  border: 1px solid rgba(6, 182, 212, 0.3);
}
[data-theme="dark"] .ai-action-pill-musteri {
  color: #67e8f9;
  background-color: rgba(6, 182, 212, 0.2);
}

.ai-action-pill-not {
  background-color: rgba(236, 72, 153, 0.12);
  color: #be185d;
  border: 1px solid rgba(236, 72, 153, 0.3);
}
[data-theme="dark"] .ai-action-pill-not {
  color: #f472b6;
  background-color: rgba(236, 72, 153, 0.2);
}

/* Pattern Code Box */
.ai-pattern-box {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  color: #066657;
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.45;
  word-break: break-word;
}
[data-theme="dark"] .ai-pattern-box {
  color: #38bdf8;
  background-color: rgba(15, 23, 42, 0.6);
}

/* Filter Chips */
.ai-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.ai-filter-btn:hover {
  color: var(--text-main);
  background-color: var(--bg-card-hover);
  border-color: var(--primary-accent);
}

.ai-filter-btn.active {
  background-color: var(--primary-accent);
  color: #ffffff;
  border-color: var(--primary-accent);
  box-shadow: 0 2px 8px rgba(8, 127, 112, 0.3);
}

/* Rule Card Container */
.ai-rule-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 22px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: all 0.22s ease;
}

.ai-rule-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  border-color: rgba(8, 127, 112, 0.4);
}

.ai-rule-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.ai-rule-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
  line-height: 1.35;
}

.ai-rule-instruction-box {
  background-color: var(--bg-main);
  border-left: 3px solid #087f70;
  border-radius: 0 8px 8px 0;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-main);
  border-top: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.ai-rule-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}

/* ==========================================
   🏷️ HIGH CONTRAST TAG STYLES (Bootstrap Bypass)
   ========================================== */
.tag-custom {
  display: inline-block;
  padding: 0.35em 0.65em;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 6px;
}

.tag-custom-primary {
  background-color: rgba(8, 127, 112, 0.12) !important;
  color: #087f70 !important;
  border: 1px solid rgba(8, 127, 112, 0.25) !important;
}
[data-theme="dark"] .tag-custom-primary {
  background-color: rgba(8, 127, 112, 0.2) !important;
  color: #93c5fd !important;
  border: 1px solid rgba(8, 127, 112, 0.3) !important;
}

.tag-custom-secondary {
  background-color: rgba(100, 116, 139, 0.12) !important;
  color: #64748b !important;
  border: 1px solid rgba(100, 116, 139, 0.25) !important;
}
[data-theme="dark"] .tag-custom-secondary {
  background-color: rgba(148, 163, 184, 0.2) !important;
  color: #cbd5e1 !important;
  border: 1px solid rgba(148, 163, 184, 0.3) !important;
}

.tag-custom-success {
  background-color: rgba(16, 185, 129, 0.12) !important;
  color: #10b981 !important;
  border: 1px solid rgba(16, 185, 129, 0.25) !important;
}
[data-theme="dark"] .tag-custom-success {
  background-color: rgba(16, 185, 129, 0.2) !important;
  color: #34d399 !important;
  border: 1px solid rgba(16, 185, 129, 0.3) !important;
}

.tag-custom-danger {
  background-color: rgba(239, 68, 68, 0.12) !important;
  color: #ef4444 !important;
  border: 1px solid rgba(239, 68, 68, 0.25) !important;
}
[data-theme="dark"] .tag-custom-danger {
  background-color: rgba(239, 68, 68, 0.2) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
}

.tag-custom-dark {
  background-color: rgba(15, 23, 42, 0.12) !important;
  color: #0f172a !important;
  border: 1px solid rgba(15, 23, 42, 0.25) !important;
}
[data-theme="dark"] .tag-custom-dark {
  background-color: rgba(241, 245, 249, 0.2) !important;
  color: #f1f5f9 !important;
  border: 1px solid rgba(241, 245, 249, 0.3) !important;
}

/* ==========================================
   🖨️ PRINT & PDF EXPORT STYLING (High Polish)
   ========================================== */
@media print {
  /* Hide all dashboard layout elements */
  #sidebar,
  .sidebar,
  .topbar,
  #app-wrapper > aside,
  #app-wrapper > div.main-wrapper > header,
  .no-print,
  .btn,
  .modal-header,
  .modal-footer,
  .modal-backdrop,
  #ai-chat-drawer,
  #ai-chat-trigger-btn {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
  }

  /* When printing a modal, completely hide background content table so only report is printed */
  body.modal-open #main-content,
  body.modal-open .page-container,
  body.modal-open #sidebar,
  body.modal-open .topbar,
  body.modal-open .sidebar,
  body:has(.modal.show) #main-content,
  body:has(.modal.show) .page-container {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
  }

  /* Reset main layouts to fit paper */
  body, html {
    background-color: #ffffff !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: auto !important;
    font-size: 12pt !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Reset workspace margin to 0 for print compatibility */
  .main-wrapper, 
  #app-wrapper {
    margin-left: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
    width: 100% !important;
  }

  /* Force modal container to occupy the full page cleanly */
  .modal {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    width: 100% !important;
  }

  .modal-dialog {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .modal-content {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
  }

  /* Style print containers specifically */
  #service-report-print-area,
  #quote-report-print-area,
  #cari-statement-print-area {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 10px !important;
    border: none !important;
    box-shadow: none !important;
    background: #ffffff !important;
    color: #000000 !important;
  }

  /* Prevent page breaks and force single page scaling */
  #service-report-print-area tr,
  #service-report-print-area p,
  #service-report-print-area div,
  #quote-report-print-area tr,
  #quote-report-print-area p,
  #quote-report-print-area div,
  #cari-statement-print-area tr,
  #cari-statement-print-area p,
  #cari-statement-print-area div {
    page-break-inside: avoid !important;
  }

  #service-report-print-area .p-3,
  #quote-report-print-area .p-3,
  #cari-statement-print-area .p-3 {
    padding: 8px 12px !important;
  }

  #service-report-print-area .mb-3,
  #quote-report-print-area .mb-3,
  #service-report-print-area .mb-4,
  #quote-report-print-area .mb-4 {
    margin-bottom: 8px !important;
  }

  #service-report-print-area table td,
  #service-report-print-area table th,
  #quote-report-print-area table td,
  #quote-report-print-area table th {
    padding: 5px 8px !important;
  }

  /* Ensure card backgrounds and borders render nicely on white paper */
  .bg-light {
    background-color: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
  }

  .border {
    border: 1px solid #e2e8f0 !important;
  }

  /* Keep badge text colored properly */
  .badge {
    color: #ffffff !important;
    background-color: #1e3a8a !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

/* ========================================================
   SECURE AUTH & BOT PROTECTION LOGIN SCREEN
   ======================================================== */
.login-screen-wrapper {
  min-height: 100vh;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 20%, rgba(8, 127, 112, 0.15), transparent 45%),
              radial-gradient(circle at 80% 80%, rgba(8, 127, 112, 0.12), transparent 40%),
              var(--bg-main);
  padding: 1.5rem;
  position: fixed;
  inset: 0;
  z-index: 99999;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.25rem;
  padding: 2.25rem 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6),
              0 0 0 1px rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

[data-theme="light"] .login-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.08);
}

.login-brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #087f70, #087f70);
  color: #fff;
  font-size: 1.5rem;
  box-shadow: 0 8px 16px -4px rgba(8, 127, 112, 0.4);
  margin-bottom: 1rem;
}

.login-captcha-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px dashed rgba(8, 127, 112, 0.4);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
}

[data-theme="light"] .login-captcha-box {
  background: #f1f5f9;
  border: 1px dashed #cbd5e1;
}

.captcha-question-pill {
  font-family: 'JetBrains Mono', monospace, ui-monospace, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #179d88, #109482);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  padding: 0.25rem 0.5rem;
}

.login-sec-badge {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

/* ==========================================================================
   PUBLIC CUSTOMER PORTAL ENHANCEMENTS & CENTERING
   ========================================================================== */
body.portal-mode {
  background-color: var(--bg-main) !important;
}

body.portal-mode #sidebar {
  display: none !important;
}

body.portal-mode .topbar {
  display: none !important;
}

body.portal-mode #btn-floating-ai,
body.portal-mode #ai-chat-backdrop,
body.portal-mode #ai-chat-drawer {
  display: none !important;
}

body.portal-mode .main-wrapper {
  margin-left: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.portal-mode .page-container {
  padding: 1.5rem 1.25rem 4rem 1.25rem !important;
  max-width: 960px !important;
  margin: 0 auto !important;
  width: 100% !important;
}

/* Modern Customer Portal Navbar */
.portal-navbar {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 0.85rem 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(10px);
}

.portal-tab-pill {
  transition: all 0.2s ease;
  font-size: 0.92rem;
  border-radius: 12px !important;
}

.portal-tab-pill.active {
  background: linear-gradient(135deg, #087f70, #066657) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(8, 127, 112, 0.3) !important;
}

.portal-search-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.portal-helper-badge {
  background: rgba(8, 127, 112, 0.08);
  border: 1px solid rgba(8, 127, 112, 0.2);
  color: var(--primary-accent);
  border-radius: 20px;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* Workflow & Pipeline Quick Actions */
.pipeline-stepper-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

.pipeline-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  margin-bottom: 0.85rem;
  overflow-x: auto;
  padding-bottom: 4px;
}

.pipeline-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 75px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.pipeline-step-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-card-hover);
  border: 2px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  transition: all 0.2s ease;
}

.pipeline-step-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.pipeline-step-item.active .pipeline-step-circle {
  background: var(--primary-accent);
  border-color: var(--primary-accent);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(8, 127, 112, 0.45);
  transform: scale(1.1);
}

.pipeline-step-item.active .pipeline-step-label {
  color: var(--primary-accent);
  font-weight: 700;
}

.pipeline-step-item.passed .pipeline-step-circle {
  background: #10b981;
  border-color: #10b981;
  color: #ffffff;
}

.pipeline-step-item.passed .pipeline-step-label {
  color: #10b981;
}

.pipeline-step-item:hover .pipeline-step-circle {
  transform: scale(1.15);
}

.btn-outline-purple {
  color: #a855f7;
  border-color: #a855f7;
}
.btn-outline-purple:hover {
  background-color: #a855f7;
  color: #ffffff;
}

.btn-outline-teal {
  color: #14b8a6;
  border-color: #14b8a6;
}
.btn-outline-teal:hover {
  background-color: #14b8a6;
  color: #ffffff;
}

.btn-teal {
  background-color: #0d9488;
  color: #ffffff;
}
.btn-teal:hover {
  background-color: #0f766e;
  color: #ffffff;
}

.btn-outline-orange {
  color: #f97316;
  border-color: #f97316;
}
.btn-outline-orange:hover {
  background-color: #f97316;
  color: #ffffff;
}

.badge-parca_bekliyor {
  background-color: rgba(168, 85, 247, 0.15) !important;
  color: #a855f7 !important;
  border: 1px solid rgba(168, 85, 247, 0.3) !important;
}

.badge-fatura_kesilecek {
  background-color: rgba(20, 184, 166, 0.15) !important;
  color: #14b8a6 !important;
  border: 1px solid rgba(20, 184, 166, 0.3) !important;
}

.text-teal {
  color: #0d9488 !important;
}

.border-teal {
  border-color: #0d9488 !important;
}

.bg-teal-subtle {
  background-color: rgba(13, 148, 136, 0.12) !important;
  color: #0d9488 !important;
}

.badge-invoice-issued {
  background-color: rgba(16, 185, 129, 0.15) !important;
  color: #059669 !important;
  border: 1px solid rgba(16, 185, 129, 0.3) !important;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-invoice-canceled {
  background-color: rgba(239, 68, 68, 0.15) !important;
  color: #dc2626 !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   PORTAL PURE LIGHT THEME ENFORCEMENT (#portal)
   ========================================================================== */
html[data-theme="dark"] body.portal-mode,
body.portal-mode {
  --bg-main: #f8fafc !important;
  --bg-card: #ffffff !important;
  --bg-card-hover: #f1f5f9 !important;
  --bg-sidebar: #ffffff !important;
  --border-color: #e2e8f0 !important;
  --border-focus: #087f70 !important;
  --text-main: #0f172a !important;
  --text-muted: #64748b !important;
  background-color: #f8fafc !important;
  color: #0f172a !important;
}

body.portal-mode #app-wrapper,
body.portal-mode .main-wrapper,
body.portal-mode .main-content {
  background-color: #f8fafc !important;
  color: #0f172a !important;
}

body.portal-mode .card-custom,
body.portal-mode .portal-navbar,
body.portal-mode .portal-search-card,
body.portal-mode .table,
body.portal-mode .modal-content,
body.portal-mode .form-control,
body.portal-mode .form-select {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
}

body.portal-mode .text-dark,
body.portal-mode h1,
body.portal-mode h2,
body.portal-mode h3,
body.portal-mode h4,
body.portal-mode h5,
body.portal-mode h6 {
  color: #0f172a !important;
}

body.portal-mode .text-muted,
body.portal-mode .text-secondary {
  color: #64748b !important;
}

body.portal-mode .table-light,
body.portal-mode thead th {
  background-color: #f1f5f9 !important;
  color: #1e293b !important;
  border-color: #e2e8f0 !important;
}

body.portal-mode .table td {
  border-color: #f1f5f9 !important;
}

body.portal-mode .bg-light {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

/* Customer Searchable Autocomplete Combobox */
.cust-search-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1075;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  max-height: 240px;
  overflow-y: auto;
}

.cust-search-item {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s ease;
  color: #0f172a;
}

.cust-search-item:last-child {
  border-bottom: none;
}

.cust-search-item:hover,
.cust-search-item.active {
  background-color: #f1f5f9;
}

/* ========================================================
   MOBILE BOTTOM NAVIGATION & ON-SITE QUICK INTAKE STYLES
   ======================================================== */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 68px;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 1045;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
  padding: 0 4px;
}

[data-theme="light"] .mobile-bottom-nav {
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 12px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex: 1;
  max-width: 72px;
}

.mobile-nav-item i {
  width: 20px;
  height: 20px;
  margin-bottom: 3px;
  transition: transform 0.2s ease;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
  color: #179d88;
}

.mobile-nav-item.active i {
  transform: translateY(-2px);
  color: #179d88;
}

/* Center Standout Quick Intake Action Button (FAB) */
.mobile-nav-fab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
  margin-top: -22px;
  cursor: pointer;
  z-index: 1050;
  flex: 1;
  max-width: 76px;
}

.mobile-nav-fab .fab-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #087f70, #7c3aed);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px -2px rgba(8, 127, 112, 0.65), 0 0 0 4px var(--bg-main, #0f172a);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="light"] .mobile-nav-fab .fab-icon-wrap {
  box-shadow: 0 8px 20px -2px rgba(8, 127, 112, 0.45), 0 0 0 4px #ffffff;
}

.mobile-nav-fab:hover .fab-icon-wrap,
.mobile-nav-fab:active .fab-icon-wrap {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 12px 25px -2px rgba(8, 127, 112, 0.8), 0 0 0 4px var(--bg-main, #0f172a);
}

.mobile-nav-fab span {
  font-size: 11px;
  font-weight: 700;
  color: #179d88;
  margin-top: 3px;
  letter-spacing: -0.2px;
}

/* Quick Issue / Arıza Chips */
.quick-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(148, 163, 184, 0.08);
  color: var(--text-main, #0f172a);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.quick-chip:hover {
  border-color: #179d88;
  background: rgba(8, 127, 112, 0.15);
  color: #179d88;
}

.quick-chip.selected {
  background: #179d88 !important;
  border-color: #087f70 !important;
  color: #ffffff !important;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(8, 127, 112, 0.35);
}

/* Photo Capture Preview Gallery */
.photo-preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.photo-preview-item {
  position: relative;
  width: 78px;
  height: 78px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid #179d88;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.photo-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-preview-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 22px;
  height: 22px;
  background: rgba(220, 38, 38, 0.9);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
}

/* Barcode / QR Scanner Live Camera Box */
#mobile-scanner-view {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  border: 2px dashed #179d88;
  background: #000000;
  position: relative;
}

#mobile-scanner-view video {
  border-radius: 12px;
  width: 100% !important;
  object-fit: cover;
}

/* Mobile Responsive Adjustments */
@media (max-width: 991.98px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
  }
  #app-wrapper, .main-wrapper, #main-content, .page-container {
    max-width: 100vw !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
  .topbar {
    padding: 0 0.85rem !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }
  .card, .card-custom {
    max-width: 100% !important;
  }
  .table-responsive {
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
}

@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    position: relative;
  }
  #app-wrapper, .main-wrapper, #main-content {
    max-width: 100vw !important;
    width: 100% !important;
    overflow-x: hidden !important;
  }
  #main-content {
    padding-bottom: 85px !important;
  }
  .page-container {
    padding: 0.75rem 0.5rem !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }
  .topbar {
    padding: 0 0.75rem !important;
  }
  .topbar-right {
    gap: 0.4rem !important;
  }
  .btn-floating-ai {
    bottom: 85px !important;
    right: 16px !important;
    padding: 8px 14px !important;
  }
  input, select, textarea {
    font-size: 16px !important; /* Prevents auto-zoom on iOS */
  }
  .modal-dialog {
    margin: 8px auto !important;
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
  }
  .modal-content {
    border-radius: 16px !important;
    max-width: 100% !important;
  }
  .modal-body {
    padding: 14px 10px !important;
  }
  .modal-header, .modal-footer {
    padding: 10px 12px !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
  .ws-page-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
  }
  .ws-page-header > div:last-child {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
  .card-header, .d-flex.justify-content-between {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  .dashboard-heading h3 {
    font-size: 22px !important;
  }
  .dashboard-shortcuts a {
    flex: 1 1 calc(50% - 6px) !important;
    justify-content: center !important;
    font-size: 11px !important;
    padding: 8px 6px !important;
  }
  .table-responsive {
    border-radius: 8px !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .row {
    margin-left: -4px !important;
    margin-right: -4px !important;
  }
  .row > * {
    padding-left: 4px !important;
    padding-right: 4px !important;
  }
}

/* Inventory Table Enhancements */
.inventory-row-hover {
  cursor: pointer;
  transition: background-color 0.15s ease-in-out;
}
.inventory-row-hover:hover {
  background-color: rgba(8, 127, 112, 0.04) !important;
}

/* ================= OPERASYON & İŞ TAKVİMİ STYLES ================= */
.kanban-board-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 16px;
  min-height: 620px;
}
.kanban-col {
  flex: 0 0 310px;
  max-width: 310px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}
.kanban-col-header {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  background: #ffffff;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}
.kanban-cards-wrap {
  padding: 10px;
  flex: 1;
  overflow-y: auto;
  max-height: 680px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.kanban-card {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  position: relative;
}
.kanban-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}
.kanban-card.is-delayed {
  border-left: 4px solid #ef4444 !important;
  background: #fffdfd;
}
.kanban-card.is-task {
  border-left: 4px solid #087f70 !important;
}

/* Calendar Month Grid */
.cal-grid-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: #f1f5f9;
  border-radius: 10px 10px 0 0;
  border: 1px solid #e2e8f0;
  text-align: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: #475569;
  padding: 8px 0;
}
.cal-month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-left: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
  border-radius: 0 0 10px 10px;
  overflow: hidden;
}
.cal-day-cell {
  min-height: 105px;
  border-right: 1px solid #e2e8f0;
  border-top: 1px solid #e2e8f0;
  padding: 6px;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  transition: background-color 0.12s ease;
  cursor: pointer;
}
.cal-day-cell:hover {
  background: #f8fafc;
}
.cal-day-cell.other-month {
  background: #fafafa;
  opacity: 0.45;
}
.cal-day-cell.today-cell {
  background: rgba(8, 127, 112, 0.03);
  box-shadow: inset 0 0 0 2px rgba(8, 127, 112, 0.4);
}
.cal-day-num {
  font-size: 0.8rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cal-pill {
  font-size: 0.7rem;
  line-height: 1.25;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 3px;
}
.cal-pill-purple { background: #f3e8ff; color: #7e22ce; border: 1px solid #d8b4fe; }
.cal-pill-teal { background: #ccfbf1; color: #0f766e; border: 1px solid #99f6e4; }
.cal-pill-orange { background: #ffedd5; color: #c2410c; border: 1px solid #fed7aa; }
.cal-pill-blue { background: #e0e7ff; color: #066657; border: 1px solid #c7d2fe; }
.cal-pill-green { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.cal-pill-red { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }

/* Agenda Delay Alert Card */
.delay-alert-card {
  background: #fff;
  border: 1px solid #fecaca;
  border-left: 5px solid #ef4444;
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.06);
  transition: all 0.15s ease;
}
.delay-alert-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1);
}

/* Mobile Optimized Quick Intake & Touch UX */
@media (max-width: 768px) {
  .quick-intake-mobile input,
  .quick-intake-mobile textarea,
  .quick-intake-mobile select {
    font-size: 16px !important; /* Prevents auto-zoom in iOS Safari */
    border-radius: 8px;
  }
  .quick-intake-mobile .btn {
    min-height: 42px;
  }
  .quick-intake-mobile .quick-brand-btn {
    min-height: 36px;
    padding: 6px 12px;
  }
  .topbar {
    padding: 0 0.75rem;
    height: 56px;
  }
  .topbar .workspace-label {
    max-width: 130px;
    font-size: 0.72rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* ================= Notification Center Styling ================= */
.notification-center-wrapper {
  position: relative !important;
  display: inline-flex;
  align-items: center;
}

#btn-topbar-notifications {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: #475569;
  border-color: #cbd5e1;
  background-color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

#btn-topbar-notifications:hover {
  background-color: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.notification-dropdown-panel {
  position: absolute !important;
  right: 0 !important;
  top: calc(100% + 8px) !important;
  width: 380px !important;
  max-width: 90vw !important;
  max-height: 520px !important;
  display: flex !important;
  flex-direction: column !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.18), 0 4px 12px rgba(15, 23, 42, 0.06) !important;
  z-index: 9999 !important;
  overflow: hidden !important;
  animation: notifPanelSlide 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.notification-dropdown-panel.d-none {
  display: none !important;
}

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

.notification-header {
  flex-shrink: 0;
  background-color: #f8fafc;
}

.notification-tabs {
  flex-shrink: 0;
  background-color: #ffffff;
}

.notification-items-list {
  flex: 1 1 auto;
  overflow-y: auto;
  max-height: 360px;
}

.notification-footer {
  flex-shrink: 0;
  background-color: #f8fafc;
}

.notification-item {
  transition: background-color 0.15s ease;
  border-left: 3px solid transparent;
  background-color: #ffffff;
}

.notification-item:hover {
  background-color: #f8fafc;
}

.notification-item.border-start-danger {
  border-left-color: #ef4444 !important;
}

.notification-item.border-start-warning {
  border-left-color: #f59e0b !important;
}

.notification-item.border-start-primary {
  border-left-color: var(--primary-color, #087f70) !important;
}

.notif-dismiss-btn {
  opacity: 0.6;
  transition: opacity 0.15s ease;
}

.notif-dismiss-btn:hover {
  opacity: 1;
  color: #ef4444 !important;
}

@media (max-width: 576px) {
  .notification-dropdown-panel {
    position: fixed !important;
    top: 60px !important;
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
    max-width: calc(100vw - 20px) !important;
  }
}


