/* ==================== JIRA-INSPIRED DESIGN SYSTEM ==================== */
:root {
  /* Atlassian / Jira Cloud palette */
  --jira-navy: #172B4D;
  --jira-gray: #5E6C84;
  --jira-subtle: #6B778C;
  --jira-border: #DFE1E6;
  --jira-border-strong: #C1C7D0;
  --jira-surface: #FFFFFF;
  --jira-page: #F4F5F7;
  --jira-sidebar: #1D2125;
  --jira-sidebar-hover: #A1BDD914;
  --jira-sidebar-text: #9FADBC;
  --jira-blue: #0C66E4;
  --jira-blue-hover: #0055CC;
  --jira-blue-subtle: #E9F2FF;
  --jira-blue-text: #0052CC;

  --bg-primary: #F4F5F7;
  --bg-secondary: #FFFFFF;
  --bg-tertiary: #FAFBFC;
  --bg-elevated: #FFFFFF;
  --bg-surface: #FFFFFF;
  --text-main: #172B4D;
  --text-muted: #5E6C84;
  --text-subtle: #6B778C;

  --accent-color: #0C66E4;
  --accent-hover: #0055CC;
  --accent-light: #0052CC;
  --accent-muted: #E9F2FF;
  --accent-glow: rgba(12, 102, 228, 0.12);
  --accent-gradient: linear-gradient(180deg, #0C66E4 0%, #0052CC 100%);

  --border-color: #DFE1E6;
  --border-strong: #C1C7D0;
  --border-focus: #4C9AFF;
  --card-shadow: 0 1px 2px rgba(9, 30, 66, 0.06), 0 8px 24px rgba(9, 30, 66, 0.04);
  --glass-bg: #FFFFFF;
  --glass-blur: none;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --color-success: #216E4E;
  --color-warning: #974F0C;
  --color-danger: #AE2E24;
  --color-info: #0052CC;

  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SFMono-Medium', 'JetBrains Mono', ui-monospace, monospace;

  --sidebar-width: 240px;
  --topbar-height: 56px;
  --transition-fast: 0.1s ease;
  --transition-base: 0.15s ease;

  --space-page: 1.5rem;
  --space-section: 1rem;
}

/* Refined CRM visual system: calmer contrast, consistent rhythm, and clearer controls. */
:root {
  --jira-page: #f6f8fb;
  --bg-primary: #f6f8fb;
  --border-color: #e3e8f0;
  --border-strong: #cbd5e1;
  --text-main: #17243b;
  --text-muted: #607089;
  --accent-color: #1769e0;
  --accent-hover: #0f55bb;
  --card-shadow: 0 2px 8px rgba(23, 36, 59, .045), 0 12px 28px rgba(23, 36, 59, .035);
  --radius-sm: 8px;
  --radius-md: 11px;
  --radius-lg: 15px;
  --radius-xl: 20px;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  overflow-x: hidden;
  height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

body { line-height: 1.45; }
.glass-card, .dashboard-card, .stat-card, .settings-card, .modal-content, .kanban-column { box-shadow: var(--card-shadow); }
.glass-card { border: 1px solid var(--border-color); border-radius: var(--radius-lg); background: var(--bg-secondary); }
.view-panel { padding-bottom: 2rem; }
.page-title { letter-spacing: -.035em; }
.panel-action-bar { align-items: center; margin-bottom: 1.25rem; padding-bottom: 1.1rem; }
.panel-action-bar h3 { font-size: 1.35rem; letter-spacing: -.03em; }
.panel-subtitle { line-height: 1.5; }
button, .btn-primary, .btn-secondary, input, select, textarea { transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.btn-primary, .btn-secondary { min-height: 40px; border-radius: 10px; font-weight: 650; }
.btn-primary { box-shadow: 0 2px 5px rgba(12, 102, 228, .16); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 5px 12px rgba(12, 102, 228, .2); }
.btn-secondary { background: #fff; }
.form-group input, .form-group select, .form-group textarea, input, select, textarea { border-radius: 9px; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus, input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(76, 154, 255, .14); outline: none; }
.data-table th { background: #f7f9fc; color: #58677f; font-size: .75rem; letter-spacing: .055em; }
.data-table td { border-bottom-color: #edf0f5; }
.data-table tbody tr:hover { background: #f5f8fe; }
.kanban-column { border-color: var(--border-color); }
.kanban-card { border: 1px solid var(--border-color); box-shadow: 0 2px 5px rgba(23, 36, 59, .04); }
.kanban-card:hover { box-shadow: 0 7px 18px rgba(23, 36, 59, .09); }
.modal { backdrop-filter: blur(5px); }
.modal-content { border: 1px solid rgba(203, 213, 225, .75); border-radius: 18px; }
.settings-grid { gap: 1.25rem; }
.settings-grid > .glass-card { padding: 1.35rem; }
.settings-grid h3 { font-size: 1.03rem; letter-spacing: -.015em; }
@media (max-width: 760px) {
  :root { --space-page: 1rem; }
  .panel-action-bar { align-items: flex-start; }
  .lead-toolbar-actions { width: 100%; justify-content: space-between; }
}

::selection {
  background: rgba(59, 130, 246, 0.35);
  color: #fff;
}

/* Scrollbar Style */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
}

/* ==================== UTILITIES & BUTTONS ==================== */
.font-mono { font-family: var(--font-mono); }
.font-mono-bold { font-family: var(--font-mono); font-weight: 700; }
.text-warning { color: var(--color-warning); }
.text-danger { color: var(--color-danger); }
.text-success { color: var(--color-success); }
.text-highlight { color: var(--jira-blue-text); font-weight: 600; }

.btn-primary {
  background: var(--accent-color);
  color: #fff;
  border: none;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition-base);
  box-shadow: none;
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: none;
}
.btn-primary:active {
  transform: translateY(0);
}
.btn-primary:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-main);
  border: 1px solid var(--border-strong);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition-base);
}
.btn-secondary:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-strong);
  color: var(--text-main);
}
.btn-secondary:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}

.btn-danger {
  background: #C9372C;
  color: white;
  border: none;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 500;
  font-size: 0.875rem;
  transition: var(--transition-base);
}
.btn-danger:hover {
  background: #AE2E24;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}
.btn-full {
  width: 100%;
  justify-content: center;
}

.badge {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ==================== LOGIN LAYOUT ==================== */
.login-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(99, 102, 241, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(16, 185, 129, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse 50% 30% at 50% 100%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
    var(--bg-primary);
}
.login-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 2.75rem 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--card-shadow);
  animation: fadeIn 0.5s ease-out;
}
.login-header {
  text-align: center;
  margin-bottom: 2rem;
}
.logo-box {
  background: var(--accent-gradient);
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem auto;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}
.logo-icon-spin {
  font-size: 1.5rem;
  color: white;
  animation: spinSlow 8s linear infinite;
}
.login-header h2 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.login-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.2rem;
}
.error-msg {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid var(--color-danger);
  color: #f87171;
  padding: 0.75rem;
  border-radius: 6px;
  margin-top: 1rem;
  font-size: 0.85rem;
  text-align: center;
}
.login-footer {
  margin-top: 2rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
}
.login-footer p {
  margin-bottom: 0.5rem;
  font-weight: 600;
}
.demo-tag {
  display: block;
  font-family: var(--font-mono);
  background: var(--bg-tertiary);
  padding: 4px 8px;
  border-radius: 4px;
  margin-top: 4px;
  font-size: 0.75rem;
}

/* ==================== CORE APP WORKSPACE ==================== */
.app-wrapper {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  height: 100vh;
  overflow: hidden;
}

/* SIDEBAR — Jira dark nav */
.sidebar {
  background: var(--jira-sidebar);
  border-right: 1px solid #2C333A;
  display: flex;
  flex-direction: column;
  height: 100%;
  z-index: 100;
}
.sidebar-brand {
  padding: 1rem 0.85rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-bottom: 1px solid #2C333A;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #FFFFFF;
}
.sidebar-brand-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--jira-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: none;
}
.sidebar-brand-text span:last-child {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--jira-sidebar-text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.menu-section-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8C9BAB;
  padding: 0.75rem 0.85rem 0.25rem;
  margin: 0;
}
.menu-item {
  color: var(--jira-sidebar-text);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  margin: 0 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  transition: var(--transition-base);
  border: none;
}
.menu-item:hover {
  background: var(--jira-sidebar-hover);
  color: #FFFFFF;
}
.menu-item.active {
  background: #0C66E4;
  color: #FFFFFF;
  border: none;
  box-shadow: none;
}
.menu-item.active i {
  color: #FFFFFF;
}
.sidebar-menu {
  padding: 0.5rem 0;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  overflow-y: auto;
}
.menu-item i {
  font-size: 1rem;
  width: 20px;
  text-align: center;
}
.sidebar-footer {
  padding: 0.85rem;
  border-top: 1px solid #2C333A;
  background: transparent;
}
.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
  padding: 0.35rem;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
}
.user-profile-badge .avatar {
  width: 32px;
  height: 32px;
  background: var(--jira-blue);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  flex-shrink: 0;
}
.user-profile-badge .name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-profile-badge .role {
  font-size: 0.6875rem;
  color: var(--jira-sidebar-text);
}
.btn-logout {
  background: transparent;
  border: 1px solid #454F59;
  color: var(--jira-sidebar-text);
  width: 100%;
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: var(--transition-base);
}
.btn-logout:hover {
  background: var(--jira-sidebar-hover);
  color: #FFFFFF;
  border-color: #454F59;
}

/* MAIN CONTENT WRAPPER */
.main-content {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-primary);
}
.top-bar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--topbar-height);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: none;
}
.top-bar-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  flex: 1;
}
.top-bar-left h2 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.btn-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-main);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.btn-menu-toggle:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
  background: var(--jira-blue-subtle);
}
.sidebar-backdrop {
  display: none;
}
.company-badge-name {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent-light);
}

.view-panel-container {
  padding: 1.25rem 1.5rem 2rem;
  flex-grow: 1;
  overflow-y: auto;
  background: var(--bg-primary);
  scroll-behavior: smooth;
}

.view-panel {
  animation: slideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 1600px;
}

