/* =========================================================
   AMARIX Portal — Estilos principais
   Identidade: azul-marinho profundo + dourado (logo)
   ========================================================= */

:root {
  --dark:    #1B2955;
  --navy-1:  #070D22;
  --navy-2:  #0E1A3F;
  --navy-3:  #1B2955;
  --gold:    #C9A84C;
  --gold-hi: #F3D98A;
  --gold-lo: #A9822E;
  --gold-grad: linear-gradient(135deg, #F7E08A 0%, #D9B04A 50%, #A9822E 100%);
  --green:   #1D9E75;
  --red:     #D64545;
  --bg:      #F4F2ED;
  --white:   #FFFFFF;
  --muted:   #7A86A3;
  --border:  #E3E1DA;
  --text:    #17213F;
  --card-bg: #FFFFFF;
  --shadow-sm: 0 1px 2px rgba(14,26,63,.04), 0 2px 8px rgba(14,26,63,.05);
  --shadow-md: 0 2px 4px rgba(14,26,63,.04), 0 12px 32px rgba(14,26,63,.10);
  --shadow-lg: 0 24px 64px rgba(7,13,34,.28);
  --ease: cubic-bezier(.2,.8,.2,1);
  --font: 'Manrope', 'Segoe UI', Arial, sans-serif;
  --font-brand: 'Cinzel', Georgia, serif;
}

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

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

button, input, select, textarea { font-family: inherit; }

::selection { background: rgba(201,168,76,.35); }

/* ---- ANIMAÇÕES ---- */
@keyframes fadeUp   { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn   { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn    { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes drift1   { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(8vw,6vh) scale(1.15); } }
@keyframes drift2   { 0%,100% { transform: translate(0,0) scale(1.1); } 50% { transform: translate(-10vw,-4vh) scale(.95); } }
@keyframes drift3   { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-5vw,8vh); } }
@keyframes rise     { from { transform: translateY(0); opacity: 0; } 10% { opacity: .9; } 90% { opacity: .6; } to { transform: translateY(-110vh); opacity: 0; } }
@keyframes spin     { to { transform: rotate(360deg); } }
@keyframes shine    { from { transform: translateX(-120%) skewX(-20deg); } to { transform: translateX(220%) skewX(-20deg); } }
@keyframes sheen    { from { background-position: -200% 0; } to { background-position: 200% 0; } }
@keyframes grow     { from { width: 0; } }
@keyframes glowLine { 0%,100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes letters  { from { letter-spacing: .6em; opacity: 0; filter: blur(6px); } to { letter-spacing: .28em; opacity: 1; filter: none; } }

/* =========================================================
   TELA DE LOGIN
   ========================================================= */
#screen-login {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 0%, #1A2A5E 0%, var(--navy-2) 45%, var(--navy-1) 100%);
}

.login-bg { position: absolute; inset: 0; pointer-events: none; }

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .55;
}
.orb-1 { width: 520px; height: 520px; background: #C9A84C; top: -180px; left: -140px; opacity: .35; animation: drift1 18s ease-in-out infinite; }
.orb-2 { width: 620px; height: 620px; background: #2E4FB8; bottom: -260px; right: -180px; animation: drift2 22s ease-in-out infinite; }
.orb-3 { width: 360px; height: 360px; background: #E8C56A; bottom: 10%; left: 55%; opacity: .18; animation: drift3 16s ease-in-out infinite; }

.login-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
}

.login-particles span {
  position: absolute;
  bottom: -20px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--gold-hi);
  box-shadow: 0 0 10px 2px rgba(243,217,138,.7);
  animation: rise linear infinite;
}
.login-particles span:nth-child(1)  { left: 6%;  animation-duration: 14s; animation-delay: 0s; }
.login-particles span:nth-child(2)  { left: 14%; animation-duration: 19s; animation-delay: 3s; width: 3px; height: 3px; }
.login-particles span:nth-child(3)  { left: 23%; animation-duration: 16s; animation-delay: 7s; }
.login-particles span:nth-child(4)  { left: 31%; animation-duration: 22s; animation-delay: 1s; width: 2px; height: 2px; }
.login-particles span:nth-child(5)  { left: 42%; animation-duration: 18s; animation-delay: 5s; }
.login-particles span:nth-child(6)  { left: 51%; animation-duration: 25s; animation-delay: 9s; width: 3px; height: 3px; }
.login-particles span:nth-child(7)  { left: 60%; animation-duration: 15s; animation-delay: 2s; }
.login-particles span:nth-child(8)  { left: 68%; animation-duration: 21s; animation-delay: 6s; width: 2px; height: 2px; }
.login-particles span:nth-child(9)  { left: 76%; animation-duration: 17s; animation-delay: 4s; }
.login-particles span:nth-child(10) { left: 84%; animation-duration: 23s; animation-delay: 8s; width: 3px; height: 3px; }
.login-particles span:nth-child(11) { left: 91%; animation-duration: 16s; animation-delay: 10s; }
.login-particles span:nth-child(12) { left: 97%; animation-duration: 20s; animation-delay: 12s; width: 2px; height: 2px; }

.login-box {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 430px;
  padding: 44px 40px 32px;
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(255,255,255,.10), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,.12);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  animation: popIn .9s var(--ease) both .15s;
}
.login-box::before {   /* filete dourado no topo */
  content: '';
  position: absolute; top: -1px; left: 18%; right: 18%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-hi), transparent);
  animation: glowLine 3s ease-in-out infinite;
}

