@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #3575ff;
  --primary-light: rgba(53, 117, 255, 0.1);
  --secondary: #4B3B2F;
  --background: #FAF9F6;
  --card: #ffffff;
  --foreground: #2B2419;
  --muted: #ececf0;
  --muted-fg: #717182;
  --accent: #E5C07B;
  --accent-light: #F5F2ED;
  --border: rgba(75, 59, 47, 0.1);
  --destructive: #d4183d;
  --success: #16a34a;
  --warning: #d97706;
  --sidebar-bg: #ffffff;
  --sidebar-border: rgba(75, 59, 47, 0.1);
  --sidebar-active: #3575ff;
  --sidebar-active-fg: #ffffff;
  --sidebar-hover: #F5F2ED;
  --radius: 0.625rem;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.07);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --font: 'Poppins', system-ui, sans-serif;
  /* Single-line fields: same height/border as search + select everywhere */
  --control-height: 2.5rem;
  --control-py: 0.5rem;
  --control-px: 0.75rem;
}

[data-theme="dark"] {
  color-scheme: dark;
  --background: #0f1115;
  --card: #181b22;
  --foreground: #f3f4f6;
  --secondary: #9ca3af;
  --muted: #242936;
  --muted-fg: #9ca3af;
  --accent-light: #242936;
  --border: rgba(255, 255, 255, 0.1);
  --sidebar-bg: #181b22;
  --sidebar-border: rgba(255, 255, 255, 0.1);
  --sidebar-hover: #242936;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  
  /* Glass and Glow Overrides for Dashboard */
  --glass-bg: rgba(24, 27, 34, 0.85);
  --glass-border: rgba(255, 255, 255, 0.08);
  --card-glow-primary: rgba(53, 117, 255, 0.35);
  --card-glow-success: rgba(22, 163, 74, 0.35);
  --card-glow-warning: rgba(217, 119, 6, 0.35);
  --card-glow-accent: rgba(229, 192, 123, 0.35);
}

/* Dark theme specific element overrides */
[data-theme="dark"] .table-input {
  background-color: var(--card) !important;
  color: var(--foreground) !important;
  border-color: var(--border) !important;
}

[data-theme="dark"] .ts-control {
  background-color: var(--card) !important;
  color: var(--foreground) !important;
  border-color: var(--border) !important;
}

[data-theme="dark"] .ts-control .item {
  color: var(--foreground) !important;
  background-color: var(--muted) !important;
  border-color: var(--border) !important;
}

[data-theme="dark"] .ts-control input {
  color: var(--foreground) !important;
}

[data-theme="dark"] .ts-dropdown {
  background-color: var(--card) !important;
  color: var(--foreground) !important;
  border-color: var(--border) !important;
}

[data-theme="dark"] .ts-dropdown .option {
  color: var(--foreground) !important;
}

[data-theme="dark"] .ts-dropdown .option.active {
  background-color: var(--sidebar-hover) !important;
  color: var(--foreground) !important;
}

[data-theme="dark"] #add-item-card #cat-display {
  color: var(--foreground) !important;
}

[data-theme="dark"] .quotation-actions {
  background: rgba(24, 27, 34, 0.92) !important;
  border-color: var(--border) !important;
}


*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

svg {
  max-width: 100%;
  max-height: 100%;
  flex-shrink: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--background);
  color: var(--foreground);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  font-family: var(--font);
}

input,
select,
textarea {
  font-family: var(--font);
}

/* ===================== LAYOUT ===================== */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 256px;
  min-width: 256px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 1.5rem;
  border-bottom: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  flex-shrink: 0;
}

.logo-badge-lg {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 600;
  flex-shrink: 0;
}

.sidebar-brand-text h2 {
  font-size: 0.9375rem;
  font-weight: 600;
}

.sidebar-brand-text p {
  font-size: 0.75rem;
  color: var(--muted-fg);
}

.sidebar-nav {
  flex: 1;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-section-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-fg);
  padding: 0.75rem 1rem 0.25rem;
}

