/**
 * GrowNoww Group CRM - Core Stylesheet
 * Enterprise Grade, Modern, Highly Responsive
 */

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

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--crm-bg);
  color: var(--crm-text);
  min-height: 100vh;
  transition: var(--crm-transition);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: var(--crm-surface);
}
::-webkit-scrollbar-thumb {
  background: var(--crm-border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--crm-primary);
}

/* =======================================================
   LOGIN CONTAINER
   ======================================================= */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at 50% 20%, var(--crm-primary-glow) 0%, transparent 60%), var(--crm-bg);
  position: relative;
}

.login-card {
  width: 100%;
  max-width: 480px;
  background: var(--crm-surface);
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius-lg);
  padding: 40px;
  box-shadow: var(--crm-shadow);
  backdrop-filter: blur(12px);
  position: relative;
  z-index: 2;
}

.login-brand-header {
  text-align: center;
  margin-bottom: 30px;
}

.login-logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  background: var(--crm-gradient);
  color: #000;
  border-radius: 14px;
  font-size: 24px;
  margin-bottom: 16px;
  box-shadow: 0 8px 20px var(--crm-primary-glow);
}

.login-brand-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.login-brand-subtitle {
  font-size: 13px;
  color: var(--crm-text-muted);
}

.company-pills-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 18px 0 26px 0;
}

.company-pill-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.pill-grownoww { background: rgba(201, 162, 39, 0.15); color: #E5C76B; border: 1px solid rgba(201, 162, 39, 0.3); }
.pill-vibenoww { background: rgba(232, 93, 142, 0.15); color: #F472B6; border: 1px solid rgba(232, 93, 142, 0.3); }
.pill-nowwin { background: rgba(22, 163, 74, 0.15); color: #22C55E; border: 1px solid rgba(22, 163, 74, 0.3); }

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--crm-text);
}

.form-input {
  width: 100%;
  padding: 13px 16px;
  background: var(--crm-card);
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius-sm);
  color: var(--crm-text);
  font-size: 14px;
  transition: var(--crm-transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--crm-primary);
  box-shadow: 0 0 0 3px var(--crm-primary-glow);
}

.btn-primary {
  width: 100%;
  padding: 13px;
  background: var(--crm-gradient);
  color: #000;
  border: none;
  border-radius: var(--crm-radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--crm-transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

[data-company="nowwin"] .btn-primary {
  color: #FFF;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--crm-primary-glow);
}

.demo-logins-box {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--crm-border);
}

.demo-logins-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--crm-text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.demo-chips-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.demo-chip-btn {
  background: var(--crm-card);
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius-sm);
  padding: 8px 10px;
  cursor: pointer;
  text-align: left;
  transition: var(--crm-transition);
}

.demo-chip-btn:hover {
  border-color: var(--crm-primary);
  background: var(--crm-card-hover);
}

.demo-chip-role {
  font-size: 12px;
  font-weight: 700;
  color: var(--crm-primary);
}