.login-logo { text-align: center; margin-bottom: 30px; }

.logo-medallion {
  position: relative;
  width: 132px; height: 132px;
  margin: 0 auto 18px;
  border-radius: 50%;
  padding: 4px;
  animation: popIn 1s var(--ease) both .35s;
}
.logo-medallion::before {   /* anel dourado giratório */
  content: '';
  position: absolute; inset: -3px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 20%, #F7E08A 35%, #C9A84C 50%, transparent 65% 100%);
  animation: spin 5s linear infinite;
}
.logo-medallion::after {    /* brilho atrás */
  content: '';
  position: absolute; inset: -30px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(243,217,138,.35), transparent 65%);
  z-index: -1;
}
.medallion-face {
  position: relative;
  display: block;
  width: 100%; height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: #FAF7F0;
  box-shadow: inset 0 0 0 1px rgba(201,168,76,.4);
}
.medallion-face { display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 35%, #FFFDF7, #F1EADA); }
.medallion-face svg { width: 64%; height: auto; margin-top: -4%; filter: drop-shadow(0 4px 10px rgba(169,130,46,.35)); }

.brand-word {
  font-family: var(--font-brand);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: .28em;
  padding-left: .28em;
  background: linear-gradient(90deg, #C9A84C, #F7E08A, #FFF6D5, #F7E08A, #C9A84C);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  animation: letters 1.4s var(--ease) both .5s, sheen 6s linear infinite 2s;
}

.brand-tag {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-top: 6px;
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: rgba(255,255,255,.6);
  animation: fadeIn 1s ease both 1.1s;
}
.brand-tag span { width: 28px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.brand-tag span:last-child { transform: scaleX(-1); }

#login-form { animation: fadeUp .8s var(--ease) both 1s; }

#screen-login .form-group label { color: rgba(255,255,255,.62); }
#screen-login .form-group input {
  background: rgba(7,13,34,.45);
  border-color: rgba(255,255,255,.14);
  color: #fff;
}
#screen-login .form-group input::placeholder { color: rgba(255,255,255,.3); }
#screen-login .form-group input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(201,168,76,.18), 0 0 24px rgba(201,168,76,.15);
}
#screen-login .error-msg { background: rgba(214,69,69,.14); color: #FFB4B4; }

.login-foot {
  text-align: center;
  font-size: 11px;
  letter-spacing: .08em;
  color: rgba(255,255,255,.38);
  margin-top: 26px;
  animation: fadeIn 1s ease both 1.4s;
}

/* =========================================================
   FORMULÁRIOS
   ========================================================= */
.form-group { margin-bottom: 18px; }

.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 7px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  color: var(--text);
  background: var(--white);
  transition: border-color .2s, box-shadow .2s, background .2s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(201,168,76,.16);
}

.form-group textarea { resize: vertical; min-height: 100px; line-height: 1.6; }

/* =========================================================
   BOTÕES
   ========================================================= */
.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .01em;
  border: none;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), filter .2s;
  text-decoration: none;
}
.btn:hover  { transform: translateY(-2px); filter: brightness(1.06); }
.btn:active { transform: translateY(0) scale(.98); }

