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


:root {
  --background: #f8fafc;
  --foreground: #0f172a;
  --card: #ffffff;
  --card-foreground: #0f172a;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-foreground: #ffffff;
  --secondary: #f1f5f9;
  --secondary-hover: #e2e8f0;
  --secondary-foreground: #475569;
  --muted: #f1f5f9;
  --muted-foreground: #64748b;
  --accent: #e0e7ff;
  --accent-foreground: #3730a3;
  --border: #e2e8f0;
  --input: #e2e8f0;
  --ring: #4f46e5;
  --radius: 12px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.dark {
  --background: #0f172a;
  --foreground: #f1f5f9;
  --card: #1e293b;
  --card-foreground: #f1f5f9;
  --primary: #818cf8;
  --primary-hover: #a5b4fc;
  --primary-foreground: #0f172a;
  --secondary: #334155;
  --secondary-hover: #475569;
  --secondary-foreground: #e2e8f0;
  --muted: #334155;
  --muted-foreground: #94a3b8;
  --accent: #312e81;
  --accent-foreground: #c7d2fe;
  --border: #334155;
  --input: #334155;
  --ring: #818cf8;
}

html {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--background);
  color: var(--foreground);
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Notifications dropdown */
.notif-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 340px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  overflow: hidden;
  animation: notif-slide-in 0.18s ease;
}

@keyframes notif-slide-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.notif-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.notif-list {
  max-height: 320px;
  overflow-y: auto;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  color: var(--foreground);
}

.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--muted); }

.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}

.notif-dot--error   { background: #ef4444; }
.notif-dot--success { background: #16a34a; }

.notif-body { flex: 1; }
.notif-title { font-size: 0.85rem; font-weight: 600; line-height: 1.3; }
.notif-meta  { font-size: 0.78rem; color: var(--muted-foreground); margin-top: 2px; }

.notif-empty {
  padding: 24px 16px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted-foreground);
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  border-bottom: 1px solid var(--border);
  background-color: var(--card);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.header-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--foreground);
}

.header-subtitle {
  font-size: 14px;
  color: var(--muted-foreground);
}

.primary-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 32px;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--card) 92%, var(--secondary)), var(--card));
}

.primary-tab {
  display: flex;
  min-height: 62px;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.primary-tab:hover,
.primary-tab.is-active {
  border-color: var(--primary);
  background: var(--secondary);
  color: var(--foreground);
}

.primary-tab strong {
  font-size: 0.95rem;
  color: inherit;
}

.primary-tab span {
  font-size: 0.76rem;
  color: var(--muted-foreground);
}

/* Theme Toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background-color: var(--card);
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-toggle:hover {
  background-color: var(--secondary);
  border-color: var(--muted-foreground);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  color: var(--foreground);
  transition: color 0.2s ease;
}

.theme-toggle .sun-icon {
  display: none;
}

.dark .theme-toggle .sun-icon {
  display: block;
}

.dark .theme-toggle .moon-icon {
  display: none;
}

/* Main Container */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px;
}

.main-container--wide {
  max-width: 1600px;
}

.main-container--full {
  max-width: 1920px;
}

/* Grid Layout */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

#app-section > .grid {
  display: none;
}

.dashboard-workspace {
  display: grid;
  gap: 18px;
  margin-bottom: 24px;
}

.dashboard-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: color-mix(in srgb, var(--card) 82%, var(--secondary));
}

.dashboard-tab {
  display: flex;
  min-height: 108px;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 16px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--foreground);
  text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.dashboard-tab:hover,
.dashboard-tab.is-active {
  border-color: var(--primary);
  background: var(--card);
}

.dashboard-tab-kicker {
  width: max-content;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-foreground);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.dashboard-tab strong {
  font-size: 1.05rem;
}

.dashboard-tab small {
  color: var(--muted-foreground);
  line-height: 1.35;
}

.dashboard-status-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card);
}

.dashboard-status-label {
  display: block;
  color: var(--muted-foreground);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.dashboard-status-value {
  display: block;
  margin-top: 4px;
  color: var(--foreground);
  font-size: 2rem;
  line-height: 1;
}

.dashboard-status-panel p {
  max-width: 640px;
  color: var(--muted-foreground);
  line-height: 1.5;
}

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

  .dashboard-tabs {
    grid-template-columns: 1fr;
  }

  .dashboard-status-panel {
    align-items: flex-start;
    flex-direction: column;
  }
  
  .main-container {
    padding: 16px;
  }

  .header {
    padding: 16px;
  }

  .primary-tabs {
    grid-template-columns: 1fr 1fr;
    padding: 10px 16px;
  }
}

/* Card Base */
.card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: none;
}

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

.card-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--accent);
  color: var(--accent-foreground);
  transition: background-color 0.2s ease;
}

.card-icon svg {
  width: 20px;
  height: 20px;
}

/* Total Clients Card */
.total-clients-value {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--foreground);
  line-height: 1;
  margin-bottom: 8px;
}

.growth-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  background-color: #dcfce7;
  color: #166534;
}