/* ==================== DASHBOARD STYLES ==================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.kpi-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem 1.15rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  box-shadow: var(--card-shadow);
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
}
.kpi-card::before {
  display: none;
}
.kpi-card:hover {
  transform: none;
  border-color: var(--border-strong);
  box-shadow: var(--card-shadow);
}
.kpi-card:hover::before {
  display: none;
}
.kpi-card-highlight::before {
  opacity: 1;
  background: linear-gradient(90deg, #10b981, #34d399);
}
.kpi-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.icon-blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.icon-indigo { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.icon-emerald { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.icon-rose { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.icon-amber { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }

.dashboard-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.dashboard-greeting {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.dashboard-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.dashboard-quick-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.dashboard-section-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
  font-weight: 600;
}
.kpi-card-highlight {
  border-color: rgba(16, 185, 129, 0.35);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), var(--glass-bg));
}
.dashboard-analytics {
  margin-bottom: 1.5rem;
}
.dashboard-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}
.box-link {
  font-size: 0.8rem;
  color: var(--accent-color);
  text-decoration: none;
}
.box-link:hover {
  text-decoration: underline;
}
.dashboard-empty {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 0.5rem 0;
}
.pipeline-bar-row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}
.pipeline-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.pipeline-track {
  height: 8px;
  background: var(--jira-border);
  border-radius: 999px;
  overflow: hidden;
}
.pipeline-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0C66E4, #4C9AFF);
  min-width: 4px;
  transition: width 0.4s ease;
}
.pipeline-fill-new, .pipeline-fill-new-lead { background: linear-gradient(90deg, #0C66E4, #4C9AFF); }
.pipeline-fill-contacted { background: linear-gradient(90deg, #5E4DB2, #8777D9); }
.pipeline-fill-interested-qualified { background: linear-gradient(90deg, #6554C0, #998DD9); }
.pipeline-fill-meeting-schedule { background: linear-gradient(90deg, #008DA6, #00A3BF); }
.pipeline-fill-meeting-completed { background: linear-gradient(90deg, #00875A, #36B37E); }
.pipeline-fill-proposal, .pipeline-fill-proposal-sent { background: linear-gradient(90deg, #6554C0, #998DD9); }
.pipeline-fill-negotiation, .pipeline-fill-negotiations { background: linear-gradient(90deg, #FF8B00, #FFAB00); }
.pipeline-meta {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  white-space: nowrap;
}
.invoice-health-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.inv-health-stat {
  text-align: center;
  padding: 0.85rem 0.5rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.03);
}
.inv-health-stat strong {
  display: block;
  font-size: 1.4rem;
  font-family: var(--font-mono);
  margin-bottom: 0.15rem;
}
.inv-health-stat span {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.inv-health-unpaid strong { color: #f87171; }
.inv-health-partial strong { color: #fbbf24; }
.inv-health-paid strong { color: #34d399; }
.inv-health-alert {
  grid-column: 1 / -1;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  font-size: 0.85rem;
}
.collection-progress-wrap {
  margin-top: 0.5rem;
}
.collection-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.collection-progress-track {
  height: 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}
.collection-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #34d399);
  border-radius: 999px;
  transition: width 0.5s ease;
}
.data-table-compact th,
.data-table-compact td {
  padding: 0.55rem 0.65rem;
  font-size: 0.85rem;
}

.kpi-data h3 {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}
.kpi-data p {
  font-size: 1.6rem;
  font-weight: 700;
  font-family: var(--font-mono);
}
.kpi-data small {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.kpi-data small + small {
  margin-top: 0.15rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.dashboard-box {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.5rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--card-shadow);
}
.box-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.box-header h3 i {
  color: var(--accent-light);
  font-size: 0.9rem;
}

/* Page headers */
.panel-action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
}
.panel-action-bar h3 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}
.panel-action-bar .page-header-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.lead-toolbar-actions { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.lead-view-switch {
  display: inline-flex;
  gap: 0.2rem;
  padding: 0.22rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
}
.lead-view-switch button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.48rem 0.7rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.lead-view-switch button.active { background: var(--jira-blue-subtle); color: var(--jira-blue-text); }
.lead-view-switch button:focus-visible { outline: 2px solid var(--border-focus); }
.lead-table-view { width: 100%; min-width: 0; }
#lead-board-view[hidden], #lead-table-view[hidden] { display: none !important; }
.lead-table-view:not([hidden]) { display: block; }
.lead-table-toolbar, .lead-table-pagination { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.8rem 0; color: var(--text-muted); font-size: 0.85rem; }
.lead-table-search { display: flex; align-items: center; gap: 0.55rem; width: min(360px, 100%); padding: 0.55rem 0.75rem; border: 1px solid var(--border-color); border-radius: var(--radius-md); background: var(--bg-secondary); }
.lead-table-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text-main); font: inherit; }
.lead-table-page-size { display: flex; align-items: center; gap: 0.5rem; }
.lead-table-page-size select { padding: 0.4rem 0.55rem; border: 1px solid var(--border-color); border-radius: var(--radius-sm); background: var(--bg-secondary); color: var(--text-main); }
.lead-table-pagination > div { display: flex; align-items: center; gap: 0.65rem; }
.lead-table-pagination button { padding: 0.45rem 0.75rem; border: 1px solid var(--border-color); border-radius: var(--radius-sm); background: var(--bg-secondary); color: var(--text-main); cursor: pointer; }
.lead-table-pagination button:disabled { opacity: 0.45; cursor: not-allowed; }
.lead-register-table th[data-lead-sort] { cursor: pointer; user-select: none; }
.lead-register-table th[data-lead-sort]::after { content: ' ↕'; color: var(--text-muted); font-size: 0.75em; }
.lead-register-table th[data-lead-sort].sorted[aria-sort="ascending"]::after { content: ' ↑'; color: var(--jira-blue-text); }
.lead-register-table th[data-lead-sort].sorted[aria-sort="descending"]::after { content: ' ↓'; color: var(--jira-blue-text); }
.lead-table-sr { color: var(--text-muted); font-variant-numeric: tabular-nums; text-align: right; }
.lead-table-scroll { max-height: calc(100vh - 245px); overflow: auto; border: 1px solid var(--border-color); border-radius: var(--radius-lg); background: var(--bg-secondary); }
.lead-register-table { min-width: 1900px; table-layout: auto; }
.lead-register-table th { position: sticky; top: 0; z-index: 2; white-space: nowrap; }
.lead-register-table td { vertical-align: middle; max-width: 240px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.4; }
.lead-register-table .lead-table-code { color: var(--jira-blue-text); font: 600 0.75rem/1.4 var(--font-mono); white-space: nowrap; }
.lead-register-table td .status-pill { display: inline-flex; max-width: 100%; white-space: nowrap; word-break: normal; overflow: hidden; text-overflow: ellipsis; }
.lead-table-contact strong { display: block; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead-table-contact span { display: block; color: var(--text-muted); font-size: 0.78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead-table-services { min-width: 190px; }
.lead-table-services .lead-service-tags { flex-wrap: nowrap; overflow: hidden; }
.lead-table-services .lead-service-tag { flex: 0 0 auto; white-space: nowrap; }
.lead-table-notes { min-width: 200px; white-space: nowrap !important; }
.lead-register-table .card-value { white-space: nowrap; overflow-wrap: normal; word-break: keep-all; }
.lead-table-actions { display: flex; gap: 0.3rem; white-space: nowrap; }
.lead-table-empty { padding: 2rem !important; text-align: center; color: var(--text-muted); }
.lead-detail-page { display: block; }
#lead-detail-page[hidden] { display: none !important; }
.lead-detail-page-header { display: flex; align-items: center; gap: 1rem; margin: 0 0 1rem; }
.lead-detail-page-header > div { flex: 1; }
.lead-detail-page-header h2 { margin: 0 0 0.2rem; color: var(--text-main); font-size: 1.35rem; }
.lead-detail-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.lead-detail-field { min-width: 0; padding: 0.85rem 1rem; border: 1px solid var(--border-color); border-radius: var(--radius-md); background: var(--bg-secondary); }
.lead-detail-field span { display: block; margin-bottom: 0.25rem; color: var(--text-muted); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.lead-detail-field strong { display: block; color: var(--text-main); font-size: 0.9rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.lead-detail-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.lead-detail-panel { min-width: 0; padding: 1rem; border: 1px solid var(--border-color); border-radius: var(--radius-lg); background: var(--bg-secondary); }
.lead-detail-panel h3 { display: flex; align-items: center; gap: 0.55rem; margin: 0 0 1rem; color: var(--text-main); font-size: 1rem; }
.lead-followup-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border-color); }
.lead-followup-form label { display: flex; flex-direction: column; gap: 0.35rem; color: var(--text-muted); font-size: 0.78rem; font-weight: 600; }
.lead-followup-form input, .lead-followup-form select, .lead-followup-form textarea { min-width: 0; padding: 0.55rem 0.65rem; border: 1px solid var(--border-color); border-radius: var(--radius-sm); background: var(--bg-primary); color: var(--text-main); font: inherit; }
.lead-followup-notes { grid-column: 1 / -1; }
.lead-followup-form > button { justify-self: start; }
.lead-followup-list { display: grid; gap: 0.6rem; max-height: 520px; overflow: auto; margin: 1rem 0 0; padding: 0; list-style: none; }
.lead-followup-item { padding: 0.8rem; border: 1px solid var(--border-color); border-radius: var(--radius-md); background: var(--bg-primary); }
.lead-followup-item > div { display: flex; align-items: center; gap: 0.55rem; }
.lead-followup-item time, .lead-followup-item small { color: var(--text-muted); font-size: 0.78rem; }
.lead-followup-item p { margin: 0.55rem 0; color: var(--text-main); white-space: pre-wrap; }
#lead-detail-history { max-height: 760px; overflow: auto; margin: 0; padding-left: 1.2rem; }
@media (max-width: 900px) { .lead-detail-columns { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .lead-detail-page-header { flex-wrap: wrap; } .lead-followup-form { grid-template-columns: 1fr; } .lead-followup-notes { grid-column: auto; } }

.panel-subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.25rem;
  font-weight: 400;
}
.kanban-board {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  align-items: flex-start;
  height: calc(100vh - 240px);
  scroll-snap-type: x proximity;
}
.kanban-column {
  background: var(--jira-page);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 290px;
  min-width: 290px;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  scroll-snap-align: start;
}
.column-header {
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-top: 3px solid var(--jira-border-strong);
}
.column-header .badge {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  min-width: 1.5rem;
  text-align: center;
}
.kanban-column[data-stage="New Lead"] .column-header {
  border-top-color: #0C66E4;
  background: #E9F2FF;
  color: #0052CC;
}
.kanban-column[data-stage="New Lead"] .column-header .badge {
  background: #FFFFFF;
  border-color: #B3D4FF;
  color: #0052CC;
}
.kanban-column[data-stage="Contacted"] .column-header {
  border-top-color: #5E4DB2;
  background: #EAE6FF;
  color: #403294;
}
.kanban-column[data-stage="Contacted"] .column-header .badge {
  background: #FFFFFF;
  border-color: #C0B6F2;
  color: #403294;
}
.kanban-column[data-stage="Interested/qualified"] .column-header { border-top-color: #6554C0; background: #EAE6FF; color: #403294; }
.kanban-column[data-stage="Interested/qualified"] .column-header .badge { background: #FFFFFF; border-color: #C0B6F2; color: #403294; }
.kanban-column[data-stage="Meeting schedule"] .column-header { border-top-color: #008DA6; background: #E6FCFF; color: #006E83; }
.kanban-column[data-stage="Meeting schedule"] .column-header .badge { background: #FFFFFF; border-color: #79E2F2; color: #006E83; }
.kanban-column[data-stage="Meeting completed"] .column-header { border-top-color: #00875A; background: #E3FCEF; color: #006644; }
.kanban-column[data-stage="Meeting completed"] .column-header .badge { background: #FFFFFF; border-color: #ABF5D1; color: #006644; }
.kanban-column[data-stage="Proposal sent"] .column-header {
  border-top-color: #6554C0;
  background: #EAE6FF;
  color: #403294;
}
.kanban-column[data-stage="Proposal sent"] .column-header .badge {
  background: #FFFFFF;
  border-color: #C0B6F2;
  color: #403294;
}
.kanban-column[data-stage="Negotiations"] .column-header {
  border-top-color: #FF8B00;
  background: #FFF7D6;
  color: #974F0C;
}
.kanban-column[data-stage="Negotiations"] .column-header .badge {
  background: #FFFFFF;
  border-color: #F5CD47;
  color: #974F0C;
}
.kanban-column[data-stage="Won"] .column-header {
  border-top-color: #216E4E;
  background: #DCFFF1;
  color: #216E4E;
}
.kanban-column[data-stage="Won"] .column-header .badge {
  background: #FFFFFF;
  border-color: #7EE2B8;
  color: #216E4E;
}
.kanban-column[data-stage="Lost"] .column-header {
  border-top-color: #AE2E24;
  background: #FFEDEB;
  color: #AE2E24;
}
.kanban-column[data-stage="Lost"] .column-header .badge {
  background: #FFFFFF;
  border-color: #F5B5AD;
  color: #AE2E24;
}
.kanban-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.9rem;
  cursor: grab;
  box-shadow: var(--card-shadow);
  transition: var(--transition-base);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.kanban-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-focus);
  box-shadow: 0 4px 12px rgba(9, 30, 66, 0.12);
}
.column-cards {
  padding: 0.75rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-grow: 1;
  min-height: 150px;
}
.kanban-card.dragging {
  opacity: 0.4;
  cursor: grabbing;
}
.card-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.card-company {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}
.lead-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px dashed var(--border-color);
}
.lead-card-title-block { min-width: 0; }
.lead-card-name {
  color: var(--text-main);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.lead-card-code {
  margin-top: 0.25rem;
  color: var(--jira-blue-text);
  font: 600 0.73rem/1.35 var(--font-mono);
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.lead-card-heading .status-pill {
  flex: 0 0 auto;
  max-width: 6.2rem;
  white-space: normal;
  text-align: center;
}
.lead-card-company {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.lead-card-facts {
  display: grid;
  gap: 0.32rem;
  min-width: 0;
}
.lead-detail-row {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  color: var(--text-main);
  font-size: 0.75rem;
  line-height: 1.35;
  min-width: 0;
}
.lead-detail-row i {
  width: 0.85rem;
  margin-top: 0.1rem;
  color: var(--text-muted);
  text-align: center;
  flex: 0 0 auto;
}
.lead-detail-row span { min-width: 0; overflow-wrap: anywhere; }
.lead-detail-label {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--text-subtle);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}
.lead-card-services { border-top: 1px solid var(--border-color); padding-top: 0.5rem; }
.lead-service-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.lead-service-tag {
  max-width: 100%;
  padding: 0.2rem 0.4rem;
  border-radius: 999px;
  background: var(--jira-blue-subtle);
  color: var(--jira-blue-text);
  font-size: 0.65rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.lead-card-value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  border-top: 1px dashed var(--border-color);
  padding-top: 0.55rem;
}
.lead-card-value-row .card-value { min-width: 0; overflow-wrap: anywhere; }
.lead-card-value-row .card-source {
  max-width: 55%;
  text-align: right;
  overflow-wrap: anywhere;
}
.lead-card-assignees { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.lead-card-assignees > div { min-width: 0; color: var(--text-main); font-size: 0.72rem; overflow-wrap: anywhere; }
.lead-card-notes {
  border-top: 1px solid var(--border-color);
  padding-top: 0.45rem;
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.lead-card-date { color: var(--text-subtle); font-size: 0.65rem; }
.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px dashed var(--border-color);
  padding-top: 0.5rem;
  margin-top: 0.5rem;
}
.card-value {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--jira-blue-text);
}
.card-source {
  font-size: 0.75rem;
  background: var(--jira-page);
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}
.card-client-link {
  margin-top: 0.45rem;
  font-size: 0.75rem;
  color: #86efac;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.card-btn {
  background: var(--jira-page);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.78rem;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.card-btn:hover {
  color: var(--text-main);
  border-color: var(--border-strong);
  background: var(--bg-elevated);
}
.card-btn.btn-won:hover { color: var(--color-success); }
.card-btn.btn-edit:hover { color: var(--color-info); }
.card-btn.btn-del:hover { color: var(--color-danger); }

.column-won,
.column-lost {
  border-top: none;
}

/* ==================== TABLES & SEARCH ==================== */
.search-input {
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  color: var(--text-main);
  padding: 0.4rem 1rem 0.4rem 2.35rem;
  border-radius: var(--radius-sm);
  width: 240px;
  min-width: 180px;
  min-height: 2.25rem;
  font-size: 0.875rem;
  transition: var(--transition-base);
  box-sizing: border-box;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%235E6C84' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0.75rem center;
}
.search-input:focus {
  border-color: var(--border-focus);
  outline: none;
  box-shadow: 0 0 0 1px var(--border-focus);
}

.panel-action-bar-wrap {
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
}

.table-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

/* Jira-style selects (all single-value dropdowns) */
select:not([multiple]) {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 0.4rem 2rem 0.4rem 0.65rem;
  font-size: 0.875rem;
  font-family: inherit;
  font-weight: 400;
  line-height: 1.42857;
  min-height: 2.25rem;
  cursor: pointer;
  transition: var(--transition-base);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='%235E6C84'%3E%3Cpath d='M4.5 6.5 8 10l3.5-3.5' stroke='%235E6C84' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.55rem center;
  background-size: 1rem;
}
select:not([multiple]):hover {
  background-color: #F4F5F7;
  border-color: var(--border-strong);
}
select:not([multiple]):focus {
  border-color: var(--border-focus);
  outline: none;
  box-shadow: 0 0 0 1px var(--border-focus);
}
select:not([multiple]):disabled {
  background-color: #F4F5F7;
  color: var(--text-subtle);
  cursor: not-allowed;
  opacity: 0.8;
}
select[multiple] {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 0.5rem;
  font-size: 0.875rem;
  font-family: inherit;
  line-height: 1.5;
}
select[multiple] option {
  padding: 0.35rem 0.5rem;
  border-radius: 2px;
}
select[multiple] option:checked {
  background: var(--jira-blue-subtle);
  color: var(--jira-blue-text);
}

.table-filters input,
.table-filters select {
  min-height: 2.25rem;
  box-sizing: border-box;
}
.table-filters select {
  min-width: 150px;
  max-width: 220px;
}
.table-filters input:focus,
.table-filters select:focus {
  border-color: var(--border-focus);
  outline: none;
  box-shadow: 0 0 0 1px var(--border-focus);
}

.table-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.25rem 0.5rem 1rem;
  box-shadow: var(--card-shadow);
  overflow: hidden;
}
.table-card .table-meta {
  padding: 0.75rem 1rem 0;
}
.table-card .data-table {
  margin-top: 0.25rem;
}

.table-meta {
  margin-bottom: 0.75rem;
}

.table-result-count {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.scroll-table-container {
  overflow-x: auto;
  max-height: 100%;
}
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
  font-size: 0.875rem;
}
.data-table th {
  background: #F4F5F7;
  padding: 0.6rem 0.75rem;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: none;
  letter-spacing: normal;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-muted);
  white-space: nowrap;
}
.data-table th:first-child { border-radius: 0; }
.data-table th:last-child { border-radius: 0; }
.data-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
  background: var(--bg-secondary);
}
.data-table tbody tr:hover {
  background: #F4F5F7;
}
.data-table tbody tr:hover td {
  background: #F4F5F7;
}
.data-table tbody tr:last-child td {
  border-bottom: none;
}

.table-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
}
.table-actions-cell,
.table-actions-head {
  width: 1%;
  white-space: nowrap;
}
.invoice-table .table-actions-cell,
.invoice-table .table-actions-head {
  min-width: 200px;
}
.table-actions .btn-sm {
  flex-shrink: 0;
  padding: 0.4rem 0.55rem;
}
.table-actions .btn-label {
  display: none;
}
.table-actions .btn-sm:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.invoice-page-header {
  margin-bottom: 1rem;
}
.invoice-gst-tabs {
  margin-top: 1rem;
  margin-bottom: 0.25rem;
}
.invoice-type-tabs {
  margin-bottom: 0;
}
.invoice-filters {
  margin-top: 0.75rem;
}
#invoices-sort {
  min-width: 190px;
  max-width: 240px;
}
.sortable-th {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.sortable-th .sort-ind {
  color: var(--text-subtle);
  font-size: 0.7rem;
  margin-left: 0.2rem;
}
.sortable-th.is-sorted .sort-ind {
  color: var(--accent-color);
}
.invoice-table-wrap {
  padding-top: 0.75rem;
}
.invoice-table-wrap .table-meta {
  margin-bottom: 0.5rem;
}

/* Keep invoice numbers and amounts on one line (no hyphen/wrap breaks) */
.invoice-table {
  min-width: 1180px;
}
.invoice-table th:nth-child(1),
.invoice-table td:nth-child(1),
.invoice-table th:nth-child(4),
.invoice-table td:nth-child(4),
.invoice-table th:nth-child(5),
.invoice-table td:nth-child(5),
.invoice-table th:nth-child(6),
.invoice-table td:nth-child(6),
.invoice-table th:nth-child(7),
.invoice-table td:nth-child(7),
.invoice-table th:nth-child(8),
.invoice-table td:nth-child(8) {
  white-space: nowrap;
  hyphens: none;
  word-break: keep-all;
}
.invoice-table td:nth-child(1) .text-highlight,
.invoice-table td.font-mono {
  font-variant-numeric: tabular-nums;
}

.invoice-due-amount {
  color: #974F0C;
  font-weight: 600;
}

.invoice-due-clear {
  color: #216E4E;
}

.invoice-payment-summary-box {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.08);
}

.invoice-payment-summary-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.88rem;
}

.invoice-payment-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.invoice-payment-summary-card {
  display: contents;
}

.invoice-payment-stat {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.9rem 1rem;
}

.invoice-payment-stat .label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.invoice-payment-stat .value {
  font-size: 1.05rem;
  font-weight: 700;
}

.invoice-payments-table td:nth-child(5) {
  white-space: normal;
  min-width: 140px;
}

.modal-footer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.status-pill {
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.6875rem;
  font-weight: 700;
  display: inline-block;
  letter-spacing: 0;
  text-transform: uppercase;
  border: none;
  line-height: 1.4;
}
.status-pill.active, .status-pill.paid, .status-pill.completed, .status-pill.won {
  background: #DCFFF1;
  color: #216E4E;
}
.status-pill.unpaid, .status-pill.todo, .status-pill.inactive, .status-pill.lost {
  background: #FFEDEB;
  color: #AE2E24;
}
.status-pill.cancelled {
  background: #F1F2F4;
  color: #44546F;
}
.btn-cancel-invoice {
  color: #974F0C;
  border-color: #F5CD47;
}
.btn-cancel-invoice:hover {
  color: #7F5F01;
  background: #FFF7D6;
}
.btn-restore-invoice {
  color: #216E4E;
  border-color: #7EE2B8;
}
.btn-restore-invoice:hover {
  color: #164B35;
  background: #DCFFF1;
}
.status-pill.partially, .status-pill.partiallypaid, .status-pill.progress, .status-pill.maintenance, .status-pill.negotiation {
  background: #FFF7D6;
  color: #974F0C;
}
.status-pill.new, .status-pill.new-lead { background: #E9F2FF; color: #0052CC; }
.status-pill.contacted, .status-pill.interested-qualified, .status-pill.proposal-sent { background: #EAE6FF; color: #5E4DB2; }
.status-pill.meeting-schedule { background: #E6FCFF; color: #006E83; }
.status-pill.meeting-completed { background: #E3FCEF; color: #006644; }
.status-pill.negotiation, .status-pill.negotiations { background: #FFF7D6; color: #974F0C; }
.status-pill.low { background: #F1F2F4; color: #44546F; }
.status-pill.medium { background: #E9F2FF; color: #0052CC; }
.status-pill.high { background: #FFF7D6; color: #974F0C; }
.status-pill.urgent { background: #FFEDEB; color: #AE2E24; }

.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.35rem;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-sans);
  background: var(--jira-blue-subtle);
  color: var(--jira-blue-text);
  border: none;
}

/* ==================== EXPENSES VIEW GRID ==================== */
.expense-panel-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1.5rem;
  align-items: start;
}

/* ==================== LEDGER VIEW (TALLY STYLE) ==================== */
.tally-ledger-view {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 0;
}

.ledger-toolbar {
  align-items: flex-start;
}

.ledger-toolbar-title h3 {
  margin: 0;
}

.ledger-toolbar-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.ledger-filter-bar {
  padding: 1rem 1.25rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md, 8px);
  background: var(--bg-secondary);
  box-shadow: none;
}

.ledger-filter-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.85rem 1rem;
}

.ledger-filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.ledger-filter-field label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.ledger-filter-field input,
.ledger-filter-field select {
  width: 100%;
  min-width: 0;
}

.ledger-filter-meta {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.tally-ledger-scroll {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 0.5rem;
}

#ledger-book-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: stretch;
  width: 100%;
}

.tally-ledger-book {
  --ledger-border: #d8dee6;
  --ledger-head-bg: #f8fafc;
  --ledger-row-alt: #fbfcfd;
  --ledger-total-bg: #f1f5f9;
  background: #ffffff;
  color: #111827;
  width: 100%;
  max-width: none;
  font-family: 'Inter', Arial, sans-serif;
  font-size: 12px;
  line-height: 1.5;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md, 8px);
  box-shadow: none;
  box-sizing: border-box;
  overflow: hidden;
}

.tally-ledger-book-head {
  border-bottom: 1px solid var(--ledger-border);
}

.tally-ledger-book .tally-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  border-bottom: 1px solid var(--ledger-border);
  padding: 10px 12px;
  background: var(--ledger-head-bg);
  color: #334155;
}

.tally-ledger-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 0;
}

.tally-ledger-company {
  padding: 14px 16px;
  border-right: 1px solid var(--ledger-border);
}

.tally-ledger-company-name {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.tally-ledger-company-line {
  font-size: 11px;
  color: #475569;
  line-height: 1.45;
}

.tally-ledger-meta-panel {
  display: flex;
  flex-direction: column;
  background: #fafbfc;
}

.tally-ledger-meta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--ledger-border);
}

.tally-ledger-meta-cell {
  padding: 10px 12px;
  border-right: 1px solid var(--ledger-border);
}

.tally-ledger-meta-cell:last-child {
  border-right: none;
}

.tally-ledger-meta-cell-full {
  border-right: none;
  border-bottom: none;
}

.tally-ledger-meta-label {
  color: #64748b;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}

.tally-ledger-meta-value {
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
}

.tally-ledger-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--ledger-border);
  background: #fff;
}

.tally-ledger-summary-item {
  padding: 12px 16px;
  border-right: 1px solid var(--ledger-border);
}

.tally-ledger-summary-item:last-child {
  border-right: none;
}

.tally-ledger-summary-highlight {
  background: #f8fafc;
}

.tally-ledger-summary-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.tally-ledger-summary-highlight .tally-ledger-summary-value {
  color: #216e4e;
}

.tally-ledger-table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tally-ledger-book .tally-table {
  border: none;
}

.tally-ledger-book .tally-table td,
.tally-ledger-book .tally-table th {
  border-color: var(--ledger-border);
  padding: 9px 12px;
  vertical-align: top;
}

.tally-ledger-table {
  min-width: 760px;
  width: 100%;
}

.tally-ledger-table thead th {
  background: var(--ledger-head-bg);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
  border-top: none;
  white-space: nowrap;
}

.tally-ledger-table tbody tr:nth-child(even) {
  background: var(--ledger-row-alt);
}

.tally-ledger-table tbody tr:hover {
  background: #f1f5f9;
}

.tally-ledger-particulars-cell {
  min-width: 220px;
  max-width: 420px;
  white-space: normal;
}

.tally-ledger-particulars-main {
  font-weight: 600;
  color: #0f172a;
}

.tally-ledger-subline {
  font-size: 10px;
  color: #64748b;
  margin-top: 4px;
  font-weight: 400;
  line-height: 1.4;
}

.ledger-voucher-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.ledger-status-paid {
  background: #dcfce7;
  color: #166534;
}

.ledger-status-partial {
  background: #fef3c7;
  color: #92400e;
}

.ledger-status-unpaid {
  background: #fee2e2;
  color: #991b1b;
}

.tally-ledger-dash {
  color: #94a3b8;
}

.tally-ledger-totals-row td {
  background: var(--ledger-total-bg);
  border-top: 2px solid #cbd5e1 !important;
  font-size: 12px;
  font-weight: 700;
}

.tally-ledger-footer-note {
  border-top: 1px solid var(--ledger-border);
  padding: 8px 12px;
  font-size: 10px;
  color: #64748b;
  text-align: right;
  background: #fafbfc;
}

.tally-ledger-book .tally-logo-print {
  height: 44px;
  margin-bottom: 8px;
}

/* Legacy ledger table styles (kept for cached HTML) */
.ledger-summary-grid {
  margin-bottom: 1.5rem;
}
.ledger-empty-summary {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-secondary);
}
.ledger-table th,
.ledger-table td {
  white-space: nowrap;
}
.ledger-table td:nth-child(3) {
  white-space: normal;
  min-width: 220px;
}
.ledger-type-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.ledger-type-credit {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-success);
}
.ledger-type-invoice {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}
.ledger-paid-note {
  font-size: 0.78rem;
}
.ledger-type-debit {
  background: rgba(244, 63, 94, 0.15);
  color: var(--color-danger);
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
}
.glass-card > h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.card-form {
  position: sticky;
  top: 0;
}
.card-divider {
  border: 0;
  border-top: 1px solid var(--border-color);
  margin: 1.5rem 0;
}
.logo-config-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  margin-top: 1rem;
}
.logo-preview-box {
  width: 100%;
  height: 100px;
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F4F5F7;
  overflow: hidden;
}
.logo-preview-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.logo-preview-box div {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.config-help-text {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0.5rem 0 1rem;
  text-align: center;
}
.signature-preview-box {
  min-height: 90px;
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}
#logo-upload-form {
  display: flex;
  gap: 0.5rem;
}

