/* ==========================================================================
   Meireles Connect — Swiss & High-Contrast (vanilla CSS)
   ========================================================================== */
:root {
  --primary: #0079C2;
  --primary-hover: #005A91;
  --primary-soft: #E6F2F9;
  --accent-red: #E63946;
  --accent-red-hover: #D62828;
  --bg-main: #FFFFFF;
  --bg-subtle: #F8F9FA;
  --bg-dark: #0F172A;
  --text-main: #111827;
  --text-muted: #6B7280;
  --border-color: #E5E7EB;
  --success: #10B981;
  --warning: #F59E0B;
  --error: #EF4444;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(15,23,42,.06);
  --shadow-md: 0 10px 25px -10px rgba(15,23,42,.15);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
::selection { background: var(--primary); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; border: 2px solid #fff; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
body {
  font-family: var(--font-body);
  color: var(--text-main);
  background: var(--bg-main);
  font-size: 16px;
  line-height: 1.6;
}
h1,h2,h3,h4,h5 { font-family: var(--font-heading); color: var(--text-main); letter-spacing: -.01em; margin: 0 0 .5em; cursor: default; }
h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; color: var(--text-main); }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
hr { border: 0; border-top: 1px solid var(--border-color); margin: 2rem 0; }

.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
.site-main { min-height: calc(100vh - 200px); padding: 2rem 0 4rem; }
.site-main.no-pad { padding: 0; }

/* ---------- Topbar ---------- */
.topbar {
  background: rgba(255,255,255,.85); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 0 rgba(15,23,42,.02);
}
.logo-img {
  height: 1em; /* Define a altura da imagem para ser igual à altura do texto */
  width: auto; /* Mantém a proporção da imagem para não ficar distorcida */
  vertical-align: middle; /* Alinha a imagem ao centro do texto */
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 2rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; font-family: var(--font-heading); font-weight: 800; font-size: 1.2rem; color: var(--text-main); }
.brand-mark { width: 38px; height: 38px; border-radius: 10px; background: var(--primary); color:#fff; display:inline-flex; align-items:center; justify-content:center; font-size:1.2rem; box-shadow: 0 4px 12px -3px rgba(0,121,194,.5); }
.brand-name span { color: var(--primary); }
.topnav { display: flex; gap: 1.5rem; align-items: center; }
.topnav a { color: var(--text-main); font-weight: 500; font-size: .95rem; padding: .25rem 0; position: relative; }
.topnav a:hover { color: var(--primary); }
.topnav a::after { content:''; position:absolute; left:0; right:0; bottom:-8px; height:2px; background: var(--primary); transform: scaleX(0); transition: transform .15s; }
.topnav a:hover::after { transform: scaleX(1); }
.topbar-actions { display: flex; gap: .75rem; align-items: center; }
.icon-btn { position: relative; width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; color: var(--text-main); background: var(--bg-subtle); transition: background .15s; }
.icon-btn:hover { background: var(--primary-soft); color: var(--primary); }
.icon-btn i { font-size: 1.3rem; }
.badge-count { position: absolute; top: -4px; right: -4px; background: var(--accent-red); color:#fff; border-radius: 999px; font-size: .65rem; padding: 2px 6px; font-weight: 700; }

/* user menu */
.user-menu { position: relative; }
.user-btn { display: inline-flex; align-items: center; gap: .5rem; background: var(--bg-subtle); border:1px solid var(--border-color); padding: .35rem .75rem .35rem .35rem; border-radius: 999px; cursor: pointer; font-family: inherit; }
.user-btn:hover { background: var(--primary-soft); border-color: var(--primary-soft); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color:#fff; display:inline-flex; align-items:center; justify-content:center; font-weight: 600; }
.user-name { font-size: .9rem; font-weight: 500; }
.umenu { position: absolute; right: 0; top: calc(100% + 8px); width: 260px; background:#fff; border:1px solid var(--border-color); border-radius: 12px; box-shadow: var(--shadow-md); padding: .5rem; display: none; }
.umenu.open { display: block; }
.umenu a, .umenu button { display: flex; align-items: center; gap: .65rem; padding: .65rem .8rem; border-radius: 8px; color: var(--text-main); width: 100%; background: none; border:0; text-align: left; cursor: pointer; font-family: inherit; font-size: .9rem; }
.umenu a:hover, .umenu button:hover { background: var(--bg-subtle); }
.umenu-head { padding: .75rem .8rem; border-bottom: 1px solid var(--border-color); margin-bottom: .25rem; }
.umenu-head strong { display: block; font-family: var(--font-heading); }
.umenu-head small { color: var(--text-muted); font-size: .8rem; }
.role-tag { display:inline-block; margin-top: .35rem; padding: .15rem .5rem; background: var(--primary-soft); color: var(--primary); border-radius: 999px; font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.umenu-logout { color: var(--accent-red); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1.25rem; border-radius: 10px; font-weight: 500; font-family: inherit; font-size: .95rem; cursor: pointer; border: 1px solid transparent; transition: background-color .15s, border-color .15s, color .15s, transform .12s, box-shadow .15s; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { position: relative; overflow: hidden; background: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(0,121,194,.25); }
.btn-primary::after {
  content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-20deg); transition: left .6s ease;
}
.btn-primary:hover::after { left: 130%; }
.btn-primary:hover { background: var(--primary-hover); color:#fff; transform: translateY(-1px); box-shadow: 0 6px 16px -4px rgba(0,121,194,.4); }
.btn-outline { background: #fff; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-soft); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text-main); }
.btn-ghost:hover { background: var(--bg-subtle); }
.btn-danger { background: var(--accent-red); color:#fff; box-shadow: 0 1px 2px rgba(230,57,70,.25); }
.btn-danger:hover { background: var(--accent-red-hover); color:#fff; transform: translateY(-1px); box-shadow: 0 6px 16px -4px rgba(230,57,70,.4); }
.btn-sm { padding: .4rem .75rem; font-size: .85rem; border-radius: 8px; }
.btn-lg { padding: .9rem 1.5rem; font-size: 1.05rem; }
.btn-block { display: flex; width: 100%; justify-content: center; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--bg-dark) 0%, #1e3a5f 100%);
  color: #fff;
  padding: 6rem 0 6.5rem;
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: url('https://images.unsplash.com/photo-1682888818620-94875adf5bb9?w=1800&q=80&auto=format&fit=crop');
  background-size: cover; background-position: center 65%;
  opacity: .34;
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(115deg, rgba(4,16,32,.96) 0%, rgba(6,26,46,.92) 32%, rgba(15,23,42,.55) 65%, rgba(15,23,42,.3) 100%);
}
.hero-glow-1, .hero-glow-2 {
  content: ''; position: absolute; border-radius: 50%; filter: blur(70px); z-index: -1; pointer-events: none;
  animation: hero-float 9s ease-in-out infinite;
}
.hero-glow-1 { width: 420px; height: 420px; top: -180px; right: 6%; background: radial-gradient(circle, rgba(110,193,255,.4), transparent 70%); }
.hero-glow-2 { width: 320px; height: 320px; bottom: -140px; left: 4%; background: radial-gradient(circle, rgba(0,121,194,.45), transparent 70%); animation-delay: -4.5s; }
@keyframes hero-float { 0%, 100% { transform: translate(0,0); } 50% { transform: translate(-18px, 22px); } }
.hero-inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.2fr 1fr; gap: 4rem; align-items: center; }
.hero h1 { color: #fff; font-size: clamp(2.5rem, 5vw, 4rem); cursor: default; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, #6ec1ff, #a8dcff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: rgba(255,255,255,.85); font-size: 1.1rem; max-width: 540px; }
.hero-cta { display:flex; gap:1rem; margin-top: 1.5rem; flex-wrap: wrap; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,.15); }
.hero-stats .stat strong { display: block; font-family: var(--font-heading); font-size: 2rem; color: #fff; font-weight: 700; }
.hero-stats .stat span { color: rgba(255,255,255,.6); font-size: .85rem; }
.hero-card { background: rgba(255,255,255,.07); backdrop-filter: blur(18px); border: 1px solid rgba(255,255,255,.16); border-radius: 20px; padding: 1.75rem; box-shadow: 0 25px 60px -20px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.08); transition: transform .3s ease; }
.hero-card:hover { transform: translateY(-4px); }
.hero-card h3 { color: #fff; }
.hero-card ul { list-style: none; padding: 0; margin: 1rem 0 0; }
.hero-card li { display: flex; align-items: center; gap: .75rem; padding: .65rem 0; color: rgba(255,255,255,.9); font-size: .95rem; border-bottom: 1px dashed rgba(255,255,255,.1); }
.hero-card li:last-child { border-bottom: 0; }
.hero-card li i { color: #6ec1ff; font-size: 1.2rem; }
@media (max-width: 900px) { .hero-inner { grid-template-columns: 1fr; gap: 2rem; } .hero-stats { grid-template-columns: 1fr 1fr; gap: 1rem; } }

/* ---------- Section ---------- */
.section { padding: 4rem 0; }
.section-head { margin-bottom: 2rem; }
.section-head .eyebrow { display: inline-flex; align-items: center; gap: .5rem; color: var(--primary); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.section-head .eyebrow::before { content: ''; width: 22px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--primary), #6ec1ff); }
.section-head h2 { margin-top: .5rem; }
.section-head p { color: var(--text-muted); max-width: 640px; }
.section-head-center { text-align: center; margin-left: auto; margin-right: auto; }
.section-head-center .eyebrow::before { display: none; }
.section-head-center p { margin-left: auto; margin-right: auto; }

/* ---------- Cards / Grids ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid-cols-auto { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
@media (max-width: 900px) { .grid-cols-3, .grid-cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-cols-3, .grid-cols-4 { grid-template-columns: 1fr; } }

.card { background: #fff; border: 1px solid var(--border-color); border-radius: 16px; padding: 1.5rem; box-shadow: var(--shadow-sm); transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease; }
.card:hover { box-shadow: 0 12px 28px -14px rgba(15,23,42,.16); }
.card-tight { padding: 1rem; }
.card-flat { box-shadow: none; }

/* category cards */
.cat-card { display: flex; align-items: center; gap: 1rem; background: #fff; border: 1px solid var(--border-color); border-radius: 14px; padding: 1.25rem; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.cat-card:hover { border-color: transparent; transform: translateY(-3px); box-shadow: 0 16px 32px -14px rgba(0,121,194,.3); }
.cat-card .cat-icon { width: 52px; height: 52px; border-radius: 13px; background: var(--primary-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem; transition: transform .25s ease, background .25s ease, color .25s ease; }
.cat-card:hover .cat-icon { background: linear-gradient(135deg, var(--primary), #6ec1ff); color: #fff; transform: scale(1.08) rotate(-3deg); }
.cat-card strong { display: block; color: var(--text-main); font-family: var(--font-heading); }
.cat-card small { color: var(--text-muted); }

/* product card */
.prod-card { position: relative; background:#fff; border: 1px solid var(--border-color); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.prod-card:hover { box-shadow: 0 22px 44px -18px rgba(0,121,194,.35); transform: translateY(-5px); border-color: rgba(0,121,194,.25); }
.prod-thumb { aspect-ratio: 4/3; background: var(--bg-subtle); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.prod-thumb img { width:100%; height:100%; object-fit: cover; transition: transform .5s ease; }
.prod-card:hover .prod-thumb img { transform: scale(1.08); }
.prod-body { padding: 1rem 1.25rem 1.25rem; display: flex; flex-direction: column; flex: 1; }
.prod-cat { color: var(--text-muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.prod-card h4 { margin: .35rem 0 .5rem; }
.prod-card .price { font-family: var(--font-heading); font-size: 1.35rem; font-weight: 800; color: var(--primary); margin-top: auto; }
.prod-card .actions { display: flex; gap: .5rem; margin-top: 1rem; }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 700px) { .form-row { grid-template-columns: 1fr; } }
.form-group label { display: block; margin-bottom: .35rem; font-weight: 500; font-size: .9rem; color: var(--text-main); }
.form-group .hint { color: var(--text-muted); font-size: .8rem; margin-top: .25rem; }
.input, .select, .textarea { width: 100%; padding: .75rem .9rem; border: 1px solid var(--border-color); border-radius: 10px; font-family: inherit; font-size: .95rem; background:#fff; color: var(--text-main); transition: border-color .15s, box-shadow .15s; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.textarea { resize: vertical; min-height: 120px; }
.select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%236B7280' d='M6 8L0 0h12z'/></svg>"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem; }
.checkbox { display: inline-flex; gap: .5rem; align-items: center; cursor: pointer; }

/* auth */
.auth-wrap { max-width: 460px; margin: 3rem auto; }
.auth-wrap .card { padding: 2rem; }
.auth-wrap h1 { font-size: 1.75rem; margin-bottom: .25rem; }
.auth-wrap .muted { color: var(--text-muted); margin-bottom: 1.5rem; }
.auth-hint { background: var(--bg-subtle); border: 1px dashed var(--border-color); border-radius: 10px; padding: .85rem 1rem; font-size: .82rem; color: var(--text-muted); margin-top: 1rem; }
.auth-hint code { background: #fff; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--border-color); font-size: .82rem; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; background:#fff; border: 1px solid var(--border-color); border-radius: 12px; }
table.table { width: 100%; border-collapse: collapse; }
table.table th, table.table td { padding: .95rem 1.1rem; text-align: left; border-bottom: 1px solid var(--border-color); font-size: .9rem; }
table.table th { background: var(--bg-subtle); color: var(--text-main); font-weight: 700; font-size: .76rem; text-transform: uppercase; letter-spacing: .07em; }
table.table tbody tr { transition: background-color .15s; }
table.table tbody tr:hover { background: var(--primary-soft); }
table.table tbody tr:last-child td { border-bottom: 0; }

/* badges */
.badge { display: inline-flex; align-items: center; padding: .25rem .65rem; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.badge.ok { background: #DCFCE7; color: #15803D; }
.badge.warn { background: #FEF3C7; color: #B45309; }
.badge.info { background: var(--primary-soft); color: var(--primary); }
.badge.danger { background: #FEE2E2; color: #B91C1C; }

/* ---------- Layout - Dashboard ---------- */
.dash { display: grid; grid-template-columns: 240px 1fr; gap: 0; min-height: calc(100vh - 72px); }
@media (max-width: 900px) { .dash { grid-template-columns: 1fr; } .dash-side { display: none; } }
.dash-side { background: var(--bg-subtle); border-right: 1px solid var(--border-color); padding: 1.5rem 1rem; }
.dash-side h5 { font-family: var(--font-heading); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); padding: 0 .75rem; margin: 1.25rem 0 .5rem; }
.dash-side a { display: flex; align-items: center; gap: .65rem; padding: .65rem .85rem; border-radius: 8px; color: var(--text-main); font-size: .9rem; font-weight: 500; position: relative; transition: background-color .15s, color .15s, transform .12s; }
.dash-side a:hover { background: #fff; color: var(--primary); transform: translateX(2px); }
.dash-side a.active { background: var(--primary); color: #fff; box-shadow: 0 4px 12px -4px rgba(0,121,194,.45); }
.dash-side a.active::before { content:''; position:absolute; left:-1rem; top:50%; transform:translateY(-50%); width:4px; height:60%; background: var(--primary-hover); border-radius: 0 4px 4px 0; }
.dash-side a.active i { color: #fff; }
.dash-side a i { color: var(--text-muted); font-size: 1.1rem; transition: color .15s; }
.dash-main { padding: 2rem; }
.dash-head { display: flex; justify-content: space-between; align-items: end; margin-bottom: 1.75rem; gap: 1rem; flex-wrap: wrap; }
.dash-head h1 { font-size: 1.85rem; margin: 0; }
.dash-head p { color: var(--text-muted); margin: 0; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; margin-bottom: 2rem; }
@media (max-width: 1100px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
.kpi {
  position: relative; overflow: hidden;
  background: #fff; border: 1px solid var(--border-color); border-radius: 16px; padding: 1.35rem 1.4rem;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
  display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem;
}
.kpi::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), #6ec1ff); opacity: 0; transition: opacity .2s;
}
.kpi:hover { box-shadow: 0 14px 32px -12px rgba(0,121,194,.28); transform: translateY(-3px); border-color: rgba(0,121,194,.25); }
.kpi:hover::before { opacity: 1; }
.kpi .label { color: var(--text-muted); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.kpi .value { font-family: var(--font-heading); font-size: 1.95rem; font-weight: 800; margin-top: .3rem; letter-spacing: -.02em; color: var(--text-main); }
.kpi .trend { font-size: .82rem; color: var(--text-muted); margin-top: .3rem; }
.kpi .trend.up { color: var(--success); }
.kpi .trend.down { color: var(--accent-red); }
.kpi .kpi-icon { width: 46px; height: 46px; flex-shrink:0; border-radius: 13px; background: var(--primary-soft); color: var(--primary); display:inline-flex; align-items:center; justify-content:center; font-size:1.35rem; box-shadow: 0 6px 14px -6px rgba(0,121,194,.35); transition: transform .2s ease; }
.kpi:hover .kpi-icon { transform: scale(1.08) rotate(-4deg); }

/* ---------- Filters / chips ---------- */
.filter-bar { background:#fff; border:1px solid var(--border-color); border-radius: 12px; padding: 1rem 1.25rem; margin-bottom: 1.5rem; display: flex; gap: .85rem; align-items: center; flex-wrap: wrap; }
.filter-bar .input, .filter-bar .select { width: auto; }
.filter-bar .f-search { flex: 1 1 220px; min-width: 200px; }
.filter-bar .f-search { padding-left: 2.4rem; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 256 256'><path fill='%236B7280' d='M229.66 218.34l-50.07-50.06a88.11 88.11 0 1 0-11.31 11.31l50.06 50.07a8 8 0 0 0 11.32-11.32ZM40 112a72 72 0 1 1 72 72a72.08 72.08 0 0 1-72-72Z'/></svg>"); background-repeat: no-repeat; background-position: .85rem center; background-size: 16px; }
.filter-bar .f-select { flex: 0 0 auto; min-width: 160px; }
.filter-bar .f-count { color: var(--text-muted); font-size: .8rem; white-space: nowrap; }
.filter-empty { display:none; text-align:center; color: var(--text-muted); padding: 2rem 1rem; background:#fff; border:1px dashed var(--border-color); border-radius: 12px; margin-top: .75rem; }
.filter-empty i { display:block; font-size: 1.6rem; margin-bottom: .35rem; color: var(--border-color); }
.chips { display: flex; gap: .5rem; flex-wrap: wrap; }
.chip { padding: .35rem .85rem; border-radius: 999px; background: var(--bg-subtle); color: var(--text-main); font-size: .85rem; font-weight: 500; border:1px solid var(--border-color); }
.chip.active, .chip:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- Cart ---------- */
.cart-wrap { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; }
@media (max-width: 900px) { .cart-wrap { grid-template-columns: 1fr; } }
.cart-item { display: grid; grid-template-columns: 100px 1fr auto; gap: 1rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--border-color); }
.cart-item:last-child { border-bottom: 0; }
.cart-item img { width: 100px; height: 100px; object-fit: cover; border-radius: 10px; background: var(--bg-subtle); }
.cart-summary { background: var(--bg-subtle); border: 1px solid var(--border-color); border-radius: 12px; padding: 1.5rem; position: sticky; top: 90px; align-self: start; }
.summary-line { display:flex; justify-content:space-between; padding: .5rem 0; color: var(--text-muted); }
.summary-line.total { font-weight: 700; color: var(--text-main); border-top: 1px solid var(--border-color); padding-top: .75rem; margin-top: .5rem; font-size: 1.1rem; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; }
.qty button { border:0; background:#fff; padding: .35rem .65rem; cursor: pointer; font-family: inherit; font-size: 1rem; }
.qty span { padding: 0 .75rem; min-width: 30px; text-align: center; }

/* ---------- Product page ---------- */
.product-page { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; }
@media (max-width: 900px) { .product-page { grid-template-columns: 1fr; } }
.product-img { background: var(--bg-subtle); border-radius: 14px; overflow:hidden; aspect-ratio: 4/3; }
.product-img img { width: 100%; height:100%; object-fit: cover; }
.product-info .badge-row { display:flex; gap: .5rem; margin-bottom: 1rem; }
.product-info h1 { font-size: 2.2rem; margin-bottom: .5rem; }
.product-info .price { font-family: var(--font-heading); font-size: 2rem; font-weight: 700; color: var(--primary); margin: 1rem 0; }
.product-tabs { margin-top: 2rem; border-top: 1px solid var(--border-color); padding-top: 1.5rem; }
.specs-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem 1.5rem; list-style: none; padding: 0; margin: 0; }
.specs-list li { display: flex; align-items: center; gap: .5rem; padding: .5rem 0; border-bottom: 1px dashed var(--border-color); color: var(--text-main); font-size: .9rem; }
.specs-list li i { color: var(--primary); }

/* ---------- Toaster ---------- */
.toaster { position: fixed; top: 86px; right: 20px; z-index: 100; display: flex; flex-direction: column; gap: .5rem; }
.toast { display:flex; align-items:center; gap:.75rem; padding: .85rem 1.1rem; background:#fff; border:1px solid var(--border-color); border-radius: 10px; box-shadow: var(--shadow-md); min-width: 260px; font-size: .9rem; animation: slidein .25s ease; }
.toast.toast-ok i { color: var(--success); }
.toast.toast-err i { color: var(--accent-red); }
.toast i { font-size: 1.2rem; }
@keyframes slidein { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ---------- Footer ---------- */
.site-footer { position: relative; background: var(--bg-dark); color: rgba(255,255,255,.75); padding: 4rem 0 1rem; margin-top: 4rem; }
.site-footer::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--primary), #6ec1ff, var(--primary)); }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 2rem; }
@media (max-width: 900px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-col h4 { color: #fff; margin-bottom: 1rem; font-size: 1rem; }
.footer-col a { display: block; color: rgba(255,255,255,.65); padding: .25rem 0; font-size: .9rem; }
.footer-col p { display: block; color: rgba(255,255,255,.65); padding: .25rem 0; font-size: .9rem; }
.footer-col a:hover { color: #fff; }
.footer-col .brand { color: #fff; }
.footer-col .brand-name { color: #fff; }
.footer-col .brand-name span { color: #6ec1ff; }
.footer-social { display: flex; gap: .6rem; margin-top: 1.25rem; }
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
  color: rgba(255,255,255,.8); font-size: 1.15rem; padding: 0;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}
.footer-social a:hover { background: var(--primary); border-color: var(--primary); color: #fff; transform: translateY(-2px); }
.footer-col .brand-mark { background: var(--primary); }
.footer-tag { color: rgba(255,255,255,.55); font-size: .9rem; margin-top: 1rem; }
.footer-bottom { display: flex; justify-content: space-between; padding-top: 2rem; margin-top: 3rem; border-top: 1px solid rgba(255,255,255,.1); color: rgba(255,255,255,.4); font-size: .8rem; }
@media (max-width: 700px) { .footer-bottom { flex-direction: column; gap: .5rem; } }

/* ---------- Empty / misc ---------- */
.empty-state { text-align: center; padding: 4rem 1rem; }
.empty-state h1 { font-size: 3rem; margin-bottom: .5rem; }
.empty-state p { color: var(--text-muted); margin-bottom: 1.5rem; }
.tag-list { display: flex; gap: .5rem; flex-wrap: wrap; }
.muted { color: var(--text-muted); }
.spacer-md { height: 2rem; }
.divider { border-top: 1px solid var(--border-color); margin: 1.5rem 0; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.flex { display: flex; align-items: center; gap: .5rem; }
.flex-between { display:flex; justify-content: space-between; align-items: center; }
.gap-2 { gap: .5rem; } .gap-4 { gap: 1rem; }

/* report bar chart (CSS-only) */
.bars { display:flex; align-items: flex-end; gap: .75rem; height: 220px; padding: 1rem; border:1px solid var(--border-color); border-radius: 12px; background: #fff; }
.bars .bar { flex: 1; background: linear-gradient(180deg, var(--primary), var(--primary-hover)); border-radius: 8px 8px 0 0; min-width: 24px; position: relative; transition: transform .15s; }
.bars .bar:hover { transform: translateY(-3px); }
.bars .bar span { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); font-size: .75rem; color: var(--text-main); font-weight: 600; white-space: nowrap; }
.bars .bar small { position: absolute; bottom: -24px; left: 50%; transform: translateX(-50%); font-size: .7rem; color: var(--text-muted); white-space: nowrap; }

.steps { display: flex; gap: .5rem; margin: 2rem 0 1.5rem; flex-wrap: wrap; }
.step { flex: 1; min-width: 120px; padding: .5rem .9rem; border: 1px solid var(--border-color); border-radius: 10px; font-size: .85rem; color: var(--text-muted); background: #fff; display: flex; align-items: center; gap: .5rem; }
.step.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.step.done { border-color: var(--success); background: #DCFCE7; color: #15803D; }
.step .num { width: 24px; height: 24px; border-radius: 50%; background: var(--bg-subtle); color: var(--text-muted); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; }
.step.active .num { background: var(--primary); color: #fff; }
.step.done .num { background: var(--success); color: #fff; }

/* ---------- Home: Why choose us (image split) ---------- */
.why-split { display: grid; grid-template-columns: .95fr 1.05fr; gap: 3.5rem; align-items: center; }
@media (max-width: 900px) { .why-split { grid-template-columns: 1fr; gap: 2rem; } }
.why-img-wrap { position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 4/4.3; box-shadow: var(--shadow-md); }
.why-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.why-img-badge {
  position: absolute; left: 1.25rem; bottom: 1.25rem; right: 1.25rem;
  background: rgba(15,23,42,.72); backdrop-filter: blur(10px);
  border-radius: 14px; padding: 1rem 1.25rem; color: #fff;
  display: flex; align-items: center; gap: .85rem;
}
.why-img-badge i { font-size: 1.6rem; color: #6ec1ff; flex-shrink: 0; }
.why-img-badge strong { display: block; font-family: var(--font-heading); font-size: 1.05rem; }
.why-img-badge span { color: rgba(255,255,255,.75); font-size: .82rem; }
.why-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: 1rem; }
@media (max-width: 560px) { .why-cards { grid-template-columns: 1fr; } }
.why-card { display: flex; gap: .9rem; align-items: flex-start; }
.why-card .why-icon {
  width: 46px; height: 46px; flex-shrink: 0; border-radius: 12px;
  background: var(--primary-soft); color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.35rem;
}
.why-card h4 { margin: 0 0 .25rem; font-size: 1rem; }
.why-card p { margin: 0; color: var(--text-muted); font-size: .88rem; line-height: 1.5; }

/* ---------- Home: CTA banner ---------- */
.cta-banner {
  position: relative; overflow: hidden; border-radius: 24px;
  padding: 4rem 2.5rem; text-align: center; color: #fff;
  background: linear-gradient(135deg, #06192e 0%, #0d3352 55%, #0a2740 100%);
}
.cta-banner::before {
  content: ''; position: absolute; inset: 0;
  background-image: url('https://images.unsplash.com/photo-1739598752069-6806ce5d762a?w=1800&q=80&auto=format&fit=crop');
  background-size: cover; background-position: center; opacity: .32;
}
.cta-banner::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(6,25,46,.92) 0%, rgba(13,51,82,.75) 55%, rgba(10,39,64,.92) 100%);
}
.cta-banner-inner { position: relative; z-index: 2; max-width: 620px; margin: 0 auto; }
.cta-banner h2 { color: #fff; margin-bottom: .75rem; }
.cta-banner p { color: rgba(255,255,255,.82); margin-bottom: 2rem; }
.cta-banner .hero-cta { justify-content: center; margin-top: 0; }

/* Sidebar and brand chips */
.chip-brand { display: flex; align-items: center; font-weight: 500; font-size: .9rem; transition: all .15s !important; }
.chip-brand:hover { background: var(--primary-soft) !important; color: var(--primary) !important; border-color: var(--primary) !important; }
.chip-brand.active { background: var(--primary) !important; color: #fff !important; border-color: var(--primary) !important; font-weight: 600; }

/* ═══════════════════════════════════════════════════════════
   Dashboards analíticos — Admin / Cliente / CAT / Loja
   Look premium em tons de azul Meireles, com profundidade e movimento.
   ═══════════════════════════════════════════════════════════ */

.dash-main { position: relative; }
.dash-main::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(circle, rgba(0,121,194,.07) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.6) 0%, transparent 420px);
          mask-image: linear-gradient(180deg, rgba(0,0,0,.6) 0%, transparent 420px);
}
.dash-main > * { position: relative; z-index: 1; }

/* ---------- Dashboard hero headers (per role) ---------- */
.dash-hero {
  position: relative; overflow: hidden;
  display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap;
  color: #fff; padding: 2.25rem 2.25rem; border-radius: 22px; margin-bottom: 2rem;
  isolation: isolate;
}
.dash-hero::before, .dash-hero::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(50px); z-index: -1; pointer-events: none;
}
.dash-hero::before { width: 340px; height: 340px; top: -160px; right: -60px; background: radial-gradient(circle, rgba(110,193,255,.55), transparent 70%); }
.dash-hero::after  { width: 260px; height: 260px; bottom: -140px; left: 10%; background: radial-gradient(circle, rgba(56,189,248,.35), transparent 70%); }
.dash-hero-content { position: relative; z-index: 1; }
.dash-hero h1 { color: #fff; margin: 0; font-size: 1.7rem; display: flex; align-items: center; gap: .65rem; font-family: var(--font-heading); }
.dash-hero h1 i { -webkit-background-clip: text; }
.dash-hero p { color: rgba(255,255,255,.8); margin: .5rem 0 0; max-width: 480px; font-size: .95rem; }

.dash-hero-admin  { background: linear-gradient(135deg, #0B1424 0%, #14243D 55%, #0F172A 100%); box-shadow: 0 16px 36px -10px rgba(15,23,42,.35); }
.dash-hero-cliente{ background: linear-gradient(135deg, #026AA7 0%, #0284C7 55%, #05A8E8 100%); box-shadow: 0 16px 36px -10px rgba(2,132,199,.35); }
.dash-hero-cat    { background: linear-gradient(135deg, #001B31 0%, #003A66 55%, #0067A5 100%); box-shadow: 0 16px 36px -10px rgba(0,103,165,.35); }
.dash-hero-loja   { background: linear-gradient(135deg, #003156 0%, #004578 45%, #0091D5 100%); box-shadow: 0 16px 36px -10px rgba(0,174,239,.35); }

.hero-pill { display: flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 600; color: #fff; background: rgba(255,255,255,.14); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.18); padding: 9px 18px; border-radius: 30px; position: relative; z-index: 1; }

.filter-pills { display: flex; gap: 6px; align-items: center; background: rgba(255,255,255,.1); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.14); padding: 5px 10px; border-radius: 30px; position: relative; z-index: 1; }
.filter-pills span { font-size: .8rem; color: rgba(255,255,255,.65); margin-right: 2px; }
.pill-btn { background: transparent; border: none; color: #CBD5E1; font-weight: 600; padding: 6px 14px; border-radius: 20px; cursor: pointer; font-size: .8rem; transition: all .15s; font-family: inherit; }
.pill-btn:hover { color: #fff; background: rgba(255,255,255,.12); }
.pill-btn.active { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(0,121,194,.4); }

/* ---------- Chart cards ---------- */
.chart-card-title { font-size: 1.02rem; font-weight: 700; margin-bottom: 1.2rem; color: var(--text-main); display: flex; align-items: center; gap: .65rem; font-family: var(--font-heading); }
.chart-card-title i { color: var(--primary); background: var(--primary-soft); width: 32px; height: 32px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.05rem; flex-shrink: 0; }
.insight-box { margin-top: 1rem; font-size: .85rem; color: var(--text-main); background: linear-gradient(135deg, var(--primary-soft) 0%, #fff 100%); padding: .95rem 1.2rem; border-radius: 12px; border-left: 4px solid var(--primary); line-height: 1.55; }
.btn-rollup {
  display: none; position: absolute; top: 1.5rem; right: 1.5rem; z-index: 10;
  background: var(--primary); color: #fff; border: none; padding: .45rem .9rem;
  border-radius: 8px; font-size: .78rem; font-weight: 600; cursor: pointer; align-items: center; gap: .4rem;
  box-shadow: 0 4px 12px rgba(0,121,194,.3); font-family: inherit; transition: background .15s;
}
.btn-rollup:hover { background: var(--primary-hover); }
.card-relative { position: relative; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal-stagger.in-view > * { animation: reveal-pop .5s ease both; }
.reveal-stagger.in-view > *:nth-child(1) { animation-delay: .03s; }
.reveal-stagger.in-view > *:nth-child(2) { animation-delay: .09s; }
.reveal-stagger.in-view > *:nth-child(3) { animation-delay: .15s; }
.reveal-stagger.in-view > *:nth-child(4) { animation-delay: .21s; }
.reveal-stagger.in-view > *:nth-child(5) { animation-delay: .27s; }
.reveal-stagger.in-view > *:nth-child(6) { animation-delay: .33s; }
@keyframes reveal-pop { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-stagger > * { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
}

/* ---------- Auth split screen ---------- */
.auth-split { min-height: 640px; display: grid; grid-template-columns: 1fr 1fr; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-md); max-width: 1180px; margin: 1rem auto; }
@media (max-width: 900px) { .auth-split { grid-template-columns: 1fr; margin: 0 -1.5rem; border-radius: 0; box-shadow: none; } .auth-split-side { display: none; } }
.auth-split-side {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, var(--bg-dark) 0%, #1e3a5f 100%);
  display: flex; flex-direction: column; justify-content: center; padding: 4rem;
}
.auth-split-side::before {
  content: ''; position: absolute; inset: 0;
  background-image: url('https://images.unsplash.com/photo-1556911220-e15b29be8c8f?w=1400&q=80&auto=format&fit=crop');
  background-size: cover; background-position: center; opacity: .28;
}
.auth-split-side::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(4,16,32,.94) 0%, rgba(6,26,46,.9) 45%, rgba(15,23,42,.55) 100%);
}
.auth-split-inner { position: relative; z-index: 2; max-width: 420px; }
.auth-split-inner h2 { color: #fff; font-size: 2rem; }
.auth-split-inner p { color: rgba(255,255,255,.78); }
.auth-split-inner ul { list-style: none; padding: 0; margin: 2rem 0 0; }
.auth-split-inner li { display: flex; align-items: center; gap: .75rem; padding: .65rem 0; color: rgba(255,255,255,.9); font-size: .95rem; border-bottom: 1px dashed rgba(255,255,255,.12); }
.auth-split-inner li:last-child { border-bottom: 0; }
.auth-split-inner li i { color: #6ec1ff; font-size: 1.2rem; }
.auth-split-form { display: flex; align-items: center; justify-content: center; padding: 2rem 1.5rem; }
.auth-split-form .auth-wrap { margin: 0; width: 100%; }

/* ==========================================================================
   MEIRELES CONNECT — RESPONSIVO MOBILE (Ecrãs até 900px)
   ========================================================================== */
@media (max-width: 900px) {
  
  .topbar-inner {
    height: auto;
    padding: 1rem 1rem 0.5rem 1rem;
    gap: 0.75rem;
    flex-direction: column; /* Força os elementos a ficarem em coluna */
    align-items: center;    /* Centra tudo perfeitamente */
  }

  /* 1. Logótipo */
  .brand {
    margin: 0;
    justify-content: center;
  }

  /* 2. Botões de Ação (Idioma, Carrinho, Login) */
  .topbar-actions {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap; 
    gap: 0.5rem;
  }

  /* Diminui ligeiramente os botões para não ocuparem tanto espaço */
  .topbar-actions .btn {
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
  }
  .icon-btn {
    width: 38px;
    height: 38px;
  }
  .user-name {
    display: none; /* Esconde o nome se o utilizador tiver sessão iniciada, fica só a inicial */
  }

  /* 3. Menu de Navegação (Links) */
  .topnav {
    width: 100%;
    justify-content: center; /* Centra os links */
    flex-wrap: nowrap; /* Não deixa os links quebrarem de linha */
    overflow-x: auto;  /* Permite arrastar para o lado com o dedo se faltar espaço */
    -webkit-overflow-scrolling: touch;
    gap: 1.25rem;
    padding-top: 0.85rem;
    padding-bottom: 0.5rem;
    border-top: 1px solid var(--border-color); /* Cria uma linha fina a separar os links dos botões */
  }

  /* Esconde a barra de scroll horizontal feia nos telemóveis */
  .topnav::-webkit-scrollbar {
    display: none;
  }
}