/* ============================================================
   NY Mariaziko Admin — TailwindAdmin Dark Theme Clone
   ============================================================ */

/* Google Font: DM Sans (if not loaded via importmap) */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { line-height: 1.5; -webkit-text-size-adjust: 100%; }

/* ============================================================
   CSS Variables — Light (default) & Dark
   ============================================================ */
:root {
  /* Sidebar — always dark */
  --sidebar-bg: #1c2434;
  --sidebar-text: #dee4ee;
  --sidebar-text-muted: #8a99af;
  --sidebar-hover: rgba(255,255,255,0.06);
  --sidebar-active-bg: rgba(93,135,255,0.12);
  --sidebar-active-text: #5d87ff;
  --sidebar-border: rgba(255,255,255,0.06);
  --sidebar-width: 280px;

  /* Light mode */
  --body-bg: #f1f5f9;
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --card-shadow: 0 1px 3px rgba(0,0,0,0.06);
  --header-bg: #ffffff;
  --header-border: #e2e8f0;
  --header-shadow: 0 1px 3px rgba(0,0,0,0.06);

  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-xs: #94a3b8;

  --border-color: #e2e8f0;
  --input-bg: #ffffff;
  --input-border: #cbd5e1;
  --input-focus: #5d87ff;

  --primary: #5d87ff;
  --primary-hover: #4570e6;
  --primary-light: rgba(93,135,255,0.1);
  --primary-text: #ffffff;

  --success: #13deb9;
  --success-light: rgba(19,222,185,0.1);
  --success-text: #02b3a9;

  --warning: #ffae1f;
  --warning-light: rgba(255,174,31,0.1);
  --warning-text: #b28000;

  --danger: #fa896b;
  --danger-light: rgba(250,137,107,0.1);
  --danger-text: #d74a2c;

  --info: #539bff;
  --info-light: rgba(83,155,255,0.1);

  --table-hover: #f8fafc;
  --table-border: #f1f5f9;
  --table-header-bg: #f8fafc;

  --badge-default-bg: #f1f5f9;
  --badge-default-text: #475569;
  --badge-default-border: #e2e8f0;

  --radius-sm: 7px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

/* ---- Dark mode ---- */
.dark {
  --body-bg: #171c26;
  --card-bg: #1e2a3a;
  --card-border: #2e3a47;
  --card-shadow: 0 1px 3px rgba(0,0,0,0.2);
  --header-bg: #1e2a3a;
  --header-border: #2e3a47;
  --header-shadow: 0 1px 3px rgba(0,0,0,0.2);

  --text-primary: #e2e8f0;
  --text-secondary: #c9d1d9;
  --text-muted: #8b949e;
  --text-xs: #6e7681;

  --border-color: #2e3a47;
  --input-bg: #253142;
  --input-border: #3d4f65;
  --input-focus: #5d87ff;

  --table-hover: rgba(255,255,255,0.02);
  --table-border: #2e3a47;
  --table-header-bg: rgba(255,255,255,0.03);

  --badge-default-bg: rgba(255,255,255,0.06);
  --badge-default-text: #c9d1d9;
  --badge-default-border: #3d4f65;

  --success-text: #13deb9;
  --warning-text: #ffae1f;
  --danger-text: #fa896b;
}

/* ============================================================
   Base
   ============================================================ */
body {
  background: var(--body-bg);
  color: var(--text-primary);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.875rem;
  min-height: 100vh;
  transition: background 0.2s, color 0.2s;
  overflow-x: hidden;
  width: 100%;
  overflow-wrap: break-word;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }

/* ============================================================
   Layout
   ============================================================ */
.admin-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
}

/* ---- Sidebar (always dark) ---- */
.admin-sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.admin-sidebar::-webkit-scrollbar { width: 4px; }
.admin-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

/* Sidebar Brand */
.sidebar-brand {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-brand-logo {
  width: 34px;
  height: 34px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.sidebar-brand-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
}

/* Sidebar Section Label */
.sidebar-section-label {
  padding: 1.25rem 1.5rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sidebar-text-muted);
}