/* Sidebar Accordion Groups */
.sidebar-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.25rem;
}

.sidebar-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.625rem 1rem;
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-fg);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sidebar-group-header:hover {
  background: var(--sidebar-hover);
  color: var(--foreground);
}

.sidebar-group-header .chevron {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
  flex-shrink: 0;
  color: var(--muted-fg);
}

.sidebar-group-header svg:not(.chevron) {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sidebar-group-header:hover .chevron {
  color: var(--foreground);
}

.sidebar-group.open .sidebar-group-header .chevron {
  transform: rotate(180deg);
}

.sidebar-group-content {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--border);
  margin-left: 1.5rem;
  margin-top: 0.15rem;
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.sidebar-group-content.collapsed {
  display: none;
}

.sidebar-group-content .nav-item {
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  transition: all 0.15s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}

.nav-item:hover {
  background: var(--sidebar-hover);
}

.nav-item.active {
  background: var(--sidebar-active);
  color: var(--sidebar-active-fg);
}

.nav-item svg,
.nav-item .nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.main-content {
  flex: 1;
  margin-left: 256px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.3s ease;
}

/* Sidebar Toggle State */
.sidebar-collapsed .sidebar {
  transform: translateX(-100%);
}

.sidebar-collapsed .main-content {
  margin-left: 0;
}

@media (min-width: 769px) {
  .sidebar {
    transition: transform 0.3s ease;
  }
}

.topbar {
  height: 64px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-left h1 {
  font-size: 1.125rem;
  font-weight: 500;
}

.topbar-left p {
  font-size: 0.75rem;
  color: var(--muted-fg);
  text-transform: capitalize;
}

.page-content {
  flex: 1;
  padding: 1.5rem;
  overflow: auto;
}

/* ===================== LOGIN ===================== */
.login-bg {
  background: linear-gradient(135deg, #FAF9F6 0%, #E5C07B22 50%, #3575ff11 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
}

.login-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.login-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}

.login-header {
  text-align: center;
  margin-bottom: 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.login-title {
  font-size: 1.75rem;
  font-weight: 600;
}

.login-subtitle {
  color: var(--muted-fg);
  font-size: 0.875rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.login-hint {
  text-align: center;
  color: var(--muted-fg);
  margin-top: 0.5rem;
  font-size: 0.8125rem;
}

.login-footer {
  color: var(--muted-fg);
  font-size: 0.8125rem;
  text-align: center;
}

/* ===================== FORMS ===================== */
/* Text-like inputs + select: one system (filter bars, modals, step-body, login, etc.) */
input[type="text"],
input[type="search"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"],
select,
textarea {
  max-width: 100%;
  min-height: var(--control-height);
  padding: var(--control-py) var(--control-px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  font-family: var(--font);
  font-size: 0.875rem;
  color: var(--foreground);
  line-height: 1.25;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  box-sizing: border-box;
}

.form-group input[type="text"],
.form-group input[type="search"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="url"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group input[type="datetime-local"],
.form-group input[type="month"],
.form-group select,
.form-group textarea,
.form-group .search-wrapper input {
  width: 100%;
}

select {
  cursor: pointer;
  background-color: var(--card);
}

textarea {
  resize: vertical;
  min-height: 5rem;
}

input[type="text"]:focus,
input[type="search"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="datetime-local"]:focus,
input[type="month"]:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(53, 117, 255, 0.12);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}

.form-row-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  align-items: start;
}

.form-row-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  align-items: start;
}

.form-row.items-end,
.form-row-3.items-end,
.form-row-4.items-end {
  align-items: end;
}

@media (max-width: 640px) {

  .form-row,
  .form-row-3,
  .form-row-4 {
    grid-template-columns: 1fr;
  }
}

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  text-decoration: none;
}

.btn-sm {
  padding: 0.3rem 0.75rem;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn-primary:hover {
  background: #2563eb;
  border-color: #2563eb;
}

.btn-outline {
  background: transparent;
  color: var(--foreground);
  border-color: var(--border);
}

.btn-outline:hover {
  background: var(--muted);
}

.btn-ghost {
  background: transparent;
  color: var(--foreground);
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--muted);
}

.btn-danger {
  background: var(--destructive);
  color: #fff;
  border-color: var(--destructive);
}

.btn-danger:hover {
  background: #b01531;
}

.btn-success {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}

.btn-success:hover {
  background: #15803d;
}

.btn svg {
  width: 1rem;
  height: 1rem;
  min-width: 1rem;
  min-height: 1rem;
  flex-shrink: 0;
}

.btn-icon {
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  min-height: 2rem;
  padding: 0;
  border-radius: var(--radius);
  background: transparent;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--foreground);
  transition: all 0.15s ease;
}

.btn-icon:hover {
  background: var(--muted);
}

.btn-icon svg {
  width: 1.125rem !important;
  height: 1.125rem !important;
  min-width: 1.125rem !important;
  min-height: 1.125rem !important;
  flex-shrink: 0 !important;
  stroke-width: 1.75;
}

/* ===================== CARDS ===================== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.card-header h2,
.card-header .card-title {
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-header p,
.card-header .card-desc {
  font-size: 0.8125rem;
  color: var(--muted-fg);
  margin-top: 0.25rem;
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
}

/* ===================== STATS GRID ===================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.stat-card .stat-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted-fg);
  margin-bottom: 0.5rem;
}

.stat-card .stat-value {
  font-size: 1.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stat-card .stat-sub {
  font-size: 0.75rem;
  color: var(--muted-fg);
  margin-top: 0.375rem;
}

.stat-icon {
  width: 20px;
  height: 20px;
}

.text-primary {
  color: var(--primary);
}

.text-accent {
  color: var(--accent);
}

.text-success {
  color: var(--success);
}

.text-warning {
  color: var(--warning);
}

.text-danger {
  color: var(--destructive);
}

.text-muted {
  color: var(--muted-fg);
}

/* ===================== TABLE ===================== */
.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

table th {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
  color: var(--muted-fg);
  font-size: 0.8125rem;
  white-space: nowrap;
}

table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

table tr:last-child td {
  border-bottom: none;
}

table tbody tr:hover {
  background: rgba(53, 117, 255, 0.03);
}

.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

/* ===================== BADGES ===================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-default {
  background: var(--primary);
  color: #fff;
}

.badge-secondary {
  background: var(--muted);
  color: var(--foreground);
}

.badge-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--foreground);
}

.badge-success {
  background: #dcfce7;
  color: var(--success);
}

.badge-warning {
  background: #fef3c7;
  color: var(--warning);
}

.badge-danger {
  background: #fee2e2;
  color: var(--destructive);
}

/* ===================== ALERTS ===================== */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.alert-success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.alert-info {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #93c5fd;
}

.alert-warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

/* ===================== PAGE HEADER ===================== */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
}

.page-header p {
  font-size: 0.875rem;
  color: var(--muted-fg);
  margin-top: 0.25rem;
}

.page-header-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ===================== SPACE ===================== */
.space-y-4>*+* {
  margin-top: 1rem;
}

.space-y-6>*+* {
  margin-top: 1.5rem;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.justify-end {
  justify-content: flex-end;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-3 {
  gap: 0.75rem;
}

.gap-4 {
  gap: 1rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.ml-auto {
  margin-left: auto;
}

.w-full {
  width: 100%;
}

.font-semibold {
  font-weight: 600;
}

.font-bold {
  font-weight: 700;
}

.text-sm {
  font-size: 0.875rem;
}

.text-xs {
  font-size: 0.75rem;
}

.text-lg {
  font-size: 1.125rem;
}

.text-xl {
  font-size: 1.25rem;
}

.text-2xl {
  font-size: 1.5rem;
}

.text-3xl {
  font-size: 1.875rem;
}

/* ===================== QUOTATION STEPPER ===================== */
.stepper {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 2rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--muted-fg);
}

.step.active {
  color: var(--primary);
}

.step.done {
  color: var(--success);
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 600;
  flex-shrink: 0;
}

.step.active .step-num {
  background: var(--primary);
  color: #fff;
}

.step.done .step-num {
  background: var(--success);
  color: #fff;
}

.step-arrow {
  color: var(--muted-fg);
  font-size: 0.75rem;
  margin: 0 0.25rem;
}

/* ===================== STEP ITEM ROW ===================== */
.step-section {
  display: flex;
  flex-direction: column;
}

.step-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.step-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-label h3 {
  font-size: 0.9375rem;
  font-weight: 600;
}

.step-body {
  padding-left: 2.5rem;
}

/* Flow layout for item/design selection on quotation item page */
.selection-flow {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 280px);
  align-items: stretch;
  gap: 0.875rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.35rem;
  scrollbar-width: thin;
}

.selection-flow .separator {
  display: none;
}

.selection-flow .step-section {
  position: relative;
  min-width: 240px;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(to bottom, #fff, rgba(53, 117, 255, 0.03));
  box-shadow: var(--shadow-sm);
}

.selection-flow .step-section:not(:last-child)::after {
  content: ">";
  position: absolute;
  right: -0.65rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-fg);
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--background);
  padding: 0 0.2rem;
}

.selection-flow .step-label {
  margin-bottom: 0.5rem;
}

.selection-flow .step-badge {
  width: 26px;
  height: 26px;
  font-size: 0.75rem;
}

.selection-flow .step-label h3 {
  font-size: 0.875rem;
}

.selection-flow .step-body {
  padding-left: 0;
}

.selection-flow .step-body[style*="max-width:320px"],
.selection-flow .step-body .form-row[style*="max-width:400px"] {
  max-width: 100% !important;
}

.selection-flow .step-body .form-row {
  grid-template-columns: 1fr 1fr;
}

.selection-flow .step-section select,
.selection-flow .step-section input[type="number"] {
  background: var(--card);
  border-color: var(--border);
}

.selection-flow .step-section select:hover,
.selection-flow .step-section input[type="number"]:hover {
  border-color: rgba(53, 117, 255, 0.4);
}

.selection-flow .step-section select:focus,
.selection-flow .step-section input[type="number"]:focus {
  border-color: var(--primary);
}

/* Quotation add-item card premium polish */
#add-item-card {
  border: 1px solid rgba(53, 117, 255, 0.14);
  box-shadow: 0 6px 18px rgba(43, 36, 25, 0.06);
}