/* ==================== STAFF TABS ==================== */
.tab-header {
  display: flex;
  gap: 0.25rem;
  border: 1px solid var(--border-color);
  margin-bottom: 1rem;
  padding: 0.25rem;
  background: #FFFFFF;
  border-radius: 10px;
  width: fit-content;
  box-shadow: var(--card-shadow);
}
.tab-btn {
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  padding: 0.55rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-base);
}
.tab-btn:hover {
  color: var(--text-main);
  background: #F4F5F7;
}
.tab-btn.active {
  color: #fff;
  background: var(--accent-color);
  box-shadow: none;
}
.salary-details-preview {
  background: #F7F8F9;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}
.preview-item {
  display: flex;
  justify-content: space-between;
}
.preview-item.total-item {
  border-top: 1px dashed var(--border-color);
  padding-top: 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  font-family: var(--font-mono);
}

/* ==================== MODALS LAYOUT ==================== */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(4, 7, 14, 0.8);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-content {
  background: linear-gradient(180deg, var(--bg-secondary) 0%, #0c121c 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
  padding: 1.1rem;
  animation: zoomIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-lg .modal-content {
  max-width: 800px;
}
.modal-content.modal-md {
  max-width: 560px;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  padding: 0 0 0.55rem;
}
.modal-header h3 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.2;
}
.close-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 1.25rem;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}
.close-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

/* FORMS STYLING */
.form-group {
  margin-bottom: 1.15rem;
}
.form-group label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  transition: var(--transition-base);
  box-sizing: border-box;
}
.form-group select:not([multiple]) {
  padding-right: 2rem;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--border-focus);
  outline: none;
  box-shadow: 0 0 0 1px var(--border-focus);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.lead-service-picker { position: relative; }
.lead-service-trigger {
  width: 100%;
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.8rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-main);
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.lead-service-trigger:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 1px; }
.lead-service-trigger[aria-expanded="true"] { border-color: var(--border-focus); }
.lead-service-trigger > span { min-width: 0; overflow-wrap: anywhere; }
.lead-service-trigger > i { color: var(--text-muted); font-size: 0.75rem; flex: 0 0 auto; }
.lead-service-menu {
  margin-top: 0.35rem;
  padding: 0.45rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  box-shadow: var(--card-shadow);
}
.lead-service-search { width: 100%; margin-bottom: 0.35rem; }
.lead-service-options { max-height: 12rem; overflow-y: auto; }
.lead-service-option {
  display: flex !important;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.5rem;
  margin: 0 !important;
  border-radius: var(--radius-sm);
  color: var(--text-main) !important;
  font-size: 0.82rem !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  cursor: pointer;
}
.lead-service-option[hidden] { display: none !important; }
.lead-service-option:hover { background: var(--jira-page); }
.lead-service-option input { width: 1rem !important; height: 1rem; margin: 0.1rem 0 0; flex: 0 0 auto; accent-color: var(--jira-blue); }
.lead-service-option span { min-width: 0; line-height: 1.35; overflow-wrap: anywhere; }
.lead-service-selected { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.4rem; }
.lead-service-selected:empty { display: none; }
.lead-service-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  max-width: 100%;
  padding: 0.22rem 0.45rem;
  border-radius: 999px;
  background: var(--jira-blue-subtle);
  color: var(--jira-blue-text);
  font-size: 0.68rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.lead-service-chip button { border: 0; background: transparent; color: inherit; cursor: pointer; padding: 0; font-size: 0.9rem; line-height: 1; }

#modal-employee .modal-content {
  padding: 0.7rem 0.8rem 0.75rem;
}

#modal-employee .modal-header {
  margin-bottom: 0.5rem;
  padding-bottom: 0.45rem;
}

#modal-employee .form-group {
  margin-bottom: 0.45rem;
}

#modal-employee .form-group label {
  margin-bottom: 0.2rem;
  font-size: 0.68rem;
}

#modal-employee .form-group input,
#modal-employee .form-group select {
  padding: 0.32rem 0.55rem;
  font-size: 0.84rem;
}

#modal-employee .form-row {
  gap: 0.5rem;
}

#modal-employee .form-section-title {
  margin: 0.55rem 0 0.35rem;
  padding-bottom: 0.2rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
}

#modal-employee .btn-full {
  margin-top: 0.25rem;
  padding: 0.5rem 0.75rem;
}

#modal-employee .close-btn {
  width: 28px;
  height: 28px;
  font-size: 1.1rem;
}

.input-icon-wrap {
  position: relative;
}
.input-icon-wrap i {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}
.input-icon-wrap input {
  padding-left: 2.2rem;
}

.password-field {
  position: relative;
}
.password-field input {
  padding-right: 2.75rem;
  width: 100%;
}
.input-icon-wrap.password-field input {
  padding-left: 2.2rem;
  padding-right: 2.75rem;
}
.password-toggle-btn {
  position: absolute;
  right: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem 0.35rem;
  line-height: 1;
  border-radius: var(--radius-sm);
}
.password-toggle-btn:hover {
  color: var(--text-main);
}
.password-toggle-btn:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 1px;
}

.info-alert {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  color: #a5b4fc;
  margin-bottom: 1.2rem;
  line-height: 1.4;
}

/* CHECKBOX & OPTIONS */
.checkbox-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
  font-size: 0.9rem;
}
.invoice-options-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #F7F8F9;
  padding: 0.75rem;
  border-radius: 10px;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border-color);
}
.gst-rate-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.gst-rate-box label {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.gst-rate-box input {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 4px 6px;
  border-radius: 4px;
  text-align: center;
}

/* LINE ITEMS BUILDER */
.invoice-items-builder {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1.25rem;
  background: #F7F8F9;
}
.invoice-items-builder h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.items-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0.8rem;
}
.items-table th {
  text-align: left;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 0.4rem;
  border-bottom: 1px dashed var(--border-color);
}
.items-table td {
  padding: 0.4rem;
}
.items-table input {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.4rem;
  border-radius: 4px;
  font-size: 0.85rem;
}
.items-table input::placeholder {
  color: var(--text-subtle);
}
.items-table .row-desc { width: 100%; }
.items-table .row-hsn { width: 90px; }
.items-table .row-val { width: 100%; text-align: right; }
.btn-row-del {
  background: none;
  border: none;
  color: var(--color-danger);
  cursor: pointer;
  font-size: 1rem;
}

.invoice-totals-summary {
  margin-left: auto;
  width: 280px;
  background: #F7F8F9;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
}
.totals-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.totals-row input {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 2px 4px;
  border-radius: 4px;
}

/* ==================== TALLY PRINT OVERLAY ==================== */
.print-overlay-container {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: #0f172a;
  z-index: 2000;
  overflow-y: auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.print-actions-top {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  width: 100%;
  max-width: 800px;
  justify-content: space-between;
}

.lead-client-picker {
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.08);
}

.lead-client-picker label {
  color: var(--accent-primary, #6366f1);
  font-weight: 600;
}

.lead-client-picker select {
  margin-top: 0.35rem;
}

/* Legacy task UI (removed) — hide if cached old HTML is still loaded */
#project-tasks-box,
#modal-task {
  display: none !important;
}

/* The physical paper sheet style */
.tally-invoice-sheet {
  background: #ffffff;
  color: #000000;
  width: 100%;
  max-width: 800px;
  font-family: Arial, sans-serif;
  font-size: 11px;
  line-height: 1.4;
  border: 1.5px solid #000000;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  padding: 0;
  margin-bottom: 3rem;
  box-sizing: border-box;
}

/* Grid & Border builders for Tally style */
.tally-table {
  width: 100%;
  border-collapse: collapse;
}
.tally-table td, .tally-table th {
  border: 1px solid #000000;
  padding: 4px 6px;
  vertical-align: top;
}
.tally-table th {
  background: #f3f4f6;
  text-align: center;
  font-weight: 700;
}
.tally-items-table th.tally-amount-col,
.tally-items-table td.tally-amount-col {
  width: 20%;
  min-width: 120px;
  white-space: nowrap;
}
.tally-border-none {
  border: none !important;
}
.tally-border-bottom {
  border-bottom: 1px solid #000000 !important;
}
.tally-border-right {
  border-right: 1px solid #000000 !important;
}
.tally-border-left {
  border-left: 1px solid #000000 !important;
}
.tally-text-center { text-align: center !important; }
.tally-text-right { text-align: right !important; }
.tally-text-left { text-align: left !important; }
.tally-font-bold { font-weight: 700 !important; }
.tally-font-mono { font-family: 'JetBrains Mono', monospace; font-size: 11px; }

/* Specific Tally details */
.tally-title {
  font-size: 15px;
  font-weight: bold;
  text-align: center;
  border-bottom: 1.5px solid #000000;
  padding: 6px 0;
}
.tally-logo-print {
  height: 50px;
  max-width: 180px;
  object-fit: contain;
  margin-bottom: 4px;
  display: block;
}
.tally-signature-print {
  height: 48px;
  max-width: 160px;
  object-fit: contain;
  margin: 4px 0 2px auto;
  display: block;
}
.tally-signatory-label {
  font-size: 9px;
  color: #666;
}

/* Amount in words and Bank Slip */
.tally-amount-words {
  border-top: 1.5px solid #000000;
  border-bottom: 1.5px solid #000000;
  padding: 6px;
  font-style: italic;
}
.tally-bank-slip-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
}
.tally-bank-info {
  border-right: 1px solid #000000;
  padding: 6px;
}
.tally-signatory-box {
  padding: 6px;
  text-align: right;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 90px;
}

/* Tally invoice — mobile / tablet screen layout */
.tally-items-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tally-items-table {
  min-width: 620px;
}

.tally-contact-line {
  word-break: break-word;
}

