/* Premium CRM Styles - Redesign */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css');

:root {
  /* Core Palette - Orange & Slate */
  --primary: #f97316;
  /* Orange 500 */
  --primary-hover: #ea580c;
  /* Orange 600 */
  --primary-light: #fff7ed;
  /* Orange 50 */
  --primary-subtle: #fed7aa;
  /* Orange 200 */

  --secondary: #64748b;
  /* Slate 500 */
  --secondary-hover: #475569;
  /* Slate 600 */
  --secondary-light: #f1f5f9;
  /* Slate 100 */

  --bg-body: #f3f4f6;
  /* Gray 100 */
  --bg-surface: #ffffff;
  --bg-sidebar: #1e1b4b;
  /* Indigo 950 - Darker, richer */
  --bg-sidebar-hover: rgba(255, 255, 255, 0.1);

  --text-main: #111827;
  /* Gray 900 */
  --text-secondary: #374151;
  /* Gray 700 */
  --text-muted: #6b7280;
  /* Gray 500 */
  --text-on-dark: #f9fafb;
  /* Gray 50 */
  --text-on-dark-muted: #9ca3af;
  /* Gray 400 */

  --border-light: #e5e7eb;
  /* Gray 200 */
  --border-medium: #d1d5db;
  /* Gray 300 */
  --border-focus: #fb923c;
  /* Orange 300 */

  /* Semantic Colors */
  --success: #10b981;
  /* Emerald 500 */
  --success-bg: #ecfdf5;
  /* Emerald 50 */
  --success-text: #065f46;
  /* Emerald 800 */

  --warning: #f59e0b;
  /* Amber 500 */
  --warning-bg: #fffbeb;
  /* Amber 50 */
  --warning-text: #92400e;
  /* Amber 800 */

  --danger: #ef4444;
  /* Red 500 */
  --danger-bg: #fef2f2;
  /* Red 50 */
  --danger-text: #991b1b;
  /* Red 800 */

  --info: #3b82f6;
  /* Blue 500 */
  --info-bg: #eff6ff;
  /* Blue 50 */
  --info-text: #1e40af;
  /* Blue 800 */

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Dimensions */
  --sidebar-width: 260px;
  --header-height: 64px;

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -0.025em;
}

h1 {
  font-size: 1.875rem;
  line-height: 2.25rem;
}

h2 {
  font-size: 1.5rem;
  line-height: 2rem;
}

h3 {
  font-size: 1.25rem;
  line-height: 1.75rem;
}

h4 {
  font-size: 1.125rem;
  line-height: 1.75rem;
}

p {
  margin: 0 0 1rem;
}

.text-sm {
  font-size: 0.875rem;
}

.text-xs {
  font-size: 0.75rem;
}

.font-medium {
  font-weight: 500;
}

.font-semibold {
  font-weight: 600;
}

.font-bold {
  font-weight: 700;
}

.mr-2 {
  margin-right: 8px;
}

.muted {
  color: var(--text-muted);
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.d-flex {
  display: flex;
}

.flex-column {
  flex-direction: column;
}

.mb-1r {
  margin-bottom: 1rem;
}

.justify-between {
  justify-content: space-between;
}

.align-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-around {
  justify-content: space-around;
}

/* Layout */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.app-main {
  flex: 1;
  margin-left: 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: filter var(--transition-normal);
}

.content {
  padding: 2rem;
  /* max-width: 1400px; */
  margin: 0 auto;
  width: 100%;
}

/* Modern Sidebar - White Design */
.app-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  z-index: 80;
  transition: transform var(--transition-normal);
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.08);
  transform: translateX(-110%);
  border-right: 1px solid var(--border-light);
}

.sidebar-open .app-sidebar {
  transform: translateX(0);
}

.sidebar-open .app-main {
  filter: blur(1px);
}

.app-sidebar__header {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: #fff;
}

.sidebar-brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 16%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(7, 14, 36, 0.15);
}

.sidebar-brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.sidebar-brand-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.sidebar-brand-tagline {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  opacity: 0.75;
}

.app-sidebar__body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 1rem;
}

