/* =========================================================
   DONEZO CRM & DASHBOARD THEME STYLESHEET
   Signature Emerald Palette, Rounded Cards, Full In-Place Editability
   ========================================================= */

/* Page routing utilities */
.hidden { display: none !important; }
.page-section { width: 100%; }

/* 2-Column Grid */
.donezo-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 24px;
}

:root {
  --donezo-bg: #F5F7F9;
  --donezo-card: #FFFFFF;
  --donezo-sidebar: #FFFFFF;
  --donezo-border: #E8ECEF;
  --donezo-border-subtle: #F1F4F7;

  /* Typography Colors */
  --text-dark: #111827;
  --text-sub: #64748B;
  --text-muted: #94A3B8;

  /* Signature Donezo Green Colors */
  --donezo-dark-green: #0F5132;
  --donezo-dark-green-hover: #0A3622;
  --donezo-emerald: #15803D;
  --donezo-mint: #10B981;
  --donezo-mint-soft: #D1FAE5;
  --donezo-mint-text: #065F46;
  --donezo-light-green: #DCFCE7;

  /* Accent Colors */
  --accent-yellow: #F59E0B;
  --accent-yellow-bg: #FEF3C7;
  --accent-yellow-text: #92400E;
  --accent-red: #EF4444;
  --accent-red-bg: #FEE2E2;
  --accent-red-text: #991B1B;
  --accent-blue: #3B82F6;
  --accent-cyan: #06B6D4;
  --accent-orange: #F97316;

  /* Dimensions & Radius */
  --radius-card: 20px;
  --radius-pill: 9999px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.03);
  --shadow-card: 0 4px 16px -2px rgba(17, 24, 39, 0.02), 0 1px 3px rgba(17, 24, 39, 0.02);
  --shadow-card-hover: 0 8px 24px -4px rgba(17, 24, 39, 0.05);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--donezo-bg);
  color: var(--text-dark);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.donezo-layout {
  display: flex;
  min-height: 100vh;
}

/* =========================================================
   SIDEBAR (DONEZO STYLE)
   ========================================================= */
.donezo-sidebar {
  width: 240px;
  background-color: var(--donezo-sidebar);
  border-right: 1px solid var(--donezo-border);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
}

.donezo-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  padding: 0 8px;
}

.brand-logo-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo-icon svg {
  width: 28px;
  height: 28px;
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-dark);
}

.sidebar-scrollable {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.group-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 6px;
}

.group-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.8px;
}

.btn-edit-nav {
  background: none;
  border: none;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.2s;
}

.btn-edit-nav:hover {
  color: var(--donezo-emerald);
  background-color: var(--donezo-mint-soft);
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--text-sub);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  position: relative;
  transition: all 0.2s;
}

.nav-link:hover {
  background-color: var(--donezo-border-subtle);
  color: var(--text-dark);
}

.nav-item.active .nav-link {
  color: var(--text-dark);
  font-weight: 700;
}

.nav-item.active .active-indicator {
  position: absolute;
  left: -16px;
  top: 6px;
  bottom: 6px;
  width: 4px;
  background-color: var(--donezo-dark-green);
  border-radius: 0 4px 4px 0;
}

.nav-svg {
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-svg svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item.active .nav-svg svg {
  stroke: var(--donezo-dark-green);
}

.nav-badge {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}

.dark-badge {
  background-color: var(--text-dark);
  color: #fff;
}

/* Bottom Promo Card: Download Mobile App */
.mobile-promo-card {
  margin-top: 20px;
  background: linear-gradient(145deg, #082816 0%, #03170D 100%);
  border-radius: var(--radius-card);
  padding: 18px 16px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(8, 40, 22, 0.25);
}

.mobile-promo-card::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 90px;
  height: 90px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.3) 0%, transparent 70%);
  border-radius: 50%;
}