#add-item-card .card-header {
  background: linear-gradient(90deg, rgba(53, 117, 255, 0.08), rgba(229, 192, 123, 0.09));
}

#add-item-card .card-header p {
  margin-top: 0.4rem;
}

#add-item-card .flow-hint {
  margin-top: 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

#add-item-card .card-body {
  padding-top: 1.1rem;
}

#add-item-card .step-label h3 {
  letter-spacing: 0.01em;
}

#add-item-card .step-label .step-badge {
  box-shadow: 0 3px 8px rgba(53, 117, 255, 0.28);
}

#add-item-card #cat-display {
  color: #1f2937;
}

#add-item-card .calc-box {
  border-width: 1px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 4px 14px rgba(53, 117, 255, 0.1);
}

#add-item-card #btn-add-item {
  min-height: 2.6rem;
  padding-left: 1.2rem;
  padding-right: 1.2rem;
  box-shadow: 0 6px 14px rgba(53, 117, 255, 0.25);
}

#add-item-card #btn-add-item:hover {
  transform: translateY(-1px);
}

.selection-flow .step-section.current-step {
  border-color: rgba(53, 117, 255, 0.65);
  box-shadow: 0 0 0 2px rgba(53, 117, 255, 0.15), 0 8px 20px rgba(53, 117, 255, 0.14);
  background: linear-gradient(to bottom, #fff, rgba(53, 117, 255, 0.08));
}

.selection-flow .step-section.current-step .step-badge {
  transform: scale(1.04);
  box-shadow: 0 0 0 4px rgba(53, 117, 255, 0.12), 0 4px 10px rgba(53, 117, 255, 0.3);
}

.selection-flow .step-section.current-step .step-label h3 {
  color: var(--primary);
}

.quotation-actions {
  position: sticky;
  bottom: 0;
  z-index: 40;
  background: rgba(250, 249, 246, 0.92);
  backdrop-filter: blur(4px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.7rem 0.8rem;
}

@media (max-width: 768px) {
  #add-item-card .card-body {
    padding-top: 0.9rem;
  }

  .quotation-actions {
    position: static;
    backdrop-filter: none;
  }
}

/* ===================== ITEM TABLE ===================== */
.estimate-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 850px;
}

