/* theme-ultra-clean-crm.css */

body.theme-ultra-clean {
  font-family: 'Manrope', sans-serif;
}

/* Visual Header & Layout Styling */
.page-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-title-group h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
}
.page-title-group p {
  margin: 4px 0 0 0;
  font-size: 13.5px;
  color: var(--text-muted);
}

/* View Toggle Switch */
.view-toggle-container {
  display: inline-flex;
  background: #e2e8f0;
  padding: 4px;
  border-radius: 10px;
  gap: 2px;
}
.view-toggle-btn {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}
.view-toggle-btn.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Stats Widget cards */
.crm-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.stat-card-premium {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat-card-premium:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.stat-card-premium .number {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
}
.stat-card-premium .label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.stat-card-premium .color-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--border-color);
}

/* Dynamic stage border colors */
.stage-bar-new {
  background: #3b82f6;
}
.stage-bar-gorusme {
  background: #6366f1;
}
.stage-bar-teklif {
  background: #f59e0b;
}
.stage-bar-contract {
  background: #14b8a6;
}
.stage-bar-won {
  background: #10b981;
}
.stage-bar-lost {
  background: #ef4444;
}

/* Toolbar styles */
.crm-toolbar-premium {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.crm-toolbar-premium .search-wrap {
  flex: 2;
  min-width: 240px;
  position: relative;
}
.crm-toolbar-premium input,
.crm-toolbar-premium select {
  padding: 10px 14px;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  font-size: 13px;
  background: var(--bg-main);
  color: var(--text-main);
  transition: all 0.15s ease;
}
.crm-toolbar-premium input:focus,
.crm-toolbar-premium select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
  outline: none;
}
.crm-toolbar-premium .filter-select {
  flex: 1;
  min-width: 160px;
}
.btn-add-lead-btn {
  background: linear-gradient(135deg, var(--primary), #0d9488);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 11px 20px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: opacity 0.15s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-add-lead-btn:hover {
  opacity: 0.9;
}

/* views containers */
.view-container {
  display: none;
  animation: fadeIn 0.25s ease;
}
.view-container.active {
  display: block;
}

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

/* ─────────────────────────────────────────────
   KANBAN BOARD STYLING
───────────────────────────────────────────── */
.kanban-board-scroll {
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 24px;
  border-radius: 12px;
}
.kanban-board {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 4px;
}
.kanban-column {
  flex: 0 0 300px;
  width: 300px;
  background: #f1f5f9;
  border-radius: 14px;
  padding: 14px;
  border: 1px solid rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  max-height: 75vh;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.kanban-column.drag-over {
  background: #e2e8f0;
  border: 2px dashed var(--primary);
}
.kanban-col-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(0, 0, 0, 0.05);
}
.kanban-col-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.kanban-col-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
}
.kanban-col-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
}
.kanban-col-count {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-muted);
  padding: 2px 7px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
}

.kanban-cards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  flex: 1;
  min-height: 120px;
  padding: 2px;
}

/* Card styling */
.kanban-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  cursor: grab;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  position: relative;
}
.kanban-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.07);
  border-color: #cbd5e1;
}
.kanban-card:active {
  cursor: grabbing;
}
.kanban-card.dragging {
  opacity: 0.4;
}

.kanban-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 8px 0;
  line-height: 1.35;
}
.kanban-card-title a {
  color: inherit;
  text-decoration: none;
}
.kanban-card-title a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.kanban-card-info {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}
.kanban-card-info span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}
.card-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.badge-danger-az {
  background: #e0f2fe;
  color: #0369a1;
}
.badge-danger-orta {
  background: #ffedd5;
  color: #c2410c;
}
.badge-danger-cok {
  background: #fee2e2;
  color: #991b1b;
}

.badge-source {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.kanban-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 8px;
  margin-top: 4px;
}