.app-sidebar__body::-webkit-scrollbar {
  width: 6px;
}

.app-sidebar__body::-webkit-scrollbar-track {
  background: transparent;
}

.app-sidebar__body::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: 3px;
}

.sidebar-close {
  margin-left: auto;
  color: white;
  border: none;
  display: none;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.sidebar-close:hover {
  /* background: rgba(255, 255, 255, 0.2); */
}

.sidebar-open .sidebar-close {
  display: inline-flex;
}

.app-sidebar__section-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 1.5rem 0 0.5rem 0.75rem;
  font-weight: 600;
}

.app-sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.app-sidebar__nav .btn.ghost {
  color: var(--text-secondary);
  justify-content: flex-start;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: all var(--transition-fast);
  border: none;
  background: transparent;
  width: 100%;
}

.app-sidebar__nav .btn.ghost:hover {
  background-color: var(--primary-light);
  color: var(--primary);
  transform: translateX(4px);
}

.app-sidebar__nav .btn.ghost.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
  transform: translateX(4px);
}

.app-sidebar__nav .btn.ghost i {
  width: 1.5rem;
  text-align: center;
  margin-right: 0.75rem;
  font-size: 1rem;
}

.app-sidebar__footer {
  padding: 1rem;
  background-color: var(--bg-body);
  border-top: 1px solid var(--border-light);
}

.app-sidebar__footer .btn.ghost {
  color: var(--danger) !important;
}

.app-sidebar__footer .btn.ghost:hover {
  background-color: var(--danger-bg);
  color: var(--danger-text) !important;
}

.app-sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
  z-index: 70;
}

.sidebar-open .app-sidebar-overlay {
  opacity: 1;
  pointer-events: auto;
}

/* Header */
.app-header {
  min-height: var(--header-height);
  background: #fff;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.75rem;
  position: sticky;
  top: 0;
  z-index: 60;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
  gap: 1rem;
  flex-wrap: wrap;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-branding {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0.85rem;
  /* border-radius: var(--radius-full); */
  /* background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%); */
  color: #fff;
  /* box-shadow: var(--shadow-sm); */
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 16%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  /* box-shadow: 0 4px 12px rgba(7, 14, 36, 0.25); */
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-title {
  font-size: 0.95rem;
  font-weight: 600;
}

.brand-subtitle {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.75);
}

.header-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  display: none;
}

.nav-toggle {
  display: none;
  border-color: var(--border-light);
  background: var(--bg-body);
  color: var(--text-secondary);
}

.role-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

body.nav-open .role-nav {
  display: flex;
}

.role-nav .btn,
.role-nav button {
  font-size: 0.8rem;
  padding: 0.35rem 0.85rem;
  background: var(--bg-body);
  border: 1px solid transparent;
  color: var(--text-secondary);
}

.role-nav .btn:hover,
.role-nav button:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.3rem 0.5rem 0.3rem 0.35rem;
  border-radius: var(--radius-full);
  background: var(--bg-body);
  border: 1px solid var(--border-light);
}

.user-chip:hover {
  border-color: var(--primary-subtle);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

#user-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.user-role-pill {
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0.15rem 0rem;
  background-color: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-full);
  letter-spacing: 0.025em;
  width: fit-content;
}

