﻿/* ============================================================
   BeautyStore Design System â€” beautystore.css
   Paleta: Branco Â· Ouro Â· Rosa Â· Verde-Oliva
   Tipografia: Cormorant Garamond (display) + DM Sans (corpo)
   ============================================================ */

/* â”€â”€â”€ Google Fonts â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&display=swap');

/* â”€â”€â”€ VariÃ¡veis â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
:root {
  /* Cores principais */
  --gold:           #c9a96e;
  --gold-light:     #e8c99a;
  --gold-dark:      #a8843e;
  --rose:           #d4a5b5;
  --rose-light:     #f0d4df;
  --rose-dark:      #b07a90;
  --olive:          #8b9556;
  --olive-light:    #b4bf80;
  --olive-dark:     #6a7240;
  --white:          #ffffff;
  --cream:          #fdf9f5;
  --cream-dark:     #f4ede3;
  --gray-100:       #f8f7f5;
  --gray-200:       #ede9e3;
  --gray-300:       #d8d2c8;
  --gray-400:       #b8b0a4;
  --gray-500:       #8c8278;
  --gray-600:       #5c5650;
  --gray-700:       #3a3530;
  --gray-900:       #1a1714;

  /* SemÃ¢nticas */
  --color-primary:   var(--gold);
  --color-secondary: var(--rose);
  --color-accent:    var(--olive);
  --color-text:      var(--gray-700);
  --color-muted:     var(--gray-500);
  --color-bg:        var(--cream);
  --color-surface:   var(--white);
  --color-border:    var(--gray-200);

  /* Status */
  --color-success:   #6aab6a;
  --color-warning:   #d4a040;
  --color-danger:    #c06060;
  --color-info:      #6090c0;

  /* Tipografia */
  --font-display:   'Cormorant Garamond', Georgia, serif;
  --font-body:      'DM Sans', system-ui, sans-serif;

  /* Raios */
  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --radius-xl:  28px;
  --radius-pill: 50px;

  /* Sombras */
  --shadow-xs:  0 1px 4px rgba(100,80,40,.06);
  --shadow-sm:  0 2px 12px rgba(100,80,40,.08);
  --shadow-md:  0 6px 24px rgba(100,80,40,.10);
  --shadow-lg:  0 12px 48px rgba(100,80,40,.14);
  --shadow-gold: 0 4px 20px rgba(201,169,110,.25);
  --shadow-rose: 0 4px 20px rgba(212,165,181,.25);

  /* Glassmorphism */
  --glass-bg:      rgba(255,255,255,0.70);
  --glass-border:  rgba(255,255,255,0.50);
  --glass-blur:    blur(20px) saturate(1.4);

  /* TransiÃ§Ãµes */
  --transition-fast:   0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow:   0.40s cubic-bezier(.4,0,.2,1);

  /* Z-index */
  --z-toast:   9900;
  --z-modal:   9000;
  --z-overlay: 8000;
  --z-loader:  9999;
  --z-header:  1000;
}

/* â”€â”€â”€ Reset Base â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
/* ??? Aliases de compatibilidade ?????????????????????????????
   app-layout e crud.css usam --color-* ; mapeamos para paleta
   ???????????????????????????????????????????????????????????? */
:root {
  --color-gold:          var(--gold);
  --color-gold-light:    var(--gold-light);
  --color-gold-dark:     var(--gold-dark);
  --color-rose:          var(--rose);
  --color-rose-light:    var(--rose-light);
  --color-rose-dark:     var(--rose-dark);
  --color-olive:         var(--olive);
  --color-olive-light:   var(--olive-light);
  --color-olive-dark:    var(--olive-dark);
  --color-white:         var(--white);
  --color-cream:         var(--cream);
  --color-surface:       var(--gray-100);
  --color-border:        var(--gray-200);
  --color-text:          var(--gray-700);
  --color-text-light:    var(--gray-500);
  --color-success:       #6aab6a;
  --color-warning:       #d4a040;
  --color-danger:        #c06060;
  --color-info:          #6090c0;
  --radius:              var(--radius-md);
}

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

html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

img, svg { display: block; max-width: 100%; }
iframe,
video,
canvas {
  max-width: 100%;
}
a { color: var(--gold-dark); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--gold); }
button { cursor: pointer; font-family: var(--font-body); }

/* â”€â”€â”€ Tipografia â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
h1, h2, h3, .display { font-family: var(--font-display); font-weight: 400; }
h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); line-height: 1.2; }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); line-height: 1.3; }
h4, h5, h6 { font-family: var(--font-body); font-weight: 600; }
h4 { font-size: 1.05rem; }
.lead { font-size: 1.1rem; color: var(--color-muted); font-weight: 300; }
.text-muted { color: var(--color-muted); }
.text-gold { color: var(--gold-dark); }
.text-rose { color: var(--rose-dark); }
.text-olive { color: var(--olive-dark); }

/* â”€â”€â”€ Layout â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }
.container-sm { max-width: 640px; }
.container-md { max-width: 900px; }

/* â”€â”€â”€ Glassmorphism Card â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  padding: 1.75rem;
  transition: box-shadow var(--transition-normal), transform var(--transition-normal);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-sm { padding: 1.25rem; border-radius: var(--radius-md); }
.card-lg { padding: 2.5rem; border-radius: var(--radius-xl); }

/* â”€â”€â”€ BotÃµes â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .7rem 1.75rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: .02em;
  border: none;
  transition: all var(--transition-normal);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background var(--transition-fast);
}
.btn:hover::after { background: rgba(255,255,255,.12); }
.btn:active { transform: scale(.97); }
.btn:disabled, .btn[disabled] { opacity: .55; cursor: not-allowed; pointer-events: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #fff;
  box-shadow: var(--shadow-gold);
}
.btn-primary:hover { box-shadow: 0 6px 28px rgba(201,169,110,.40); }

.btn-secondary {
  background: linear-gradient(135deg, var(--rose), var(--rose-light));
  color: #fff;
  box-shadow: var(--shadow-rose);
}

.btn-olive {
  background: linear-gradient(135deg, var(--olive), var(--olive-light));
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--gold-dark);
  border: 1.5px solid var(--gold);
}
.btn-outline:hover { background: var(--gold); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--color-text);
}
.btn-ghost:hover { background: var(--gray-100); }

.btn-sm { padding: .45rem 1.1rem; font-size: .82rem; }
.btn-lg { padding: .9rem 2.4rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* â”€â”€â”€ FormulÃ¡rios â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-size: .82rem;
  font-weight: 500;
  color: var(--gray-600);
  margin-bottom: .4rem;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.form-control {
  width: 100%;
  padding: .75rem 1rem;
  background: var(--white);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: .9375rem;
  color: var(--color-text);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  appearance: none;
}
.form-control::placeholder { color: var(--gray-400); }
.form-control:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,169,110,.15);
}
.form-control.is-invalid {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 3px rgba(192,96,96,.12);
}
.form-control.is-valid {
  border-color: var(--color-success);
  box-shadow: 0 0 0 3px rgba(106,171,106,.12);
}
.form-text { font-size: .8rem; color: var(--color-muted); margin-top: .35rem; }
.form-error { font-size: .8rem; color: var(--color-danger); margin-top: .35rem; }

/* Input com Ã­cone */
.input-group { position: relative; }
.input-group .form-control { padding-left: 2.8rem; }
.input-group .input-icon {
  position: absolute;
  left: .9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  pointer-events: none;
  display: flex;
  align-items: center;
}
.input-group .input-action {
  position: absolute;
  right: .9rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  padding: .2rem;
  transition: color var(--transition-fast);
}
.input-group .input-action:hover { color: var(--gold-dark); }