.btn-primary { background: linear-gradient(135deg, #2A3E7E, var(--navy-2)); color: #fff; box-shadow: 0 6px 18px rgba(14,26,63,.28); }
.btn-primary:hover { box-shadow: 0 10px 26px rgba(14,26,63,.36); }
.btn-gold    { background: var(--gold-grad); color: var(--navy-2); box-shadow: 0 6px 18px rgba(201,168,76,.35); }
.btn-gold:hover { box-shadow: 0 10px 28px rgba(201,168,76,.5); }
.btn-green   { background: linear-gradient(135deg, #27B887, #168060); color: #fff; box-shadow: 0 6px 18px rgba(29,158,117,.28); }
.btn-red     { background: linear-gradient(135deg, #E25A5A, #B33030); color: #fff; box-shadow: 0 6px 18px rgba(192,57,43,.25); }
.btn-outline { background: var(--white); color: var(--dark); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--gold); box-shadow: var(--shadow-sm); }
.btn-full    { width: 100%; }
.btn-sm      { padding: 8px 16px; font-size: 12px; border-radius: 10px; }

/* Botão principal do login: dourado com reflexo passando */
.btn-shine {
  background: var(--gold-grad);
  color: var(--navy-1);
  padding: 15px 24px;
  font-size: 15px;
  box-shadow: 0 10px 30px rgba(201,168,76,.35);
}
.btn-shine:hover { box-shadow: 0 14px 40px rgba(201,168,76,.55); }
.btn-gold::after, .btn-shine::after {
  content: '';
  position: absolute; top: 0; bottom: 0; left: 0; width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  animation: shine 3.2s ease-in-out infinite;
}

.error-msg {
  background: #FFF4F4;
  color: var(--red);
  border-left: 3px solid var(--red);
  padding: 10px 14px;
  border-radius: 0 10px 10px 0;
  font-size: 13px;
  margin-top: 12px;
  display: none;
}

/* =========================================================
   LAYOUT PRINCIPAL
   ========================================================= */
#app {
  display: none;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(900px 500px at 100% 0%, rgba(201,168,76,.10), transparent 60%),
    radial-gradient(800px 600px at 0% 100%, rgba(46,79,184,.07), transparent 60%),
    var(--bg);
}

/* ---- HEADER ---- */
.app-header {
  position: relative;
  background: linear-gradient(100deg, var(--navy-1) 0%, var(--navy-2) 55%, #1A2C66 100%);
  color: var(--white);
  padding: 0 28px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
  animation: fadeIn .6s ease both;
}

.app-header .logo { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 40px; height: 35px; filter: drop-shadow(0 0 10px rgba(243,217,138,.35)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: var(--font-brand);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: .22em;
  background: linear-gradient(90deg, #D9B04A, #F7E08A, #FFF6D5, #F7E08A, #D9B04A);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  animation: sheen 8s linear infinite;
}
.brand-sub { font-size: 9px; letter-spacing: .28em; text-transform: uppercase; color: rgba(255,255,255,.5); margin-top: 3px; }

.app-header .user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.user-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; letter-spacing: .02em;
  color: var(--navy-1);
  background: var(--gold-grad);
  box-shadow: 0 0 0 2px rgba(255,255,255,.12), 0 0 18px rgba(243,217,138,.35);
}
.user-avatar:empty { display: none; }
.user-meta { display: flex; flex-direction: column; line-height: 1.25; }
#header-username { color: #fff; font-weight: 700; }
#header-role { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-hi); }

.btn-logout {
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.85);
  border: 1px solid rgba(255,255,255,.14);
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-left: 6px;
  transition: background .2s, border-color .2s;
}
.btn-logout:hover { background: rgba(255,255,255,.14); border-color: var(--gold); }

/* ---- NAV ---- */
.app-nav {
  position: relative;
  background: linear-gradient(100deg, var(--navy-1) 0%, var(--navy-2) 55%, #1A2C66 100%);
  padding: 0 24px 12px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  z-index: 99;
  box-shadow: 0 10px 30px rgba(7,13,34,.18);
}
.app-nav::-webkit-scrollbar { display: none; }
.app-nav::after {   /* linha dourada animada */
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold) 20%, var(--gold-hi) 50%, var(--gold) 80%, transparent);
  background-size: 200% 100%;
  animation: sheen 6s linear infinite;
}

.nav-tab {
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.62);
  border: 1px solid transparent;
  background: none;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: color .25s, background .25s, border-color .25s, box-shadow .25s;
}
.nav-tab:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-tab.active {
  color: var(--navy-1);
  font-weight: 800;
  background: var(--gold-grad);
  box-shadow: 0 4px 16px rgba(201,168,76,.4);
}

/* ---- CONTEÚDO ---- */
.app-content {
  flex: 1;
  padding: 32px 28px 48px;
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  overflow-y: auto;
}

/* Títulos das páginas */
.app-content h2 {
  font-size: 26px !important;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--text);
  position: relative;
}
.app-content > h2,
.app-content > .flex > h2 { padding-bottom: 10px; }
.app-content > h2::after,
.app-content > .flex > h2::after {
  content: '';
  position: absolute; left: 0; bottom: 0;
  width: 44px; height: 3px; border-radius: 3px;
  background: var(--gold-grad);
}

/* Entrada suave de cada bloco */
.app-content > * { animation: fadeUp .5s var(--ease) both; }
/* O contêiner das janelas não pode animar: um transform (mesmo animado)
   prende o position:fixed do .modal-overlay dentro dele e a janela some. */
#modal-container { animation: none !important; }
.app-content > *:nth-child(2) { animation-delay: .06s; }
.app-content > *:nth-child(3) { animation-delay: .12s; }
.app-content > *:nth-child(4) { animation-delay: .18s; }
.app-content > *:nth-child(5) { animation-delay: .24s; }

/* ---- HERO DE BOAS-VINDAS ---- */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 34px 36px;
  margin-bottom: 26px;
  color: #fff;
  background: linear-gradient(120deg, var(--navy-1) 0%, var(--navy-2) 45%, #22377A 100%);
  box-shadow: 0 20px 50px rgba(14,26,63,.25);
}
.hero::before, .hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  pointer-events: none;
}
.hero::before { width: 320px; height: 320px; right: -60px; top: -140px; background: rgba(201,168,76,.45); animation: drift3 14s ease-in-out infinite; }
.hero::after  { width: 260px; height: 260px; right: 22%; bottom: -170px; background: rgba(46,79,184,.6); animation: drift2 18s ease-in-out infinite; }
.hero-inner { position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold-hi);
  margin-bottom: 10px;
}
.hero-eyebrow::before { content: ''; width: 22px; height: 1.5px; background: var(--gold-hi); }
.hero-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.15;
}
.hero-title em {
  font-style: normal;
  background: linear-gradient(90deg, #F7E08A, #D9B04A);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero-sub { font-size: 14px; color: rgba(255,255,255,.68); margin-top: 8px; }
.hero-sub::first-letter { text-transform: uppercase; }
.hero-mark {
  position: absolute; right: 36px; top: 50%;
  width: 120px; height: 105px;
  transform: translateY(-50%);
  opacity: .9;
  filter: drop-shadow(0 0 22px rgba(243,217,138,.45));
  z-index: 1;
}

/* =========================================================
   CARDS
   ========================================================= */
.card {
  background: var(--white);
  border-radius: 20px;
  border: 1px solid var(--border);
  padding: 26px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
  animation: fadeUp .5s var(--ease) both;
  transition: box-shadow .25s var(--ease), border-color .25s;
}
.card[onclick] { transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s; }
.card[onclick]:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: rgba(201,168,76,.6); }

.card-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* ---- GRID DE CLIENTES (ADMIN) ---- */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
}