.promo-icon {
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.promo-icon svg {
  width: 16px;
  height: 16px;
  stroke: #34D399;
  fill: none;
  stroke-width: 2;
}

.promo-title {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.promo-sub {
  font-size: 0.74rem;
  color: #94A3B8;
  margin-bottom: 14px;
}

.btn-promo-download {
  width: 100%;
  background-color: var(--donezo-dark-green);
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-promo-download:hover {
  background-color: var(--donezo-emerald);
}

/* =========================================================
   MAIN CONTENT AREA
   ========================================================= */
.donezo-main {
  flex: 1;
  padding: 24px 32px 48px;
  overflow-y: auto;
  max-width: 1380px;
  margin: 0 auto;
}

/* Topbar */
.donezo-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 20px;
}

.donezo-search {
  position: relative;
  width: 380px;
}

.donezo-search input {
  width: 100%;
  background: var(--donezo-card);
  border: 1px solid var(--donezo-border);
  padding: 10px 48px 10px 42px;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--text-dark);
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.donezo-search input:focus {
  border-color: var(--donezo-mint);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 2;
}

.search-key-badge {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--donezo-bg);
  border: 1px solid var(--donezo-border);
  padding: 2px 6px;
  border-radius: 6px;
}

.donezo-top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.top-action-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--donezo-card);
  border: 1px solid var(--donezo-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-sub);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.top-action-btn:hover {
  color: var(--text-dark);
  border-color: #CBD5E1;
}

.top-action-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.donezo-user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  transition: background-color 0.2s;
}

.donezo-user-profile:hover {
  background-color: #fff;
}

.donezo-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.user-meta {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-dark);
}

.user-email {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Header Row */
.donezo-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.donezo-page-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-dark);
}

.donezo-page-subtitle {
  font-size: 0.95rem;
  color: var(--text-sub);
  margin-top: 2px;
}

.donezo-header-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-donezo-primary {
  background-color: var(--donezo-dark-green);
  color: #fff;
  border: none;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 81, 50, 0.2);
  transition: all 0.2s;
}

.btn-donezo-primary:hover {
  background-color: var(--donezo-dark-green-hover);
  transform: translateY(-1px);
}

.btn-donezo-outline {
  background-color: #fff;
  color: var(--text-dark);
  border: 1px solid var(--donezo-border);
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.btn-donezo-outline:hover {
  background-color: var(--donezo-bg);
}

.btn-edit-mode-toggle {
  background: var(--donezo-mint-soft);
  color: var(--donezo-mint-text);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-edit-mode-toggle.active {
  background: var(--donezo-dark-green);
  color: #fff;
}

/* =========================================================
   TOP 4 KPI CARDS
   ========================================================= */
.donezo-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.donezo-kpi-card {
  background-color: var(--donezo-card);
  border: 1px solid var(--donezo-border);
  border-radius: var(--radius-card);
  padding: 22px;
  box-shadow: var(--shadow-card);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 155px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.donezo-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

/* Card 1: Dark Green Card */
.donezo-kpi-card.card-dark-green {
  background: linear-gradient(145deg, #0F5132 0%, #0A3622 100%);
  color: #fff;
  border: none;
  box-shadow: 0 8px 20px rgba(15, 81, 50, 0.25);
}

.card-dark-green .kpi-title {
  color: #E2E8F0;
}

.card-dark-green .kpi-number {
  color: #FFFFFF;
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-sub);
}

.circle-arrow-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--donezo-border);
  background: #fff;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.card-dark-green .circle-arrow-btn {
  border: none;
  background: #fff;
  color: var(--donezo-dark-green);
}

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

.kpi-number {
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin: 8px 0;
  color: var(--text-dark);
}

.kpi-subtext-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  width: fit-content;
}

.dark-pill {
  background: rgba(255, 255, 255, 0.15);
  color: #DCFCE7;
}

.light-pill {
  background: var(--donezo-bg);
  border: 1px solid var(--donezo-border);
  color: var(--text-sub);
}

.pill-icon {
  font-size: 0.75rem;
}

.kpi-subtext-plain {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* =========================================================
   GRID 3 COLUMNS (MIDDLE & BOTTOM ROWS)
   ========================================================= */
.donezo-grid-3 {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 18px;
  margin-bottom: 24px;
}

.donezo-card {
  background-color: var(--donezo-card);
  border: 1px solid var(--donezo-border);
  border-radius: var(--radius-card);
  padding: 22px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.card-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-dark);
}

.card-menu-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
}

.btn-pill-sm {
  background: var(--donezo-bg);
  border: 1px solid var(--donezo-border);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-pill-sm:hover {
  background: #E2E8F0;
}

/* --- Project Analytics: Striped Bar Chart --- */
.striped-bar-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 140px;
  padding: 10px 4px 0;
  margin-top: auto;
}

.bar-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  flex: 1;
}

.bar-pill {
  width: 30px;
  border-radius: var(--radius-pill);
  transition: height 0.3s ease;
}

.bar-striped {
  background: repeating-linear-gradient(
    45deg,
    #E2E8F0,
    #E2E8F0 3px,
    #F1F5F9 3px,
    #F1F5F9 6px
  );
}

