/* ──────────────────────────────────────────────────────────────
   Opalina Veste — Senior UX/UI Admin Dashboard (Light Theme)
   Design: Refined Light Mode, Burgundy & Gold, Sharp Crisp Corners (4px-6px)
   ────────────────────────────────────────────────────────────── */

:root {
  --bg-main: #f6f5f8;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-input: #fcfbfe;

  --brand-burgundy: #6B2D3E;
  --brand-burgundy-hover: #542230;
  --brand-burgundy-light: rgba(107, 45, 62, 0.08);

  --brand-gold: #b8860b;
  --brand-gold-bright: #d4af37;
  --brand-gold-subtle: rgba(184, 134, 11, 0.12);

  --text-heading: #1a141e;
  --text-body: #362e3d;
  --text-muted: #6e6778;
  --text-light: #ffffff;

  --border-subtle: #e5e0ec;
  --border-accent: rgba(107, 45, 62, 0.18);
  --border-focus: var(--brand-burgundy);

  --status-success: #2e7d32;
  --status-success-bg: rgba(46, 125, 50, 0.1);
  --status-warning: #ed6c02;
  --status-warning-bg: rgba(237, 108, 2, 0.1);
  --status-danger: #c62828;
  --status-danger-bg: rgba(198, 40, 40, 0.1);

  /* Cantos reduzidos / Retângulos mais nítidos */
  --radius-sm: 3px;
  --radius-md: 4px;
  --radius-lg: 6px;

  --shadow-subtle: 0 2px 10px rgba(0, 0, 0, 0.05);
  --shadow-elevated: 0 8px 24px rgba(0, 0, 0, 0.09);
  --transition: all 0.2s ease;
}

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

body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-body);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── ICON UTILITIES ───────────────────────────────────────────────────── */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2em;
  height: 1.2em;
  stroke-width: 1.8;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.icon-sm {
  width: 1em;
  height: 1em;
}

.icon-lg {
  width: 1.5em;
  height: 1.5em;
}

/* ── AUTH GUARD OVERLAY (LIGHT MODE) ─────────────────────────────────── */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(246, 245, 248, 0.96);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-elevated);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  width: 100%;
  max-width: 420px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-burgundy), var(--brand-gold));
}

.auth-logo {
  height: 44px;
  margin-bottom: 20px;
  object-fit: contain;
}

.auth-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  color: var(--brand-burgundy);
  margin-bottom: 4px;
  font-weight: 700;
}

.auth-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── FORM ELEMENTS ────────────────────────────────────────────────────── */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.input-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.input-group label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  font-weight: 700;
}

.admin-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-heading);
  font-size: 0.9rem;
  font-family: inherit;
  transition: var(--transition);
}

.admin-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--brand-burgundy-light);
  background: #ffffff;
}

textarea.admin-input {
  resize: vertical;
  min-height: 75px;
}

/* ── BUTTON SYSTEM (SHARP EDGES) ──────────────────────────────────────── */
.admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  font-family: inherit;
  white-space: nowrap;
  user-select: none;
}

.btn-primary {
  background: var(--brand-burgundy);
  color: var(--text-light);
}

.btn-primary:hover {
  background: var(--brand-burgundy-hover);
  box-shadow: 0 2px 8px rgba(107, 45, 62, 0.25);
}

.btn-gold {
  background: var(--brand-gold);
  color: #ffffff;
}

.btn-gold:hover {
  background: #a07408;
  box-shadow: 0 2px 8px rgba(184, 134, 11, 0.25);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-body);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: #f4f2f7;
  color: var(--text-heading);
  border-color: #d0c8dc;
}

.btn-danger {
  background: var(--status-danger-bg);
  color: var(--status-danger);
  border: 1px solid rgba(198, 40, 40, 0.2);
}

.btn-danger:hover {
  background: var(--status-danger);
  color: #ffffff;
}

.btn-success {
  background: var(--status-success-bg);
  color: var(--status-success);
  border: 1px solid rgba(46, 125, 50, 0.2);
}

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

.btn-sm {
  padding: 6px 12px;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
}

/* ── ALERT BOXES ──────────────────────────────────────────────────────── */
.alert-box {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
}

.alert-danger {
  background: var(--status-danger-bg);
  border: 1px solid rgba(198, 40, 40, 0.2);
  color: var(--status-danger);
}

/* ── MAIN DASHBOARD LAYOUT ────────────────────────────────────────────── */
.admin-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.admin-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 14px 32px;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-subtle);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-brand img {
  height: 34px;
}