/* â”€â”€â”€ Badges â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: .2rem .65rem;
  border-radius: var(--radius-pill);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .02em;
}
.badge-gold     { background: rgba(201,169,110,.15); color: var(--gold-dark); }
.badge-rose     { background: rgba(212,165,181,.15); color: var(--rose-dark); }
.badge-olive    { background: rgba(139,149,86,.15);  color: var(--olive-dark); }
.badge-success  { background: rgba(106,171,106,.12); color: #3d8040; }
.badge-warning  { background: rgba(212,160,64,.12);  color: #8c6020; }
.badge-danger   { background: rgba(192,96,96,.12);   color: #903030; }
.badge-info     { background: rgba(96,144,192,.12);  color: #305880; }

/* â”€â”€â”€ Divider â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--gray-400);
  font-size: .8rem;
  margin: 1.5rem 0;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* â”€â”€â”€ Alert Banner â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.alert-banner {
  padding: .85rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: .875rem;
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  border: 1px solid transparent;
}
.alert-banner.success { background: rgba(106,171,106,.08); border-color: rgba(106,171,106,.25); color: #2d6030; }
.alert-banner.warning { background: rgba(212,160,64,.08);  border-color: rgba(212,160,64,.25);  color: #7a5010; }
.alert-banner.danger  { background: rgba(192,96,96,.08);   border-color: rgba(192,96,96,.25);   color: #802020; }
.alert-banner.info    { background: rgba(96,144,192,.08);  border-color: rgba(96,144,192,.25);  color: #204060; }
.alert-banner .alert-icon { flex-shrink: 0; margin-top: .05rem; }
.alert-banner .alert-close { margin-left: auto; background: none; border: none; opacity: .5; cursor: pointer; font-size: 1rem; line-height: 1; }
.alert-banner .alert-close:hover { opacity: 1; }

/* â”€â”€â”€ Toast â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
#bs-toast-container {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: .6rem;
  pointer-events: none;
  max-width: 360px;
  width: calc(100vw - 2.5rem);
}
.bs-toast {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: .85rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  box-shadow: var(--shadow-lg);
  pointer-events: all;
  animation: toastIn .3s cubic-bezier(.34,1.56,.64,1) forwards;
  position: relative;
  overflow: hidden;
}
.bs-toast.removing { animation: toastOut .25s ease forwards; }
.bs-toast::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  border-radius: 3px 0 0 3px;
}
.bs-toast.success::before { background: var(--color-success); }
.bs-toast.warning::before { background: var(--color-warning); }
.bs-toast.danger::before  { background: var(--color-danger); }
.bs-toast.info::before    { background: var(--color-info); }
.bs-toast-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: .05rem; }
.bs-toast-body { flex: 1; }
.bs-toast-title { font-weight: 600; font-size: .875rem; color: var(--color-text); line-height: 1.3; }
.bs-toast-msg   { font-size: .8125rem; color: var(--color-muted); margin-top: .15rem; }
.bs-toast-close {
  background: none; border: none; opacity: .4; cursor: pointer;
  font-size: .9rem; line-height: 1; padding: .1rem; flex-shrink: 0;
  transition: opacity var(--transition-fast);
}
.bs-toast-close:hover { opacity: .9; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(30px) scale(.95); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateX(30px) scale(.95); }
}

/* â”€â”€â”€ Page Loader â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
#bs-page-loader {
  position: fixed;
  inset: 0;
  z-index: var(--z-loader);
  background: var(--cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  transition: opacity .4s ease, visibility .4s ease;
}
#bs-page-loader.hidden { opacity: 0; visibility: hidden; }
.bs-loader-logo {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--gold-dark);
  letter-spacing: 2px;
  font-style: italic;
}
.bs-loader-bar {
  width: 120px;
  height: 2px;
  background: var(--gray-200);
  border-radius: 2px;
  overflow: hidden;
}
.bs-loader-bar::after {
  content: '';
  display: block;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, var(--gold), var(--rose));
  border-radius: 2px;
  animation: loaderSlide 1.4s ease-in-out infinite;
}
@keyframes loaderSlide {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* Spinner inline (botÃµes e eventos) */
.bs-spinner {
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
  vertical-align: middle;
}
.bs-spinner-dark {
  border-color: rgba(0,0,0,.1);
  border-top-color: var(--gold);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* â”€â”€â”€ Layout Auth (Ã¡rea pÃºblica) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.auth-bg {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  background: var(--cream);
  position: relative;
  overflow: hidden;
}
.auth-bg::before {
  content: '';
  position: fixed;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,169,110,.15) 0%, transparent 70%);
  top: -200px; right: -200px;
  pointer-events: none;
}
.auth-bg::after {
  content: '';
  position: fixed;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,165,181,.12) 0%, transparent 70%);
  bottom: -150px; left: -150px;
  pointer-events: none;
}

.auth-panel {
  flex: 0 0 auto;
  width: 100%;
  max-width: 480px;
  margin: auto;
  padding: 2rem 1.5rem;
  position: relative;
  z-index: 1;
}
@media (min-width: 1024px) {
  .auth-panel { padding: 2.5rem; }
}

.auth-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 2.75rem 2.25rem;
  box-shadow: var(--shadow-lg);
}
@media (max-width: 480px) {
  .auth-card { padding: 2rem 1.5rem; border-radius: var(--radius-lg); }
}

.auth-brand {
  text-align: center;
  margin-bottom: 2rem;
}
.auth-brand-logo {
  font-family: var(--font-display);
  font-size: 2rem;
  font-style: italic;
  color: var(--gold-dark);
  letter-spacing: 1.5px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}