.dark .growth-badge {
  background-color: #14532d;
  color: #86efac;
}

.growth-badge svg {
  width: 14px;
  height: 14px;
}

.card-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn svg {
  width: 16px;
  height: 16px;
}

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

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background-color: var(--secondary-hover);
}

.btn-danger {
  background-color: #dc2626;
  color: #ffffff;
}

.btn-danger:hover {
  background-color: #b91c1c;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-full {
  width: 100%;
}

/* Popup UI */
.app-toast-stack {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(380px, calc(100vw - 32px));
}

.app-toast {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: start;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
  animation: appToastEnter 0.18s ease-out;
  pointer-events: auto;
}

.app-toast.is-leaving {
  animation: appToastLeave 0.18s ease-in forwards;
}

.app-toast--success {
  border-color: rgba(34, 197, 94, 0.28);
}

.app-toast--error {
  border-color: rgba(239, 68, 68, 0.32);
}

.app-toast--warning {
  border-color: rgba(245, 158, 11, 0.32);
}

.app-toast-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--secondary);
  color: var(--primary);
}

.app-toast--success .app-toast-icon {
  background: rgba(34, 197, 94, 0.14);
  color: #15803d;
}

.app-toast--error .app-toast-icon {
  background: rgba(239, 68, 68, 0.14);
  color: #dc2626;
}

.app-toast--warning .app-toast-icon {
  background: rgba(245, 158, 11, 0.16);
  color: #d97706;
}

.dark .app-toast--success .app-toast-icon {
  color: #86efac;
}

.dark .app-toast--error .app-toast-icon {
  color: #fca5a5;
}

.dark .app-toast--warning .app-toast-icon {
  color: #fcd34d;
}

.app-toast-icon svg,
.app-toast-close svg {
  width: 20px;
  height: 20px;
}

.app-toast-body {
  min-width: 0;
}

.app-toast-title {
  display: block;
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--foreground);
}

.app-toast-message {
  margin-top: 4px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted-foreground);
}

.app-toast-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.app-toast-close:hover {
  background: var(--secondary);
  color: var(--foreground);
}

.app-dialog-open {
  overflow: hidden;
}

.app-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(6px);
  pointer-events: auto;
}

.app-dialog {
  width: min(460px, 100%);
  padding: 24px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.35);
  pointer-events: auto;
}

.app-dialog-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--foreground);
}

.app-dialog-message {
  margin-top: 12px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted-foreground);
}

.app-dialog-hint {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--foreground);
  font-size: 0.88rem;
  line-height: 1.45;
}

.app-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.app-dialog-backdrop[hidden] {
  display: none !important;
}

@keyframes appToastEnter {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes appToastLeave {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
}

@media (max-width: 640px) {
  .app-toast-stack {
    top: 16px;
    right: 16px;
    left: 16px;
    width: auto;
  }

  .app-dialog {
    padding: 20px;
  }

  .app-dialog-actions {
    flex-direction: column-reverse;
  }

  .app-dialog-actions .btn {
    width: 100%;
  }
}

/* Import Card */
.import-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.import-card .card-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 16px;
}

.import-card .card-icon svg {
  width: 32px;
  height: 32px;
}

.import-card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 8px;
}

.import-card-description {
  font-size: 14px;
  color: var(--muted-foreground);
  margin-bottom: 24px;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

/* Messages Section */
.messages-section {
  grid-column: 1 / -1;
}

.messages-card {
  padding: 0;
}

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

.messages-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--foreground);
}

.messages-subtitle {
  margin-top: 4px;
  color: var(--muted-foreground);
  font-size: 0.88rem;
}

.messages-count {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 9999px;
  background-color: var(--secondary);
  color: var(--muted-foreground);
}

.messages-body {
  padding: 24px;
}

.template-event-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.template-event-tab {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background:
    radial-gradient(circle at top right, rgba(79, 70, 229, 0.12), transparent 42%),
    var(--card);
  color: var(--foreground);
  cursor: pointer;
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.template-event-tab:hover,
.template-event-tab.is-active {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.template-event-tab strong,
.template-event-tab span {
  display: block;
}

.template-event-tab strong {
  font-size: 0.98rem;
  margin-bottom: 6px;
}

.template-event-tab span {
  color: var(--muted-foreground);
  font-size: 0.82rem;
  line-height: 1.4;
}

.template-helper-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) 2fr;
  gap: 18px;
  align-items: start;
  margin-bottom: 22px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--border));
  background: color-mix(in srgb, var(--accent) 38%, transparent);
}

.template-helper-title {
  font-size: 1rem;
  color: var(--foreground);
  margin-bottom: 6px;
}

.template-helper-text {
  color: var(--muted-foreground);
  font-size: 0.88rem;
  line-height: 1.5;
}

.template-placeholder-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.template-placeholder-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  color: var(--foreground);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.template-placeholder-chip:hover {
  border-color: var(--primary);
  background: var(--secondary);
  transform: translateY(-1px);
}

