/* ================================================================
   TASKMINT — PREMIUM DESIGN SYSTEM (style.css)
   Frosted Glassmorphism, Ambient Glows, & High-Fidelity Layouts
   ================================================================ */

:root {
  /* ── Color Palette (Stripe Slate & Violet Accent) ── */
  --bg-page:          #F8FAFC;   /* slate-50: ultra-clean outer page background */
  --bg-surface:       #FFFFFF;   /* pristine surface panels */
  --bg-surface-alpha: rgba(255, 255, 255, 0.85); /* transparent surface for glassmorphism */
  --bg-sidebar:       #0B1530;   /* deep rich midnight-blue sidebar */
  --bg-sidebar-hover: #162447;   /* sidebar list hover state */
  --bg-sidebar-active:#1F3263;   /* sidebar active navigation pill */
  
  /* ── Typography & Texts ── */
  --text-primary:     #0F172A;   /* slate-900: sharp headings */
  --text-secondary:   #475569;   /* slate-600: reading text */
  --text-muted:       #94A3B8;   /* slate-400: placeholders and stamps */
  --text-inverse:     #F8FAFC;   /* slate-50: text on dark panels */
  --text-inverse-muted: #64748B;  /* slate-500: muted text on dark panels */

  /* ── Borders & Outlines ── */
  --border-light:     #E2E8F0;   /* slate-200: standard divider lines */
  --border-medium:    #CBD5E1;   /* slate-300: focus border outlines */
  --border-strong:    #94A3B8;   /* slate-400: strong states */
  --border-glass:     rgba(226, 232, 240, 0.7);

  /* ── Accent System ── */
  --accent:           #635BFF;   /* Stripe Violet */
  --accent-hover:     #4F46E5;   /* Indigo-600 */
  --accent-light:     #EEF0FF;   /* Violet Tint */
  --accent-text:      #4338CA;   /* Indigo-700 */

  /* ── Status Colors ── */
  --success:          #10B981;   /* Emerald */
  --success-light:    #D1FAE5;
  --success-text:     #065F46;

  --warning:          #F59E0B;   /* Amber */
  --warning-light:    #FEF3C7;
  --warning-text:     #92400E;

  --danger:           #EF4444;   /* Rose */
  --danger-light:     #FEE2E2;
  --danger-text:      #991B1B;

  --info:             #3B82F6;   /* Blue */
  --info-light:       #DBEAFE;
  --info-text:        #1E40AF;

  /* ── Multi-Layer Premium Shadows ── */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 8px 20px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.04);
  --shadow-focus: 0 0 0 3px rgba(99, 91, 255, 0.12);
}

/* ================================================================
   GLOBAL RESET & TYPOGRAPHY
   ================================================================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  background-color: var(--bg-page);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* ── Custom Scrollbars ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.08);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 23, 42, 0.16);
}

/* ── Utilities ── */
.monospace {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 12px;
  color: var(--text-muted);
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

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

/* ================================================================
   AMBIENT GLOWS
   ================================================================ */
.glow-bg {
  position: fixed;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  z-index: -2;
  opacity: 0.45;
  pointer-events: none;
  filter: blur(140px);
}
.glow-1 {
  background: radial-gradient(circle, rgba(99, 91, 255, 0.16) 0%, rgba(99, 91, 255, 0) 70%);
  top: -150px;
  left: -150px;
}
.glow-2 {
  background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0) 70%);
  bottom: -150px;
  right: -150px;
}

/* ================================================================
   AUTH LAYOUT (LOGIN VIEW)
   ================================================================ */
.auth-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 40px;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-card:hover {
  transform: translateY(-2px);
}

.logo-mark {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent);
  color: #FFFFFF;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
  box-shadow: 0 4px 12px rgba(99, 91, 255, 0.3);
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
}

.auth-header p {
  font-size: 14px;
  color: var(--text-secondary);
}

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

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

/* ================================================================
   FORM CONTROLS
   ================================================================ */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  height: 40px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--text-primary);
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