.client-card {
  position: relative;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  animation: fadeUp .55s var(--ease) both;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.client-card::before {   /* barra dourada que surge no hover */
  content: '';
  position: absolute; left: 0; top: 0; right: 0; height: 3px;
  background: var(--gold-grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease);
}
.client-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: rgba(201,168,76,.55); }
.client-card:hover::before { transform: scaleX(1); }
.clients-grid > :nth-child(2) { animation-delay: .05s; }
.clients-grid > :nth-child(3) { animation-delay: .10s; }
.clients-grid > :nth-child(4) { animation-delay: .15s; }
.clients-grid > :nth-child(5) { animation-delay: .20s; }
.clients-grid > :nth-child(6) { animation-delay: .25s; }
.clients-grid > :nth-child(n+7) { animation-delay: .3s; }

.client-card .client-name { font-size: 17px; font-weight: 800; color: var(--text); margin-bottom: 3px; }
.client-card .client-company { font-size: 12px; color: var(--muted); margin-bottom: 18px; }

/* ---- BARRA DE PROGRESSO ---- */
.progress-wrap { margin-bottom: 8px; }

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 7px;
}
.progress-label strong { color: var(--text); font-weight: 800; }

.progress-bar-bg {
  background: #ECEAE3;
  border-radius: 100px;
  height: 10px;
  overflow: hidden;
}