.auth-brand-logo::before, .auth-brand-logo::after {
  content: "\2726";
  font-size: .8em;
  color: var(--rose);
  font-style: normal;
}
.auth-brand-subtitle {
  font-size: .8rem;
  color: var(--color-muted);
  margin-top: .35rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.auth-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
  color: var(--gray-700);
  margin-bottom: .4rem;
}
.auth-subtitle {
  font-size: .875rem;
  color: var(--color-muted);
  margin-bottom: 2rem;
}

/* â”€â”€â”€ Erro pages â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--cream);
}
.error-page-inner {
  text-align: center;
  max-width: 480px;
}
.error-code {
  font-family: var(--font-display);
  font-size: clamp(6rem, 18vw, 10rem);
  line-height: 1;
  font-weight: 300;
  background: linear-gradient(135deg, var(--gold-light), var(--rose-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
}
.error-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
  color: var(--gray-700);
  margin: .5rem 0 .75rem;
}
.error-desc { color: var(--color-muted); margin-bottom: 2rem; }
.error-actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

/* â”€â”€â”€ AnimaÃ§Ãµes globais â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.fade-in  { animation: fadeIn  .4s ease both; }
.fade-up  { animation: fadeUp  .5s cubic-bezier(.4,0,.2,1) both; }
.slide-in { animation: slideIn .35s cubic-bezier(.4,0,.2,1) both; }

@keyframes fadeIn  { from { opacity: 0 } to { opacity: 1 } }
@keyframes fadeUp  { from { opacity: 0; transform: translateY(16px) } to { opacity: 1; transform: none } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-14px) } to { opacity: 1; transform: none } }

/* Delay helpers */
.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }
.delay-4 { animation-delay: .4s; }

/* â”€â”€â”€ UtilitÃ¡rios â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.d-flex     { display: flex; }
.d-grid     { display: grid; }
.d-none     { display: none; }
.d-block    { display: block; }
.flex-col   { flex-direction: column; }
.items-center{ align-items: center; }
.justify-center{ justify-content: center; }
.justify-between{ justify-content: space-between; }
.gap-1 { gap: .25rem; } .gap-2 { gap: .5rem; } .gap-3 { gap: .75rem; }
.gap-4 { gap: 1rem; }   .gap-6 { gap: 1.5rem; } .gap-8 { gap: 2rem; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-sm { font-size: .8125rem; }
.text-xs { font-size: .75rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.w-full { width: 100%; }
.mt-auto { margin-top: auto; }
.mb-1 { margin-bottom: .25rem; } .mb-2 { margin-bottom: .5rem; }
.mb-3 { margin-bottom: .75rem; } .mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; } .mb-8 { margin-bottom: 2rem; }
.mt-2 { margin-top: .5rem; }     .mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }    .mt-8 { margin-top: 2rem; }
.p-4 { padding: 1rem; } .p-6 { padding: 1.5rem; }
.rounded { border-radius: var(--radius-md); }
.rounded-full { border-radius: var(--radius-pill); }

/* â”€â”€â”€ Responsivo â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (max-width: 768px) {
  .hide-sm  { display: none !important; }
  .btn-lg   { padding: .8rem 1.75rem; font-size: .9375rem; }
}
@media (min-width: 769px) {
  .hide-md { display: none !important; }
}

/* ------------------------------------------------------------
   INPUT ICON / ACTION
   ------------------------------------------------------------ */
.input-group {
  position: relative;
  display: flex;
  align-items: center;
}
.input-group .form-control {
  flex: 1;
}
.input-group .input-icon {
  position: absolute;
  left: .875rem;
  color: var(--color-text-light);
  pointer-events: none;
  display: flex;
  align-items: center;
}
.input-group .form-control { padding-left: 2.75rem; }
.input-group .input-action {
  position: absolute;
  right: .5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-light);
  display: flex;
  align-items: center;
  padding: .25rem;
  border-radius: var(--radius-sm);
  transition: color .2s;
}
.input-group .input-action:hover { color: var(--color-gold); }
.input-group .form-control:has(~ .input-action) { padding-right: 2.5rem; }

/* ------------------------------------------------------------
   ALERT BANNER (inline)
   ------------------------------------------------------------ */
.alert-banner {
  display: flex;
  align-items: flex-start;
  gap: .625rem;
  padding: .875rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  line-height: 1.5;
  border: 1px solid transparent;
}
.alert-banner .alert-icon { font-size: 1rem; flex-shrink: 0; margin-top: .05rem; }
.alert-banner .alert-close {
  margin-left: auto; background: none; border: none;
  cursor: pointer; opacity: .6; transition: opacity .2s;
}
.alert-banner .alert-close:hover { opacity: 1; }
.alert-banner.success { background: #eef7f0; border-color: #b8dfc4; color: #2d6a45; }
.alert-banner.warning { background: #fef9ec; border-color: #f5d98a; color: #7a5a0a; }
.alert-banner.danger  { background: #fdf1f0; border-color: #f0b9b5; color: #8b2e27; }
.alert-banner.info    { background: #eff5ff; border-color: #b8cff7; color: #1a3d7c; }

/* ------------------------------------------------------------
   STAT CARDS
   ------------------------------------------------------------ */
.stat-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .25s;
}
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1;
}
.stat-label {
  font-size: .8125rem;
  color: var(--color-text-light);
  margin-top: .375rem;
}
.stat-trend { font-size: .75rem; margin-top: .5rem; font-weight: 500; }
.stat-trend.up   { color: var(--color-olive); }
.stat-trend.down { color: var(--color-danger); }

/* ------------------------------------------------------------
   TABLE
   ------------------------------------------------------------ */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
}
.bs-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.table thead {
  background: var(--color-surface);
}
.table th {
  padding: .75rem 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--color-text-light);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: nowrap;
  border-bottom: 1px solid var(--color-border);
}
.table td {
  padding: .875rem 1rem;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--color-cream); }