textarea {
  height: auto;
  padding: 12px 14px;
}

input:focus, select:focus, textarea:focus {
  background-color: var(--bg-surface);
  border-color: var(--accent);
  box-shadow: var(--shadow-focus);
  outline: none;
}

.error-banner {
  background-color: var(--danger-light);
  color: var(--danger-text);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
  padding: 12px;
  font-size: 13px;
  margin-bottom: 20px;
  animation: slideIn 0.2s ease;
}

/* ================================================================
   MAIN APPLICATION LAYOUT
   ================================================================ */
.app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ── Sidebar ── */
.app-sidebar {
  width: 250px;
  background-color: var(--bg-sidebar);
  color: var(--text-inverse);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  padding: 24px 16px;
  z-index: 10;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.sidebar-logo {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
  margin-bottom: 32px;
}

.logo-circle {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(99, 91, 255, 0.3);
}

.logo-text-wrap {
  display: flex;
  flex-direction: column;
}

.logo-wordmark {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
}

.logo-company {
  font-size: 11px;
  color: var(--text-inverse-muted);
}

.sidebar-nav {
  flex-grow: 1;
}

.nav-section {
  margin-bottom: 28px;
}

.nav-section-title {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-inverse-muted);
  padding: 0 12px;
  margin-bottom: 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 12px;
  color: var(--text-inverse-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  margin-bottom: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.nav-item:hover {
  background-color: var(--bg-sidebar-hover);
  color: var(--text-inverse);
}

.nav-item.active {
  background-color: var(--bg-sidebar-active);
  color: var(--text-inverse);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.nav-icon {
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-icon svg {
  stroke-width: 2px;
  transition: stroke 0.2s ease;
}

.nav-item.active .nav-icon svg {
  stroke: var(--accent);
}

.sidebar-user {
  display: flex;
  align-items: center;
  padding: 16px 12px;
  background-color: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  margin-top: auto;
}

.user-avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--accent-light);
  color: var(--accent-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  margin-right: 12px;
  box-shadow: 0 2px 6px rgba(99, 91, 255, 0.1);
}

.user-header-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-inverse);
}

.user-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--text-inverse-muted);
}
.user-status-dot.online {
  background-color: var(--success);
  box-shadow: 0 0 6px var(--success);
}

.btn-logout {
  background: transparent;
  border: none;
  color: var(--text-inverse-muted);
  font-size: 11px;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s ease;
}

.btn-logout:hover {
  color: var(--text-inverse);
}

/* ── Main Panel ── */
.app-main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app-topbar {
  height: 56px;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 5;
}

.page-title-text {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

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

.topbar-search {
  position: relative;
  display: flex;
  align-items: center;
}

.topbar-search input {
  background-color: rgba(15, 23, 42, 0.04);
  border: 1px solid transparent;
  height: 32px;
  width: 200px;
  border-radius: 6px;
  padding: 0 32px 0 32px;
  font-size: 13px;
  transition: width 0.22s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.15s ease, background-color 0.15s ease;
}

.topbar-search input:focus {
  width: 280px;
  background-color: var(--bg-surface);
  border-color: var(--border-medium);
}

.search-icon {
  position: absolute;
  left: 10px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

.shortcut-badge {
  position: absolute;
  right: 10px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 600;
  padding: 1px 4px;
  border-radius: 4px;
  pointer-events: none;
}

.notification-bell {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  transition: background-color 0.15s ease;
}

.notification-bell:hover {
  background-color: rgba(15, 23, 42, 0.04);
}

.notification-count {
  position: absolute;
  top: 2px;
  right: 2px;
  background-color: var(--danger);
  color: #FFF;
  font-size: 9px;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.page-content {
  padding: 32px;
  flex-grow: 1;
  overflow-y: auto;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

/* ================================================================
   COMPONENTS
   ================================================================ */

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  gap: 6px;
}

.btn-primary {
  background-color: var(--accent);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(99, 91, 255, 0.18);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  box-shadow: 0 6px 16px rgba(99, 91, 255, 0.25);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-medium);
  transform: translateY(-1px);
}

.btn-secondary:active {
  transform: scale(0.98);
}

.btn-danger {
  background: var(--bg-surface);
  color: var(--danger);
  border: 1px solid #FCA5A5;
}

.btn-danger:hover {
  background: var(--danger-light);
  border-color: #EF4444;
}

.btn-block {
  width: 100%;
  display: flex;
}

/* ── Cards ── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 24px;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.card.clickable:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(99, 91, 255, 0.2);
}

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

/* ── Metric/Stat Cards ── */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.metric-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(99, 91, 255, 0.15);
}

.metric-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.metric-card:hover::before {
  opacity: 1;
}

.metric-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.metric-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
  font-family: 'Inter', sans-serif;
  letter-spacing: -0.03em;
}