.demo-chip-name {
  font-size: 11px;
  color: var(--crm-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =======================================================
   DASHBOARD LAYOUT
   ======================================================= */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
  width: 252px;
  background: var(--crm-sidebar-bg);
  border-right: 1px solid var(--crm-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: var(--crm-transition);
}

.sidebar-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--crm-border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-badge {
  width: 36px;
  height: 36px;
  background: var(--crm-gradient);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-size: 17px;
  flex-shrink: 0;
}
[data-company="nowwin"] .brand-badge { color: #FFF; }

.brand-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.brand-title {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.brand-company-tag {
  font-size: 10.5px;
  color: var(--crm-primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-menu {
  flex: 1;
  padding: 12px 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.menu-category-title {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--crm-text-muted);
  padding: 10px 10px 4px 10px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--crm-radius-sm);
  color: var(--crm-text-muted);
  font-size: 13px;
  font-weight: 600;
  transition: var(--crm-transition);
  cursor: pointer;
}

.nav-link i {
  font-size: 15px;
  width: 18px;
  text-align: center;
}

.nav-link:hover {
  color: var(--crm-text);
  background: var(--crm-card);
}

.nav-link.active {
  color: var(--crm-primary);
  background: var(--crm-badge-bg);
  border-left: 3px solid var(--crm-primary);
}

.nav-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
  background: var(--crm-primary);
  color: #000;
}
[data-company="nowwin"] .nav-badge { color: #FFF; }

.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--crm-border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--crm-border);
  object-fit: cover;
}

.user-meta-box {
  flex: 1;
  overflow: hidden;
}

.user-name-text {
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role-badge {
  display: inline-block;
  font-size: 10px;
  color: var(--crm-primary);
  font-weight: 600;
}

.btn-icon-logout {
  background: transparent;
  border: none;
  color: var(--crm-text-muted);
  cursor: pointer;
  padding: 6px;
  font-size: 16px;
  border-radius: 6px;
  transition: var(--crm-transition);
}
.btn-icon-logout:hover {
  color: var(--crm-danger);
  background: rgba(239, 68, 68, 0.1);
}

/* =======================================================
   MAIN CONTENT AREA & TOPBAR
   ======================================================= */
.main-wrapper {
  flex: 1;
  margin-left: 252px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 60px;
  background: var(--crm-header-bg);
  border-bottom: 1px solid var(--crm-border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
  backdrop-filter: blur(12px);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Multi-Company Switcher Bar */
.company-switcher-container {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--crm-surface);
  border: 1px solid var(--crm-border);
  padding: 3px;
  border-radius: 30px;
}

.company-switch-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 20px;
  border: none;
  background: transparent;
  color: var(--crm-text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--crm-transition);
}

.company-switch-btn:hover {
  color: var(--crm-text);
}

.company-switch-btn.active {
  background: var(--crm-card-hover);
  color: var(--crm-text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.company-switch-btn.active.btn-grownoww {
  background: rgba(201, 162, 39, 0.2);
  color: #E5C76B;
  border: 1px solid rgba(201, 162, 39, 0.4);
}
.company-switch-btn.active.btn-vibenoww {
  background: rgba(232, 93, 142, 0.2);
  color: #F472B6;
  border: 1px solid rgba(232, 93, 142, 0.4);
}
.company-switch-btn.active.btn-nowwin {
  background: rgba(22, 163, 74, 0.2);
  color: #16A34A;
  border: 1px solid rgba(22, 163, 74, 0.4);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Notification Bell */
.notif-wrapper {
  position: relative;
}

.btn-notif {
  background: var(--crm-surface);
  border: 1px solid var(--crm-border);
  color: var(--crm-text);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: var(--crm-transition);
}

.btn-notif:hover {
  border-color: var(--crm-primary);
}

.notif-unread-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--crm-danger);
  color: #FFF;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notif-dropdown {
  position: absolute;
  top: 50px;
  right: 0;
  width: 340px;
  background: var(--crm-surface);
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  box-shadow: var(--crm-shadow);
  z-index: 1000;
  display: none;
  overflow: hidden;
}

.notif-dropdown.show {
  display: block;
}

.notif-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--crm-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
}

.notif-list {
  max-height: 320px;
  overflow-y: auto;
}

.notif-item {
  padding: 12px 18px;
  border-bottom: 1px solid var(--crm-border);
  transition: var(--crm-transition);
  cursor: pointer;
}
.notif-item:hover {
  background: var(--crm-card);
}
.notif-item.unread {
  background: var(--crm-badge-bg);
}

.notif-item-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 3px;
}

.notif-item-msg {
  font-size: 12px;
  color: var(--crm-text-muted);
  line-height: 1.4;
}

.notif-item-time {
  font-size: 10px;
  color: var(--crm-text-muted);
  margin-top: 4px;
}

.btn-quick-add {
  background: var(--crm-gradient);
  color: #000;
  border: none;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--crm-transition);
}
[data-company="nowwin"] .btn-quick-add { color: #FFF; }
.btn-quick-add:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--crm-primary-glow);
}

/* =======================================================
   VIEW CONTAINER & HEADINGS
   ======================================================= */
.view-container {
  padding: 24px;
  flex: 1;
}

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

.page-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-description {
  font-size: 12.5px;
  color: var(--crm-text-muted);
}

/* =======================================================
   AI RECOMMENDATION HERO CARD ("WHAT SHOULD I WORK ON TODAY?")
   ======================================================= */
.ai-hero-card {
  background: linear-gradient(135deg, var(--crm-card) 0%, var(--crm-surface) 100%);
  border: 1.5px solid var(--crm-border);
  border-radius: var(--crm-radius-lg);
  padding: 20px 24px;
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--crm-shadow);
}