.estimate-table th,
.estimate-table td {
  border: 1px solid #1f2937;
  padding: 0.45rem 0.6rem;
  font-size: 0.78rem;
}

.estimate-table td.text-right,
.estimate-table th.text-right,
.estimate-table td.text-center,
.estimate-table th.text-center {
  white-space: nowrap;
}

.estimate-table thead tr {
  background: #22d3ee;
}

.estimate-table thead th {
  font-weight: 700;
  color: #000;
  text-align: center;
}

.estimate-table .area-header {
  background: #22d3ee;
  font-weight: 700;
  color: #000;
  text-align: center;
  font-size: 0.8125rem;
}

.estimate-table tbody tr:hover {
  background: #f9fafb;
}

/* ===================== QUICK ACTIONS ===================== */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  cursor: pointer;
  transition: all 0.15s;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--foreground);
}

.quick-action-btn:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.quick-action-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-action-icon svg {
  width: 20px;
  height: 20px;
}

/* ===================== RECENT ACTIVITY ===================== */
.activity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: background 0.15s;
}

.activity-item:hover {
  background: rgba(53, 117, 255, 0.03);
}

.activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-icon svg {
  width: 20px;
  height: 20px;
  color: var(--primary);
}

/* ===================== MODAL ===================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.hidden {
  display: none;
}

.modal {
  background: var(--card);
  border-radius: 1rem;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1rem;
  font-weight: 600;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius);
  margin-left: auto;
}

.modal-close:hover {
  background: var(--muted);
}

.modal-close svg {
  width: 18px;
  height: 18px;
}

/* ===================== SEARCH + FILTER BAR ===================== */
.filter-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.filter-bar .search-wrapper {
  flex: 1;
  min-width: 200px;
}