.tally-contact-sep {
  margin: 0 0.25rem;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ==================== RESPONSIVE LAYOUT ==================== */
@media (max-width: 1200px) {
  .dashboard-grid,
  .dashboard-grid-3 {
    grid-template-columns: 1fr;
  }

  .kanban-board {
    height: calc(100vh - 240px);
  }
}

@media (max-width: 992px) {
  .app-wrapper {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-width: 85vw;
    z-index: 1100;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.35);
  }

  .sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(7, 10, 18, 0.65);
    backdrop-filter: blur(2px);
    z-index: 1050;
  }

  .sidebar-open .sidebar-backdrop {
    display: block;
  }

  .btn-menu-toggle {
    display: inline-flex;
  }

  .main-content {
    width: 100%;
  }

  .view-panel-container {
    padding: 1.25rem;
  }

  .top-bar {
    padding: 0.85rem 1.25rem;
  }

  .company-badge-name {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .expense-panel-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .card-form {
    position: static;
  }

  .panel-action-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .panel-action-bar-wrap {
    flex-direction: column;
    align-items: stretch;
  }

  .panel-action-bar > .btn-primary,
  .panel-action-bar-wrap > .btn-primary {
    width: 100%;
    justify-content: center;
  }

  .table-filters {
    width: 100%;
  }

  .table-filters .search-input,
  .table-filters input,
  .table-filters select {
    width: 100%;
    min-width: 0;
  }

  .kanban-board {
    height: auto;
    min-height: 420px;
  }

  .kanban-column {
    width: 260px;
    min-width: 260px;
  }

  .ledger-filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ledger-toolbar-actions {
    width: 100%;
  }

  .ledger-toolbar-actions .btn-primary,
  .ledger-toolbar-actions .btn-secondary {
    flex: 1;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  body {
    min-height: 100dvh;
  }

  .app-wrapper {
    height: 100dvh;
    min-height: 100dvh;
  }

  .main-content {
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
  }

  #app-container.sidebar-open {
    overflow: hidden;
  }

  .view-panel-container {
    padding: 1rem;
    overflow-x: hidden;
  }

  .login-card {
    margin: 1rem;
    padding: 1.75rem 1.25rem;
  }

  .top-bar-left h2 {
    font-size: 1.05rem;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .kpi-card {
    padding: 1.1rem;
  }

  .kpi-data p {
    font-size: 1.35rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .tab-header {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .tab-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .details-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .modal-content {
    width: calc(100% - 1.5rem);
    max-width: none;
    padding: 1.25rem;
    margin: 0.75rem;
  }

  .modal-lg .modal-content {
    max-width: none;
  }

  .invoice-options-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .print-overlay-container {
    padding: 1rem;
    align-items: stretch;
  }

  .print-actions-top {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-bottom: 1rem;
    max-width: none;
  }

  .print-actions-top .btn-primary,
  .print-actions-top .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .tally-invoice-sheet {
    max-width: 100%;
    width: 100%;
    overflow-x: hidden;
  }

  .tally-party-section,
  .tally-party-section tbody,
  .tally-party-section tr {
    display: block;
    width: 100%;
  }

  .tally-party-section td {
    display: block;
    width: 100% !important;
    border-left: none !important;
    border-right: none !important;
  }

  .tally-party-meta {
    border-top: 1px solid #000000 !important;
    padding: 0 !important;
  }

  .tally-meta-table tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .tally-meta-table td {
    width: auto !important;
  }

  .tally-meta-table tr:last-child td {
    grid-column: 1 / -1;
  }

  .tally-items-table th.tally-amount-col,
  .tally-items-table td.tally-amount-col {
    min-width: 88px;
  }

  .tally-bank-slip-grid {
    grid-template-columns: 1fr;
  }

  .tally-bank-info {
    border-right: none;
    border-bottom: 1px solid #000000;
  }

  .data-table {
    min-width: 680px;
  }

  .invoice-table {
    min-width: 1080px;
  }

  .invoice-payment-summary-grid {
    grid-template-columns: 1fr;
  }

  .view-panel > .data-table,
  .tab-content > .data-table,
  .scroll-table-container,
  .glass-card.scroll-table-container {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .view-panel > .table-meta + .data-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #logo-upload-form,
  #signature-upload-form {
    flex-direction: column;
    width: 100%;
  }

  #logo-upload-form button,
  #signature-upload-form button {
    width: 100%;
    justify-content: center;
  }

  .table-actions .btn-label {
    display: none;
  }

  .table-actions .btn-sm {
    padding: 0.4rem 0.55rem;
  }
}

@media (max-width: 480px) {
  .view-panel-container {
    padding: 0.75rem;
  }

  .top-bar {
    padding: 0.75rem;
  }

  .company-badge-name {
    display: none;
  }

  .kanban-column {
    width: 240px;
    min-width: 240px;
  }

  .panel-action-bar h3,
  .glass-card h3 {
    font-size: 1rem;
  }

  .login-footer .demo-tag {
    font-size: 0.7rem;
    word-break: break-word;
  }

  .tally-invoice-sheet {
    font-size: 10px;
  }

  .tally-meta-table tr {
    grid-template-columns: 1fr;
  }

  .tally-meta-table td {
    border-right: none !important;
  }

  .tally-meta-table td + td {
    border-top: 1px solid #000000;
  }

  .tally-contact-sep {
    display: none;
  }

  .tally-contact-line {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .tally-items-table {
    min-width: 540px;
  }

  .tally-signatory-box {
    height: auto;
    min-height: 90px;
  }

  .ledger-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tally-ledger-header {
    grid-template-columns: 1fr;
  }

  .tally-ledger-company {
    border-right: none;
    border-bottom: 1px solid var(--ledger-border);
  }

  .tally-ledger-summary-strip {
    grid-template-columns: 1fr;
  }

  .tally-ledger-summary-item {
    border-right: none;
    border-bottom: 1px solid var(--ledger-border);
  }

  .tally-ledger-summary-item:last-child {
    border-bottom: none;
  }

  .tally-ledger-book {
    font-size: 11px;
  }

  .tally-ledger-table {
    min-width: 640px;
  }
}

/* ==================== PRINT STYLES ==================== */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  body:not([data-page="ledger"]) .app-wrapper,
  .print-actions-top,
  #login-container,
  .modal {
    display: none !important;
  }
  .print-overlay-container {
    position: static !important;
    background: none !important;
    padding: 0 !important;
    overflow: visible !important;
  }
  .tally-invoice-sheet {
    box-shadow: none !important;
    border: 1.5px solid #000000 !important;
    margin: 0 !important;
    page-break-inside: avoid;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
  }

  .tally-party-section,
  .tally-party-section tbody {
    display: table !important;
    width: 100% !important;
  }

  .tally-party-section tr {
    display: table-row !important;
  }

  .tally-party-section td {
    display: table-cell !important;
    width: 50% !important;
    border-left: none !important;
    border-right: 1px solid #000000 !important;
  }

  .tally-party-meta {
    border-top: none !important;
    border-right: none !important;
  }

  .tally-meta-table tr {
    display: table-row !important;
  }

  .tally-meta-table td {
    display: table-cell !important;
    width: 50% !important;
    border-top: 1px solid #000000 !important;
  }

  .tally-meta-table tr:last-child td {
    width: 100% !important;
  }

  .tally-items-scroll {
    overflow: visible !important;
  }

  .tally-items-table {
    min-width: 0 !important;
  }

  .tally-contact-sep {
    display: inline !important;
  }

  .tally-contact-line {
    display: block !important;
    flex-direction: row !important;
  }
  .no-print {
    display: none !important;
  }

  /* Ledger print */
  body[data-page="ledger"] .app-wrapper {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
  }

  body[data-page="ledger"] .sidebar,
  body[data-page="ledger"] .sidebar-backdrop,
  body[data-page="ledger"] .top-bar,
  body[data-page="ledger"] .ledger-toolbar,
  body[data-page="ledger"] .ledger-filter-bar,
  body[data-page="ledger"] .btn-menu-toggle {
    display: none !important;
  }

  body[data-page="ledger"] .main-content,
  body[data-page="ledger"] .view-panel-container,
  body[data-page="ledger"] .tally-ledger-scroll {
    overflow: visible !important;
    height: auto !important;
    padding: 0 !important;
  }

  body[data-page="ledger"] .tally-ledger-book {
    box-shadow: none !important;
    max-width: 100% !important;
    page-break-inside: avoid;
    margin-bottom: 1rem;
  }

  body[data-page="ledger"] .tally-ledger-table-scroll {
    overflow: visible !important;
  }

  body[data-page="ledger"] .tally-ledger-table {
    min-width: 0 !important;
  }
}

/* --- Activity / Update History --- */
.dashboard-box-full {
  grid-column: 1 / -1;
}

.activity-feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 420px;
  overflow-y: auto;
}

.activity-feed-modal {
  max-height: 60vh;
}

.activity-item {
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: #F7F8F9;
  transition: var(--transition-fast);
}
.activity-item:hover {
  border-color: var(--border-strong);
  background: rgba(99, 102, 241, 0.04);
}

.activity-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
}

.activity-action-pill {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
}