@media (max-width: 767px) {
  .table-wrapper,
  .crud-table-wrap,
  .table-responsive,
  .bs-table-scroll {
    overflow: visible;
    border: none;
    box-shadow: none;
    background: transparent;
  }

  .crud-table-wrap {
    display: block;
  }

  .table.bs-table-mobile-cards thead {
    display: none;
  }

  .table.bs-table-mobile-cards,
  .table.bs-table-mobile-cards tbody,
  .table.bs-table-mobile-cards tr,
  .table.bs-table-mobile-cards td {
    display: block;
    width: 100%;
  }

  .table.bs-table-mobile-cards {
    border-collapse: separate;
    border-spacing: 0;
  }

  .table.bs-table-mobile-cards tbody {
    display: grid;
    gap: .75rem;
    padding: 0;
  }

  .table.bs-table-mobile-cards tr {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-white);
    box-shadow: var(--shadow-sm);
    padding: .5rem .85rem;
  }

  .table.bs-table-mobile-cards td {
    border: none;
    border-bottom: 1px solid var(--color-border);
    padding: .55rem 0 .6rem;
    min-height: 2rem;
    text-align: left;
    white-space: normal;
    word-break: break-word;
  }

  .table.bs-table-mobile-cards td:last-child {
    border-bottom: none;
  }

  .table.bs-table-mobile-cards td.bs-cell-primary {
    padding-top: .35rem;
  }

  .table.bs-table-mobile-cards td.bs-cell-primary::before {
    margin-bottom: .15rem;
  }

  .table.bs-table-mobile-cards td[data-is-actions="true"] {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    justify-content: flex-start;
    padding-top: .7rem;
  }

  .table.bs-table-mobile-cards td[data-is-actions="true"]::before {
    flex: 0 0 100%;
    margin-bottom: 0;
  }

  .table.bs-table-mobile-cards td[data-is-actions="true"] .btn,
  .table.bs-table-mobile-cards td[data-is-actions="true"] a.btn,
  .table.bs-table-mobile-cards td[data-is-actions="true"] .dropdown,
  .table.bs-table-mobile-cards td[data-is-actions="true"] .dropdown-toggle {
    min-height: 40px;
  }

  .table.bs-table-mobile-cards td[data-is-actions="true"] .btn,
  .table.bs-table-mobile-cards td[data-is-actions="true"] a.btn {
    flex: 1 1 calc(50% - .5rem);
    justify-content: center;
    text-align: center;
  }

  .table.bs-table-mobile-cards .badge,
  .table.bs-table-mobile-cards [class*="status"],
  .table.bs-table-mobile-cards [class*="Status"] {
    white-space: normal;
  }

  .table.bs-table-mobile-cards .dropdown-menu {
    width: min(92vw, 320px);
    max-width: 92vw;
  }

  .table.bs-table-mobile-cards .form-control,
  .table.bs-table-mobile-cards .form-select {
    min-height: 40px;
  }

  .table.bs-table-mobile-cards td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: .2rem;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--color-text-light);
  }
}

/* ------------------------------------------------------------
   BADGES
   ------------------------------------------------------------ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: .2rem .6rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1;
}
.badge-gold    { background: #fdf3e3; color: var(--color-gold-dark); border: 1px solid var(--color-gold-light); }
.badge-rose    { background: #fdf0f0; color: var(--color-rose-dark); border: 1px solid var(--color-rose); }
.badge-olive   { background: #eef3e8; color: var(--color-olive);     border: 1px solid var(--color-olive-light); }
.badge-danger  { background: #fdf1f0; color: var(--color-danger);    border: 1px solid #f0b9b5; }
.badge-neutral { background: var(--color-surface); color: var(--color-text-light); border: 1px solid var(--color-border); }

/* ------------------------------------------------------------
   NAVEGAÇÃO LATERAL (prévia área logada)
   ------------------------------------------------------------ */
.nav-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .625rem .875rem;
  border-radius: var(--radius-sm);
  color: var(--color-text-light);
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
}
.nav-item:hover  { background: var(--color-surface); color: var(--color-gold); }
.nav-item.active { background: linear-gradient(135deg, var(--color-gold-light) 0%, rgba(201,169,110,.15) 100%); color: var(--color-gold-dark); font-weight: 600; }

/* ------------------------------------------------------------
   UTILITÁRIOS EXTRAS
   ------------------------------------------------------------ */
.text-gold    { color: var(--color-gold); }
.text-muted   { color: var(--color-text-light); }
.text-sm      { font-size: .8125rem; }
.text-center  { text-align: center; }
.d-flex       { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.ml-1  { margin-left: .25rem; }
.mb-2  { margin-bottom: .5rem; }
.mb-4  { margin-bottom: 1rem; }
.mb-6  { margin-bottom: 1.5rem; }
.mt-2  { margin-top: .5rem; }
.mt-4  { margin-top: 1rem; }
.mt-6  { margin-top: 1.5rem; }
.gap-2 { gap: .5rem; }
.gap-4 { gap: 1rem; }

/* ------------------------------------------------------------
   APP LAYOUT — ESTRUTURA PRINCIPAL
   ------------------------------------------------------------ */
:root {
  --sidebar-w: 240px;
  --navbar-h:  60px;
}

.app-layout {
  display: flex;
  min-height: 100vh;
  background: var(--color-cream);
  overflow-x: hidden;
}

/* --- SIDEBAR ---------------------------------------------- */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--color-white);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  z-index: 300;
  transition: transform .28s cubic-bezier(.4,0,.2,1), box-shadow .28s;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(45,41,38,.45);
  z-index: 299;
  backdrop-filter: blur(2px);
  transition: opacity .28s;
}
.sidebar-overlay.visible { display: block; }

/* Brand */
.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1rem 1rem;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}
.sidebar-brand-link {
  display: flex;
  align-items: center;
  gap: .625rem;
  text-decoration: none;
}
.sidebar-brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-dark) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  flex-shrink: 0;
}
.sidebar-brand-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-gold-dark);
  letter-spacing: .02em;
}
.sidebar-close {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-light);
  padding: .25rem;
  border-radius: var(--radius-sm);
  transition: color .2s;
}
.sidebar-close:hover { color: var(--color-gold); }