/* ── Tables ── */
.table-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  margin-bottom: 24px;
}

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

.table th {
  background-color: rgba(15, 23, 42, 0.02);
  border-bottom: 1px solid var(--border-light);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 12px 18px;
}

.table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 13px;
  transition: background-color 0.15s ease;
}

.table tr:last-child td {
  border-bottom: none;
}

.table tr.clickable:hover td {
  background-color: rgba(99, 91, 255, 0.02);
}

.table-title-col {
  font-weight: 500;
  color: var(--text-primary);
}

/* ── Badges/Status Pills ── */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 500;
  border-radius: 9999px;
  padding: 2px 10px;
  letter-spacing: -0.01em;
}

.badge-success {
  background-color: var(--success-light);
  color: var(--success-text);
}

.badge-warning {
  background-color: var(--warning-light);
  color: var(--warning-text);
}

.badge-danger {
  background-color: var(--danger-light);
  color: var(--danger-text);
}

.badge-info {
  background-color: var(--info-light);
  color: var(--info-text);
}

.badge-neutral {
  background-color: rgba(15, 23, 42, 0.05);
  color: var(--text-secondary);
}

/* ── Tabs ── */
.tabs-container {
  display: flex;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 24px;
}

.tab-item {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 10px 0;
  margin-right: 24px;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease;
  border-bottom: 2px solid transparent;
}

.tab-item:hover {
  color: var(--text-secondary);
}

.tab-item.active {
  color: var(--text-primary);
  border-bottom: 2px solid var(--accent);
}

/* ================================================================
   VIEW LAYOUTS
   ================================================================ */

/* ── Kanban Board (Tasks) ── */
.kanban-board {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 16px;
  align-items: flex-start;
}

.kanban-column {
  width: 280px;
  flex-shrink: 0;
  background: rgba(15, 23, 42, 0.02);
  border-radius: 12px;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.03);
}

.kanban-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 0 4px;
}

.kanban-column-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.kanban-column-count {
  font-size: 10px;
  font-weight: 600;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  border-radius: 6px;
  padding: 1px 6px;
}

.kanban-column-cards {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kanban-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  box-shadow: var(--shadow-xs);
  padding: 16px;
  cursor: grab;
  position: relative;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.kanban-card:hover {
  border-color: rgba(99, 91, 255, 0.25);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.kanban-card-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  padding-right: 12px;
  line-height: 1.4;
}

.kanban-card-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-light);
}

.kanban-card-priority-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  position: absolute;
  top: 18px;
  right: 16px;
}