/* Inline select next to search: same field chrome, don’t stretch full row width */
.filter-bar select {
  width: auto;
  min-width: 10rem;
  flex: 0 1 auto;
}

@media (max-width: 640px) {
  .filter-bar select {
    width: 100%;
    min-width: 0;
    flex: 1 1 100%;
  }
}

.search-wrapper {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-wrapper input {
  padding-left: 2.25rem;
  width: 100%;
}

.search-wrapper svg {
  position: absolute;
  left: 0.625rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--muted-fg);
  pointer-events: none;
}

/* ===================== ITEMS CATALOG ===================== */
.items-catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
  max-height: 360px;
  overflow-y: auto;
  padding: 0.5rem 0;
}

.item-card {
  padding: 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
  background: var(--card);
}

.item-card:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.item-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 2px rgba(53, 117, 255, 0.2);
}

.item-card h4 {
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.item-card span {
  font-size: 0.75rem;
  color: var(--muted-fg);
}

/* ===================== CALCULATION BOX ===================== */
.calc-box {
  background: linear-gradient(to right, var(--primary-light), rgba(229, 192, 123, 0.1));
  border: 2px solid rgba(53, 117, 255, 0.2);
  border-radius: var(--radius);
  padding: 1rem;
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 1rem;
  text-align: center;
}

.calc-item label {
  font-size: 0.7rem;
  color: var(--muted-fg);
  display: block;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.calc-item .calc-val {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.calc-item .calc-val-lg {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
}

/* ===================== SEPARATOR ===================== */
.separator {
  height: 1px;
  background: var(--border);
  margin: 1rem 0;
}

/* ===================== EMPTY STATE ===================== */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted-fg);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  opacity: 0.4;
}

.empty-state h3 {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.empty-state p {
  font-size: 0.875rem;
}

/* ===================== PDF / PRINT ===================== */
.pdf-header {
  background: linear-gradient(to right, rgba(53, 117, 255, 0.05), rgba(229, 192, 123, 0.05));
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.pdf-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  padding: 0.5rem 0;
}

.pdf-summary-row.total {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  border-top: 2px solid var(--border);
  padding-top: 1rem;
  margin-top: 0.5rem;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ===================== UTILITIES ===================== */
.rounded {
  border-radius: var(--radius);
}

.rounded-full {
  border-radius: 9999px;
}

.bg-card {
  background: var(--card);
}

.bg-muted {
  background: var(--muted);
}

.bg-primary-light {
  background: var(--primary-light);
}

.shadow {
  box-shadow: var(--shadow);
}

.border {
  border: 1px solid var(--border);
}

.italic {
  font-style: italic;
}

.opacity-60 {
  opacity: 0.6;
}

.hidden {
  display: none !important;
}

.block {
  display: block;
}

.inline-flex {
  display: inline-flex;
}

.cursor-pointer {
  cursor: pointer;
}

.overflow-hidden {
  overflow: hidden;
}

.p-4 {
  padding: 1rem;
}

.p-6 {
  padding: 1.5rem;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.mt-1 {
  margin-top: 0.25rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.min-w-0 {
  min-width: 0;
}

.truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

@media (max-width: 640px) {

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ===================== TOAST ===================== */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.2s ease;
  min-width: 220px;
}

.toast-success {
  background: var(--success);
}

.toast-error {
  background: var(--destructive);
}

.toast-info {
  background: var(--primary);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

/* ===================== ENTRY ROW ===================== */
.entry-row {
  background: rgba(53, 117, 255, 0.04);
}

.entry-row td {
  padding: 0.5rem !important;
  vertical-align: middle;
}

.table-input {
  width: 100%;
  min-height: 2.25rem !important;
  padding: 0.25rem 0.5rem !important;
  font-size: 0.8125rem !important;
  border-color: rgba(75, 59, 47, 0.15) !important;
  background: #fff;
}

.table-input:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 2px rgba(53, 117, 255, 0.1) !important;
}

.entry-row .badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
}

.btn-add-table {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  box-shadow: 0 4px 10px rgba(53, 117, 255, 0.3);
  transition: all 0.2s;
  cursor: pointer;
  margin: 0 auto;
}

.btn-add-table:hover {
  transform: scale(1.1);
  background: #2563eb;
}

.btn-add-table:disabled {
  background: var(--muted);
  color: var(--muted-fg);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
  opacity: 0.5;
}

.btn-add-table svg {
  width: 18px;
  height: 18px;
}

.entry-row-active {
  background: rgba(53, 117, 255, 0.08);
  box-shadow: inset 0 0 0 1px var(--primary-light);
}

.hidden {
  display: none !important;
}

/* ===================== PREMIUM DASHBOARD STYLES ===================== */
:root {
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.5);
  --card-glow-primary: rgba(53, 117, 255, 0.15);
  --card-glow-success: rgba(22, 163, 74, 0.15);
  --card-glow-warning: rgba(217, 119, 6, 0.15);
  --card-glow-accent: rgba(229, 192, 123, 0.15);
}

/* Dashboard Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animated-fade-in {
  animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.delay-1 {
  animation-delay: 0.1s;
}

.delay-2 {
  animation-delay: 0.2s;
}

.delay-3 {
  animation-delay: 0.3s;
}

.delay-4 {
  animation-delay: 0.4s;
}

/* Premium Card Upgrades */
.premium-card {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: 0 4px 20px -2px rgba(43, 36, 25, 0.05), 0 2px 6px -1px rgba(43, 36, 25, 0.03);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.premium-card:hover {
  transform: translateY(-4px);
  border-color: rgba(53, 117, 255, 0.3);
  box-shadow: 0 12px 30px -4px rgba(53, 117, 255, 0.12), 0 4px 12px -2px rgba(53, 117, 255, 0.06);
}

/* Specific Stat Card variants for top section */
.stat-card-premium {
  position: relative;
  overflow: hidden;
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--card);
  transition: all 0.3s ease;
}

.stat-card-premium::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat-card-premium:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.stat-card-premium:hover::before {
  opacity: 1;
}

.stat-card-premium.primary::before {
  background: var(--primary);
}

.stat-card-premium.accent::before {
  background: var(--accent);
}

.stat-card-premium.warning::before {
  background: var(--warning);
}

.stat-card-premium.success::before {
  background: var(--success);
}

/* Quick Action button enhancement */
.quick-action-premium {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
  padding: 1.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--card);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.quick-action-premium::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, var(--primary-light) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.quick-action-premium:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(53, 117, 255, 0.08);
}

.quick-action-premium:hover::after {
  opacity: 1;
}

.quick-action-premium>* {
  position: relative;
  z-index: 1;
}

/* Linear Progress Bar for KPI Target Progress */
.progress-bar-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  width: 100%;
}

.progress-bar-track {
  height: 8px;
  background: var(--muted);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--primary) 0%, #60a5fa 100%);
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.progress-bar-fill.success {
  background: linear-gradient(90deg, var(--success) 0%, #4ade80 100%);
}

.progress-bar-fill.warning {
  background: linear-gradient(90deg, var(--warning) 0%, #fbbf24 100%);
}

.progress-bar-fill.danger {
  background: linear-gradient(90deg, var(--destructive) 0%, #f87171 100%);
}

/* Mini Visual Charts/Trend lines using SVG */
.mini-trend-chart {
  width: 100%;
  height: 40px;
  margin-top: 0.5rem;
}

/* KPI Grid layouts */
.kpi-visual-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.25rem;
  border-radius: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
}

.kpi-visual-card:hover {
  box-shadow: var(--shadow);
  border-color: rgba(53, 117, 255, 0.2);
}

.kpi-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.timeline-item-premium {
  position: relative;
  padding-left: 2rem;
  border-left: 2px solid var(--border);
  padding-bottom: 1.5rem;
}

.timeline-item-premium:last-child {
  padding-bottom: 0;
  border-left: 2px solid transparent;
}

.timeline-dot {
  position: absolute;
  left: -6px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--card);
  box-shadow: 0 0 0 3px rgba(53, 117, 255, 0.15);
}

.timeline-dot.success {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

.timeline-dot.warning {
  background: var(--warning);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

.timeline-dot.danger {
  background: var(--destructive);
  box-shadow: 0 0 0 3px rgba(212, 24, 61, 0.15);
}

/* ===================== IMPROVED PREMIUM DASHBOARD REDESIGN ===================== */
.stat-card-premium {
  background: var(--card);
  border-radius: 1rem;
  border: 1px solid var(--border);
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.01);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card-premium:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
}

.stat-card-premium.primary {
  background: linear-gradient(135deg, var(--card) 0%, rgba(53, 117, 255, 0.02) 100%);
  border-left: 4px solid var(--primary);
}

.stat-card-premium.accent {
  background: linear-gradient(135deg, var(--card) 0%, rgba(229, 192, 123, 0.02) 100%);
  border-left: 4px solid var(--accent);
}

.stat-card-premium.warning {
  background: linear-gradient(135deg, var(--card) 0%, rgba(217, 119, 6, 0.02) 100%);
  border-left: 4px solid var(--warning);
}

.stat-card-premium.success {
  background: linear-gradient(135deg, var(--card) 0%, rgba(22, 163, 74, 0.02) 100%);
  border-left: 4px solid var(--success);
}

.kpi-visual-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.01);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.kpi-visual-card:hover {
  transform: translateY(-3px);
  border-color: rgba(53, 117, 255, 0.2);
  box-shadow: 0 12px 20px -3px rgba(0, 0, 0, 0.04), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
}

.quick-action-premium {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--card);
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.quick-action-premium:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 10px 15px -3px rgba(53, 117, 255, 0.08), 0 4px 6px -2px rgba(53, 117, 255, 0.04);
}

.quick-action-premium .quick-action-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.quick-action-premium:hover .quick-action-icon {
  transform: scale(1.1);
}

.premium-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.01);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-card:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.04), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
}