.header-brand h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  color: var(--brand-burgundy);
  font-weight: 700;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-content {
  flex: 1;
  padding: 28px 32px;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

/* ── METRIC KPIS ──────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-subtle);
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-burgundy);
  box-shadow: var(--shadow-elevated);
}

.stat-info h3 {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 700;
}

.stat-value {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text-heading);
}

.stat-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--brand-burgundy-light);
  border: 1px solid var(--border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-burgundy);
}

/* ── TAB NAVIGATION BAR ────────────────────────────────────────────────── */
.admin-tabs-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}

.tab-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.tab-btn:hover {
  background: #f4f2f7;
  color: var(--text-heading);
}

.tab-btn.active {
  background: var(--brand-burgundy);
  color: #ffffff;
  border-color: var(--brand-burgundy);
  box-shadow: 0 2px 8px rgba(107, 45, 62, 0.25);
}

/* ── TOOLBAR & FILTERS ─────────────────────────────────────────────────── */
.toolbar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: var(--shadow-subtle);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.search-input-wrapper {
  position: relative;
  min-width: 260px;
}

.search-input-wrapper .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-input-wrapper input {
  padding-left: 38px;
}

.select-filter {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-heading);
  padding: 10px 14px;
  font-size: 0.86rem;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
}

.select-filter:focus {
  outline: none;
  border-color: var(--border-focus);
}

.action-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── CATALOG GRID (EXIBIÇÃO EM GRADE) ─────────────────────────────────── */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 20px;
}

.product-card-grid {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
}

.product-card-grid:hover {
  transform: translateY(-3px);
  border-color: var(--brand-burgundy);
  box-shadow: var(--shadow-elevated);
}

.product-card-grid.sold-out {
  opacity: 0.85;
  border-color: rgba(198, 40, 40, 0.3);
}

.card-img-wrapper {
  width: 100%;
  height: 220px;
  background: #f0ecf4;
  position: relative;
  overflow: hidden;
}

.card-img-main {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card-grid:hover .card-img-main {
  transform: scale(1.04);
}

.card-badges-top {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2;
}

.card-media-tags {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: flex;
  gap: 4px;
  z-index: 2;
}

.card-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.card-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.card-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-heading);
  line-height: 1.3;
}

.card-code {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.card-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.card-price {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--brand-burgundy);
}

.card-stock-status {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.card-stock-status.in-stock {
  background: var(--status-success-bg);
  color: var(--status-success);
}

.card-stock-status.out-of-stock {
  background: var(--status-danger-bg);
  color: var(--status-danger);
}

.card-sizes-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: #f5f3f8;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid #ebe6f2;
}

.card-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

/* ── BADGES & TAGS ──────────────────────────────────────────────────────── */
.badge-cat {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--brand-burgundy-light);
  color: var(--brand-burgundy);
  border: 1px solid var(--border-accent);
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-tag.novo {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.badge-tag.hot {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ef9a9a;
}

.badge-tag.esgotado {
  background: #1a141e;
  color: #ffffff;
  border: 1px solid #000000;
}

/* ── MODALS (SHARP LIGHT DESIGN) ──────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 20, 30, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-window {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-elevated);
  display: flex;
  flex-direction: column;
}

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

.modal-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--brand-burgundy);
}

.modal-header h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand-burgundy);
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.close-btn:hover {
  color: var(--text-heading);
  background: #eee8f5;
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-section {
  background: #fbfafd;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-section-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--brand-burgundy);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background: #faf8fd;
}

/* ── MEDIA LIST MANAGER ────────────────────────────────────────────────── */
.image-list-manager {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.img-item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.img-item-preview {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #f0ecf4;
  border: 1px solid var(--border-subtle);
}

/* ── TOAST NOTIFICATIONS ───────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--brand-burgundy);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  color: var(--text-heading);
  font-size: 0.86rem;
  box-shadow: var(--shadow-elevated);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ── RESPONSIVE DESIGN ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .admin-header {
    padding: 12px 16px;
    flex-direction: column;
    gap: 10px;
  }
  .admin-content {
    padding: 16px;
  }
  .toolbar-card {
    flex-direction: column;
    align-items: stretch;
  }
  .filter-group {
    flex-direction: column;
    align-items: stretch;
  }
  .search-input-wrapper {
    min-width: 100%;
  }
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
  .catalog-grid {
    grid-template-columns: 1fr;
  }
}

/* ── CLIENTS TABLE ────────────────────────────────────────────────────── */
.clients-table-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-subtle);
  overflow: hidden;
}

.clients-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.clients-table thead {
  background: var(--brand-burgundy);
  color: #ffffff;
}

.clients-table thead th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  white-space: nowrap;
}

.clients-table tbody tr {
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition);
}