/* Sidebar Navigation */
.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
}

.sidebar-nav-item {
  margin: 2px 0.75rem;
}

.sidebar-nav-link {
  display: flex;
  align-items: center;
  padding: 0.625rem 0.875rem;
  color: var(--sidebar-text);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  font-size: 0.875rem;
  font-weight: 400;
  gap: 0.75rem;
}

.sidebar-nav-link:hover {
  background: var(--sidebar-hover);
  color: #ffffff;
}

.sidebar-nav-link.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-text);
  font-weight: 500;
}

.sidebar-nav-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  opacity: 0.7;
}

.sidebar-nav-link.active .sidebar-nav-icon {
  opacity: 1;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--sidebar-border);
  margin-top: auto;
}

.sidebar-footer a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--sidebar-text-muted);
  font-size: 0.8125rem;
  text-decoration: none;
  padding: 0.5rem 0;
  transition: color 0.15s;
}

.sidebar-footer a:hover { color: #ffffff; }

/* ---- Main Content ---- */
.admin-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ---- Header ---- */
.admin-header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--header-shadow);
  transition: background 0.2s, border-color 0.2s;
}

.admin-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.admin-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.admin-header h1 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Header Search */
.admin-header-search {
  flex: 1;
  max-width: 400px;
  margin: 0 2rem;
}

.header-search-form {
  width: 100%;
}

.header-search-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.header-search-icon {
  position: absolute;
  left: 1rem;
  color: var(--text-muted);
  pointer-events: none;
}

.header-search-input {
  width: 100%;
  height: 38px;
  padding: 0 1rem 0 2.75rem;
  font-size: 0.875rem;
  background: var(--body-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-search-input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--card-bg);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.header-search-input::placeholder {
  color: var(--text-xs);
}

/* Breadcrumb */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  min-width: 0;
}

.breadcrumb::-webkit-scrollbar {
  display: none;
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
}

.breadcrumb-sep {
  color: var(--text-xs);
}

/* Header toggle button */
.sidebar-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-color);
  cursor: pointer;
  padding: 0.375rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  flex-shrink: 0;
}

.sidebar-toggle:hover {
  background: var(--table-hover);
  color: var(--text-primary);
}

/* Dark mode toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: transparent;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.15s;
}

.theme-toggle:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

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

:root:not(.dark) .theme-toggle .icon-moon { display: block; }
.dark .theme-toggle .icon-sun { display: block; }

/* Header user area */
.header-user {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.375rem 0.625rem 0.375rem 0.375rem;
  border-radius: var(--radius-full);
  cursor: default;
  transition: background 0.15s;
}

.header-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.75rem;
}

.header-user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.header-user-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.header-user-role {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

/* Overlay for mobile sidebar */
.sidebar-overlay { display: none; }

/* ---- Page Content ---- */
.admin-content {
  padding: 1.5rem;
  flex: 1;
}

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--card-shadow);
  transition: background 0.2s, border-color 0.2s;
}