/* ===================== WHATSAPP MODULE DARK MODE OVERRIDES ===================== */
[data-theme="dark"] .chat-tab-btn.active {
  background-color: var(--card) !important;
  color: var(--foreground) !important;
  box-shadow: var(--shadow) !important;
}

[data-theme="dark"] .chat-room-header {
  background-color: var(--card) !important;
  border-bottom-color: var(--border) !important;
}

[data-theme="dark"] .chat-messages-area {
  background-color: var(--background) !important;
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px) !important;
}

[data-theme="dark"] .chat-bubble.inbound {
  background-color: var(--card) !important;
  color: var(--foreground) !important;
  border-color: var(--border) !important;
}

[data-theme="dark"] .chat-bubble.outbound {
  background-color: var(--primary) !important;
  color: #ffffff !important;
}

[data-theme="dark"] .chat-composer-box {
  background-color: var(--card) !important;
  border-top-color: var(--border) !important;
}

[data-theme="dark"] .composer-lock-row {
  background-color: rgba(217, 119, 6, 0.1) !important;
  border-color: rgba(217, 119, 6, 0.3) !important;
}

[data-theme="dark"] .composer-lock-text {
  color: var(--warning) !important;
}

[data-theme="dark"] .chat-empty-state {
  background-color: var(--background) !important;
}