.ai-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--crm-gradient);
}

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

.ai-pill-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--crm-badge-bg);
  color: var(--crm-primary);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.ai-pill-label i {
  animation: pulse-icon 2s infinite;
}

@keyframes pulse-icon {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.ai-summary-text {
  font-size: 13.5px;
  color: var(--crm-text);
  margin-bottom: 16px;
  line-height: 1.45;
  font-weight: 500;
}

.ai-recommendation-box {
  background: var(--crm-card);
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.ai-rec-left {
  flex: 1;
}

.ai-urgency-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.tag-critical { background: rgba(239, 68, 68, 0.2); color: #EF4444; border: 1px solid rgba(239, 68, 68, 0.4); }
.tag-today { background: rgba(245, 158, 11, 0.2); color: #F59E0B; border: 1px solid rgba(245, 158, 11, 0.4); }
.tag-standard { background: rgba(59, 130, 246, 0.2); color: #3B82F6; border: 1px solid rgba(59, 130, 246, 0.4); }

.ai-task-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--crm-text);
}

.ai-rationale-text {
  font-size: 12.5px;
  color: var(--crm-text-muted);
  line-height: 1.4;
  margin-bottom: 8px;
}

.ai-action-plan {
  font-size: 12px;
  color: var(--crm-primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-rec-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 150px;
}

.btn-start-task {
  padding: 9px 15px;
  background: var(--crm-gradient);
  color: #000;
  border: none;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--crm-transition);
}
[data-company="nowwin"] .btn-start-task { color: #FFF; }
.btn-start-task:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--crm-primary-glow);
}

.btn-task-details {
  padding: 8px 14px;
  background: var(--crm-surface);
  border: 1px solid var(--crm-border);
  color: var(--crm-text);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: var(--crm-transition);
}
.btn-task-details:hover {
  border-color: var(--crm-primary);
}

/* =======================================================
   KPI CARDS GRID
   ======================================================= */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.kpi-card {
  background: var(--crm-card);
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  padding: 16px 18px;
  transition: var(--crm-transition);
}

.kpi-card:hover {
  border-color: var(--crm-primary);
  transform: translateY(-2px);
}

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

.kpi-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--crm-badge-bg);
  color: var(--crm-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.kpi-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--crm-text-muted);
}

.kpi-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--crm-text);
  letter-spacing: -0.5px;
  line-height: 1.1;
  margin-bottom: 4px;
}

.kpi-subtext {
  font-size: 11px;
  color: var(--crm-text-muted);
}

/* =======================================================
   DAILY WORK TABS (TODAY / UPCOMING / OVERDUE / COMPLETED)
   ======================================================= */
.work-tabs-bar {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--crm-border);
  padding-bottom: 10px;
  margin-bottom: 18px;
}

.work-tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: transparent;
  border: 1px solid var(--crm-border);
  border-radius: 20px;
  color: var(--crm-text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--crm-transition);
}

.work-tab-btn:hover {
  color: var(--crm-text);
  border-color: var(--crm-primary);
}

.work-tab-btn.active {
  background: var(--crm-badge-bg);
  border-color: var(--crm-primary);
  color: var(--crm-primary);
}

.tab-count-pill {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 10px;
  background: var(--crm-card);
  color: var(--crm-text);
}