.card-header {
  margin-bottom: 1.25rem;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-description {
  color: var(--text-muted);
  margin-top: 0.25rem;
  font-size: 0.8125rem;
}

/* ============================================================
   Stat Cards (Dashboard)
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  transition: background 0.2s, border-color 0.2s;
}

.stat-card-info {
  flex: 1;
}

.stat-card-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.stat-card-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-card-change {
  font-size: 0.75rem;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.stat-card-change.positive { color: var(--success-text); }
.stat-card-change.negative { color: var(--danger-text); }
.stat-card-change .text-muted { color: var(--text-muted); }

.stat-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.stat-icon-primary { background: var(--primary-light); color: var(--primary); }
.stat-icon-success { background: var(--success-light); color: var(--success-text); }
.stat-icon-warning { background: var(--warning-light); color: var(--warning-text); }
.stat-icon-danger  { background: var(--danger-light); color: var(--danger-text); }
.stat-icon-info    { background: var(--info-light); color: var(--info); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  font-family: inherit;
  line-height: 1.5;
  white-space: nowrap;
}

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

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: var(--primary-text);
}

.btn-secondary {
  background: var(--badge-default-bg);
  color: var(--text-secondary);
  border-color: var(--border-color);
}

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

.btn-destructive {
  background: var(--danger);
  color: #ffffff;
  border-color: var(--danger);
}

.btn-destructive:hover {
  background: #e5745a;
  border-color: #e5745a;
}

.btn-success {
  background: var(--success);
  color: #ffffff;
  border-color: var(--success);
}

.btn-outline {
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-secondary);
}

.btn-outline:hover {
  background: var(--table-hover);
  color: var(--text-primary);
  border-color: var(--text-xs);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: none;
}

.btn-ghost:hover {
  background: var(--badge-default-bg);
  color: var(--text-primary);
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}

.btn-lg {
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
}

.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  flex-shrink: 0;
}

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

.hidden { display: none !important; }

.text-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
   Tables
   ============================================================ */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  color: var(--text-primary);
  table-layout: fixed;
}

.table thead {
  background: var(--table-header-bg);
  border-bottom: 1px solid var(--border-color);
}

.table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--table-border);
  color: var(--text-primary);
  vertical-align: middle;
}

.table tbody tr {
  transition: background 0.1s;
}

.table tbody tr:hover {
  background: var(--table-hover);
}

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

/* Table Actions — always in a row */
.table-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: nowrap;
}

.table-action-form {
  display: inline-flex;
}

.table-action-btn {
  border-radius: var(--radius-sm);
}

.table-action-btn.btn-icon {
  width: 32px;
  height: 32px;
}

/* Vendor table — fixed column widths */
.col-checkbox { width: 42px; }
.col-company  { width: 280px; min-width: 220px; }
.col-category { width: 180px; min-width: 140px; }
.col-location { width: 200px; min-width: 140px; }
.col-status   { width: 110px; }
.col-rating   { width: 120px; }
.col-actions  { width: 130px; }
.col-price    { width: 160px; }
.col-date     { width: 140px; }
.col-capacity { width: 120px; }
.col-article  { width: 300px; }
.col-prestataire { width: 200px; }
.col-couture  { width: 180px; }


/* Vendor company cell */
.vendor-company-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.vendor-company-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--badge-default-bg);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.vendor-company-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vendor-company-text {
  min-width: 0;
}

.vendor-company-name {
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vendor-company-email {
  font-size: 0.75rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Services / Venue name cell (with thumbnail) */
.services-name-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.services-thumb {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border-color);
  background: var(--badge-default-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-xs);
  font-size: 0.625rem;
  font-weight: 600;
}

.services-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.services-name-text {
  min-width: 0;
}

.services-name-text > div:first-child {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Category filter menu */
.vendor-category-menu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.5rem;
  padding: 0 0 1rem;
  margin-bottom: 1rem;
}

.vendor-category-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  min-width: 0;
}

.vendor-category-count {
  font-size: 0.6875rem;
  line-height: 1;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  background: rgba(0,0,0,0.06);
  flex-shrink: 0;
}

.dark .vendor-category-count {
  background: rgba(255,255,255,0.08);
}

.vendor-category-link.active .vendor-category-count {
  background: rgba(255,255,255,0.2);
}

/* Group rows */
.vendor-group-row td {
  background: var(--table-header-bg);
  border-top: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 0.8125rem;
}

.vendor-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-secondary);
}

/* Table toolbar / filters */
.table-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.table-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.table-filter-form {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  flex: 1;
  flex-wrap: wrap;
}

.table-filter-form .form-group { margin-bottom: 0; }
.table-filter-search { 
    flex: 1 1 16rem; 
    position: relative;
}

.table-filter-search .btn-clear {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    z-index: 5;
}

.table-filter-search .btn-clear:hover {
    color: var(--danger);
    background: var(--danger-light);
}

