:root {
  --primary-violet: #6366f1;
  --bg-slate: #f8fafc;
  --white: #ffffff;
  --text-dark: #0f172a;
  --text-secondary: #475569;
  --border: #e2e8f0;
  --font-family: 'Plus Jakarta Sans', sans-serif;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
}

body {
  background-color: var(--bg-slate);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Consultation Top Bar */
.consultation-topbar {
  background: #0f172a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--white);
  padding: 10px 0;
  font-size: 0.85rem;
  z-index: 1001;
  width: 100%;
}

.topbar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.pulse-icon {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseGreen 1.5s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.topbar-text {
  font-weight: 500;
  color: #94a3b8;
}

.topbar-btn {
  background: var(--primary-violet);
  color: var(--white);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.75rem;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.topbar-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* App Layout Grid */
.app-layout {
  display: flex;
  flex-grow: 1;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px;
  flex-shrink: 0;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 40px;
}

.sidebar-brand i {
  color: var(--primary-violet);
}

.sidebar-brand span span {
  color: var(--primary-violet);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item {
  background: none;
  border: none;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}

.nav-item:hover {
  background: #f1f5f9;
  color: var(--text-dark);
}

.nav-item.active {
  background: rgba(99, 102, 241, 0.08);
  color: var(--primary-violet);
}

.sidebar-footer {
  margin-top: auto;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
}

/* Main Panel */
.main-panel {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.panel-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-header h2 {
  font-size: 1.4rem;
  font-weight: 800;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-role {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.avatar {
  width: 36px;
  height: 36px;
  background-color: var(--primary-violet);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
}

/* Panel Content */
.panel-content {
  padding: 40px;
  flex-grow: 1;
  overflow-y: auto;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* Actions bar in tab */
.pipeline-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.total-pipeline-val {
  font-weight: 800;
  color: var(--primary-violet);
  font-size: 1.25rem;
}

/* Kanban Board Layout */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: flex-start;
}

.kanban-col {
  background-color: #f1f5f9;
  border-radius: 16px;
  padding: 16px;
  border: 1px solid var(--border);
}

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

.col-header h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  font-weight: 700;
}

.col-count {
  background-color: #cbd5e1;
  color: var(--text-dark);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 20px;
}

.col-count.font-won {
  background-color: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.col-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 200px;
}

/* Deal Cards */
.deal-card {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  transition: all 0.2s;
}

.deal-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.04);
}

.deal-title {
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.deal-company {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

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

.deal-value {
  font-weight: 800;
  color: var(--primary-violet);
  font-size: 0.9rem;
}

.deal-nav {
  display: flex;
  gap: 4px;
}

.deal-nav-btn {
  background: #f1f5f9;
  border: 1px solid var(--border);
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.deal-nav-btn:hover {
  background-color: var(--primary-violet);
  color: var(--white);
  border-color: var(--primary-violet);
}

.deal-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Todo widget style */
.todo-widget {
  max-width: 600px;
  background: var(--white);
  border: 1px solid var(--border);
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

.todo-input-row {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.todo-input-row input {
  flex-grow: 1;
  background-color: #FFFFFF !important;
  color: #0F172A !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 0.95rem;
  outline: none;
}

.todo-input-row input:focus {
  border-color: var(--primary-violet) !important;
}

.task-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-slate);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.task-desc {
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.task-desc.completed {
  text-decoration: line-through;
  color: var(--text-secondary);
}

.btn-task-delete {
  background: none;
  border: none;
  cursor: pointer;
  color: #ef4444;
}

/* Buttons */
.btn {
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.btn-primary {
  background-color: var(--primary-violet);
  color: var(--white);
}

.btn-primary:hover {
  background-color: #4f46e5;
}

.btn-sm-action {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  background-color: #f1f5f9;
  border: 1px solid var(--border);
  cursor: pointer;
  font-weight: 700;
}

.btn-sm-action:hover {
  background-color: #e2e8f0;
}

.w-full { width: 100%; }
.mt-4 { margin-top: 16px; }

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  display: none;
  z-index: 1999;
}

.deal-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 450px;
  background: var(--white);
  z-index: 2000;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  display: none;
}

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

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
}

.deal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.form-group input, .form-group select {
  background-color: #FFFFFF !important;
  color: #0F172A !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.95rem;
  outline: none;
}

.form-group input:focus, .form-group select:focus {
  border-color: var(--primary-violet) !important;
}

@media(max-width: 1024px) {
  .kanban-board {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media(max-width: 768px) {
  .app-layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 16px;
  }
  .sidebar-brand {
    margin-bottom: 20px;
  }
  .sidebar-nav {
    flex-direction: row;
    overflow-x: auto;
  }
  .panel-content {
    padding: 20px;
  }
  .kanban-board {
    grid-template-columns: 1fr;
  }
}