/* Tasks Grid & Cards */
.tasks-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.task-work-card {
  background: var(--crm-card);
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  padding: 16px;
  transition: var(--crm-transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.task-work-card:hover {
  border-color: var(--crm-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.task-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.badge-priority {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  text-transform: uppercase;
}
.priority-urgent { background: rgba(239, 68, 68, 0.2); color: #EF4444; border: 1px solid rgba(239, 68, 68, 0.4); }
.priority-high { background: rgba(245, 158, 11, 0.2); color: #F59E0B; border: 1px solid rgba(245, 158, 11, 0.4); }
.priority-medium { background: rgba(59, 130, 246, 0.2); color: #3B82F6; border: 1px solid rgba(59, 130, 246, 0.4); }
.priority-low { background: rgba(148, 163, 184, 0.2); color: #94A3B8; border: 1px solid rgba(148, 163, 184, 0.3); }

.badge-company {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.task-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.35;
  color: var(--crm-text);
}

.task-desc {
  font-size: 12px;
  color: var(--crm-text-muted);
  line-height: 1.4;
  margin-bottom: 12px;
}

.task-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--crm-border);
  font-size: 11.5px;
  color: var(--crm-text-muted);
}

.task-due-badge {
  display: flex;
  align-items: center;
  gap: 5px;
}

.task-due-badge.overdue-text {
  color: var(--crm-danger);
  font-weight: 700;
}

/* =======================================================
   KANBAN BOARD VIEW
   ======================================================= */
.kanban-board-container {
  display: grid;
  grid-template-columns: repeat(5, minmax(250px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 16px;
}

.kanban-column {
  background: var(--crm-surface);
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  display: flex;
  flex-direction: column;
  min-height: 520px;
}

.kanban-column-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--crm-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kanban-column-title {
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 7px;
}

.kanban-cards-wrapper {
  flex: 1;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  overflow-y: auto;
}

.kanban-card {
  background: var(--crm-card);
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius-sm);
  padding: 11px 12px;
  cursor: grab;
  transition: var(--crm-transition);
}

.kanban-card:hover {
  border-color: var(--crm-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

/* =======================================================
   PROJECT CARDS & PROGRESS
   ======================================================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.project-card {
  background: var(--crm-card);
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--crm-transition);
}

.project-card:hover {
  border-color: var(--crm-primary);
  transform: translateY(-2px);
}

.progress-track {
  height: 7px;
  background: var(--crm-surface);
  border-radius: 4px;
  overflow: hidden;
  margin: 10px 0 5px 0;
}

.progress-fill {
  height: 100%;
  background: var(--crm-gradient);
  border-radius: 4px;
  transition: width 0.4s ease;
}

/* =======================================================
   HIGH-DENSITY ENTERPRISE DATA TABLES
   ======================================================= */
table {
  border-collapse: collapse;
}

table th {
  padding: 10px 14px !important;
  font-size: 11.5px !important;
  letter-spacing: 0.5px;
}

table td {
  padding: 10px 14px !important;
  font-size: 12.5px !important;
}

/* =======================================================
   MODALS & DRAWERS
   ======================================================= */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: var(--crm-modal-bg);
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius-lg);
  width: 90%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--crm-shadow);
  padding: 22px 24px;
  position: relative;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--crm-border);
}

.modal-title {
  font-size: 18px;
  font-weight: 800;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--crm-text-muted);
  font-size: 20px;
  cursor: pointer;
}
.btn-close-modal:hover {
  color: var(--crm-text);
}

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

.toast {
  background: var(--crm-surface);
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius-sm);
  padding: 14px 20px;
  color: var(--crm-text);
  font-size: 13px;
  box-shadow: var(--crm-shadow);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slide-in 0.3s ease;
}

@keyframes slide-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Responsive */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .main-wrapper {
    margin-left: 0;
  }
  .kanban-board-container {
    grid-template-columns: repeat(5, 280px);
  }
}