.template-placeholder-chip span {
  font-size: 0.78rem;
  font-weight: 700;
}

.template-placeholder-chip code {
  color: var(--muted-foreground);
  font-size: 0.76rem;
}

/* Form */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  font-family: inherit;
  border: 1px solid var(--input);
  border-radius: 10px;
  background-color: var(--card);
  color: var(--foreground);
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.dark .form-input:focus {
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.2);
}

.form-input::placeholder {
  color: var(--muted-foreground);
}

textarea.form-input {
  min-height: 100px;
  resize: vertical;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-row .form-group {
  flex: 1;
}

@media (max-width: 640px) {
  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .template-event-tabs,
  .template-helper-panel {
    grid-template-columns: 1fr;
  }
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

/* Messages List */
.messages-list {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.messages-list-header {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted-foreground);
  margin-bottom: 16px;
}

.message-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  border-radius: 10px;
  background-color: var(--secondary);
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.message-item:hover {
  background-color: var(--secondary-hover);
  transform: translateX(4px);
}

.message-item:last-child {
  margin-bottom: 0;
}

.message-number {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background-color: var(--primary);
  color: var(--primary-foreground);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.message-content {
  flex: 1;
  min-width: 0;
}

.message-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 4px;
}

.message-text {
  font-size: 14px;
  color: var(--muted-foreground);
  line-height: 1.5;
  word-break: break-word;
}

.message-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  background-color: transparent;
  border: 1px solid var(--border);
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  background-color: var(--card);
  color: var(--foreground);
  border-color: var(--muted-foreground);
}

.btn-icon.delete:hover {
  background-color: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

.dark .btn-icon.delete:hover {
  background-color: #450a0a;
  color: #fca5a5;
  border-color: #7f1d1d;
}

.btn-icon svg {
  width: 16px;
  height: 16px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted-foreground);
}

.empty-state-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  opacity: 0.5;
}

.empty-state-text {
  font-size: 14px;
}

/* Decorative Elements */
.card-decoration {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), transparent);
  opacity: 0.05;
  top: -40px;
  right: -40px;
  pointer-events: none;
}

.card-decoration-2 {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-foreground), transparent);
  opacity: 0.03;
  bottom: -20px;
  left: -20px;
  pointer-events: none;
}

/* =====================================================
   CLIENTS PAGE STYLES
   ===================================================== */

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 10px;
  border: 1px solid var(--border);
  background-color: var(--card);
  color: var(--foreground);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-back:hover {
  background-color: var(--secondary);
  border-color: var(--muted-foreground);
}

.btn-back svg {
  width: 16px;
  height: 16px;
}

/* Search Section */
.search-section {
  margin-bottom: 24px;
}

.search-wrapper {
  position: relative;
  max-width: 400px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--muted-foreground);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  font-size: 14px;
  font-family: inherit;
  border: 1px solid var(--input);
  border-radius: 10px;
  background-color: var(--card);
  color: var(--foreground);
  transition: all 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.dark .search-input:focus {
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.2);
}

.search-input::placeholder {
  color: var(--muted-foreground);
}

/* Table Card */
.table-card {
  padding: 0;
  overflow: hidden;
}

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

.table-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--foreground);
}

.table-count {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 9999px;
  background-color: var(--secondary);
  color: var(--muted-foreground);
}

/* Table */
.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background-color: var(--secondary);
}

th {
  padding: 14px 24px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

th:last-child {
  text-align: right;
}

td {
  padding: 16px 24px;
  font-size: 14px;
  color: var(--foreground);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

td:last-child {
  text-align: right;
}

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

tbody tr {
  transition: background-color 0.15s ease;
}

tbody tr:hover {
  background-color: var(--secondary);
}

/* Client Info */
.client-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.client-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent-foreground));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
}

.client-name {
  font-weight: 500;
  color: var(--foreground);
}

.client-email {
  font-size: 13px;
  color: var(--muted-foreground);
}

/* Status Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
}

.status-badge.active {
  background-color: #dcfce7;
  color: #166534;
}

.dark .status-badge.active {
  background-color: #14532d;
  color: #86efac;
}

.status-badge.inactive {
  background-color: #fef2f2;
  color: #dc2626;
}

.dark .status-badge.inactive {
  background-color: #450a0a;
  color: #fca5a5;
}

.status-badge.pending {
  background-color: #fef3c7;
  color: #d97706;
}

.dark .status-badge.pending {
  background-color: #451a03;
  color: #fcd34d;
}

/* Table Actions */
.table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

/* Clients Page Empty State */
.table-card .empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--muted-foreground);
}

.table-card .empty-state-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  opacity: 0.4;
}

.table-card .empty-state-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 8px;
}

.table-card .empty-state-text {
  font-size: 14px;
  max-width: 300px;
  margin: 0 auto;
}

/* Responsive - Clients Page */
@media (max-width: 768px) {
  th, td {
    padding: 12px 16px;
  }

  .client-avatar {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .header-actions {
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 8px;
  }

  .btn-back span {
    display: none;
  }
}