.notification-btn {
  border-color: var(--border-light);
  color: var(--text-secondary);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.notification-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.header-right .btn.icon-btn.secondary {
  border-color: transparent;
  background: transparent;
  color: var(--text-secondary);
}

.header-right .btn.icon-btn.secondary:hover {
  color: var(--primary);
}

/* Components */
.card {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: box-shadow var(--transition-fast);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  gap: 0.5rem;
  line-height: 1.25rem;
}

.btn.primary {
  background-color: var(--primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn.primary:hover {
  background-color: var(--primary-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn.secondary {
  background-color: white;
  border-color: var(--border-medium);
  color: var(--text-secondary);
}

.btn.secondary:hover {
  background-color: var(--bg-body);
  border-color: var(--text-muted);
  color: var(--text-main);
}

.btn.danger {
  background-color: var(--danger-bg);
  color: var(--danger-text);
  border-color: transparent;
}

.btn.danger:hover {
  background-color: var(--danger);
  color: white;
}

.btn.small {
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  height: 32px;
}

.btn.full-width {
  width: 100%;
}

.btn.icon-btn {
  padding: 0.5rem;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border-light);
}

.btn.icon-btn:hover {
  color: var(--primary);
  background: var(--primary-light);
  border-color: var(--primary-subtle);
}

/* Forms */
.form-row {
  margin-bottom: 1.25rem;
  text-align: left;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="date"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="url"],
select,
textarea {
  width: 100%;
  padding: 0.625rem 1rem;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  transition: all var(--transition-fast);
  background-color: #fff;
  color: var(--text-main);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.error {
  color: var(--danger);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* Tables */
.table-responsive {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.table th {
  background: var(--bg-body);
  padding: 0.75rem 1.5rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

.table td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-main);
  font-size: 0.875rem;
  vertical-align: middle;
}

.table tr:last-child td {
  border-bottom: none;
}

.table tr:hover {
  background-color: var(--bg-body);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
}

.badge.success {
  background: var(--success-bg);
  color: var(--success-text);
}

.badge.warning {
  background: var(--warning-bg);
  color: var(--warning-text);
}

.badge.danger {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.badge.info {
  background: var(--info-bg);
  color: var(--info-text);
}

/* Modern Login Page Styles */
body[data-page="landing"] .app-shell {
  background: #ffffff;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

/* Subtle background decoration */
body[data-page="landing"] .app-shell::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: float 20s ease-in-out infinite;
}

body[data-page="landing"] .app-shell::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.05) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(30px, -30px) scale(1.1);
  }
}

.auth-shell {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 3rem 2.5rem;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(249, 115, 22, 0.1);
  border: 1px solid rgba(249, 115, 22, 0.1);
  transition: all 0.3s ease;
}

.auth-card:hover {
  box-shadow:
    0 25px 70px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(249, 115, 22, 0.15);
}

/* Header Section */
.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.brand-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.logo-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.75rem;
  box-shadow:
    0 10px 30px rgba(249, 115, 22, 0.3),
    inset 0 -4px 8px rgba(0, 0, 0, 0.1);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 10px 30px rgba(249, 115, 22, 0.3);
  }

  50% {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(249, 115, 22, 0.4);
  }
}

.brand-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text-main) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-subtitle {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0;
  font-weight: 400;
}

/* Form Styles */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-label i {
  color: var(--primary);
  font-size: 0.875rem;
}

.input-wrapper {
  position: relative;
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border-light);
  border-radius: 12px;
  font-size: 0.9375rem;
  transition: all 0.3s ease;
  background-color: #fff;
  color: var(--text-main);
  font-family: var(--font-sans);
}

.form-input:hover {
  border-color: var(--border-medium);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.1);
  transform: translateY(-1px);
}

.form-input::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

/* Form Options */
.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: -0.25rem;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}

.custom-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
}

.brand-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  background: rgba(249, 115, 22, 0.12);
  color: var(--primary);
  font-weight: 600;
}

.remember-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.checkbox-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
  cursor: pointer;
}

.link-button {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.875rem;
  cursor: not-allowed;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-family: var(--font-sans);
  padding: 0;
  transition: color 0.2s ease;
}

.link-button i {
  font-size: 0.75rem;
}

/* Submit Button */
.btn-submit {
  margin-top: 0.5rem;
  width: 100%;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
  font-family: var(--font-sans);
  position: relative;
  overflow: hidden;
}

.btn-submit::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-submit:hover::before {
  left: 100%;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(249, 115, 22, 0.4);
}

.btn-submit:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}

.btn-submit i {
  font-size: 0.875rem;
  transition: transform 0.3s ease;
}

.btn-submit:hover i {
  transform: translateX(4px);
}

/* Error Message */
.error-message {
  color: var(--danger);
  font-size: 0.875rem;
  margin: 0;
  padding: 0.75rem 1rem;
  background: var(--danger-bg);
  border-radius: 8px;
  border-left: 3px solid var(--danger);
  display: none;
  animation: shake 0.4s ease;
}