.table-filter-search input.form-control {
    padding-right: 2.5rem;
}

.table-filter-select { min-width: 10rem; }

.table-bulk-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ============================================================
   Badges
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  white-space: nowrap;
  line-height: 1.5;
  letter-spacing: 0.01em;
}

.badge-default {
  background: var(--badge-default-bg);
  color: var(--badge-default-text);
  border: 1px solid var(--badge-default-border);
}

.badge-success {
  background: var(--success-light);
  color: var(--success-text);
  border: 1px solid rgba(19,222,185,0.2);
}

.badge-warning {
  background: var(--warning-light);
  color: var(--warning-text);
  border: 1px solid rgba(255,174,31,0.2);
}

.badge-destructive {
  background: var(--danger-light);
  color: var(--danger-text);
  border: 1px solid rgba(250,137,107,0.2);
}

.badge-primary {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(93,135,255,0.2);
}

/* ============================================================
   Forms
   ============================================================ */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 0.375rem;
  color: var(--text-primary);
}

.form-control {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  font-family: inherit;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  color: var(--text-primary);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control::placeholder {
  color: var(--text-xs);
}

.form-control:focus {
  outline: none;
  border-color: var(--input-focus);
  box-shadow: 0 0 0 3px rgba(93,135,255,0.12);
}

.form-control.border-red-500 {
  border-color: var(--danger);
}

.form-control.border-red-500:focus {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-light);
}

.form-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
}

textarea.form-control {
  border-radius: var(--radius-sm);
  min-height: 80px;
  resize: vertical;
}

/* ============================================================
   Alerts / Flash messages
   ============================================================ */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  border: 1px solid;
  font-size: 0.8125rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.alert-success {
  background: var(--success-light);
  border-color: rgba(19,222,185,0.3);
  color: var(--success-text);
}

.alert-warning {
  background: var(--warning-light);
  border-color: rgba(255,174,31,0.3);
  color: var(--warning-text);
}

.alert-destructive, .alert-error {
  background: var(--danger-light);
  border-color: rgba(250,137,107,0.3);
  color: var(--danger-text);
}

/* ============================================================
   Pagination
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding: 1rem 0;
}

.pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.75rem;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--card-bg);
  gap: 0.5rem;
}

.pagination-link:hover:not(.disabled):not(.active) {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.pagination-link.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 6px -1px rgba(93, 135, 255, 0.2);
}

.pagination-link.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  background: var(--table-header-bg);
}

.pagination-ellipsis {
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0 0.25rem;
}

.pagination-prev, .pagination-next {
  padding: 0 1rem;
}


/* ============================================================
   Dashboard charts row
   ============================================================ */
.dashboard-charts-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

/* Grid helpers */
.grid-2-1 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

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

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.grid-js-row {
  display: grid;
  grid-template-columns: 1fr 90px 90px auto;
  gap: 0.5rem;
  align-items: center;
}

.grid-js-tier {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 0.5rem;
  align-items: end;
}

.grid-js-fee {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto auto;
  gap: 0.5rem;
  align-items: end;
}

.grid-js-service-gallery {
  display: grid;
  grid-template-columns: 110px 1fr 1fr auto;
  gap: 0.4rem;
  align-items: start;
}

/* ============================================================
   Quick Actions (dashboard)
   ============================================================ */
.quick-action-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem;
  text-decoration: none;
  background: var(--table-hover);
  border-radius: var(--radius-sm);
  transition: background 0.15s;
  border: 1px solid transparent;
}

.quick-action-item:hover {
  background: var(--primary-light);
  border-color: rgba(93,135,255,0.15);
}

.quick-action-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.quick-action-text {
  flex: 1;
  min-width: 0;
}

.quick-action-title {
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--text-primary);
}