/* Empresa */
.sidebar-company {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .625rem 1rem;
  margin: .5rem .75rem;
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  font-size: .75rem;
  color: var(--color-text-light);
  font-weight: 500;
  overflow: hidden;
}
.sidebar-company-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Nav */
.sidebar-nav {
  flex: 1;
  padding: .5rem 0 .5rem;
  overflow-y: auto;
}
.nav-group {
  padding: .5rem 0;
}
.nav-group + .nav-group {
  border-top: 1px solid var(--color-border);
}
.nav-group-label {
  display: block;
  padding: .375rem 1rem .25rem;
  font-size: .6875rem;
  font-weight: 700;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .5625rem .875rem;
  margin: .125rem .5rem;
  border-radius: var(--radius-sm);
  color: var(--color-text-light);
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .18s, color .18s;
  text-decoration: none;
  position: relative;
  white-space: nowrap;
  overflow: hidden;
}
.nav-item:hover  { background: var(--color-surface); color: var(--color-gold); }
.nav-item.active {
  background: linear-gradient(135deg, rgba(201,169,110,.18) 0%, rgba(201,169,110,.08) 100%);
  color: var(--color-gold-dark);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--color-gold);
}
.nav-item--locked {
  opacity: .5;
  cursor: not-allowed;
}
.nav-item--logout {
  color: var(--color-danger);
}
.nav-item--logout:hover { background: #fdf1f0; color: var(--color-danger); }
.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.nav-icon svg { width: 18px; height: 18px; }
.nav-label { flex: 1; }
.nav-lock {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  opacity: .6;
}
.nav-lock svg { width: 13px; height: 13px; }

/* Sidebar footer */
.sidebar-footer {
  border-top: 1px solid var(--color-border);
  padding: .5rem 0;
  flex-shrink: 0;
}

/* Tooltip para itens bloqueados */
[data-tooltip] {
  position: relative;
}
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + .5rem);
  top: 50%;
  transform: translateY(-50%);
  background: var(--color-text);
  color: #fff;
  font-size: .75rem;
  font-weight: 400;
  padding: .375rem .625rem;
  border-radius: var(--radius-sm);
  white-space: normal;
  width: 200px;
  line-height: 1.4;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s;
  z-index: 9999;
  box-shadow: var(--shadow-md);
}
[data-tooltip]:hover::after,
[data-tooltip]:focus::after {
  opacity: 1;
}

/* --- APP MAIN --------------------------------------------- */
.app-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  /* permite que o item flex encolha abaixo da largura intrínseca do conteúdo;
     sem isso, conteúdo largo (ex.: gráficos) faz o main exceder a viewport e
     ser cortado pelo overflow-x:hidden do body em telas pequenas */
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left .28s cubic-bezier(.4,0,.2,1);
}

/* --- NAVBAR ----------------------------------------------- */
.app-navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--navbar-h);
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px) saturate(1.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 0 1.25rem;
  box-shadow: 0 1px 0 rgba(201,169,110,.08);
  /* overflow visível para o dropdown de busca funcionar */
  overflow: visible;
  /* evita colapso dos filhos flex */
  min-width: 0;
}

.navbar-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-light);
  padding: .25rem;
  border-radius: var(--radius-sm);
  transition: color .2s;
  flex-shrink: 0;
}
.navbar-hamburger:hover { color: var(--color-gold); }

/* Busca */
.navbar-search {
  position: relative;
  flex: 1;
  min-width: 0;        /* permite shrink correto no flex */
  max-width: 380px;
}
.navbar-search-icon {
  position: absolute;
  left: .75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-light);
  pointer-events: none;
  display: flex;
  z-index: 1;
}
.navbar-search-input {
  width: 100%;
  height: 36px;
  padding: 0 1rem 0 2.25rem;
  border: 1.5px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  font-size: .875rem;
  color: var(--color-text);
  transition: border-color .2s, box-shadow .2s, background .2s;
  font-family: var(--font-body);
  position: relative;
  z-index: 1;
}
.navbar-search-input:focus {
  outline: none;
  border-color: var(--color-gold-light);
  box-shadow: 0 0 0 3px rgba(201,169,110,.12);
  background: var(--color-white);
}
.navbar-search-input::placeholder { color: var(--color-text-light); }

/* Dropdown de busca */
.busca-dropdown {
  position: absolute;
  top: calc(100% + .5rem);
  left: 0;
  right: 0;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 9000;
  overflow: hidden;
  max-height: 360px;
  overflow-y: auto;
}
.busca-dropdown[hidden] { display: none; }
.busca-item {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .625rem .875rem;
  cursor: pointer;
  transition: background .15s;
  text-decoration: none;
  color: var(--color-text);
  font-size: .875rem;
}
.busca-item:hover, .busca-item:focus { background: var(--color-surface); }
.busca-item-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: .6875rem;
  font-weight: 700;
  text-transform: uppercase;
}
.busca-item-icon.produto  { background: rgba(201,169,110,.15); color: var(--color-gold-dark); }
.busca-item-icon.cliente  { background: rgba(232,180,184,.2);  color: var(--color-rose-dark); }
.busca-item-icon.usuario  { background: rgba(107,124,92,.15);  color: var(--color-olive); }
.busca-item-name  { flex: 1; font-weight: 500; }
.busca-item-tipo  { font-size: .75rem; color: var(--color-text-light); }
.busca-empty {
  padding: 1.25rem;
  text-align: center;
  color: var(--color-text-light);
  font-size: .875rem;
}
.busca-loading {
  display: flex;
  justify-content: center;
  padding: 1rem;
}

/* Spacer */
.navbar-spacer { flex: 1; }

/* Relógio */
.navbar-clock {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.2;
  flex-shrink: 0;
}
.navbar-clock-time {
  font-family: var(--font-display);
  font-size: .9375rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: .04em;
}
.navbar-clock-date {
  font-size: .6875rem;
  color: var(--color-text-light);
  text-transform: capitalize;
}

/* Notificações */
.navbar-notifications {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--color-text-light);
  cursor: pointer;
  transition: background .2s, color .2s;
  flex-shrink: 0;
}
.navbar-notifications:hover {
  background: var(--color-surface);
  color: var(--color-gold-dark);
}
.navbar-notifications-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--color-danger);
  color: #fff;
  font-size: .625rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

.navbar-ai-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: var(--color-white);
  color: var(--color-text-light);
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
  flex-shrink: 0;
}

.navbar-ai-trigger:hover {
  background: var(--color-surface);
  color: var(--color-gold-dark);
  border-color: var(--color-border);
}

.notifications-dropdown {
  position: absolute;
  top: calc(100% + .5rem);
  right: 0;
  width: min(380px, 92vw);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 9000;
  overflow: hidden;
}
.notifications-dropdown[hidden] { display: none; }

.notifications-dropdown-header,
.notifications-dropdown-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .7rem .9rem;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  font-size: .8125rem;
  font-weight: 600;
}
.notifications-dropdown-footer {
  border-bottom: none;
  border-top: 1px solid var(--color-border);
  justify-content: flex-end;
}

.notifications-link {
  border: none;
  background: none;
  color: var(--color-gold-dark);
  font-size: .75rem;
  font-weight: 600;
  padding: 0;
  text-decoration: none;
}

.notifications-dropdown-list {
  max-height: 360px;
  overflow-y: auto;
}