.error-message:not(:empty) {
  display: block;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-8px);
  }

  75% {
    transform: translateX(8px);
  }
}

/* Divider */
.auth-divider {
  margin: 1.5rem 0;
  text-align: center;
  position: relative;
}

.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border-light);
}

.auth-divider span {
  position: relative;
  background: rgba(255, 255, 255, 0.95);
  padding: 0 1rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ghost-link {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.875rem;
  cursor: not-allowed;
}

.auth-footer {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.btn-reset {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-body);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
}

.btn-reset:hover {
  background: white;
  border-color: var(--border-medium);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.btn-reset i {
  font-size: 0.875rem;
}

.demo-credentials {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--primary-light);
  border-radius: 8px;
  border: 1px dashed var(--primary-subtle);
}

.demo-credentials i {
  color: var(--primary);
  font-size: 0.875rem;
}

.demo-credentials strong {
  color: var(--primary);
  font-weight: 600;
}

/* Responsive Design */
@media (max-width: 640px) {
  body[data-page="landing"] .app-shell {
    padding: 1rem;
  }

  .auth-card {
    padding: 2rem 1.5rem;
    border-radius: 20px;
  }

  .logo-icon {
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
  }

  .brand-title {
    font-size: 1.5rem;
  }

  .auth-subtitle {
    font-size: 0.875rem;
  }

  .form-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .btn-submit {
    padding: 0.875rem 1.25rem;
    font-size: 0.9375rem;
  }

  .demo-credentials {
    flex-direction: column;
    text-align: center;
    gap: 0.25rem;
  }
}

.text-primary {
  color: var(--primary);
}

/* Sales Dashboard */
.sales-view .page-header {
  margin-bottom: 1.5rem;
}

.sales-hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.sales-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.card-title-with-icon {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.card-title-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: rgba(249, 115, 22, 0.12);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.header-actions.stacked {
  flex-direction: column;
  gap: 0.5rem;
}

.attendance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.attendance-photo-slot {
  height: 120px;
  background: var(--bg-body);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px dashed var(--border-light);
  position: relative;
}

.attendance-photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.attendance-summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}

.attendance-summary div {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.photo-thumb {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: #fff;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-right: 0.5rem;
  box-shadow: var(--shadow-sm);
}

.photo-thumb .thumb,
.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-thumb+.photo-thumb {
  margin-left: 0.25rem;
}

.sales-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.sales-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.chart-card {
  min-height: 320px;
  display: flex;
  flex-direction: column;
}

.chart-panel {
  flex: 1;
  padding-bottom: 1.5rem;
  min-height: 260px;
}

.chart-panel canvas {
  width: 100%;
  height: 100%;
}

.sales-duo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.meeting-stats-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}

.meeting-stat {
  flex: 1;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.meeting-stat strong {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}

.sales-info-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--text-secondary);
}

.sales-info-list i {
  color: var(--primary);
  margin-right: 0.5rem;
  margin-top: 0.15rem;
}

.sales-info-list li {
  display: flex;
  align-items: flex-start;
}

.sales-custom-range {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, auto));
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
}

.sales-total {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-main);
}

.sales-table-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 640px) {
  .attendance-summary {
    flex-direction: column;
  }
}

/* Utilities */
.hidden {
  display: none !important;
}