.quick-action-desc {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

/* ============================================================
   Detail page — Vendor view tabs
   ============================================================ */
.vendor-nav-tabs {
  display: flex;
  width: 100%;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 2rem;
  background: transparent;
  overflow-x: auto;
  scrollbar-width: none;
}

.vendor-nav-tabs::-webkit-scrollbar {
  display: none;
}

.vendor-nav-link {
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 1rem;
  position: relative;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  background: none;
  white-space: nowrap;
  font-family: inherit;
  border-bottom: 2px solid transparent;
}

.vendor-nav-link:hover {
  color: var(--text-primary);
}

.vendor-nav-link.active {
  color: var(--primary);
  background: var(--primary-light);
  border-bottom-color: var(--primary);
}

/* Detail info rows */
.detail-section {
  margin-bottom: 1.5rem;
}

.detail-section-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* --- Detailed Info List --- */
.detail-list {
  display: flex;
  flex-direction: column;
}

.detail-row {
  display: flex;
  align-items: baseline;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.875rem;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  width: 180px;
  flex-shrink: 0;
  color: var(--text-muted);
  font-weight: 500;
}

.detail-value {
  flex: 1;
  color: var(--text-primary);
  font-weight: 500;
}

/* --- Aligned Info Grid --- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.info-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.info-value {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
}

.info-item .badge {
  display: inline-flex;
  margin-top: 0.25rem;
}


/* Back / Return button */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.375rem 0;
  margin-bottom: 1rem;
  transition: color 0.15s;
}

.back-link:hover { color: var(--primary); }

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

/* Tab content fade */
.tab-content {
  display: none;
  animation: tabFadeIn 0.2s ease-out;
}

.tab-content.active {
  display: block;
}

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

/* ============================================================
   Wedding planner detail
   ============================================================ */
.planner-hero-card {
  overflow: hidden;
}

.planner-hero-layout {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.planner-hero-media {
  min-width: 170px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.planner-hero-avatar-shell {
  width: 144px;
  height: 144px;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: linear-gradient(180deg, var(--table-hover) 0%, rgba(93,135,255,0.08) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
}

.planner-hero-avatar-image,
.planner-inline-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.planner-hero-avatar-fallback,
.planner-inline-avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
  background: linear-gradient(135deg, #2563eb 0%, #0f766e 100%);
}

.planner-hero-avatar-fallback {
  font-size: 2.5rem;
}

.planner-inline-avatar {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border-color);
  background: var(--table-hover);
}

.planner-inline-avatar-fallback {
  font-size: 1.5rem;
}

.planner-hero-main {
  flex: 1;
  min-width: min(100%, 320px);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.planner-hero-title {
  font-size: 2rem;
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0;
}

.planner-hero-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.planner-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.planner-hero-facts {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem;
}

.planner-fact-card {
  padding: 1rem;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--table-hover) 0%, rgba(93,135,255,0.04) 100%);
  border: 1px solid var(--border-color);
}

.planner-fact-value {
  font-weight: 700;
  margin-top: 0.35rem;
}

.planner-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.planner-nav-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.planner-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-muted);
  border-radius: var(--radius-full);
  padding: 0.7rem 1rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.planner-nav-link:hover {
  color: var(--text-primary);
  border-color: rgba(93,135,255,0.32);
}

.planner-nav-link.active {
  color: var(--primary);
  background: var(--primary-light);
  border-color: rgba(93,135,255,0.32);
  box-shadow: 0 10px 24px rgba(93,135,255,0.12);
}

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

.planner-overview-span {
  grid-column: 1 / -1;
}

.planner-account-summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid var(--border-color);
  background: var(--table-hover);
  margin-bottom: 1rem;
}

.planner-detail-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

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

.planner-chart-card {
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid var(--border-color);
  background: var(--table-hover);
}

.planner-chart-frame {
  position: relative;
  min-height: 280px;
  margin-top: 0.75rem;
}

.planner-chart-note {
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

/* ============================================================
   Photo grid (detail pages)
   ============================================================ */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.photo-grid-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-color);
  cursor: pointer;
}

.photo-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.photo-grid-item:hover img {
  transform: scale(1.05);
}