.notifications-item {
  padding: .8rem .9rem;
  border-bottom: 1px solid var(--color-border);
}
.notifications-item.is-unread {
  background: rgba(201,169,110,.08);
}
.notifications-item:last-child {
  border-bottom: none;
}
.notifications-item-title {
  font-size: .85rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: .25rem;
}
.notifications-item-message {
  font-size: .8125rem;
  color: var(--color-text-light);
  line-height: 1.35;
}
.notifications-item-meta {
  margin-top: .45rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  font-size: .6875rem;
  color: var(--color-text-light);
}
.notifications-item-meta-actions {
  display: inline-flex;
  gap: .5rem;
  align-items: center;
}
.notifications-item-action,
.notifications-item-mark {
  border: none;
  background: none;
  padding: 0;
  font-size: .6875rem;
  color: var(--color-gold-dark);
  text-decoration: none;
  font-weight: 600;
}

.notifications-empty {
  padding: 1rem;
  text-align: center;
  color: var(--color-text-light);
  font-size: .8125rem;
}

/* Usuário */
.navbar-user {
  display: flex;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
  padding: .25rem .5rem;
  border-radius: var(--radius-sm);
  transition: background .2s;
  position: relative;
  user-select: none;
  flex-shrink: 0;
}
.navbar-user:hover { background: var(--color-surface); }
.navbar-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-gold-light) 0%, var(--color-rose) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.navbar-user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.navbar-user-initials {
  font-size: .75rem;
  font-weight: 700;
  color: var(--color-gold-dark);
}
.navbar-user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.navbar-user-name {
  font-size: .875rem;
  font-weight: 600;
  color: var(--color-text);
}
.navbar-user-role {
  font-size: .7rem;
  color: var(--color-text-light);
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.navbar-user-chevron {
  color: var(--color-text-light);
  transition: transform .2s;
}
.navbar-user[aria-expanded="true"] .navbar-user-chevron { transform: rotate(180deg); }

/* User Dropdown */
.user-dropdown {
  position: absolute;
  top: calc(100% + .5rem);
  right: 0;
  min-width: 220px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 9000;
  overflow: hidden;
  animation: fadeIn .18s ease;
}
.user-dropdown[hidden] { display: none; }
.user-dropdown-header {
  padding: .875rem 1rem;
  background: var(--color-surface);
}
.user-dropdown-name  { font-weight: 600; font-size: .875rem; color: var(--color-text); }
.user-dropdown-email { font-size: .75rem; color: var(--color-text-light); margin-top: .125rem; }
.user-dropdown-divider {
  height: 1px;
  background: var(--color-border);
}
.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .625rem 1rem;
  font-size: .875rem;
  color: var(--color-text);
  text-decoration: none;
  transition: background .15s;
  cursor: pointer;
}
.user-dropdown-item:hover { background: var(--color-surface); }
.user-dropdown-item--danger { color: var(--color-danger); }
.user-dropdown-item--danger:hover { background: #fdf1f0; }

/* --- CONTEÚDO --------------------------------------------- */
.app-content {
  flex: 1;
  padding: 1.75rem 1.5rem;
  max-width: 1280px;
  width: 100%;
  min-width: 0;
  margin: 0 auto;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: .25rem;
  font-size: .8125rem;
  color: var(--color-text-light);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.breadcrumb-item { color: var(--color-text-light); text-decoration: none; }
.breadcrumb-item:hover { color: var(--color-gold); }
.breadcrumb-item--active { color: var(--color-text); font-weight: 500; }
.breadcrumb-sep { color: var(--color-border); font-size: .75rem; }

/* Page header */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.page-title {
  font-family: var(--font-display);
  font-size: 1.625rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
}

/* --- FOOTER ----------------------------------------------- */
.app-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-white);
  padding: .875rem 1.5rem;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  max-width: 1280px;
  margin: 0 auto;
}
.footer-brand {
  font-family: var(--font-display);
  font-size: .9375rem;
  font-weight: 700;
  color: var(--color-gold-dark);
  letter-spacing: .02em;
}
.footer-social {
  display: flex;
  gap: .75rem;
}
.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  color: var(--color-text-light);
  transition: color .2s, border-color .2s, background .2s;
}
.footer-social-link:hover {
  color: var(--color-gold);
  border-color: var(--color-gold-light);
  background: rgba(201,169,110,.06);
}
.footer-version {
  font-size: .75rem;
  color: var(--color-text-light);
}

.footer-sync-status {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .72rem;
  color: var(--color-text-light);
  padding: .2rem .5rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  background: var(--color-white);
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}

.footer-sync-status:hover,
.footer-sync-status:focus-visible {
  border-color: var(--color-gold-light);
  color: var(--color-text);
  background: rgba(201,169,110,.06);
  outline: none;
}

.footer-sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--color-success);
  flex-shrink: 0;
}

.footer-sync-status.is-online .footer-sync-dot {
  background: var(--color-success);
}

.footer-sync-status.is-offline .footer-sync-dot,
.footer-sync-status.is-pending .footer-sync-dot {
  background: var(--color-warning);
}

.footer-sync-status.is-syncing .footer-sync-dot {
  background: var(--color-info);
  animation: bs-sync-pulse 1s infinite;
}

.bs-sync-panel {
  position: fixed;
  right: 1rem;
  bottom: 4.25rem;
  width: min(92vw, 360px);
  max-height: min(68vh, 520px);
  display: flex;
  flex-direction: column;
  gap: .65rem;
  padding: .85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-white);
  box-shadow: var(--shadow-md);
  z-index: 1200;
}

.bs-sync-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  font-size: .84rem;
}

.bs-sync-panel-close {
  border: none;
  background: transparent;
  color: var(--color-text-light);
  font-size: .95rem;
  line-height: 1;
  padding: .15rem .25rem;
}

.bs-sync-panel-status {
  font-size: .75rem;
  color: var(--color-text-light);
}

.bs-sync-panel-list {
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  padding-right: .2rem;
}

.bs-sync-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: .5rem .55rem;
  background: var(--gray-100);
}

.bs-sync-item-title {
  font-size: .78rem;
  color: var(--color-text);
  font-weight: 500;
}

.bs-sync-item-meta {
  margin-top: .2rem;
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .6rem;
  font-size: .7rem;
  color: var(--color-text-light);
}

.bs-sync-item-error {
  margin-top: .2rem;
  display: inline-block;
  font-size: .7rem;
  color: var(--color-danger);
}

.bs-sync-panel-actions {
  display: flex;
  justify-content: flex-end;
}

@keyframes bs-sync-pulse {
  0% { opacity: .45; transform: scale(.92); }
  50% { opacity: 1; transform: scale(1); }
  100% { opacity: .45; transform: scale(.92); }
}