[data-theme="dark"] .empty-icon {
  background-color: var(--card) !important;
  border-color: var(--border) !important;
}

[data-theme="dark"] .modal-card {
  background-color: var(--card) !important;
  border-color: var(--border) !important;
}

/* WhatsApp Templates Mock Phone */
[data-theme="dark"] .wa-mock-phone {
  background-color: var(--card) !important;
  border-color: var(--border) !important;
}

[data-theme="dark"] .wa-mock-media {
  background-color: var(--background) !important;
  border-bottom-color: var(--border) !important;
  color: var(--muted-fg) !important;
}

[data-theme="dark"] .wa-mock-body {
  color: var(--foreground) !important;
}

[data-theme="dark"] .wa-mock-buttons {
  background-color: var(--background) !important;
  border-top-color: var(--border) !important;
}

[data-theme="dark"] .wa-mock-btn {
  color: var(--primary) !important;
  border-bottom-color: var(--border) !important;
}

[data-theme="dark"] .wa-status-badge.approved {
  background-color: rgba(22, 163, 74, 0.15) !important;
  color: #4ade80 !important;
}

[data-theme="dark"] .wa-status-badge.pending {
  background-color: rgba(217, 119, 6, 0.15) !important;
  color: #facc15 !important;
}

[data-theme="dark"] .wa-status-badge.rejected {
  background-color: rgba(220, 38, 38, 0.15) !important;
  color: #f87171 !important;
}

/* ===================== SEARCH WRAPPER & BADGES ===================== */
.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-wrapper svg {
  position: absolute;
  left: 0.75rem;
  width: 16px !important;
  height: 16px !important;
  color: var(--muted-fg);
  pointer-events: none;
}

.search-wrapper input {
  width: 100%;
  padding-left: 2.25rem !important;
}

.badge-info {
  background: #e0f2fe;
  color: #0369a1;
}

[data-theme="dark"] .badge-info {
  background: rgba(3, 105, 161, 0.25);
  color: #38bdf8;
}