.photo-grid-item .photo-badge {
  position: absolute;
  bottom: 0.5rem;
  left: 0.5rem;
  right: 0.5rem;
  font-size: 0.625rem;
  background: rgba(0,0,0,0.65);
  color: white;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  backdrop-filter: blur(4px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

/* Cover photo indicator */
.photo-grid-item.is-cover {
  border: 2px solid var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.photo-grid-item .cover-indicator {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: var(--primary);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* ============================================================
   Cover photo selection modal
   ============================================================ */
.cover-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.cover-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.cover-modal {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 700px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.cover-modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cover-modal-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.cover-modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}

.cover-modal-close:hover {
  background: var(--badge-default-bg);
  color: var(--text-primary);
}

.cover-modal-body {
  padding: 1.5rem;
}

.cover-modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.75rem;
}

.cover-modal-photo {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}

.cover-modal-photo:hover {
  border-color: var(--primary);
}

.cover-modal-photo.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.cover-modal-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* ============================================================
   Cover image on detail page
   ============================================================ */
.detail-cover-preview {
  width: 200px;
  height: 140px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--badge-default-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.detail-cover-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-cover-preview .no-cover {
  color: var(--text-xs);
  font-size: 0.75rem;
}

/* ============================================================
   Modal (generic)
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal-content {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-header { margin-bottom: 1rem; }

.modal-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-footer {
  margin-top: 1.5rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* ============================================================
   Utilities
   ============================================================ */
.text-muted   { color: var(--text-muted); }
.text-primary { color: var(--text-primary); }
.text-sm      { font-size: 0.8125rem; }
.text-xs      { font-size: 0.75rem; }
.text-left    { text-align: left; }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.font-medium  { font-weight: 500; }
.font-semibold { font-weight: 600; }

.flex          { display: flex; }
.inline-flex   { display: inline-flex; }
.items-center  { align-items: center; }
.items-end     { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.justify-end     { justify-content: flex-end; }
.flex-wrap     { flex-wrap: wrap; }
.flex-1        { flex: 1; }

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.ml-4 { margin-left: 1rem; }
.p-0  { padding: 0; }

.w-full { width: 100%; }

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
   Responsive — Tablet (768px)
   ============================================================ */
@media (max-width: 768px) {
  .sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
  }

  .sidebar-overlay.open {
    opacity: 1;
    visibility: visible;
  }

  .admin-sidebar {
    transform: translateX(-100%);
    z-index: 100;
  }

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

  .admin-main {
    margin-left: 0;
  }

  .admin-content {
    padding: 1rem;
  }

  .admin-header {
    padding: 0 1rem;
  }

  .admin-header-search {
    margin: 0 1rem;
  }

  /* Stats: 2 columns */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  /* Grids → single column */
  .dashboard-charts-row,
  .grid-2-1 {
    grid-template-columns: 1fr;
  }

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

  .grid-3 {
    grid-template-columns: 1fr 1fr;
  }

  .grid-js-row,
  .grid-js-tier,
  .grid-js-fee,
  .grid-js-service-gallery {
    grid-template-columns: 1fr 1fr;
  }

  /* Cards */
  .card {
    padding: 1rem;
    border-radius: var(--radius);
  }

  /* Vendor category menu */
  .vendor-category-menu {
    grid-template-columns: 1fr 1fr;
  }

  .planner-overview-grid,
  .planner-chart-grid {
    grid-template-columns: 1fr;
  }

  .planner-hero-layout {
    align-items: flex-start;
  }

  .planner-hero-media {
    align-items: flex-start;
  }

  .planner-chart-frame {
    min-height: 240px;
  }

  /* Vendor nav tabs: scroll */
  .vendor-nav-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .vendor-nav-tabs::-webkit-scrollbar { display: none; }

  .header-user-info { display: none; }
}

/* ============================================================
   Responsive — Mobile (480px)
   ============================================================ */
@media (max-width: 480px) {
  .admin-content {
    padding: 0.75rem;
  }

  .admin-header {
    height: 56px;
    padding: 0 0.75rem;
  }

  .admin-header h1 {
    font-size: 1rem;
  }

  .admin-header-search {
    display: none;
  }

  /* Stats: single column */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  /* Cards */
  .card {
    padding: 0.875rem;
    margin-bottom: 1rem;
  }

  .card-header .flex.justify-between {
    flex-direction: column;
    gap: 0.75rem;
  }

  .card-header .btn-primary {
    width: 100%;
    justify-content: center;
  }

  .card-title {
    font-size: 1rem;
  }

  /* Tables — enhanced card mode on mobile */
  .table-card thead { display: none; }

  .table-card,
  .table-card tbody {
    display: block;
    width: 100%;
  }

  .table-card tr:not(.vendor-group-row) {
    display: flex;
    flex-wrap: wrap;
    position: relative;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--card-bg);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  }

  .table-card tr:not(.vendor-group-row) td {
    display: flex;
    flex-direction: column;
    padding: 0.35rem 0.5rem 0.35rem 0;
    width: 50%;
    border-bottom: none;
    align-items: flex-start;
  }

  .table-card td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.125rem;
  }

  .table-card td:empty::before,
  .table-card td[data-label=""]::before { display: none; }

  /* Title / main column spans full width */
  .table-card tr:not(.vendor-group-row) td:first-child {
    width: 100%;
    margin-bottom: 0.5rem;
    padding-top: 0;
    padding-right: 0;
  }

  .table-card tr:not(.vendor-group-row) td:first-child::before {
    display: none;
  }

  /* Services / Venues thumbnails */
  .table-card tr:not(.vendor-group-row) td:first-child .services-name-cell {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    width: 100%;
  }

  .table-card tr:not(.vendor-group-row) td:first-child .services-thumb {
    width: calc(100% + 2rem);
    height: 200px;
    max-width: none;
    margin: -1rem -1rem 0 -1rem;
    border-radius: 16px 16px 0 0;
    border: none;
    border-bottom: 1px solid var(--border-color);
  }

  .table-card tr:not(.vendor-group-row) td:first-child .services-name-text {
    width: 100%;
  }

  .table-card tr:not(.vendor-group-row) td:first-child .services-name-text > div:first-child {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    white-space: normal;
    margin-bottom: 0.25rem;
  }

  .table-card tr:not(.vendor-group-row) td:first-child .services-name-text .text-sm {
    white-space: normal !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-width: 100% !important;
  }

  /* Vendor company avatars */
  .table-card tr:not(.vendor-group-row) td:first-child .vendor-company-cell {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .table-card tr:not(.vendor-group-row) td:first-child .vendor-company-avatar {
    width: 64px;
    height: 64px;
    margin-top: 0.5rem;
  }

  /* Article thumbnails */
  .table-card tr:not(.vendor-group-row) td:first-child .article-title-cell {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .table-card tr:not(.vendor-group-row) td:first-child .article-thumb {
    width: calc(100% + 2rem);
    height: 180px;
    max-width: none;
    margin: -1rem -1rem 0 -1rem;
    border-radius: 16px 16px 0 0;
    border: none;
  }

  /* Actions section */
  .table-card tr:not(.vendor-group-row) td:last-child,
  .table-card tr:not(.vendor-group-row) td[data-label="Actions"] {
    width: 100%;
    flex-direction: row;
    align-items: center;
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--border-color);
    padding-right: 0;
  }

  .table-card tr:not(.vendor-group-row) td:last-child::before,
  .table-card tr:not(.vendor-group-row) td[data-label="Actions"]::before {
    display: none;
  }

  .table-card tr:not(.vendor-group-row) td:last-child .table-actions {
    width: 100%;
    justify-content: space-between;
    gap: 0.5rem;
  }


  /* Table toolbar */
  .table-toolbar { padding: 0; }

  .table-filter-form {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

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

  .table-filter-form .btn {
    width: 100%;
    justify-content: center;
  }

  /* Buttons */
  .btn { font-size: 0.8125rem; }

  /* Pagination */
  .pagination {
    flex-wrap: wrap;
    justify-content: center;
  }

  .pagination-link {
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
  }

  /* Photo grids */
  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .planner-hero-avatar-shell {
    width: 112px;
    height: 112px;
    border-radius: 22px;
  }

  .planner-hero-title {
    font-size: 1.5rem;
  }

  .planner-nav-tabs {
    gap: 0.5rem;
  }

  .planner-nav-link {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.75rem;
  }

  .planner-account-summary {
    align-items: flex-start;
  }

  .planner-chart-frame {
    min-height: 220px;
  }

  /* Vendor nav tabs: pill style */
  .vendor-nav-tabs {
    gap: 0.5rem;
    flex-wrap: wrap;
    border-bottom: none;
  }

  .vendor-nav-link {
    padding: 0.5rem 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    background: var(--card-bg);
    font-size: 0.75rem;
  }

  .vendor-nav-link.active::after { display: none; }

  .vendor-nav-link.active {
    background: var(--primary-light);
    border-color: rgba(93,135,255,0.3);
    color: var(--primary);
  }

  /* Detail grid */
  .grid-2-1,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .grid-js-row,
  .grid-js-tier,
  .grid-js-fee,
  .grid-js-service-gallery {
    grid-template-columns: 1fr;
    gap: 0.5rem !important;
  }

  /* Vendor group rows */
  .table-card .vendor-group-row {
    background: var(--table-header-bg);
    border: none;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0;
    border-radius: 0;
  }

  .vendor-category-menu {
    grid-template-columns: 1fr;
  }

  .table-actions {
    justify-content: flex-start;
  }

  .detail-page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .detail-page-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .detail-two-col {
    grid-template-columns: 1fr;
  }

  .detail-sidebar {
    position: static;
  }

  .product-hero-media {
    height: 280px;
  }

  .product-hero-content {
    padding: 1rem;
  }

  .product-hero-vendor {
    width: 100%;
  }
}

/* ============================================================
   Detail page header (back + actions)
   ============================================================ */
.detail-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.detail-page-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: nowrap;
}

/* ============================================================
   Detail two-column layout
   ============================================================ */
.detail-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.95fr);
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .detail-two-col {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Detail sidebar
   ============================================================ */
.detail-sidebar {
  display: grid;
  gap: 1.5rem;
  align-content: start;
  position: sticky;
  top: 1rem;
  align-self: start;
}

.detail-sidebar-vendor-logo {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--badge-default-bg);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.detail-sidebar-vendor-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-sidebar-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.detail-sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem;
}

.detail-sidebar-history {
  display: grid;
  gap: 0.75rem;
  font-size: 0.875rem;
  padding: 1.5rem;
}

/* ============================================================
   Product hero card (fashion/catalogue detail)
   ============================================================ */
.product-hero-card {
  overflow: hidden;
}

.product-hero-media {
  position: relative;
  height: 380px;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--badge-default-bg);
}

.product-hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.product-hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.08) 0%, rgba(15, 23, 42, 0.7) 100%);
}

.product-hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem;
  flex-wrap: wrap;
  color: white;
}

.product-hero-copy {
  display: grid;
  gap: 0.35rem;
  max-width: 32rem;
}

.product-hero-eyebrow {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.product-hero-title {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1.1;
  color: white;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.25);
}

.product-hero-meta {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.95rem;
}

.product-hero-vendor {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1rem;
  border-radius: 1rem;
  background: rgba(17, 24, 39, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(14px);
  color: white;
  text-decoration: none;
  max-width: 100%;
}

.product-hero-vendor:hover {
  color: white;
  border-color: rgba(255, 255, 255, 0.35);
}

.product-hero-vendor-logo {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.product-hero-vendor-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-hero-vendor-name {
  font-weight: 700;
}

.product-hero-vendor-meta {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.78);
}