.m0 {
  margin: 0;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-3 {
  margin-bottom: 0.75rem;
}

.mt-4 {
  margin-top: 1rem;
}

.gap-2 {
  gap: 0.5rem;
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

/* Mobile */
@media (max-width: 768px) {
  .app-sidebar {
    transform: translateX(-100%);
  }

  .app-sidebar.open {
    transform: translateX(0);
  }

  .app-main {
    margin-left: 0;
  }

  .content {
    padding: 1rem;
  }

  .app-header {
    padding: 0.75rem 1rem;
    gap: 0.75rem;
  }

  .header-left,
  .header-right {
    width: 100%;
  }

  .header-left {
    justify-content: space-between;
  }

  .header-right {
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .user-chip {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }
}

@media (max-width: 500px) {
  .header-left {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .header-right .btn.icon-btn {
    flex: 0 0 auto;
  }

  .user-chip {
    gap: 0.5rem;
  }
}

/* Loader */
.app-loader {
  position: fixed;
  inset: 0;
  background: var(--bg-body);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

body:not(.sfl-app-loading) #app-loader {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.2s ease;
}

.loader-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--primary-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Page Header / Hero */
.page-header {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
  gap: 1.25rem;
}

.page-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.025em;
}

.header-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.header-actions .btn {
  flex-shrink: 0;
}

.header-tags {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.header-chip {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border-light);
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-sm);
}

.header-chip strong {
  color: var(--primary);
  font-weight: 700;
}

@media (max-width: 1024px) {
  .page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .header-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .header-actions .btn,
  .header-actions .btn.full-width {
    width: 100%;
  }
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  margin-top: 1rem;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(249, 115, 22, 0.1);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.stat-card .label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.stat-card .value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

/* Toolbar & Filters */
.toolbar {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.filter-group {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.stacked-label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* Modals */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: white;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  z-index: 1001;
  box-shadow: var(--shadow-2xl);
  border: 1px solid var(--border-light);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
  font-size: 1.25rem;
  margin: 0;
}

/* Rich Text Toolbar */
.rich-toolbar {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  padding: 0.5rem;
  background: var(--bg-body);
  border: 1px solid var(--border-medium);
  border-bottom: none;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.rich-editor {
  min-height: 200px;
  border: 1px solid var(--border-medium);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  padding: 0.75rem;
  outline: none;
  background: white;
}

.rich-editor:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* Notifications Drawer */
.notifications-drawer {
  position: fixed;
  inset: 0;
  z-index: 2000;
}

.notifications-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
}

.notifications-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 360px;
  background: #f8fafc;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  transform: translateX(0);
  transition: transform 0.3s ease;
}

.notifications-drawer.hidden .notifications-panel {
  transform: translateX(100%);
}

.notifications-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
}

.notifications-list {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.notification-item {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.notification-item::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 16px;
  width: 12px;
  height: 12px;
  background: #fff;
  border: 1px solid var(--border-light);
  border-right: none;
  border-bottom: none;
  transform: rotate(45deg);
  box-shadow: -2px -2px 4px rgba(15, 23, 42, 0.06);
}

.notification-item.notification-type-broadcast,
.notification-item.notification-type-broadcast_team,
.notification-item.notification-type-broadcast_manager,
.notification-item.notification-type-broadcast_sales,
.notification-item.notification-type-broadcast_custom {
  border-left: 4px solid var(--warning);
  background: #fff4e5;
  color: var(--warning-text);
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.15);
}

.broadcast-card select[multiple] {
  min-height: 140px;
}

.broadcast-card textarea {
  resize: vertical;
}

.notification-item .history-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

.notification-item .history-meta span:last-child {
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.grid-1 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.report-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.report-img-thumb {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: transform 0.2s;
}

.report-img-thumb:hover {
  transform: scale(1.05);
}

/* ============================================
   MODERN DASHBOARD ENHANCEMENTS
   ============================================ */

/* Enhanced Stat Cards with Gradients & Animations */
.stat-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  border: 1px solid var(--border-light);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  justify-content: space-around;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  transform: translate(40%, -40%);
  pointer-events: none;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  border-color: var(--primary);
}

.stat-card .label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-card .value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Enhanced Chart Cards */
.chart-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  border: 1px solid var(--border-light);
  min-height: 350px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.chart-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  border-color: var(--border-medium);
}

.chart-card h3 {
  /* margin: 0 0 1rem 0; */
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-main);
}

.chart-panel {
  flex: 1;
  padding: 0.5rem 0;
  min-height: 260px;
  position: relative;
}

.chart-panel canvas {
  max-height: 100%;
}

/* Modal Enhancements - Modern Glassmorphism */
.modal-content.card {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(249, 115, 22, 0.1);
}