.progress-bar-fill {
  position: relative;
  height: 10px;
  border-radius: 100px;
  background: linear-gradient(90deg, #1D9E75, #3DD39E);
  transition: width .6s var(--ease);
  animation: grow 1.4s var(--ease) both .2s;
  overflow: hidden;
}
.progress-bar-fill::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  background-size: 50% 100%;
  background-repeat: no-repeat;
  animation: sheen 2.6s ease-in-out infinite 1.6s;
}
.progress-bar-fill.medium { background: linear-gradient(90deg, #C9A84C, #F3D98A); }
.progress-bar-fill.low    { background: linear-gradient(90deg, #D64545, #F08A6C); }

.progress-pct {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1;
  margin-bottom: 14px;
  background: linear-gradient(135deg, var(--navy-2), #2E4FB8);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* ---- STATUS BADGES ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.badge-pendente   { background: #FDEDED; color: #C23434; }
.badge-andamento  { background: #FFF5DA; color: #A87500; }
.badge-concluido  { background: #E3F5EC; color: #16805C; }

/* ---- TABELA DE AÇÕES ---- */
.actions-table { width: 100%; border-collapse: collapse; font-size: 13px; }

.actions-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  border-bottom: 1px solid var(--border);
}

.actions-table td {
  padding: 14px 12px;
  border-bottom: 1px solid #F0EEE8;
  vertical-align: top;
  line-height: 1.5;
  transition: background .2s;
}
.actions-table tr:last-child td { border-bottom: none; }
.actions-table tr:hover td { background: #FBF8F0; }

/* ---- LISTA DE REUNIÕES ---- */
.meeting-item {
  position: relative;
  padding: 18px 22px 18px 26px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  overflow: hidden;
  animation: fadeUp .5s var(--ease) both;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.meeting-item::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--gold-grad);
}
.meeting-item:hover { transform: translateX(4px); box-shadow: var(--shadow-md); border-color: rgba(201,168,76,.5); }

.meeting-item .meeting-date {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gold-lo);
  margin-bottom: 5px;
}
.meeting-item .meeting-title { font-size: 16px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.meeting-item .meeting-summary { font-size: 13px; color: #5A6380; line-height: 1.65; }

/* ---- MODAL ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7,13,34,.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn .25s ease both;
}

.modal-box {
  position: relative;
  background: var(--white);
  border-radius: 24px;
  padding: 34px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg), inset 0 4px 0 var(--gold);
  animation: popIn .4s var(--ease) both;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.modal-header h3 { font-size: 20px; font-weight: 800; letter-spacing: -.01em; color: var(--text); }

.modal-close {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #F2F0EA;
  border: none;
  font-size: 20px;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
  transition: background .2s, color .2s, transform .3s var(--ease);
}
.modal-close:hover { background: var(--navy-2); color: #fff; transform: rotate(90deg); }

/* ---- STATS ---- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-box {
  position: relative;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px 20px;
  text-align: left;
  box-shadow: var(--shadow-sm);
  animation: fadeUp .55s var(--ease) both;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.stat-box:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.stat-box::after {   /* círculo decorativo dourado */
  content: '';
  position: absolute; right: -30px; top: -30px;
  width: 100px; height: 100px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,76,.22), transparent 70%);
}
.stats-row > :nth-child(2) { animation-delay: .07s; }
.stats-row > :nth-child(3) { animation-delay: .14s; }
.stats-row > :nth-child(4) { animation-delay: .21s; }

/* Primeiro indicador em destaque (marinho) */
.stats-row > .stat-box:first-child {
  background: linear-gradient(135deg, var(--navy-1), #22377A);
  border-color: transparent;
}
.stats-row > .stat-box:first-child .stat-num { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats-row > .stat-box:first-child .stat-label { color: rgba(255,255,255,.65); }

.stat-box .stat-num {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.stat-box .stat-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-top: 10px;
}

/* ---- ATA DETAIL ---- */
.ata-section { margin-bottom: 22px; }
.ata-section h4 { font-size: 11px; font-weight: 800; color: var(--gold-lo); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 10px; }
.ata-section p  { font-size: 14px; color: var(--text); line-height: 1.75; }

/* ---- EMPTY STATE ---- */
.empty-state {
  text-align: center;
  padding: 56px 20px;
  color: var(--muted);
}
.empty-state .empty-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 84px; height: 84px;
  border-radius: 50%;
  font-size: 38px;
  margin-bottom: 14px;
  background: radial-gradient(circle, rgba(201,168,76,.22), rgba(201,168,76,.05));
  box-shadow: 0 0 0 8px rgba(201,168,76,.06);
}
.empty-state p { font-size: 14px; }

/* =========================================================
   CRM (réplica do funil comercial AMARIX)
   ========================================================= */
.crm2-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, #0F2E2A 0%, #183F3A 50%, #22574F 100%);
  color: #fff;
  border-radius: 24px;
  padding: 30px 32px;
  margin-bottom: 22px;
  box-shadow: 0 20px 50px rgba(24,63,58,.25);
}
.crm2-hero::before {
  content: '';
  position: absolute; right: -80px; top: -120px;
  width: 300px; height: 300px; border-radius: 50%;
  background: rgba(201,168,76,.35);
  filter: blur(50px);
  animation: drift3 14s ease-in-out infinite;
}
.crm2-hero-top { position: relative; display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 12px; }
.crm2-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-hi); margin-bottom: 8px; }
.crm2-hero h2 { font-size: 28px !important; margin: 0 0 4px; color: #fff; }
.crm2-hero h2::after { display: none; }
.crm2-hero p { font-size: 13px; color: #CFE3DE; margin: 0; }
.crm2-btn-nova {
  position: relative; overflow: hidden;
  background: var(--gold-grad); color: #0F2E2A; border: none; border-radius: 12px;
  padding: 11px 18px; font-weight: 800; font-size: 13px; cursor: pointer;
  box-shadow: 0 8px 22px rgba(201,168,76,.35);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.crm2-btn-nova:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(201,168,76,.5); }

.crm2-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 22px; }
.crm2-stat {
  background: var(--white); border: 1px solid var(--border); border-radius: 18px; padding: 18px 20px;
  box-shadow: var(--shadow-sm); animation: fadeUp .5s var(--ease) both;
  transition: transform .3s var(--ease), box-shadow .3s;
}
.crm2-stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.crm2-stats > :nth-child(2) { animation-delay: .06s; }
.crm2-stats > :nth-child(3) { animation-delay: .12s; }
.crm2-stats > :nth-child(4) { animation-delay: .18s; }
.crm2-stat-dark { background: linear-gradient(135deg, #0F2E2A, #22574F); color: #fff; border: none; }
.crm2-stat-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.crm2-stat-dark .crm2-stat-label { color: #CFE3DE; }
.crm2-stat-num { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.crm2-stat-dark .crm2-stat-num { color: var(--gold-hi); }

.crm2-tabs { display: inline-flex; gap: 4px; margin-bottom: 16px; flex-wrap: wrap; background: #ECEAE3; padding: 4px; border-radius: 12px; }
.crm2-tab { padding: 8px 16px; border-radius: 9px; border: none; background: transparent; color: #6B7280; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .2s, color .2s; }
.crm2-tab:hover { color: #183B38; }
.crm2-tab.active { background: var(--white); color: #183B38; font-weight: 800; box-shadow: var(--shadow-sm); }

.crm2-toolbar { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.crm2-search, .crm2-select {
  padding: 10px 14px; border: 1.5px solid var(--border); border-radius: 12px; font-size: 13px;
  background: var(--white); outline: none; transition: border-color .2s, box-shadow .2s;
}
.crm2-search { flex: 1; min-width: 220px; }
.crm2-search:focus, .crm2-select:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(201,168,76,.16); }

.crm2-board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.crm2-col { flex: 0 0 250px; background: rgba(234,240,239,.8); border-radius: 16px; padding: 12px; border-top: 3px solid #92AAA2; animation: fadeUp .5s var(--ease) both; }
.crm2-col:nth-child(2) { animation-delay: .05s; }
.crm2-col:nth-child(3) { animation-delay: .10s; }
.crm2-col:nth-child(4) { animation-delay: .15s; }
.crm2-col:nth-child(n+5) { animation-delay: .2s; }
.crm2-col[data-stage="Proposta enviada"] { border-top-color: #C3A062; }
.crm2-col[data-stage="Negociação"]       { border-top-color: #214F48; }
.crm2-col-header { display: flex; justify-content: space-between; font-size: 13px; font-weight: 800; color: #203B39; margin-bottom: 10px; }
.crm2-col-empty { font-size: 12px; color: var(--muted); padding: 8px 2px; text-align: center; }

.crm2-card {
  display: block; width: 100%; text-align: left; background: var(--white);
  border: 1px solid #D6E3DF; border-radius: 12px; padding: 13px; margin-bottom: 10px;
  cursor: pointer; font-family: inherit;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.crm2-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(24,63,58,.16); border-color: #63988B; }
.crm2-tag { display: inline-block; background: #EDF5F0; color: #44675D; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 6px; margin-bottom: 6px; }
.crm2-card-company { font-weight: 800; font-size: 14px; color: #203B39; }
.crm2-card-contact { font-size: 12px; color: var(--muted); margin-top: 2px; }
.crm2-card-due { font-size: 11px; color: var(--muted); margin-top: 6px; }
.crm2-card-due.atrasado { color: var(--red); font-weight: 700; }
.crm2-card-next { font-size: 12px; color: #203B39; margin-top: 6px; padding-top: 6px; border-top: 1px solid #EEE; }
.crm2-card-footer { font-size: 11px; color: var(--muted); margin-top: 8px; padding-top: 6px; border-top: 1px solid #EEE; display: flex; justify-content: space-between; }

.crm2-list-item {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--white); border: 1px solid var(--border); border-radius: 14px;
  padding: 15px 18px; margin-bottom: 10px; flex-wrap: wrap;
  animation: fadeUp .45s var(--ease) both;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.crm2-list-item:hover { transform: translateX(3px); box-shadow: var(--shadow-md); }
.crm2-list-main strong { font-size: 14px; color: #203B39; }
.crm2-list-main div { font-size: 12px; color: var(--muted); margin-top: 2px; }
.crm2-list-side { display: flex; align-items: center; gap: 10px; }
.crm2-btn-abrir { border: 1.5px solid #183F3A; background: transparent; color: #183F3A; border-radius: 10px; padding: 6px 14px; font-size: 12px; font-weight: 800; cursor: pointer; transition: background .2s, color .2s; }
.crm2-btn-abrir:hover { background: #183F3A; color: #fff; }

.crm2-closed-group { margin-bottom: 20px; }
.crm2-closed-title { font-size: 13px; font-weight: 800; color: #203B39; margin-bottom: 10px; }
.crm2-closed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }

.crm2-modal-sub { font-size: 13px; color: var(--muted); margin: -8px 0 16px; }
.crm2-section-title { font-size: 13px; font-weight: 800; color: #203B39; margin: 18px 0 10px; padding-top: 14px; border-top: 1px solid var(--border); }
.crm2-footer-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.crm2-btn-concluir { border: 1px solid #1D7A56; background: #EAF3DE; color: #1D7A56; border-radius: 12px; padding: 10px 14px; font-size: 13px; font-weight: 800; cursor: pointer; }
.crm2-btn-cancelar { border: 1px solid var(--border); background: var(--white); color: var(--text); border-radius: 12px; padding: 10px 14px; font-size: 13px; cursor: pointer; }
.crm2-btn-salvar   { border: none; background: linear-gradient(135deg, #22574F, #0F2E2A); color: #fff; border-radius: 12px; padding: 10px 16px; font-size: 13px; font-weight: 800; cursor: pointer; flex: 1; box-shadow: 0 6px 18px rgba(24,63,58,.25); }

.crm2-history-item { padding: 9px 0; border-bottom: 1px solid #F0EEE8; font-size: 13px; }
.crm2-history-date { font-size: 11px; color: var(--muted); margin-bottom: 2px; }


/* =========================================================
   TELA DO CLIENTE (cabeçalho, anel de progresso, sub-abas)
   ========================================================= */
@keyframes ringFill { from { stroke-dashoffset: 326.7; } }

.alert-gold {
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(90deg, #FFF6DC, #FFFBF0);
  border: 1px solid rgba(201,168,76,.6);
  border-radius: 14px;
  padding: 12px 18px;
  margin-bottom: 14px;
  font-size: 13px;
  color: #6E5000;
  box-shadow: 0 6px 18px rgba(201,168,76,.15);
}

.client-hero {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 30px 32px 24px;
  margin-bottom: 22px;
  color: #fff;
  background: linear-gradient(120deg, var(--navy-1) 0%, var(--navy-2) 45%, #22377A 100%);
  box-shadow: 0 20px 50px rgba(14,26,63,.25);
}
.client-hero::before {
  content: ''; position: absolute; right: 60px; top: -160px;
  width: 340px; height: 340px; border-radius: 50%;
  background: rgba(201,168,76,.38); filter: blur(60px);
  animation: drift3 14s ease-in-out infinite; pointer-events: none;
}
.client-hero > * { position: relative; z-index: 1; }

.client-hero-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.client-hero-id { display: flex; align-items: center; gap: 18px; min-width: 0; }
.client-avatar {
  flex: 0 0 auto;
  width: 64px; height: 64px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; color: var(--navy-1);
  background: var(--gold-grad);
  box-shadow: 0 0 0 3px rgba(255,255,255,.1), 0 10px 30px rgba(201,168,76,.4);
}
.client-hero .hero-eyebrow { margin-bottom: 6px; }
.client-hero-name { font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; overflow-wrap: anywhere; }
.client-hero-sub { font-size: 13px; color: rgba(255,255,255,.65); margin-top: 3px; }

.client-ring { position: relative; flex: 0 0 auto; width: 112px; height: 112px; }
.client-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.client-ring circle { fill: none; stroke-width: 9; }
.ring-bg { stroke: rgba(255,255,255,.12); }
.ring-fg {
  stroke: url(#gm);
  stroke-linecap: round;
  stroke-dasharray: 326.7;
  stroke-dashoffset: calc(326.7 - 326.7 * var(--pct) / 100);
  animation: ringFill 1.4s var(--ease) both .2s;
  filter: drop-shadow(0 0 6px rgba(243,217,138,.5));
}
.client-ring-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.client-ring-label strong { font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--gold-hi); line-height: 1; }
.client-ring-label span { font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.6); margin-top: 4px; }

.client-contacts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.contact-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px; font-weight: 600; color: #fff;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
}
.contact-chip em { font-style: normal; font-weight: 500; color: rgba(255,255,255,.55); }
.contact-chip button { border: none; background: none; cursor: pointer; font-size: 12px; padding: 0; opacity: .7; }
.contact-chip button:hover { opacity: 1; }
.contact-add { cursor: pointer; font-family: inherit; color: var(--gold-hi); border-style: dashed; border-color: rgba(243,217,138,.5); background: transparent; transition: background .2s; }
.contact-add:hover { background: rgba(243,217,138,.1); }

.client-hero-bottom {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap;
  margin-top: 20px; padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: 13px; color: rgba(255,255,255,.8);
}
.client-hero a { color: var(--gold-hi); font-weight: 700; text-decoration: none; }
.client-hero a:hover { text-decoration: underline; }
.client-meeting-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.client-meeting-label { font-weight: 700; color: #fff; margin-right: 4px; }
.client-meeting input {
  background: rgba(7,13,34,.45);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 12px; color: #fff;
  color-scheme: dark;
  outline: none;
}
.client-meeting input:focus { border-color: var(--gold); }
.client-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.btn-glass { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.2); }
.btn-glass:hover { background: rgba(255,255,255,.18); border-color: var(--gold); }

.sub-tabs {
  display: flex; gap: 4px;
  background: #ECEAE3; padding: 5px; border-radius: 14px;
  margin-bottom: 22px; overflow-x: auto; scrollbar-width: none;
}
.sub-tabs::-webkit-scrollbar { display: none; }
.sub-tab {
  flex: 1 0 auto;
  padding: 10px 18px;
  border: none; background: transparent; border-radius: 10px;
  font-size: 13px; font-weight: 600; color: #6B7280;
  cursor: pointer; white-space: nowrap;
  transition: background .2s, color .2s, box-shadow .2s;
}
.sub-tab:hover { color: var(--text); }
.sub-tab.active { background: var(--white); color: var(--text); font-weight: 800; box-shadow: var(--shadow-sm), inset 0 -2px 0 var(--gold); }

@media (max-width: 600px) {
  .client-hero { padding: 24px 20px 20px; border-radius: 20px; }
  .client-avatar { display: none; }
  .client-hero-name { font-size: 22px; }
  .client-ring { width: 84px; height: 84px; }
  .client-ring-label strong { font-size: 19px; }
  .client-ring-label span { display: none; }
}

/* =========================================================
   RESPONSIVO
   ========================================================= */
@media (max-width: 600px) {
  .app-header  { padding: 0 16px; height: 60px; }
  .brand-sub, .user-meta { display: none; }
  .app-nav     { padding: 0 12px 10px; }
  .app-content { padding: 20px 16px 40px; }
  .login-box   { padding: 34px 24px 26px; }
  .brand-word  { font-size: 28px; }
  .modal-box   { padding: 24px 20px; }
  .stats-row   { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-box .stat-num { font-size: 30px; }
  .clients-grid { grid-template-columns: 1fr; }
  .hero        { padding: 26px 22px; border-radius: 20px; }
  .hero-title  { font-size: 25px; }
  .hero-mark   { display: none; }

  .actions-table thead { display: none; }
  .actions-table td { display: block; padding: 6px 12px; }
  .actions-table tr {
    display: block;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 10px;
    padding: 8px 0;
  }
}

/* Quem prefere menos movimento no sistema operacional */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .login-particles { display: none; }
}

/* ---- UTILITÁRIOS ---- */
.hidden  { display: none !important; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.flex  { display: flex; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.text-muted { color: var(--muted); font-size: 13px; }
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