.priority-critical { background-color: var(--danger); box-shadow: 0 0 4px var(--danger); }
.priority-high { background-color: #F59E0B; box-shadow: 0 0 4px #F59E0B; }
.priority-medium { background-color: #3B82F6; box-shadow: 0 0 4px #3B82F6; }
.priority-low { background-color: #10B981; box-shadow: 0 0 4px #10B981; }

/* ── Lead Folders Split View ── */
.split-view-container {
  display: flex;
  gap: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.split-view-left {
  width: 240px;
  border-right: 1px solid var(--border-light);
  padding: 20px 14px;
  flex-shrink: 0;
  background-color: rgba(15, 23, 42, 0.01);
}

.folder-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 38px;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 4px;
  font-weight: 500;
}

.folder-item:hover {
  background-color: rgba(15, 23, 42, 0.04);
  color: var(--text-primary);
}

.folder-item.active {
  background-color: var(--accent-light);
  color: var(--accent-text);
  font-weight: 600;
}

.folder-badge {
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 10px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  padding: 1px 6px;
}

.folder-item.active .folder-badge {
  border-color: rgba(99, 91, 255, 0.15);
  color: var(--accent);
}

.split-view-right {
  flex-grow: 1;
  padding: 32px;
  overflow-x: auto;
}

/* ================================================================
   MODALS (FROSTED GLASS CARD)
   ================================================================ */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(11, 21, 48, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 520px;
  padding: 32px;
  position: relative;
  transform: translateY(0);
  animation: slideIn 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-footer {
  border-top: 1px solid var(--border-light);
  padding-top: 18px;
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* ── Dashboard Columns Grid ── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 24px;
}

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

/* ── Header Area Pattern ── */
.page-header-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
}

.page-header-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.page-header-subtitle {
  font-size: 13.5px;
  color: var(--text-muted);
}

/* ================================================================
   RESPONSIVE STYLING & MOBILE LAYOUTS
   ================================================================ */

/* ── Hamburger Menu Button ── */
.hamburger-menu {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  margin-right: 12px;
  padding: 6px;
  border-radius: 6px;
  align-items: center;
  justify-content: center;
}

.hamburger-menu:hover {
  background-color: rgba(15, 23, 42, 0.04);
}

/* ── Mobile Sidebar Overlay ── */
.mobile-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(11, 21, 48, 0.4);
  backdrop-filter: blur(2px);
  z-index: 99;
  animation: fadeIn 0.2s ease;
}

.mobile-sidebar-overlay.open {
  display: block;
}

/* ── Desktop Sidebar Defaults ── */
#app-sidebar {
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Responsive Rules (Tablet & Mobile) ── */
@media (max-width: 768px) {
  /* Hamburger and Layout */
  .hamburger-menu {
    display: flex;
  }

  .app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    transform: translateX(-250px); /* Slide out of screen */
    box-shadow: var(--shadow-lg);
  }

  .app-sidebar.open {
    transform: translateX(0); /* Slide into screen */
  }

  .app-topbar {
    padding: 0 16px;
  }

  .page-content {
    padding: 20px 16px;
  }

  /* Grid Adjustments */
  .metrics-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Split View for Leads stack */
  .split-view-container {
    flex-direction: column;
  }

  .split-view-left {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-light);
    padding: 16px;
  }

  .split-view-right {
    padding: 20px 16px;
  }

  /* Kanban Columns stack/scroll horizontally */
  .kanban-board {
    padding-bottom: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Topbar components hidden/adjusted */
  .topbar-search {
    display: none; /* Hide desktop search on small screens */
  }
}

@media (max-width: 480px) {
  .page-header-wrapper {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }

  .page-header-wrapper .btn {
    width: 100%;
  }

  .modal-card {
    width: 95%;
    padding: 20px;
  }
}

/* ── Table Responsiveness ── */
.table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  min-width: 600px;
}

/* ── Premium Dashboard List View (Responsive) ── */
.dash-list {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-glass);
}

.dash-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  transition: background-color 0.15s ease, transform 0.15s ease;
  gap: 16px;
}

.dash-list-item:last-child {
  border-bottom: none;
}

.dash-list-item.clickable {
  cursor: pointer;
}

.dash-list-item.clickable:hover {
  background-color: rgba(99, 91, 255, 0.02);
}

.dash-list-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.dash-list-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

@media (max-width: 576px) {
  .dash-list-item {
    padding: 12px 14px;
    gap: 12px;
  }
}