/* Pipeline & Activity Lists */
.pipeline-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.pipeline-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1.25rem;
  background: var(--bg-body);
  border-radius: var(--radius-lg);
  transition: all 0.2s ease;
  border-left: 3px solid var(--primary);
}

.pipeline-list li:hover {
  background: var(--primary-light);
  transform: translateX(6px);
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.15);
}

.pipeline-list li span {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
}

.pipeline-list li strong {
  color: var(--primary);
  font-size: 1.25rem;
  font-weight: 700;
}

/* Activity Feed */
.activity-feed {
  max-height: 420px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.activity-feed::-webkit-scrollbar {
  width: 6px;
}

.activity-feed::-webkit-scrollbar-track {
  background: var(--bg-body);
  border-radius: 3px;
}

.activity-feed::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: 3px;
}

/* Utility Icon (for cards) */
.utility-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.utility-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.utility-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.utility-actions.jc-space-between {
  justify-content: space-between;
}

.utility-actions.jc-center {
  justify-content: center;
}

.utility-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

/* File Trigger (for uploadbuttons) */
.file-trigger {
  position: relative;
  cursor: pointer;
}

.file-trigger input[type="file"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Notification Badge */
.notification-btn {
  position: relative;
}

.notification-btn .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 0.25rem;
  font-size: 0.625rem;
}

/* Leads Layout Specific */
.leads-layout {
  position: relative;
}

.search-box {
  position: relative;
}

.search-box input[type="search"] {
  padding-left: 2.5rem;
  min-width: 240px;
}

.search-box i {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.leads-page-header {
  align-items: flex-start;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.lead-header-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 280px;
}

.lead-action-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.lead-action-row .search-box {
  flex: 1;
  min-width: 220px;
}

.lead-action-row .search-box input[type="search"] {
  width: 100%;
}

.lead-header-actions .stacked-label {
  min-width: 200px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.leads-filters-card .card-body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.leads-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  align-items: flex-end;
}

.date-range-inline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}

.date-range-inline label {
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
  gap: 0.25rem;
}

.filter-quick-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.leads-filter-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.columns-control {
  position: relative;
}

.columns-panel {
  position: absolute;
  right: 0;
  top: 44px;
  min-width: 260px;
  padding: 16px;
  display: none;
  z-index: 150;
  box-shadow: var(--shadow-lg);
}

.ml-upload-panel {
  position: fixed;
  right: 24px;
  top: 100px;
  width: min(400px, calc(100vw - 48px));
  padding: 24px;
  z-index: 200;
  box-shadow: var(--shadow-xl);
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}

@media (max-width: 900px) {
  .ml-upload-panel {
    right: 16px;
    top: 72px;
    width: min(420px, calc(100vw - 32px));
  }
}

@media (max-width: 640px) {
  .ml-upload-panel {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: calc(100vw - 32px);
    max-width: 520px;
    top: 48px;
  }
}

@media (max-width: 420px) {
  .ml-upload-panel {
    width: calc(100vw - 20px);
    top: 16px;
    max-height: calc(100vh - 32px);
  }
}

.filter-hint {
  line-height: 1.4;
}

.leads-table-card .card-body {
  padding-top: 0;
}