.bar-solid-dark {
  background-color: var(--donezo-dark-green);
}

.bar-solid-mint {
  background-color: #34D399;
}

.bar-day {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.tooltip-pill {
  position: absolute;
  top: -24px;
  background: #fff;
  border: 1px solid var(--donezo-border);
  color: var(--text-dark);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
}

/* --- Reminders Card --- */
.reminders-card .reminder-body {
  margin-top: auto;
  margin-bottom: auto;
}

.reminder-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
  color: var(--text-dark);
}

.reminder-time {
  font-size: 0.85rem;
  color: var(--text-sub);
  margin-bottom: 18px;
}

.btn-start-meeting {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--donezo-dark-green);
  color: #fff;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(15, 81, 50, 0.2);
  transition: all 0.2s;
}

.btn-start-meeting:hover {
  background-color: var(--donezo-dark-green-hover);
}

.btn-start-meeting svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* --- Quick Project Task List --- */
.task-quick-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-quick-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.task-color-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  flex-shrink: 0;
}

.icon-blue { background: #DBEAFE; color: #1D4ED8; }
.icon-cyan { background: #CFFAFE; color: #0E7490; }
.icon-mint { background: #D1FAE5; color: #047857; }
.icon-yellow { background: #FEF3C7; color: #B45309; }
.icon-orange { background: #FFEDD5; color: #C2410C; }

.task-info {
  display: flex;
  flex-direction: column;
}

.task-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dark);
}

.task-due {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* --- Team Collaboration List --- */
.team-collab-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.team-collab-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.team-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.team-meta {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.team-person {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dark);
}

.team-role {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.status-chip {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.chip-completed { background: var(--donezo-light-green); color: var(--donezo-mint-text); }
.chip-inprogress { background: var(--accent-yellow-bg); color: var(--accent-yellow-text); }
.chip-pending { background: var(--accent-red-bg); color: var(--accent-red-text); }

/* --- Project Progress Gauge --- */
.radial-gauge-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 10px 0;
}

.donezo-gauge-svg {
  width: 170px;
  height: 100px;
}

.gauge-number-center {
  position: absolute;
  top: 35px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gauge-percent {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1;
  color: var(--text-dark);
}

.gauge-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 2px;
}

.gauge-legend-row {
  display: flex;
  justify-content: space-around;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--donezo-border-subtle);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-sub);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-mint { background-color: var(--donezo-mint); }
.dot-darkgreen { background-color: var(--donezo-dark-green); }
.dot-striped {
  background: repeating-linear-gradient(45deg, #94A3B8, #94A3B8 2px, #E2E8F0 2px, #E2E8F0 4px);
}

/* --- Time Tracker Card --- */
.time-tracker-card {
  background: linear-gradient(135deg, #072B19 0%, #03140C 100%);
  color: #fff;
  border: none;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(7, 43, 25, 0.3);
}

.time-tracker-card::after {
  content: '';
  position: absolute;
  bottom: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.25) 0%, transparent 70%);
  border-radius: 50%;
}

.tracker-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #94A3B8;
}

.tracker-timer-display {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
  margin: 16px 0;
  color: #FFFFFF;
}

.tracker-actions {
  display: flex;
  gap: 12px;
  margin-top: auto;
}

.tracker-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  transition: transform 0.2s;
}

.tracker-btn:hover {
  transform: scale(1.1);
}

.btn-pause { background: #fff; color: var(--donezo-dark-green); font-weight: 800; }
.btn-stop { background: var(--accent-red); color: #fff; font-size: 0.75rem; }

/* =========================================================
   BOTTOM LEADS CRM MANAGEMENT SECTION
   ========================================================= */
.leads-management-section {
  margin-top: 10px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 14px;
}

.section-h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-dark);
}

.section-p {
  font-size: 0.85rem;
  color: var(--text-sub);
}

.crm-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-pills-bar {
  display: flex;
  background: var(--donezo-bg);
  padding: 3px;
  border-radius: var(--radius-pill);
  gap: 3px;
}

.crm-filter-pill {
  background: none;
  border: none;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-sub);
  cursor: pointer;
}

.crm-filter-pill.active {
  background: #fff;
  color: var(--text-dark);
  box-shadow: var(--shadow-sm);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.82rem;
}

.table-responsive {
  overflow-x: auto;
}

.donezo-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.donezo-table th {
  padding: 12px 14px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--donezo-border);
}

.donezo-table td {
  padding: 14px;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--donezo-border-subtle);
  vertical-align: middle;
}