/* --- RESPONSIVO ------------------------------------------- */
@media (max-width: 1023px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }
  .sidebar-close { display: flex; }

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

  .navbar-hamburger { display: flex; }

  .navbar-search { max-width: 240px; }

  .navbar-clock { display: none; }

  .notifications-dropdown {
    right: -60px;
    width: min(360px, calc(100vw - 1rem));
  }

  .navbar-user-info { display: none; }
  .navbar-user-chevron { display: none; }

  .bs-sync-panel {
    right: .5rem;
    left: .5rem;
    width: auto;
    bottom: 4rem;
    max-height: 64vh;
  }
}

@media (max-width: 599px) {
  .app-navbar {
    position: static;
    height: auto;
    min-height: var(--navbar-h);
    flex-wrap: wrap;
    align-items: center;
    padding: .5rem .75rem;
    gap: .5rem;
  }

  .navbar-spacer {
    display: none;
  }

  .navbar-hamburger { order: 1; }
  .navbar-notifications { order: 2; margin-left: auto; }
  .navbar-ai-trigger { order: 3; }
  .navbar-user { order: 4; }

  .navbar-search {
    order: 5;
    width: 100%;
    flex: 1 1 100%;
    max-width: none;
  }

  .navbar-search-input {
    height: 34px;
    font-size: .8125rem;
  }

  .bs-busca-mobile-open .navbar-search {
    position: fixed;
    inset: .5rem .6rem auto .6rem;
    z-index: 10050;
    width: auto;
    max-width: none;
    flex: 0 0 auto;
  }

  .bs-busca-mobile-open .navbar-search-input {
    height: 42px;
    font-size: .9rem;
    box-shadow: var(--shadow-lg);
    background: var(--color-white);
  }

  .bs-busca-mobile-open .busca-dropdown {
    position: fixed;
    top: calc(.5rem + 42px + .45rem);
    left: .6rem;
    right: .6rem;
    width: auto;
    max-height: calc(100vh - 3.8rem);
    border-radius: 12px;
    z-index: 10040;
  }

  .bs-busca-mobile-open .app-navbar::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 10030;
    background: rgba(17,24,39,.35);
    backdrop-filter: blur(1px);
  }

  .bs-busca-mobile-open .navbar-search,
  .bs-busca-mobile-open .busca-dropdown {
    pointer-events: auto;
  }

  .navbar-notifications,
  .navbar-user {
    flex-shrink: 0;
  }

  .notifications-dropdown {
    right: -40px;
    width: calc(100vw - 1.25rem);
    max-width: 360px;
  }

  .app-content {
    padding: 1rem .75rem;
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }

  .page-title {
    font-size: 1.35rem;
    line-height: 1.2;
  }

  .breadcrumb {
    font-size: .75rem;
  }

  .footer-inner { flex-direction: column; align-items: flex-start; gap: .5rem; }
  .page-header { flex-direction: column; align-items: flex-start; }

  .admin-geral-bar {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: .4rem .6rem;
    padding: .55rem .75rem;
    font-size: .74rem;
    line-height: 1.35;
  }

  .admin-geral-bar span {
    width: 100%;
    min-width: 0;
    word-break: break-word;
  }

  .admin-geral-bar-link {
    margin-left: 0;
    width: 100%;
    text-align: center;
  }

  .empresa-hero {
    flex-direction: column;
    align-items: flex-start !important;
    gap: .75rem !important;
    padding: 1rem !important;
    margin-bottom: 1.25rem !important;
  }

  .empresa-hero-main,
  .empresa-panel,
  .empresa-plan-panel {
    width: 100%;
    max-width: 100% !important;
  }

  .empresa-hero-title {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
  }

  .empresa-hero-meta {
    word-break: break-word;
  }

  .empresa-hero-plan {
    width: 100%;
    align-items: flex-start !important;
  }

  .empresa-actions {
    justify-content: stretch !important;
  }

  .empresa-actions .btn {
    width: 100%;
  }

  .empresa-plan-grid {
    grid-template-columns: 1fr !important;
    gap: .75rem !important;
  }

  .empresa-plan-card {
    padding: .95rem !important;
  }

  .empresa-plan-note {
    font-size: .82rem !important;
  }
}

@media (max-width: 420px) {
  .app-navbar {
    padding: 0 .6rem;
  }

  .navbar-search-input {
    padding-left: 2rem;
  }

  .notifications-dropdown {
    right: -24px;
    width: calc(100vw - 1rem);
  }

  .sidebar {
    width: min(88vw, 320px);
  }

  .btn {
    min-height: 36px;
  }

  .btn-sm {
    min-height: 32px;
  }
}

/* ----------------------------------------------------------
   Admin Geral — barra de aviso e ajuste de layout
---------------------------------------------------------- */
.admin-geral-bar {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem 1rem;
  background: linear-gradient(90deg, #fef3dc 0%, #fdf6e8 100%);
  color: #7a5010;
  font-size: .78rem;
  font-weight: 500;
  border: 1px solid #f0d090;
  border-radius: var(--radius-md);
  margin-bottom: .75rem;
}

.admin-geral-bar svg { flex-shrink: 0; color: #c9863a; }
.admin-geral-bar strong { color: #a86820; }

.admin-geral-bar-link {
  margin-left: auto;
  color: #a86820;
  text-decoration: none;
  padding: .15rem .65rem;
  border: 1px solid #e8b860;
  border-radius: 6px;
  font-size: .72rem;
  font-weight: 600;
  transition: background .15s;
  white-space: nowrap;
}
.admin-geral-bar-link:hover { background: rgba(201,169,110,.15); color: #7a5010; }

/* -----------------------------------------------------------
   WIZARD — Assistente de Configuração Inicial
   ----------------------------------------------------------- */

/* Cabeçalho de cada passo */
.wiz-passo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.wiz-passo-info {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
}
.wiz-passo-icone {
  font-size: 2rem;
  flex-shrink: 0;
  line-height: 1;
}
.wiz-passo-info h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 .2rem;
  color: var(--gray-900);
}
.wiz-passo-info p {
  font-size: .875rem;
  color: var(--gray-500);
  margin: 0;
  max-width: 520px;
}

/* Banner do Dashboard */
.dash-wizard-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, #fdf6ec, #fef3cd);
  border: 1px solid var(--gold-light);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}
.dash-wizard-banner-icon {
  font-size: 2rem;
  flex-shrink: 0;
}
.dash-wizard-banner-text {
  flex: 1;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.dash-wizard-banner-text strong {
  font-size: .95rem;
  font-weight: 700;
  color: var(--gold-dark);
}
.dash-wizard-banner-text span {
  font-size: .82rem;
  color: var(--gray-600);
}

/* ============================================================
   AI Chatbot FAB — AdminGeral only
   ============================================================ */

/* ── FAB Button ──────────────────────────────────────────────── */
.ai-chatbot__fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 8000;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  box-shadow: 0 4px 20px rgba(201,169,110,.45), 0 2px 8px rgba(0,0,0,.12);
  color: #fff;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  outline-offset: 3px;
}
.ai-chatbot__fab:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 8px 28px rgba(201,169,110,.55), 0 4px 12px rgba(0,0,0,.14);
}
.ai-chatbot__fab:active { transform: scale(1.02); }
.ai-chatbot__fab-icon { display: flex; align-items: center; justify-content: center; }

/* pulse ring on first render */
.ai-chatbot__fab::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--gold-light);
  animation: ai-fab-pulse 2.5s ease-out infinite;
  pointer-events: none;
}
@keyframes ai-fab-pulse {
  0%   { opacity: .7; transform: scale(1); }
  70%  { opacity: 0;  transform: scale(1.45); }
  100% { opacity: 0;  transform: scale(1.45); }
}