.pagination-bar {
  margin-top: 1rem;
  border-top: 1px solid var(--border-light);
  padding-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pagination-buttons .page-info {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Admin Stats Filter */
.admin-stats-filter {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.admin-stats-date {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* Table Sticky Header */
.table-sticky {
  max-height: 600px;
  overflow-y: auto;
}

.table-sticky thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

/* Responsive Enhancements */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

@media (max-width: 768px) {
  .stat-card {
    padding: 1.25rem;
  }

  .stat-card .value {
    font-size: 1.75rem;
  }

  .chart-card {
    min-height: 300px;
  }

  .utility-field-grid {
    grid-template-columns: 1fr;
  }

  .pipeline-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .lead-header-actions {
    width: 100%;
    align-items: stretch;
  }

  .lead-action-row {
    justify-content: flex-start;
  }

  .pagination-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Admin Export Options */
.admin-export-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.export-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background: var(--bg-body);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  transition: all 0.2s ease;
}

.export-option:hover {
  background: white;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.1);
}

.export-option-info strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--text-main);
  font-size: 0.9375rem;
}

.export-option-actions {
  display: flex;
  gap: 0.5rem;
}

/* Text Utilities */
.text-xs {
  font-size: 0.75rem;
}

.text-sm {
  font-size: 0.875rem;
}

.font-medium {
  font-weight: 500;
}

.font-semibold {
  font-weight: 600;
}

.font-bold {
  font-weight: 700;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

/* Bell Button */
.bell-btn {
  position: relative;
}

/* Leads Modals */
.leads-layout .modal-content {
  max-width: 680px;
}

.lead-meeting-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.lead-meeting-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

/* Meeting Modal */
.meeting-modal-card {
  max-width: 900px;
}

.meeting-modal-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.meeting-leads-panel {
  border-right: 1px solid var(--border-light);
  padding-right: 1.5rem;
}

.meeting-form-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.meeting-lead-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 300px;
  overflow-y: auto;
}

.meeting-lead-list li {
  padding: 0.75rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 0.5rem;
}

.meeting-lead-list li:hover {
  background: var(--primary-light);
}

.meeting-lead-list li.selected {
  background: var(--primary);
  color: white;
}

@media (max-width: 768px) {
  .meeting-modal-layout {
    grid-template-columns: 1fr;
  }

  .meeting-leads-panel {
    border-right: none;
    padding-right: 0;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
  }
}

/* History Modal */
.history-header-actions {
  display: flex;
  gap: 0.5rem;
}

.history-body {
  padding: 1.5rem;
  flex: 1;
  overflow-y: auto;
}

.history-columns {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.5rem;
}

.history-details-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.history-note-form {
  margin-top: 1rem;
  border-top: 1px solid var(--border-light);
  padding-top: 1rem;
}

/* Rich Text Editor */
.rich-toolbar {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  background: var(--bg-body);
  border-radius: var(--radius-md);
  flex-wrap: wrap;
}

.rich-editor {
  min-height: 200px;
  padding: 1rem;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  background: white;
}

.rich-editor:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* Visually Hidden */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Print Styles */
@media print {

  .app-sidebar,
  .app-header,
  .btn,
  .toolbar {
    display: none !important;
  }

  .app-main {
    margin-left: 0 !important;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ddd;
    page-break-inside: avoid;
  }
}

/* Grid-3 Layout for Admin Dashboard */
.grid-2,
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {

  .grid-2,
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Ensure chart cards in grid-3 have proper height */
.grid-3 .chart-card {
  min-height: 350px;
}

/* Responsive adjustments for grid-3 */
@media (max-width: 767px) {

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* Form Controls Styling - Enhanced Visibility */
.form-select,
.form-input,
select,
input[type="text"],
input[type="email"],
input[type="search"],
input[type="date"],
input[type="month"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="datetime-local"],
textarea {
  padding: 0.625rem 0.875rem;
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-family: var(--font-sans);
  color: var(--text-main);
  background: white;
  transition: all 0.2s ease;
  width: 100%;
}

.form-select:hover,
.form-input:hover,
select:hover,
input:not([type="file"]):not([type="checkbox"]):not([type="radio"]):hover,
textarea:hover {
  border-color: var(--text-muted);
}

.form-select:focus,
.form-input:focus,
select:focus,
input:not([type="file"]):not([type="checkbox"]):not([type="radio"]):focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* Select dropdown styling */
select,
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%236b7280' d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 12px;
  padding-right: 2.5rem;
  cursor: pointer;
}

/* Date input cursors */
input[type="date"],
input[type="month"],
input[type="datetime-local"] {
  cursor: pointer;
}

/* Pagination Right-Aligned */
.pagination-controls-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}

/* Form Row */
.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-bottom: 1rem;
}

.form-row label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Button Icon Margins */
.btn i {
  /* margin-right: 0.375rem; */
}

.btn.icon-btn i {
  margin: 0;
}