.donezo-table tr:hover td {
  background-color: #FBFDFB;
}

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

.status-badge-btn {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: opacity 0.2s;
}

.status-badge-btn:hover {
  opacity: 0.85;
}

.badge-new { background: #E0F2FE; color: #0369A1; }
.badge-contacted { background: #FEF3C7; color: #B45309; }
.badge-qualified { background: #EDE9FE; color: #6D28D9; }
.badge-negotiation { background: #FFEDD5; color: #C2410C; }
.badge-won { background: #DCFCE7; color: #15803D; }
.badge-lost { background: #FEE2E2; color: #B91C1C; }

/* Table Action Buttons */
.crm-actions-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.btn-crm-action {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--donezo-border);
  background: #fff;
  color: var(--text-sub);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn-crm-action:hover {
  color: var(--text-dark);
  border-color: #CBD5E1;
}

.btn-crm-action svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* Calendar event action buttons */
.event-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  opacity: 0;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}

.event-item:hover .event-actions {
  opacity: 1;
}

.btn-event-delete:hover {
  color: #EF4444 !important;
  border-color: #FECACA !important;
  background: #FEF2F2 !important;
}

.btn-event-edit:hover {
  color: var(--donezo-dark-green) !important;
  border-color: #A7F3D0 !important;
  background: #F0FDF4 !important;
}

/* chip-lost style for cancelled events */
.chip-lost {
  background: #FEF2F2;
  color: #EF4444;
}


.btn-wa {
  color: #16A34A;
  background: #F0FDF4;
  border-color: #DCFCE7;
}

/* =========================================================
   IN-PLACE EDITABLE ELEMENTS & EDIT MODE HIGHLIGHTS
   ========================================================= */
.editable {
  outline: none;
  border-radius: 4px;
  transition: all 0.2s;
  position: relative;
}

/* When Edit Mode is active */
body.edit-mode-active .editable {
  background-color: rgba(16, 185, 129, 0.08);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.4);
  cursor: text;
  padding: 1px 4px;
}

body.edit-mode-active .card-dark-green .editable {
  background-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.editable:focus {
  background-color: #fff !important;
  color: #111827 !important;
  box-shadow: 0 0 0 2px var(--donezo-mint) !important;
  border-radius: 4px;
}

/* =========================================================
   MODAL STYLES
   ========================================================= */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

.modal-card {
  background: #fff;
  border-radius: var(--radius-card);
  width: 100%;
  max-width: 580px;
  padding: 26px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2);
}

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

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

.modal-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

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

.field-item.full-width {
  grid-column: span 2;
}

.field-item label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-sub);
}

.field-item input, .field-item select, .field-item textarea {
  padding: 9px 12px;
  border: 1px solid var(--donezo-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text-dark);
  outline: none;
}

.field-item input:focus, .field-item select:focus, .field-item textarea:focus {
  border-color: var(--donezo-mint);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.modal-footer-btns {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.btn-cancel {
  background: none;
  border: 1px solid var(--donezo-border);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  cursor: pointer;
  color: var(--text-sub);
}

/* Toast Notifications */
.toast-stack {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast-msg {
  background: #0F5132;
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 8px 16px rgba(15, 81, 50, 0.25);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toastIn 0.3s ease;
}

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

/* ---- Team Page: Stat Pills ---- */
.stat-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 28px;
  padding: 0 10px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  margin: auto;
}
.stat-blue   { background: #EFF6FF; color: #2563EB; }
.stat-green  { background: #F0FDF4; color: #16A34A; }
.stat-orange { background: #FFF7ED; color: #EA580C; }

/* ---- Team Date Filter ---- */
.team-date-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ---- Delete button red hover ---- */
.btn-member-delete:hover {
  color: #EF4444 !important;
  border-color: #FECACA !important;
  background: #FEF2F2 !important;
}
.btn-member-edit:hover {
  color: var(--donezo-dark-green) !important;
  border-color: #A7F3D0 !important;
  background: #F0FDF4 !important;
}

/* Responsive */

@media (max-width: 1100px) {
  .donezo-kpi-row { grid-template-columns: repeat(2, 1fr); }
  .donezo-grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .donezo-layout { flex-direction: column; }
  .donezo-sidebar { width: 100%; height: auto; position: static; }
  .donezo-main { padding: 16px; }
  .donezo-kpi-row { grid-template-columns: 1fr; }
  .donezo-topbar { flex-direction: column; align-items: stretch; }
  .donezo-search { width: 100%; }
}