.assigned-avatar {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-actions-btn {
  background: var(--bg-main);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}
.card-actions-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Empty column styling */
.empty-column-msg {
  font-size: 12px;
  color: #94a3b8;
  text-align: center;
  padding: 24px 10px;
  border: 1px dashed rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  margin-top: 10px;
}

/* ─────────────────────────────────────────────
   LIST VIEW TABLE STYLING
───────────────────────────────────────────── */
.table-container-premium {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}
.table-container-premium table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0;
  box-shadow: none;
  border-radius: 0;
}
.table-container-premium th {
  background: #f8fafc;
  border-bottom: 1.5px solid var(--border-color);
  padding: 12px 16px !important;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #475569;
}
.table-container-premium td {
  padding: 12px 16px !important;
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
  vertical-align: middle !important;
}
.table-container-premium tbody tr:hover td {
  background: #f8fafc;
}

/* Badge classes */
.stage-pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.status-pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.sp-yeni {
  background: #dbeafe;
  color: #1d4ed8;
}
.sp-gorusme {
  background: #e0e7ff;
  color: #4338ca;
}
.sp-teklif {
  background: #fef3c7;
  color: #b45309;
}
.sp-pazarlik {
  background: #fed7aa;
  color: #c2410c;
}
.sp-sozlesme {
  background: #d1fae5;
  color: #065f46;
}
.sp-kazanildi {
  background: #bbf7d0;
  color: #14532d;
}
.sp-kaybedildi {
  background: #fee2e2;
  color: #991b1b;
}
.sp-askida {
  background: #f1f5f9;
  color: #475569;
}
.st-firsat {
  background: #dbeafe;
  color: #1e40af;
}
.st-progress {
  background: #fef3c7;
  color: #92400e;
}
.st-kazanildi {
  background: #dcfce7;
  color: #14532d;
}
.st-kaybedildi {
  background: #fee2e2;
  color: #991b1b;
}
.st-askida {
  background: #f1f5f9;
  color: #475569;
}

/* ─────────────────────────────────────────────
   MODAL WINDOW STYLING
───────────────────────────────────────────── */
.modal-backdrop-premium {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 2000;
  animation: fadeInBg 0.2s ease;
}
.modal-backdrop-premium.open {
  display: flex;
}
@keyframes fadeInBg {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-card-premium {
  background: var(--bg-card);
  border-radius: 16px;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  animation: scaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes scaleIn {
  from {
    transform: scale(0.96);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-header-premium {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
}
.modal-header-premium h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
}
.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s ease;
}
.modal-close-btn:hover {
  color: var(--danger);
}

.modal-body-premium {
  padding: 24px;
}
.modal-grid-premium {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.modal-grid-premium .full-width {
  grid-column: 1 / -1;
}

.form-group-premium label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-group-premium input,
.form-group-premium select,
.form-group-premium textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  font-size: 13px;
  background: var(--bg-main);
  color: var(--text-main);
  font-family: inherit;
  transition: all 0.15s ease;
}
.form-group-premium input:focus,
.form-group-premium select:focus,
.form-group-premium textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
  outline: none;
}

.modal-footer-premium {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: #f8fafc;
}
.btn-secondary-premium {
  background: #e2e8f0;
  color: var(--text-main);
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn-secondary-premium:hover {
  background: #cbd5e1;
}

/* Toast Notification styling */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast-alert {
  background: #1e293b;
  color: white;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideInRight 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}
.toast-alert.success {
  border-left: 4px solid #10b981;
}
.toast-alert.error {
  border-left: 4px solid #ef4444;
}
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
.toast-alert.fade-out {
  animation: fadeOut 0.2s ease forwards;
}
@keyframes fadeOut {
  to {
    transform: translateY(10px);
    opacity: 0;
  }
}

/* CRM Double Stats Grid & Info Banner Styles */
.crm-info-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.crm-info-banner .info-icon {
  font-size: 18px;
  line-height: 1;
}
.crm-info-banner .info-text {
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.5;
}
.crm-info-banner .info-text strong {
  font-weight: 700;
  color: var(--primary);
}
.crm-info-banner .info-text em {
  font-style: normal;
  font-weight: 700;
  color: #ef4444;
}

.crm-double-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
@media (max-width: 1024px) {
  .crm-double-stats-grid {
    grid-template-columns: 1fr;
  }
}
.stats-section-premium {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 16px;
}
.stats-section-premium .section-title {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 800;
  color: #475569;
  letter-spacing: 0.3px;
}
.stats-cards-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
}