/* ── Chatbot Panel ───────────────────────────────────────────── */
.ai-chatbot {
  position: fixed;
  bottom: 6rem;
  right: 2rem;
  z-index: 7999;
  width: 380px;
  max-height: 560px;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-xl);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(201,169,110,.12);
  overflow: hidden;
  transform-origin: bottom right;
  animation: ai-panel-in .28s cubic-bezier(.34,1.56,.64,1) both;
}
.ai-chatbot[hidden] { display: none !important; }

@keyframes ai-panel-in {
  from { opacity: 0; transform: scale(.88) translateY(12px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}

/* ── Header ─────────────────────────────────────────────────── */
.ai-chatbot__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 1.1rem .85rem;
  background: linear-gradient(135deg, rgba(201,169,110,.18) 0%, rgba(212,165,181,.12) 100%);
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}
.ai-chatbot__header-info { display: flex; align-items: center; gap: .65rem; }
.ai-chatbot__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: var(--shadow-gold);
}
.ai-chatbot__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-700);
  line-height: 1.2;
}
.ai-chatbot__status {
  margin: 0;
  font-size: .72rem;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: .3rem;
  line-height: 1.2;
}
.ai-chatbot__status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-success);
  display: inline-block;
  animation: ai-status-blink 2.4s ease-in-out infinite;
}
@keyframes ai-status-blink {
  0%,100% { opacity: 1; }
  50%      { opacity: .4; }
}
.ai-chatbot__header-actions { display: flex; gap: .3rem; }
.ai-chatbot__btn-clear,
.ai-chatbot__btn-close {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  color: var(--gray-500);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.ai-chatbot__btn-clear:hover { background: rgba(201,169,110,.15); color: var(--gold-dark); }
.ai-chatbot__btn-close:hover { background: rgba(192,96,96,.12);   color: var(--color-danger); }

/* ── Messages ────────────────────────────────────────────────── */
.ai-chatbot__messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1rem .5rem;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  scroll-behavior: smooth;
}
.ai-chatbot__messages::-webkit-scrollbar { width: 4px; }
.ai-chatbot__messages::-webkit-scrollbar-track { background: transparent; }
.ai-chatbot__messages::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }

.ai-chatbot__welcome {
  text-align: center;
  padding: 1.5rem .5rem;
  color: var(--gray-500);
  font-size: .85rem;
  line-height: 1.6;
}
.ai-chatbot__welcome-icon {
  display: block;
  font-size: 1.6rem;
  color: var(--gold);
  margin-bottom: .4rem;
}
.ai-chatbot__welcome strong { color: var(--gray-700); }
.ai-chatbot__welcome-hint { font-size: .78rem; color: var(--gray-400); margin-top: .35rem; }

/* bubbles */
.ai-msg {
  max-width: 88%;
  padding: .6rem .85rem;
  border-radius: var(--radius-lg);
  font-size: .875rem;
  line-height: 1.55;
  word-break: break-word;
  animation: ai-msg-in .2s ease both;
}
@keyframes ai-msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ai-msg--user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: #fff;
  border-bottom-right-radius: 4px;
  box-shadow: var(--shadow-gold);
}
.ai-msg--assistant {
  align-self: flex-start;
  background: var(--white);
  color: var(--gray-700);
  border: 1px solid var(--color-border);
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-xs);
}
.ai-msg--error {
  align-self: center;
  background: rgba(192,96,96,.08);
  color: var(--color-danger);
  border: 1px solid rgba(192,96,96,.2);
  font-size: .8rem;
  border-radius: var(--radius-md);
  text-align: center;
}

/* ── Typing indicator ───────────────────────────────────────── */
.ai-chatbot__typing {
  padding: .5rem 1rem;
  display: flex;
  gap: 5px;
  align-items: center;
  flex-shrink: 0;
}
.ai-chatbot__typing[hidden] { display: none !important; }
.ai-chatbot__typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  animation: ai-typing .9s ease-in-out infinite;
}
.ai-chatbot__typing span:nth-child(2) { animation-delay: .15s; }
.ai-chatbot__typing span:nth-child(3) { animation-delay: .30s; }
@keyframes ai-typing {
  0%,60%,100% { transform: translateY(0);   opacity: .5; }
  30%          { transform: translateY(-6px); opacity: 1;  }
}

/* ── Input Form ─────────────────────────────────────────────── */
.ai-chatbot__form {
  display: flex;
  align-items: flex-end;
  gap: .5rem;
  padding: .75rem 1rem;
  border-top: 1px solid var(--color-border);
  background: rgba(255,255,255,.6);
  flex-shrink: 0;
}
.ai-chatbot__input {
  flex: 1;
  resize: none;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  padding: .5rem .75rem;
  font-family: var(--font-body);
  font-size: .875rem;
  color: var(--gray-700);
  background: var(--white);
  line-height: 1.5;
  max-height: 120px;
  overflow-y: auto;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}
.ai-chatbot__input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,169,110,.15);
}
.ai-chatbot__input::placeholder { color: var(--gray-400); }
.ai-chatbot__btn-send {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border: none;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-gold);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.ai-chatbot__btn-send:hover { opacity: .9; transform: scale(1.05); }
.ai-chatbot__btn-send:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 480px) {
  .ai-chatbot {
    right: .75rem;
    left: .75rem;
    width: auto;
    bottom: 5.5rem;
  }
  .ai-chatbot__fab { right: 1rem; bottom: 1.25rem; }
}