.activity-action-pill.created { background: rgba(34, 197, 94, 0.15); color: #86efac; }
.activity-action-pill.updated { background: rgba(59, 130, 246, 0.15); color: #93c5fd; }
.activity-action-pill.deleted { background: rgba(239, 68, 68, 0.15); color: #fca5a5; }
.activity-action-pill.status-changed { background: rgba(168, 85, 247, 0.15); color: #d8b4fe; }
.activity-action-pill.converted { background: rgba(20, 184, 166, 0.15); color: #5eead4; }
.activity-action-pill.payment-recorded { background: rgba(234, 179, 8, 0.15); color: #fde047; }

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

.activity-summary {
  font-size: 0.9rem;
  line-height: 1.4;
}

.activity-actor {
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.activity-changes {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.activity-changes li {
  margin-bottom: 0.2rem;
}

.activity-empty {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-muted);
}

/* ==================== ENTERPRISE UI LAYER → JIRA OVERRIDES ==================== */

.breadcrumb {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: normal;
}
.breadcrumb-current {
  color: var(--text-main);
  font-weight: 500;
}
.page-title {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-main);
}
.role-chip {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: 3px;
  background: var(--jira-blue-subtle);
  color: var(--jira-blue-text);
  border: none;
}
.company-badge-name {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  max-width: 200px;
}
.view-panel-container {
  padding: var(--space-page) 1.5rem 2rem;
  background: var(--bg-primary);
  background-image: none;
}
.dashboard-box,
.glass-card,
.table-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  padding: 1rem;
}
.kpi-card-highlight {
  border-color: var(--border-color);
  background: var(--bg-secondary);
}
.kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
}
.icon-blue { background: #E9F2FF; color: #0052CC; }
.icon-indigo { background: #EAE6FF; color: #5E4DB2; }
.icon-emerald { background: #DCFFF1; color: #216E4E; }
.icon-rose { background: #FFEDEB; color: #AE2E24; }
.icon-amber { background: #FFF7D6; color: #974F0C; }
.page-toolbar-filters {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.65rem 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.modal {
  background: rgba(9, 30, 66, 0.54);
}
.modal-content {
  background: var(--bg-secondary);
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(9, 30, 66, 0.2);
}
.modal-header {
  border-bottom: 1px solid var(--border-color);
  padding: 0 0 0.55rem;
  margin-bottom: 0.75rem;
}
.modal-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
}
.tab-btn.active {
  background: var(--jira-blue);
  color: #fff;
  border-radius: var(--radius-sm);
}
.login-enterprise-brand {
  background: var(--jira-sidebar);
  border-right: 1px solid #2C333A;
}
.login-brand-inner h1 {
  color: #FFFFFF;
}
.login-brand-tagline,
.login-brand-features li {
  color: var(--jira-sidebar-text);
}
.login-enterprise-form {
  background: var(--bg-primary);
}
.login-card-enterprise .login-header h2 {
  color: var(--text-main);
}
.text-success { color: #216E4E; }
.text-warning { color: #974F0C; }
.text-danger { color: #AE2E24; }

.page-heading {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}
.page-toolbar {
  margin-bottom: 1rem;
}
.page-toolbar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.login-enterprise {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}
.login-enterprise-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}
.login-enterprise-form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.login-brand-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--jira-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}
.table-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-secondary);
}
.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

@media (max-width: 992px) {
  .login-enterprise {
    grid-template-columns: 1fr;
  }
  .login-enterprise-brand {
    display: none;
  }
  .login-enterprise-form {
    min-height: 100vh;
  }
  .role-chip {
    display: none;
  }
  .breadcrumb {
    display: none;
  }
  .page-title {
    font-size: 1rem;
  }
}

.col-sr {
  width: 48px;
  text-align: center;
  white-space: nowrap;
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--color-primary, #4c8bf5);
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.link-btn:hover {
  text-decoration: underline;
}

.badge-info {
  background: rgba(76, 139, 245, 0.15);
  color: #4c8bf5;
}

.dashboard-grid-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.panel-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md, 8px);
  padding: 1rem;
}

.panel-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.panel-card-head .panel-card-title {
  margin: 0;
}
.panel-card-title {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
}

.panel-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-start;
}

.salary-field-muted {
  opacity: 0.55;
}

@media (max-width: 992px) {
  .dashboard-grid-2col {
    grid-template-columns: 1fr;
  }
}

/* ==================== UI POLISH ==================== */
.page-header-text h3,
.panel-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-main);
}
.page-title {
  font-weight: 600;
  letter-spacing: -0.03em;
}
.kpi-grid {
  gap: 1rem;
  margin-bottom: 1.35rem;
}
.kpi-card {
  border-radius: 12px;
  padding: 1.05rem 1.15rem;
}
.kpi-data h3 {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}
.kpi-data p {
  font-size: 1.45rem;
  letter-spacing: -0.03em;
  color: var(--text-main);
}
.table-filters,
.page-toolbar-filters {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  box-shadow: var(--card-shadow);
}
.glass-card,
.table-card,
.panel-card {
  border-radius: 12px;
  box-shadow: var(--card-shadow);
}
.data-table th {
  background: #F7F8F9;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #5E6C84;
  padding: 0.7rem 0.8rem;
}
.data-table td {
  padding: 0.75rem 0.8rem;
}
.data-table tbody tr:hover td {
  background: #F8FAFF;
}
.table-actions .btn-sm {
  width: 32px;
  height: 32px;
  padding: 0;
  justify-content: center;
  border-radius: 8px;
}
.table-actions .btn-danger.btn-sm {
  background: #FFFFFF;
  color: #AE2E24;
  border: 1px solid #F5C2C0;
}
.table-actions .btn-danger.btn-sm:hover {
  background: #FFEDEB;
  color: #AE2E24;
}
.status-pill {
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-weight: 700;
}
.role-chip {
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
}
.top-bar {
  min-height: 60px;
  box-shadow: 0 1px 0 rgba(9, 30, 66, 0.04);
}
.sidebar-brand-icon,
.menu-item,
.btn-primary,
.btn-secondary,
.btn-danger {
  border-radius: 8px;
}
.menu-item.active {
  box-shadow: inset 3px 0 0 #FFFFFF;
}
.info-alert {
  color: #0052CC;
  background: #E9F2FF;
  border-color: #B3D4FF;
}

/* Sign-in screen: compact, legible, and responsive. */
body[data-page="login"] { min-height: 100vh; height: auto; background: #f4f7fb; }
.login-enterprise { min-height: 100vh; grid-template-columns: minmax(360px, .88fr) minmax(500px, 1.12fr); }
.login-enterprise-brand { position: relative; overflow: hidden; justify-content: flex-start; padding: clamp(2.5rem, 7vw, 7.5rem); background: radial-gradient(ellipse at 12% 14%, rgba(42,112,223,.34), transparent 42%), linear-gradient(145deg, #17243a 0%, #101b2d 100%); }
.login-enterprise-brand::after { position: absolute; right: -115px; bottom: -175px; width: 420px; height: 420px; border: 1px solid rgba(255,255,255,.09); border-radius: 50%; box-shadow: 0 0 0 42px rgba(255,255,255,.025), 0 0 0 84px rgba(255,255,255,.02); content: ""; pointer-events: none; }
.login-brand-inner { position: relative; z-index: 1; width: min(100%, 510px); }
.login-brand-eyebrow, .login-form-eyebrow { display: inline-flex; align-items: center; gap: .55rem; color: #a9bad1; font-size: .72rem; font-weight: 750; letter-spacing: .14em; }
.login-brand-eyebrow { margin-bottom: 1.5rem; }
.login-brand-eyebrow span { width: 7px; height: 7px; border-radius: 50%; background: #65d6ad; box-shadow: 0 0 0 4px rgba(101,214,173,.12); }
.login-brand-logo { width: 54px; height: 54px; margin: 0 0 1.4rem; border-radius: 15px; background: linear-gradient(145deg, #3485ff, #1260d6); box-shadow: 0 10px 24px rgba(0,70,180,.25); }
.login-brand-inner h1 { margin: 0; font-size: clamp(2rem, 3vw, 2.65rem); font-weight: 720; letter-spacing: -.045em; }
.login-brand-tagline { max-width: 430px; margin: .85rem 0 2rem; color: #adbacb; font-size: 1.02rem; line-height: 1.7; }
.login-brand-features { display: grid; gap: .95rem; margin: 0; padding: 0; list-style: none; }
.login-brand-features li { display: flex; align-items: center; gap: .7rem; color: #d7e1ee; font-size: .91rem; }
.login-brand-features i { display: grid; width: 22px; height: 22px; place-items: center; border: 1px solid rgba(121,216,184,.24); border-radius: 50%; background: rgba(121,216,184,.1); color: #78d9b7; font-size: .65rem; }
.login-brand-trust { display: flex; align-items: center; gap: .55rem; margin-top: 2.4rem; color: #9eafc3; font-size: .8rem; }
.login-brand-trust i { color: #78d9b7; }
.login-brand-footer { margin-top: 2.75rem; color: #8292a7; font-size: .76rem; }
.login-enterprise-form { padding: 2rem; background: radial-gradient(ellipse at 85% 10%, #e8f0fc 0, transparent 38%), #f7f9fc; }
.login-card-enterprise { width: min(100%, 470px); max-width: 470px; padding: 2.35rem; border: 1px solid #e3e9f1; border-radius: 18px; background: rgba(255,255,255,.96); box-shadow: 0 20px 60px rgba(28,47,78,.09), 0 2px 7px rgba(28,47,78,.04); }
.login-card-enterprise .login-header { margin-bottom: 1.8rem; text-align: left; }
.login-card-enterprise .login-header h2 { margin-top: .65rem; color: #17243b; font-size: 1.75rem; letter-spacing: -.045em; }
.login-card-enterprise .login-header p { margin-top: .45rem; color: #66758c; font-size: .92rem; line-height: 1.55; }
.login-form-eyebrow { color: #1769e0; font-size: .66rem; }
.login-card-enterprise .form-group { margin-bottom: 1.15rem; }
.login-card-enterprise .form-group label { margin-bottom: .45rem; color: #46566e; font-size: .76rem; font-weight: 700; letter-spacing: .055em; text-transform: uppercase; }
.login-card-enterprise .input-icon-wrap { height: 48px; border: 1px solid #dce3ed; border-radius: 9px; background: #fff; }
.login-card-enterprise .input-icon-wrap:focus-within { border-color: #4c9aff; box-shadow: 0 0 0 3px rgba(76,154,255,.13); }
.login-card-enterprise .input-icon-wrap input { font-size: .92rem; }
.login-card-enterprise .btn-full { height: 48px; margin-top: .35rem; border-radius: 9px; font-size: .93rem; font-weight: 700; }
.login-secure-note { display: flex; justify-content: center; align-items: center; gap: .45rem; margin-top: 1.25rem; color: #7b8798; font-size: .75rem; }
.login-secure-note i { color: #53836f; }
.login-mobile-mark { display: none; }
.login-card-enterprise .error-msg { color: #a62922; }
@media (max-width: 900px) {
  .login-enterprise { grid-template-columns: 1fr; }
  .login-enterprise-brand { display: none; }
  .login-enterprise-form { min-height: 100vh; padding: 1.25rem; }
  .login-card-enterprise { padding: clamp(1.35rem, 6vw, 2.25rem); }
  .login-mobile-mark { display: grid; width: 44px; height: 44px; margin-bottom: 1.2rem; place-items: center; border-radius: 12px; background: #1769e0; color: #fff; font-size: 1.1rem; }
}
@media (max-width: 420px) {
  .login-card-enterprise .login-header h2 { font-size: 1.5rem; }
  .login-secure-note { align-items: flex-start; text-align: center; }
}

/* Narrow login view: retain brand identity and avoid an oversized form card. */
@media (max-width: 992px) {
  body[data-page="login"] .login-enterprise { min-height: 100svh; grid-template-columns: minmax(0, 1fr); }
  body[data-page="login"] .login-enterprise-brand { display: none; }
  body[data-page="login"] .login-enterprise-form { min-height: 100svh; align-items: center; padding: 1.25rem; }
  body[data-page="login"] .login-card-enterprise { width: min(100%, 410px); max-width: 410px; padding: 1.75rem; }
  body[data-page="login"] .login-mobile-mark { display: grid; }
  body[data-page="login"] .login-card-enterprise .login-header h2 { font-size: 1.55rem; }
}
@media (max-width: 480px) {
  body[data-page="login"] .login-card-enterprise { padding: 1.35rem; }
  body[data-page="login"] .login-card-enterprise .login-header h2 { font-size: 1.4rem; }
}

/* Altron's soft lavender and peach workspace theme. */
:root {
  --bg-primary: #f7f6fc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #fbfaff;
  --jira-page: #f7f6fc;
  --accent-color: #6158e8;
  --accent-hover: #5148d2;
  --accent-light: #5148d2;
  --accent-muted: #eeedff;
  --jira-blue: #6158e8;
  --jira-blue-hover: #5148d2;
  --jira-blue-subtle: #eeedff;
  --jira-blue-text: #5148d2;
  --border-color: #e7e4f1;
  --border-strong: #d8d3e5;
  --border-focus: #958df2;
  --card-shadow: 0 3px 12px rgba(67, 53, 125, .055), 0 18px 42px rgba(67, 53, 125, .045);
}
body { background-color: var(--bg-primary); }
.btn-primary { background: linear-gradient(110deg, #6259e9, #7865ed); border-color: #6259e9; }
.btn-primary:hover { background: linear-gradient(110deg, #534ad5, #6856df); }
.sidebar { background: linear-gradient(180deg, #211e35 0%, #19182b 100%); }
.menu-item.active { background: linear-gradient(100deg, rgba(113,99,238,.95), rgba(103,94,225,.88)); }
.glass-card, .dashboard-card, .stat-card, .table-card, .modal-content { border-color: #e8e5f1; }
.status-pill { border-radius: 999px; }

/* Reference-inspired sign-in: account form beside a soft, playful workspace illustration. */
body[data-page="login"] { min-height: 100vh; height: auto; background: #f1effc; }
body[data-page="login"] #login-container.login-enterprise { display: grid; min-height: 100svh; grid-template-columns: minmax(430px, .92fr) minmax(500px, 1.08fr); background: linear-gradient(125deg,#e7e2ff 0%,#f5e4f7 48%,#ffe9df 100%); }
body[data-page="login"] .login-enterprise-form { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 1rem; padding: clamp(1.5rem,5vw,4rem); background: transparent; }
body[data-page="login"] .login-card-enterprise { width: min(100%, 465px); max-width: 465px; padding: clamp(1.65rem,3vw,2.6rem); border: 1px solid rgba(255,255,255,.88); border-radius: 23px; background: rgba(255,255,255,.94); box-shadow: 0 25px 70px rgba(74,60,134,.14), 0 3px 12px rgba(74,60,134,.05); }
.login-card-brand { display: flex; align-items: center; gap: .7rem; margin-bottom: 2.25rem; color: #282442; font-size: .9rem; font-weight: 750; letter-spacing: -.015em; }
.login-logo-frame { display: grid; position: relative; width: 42px; height: 42px; overflow: hidden; place-items: center; border-radius: 13px; background: linear-gradient(145deg,#7467ee,#a078ed); color: #fff; box-shadow: 0 6px 16px rgba(101,87,222,.24); }
.login-logo-frame img, .login-illustration-center img { display: none; width: 100%; height: 100%; object-fit: contain; }
.login-logo-frame img[src]:not([src=""]), .login-illustration-center img[src]:not([src=""]) { display: block; }
.login-logo-frame:has(img[src]:not([src=""])) i, .login-illustration-center:has(img[src]:not([src=""])) i { display: none; }
.login-card-enterprise .login-header { margin-bottom: 1.7rem; text-align: left; }
.login-card-enterprise .login-header h1 { margin-top: .65rem; color: #24213b; font-size: clamp(1.65rem,2.5vw,2rem); line-height: 1.18; letter-spacing: -.045em; }
.login-card-enterprise .login-header p { margin-top: .55rem; color: #73718c; font-size: .9rem; line-height: 1.55; }
.login-form-eyebrow { color: #645be2; font-size: .68rem; font-weight: 800; letter-spacing: .14em; }
.login-card-enterprise .form-group { margin-bottom: 1.05rem; }
.login-card-enterprise .form-group label { display: block; margin-bottom: .45rem; color: #56536f; font-size: .76rem; font-weight: 700; letter-spacing: .045em; text-transform: none; }
.login-card-enterprise .input-icon-wrap { display: flex; height: 48px; align-items: center; gap: .65rem; padding: 0 .85rem; border: 1px solid #e4e1ef; border-radius: 10px; background: #fbfaff; color: #84809d; }
.login-card-enterprise .input-icon-wrap:focus-within { border-color: #8d82ed; background: #fff; box-shadow: 0 0 0 3px rgba(119,104,231,.13); }
.login-card-enterprise .input-icon-wrap input { min-width: 0; border: 0; outline: 0; background: transparent; color: #2b2942; font-size: .88rem; }
.login-options { display: flex; align-items: center; justify-content: space-between; margin: .25rem 0 1.2rem; color: #77748d; font-size: .75rem; }
.login-options label { display: flex; align-items: center; gap: .4rem; }
.login-options input { accent-color: #655be3; }
.login-options a { color: #6358dc; font-weight: 650; text-decoration: none; }
.login-options a:hover { text-decoration: underline; }
body[data-page="login"] .login-card-enterprise .btn-full { display: flex; width: 100%; height: 48px; align-items: center; justify-content: center; gap: .6rem; border: 0; border-radius: 10px; background: linear-gradient(100deg,#6158e8,#7566eb); box-shadow: 0 7px 17px rgba(97,88,232,.22); font-size: .88rem; font-weight: 750; }
.login-secure-note { display: flex; justify-content: center; gap: .45rem; margin-top: 1.2rem; color: #89869d; font-size: .72rem; }
.login-secure-note i { color: #6e9e91; }
.login-copyright { color: #817d98; font-size: .7rem; text-align: center; }
.login-enterprise-brand { position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: clamp(2.5rem,5vw,5rem); border: 0; background: transparent; }
.login-hero-copy { position: relative; z-index: 2; max-width: 510px; margin: 0 auto; }
.login-brand-eyebrow { display: inline-flex; align-items: center; gap: .55rem; color: #706b97; font-size: .68rem; font-weight: 800; letter-spacing: .14em; }
.login-brand-eyebrow span { width: 7px; height: 7px; border-radius: 50%; background: #57b99d; box-shadow: 0 0 0 4px rgba(87,185,157,.13); }
.login-hero-copy h2 { max-width: 500px; margin: 1.1rem 0 .7rem; color: #272344; font-size: clamp(2rem,3vw,3.1rem); line-height: 1.08; letter-spacing: -.05em; }
.login-hero-copy h2 em { color: #655be0; font-style: normal; }
.login-hero-copy > p { max-width: 440px; color: #706d8b; font-size: .94rem; line-height: 1.7; }
.login-brand-features { display: grid; gap: .65rem; margin-top: 1.4rem; padding: 0; list-style: none; }
.login-brand-features li { display: flex; align-items: center; gap: .6rem; color: #56536f; font-size: .8rem; }
.login-brand-features i { display: grid; width: 20px; height: 20px; place-items: center; border-radius: 50%; background: #e1f6ee; color: #3c9b7d; font-size: .6rem; }
.login-illustration { position: relative; width: min(100%,650px); height: 390px; margin: 1.5rem auto .5rem; }
.login-illustration-glow { position: absolute; inset: 12% 14%; border-radius: 48%; background: radial-gradient(ellipse,#b4a8ff 0%,#d2c9ff 39%,rgba(232,223,255,.15) 73%,transparent 74%); filter: drop-shadow(0 15px 24px rgba(112,91,213,.18)); }
.login-illustration-orbit { position: absolute; z-index: 1; left: 50%; top: 50%; width: 68%; height: 76%; transform: translate(-50%,-50%) rotate(-18deg); border: 1px solid rgba(104,89,206,.21); border-radius: 50%; }
.orbit-two { width: 78%; height: 61%; transform: translate(-50%,-50%) rotate(34deg); border-color: rgba(237,153,177,.32); }
.login-illustration-center { position: absolute; z-index: 3; left: 50%; top: 50%; display: grid; width: 104px; height: 104px; transform: translate(-50%,-50%); place-items: center; border: 7px solid rgba(255,255,255,.55); border-radius: 34px; background: linear-gradient(145deg,#6359e4,#9271eb); box-shadow: 0 14px 30px rgba(87,71,187,.27); color: #fff; font-size: 2.3rem; }
.login-float-card { position: absolute; z-index: 4; display: flex; min-width: 205px; align-items: center; gap: .65rem; padding: .75rem .85rem; border: 1px solid rgba(255,255,255,.9); border-radius: 15px; background: rgba(255,255,255,.87); box-shadow: 0 12px 30px rgba(75,62,126,.12); backdrop-filter: blur(12px); }
.login-float-card strong, .login-float-card small { display: block; }
.login-float-card strong { color: #35314f; font-size: .72rem; }
.login-float-card small { margin-top: .17rem; color: #88849d; font-size: .62rem; }
.float-icon { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; border-radius: 11px; font-size: .9rem; }
.float-icon.violet { background: #eeebff; color: #6b5ce3; }
.float-icon.peach { background: #fff0e9; color: #e58c6e; }
.float-icon.blue { background: #e8f3ff; color: #5795dc; }
.float-leads { left: 0; top: 12%; }
.float-projects { right: 1%; top: 43%; }
.float-finance { left: 4%; bottom: 8%; }
.float-trend { margin-left: auto; color: #49ae8b; font-size: .8rem; }
.login-illustration-dots { position: absolute; right: 13%; top: 8%; width: 80px; height: 80px; opacity: .35; background-image: radial-gradient(#8e80e7 1.5px,transparent 1.5px); background-size: 13px 13px; }
.login-hero-footer { position: relative; z-index: 2; display: flex; justify-content: space-between; gap: 1rem; color: #827d9c; font-size: .7rem; }
.login-hero-footer i { margin-right: .35rem; color: #6da58f; }
@media (max-width: 900px) {
  body[data-page="login"] #login-container.login-enterprise { min-height: 100svh; grid-template-columns: 1fr; }
  body[data-page="login"] .login-enterprise-brand { display: flex; order: -1; min-height: 420px; padding: 2rem 1.25rem .75rem; }
  .login-hero-copy { width: min(100%,500px); }
  .login-hero-copy h2 { font-size: 2rem; }
  .login-hero-copy > p { font-size: .82rem; }
  .login-brand-features { display: none; }
  .login-illustration { height: 200px; margin: .4rem auto 0; }
  .login-illustration-center { width: 68px; height: 68px; border-radius: 23px; font-size: 1.5rem; }
  .login-float-card { min-width: 165px; padding: .55rem; }
  .float-icon { width: 30px; height: 30px; }
  .float-leads { left: 0; top: 0; }
  .float-projects { right: 0; top: 35%; }
  .float-finance { left: 0; bottom: 0; }
  .login-hero-footer { display: none; }
  body[data-page="login"] .login-enterprise-form { min-height: auto; padding: .5rem 1.25rem 1.25rem; }
  body[data-page="login"] .login-card-enterprise { width: min(100%,480px); max-width: 480px; }
}
@media (max-width: 520px) {
  body[data-page="login"] .login-enterprise-brand { min-height: 350px; }
  .login-hero-copy h2 { margin-top: .65rem; font-size: 1.65rem; }
  .login-illustration { height: 155px; }
  .login-float-card { min-width: 145px; gap: .45rem; }
  .login-float-card strong { font-size: .64rem; }
  .login-float-card small { font-size: .56rem; }
  body[data-page="login"] .login-card-enterprise { padding: 1.3rem; }
  .login-card-brand { margin-bottom: 1.4rem; }
  .login-hero-footer { display: none; }
}

/* Login layout guardrails for short viewports, browser zoom, and narrow devices. */
body[data-page="login"] { width: 100%; min-height: 100%; overflow-x: hidden; }
body[data-page="login"] #login-container.login-enterprise { width: 100%; max-width: 100vw; align-items: stretch; overflow: hidden; }
body[data-page="login"] .login-enterprise-form { min-width: 0; min-height: 100svh; }
body[data-page="login"] .login-enterprise-brand { min-width: 0; }
.login-hero-copy { width: 100%; }
.login-illustration { max-width: 100%; overflow: hidden; }
.login-hero-footer { flex-wrap: wrap; }
@media (max-width: 1100px) and (min-width: 901px) {
  body[data-page="login"] #login-container.login-enterprise { grid-template-columns: minmax(390px,.95fr) minmax(0,1.05fr); }
  body[data-page="login"] .login-enterprise-form { padding: 1.25rem; }
  body[data-page="login"] .login-card-enterprise { padding: 1.65rem; }
  .login-enterprise-brand { padding: 2rem 1.25rem; }
  .login-float-card { min-width: 170px; }
}
@media (max-width: 900px) {
  body[data-page="login"] #login-container.login-enterprise { display: flex; flex-direction: column; min-height: 100svh; overflow: visible; }
  body[data-page="login"] .login-enterprise-brand { order: 0; flex: 0 0 auto; min-height: 330px; padding: 1.5rem 1.1rem .3rem; }
  body[data-page="login"] .login-enterprise-form { order: 1; flex: 0 0 auto; justify-content: flex-start; min-height: 0; padding: .75rem 1rem 1.5rem; }
  body[data-page="login"] .login-card-enterprise { margin: 0 auto; }
  body[data-page="login"] .login-copyright { margin: .1rem 0 .75rem; }
}
@media (max-width: 520px) {
  body[data-page="login"] .login-enterprise-brand { min-height: 290px; padding-top: 1.2rem; }
  body[data-page="login"] .login-illustration { height: 132px; }
  body[data-page="login"] .login-hero-copy h2 { font-size: 1.5rem; }
  body[data-page="login"] .login-hero-copy > p { max-width: 360px; font-size: .76rem; }
  body[data-page="login"] .login-float-card { min-width: 132px; max-width: 48%; }
}
@media (max-height: 760px) and (min-width: 901px) {
  body[data-page="login"] .login-enterprise-form { justify-content: flex-start; padding-top: 1.25rem; padding-bottom: 1.25rem; }
  body[data-page="login"] .login-card-enterprise { padding-top: 1.4rem; padding-bottom: 1.4rem; }
  .login-card-brand { margin-bottom: 1.1rem; }
  .login-card-enterprise .login-header { margin-bottom: 1rem; }
}

/* Keep the login control's focus treatment on the wrapper only. */
body[data-page="login"] .login-card-enterprise .form-group .input-icon-wrap input,
body[data-page="login"] .login-card-enterprise .form-group .input-icon-wrap input:focus,
body[data-page="login"] .login-card-enterprise .form-group .input-icon-wrap input:focus-visible {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}
body[data-page="login"] .login-card-enterprise .form-group .input-icon-wrap:focus-within {
  outline: 2px solid rgba(119,104,231,.22);
  outline-offset: 2px;
}

/* Keep the password visibility control fully inside its field. */
body[data-page="login"] .login-card-enterprise .input-icon-wrap.password-field { overflow: visible; }
body[data-page="login"] .login-card-enterprise .input-icon-wrap.password-field input { padding-right: 3.25rem !important; }
body[data-page="login"] .login-card-enterprise .password-toggle-btn {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: .45rem;
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  transform: translateY(-50%);
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
}
body[data-page="login"] .login-card-enterprise .password-toggle-btn i {
  position: static;
  left: auto;
  top: auto;
  transform: none;
  color: #77748e;
}

/* Logo-led login art after removing the marketing copy. */
body[data-page="login"] .login-enterprise-brand { justify-content: center; padding: clamp(1.5rem,4vw,3.5rem); }
body[data-page="login"] .login-illustration { width: min(100%,760px); height: min(70vh,620px); min-height: 390px; margin: 0 auto; overflow: visible; }
body[data-page="login"] .login-illustration-glow { inset: 8% 11%; background: radial-gradient(ellipse,#a99bff 0%,#c9bdff 38%,rgba(239,225,255,.45) 67%,transparent 74%); }
body[data-page="login"] .login-illustration-center { width: 126px; height: 126px; border-radius: 38px; }
body[data-page="login"] .login-float-card { min-width: 220px; padding: .9rem 1rem; }
body[data-page="login"] .float-icon { width: 42px; height: 42px; border-radius: 13px; }
body[data-page="login"] .login-hero-footer { position: absolute; right: 2rem; bottom: 1.5rem; left: 2rem; }
@media (max-width: 900px) {
  body[data-page="login"] .login-enterprise-brand { min-height: 290px; padding: .5rem 1rem 0; }
  body[data-page="login"] .login-illustration { width: min(100%,560px); height: 260px; min-height: 0; margin: 0 auto; }
  body[data-page="login"] .login-illustration-center { width: 78px; height: 78px; border-radius: 25px; }
  body[data-page="login"] .login-float-card { min-width: 165px; padding: .55rem; }
  body[data-page="login"] .float-icon { width: 32px; height: 32px; }
  body[data-page="login"] .login-hero-footer { display: none; }
}
@media (max-width: 520px) {
  body[data-page="login"] .login-enterprise-brand { min-height: 230px; }
  body[data-page="login"] .login-illustration { height: 210px; }
  body[data-page="login"] .login-float-card { min-width: 138px; }
}

/* Altron green login concept, based on the supplied reference. */
:root {
  --accent-color: #008b50;
  --accent-hover: #007342;
  --accent-light: #087a4b;
  --accent-muted: #e4f5eb;
  --jira-blue: #078b50;
  --jira-blue-hover: #007342;
  --jira-blue-subtle: #e4f5eb;
  --jira-blue-text: #087a4b;
  --border-focus: #48aa78;
}
body[data-page="login"] { background: #f4faf7; }
body[data-page="login"] #login-container.login-enterprise { grid-template-columns: minmax(430px,.88fr) minmax(520px,1.12fr); background: linear-gradient(110deg,#fff 0%,#fbfdfc 41%,#eef9f3 68%,#e8f7ee 100%); }
body[data-page="login"] .login-enterprise-form { background: transparent; }
body[data-page="login"] .login-card-enterprise { border-color: #edf2ee; box-shadow: 0 22px 65px rgba(23,77,49,.09),0 3px 10px rgba(23,77,49,.035); }
.login-card-brand { color: #152c22; }
.login-logo-frame { background: linear-gradient(145deg,#079454,#006d3b); box-shadow: 0 6px 16px rgba(0,119,65,.2); }
.login-form-eyebrow { color: #07844a; }
.login-options a { color: #07844a; }
.login-card-enterprise .input-icon-wrap:focus-within { border-color: #32a66c; box-shadow: 0 0 0 3px rgba(32,157,91,.12); }
body[data-page="login"] .login-card-enterprise .btn-full { background: linear-gradient(105deg,#078c4f,#009b58); box-shadow: 0 7px 17px rgba(0,133,72,.2); }
body[data-page="login"] .login-card-enterprise .btn-full:hover { background: linear-gradient(105deg,#067a45,#00884d); }
.login-hero-brand-lockup { position: absolute; z-index: 4; top: clamp(1.5rem,5vw,4.5rem); left: clamp(1.5rem,5vw,4.5rem); display: flex; align-items: center; gap: .75rem; color: #087747; font-size: 1rem; font-weight: 800; letter-spacing: .015em; }
.login-hero-logo { display: grid; position: relative; width: 54px; height: 54px; overflow: hidden; place-items: center; color: #078c4f; font-size: 2rem; }
.login-hero-logo img { display: none; width: 100%; height: 100%; object-fit: contain; }
.login-hero-logo img[src]:not([src=""]) { display: block; }
.login-hero-logo:has(img[src]:not([src=""])) i { display: none; }
.login-hero-message { position: absolute; z-index: 3; top: 31%; left: clamp(1.5rem,6vw,5rem); }
.login-hero-message h2 { color: #17231d; font-size: clamp(2.8rem,5vw,5.3rem); font-weight: 500; line-height: .98; letter-spacing: -.06em; }
.login-hero-message h2 strong { color: #087b47; font-weight: 800; }
.login-hero-message p { margin-top: 1.05rem; color: #26382e; font-size: clamp(1rem,1.8vw,1.45rem); }
.login-hero-rule { display: block; width: 98px; height: 3px; margin-top: 1.35rem; background: linear-gradient(90deg,#078c4f,transparent); }
body[data-page="login"] .login-illustration { position: absolute; right: 0; bottom: 5.3rem; width: 70%; height: 62%; min-height: 390px; margin: 0; overflow: hidden; }
.login-cityline { position: absolute; right: 0; bottom: 18%; left: 0; display: flex; height: 40%; align-items: flex-end; justify-content: space-around; opacity: .48; background: linear-gradient(0deg,rgba(114,211,163,.32),transparent); }
.login-cityline i { display: block; width: 8%; height: 68%; background: repeating-linear-gradient(0deg,rgba(24,143,91,.14) 0 5px,transparent 5px 12px),linear-gradient(90deg,#aadbc1,#d6efe0); clip-path: polygon(8% 0,85% 0,100% 100%,0 100%); }
.login-cityline i:nth-child(2n) { height: 90%; width: 10%; }
.login-cityline i:nth-child(3n) { height: 54%; width: 7%; }
.login-hero-a { position: absolute; z-index: 2; right: 4%; bottom: 9%; width: 65%; height: 88%; filter: drop-shadow(0 18px 24px rgba(0,117,65,.19)); }
.login-hero-a::before { position: absolute; inset: 0; background: linear-gradient(125deg,#3cc979 0%,#0a9856 45%,#006b3e 100%); clip-path: polygon(0 100%,39% 0,57% 0,100% 100%,75% 100%,50% 39%,24% 100%); content: ""; }
.login-hero-a::after { position: absolute; right: 27%; bottom: 0; width: 33%; height: 40%; background: linear-gradient(90deg,#eef9f3,#c4e9d3); clip-path: polygon(0 100%,100% 100%,52% 0,34% 0); content: ""; }
.login-desk { position: absolute; z-index: 3; right: -8%; bottom: 8%; width: 116%; height: 5%; transform: skewY(4deg); border-radius: 50%; background: linear-gradient(180deg,#fff,#b9d9c8); box-shadow: 0 10px 18px rgba(28,83,55,.15); }
.login-laptop { position: absolute; z-index: 4; right: 24%; bottom: 12%; width: 20%; height: 20%; transform: skewY(-4deg); border: 4px solid #62746b; border-radius: 7px 7px 2px 2px; background: linear-gradient(145deg,#35463e,#18251e); box-shadow: 0 8px 14px rgba(30,56,42,.2); }
.login-laptop span { position: absolute; right: -12%; bottom: -10px; left: -12%; height: 9px; border-radius: 2px 2px 8px 8px; background: linear-gradient(#e2eee7,#82988b); }
.login-plant { position: absolute; z-index: 5; right: 7%; bottom: 13%; width: 62px; height: 115px; }
.login-plant b { position: absolute; bottom: 0; left: 9px; width: 45px; height: 43px; border-radius: 5px 5px 15px 15px; background: linear-gradient(90deg,#e9f1ed,#fff,#bdcfc5); }
.login-plant i { position: absolute; bottom: 36px; left: 28px; width: 20px; height: 65px; transform-origin: bottom; border-radius: 100% 0 100% 0; background: linear-gradient(135deg,#4bc77a,#087a48); }
.login-plant i:nth-child(1) { transform: rotate(-42deg); }
.login-plant i:nth-child(2) { transform: rotate(4deg); height: 78px; }
.login-plant i:nth-child(3) { transform: rotate(40deg); }
.login-hero-footer { position: absolute; z-index: 5; right: 9%; bottom: 2rem; left: 9%; justify-content: center; gap: clamp(1rem,3vw,3rem); color: #64756a; }
.login-hero-footer span { display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap; }
.login-hero-footer span + span { padding-left: clamp(1rem,3vw,3rem); border-left: 1px solid #afc8b8; }
.login-hero-footer i { color: #07884d; }
@media (max-width: 900px) {
  body[data-page="login"] #login-container.login-enterprise { display: flex; flex-direction: column; background: linear-gradient(155deg,#fff 0%,#f0faf4 63%,#e8f7ee 100%); }
  body[data-page="login"] .login-enterprise-brand { order: 0; min-height: 400px; }
  .login-hero-brand-lockup { top: 1rem; left: 1.25rem; font-size: .85rem; }
  .login-hero-logo { width: 40px; height: 40px; }
  .login-hero-message { top: 22%; left: 1.5rem; }
  .login-hero-message h2 { font-size: 2.5rem; }
  .login-hero-message p { margin-top: .5rem; font-size: 1rem; }
  body[data-page="login"] .login-illustration { right: -2%; bottom: 0; width: 58%; height: 64%; min-height: 0; }
  .login-hero-footer { display: none; }
}
@media (max-width: 520px) {
  body[data-page="login"] .login-enterprise-brand { min-height: 320px; }
  .login-hero-message { top: 24%; }
  .login-hero-message h2 { font-size: 2rem; }
  body[data-page="login"] .login-illustration { width: 62%; height: 56%; }
}

/* Forest green navigation and calm executive dashboard, inspired by the reference. */
:root {
  --accent-color: #078b50;
  --accent-hover: #006d3c;
  --accent-light: #087a4b;
  --accent-muted: #e4f5eb;
  --jira-blue: #078b50;
  --jira-blue-hover: #006d3c;
  --jira-blue-subtle: #e5f5ec;
  --jira-blue-text: #087a4b;
  --bg-primary: #f5f8f6;
  --jira-page: #f5f8f6;
  --border-focus: #48aa78;
}
.app-wrapper { background: #f5f8f6; }
.sidebar { background: linear-gradient(180deg,#063b2b 0%,#052f23 100%); border-right: 1px solid rgba(255,255,255,.07); }
.sidebar-brand { min-height: 82px; padding: 1.15rem 1rem; border-bottom-color: rgba(255,255,255,.09); }
.sidebar-brand-icon { background: linear-gradient(145deg,#14aa68,#07864d); box-shadow: 0 5px 15px rgba(0,0,0,.17); }
.sidebar-brand-text span:first-child { color: #f4fff8; font-weight: 750; }
.sidebar-brand-text span:last-child { color: #a8c9b6; letter-spacing: .11em; }
.menu-section-label { margin: 1.25rem .75rem .45rem; color: #88b19b; font-size: .66rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.menu-item { margin: .18rem .5rem; padding: .68rem .75rem; border-radius: 9px; color: #d1e5d9; font-weight: 550; }
.menu-item i { color: #9dc9ad; }
.menu-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.menu-item:hover i { color: #fff; }
.menu-item.active { background: linear-gradient(100deg,#159b5c,#13834f); color: #fff; box-shadow: 0 5px 12px rgba(0,0,0,.12); }
.menu-item.active i { color: #fff; }
.user-profile-badge { padding: .75rem .25rem; border-top: 1px solid rgba(255,255,255,.1); }
.user-profile-badge .avatar { background: #15a566; color: #fff; }
.btn-logout { border-color: rgba(255,255,255,.2); color: #d0e6d8; }
.btn-logout:hover { border-color: rgba(255,255,255,.32); background: rgba(255,255,255,.08); }
.top-bar { min-height: 72px; padding: .6rem 1.6rem; background: rgba(255,255,255,.94); border-bottom-color: #e4ebe6; }
.breadcrumb-root { color: #6b7a70; }
.breadcrumb-current { color: #087a4b; font-weight: 650; }
.page-title { color: #17271f; font-size: 1.25rem; }
.company-badge-name { background: #e6f5ec; border-color: #d3ebdd; color: #087a4b; }
.view-panel-container { padding: 1.4rem clamp(1rem,2vw,2rem) 2rem; background: linear-gradient(145deg,#f7faf8 0%,#f3f7f4 100%); }
.view-panel { max-width: 1800px; width: 100%; }
#view-dashboard { padding: .15rem 0 1rem; }
.dashboard-hero { align-items: center; margin-bottom: 1.65rem; padding: .35rem 0 .1rem; }
.dashboard-greeting { color: #14271d; font-size: 1.55rem; letter-spacing: -.035em; }
.dashboard-subtitle { color: #718078; }
.dashboard-quick-links { gap: .55rem; }
.dashboard-quick-links .btn-secondary { border-color: #e2eae4; background: #fff; color: #32443a; }
.dashboard-quick-links .btn-secondary:hover { border-color: #b3d8c2; background: #eff8f2; color: #087a4b; }
.dashboard-section-label { display: flex; align-items: center; gap: .55rem; margin: 0 0 .75rem; color: #26372e; font-size: .91rem; font-weight: 750; letter-spacing: -.01em; text-transform: none; }
.dashboard-section-label::before { width: 3px; height: 18px; border-radius: 2px; background: #15975a; content: ""; }
.kpi-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: .85rem; margin-bottom: 1.4rem; }
.kpi-card { min-height: 112px; align-items: center; gap: .8rem; padding: 1rem; border-color: #e7ede8; border-radius: 14px; background: rgba(255,255,255,.94); box-shadow: 0 3px 12px rgba(26,67,42,.045); }
.kpi-card:hover { transform: translateY(-2px); border-color: #cfe2d5; box-shadow: 0 8px 22px rgba(26,67,42,.075); }
.kpi-card::after { position: absolute; right: -5px; bottom: -14px; width: 40%; height: 48%; border-radius: 50% 0 0; background: linear-gradient(140deg,transparent,rgba(95,205,151,.12)); content: ""; pointer-events: none; }
.kpi-icon { width: 44px; height: 44px; border-radius: 14px; }
.icon-blue { background: #e9f3ff; color: #2782dd; }
.icon-indigo { background: #f0eaff; color: #8a68d5; }
.icon-emerald { background: #e1f6ed; color: #16945a; }
.icon-rose { background: #e3f6ed; color: #26a06a; }
.icon-amber { background: #fff2d8; color: #dc941e; }
.kpi-data { min-width: 0; }
.kpi-data h3 { color: #5d6d63; font-size: .75rem; font-weight: 600; }
.kpi-data p { color: #17251d; font-size: 1.25rem; font-weight: 750; letter-spacing: -.025em; }
.kpi-data small { display: block; color: #78867d; font-size: .67rem; line-height: 1.5; }
.kpi-data small.text-success { color: #13844e; }
.dashboard-grid { gap: .9rem; }
.dashboard-analytics { margin-bottom: 1.4rem; }
.dashboard-box { min-width: 0; padding: 1rem 1.1rem; border: 1px solid #e5ece7; border-radius: 15px; background: rgba(255,255,255,.96); box-shadow: 0 3px 12px rgba(26,67,42,.045); }
.box-header { margin-bottom: .8rem; padding-bottom: .65rem; border-bottom-color: #edf1ee; }
.box-header h3 { color: #203128; font-size: .9rem; font-weight: 750; }
.box-header h3 i { margin-right: .35rem; color: #138b51; }
.box-link { color: #08854b; font-weight: 650; }
.dashboard-grid-3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
.data-table th { background: #f6f9f7; color: #66746b; }
.data-table td { border-bottom-color: #edf1ee; }
.data-table tbody tr:hover { background: #f3faf5; }
.invoice-health-stat { border-radius: 11px; }
.collection-progress-track { background: #e8efea; }
.collection-progress-fill { background: linear-gradient(90deg,#079251,#41c581); }
@media (max-width: 1200px) { .kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 760px) {
  .top-bar { min-height: 62px; padding: .5rem .8rem; }
  .view-panel-container { padding: 1rem .75rem 1.5rem; }
  .dashboard-grid-3, .dashboard-analytics { grid-template-columns: 1fr; }
  .dashboard-hero { align-items: flex-start; }
}
@media (max-width: 520px) { .kpi-grid { grid-template-columns: 1fr; gap: .65rem; } .kpi-card { min-height: 95px; } }

/* Unified Altron green workspace surfaces across every CRM section. */
body:not([data-page="login"]) { background: #f4f8f5; }
.app-wrapper { background: #f4f8f5; }
.sidebar { background: linear-gradient(165deg,#064832 0%,#043a29 54%,#032d20 100%); }
.sidebar::after { position: absolute; right: -35%; bottom: -7%; left: -28%; height: 28%; border-radius: 50% 50% 0 0; background: linear-gradient(145deg,rgba(25,160,96,.18),rgba(5,82,54,.05)); content: ""; pointer-events: none; }
.sidebar-brand { position: relative; z-index: 1; min-height: 86px; gap: .65rem; padding: 1rem 1.05rem; }
.sidebar-brand img#sidebar-logo { width: 46px !important; height: 46px !important; max-width: 46px !important; border-radius: 10px !important; background: rgba(255,255,255,.96); padding: 3px; }
.sidebar-brand-icon { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 11px; background: linear-gradient(145deg,#21b675,#07864e); }
.sidebar-brand-text { min-width: 0; }
.sidebar-brand-text span:first-child { max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.sidebar-menu { position: relative; z-index: 1; }
.sidebar-footer { position: relative; z-index: 1; }
.menu-section-label { color: #a2c7b0; }
.menu-item.active { position: relative; background: linear-gradient(100deg,#159c5d,#0b8550); box-shadow: 0 4px 12px rgba(0,0,0,.13); }
.menu-item.active::before { position: absolute; top: 7px; bottom: 7px; left: 0; width: 3px; border-radius: 0 4px 4px 0; background: #d9ffe9; content: ""; }
.main-content { position: relative; background: #f4f8f5; }
.top-bar { position: relative; overflow: hidden; min-height: 76px; background: linear-gradient(115deg,rgba(255,255,255,.98) 0%,rgba(248,253,250,.98) 53%,rgba(222,246,232,.84) 100%); border-bottom: 1px solid #dfebe3; }
.top-bar::after { position: absolute; z-index: 0; top: -80px; right: -8%; width: 55%; height: 190px; transform: rotate(-8deg); border-radius: 0 0 0 90%; background: linear-gradient(125deg,transparent,rgba(139,225,176,.11),rgba(83,194,133,.08)); content: ""; pointer-events: none; }
.top-bar-left, .top-actions { position: relative; z-index: 1; }
.view-panel-container { background: radial-gradient(ellipse 47% 24% at 92% 0%,rgba(183,237,204,.22),transparent 100%),radial-gradient(ellipse 42% 25% at 4% 100%,rgba(196,238,211,.15),transparent 100%),#f5f8f6; }
.view-panel { position: relative; }
.page-action-bar, .panel-action-bar { border-bottom-color: #e1ebe4; }
.view-panel .glass-card, .view-panel .dashboard-box, .view-panel .table-card, .view-panel .lead-detail-panel { border: 1px solid #e4ece6; border-radius: 14px; background: rgba(255,255,255,.96); box-shadow: 0 3px 13px rgba(20,67,40,.045); }
.glass-card { backdrop-filter: none; }
.btn-primary { background: linear-gradient(105deg,#078c4f,#079552); border-color: #078c4f; }
.btn-primary:hover { background: linear-gradient(105deg,#067a45,#087f49); border-color: #067a45; }
.btn-secondary { border-color: #dfe9e2; background: #fff; color: #35483d; }
.btn-secondary:hover { border-color: #b9d9c4; background: #eff8f2; color: #087a4b; }
.form-group input, .form-group select, .form-group textarea, .lead-followup-form input, .lead-followup-form select, .lead-followup-form textarea { border-color: #dfe8e2; background-color: #fff; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: #42a873; box-shadow: 0 0 0 3px rgba(30,151,84,.11); }
.table-card, .scroll-table-container { border-color: #e2eae4; border-radius: 13px; background: rgba(255,255,255,.96); }
.data-table th { background: #f4f8f5; color: #5f7065; border-bottom-color: #e5ece7; }
.data-table tbody tr:hover { background: #f2faf5; }
.data-table td { border-bottom-color: #edf2ee; }
.lead-table-scroll { border-color: #e1eae4; background: #fff; }
.lead-view-switch { border-color: #dfe9e2; background: #fff; }
.lead-view-switch button.active { background: #e5f5eb; color: #087a4b; }
.lead-table-search { border-color: #dfe9e2; background: #fff; }
.lead-register-table th { background: #f4f8f5; }
.kanban-column { border-color: #e2eae4; background: rgba(250,252,250,.95); box-shadow: 0 3px 13px rgba(20,67,40,.045); }
.kanban-card { border-color: #e3ebe5; background: #fff; box-shadow: 0 2px 7px rgba(20,67,40,.045); }
.modal { background: rgba(10,35,24,.42); backdrop-filter: blur(5px); }
.modal-content { border-color: #e1eae4; border-radius: 17px; box-shadow: 0 24px 70px rgba(12,49,30,.2); }
.status-pill { border-radius: 999px; }
@media (max-width: 760px) {
  .top-bar { background: linear-gradient(115deg,#fff,#f0f9f3); }
  .view-panel-container { background: #f5f8f6; }
  .sidebar::after { display: none; }
}

/* Unified mint-and-forest design across every CRM module. */
.main-content { background: #f5faf7; }
.top-bar { background: rgba(255,255,255,.91); backdrop-filter: blur(14px); }
.view-panel-container {
  background: #f6f8f7;
}
.panel-action-bar { border-bottom-color: #deebe2; }
.panel-action-bar h3, .page-title { color: #172b20; }
.panel-subtitle, .dashboard-subtitle { color: #65796c; }
.btn-primary { background: linear-gradient(105deg,#078d50,#079a58); border-color: #078d50; }
.btn-primary:hover { background: linear-gradient(105deg,#067744,#087f49); border-color: #067744; }
.btn-secondary { border-color: #dce9df; color: #33483a; background: rgba(255,255,255,.92); }
.btn-secondary:hover { border-color: #9bc9aa; color: #087748; background: #f0faf3; }
.glass-card, .dashboard-box, .table-card, .modal-content, .kanban-column {
  border-color: #e1ebe4;
  background: rgba(255,255,255,.96);
  box-shadow: 0 4px 16px rgba(24,75,46,.045),0 1px 3px rgba(24,75,46,.035);
}
.form-group label { color: #45594b; }
.form-group input, .form-group select, .form-group textarea,
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  border-color: #dfe9e2;
  background-color: #fff;
  color: #25372c;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  border-color: #38a46a;
  box-shadow: 0 0 0 3px rgba(24,151,82,.12);
}
.data-table th, .lead-register-table th { background: #f4f9f5; color: #52675a; }
.data-table td, .lead-register-table td { border-bottom-color: #edf3ee; }
.data-table tbody tr:hover, .lead-register-table tbody tr:hover { background: #f3faf5; }
.lead-view-switch { border-color: #dce9df; background: #fff; }
.lead-view-switch button.active { color: #087a47; background: #e5f5eb; }
.kanban-board { padding: .25rem .1rem 1rem; }
.kanban-column { overflow: hidden; border-radius: 14px; background: rgba(255,255,255,.86); }
.kanban-column .column-header { border-bottom: 1px solid #e8eee9; background: #fff; color: #30483a; }
.kanban-column:nth-child(1) .column-header { border-top: 3px solid #2487ed; background: linear-gradient(180deg,#eff7ff,#fff 75%); }
.kanban-column:nth-child(2) .column-header { border-top: 3px solid #7664e8; background: linear-gradient(180deg,#f5f1ff,#fff 75%); }
.kanban-column:nth-child(3) .column-header { border-top: 3px solid #f39a29; background: linear-gradient(180deg,#fff7eb,#fff 75%); }
.kanban-column:nth-child(4) .column-header { border-top: 3px solid #27ae79; background: linear-gradient(180deg,#effaf5,#fff 75%); }
.kanban-column:nth-child(5) .column-header { border-top: 3px solid #168d57; background: linear-gradient(180deg,#eef8f1,#fff 75%); }
.kanban-column:nth-child(6) .column-header { border-top: 3px solid #168d57; background: linear-gradient(180deg,#eef8f1,#fff 75%); }
.kanban-column:nth-child(7) .column-header { border-top: 3px solid #d79425; background: linear-gradient(180deg,#fff7e9,#fff 75%); }
.kanban-column:nth-child(8) .column-header { border-top: 3px solid #15975b; background: linear-gradient(180deg,#ecf9f1,#fff 75%); }
.kanban-column:nth-child(9) .column-header { border-top: 3px solid #dc5c57; background: linear-gradient(180deg,#fff0ef,#fff 75%); }
.kanban-card { border-color: #e3ebe5; border-radius: 12px; background: #fff; }
.card-btn, .icon-btn { border-color: #e0e9e3; background: #f8fbf9; color: #526c5b; }
.card-btn:hover, .icon-btn:hover { border-color: #acd2b8; background: #edf8f0; color: #087a47; }
.modal { background: rgba(13,43,28,.42); backdrop-filter: blur(5px); }
.modal-content { border-radius: 17px; }
.logo-preview-box { border-color: #dfe9e2; background: linear-gradient(145deg,#f7fbf8,#fff); }
.scroll-table-container, .lead-table-scroll { border-color: #e2ebe5; border-radius: 13px; }
.lead-table-pagination button { border-color: #dce9df; background: #fff; color: #42584a; }
.lead-table-pagination button:not(:disabled):hover { border-color: #a4cfb0; background: #eff8f2; color: #087a47; }
.activity-action-pill.created, .activity-action-pill.followup_added { background: #e5f6ec; color: #087a47; }
@media (max-width: 760px) {
  .view-panel-container { background: #f6f8f7; }
  .panel-action-bar { border-bottom-color: #e3ece5; }
}

/* Keep workspace surfaces clean; avoid decorative green shapes behind content. */
.view-panel-container { background: #f6f8f7 !important; background-image: none !important; }
.sidebar::after { display: none; }
.sidebar-brand.has-brand-logo { justify-content: center; min-height: 88px; padding: .55rem .7rem; }
.sidebar-brand.has-brand-logo #sidebar-logo {
  display: block;
  width: 184px !important;
  height: 70px !important;
  max-width: 100% !important;
  flex: 0 1 184px;
  border-radius: 11px !important;
  background: #fff;
  padding: 7px 10px;
}
.sidebar-brand.has-brand-logo .sidebar-brand-text { display: none; }
.todo-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.8rem; margin:0 0 1rem; }
.todo-summary article { display:flex; align-items:center; justify-content:space-between; padding:1rem 1.15rem; border:1px solid #e3ebe5; border-radius:13px; background:#fff; box-shadow:0 2px 9px rgba(20,67,40,.035); }
.todo-summary span { color:#637368; font-size:.84rem; font-weight:600; }
.todo-summary strong { color:#087a4b; font-size:1.35rem; }
.todo-filters { margin:1rem 0; }
.todo-notes { display:block; max-width:460px; margin-top:.25rem; color:#77847c; white-space:pre-wrap; }
.todo-priority { padding:.25rem .55rem; border-radius:999px; background:#f0f4f1; color:#536459; font-size:.75rem; font-weight:700; }
.todo-priority.high,.todo-priority.urgent { background:#fff0ed; color:#b6382c; }
.todo-priority.low { background:#edf5ff; color:#366db3; }
.todo-inline-status { max-width:150px; padding:.4rem .55rem; border:1px solid #dfe9e2; border-radius:8px; background:#fff; color:#314238; }
.todo-modal-content { width:min(620px,calc(100vw - 2rem)); }
@media(max-width:760px) { .todo-summary { grid-template-columns:repeat(2,minmax(0,1fr)); } }

/* Refined sign-in: quiet form surface with a branded workspace panel. */
body[data-page="login"] { min-height:100vh; background:#f5f8f6; color:#17271f; }
body[data-page="login"] #login-container.login-enterprise { min-height:100svh; grid-template-columns:minmax(440px,.88fr) minmax(0,1.12fr); background:#fff; }
body[data-page="login"] .login-enterprise-form { min-height:100svh; padding:clamp(1.5rem,5vw,4.5rem); background:#fff; }
body[data-page="login"] .login-card-enterprise { width:min(100%,440px); padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; }
body[data-page="login"] .login-card-brand { gap:.8rem; margin-bottom:clamp(2.2rem,6vh,4rem); color:#153b2a; font-size:1.02rem; }
body[data-page="login"] .login-logo-frame { width:52px; height:52px; border:1px solid #e2eee6; border-radius:15px; background:#f4faf6; box-shadow:none; }
body[data-page="login"] .login-logo-frame img { padding:4px; object-fit:contain; }
body[data-page="login"] .login-card-enterprise .login-header { margin-bottom:2rem; text-align:left; }
body[data-page="login"] .login-form-eyebrow { color:#07824a; font-size:.7rem; letter-spacing:.16em; }
body[data-page="login"] .login-card-enterprise .login-header h1 { margin:.65rem 0 0; color:#16251d; font-size:clamp(1.9rem,3vw,2.35rem); font-weight:750; letter-spacing:-.05em; line-height:1.12; }
body[data-page="login"] .login-card-enterprise .login-header p { max-width:360px; margin-top:.7rem; color:#6d7a72; font-size:.96rem; line-height:1.6; }
body[data-page="login"] .login-card-enterprise .form-group { margin-bottom:1.25rem; }
body[data-page="login"] .login-card-enterprise .form-group label { color:#34483b; font-size:.78rem; font-weight:650; letter-spacing:.015em; text-transform:none; }
body[data-page="login"] .login-card-enterprise .input-icon-wrap { height:54px; border:1px solid #dce6df; border-radius:11px; background:#fff; box-shadow:none; }
body[data-page="login"] .login-card-enterprise .input-icon-wrap:focus-within { border-color:#14834f; box-shadow:0 0 0 3px rgba(20,131,79,.12); }
body[data-page="login"] .login-card-enterprise .input-icon-wrap input { height:52px; border:0!important; outline:0!important; box-shadow:none!important; background:transparent!important; }
body[data-page="login"] .login-card-enterprise .input-icon-wrap.password-field input { padding-right:3.2rem!important; }
body[data-page="login"] .login-card-enterprise .password-toggle-btn { right:.55rem; width:34px; height:34px; }
body[data-page="login"] .login-options { margin:.15rem 0 1.2rem; }
body[data-page="login"] .login-options a { color:#087a47; font-weight:650; }
body[data-page="login"] .login-card-enterprise .btn-full { height:54px; border:0; border-radius:11px; background:linear-gradient(105deg,#087b48,#079b58); box-shadow:0 8px 18px rgba(7,132,74,.16); font-weight:700; }
body[data-page="login"] .login-secure-note { margin-top:1.35rem; color:#718078; }
body[data-page="login"] .login-secure-note i { color:#168455; }
body[data-page="login"] .login-copyright { margin-top:1.5rem; color:#7a877f; }
body[data-page="login"] .login-enterprise-brand { min-height:100svh; background:radial-gradient(ellipse at 76% 58%,rgba(107,214,151,.22),transparent 48%),linear-gradient(145deg,#f1faf4 0%,#e5f5eb 100%); }
body[data-page="login"] .login-enterprise-brand::after { border-color:rgba(8,112,64,.09); box-shadow:0 0 0 44px rgba(8,112,64,.025),0 0 0 88px rgba(8,112,64,.018); }
body[data-page="login"] .login-hero-brand-lockup { top:clamp(1.5rem,5vw,4rem); left:clamp(1.5rem,5vw,4rem); }
body[data-page="login"] .login-hero-logo { width:150px; height:60px; }
body[data-page="login"] .login-hero-logo img { object-fit:contain; }
body[data-page="login"] .login-hero-brand-lockup > span:last-child { display:none; }
body[data-page="login"] .login-hero-message { top:27%; left:clamp(1.5rem,6vw,5rem); }
body[data-page="login"] .login-hero-message h2 { font-size:clamp(2.8rem,5vw,5rem); }
body[data-page="login"] .login-illustration { right:0; bottom:4.5rem; width:75%; height:58%; min-height:360px; }
body[data-page="login"] .login-hero-footer { color:#536b5d; }
@media(max-width:900px) {
  body[data-page="login"] #login-container.login-enterprise { display:flex; flex-direction:column; }
  body[data-page="login"] .login-enterprise-brand { order:0; min-height:300px; }
  body[data-page="login"] .login-enterprise-form { order:1; min-height:0; padding:1.5rem 1.25rem 2rem; }
  body[data-page="login"] .login-card-brand { margin-bottom:1.7rem; }
  body[data-page="login"] .login-hero-message { top:34%; }
  body[data-page="login"] .login-hero-message h2 { font-size:2.35rem; }
  body[data-page="login"] .login-illustration { width:58%; height:62%; min-height:0; }
}
@media(max-width:520px) {
  body[data-page="login"] .login-enterprise-brand { min-height:230px; }
  body[data-page="login"] .login-hero-message { top:38%; left:1.25rem; }
  body[data-page="login"] .login-hero-message h2 { font-size:1.8rem; }
  body[data-page="login"] .login-hero-message p { font-size:.9rem; }
  body[data-page="login"] .login-illustration { right:-8%; width:62%; height:55%; }
  body[data-page="login"] .login-hero-footer { display:none; }
}

/* Signature Altron sign-in direction: bright account card, deep forest brand stage. */
body[data-page="login"] { background:#f3f7f4; }
body[data-page="login"] #login-container.login-enterprise { grid-template-columns:minmax(480px,.9fr) minmax(0,1.1fr); background:#f5f8f6; }
body[data-page="login"] .login-enterprise-form { justify-content:center; padding:clamp(1.5rem,5vw,5rem); background:radial-gradient(ellipse at 8% 8%,#edf7f0 0,transparent 42%),#f8faf9; }
body[data-page="login"] .login-card-enterprise { padding:clamp(2rem,3.2vw,3rem); border:1px solid #e6ece8; border-radius:24px; background:#fff; box-shadow:0 24px 70px rgba(22,57,38,.09),0 3px 12px rgba(22,57,38,.035); }
body[data-page="login"] .login-card-brand { margin-bottom:2.5rem; }
body[data-page="login"] .login-logo-frame { width:174px; height:66px; overflow:hidden; border:0; background:#fff; }
body[data-page="login"] .login-logo-frame img { display:block; padding:0!important; object-fit:contain; }
body[data-page="login"] .login-card-brand:has(.login-logo-frame img[src]:not([src=""])) > span:last-child { display:none; }
body[data-page="login"] .login-card-enterprise .login-header { margin-bottom:1.8rem; }
body[data-page="login"] .login-card-enterprise .login-header h1 { font-size:clamp(1.85rem,2.4vw,2.2rem); }
body[data-page="login"] .login-card-enterprise .form-group { margin-bottom:1.1rem; }
body[data-page="login"] .login-card-enterprise .input-icon-wrap { background:#fbfcfb; }
body[data-page="login"] .login-card-enterprise .btn-full { margin-top:.2rem; }
body[data-page="login"] .login-enterprise-brand { min-height:100svh; background:radial-gradient(ellipse at 72% 55%,rgba(28,172,103,.28),transparent 44%),linear-gradient(145deg,#073d2c 0%,#052f23 58%,#03271d 100%); }
body[data-page="login"] .login-enterprise-brand::after { right:-180px; bottom:-210px; width:660px; height:660px; border-color:rgba(171,236,196,.13); box-shadow:0 0 0 55px rgba(171,236,196,.035),0 0 0 110px rgba(171,236,196,.025); }
body[data-page="login"] .login-hero-brand-lockup { padding:.55rem .85rem; border:1px solid rgba(255,255,255,.62); border-radius:14px; background:#fff; box-shadow:0 8px 24px rgba(0,0,0,.12); }
body[data-page="login"] .login-hero-brand-lockup { display:none; }
body[data-page="login"] .login-hero-logo { width:154px; height:54px; }
body[data-page="login"] .login-hero-message h2 { color:#f5fff8!important; text-shadow:0 2px 20px rgba(0,0,0,.12); }
body[data-page="login"] .login-hero-message h2 strong { color:#62e09a!important; }
body[data-page="login"] .login-hero-message p { color:#d3e8db!important; }
body[data-page="login"] .login-hero-rule { background:linear-gradient(90deg,#59d38f,rgba(89,211,143,0)); }
body[data-page="login"] .login-illustration { right:4%; bottom:7rem; width:72%; height:54%; min-height:340px; }
body[data-page="login"] .login-cityline, body[data-page="login"] .login-desk,
body[data-page="login"] .login-laptop, body[data-page="login"] .login-plant { display:none; }
body[data-page="login"] .login-hero-a { right:7%; bottom:-8%; width:54%; height:88%; filter:drop-shadow(0 22px 30px rgba(0,0,0,.2)); opacity:.92; }
body[data-page="login"] .login-hero-a::before { background:linear-gradient(125deg,#49d78a 0%,#10a767 45%,#087447 100%); }
body[data-page="login"] .login-hero-a::after { background:linear-gradient(90deg,#d9f4e4,#a8dfbf); }
body[data-page="login"] .login-hero-footer { color:#c1d8ca; }
body[data-page="login"] .login-hero-footer span + span { border-left-color:rgba(215,244,226,.25); }
body[data-page="login"] .login-hero-footer i { color:#67d99e; }
body[data-page="login"] .login-copyright { margin-top:1.25rem; }
@media(max-width:900px) {
  body[data-page="login"] #login-container.login-enterprise { background:#f5f8f6; }
  body[data-page="login"] .login-enterprise-brand { display:block; min-height:330px; }
  body[data-page="login"] .login-enterprise-form { padding:1.5rem 1.1rem 2rem; }
  body[data-page="login"] .login-card-enterprise { padding:clamp(1.5rem,5vw,2.25rem); }
  body[data-page="login"] .login-card-brand { margin-bottom:1.7rem; }
  body[data-page="login"] .login-illustration { bottom:1.5rem; width:54%; height:60%; }
  body[data-page="login"] .login-hero-message { top:35%; }
  body[data-page="login"] .login-hero-message h2 { font-size:2.35rem; }
}
@media(max-width:520px) {
  body[data-page="login"] .login-enterprise-brand { min-height:250px; }
  body[data-page="login"] .login-hero-brand-lockup { top:.8rem; left:.9rem; }
  body[data-page="login"] .login-hero-message { top:38%; }
  body[data-page="login"] .login-hero-message h2 { font-size:1.9rem; }
  body[data-page="login"] .login-illustration { right:-8%; bottom:.5rem; width:58%; height:56%; }
  body[data-page="login"] .login-hero-footer { display:none; }
}

/* Final sign-in polish: clear green identity, single focus ring, and responsive branding. */
body[data-page="login"] { background:#f3f8f5; color:#14251d; }
body[data-page="login"] #login-container.login-enterprise { min-height:100svh; grid-template-columns:minmax(430px,.9fr) minmax(0,1.1fr); background:linear-gradient(118deg,#fff 0%,#fbfdfb 43%,#edf8f1 72%,#e5f5eb 100%); }
body[data-page="login"] .login-enterprise-form { padding:clamp(1.25rem,4vw,3.5rem); }
body[data-page="login"] .login-card-enterprise { width:min(100%,460px); padding:clamp(1.5rem,3vw,2.35rem); border:1px solid #e3ebe5; border-radius:22px; box-shadow:0 24px 65px rgba(24,72,45,.10),0 3px 10px rgba(24,72,45,.035); }
body[data-page="login"] .login-card-brand { margin-bottom:1.8rem; color:#173b2a; }
body[data-page="login"] .login-logo-frame { width:48px; height:48px; border-radius:14px; background:#f0f8f3; box-shadow:none; }
body[data-page="login"] .login-logo-frame img { width:100%; height:100%; padding:3px; object-fit:contain; }
body[data-page="login"] .login-logo-frame:has(img[src]:not([src=""])) i { display:none; }
body[data-page="login"] .login-card-enterprise .login-header { margin-bottom:1.6rem; }
body[data-page="login"] .login-card-enterprise .login-header h1 { margin:.5rem 0 0; color:#14251d; font-size:clamp(1.7rem,2.5vw,2.15rem); font-weight:750; letter-spacing:-.045em; }
body[data-page="login"] .login-card-enterprise .login-header p { margin-top:.55rem; color:#68796f; font-size:.94rem; }
body[data-page="login"] .login-form-eyebrow, body[data-page="login"] .login-options a { color:#07824a; }
body[data-page="login"] .login-card-enterprise .input-icon-wrap { min-height:54px; border:1px solid #dce7df; border-radius:11px; background:#fff; box-shadow:none; transition:border-color .16s ease,box-shadow .16s ease; }
body[data-page="login"] .login-card-enterprise .input-icon-wrap:focus-within { outline:0; border-color:#15975a; box-shadow:0 0 0 3px rgba(21,151,90,.13); }
body[data-page="login"] .login-card-enterprise .input-icon-wrap input { min-width:0; height:52px; border:0!important; outline:0!important; box-shadow:none!important; background:transparent!important; }
body[data-page="login"] .login-card-enterprise .input-icon-wrap.password-field input { padding-right:3.2rem!important; }
body[data-page="login"] .login-card-enterprise .password-toggle-btn { right:.55rem; width:34px; height:34px; }
body[data-page="login"] .login-card-enterprise .btn-full { height:54px; margin-top:.6rem; border:0; border-radius:11px; background:linear-gradient(105deg,#087d48,#079b58); box-shadow:0 8px 20px rgba(7,132,74,.18); }
body[data-page="login"] .login-card-enterprise .btn-full:hover { background:linear-gradient(105deg,#066d3e,#07864d); }
body[data-page="login"] .login-secure-note, body[data-page="login"] .login-copyright { color:#74837a; }
body[data-page="login"] .login-enterprise-brand { background:radial-gradient(ellipse at 75% 48%,rgba(124,225,166,.19),transparent 48%),linear-gradient(140deg,#f6fcf8,#e7f6ec); }
body[data-page="login"] .login-enterprise-brand::after { border-color:rgba(7,123,68,.08); box-shadow:0 0 0 42px rgba(7,123,68,.025),0 0 0 84px rgba(7,123,68,.018); }
body[data-page="login"] .login-hero-brand-lockup { color:#087747; }
@media(max-width:992px) {
  body[data-page="login"] #login-container.login-enterprise { display:flex; flex-direction:column; padding:clamp(1rem,5vw,2.5rem); background:linear-gradient(145deg,#f9fcfa,#edf8f1); }
  body[data-page="login"] .login-enterprise-brand { display:none; }
  body[data-page="login"] .login-enterprise-form { min-height:calc(100svh - 2rem); padding:0; }
  body[data-page="login"] .login-card-enterprise { width:min(100%,480px); }
}
@media(max-width:520px) {
  body[data-page="login"] #login-container.login-enterprise { padding:.75rem; }
  body[data-page="login"] .login-card-enterprise { padding:1.35rem; border-radius:18px; }
  body[data-page="login"] .login-card-brand { margin-bottom:1.35rem; }
  body[data-page="login"] .login-card-enterprise .login-header { margin-bottom:1.2rem; }
}

/* Final responsive brand stage and logo scale. */
body[data-page="login"] #login-container.login-enterprise { grid-template-columns:minmax(480px,.9fr) minmax(0,1.1fr); background:#f5f8f6; }
body[data-page="login"] .login-enterprise-form { justify-content:center; background:radial-gradient(ellipse at 8% 8%,#edf7f0 0,transparent 42%),#f8faf9; }
body[data-page="login"] .login-card-enterprise { padding:clamp(2rem,3.2vw,3rem); }
body[data-page="login"] .login-card-brand { margin-bottom:2.2rem; }
body[data-page="login"] .login-logo-frame { width:172px; height:64px; overflow:hidden; border:0; border-radius:12px; background:#fff; }
body[data-page="login"] .login-logo-frame img { display:block; padding:0!important; object-fit:contain; }
body[data-page="login"] .login-card-brand:has(.login-logo-frame img[src]:not([src=""])) > span:last-child { display:none; }
body[data-page="login"] .login-enterprise-brand { display:flex; min-height:100svh; background:radial-gradient(ellipse at 72% 55%,rgba(28,172,103,.28),transparent 44%),linear-gradient(145deg,#073d2c 0%,#052f23 58%,#03271d 100%); }
body[data-page="login"] .login-enterprise-brand::after { border-color:rgba(171,236,196,.13); box-shadow:0 0 0 55px rgba(171,236,196,.035),0 0 0 110px rgba(171,236,196,.025); }
body[data-page="login"] .login-hero-brand-lockup { display:none; }
body[data-page="login"] .login-hero-message h2 { color:#f5fff8!important; text-shadow:0 2px 20px rgba(0,0,0,.12); }
body[data-page="login"] .login-hero-message h2 strong { color:#62e09a!important; }
body[data-page="login"] .login-hero-message p { color:#d3e8db!important; }
body[data-page="login"] .login-hero-a { right:7%; bottom:-8%; width:54%; height:88%; opacity:.92; }
body[data-page="login"] .login-cityline, body[data-page="login"] .login-desk, body[data-page="login"] .login-laptop, body[data-page="login"] .login-plant { display:none; }
@media(max-width:992px) {
  body[data-page="login"] #login-container.login-enterprise { display:flex; flex-direction:column; padding:0; background:#f5f8f6; }
  body[data-page="login"] .login-enterprise-brand { display:flex; order:0; min-height:290px; }
  body[data-page="login"] .login-enterprise-form { order:1; min-height:0; padding:1.5rem 1.1rem 2rem; }
  body[data-page="login"] .login-card-enterprise { width:min(100%,480px); }
  body[data-page="login"] .login-hero-message { top:34%; }
  body[data-page="login"] .login-hero-message h2 { font-size:2.25rem; }
  body[data-page="login"] .login-illustration { bottom:1rem; width:55%; height:60%; min-height:0; }
}
@media(max-width:520px) {
  body[data-page="login"] .login-enterprise-brand { min-height:225px; }
  body[data-page="login"] .login-card-enterprise { padding:1.35rem; }
  body[data-page="login"] .login-card-brand { margin-bottom:1.35rem; }
  body[data-page="login"] .login-hero-message { top:37%; left:1.2rem; }
  body[data-page="login"] .login-hero-message h2 { font-size:1.8rem; }
  body[data-page="login"] .login-illustration { right:-8%; bottom:.5rem; width:58%; height:56%; }
  body[data-page="login"] .login-hero-footer { display:none; }
}