.clients-table tbody tr:hover {
  background: var(--brand-burgundy-light);
}

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

.clients-table tbody td {
  padding: 14px 16px;
  color: var(--text-body);
  vertical-align: middle;
}

.clients-table .client-name-cell {
  font-weight: 600;
  color: var(--text-heading);
}

.clients-table .client-name-cell small {
  display: block;
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.clients-table .amount-due {
  font-weight: 700;
  color: var(--status-warning);
}

.clients-table .amount-paid {
  font-weight: 700;
  color: var(--status-success);
}

.clients-table .amount-zero {
  font-weight: 600;
  color: var(--text-muted);
}

/* Client Status Badges */
.client-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.client-status.status-paid {
  background: var(--status-success-bg);
  color: var(--status-success);
  border: 1px solid rgba(46, 125, 50, 0.2);
}

.client-status.status-pending {
  background: var(--status-warning-bg);
  color: var(--status-warning);
  border: 1px solid rgba(237, 108, 2, 0.2);
}

.client-status.status-partial {
  background: rgba(25, 118, 210, 0.1);
  color: #1976d2;
  border: 1px solid rgba(25, 118, 210, 0.2);
}

.client-status.status-overdue {
  background: var(--status-danger-bg);
  color: var(--status-danger);
  border: 1px solid rgba(198, 40, 40, 0.2);
  animation: pulse-overdue 2s ease-in-out infinite;
}

@keyframes pulse-overdue {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.client-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.client-actions button {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.client-actions button:hover {
  background: var(--brand-burgundy);
  color: #ffffff;
  border-color: var(--brand-burgundy);
}

.client-actions button.btn-action-danger:hover {
  background: var(--status-danger);
  color: #ffffff;
  border-color: var(--status-danger);
}

.clients-empty-state {
  padding: 60px 20px;
  text-align: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

.clients-empty-state p {
  margin-top: 12px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Responsive adjustments for the table */
@media (max-width: 900px) {
  .clients-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .clients-table {
    min-width: 750px;
  }
}

/* ── CLIENT CARDS GRID ────────────────────────────────────────────────── */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.client-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-subtle);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  position: relative;
}

.client-card:hover {
  border-color: var(--brand-burgundy);
  transform: translateY(-2px);
  box-shadow: var(--shadow-elevated);
}

.client-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.client-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--brand-burgundy-light);
  color: var(--brand-burgundy);
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-accent);
  flex-shrink: 0;
}

.client-card-info {
  flex: 1;
  min-width: 0;
}

.client-card-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-card-phone {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.client-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: var(--bg-main);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-top: 10px;
}

.client-card-stat-item {
  display: flex;
  flex-direction: column;
}

.client-card-stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.client-card-stat-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-top: 2px;
}

.client-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

/* ── CLIENT PROFILE VIEW ──────────────────────────────────────────────── */
.client-profile-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-subtle);
  margin-bottom: 24px;
}

.client-profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}

.client-profile-main {
  display: flex;
  align-items: center;
  gap: 16px;
}

.client-profile-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--brand-burgundy);
  color: #ffffff;
  font-weight: 700;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.client-profile-title h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  color: var(--brand-burgundy);
  font-weight: 700;
}

.client-profile-meta {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.badge-payment {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  background: #f0ecf4;
  color: var(--brand-burgundy);
  border: 1px solid var(--border-subtle);
}

/* ── MULTI-ITEM PURCHASE MODAL ────────────────────────────────────────── */
.purchase-items-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
  margin-top: 10px;
}

.purchase-item-row {
  display: grid;
  grid-template-columns: 100px 1fr 100px 70px 100px 36px;
  gap: 8px;
  align-items: center;
  background: var(--bg-main);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.purchase-item-row input {
  padding: 6px 10px;
  font-size: 0.84rem;
}

.purchase-item-subtotal {
  font-weight: 700;
  color: var(--text-heading);
  font-size: 0.85rem;
  text-align: right;
}

.purchase-item-remove-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(198, 40, 40, 0.2);
  background: var(--status-danger-bg);
  color: var(--status-danger);
  cursor: pointer;
  transition: var(--transition);
}

.purchase-item-remove-btn:hover {
  background: var(--status-danger);
  color: #ffffff;
}

.purchase-total-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f0ecf4;
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-top: 14px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-heading);
}

.purchase-item-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  font-size: 0.78rem;
  color: var(--text-body);
  margin-right: 4px;
  margin-bottom: 4px;
}

.purchase-item-tag strong {
  color: var(--brand-burgundy);
}

@media (max-width: 700px) {
  .purchase-item-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
}


