/* ============================================================
   UniCaronas — Design System Moderno
   Tema: Dark & Refined | DM Sans | Sem emojis
   ============================================================ */

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

:root {
  --bg:           #0a0a0f;
  --bg-2:         #111118;
  --bg-3:         #16161e;
  --surface:      #1c1c25;
  --surface-2:    #22222c;
  --border:       #2a2a38;
  --border-2:     #333345;

  --text:         #f0f0f5;
  --text-2:       #a0a0b8;
  --text-3:       #55556a;

  --accent:       #6c63ff;
  --accent-2:     #8b84ff;
  --accent-glow:  rgba(108,99,255,.22);
  --green:        #22d3a0;
  --green-dim:    rgba(34,211,160,.1);
  --red:          #ff5c5c;
  --red-dim:      rgba(255,92,92,.1);
  --amber:        #f5a623;

  --font:         'DM Sans', sans-serif;
  --font-mono:    'DM Mono', monospace;

  --radius-sm:    6px;
  --radius:       10px;
  --radius-lg:    16px;
  --radius-xl:    24px;

  --shadow:       0 1px 4px rgba(0,0,0,.5);
  --shadow-md:    0 8px 32px rgba(0,0,0,.6);
  --shadow-accent:0 0 40px var(--accent-glow);
  --nav-bg:       rgba(10,10,15,.9);
/* Logos Dinâmicas */
--logo-url: url('../img/logo_escuro.png');
}

/* ── Modo Claro ───────────────────────────────────────────── */
[data-theme="light"] {
--bg:           #f4f4f9;
--bg-2:         #ffffff;
--bg-3:         #ebebf5;
--surface:      #ffffff;
--surface-2:    #f8f9fd;
--border:       #e2e2ee;
--border-2:     #d1d1e0;
--nav-bg:       rgba(255,255,255,.85);

--text:         #1a1a2e;
--text-2:       #4a4a68;
--text-3:       #8e8eaf;

--accent:       #5a52d5;
--accent-2:     #4840c0;
--accent-glow:  rgba(90,82,213,.12);

--shadow:       0 2px 8px rgba(0,0,0,.04);
--shadow-md:    0 12px 32px rgba(0,0,0,.06);
--shadow-accent:0 0 30px rgba(90,82,213,.15);

--logo-url: url('../img/logo_claro.png');
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 99px; }

a { color: var(--accent-2); text-decoration: none; transition: color .2s; }
a:hover { color: var(--text); }

/* ── Layout ───────────────────────────────────────────────── */
.container { max-width: 1100px; width: 100%; margin: 0 auto; padding: 0 2rem; }
main.container {
  flex: 1;
  padding-top: 2rem;
  padding-bottom: 4rem;
}

@media (max-width: 768px) {
  .container { padding: 0 1rem; }
}

/* ── Navbar ───────────────────────────────────────────────── */
.navbar {
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 1.1rem 0;
  position: sticky; top: 0; z-index: 200;
  transition: background 0.3s, padding 0.3s;
}
.navbar .container { 
  display: flex; 
  align-items: center; 
  justify-content: space-between;
  gap: 1.5rem;
}

.navbar-brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: opacity .2s;
  flex-shrink: 0;
}
.navbar-brand-wrap:hover { opacity: 0.85; }

.navbar-brand-img {
  width: 44px;
  height: 44px;
  background-image: var(--logo-url);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.navbar-brand-text {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -.6px;
  color: var(--text);
  line-height: 1;
  margin-top: 2px;
}
.navbar-brand-text span { color: var(--accent-2); }

.navbar-links { 
  display: flex; 
  gap: 2.2rem; 
  align-items: center; 
  list-style: none;
  padding: 0;
  margin: 0;
  margin-left: auto;
}
.navbar-links a {
  color: var(--text-3); font-size: .85rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; transition: color .2s;
  white-space: nowrap;
}
.navbar-links a:hover, .navbar-links a.active { color: var(--text); }

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-left: 0;
}

/* ── Lang Dropdown ────────────────────────────────────────── */
.lang-dropdown {
  position: relative;
}
.lang-toggle {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  height: 40px;
  padding: 0 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s;
  text-transform: uppercase;
}
.lang-toggle:hover {
  background: var(--surface);
  border-color: var(--accent);
  color: var(--text);
}
.lang-toggle::after {
  content: '';
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  margin-top: 1px;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  min-width: 130px;
  padding: 0.4rem;
  box-shadow: var(--shadow-md);
  display: none;
  flex-direction: column;
  gap: 0.2rem;
  z-index: 300;
  animation: fadeUp 0.2s ease-out;
}
.lang-dropdown:hover .lang-menu {
  display: flex;
}
.lang-item {
  background: transparent;
  border: none;
  color: var(--text-2);
  padding: 0.6rem 0.85rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}
.lang-item:hover {
  background: var(--bg-3);
  color: var(--text);
}
.lang-item.active {
  color: var(--accent-2);
}

/* ── Avatar Dropdown ───────────────────────────────────────── */
.user-dropdown {
  position: relative;
  display: inline-block;
}

.avatar-trigger {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #534AB7;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  user-select: none;
}

.user-dropdown.active .avatar-trigger {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  width: 240px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  display: none;
  flex-direction: column;
  z-index: 400;
  overflow: hidden;
  animation: fadeUp 0.2s ease-out;
}

.user-dropdown.active .dropdown-menu {
  display: flex;
}

.menu-header {
  padding: 1.25rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.header-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: #534AB7;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.header-info {
  min-width: 0;
}

.header-name {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-email {
  display: block;
  font-size: 0.75rem;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.menu-list {
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  color: var(--text-2);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.menu-item:hover {
  background: var(--bg-3);
  color: var(--text);
}

.menu-divider {
  height: 1px;
  background: var(--border);
  margin: 0.4rem 0;
}

.menu-item.logout {
  color: var(--red);
}

.menu-item.logout:hover {
  background: var(--red-dim);
}

.theme-toggle {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s;
}
.theme-toggle:hover {
  background: var(--surface);
  color: var(--text);
  border-color: var(--accent);
}
.theme-toggle svg { width: 20px; height: 20px; }

/* Padronização de botões na navbar-actions */
.navbar-actions .btn-sm {
  height: 40px;
  padding: 0 1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (max-width: 992px) {
  .navbar-links { gap: 1rem; }
}

/* ── Botões ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .58rem 1.3rem; border-radius: var(--radius-sm);
  border: none; cursor: pointer; font-family: var(--font);
  font-size: .85rem; font-weight: 600; letter-spacing: .03em;
  transition: all .18s; white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary  { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); box-shadow: var(--shadow-accent); }
.btn-ghost {
  background: transparent; color: var(--text-2);
  border: 1px solid var(--border-2);
}
.btn-ghost:hover { background: var(--surface); color: var(--text); }
.btn-success  { background: var(--green); color: #0a0a0f; font-weight: 700; }
.btn-success:hover { filter: brightness(1.08); }
.btn-danger   { background: var(--red-dim); color: var(--red); border: 1px solid rgba(255,92,92,.2); }
.btn-danger:hover { background: rgba(255,92,92,.18); }
.btn-danger-outline { background: transparent; color: var(--red); border: 1px solid var(--red); opacity: 0.7; }
.btn-danger-outline:hover { background: var(--red-dim); opacity: 1; }
.btn-sm       { padding: .38rem .85rem; font-size: .8rem; }
.btn-full     { width: 100%; justify-content: center; }

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}
.card-title {
  font-size: .7rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-3); margin-bottom: 1.1rem;
}

/* ── Forms ────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.15rem; }
.form-label {
  display: block; font-size: .75rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: .45rem;
}
.form-control {
  width: 100%; padding: .68rem 1rem;
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-family: var(--font); font-size: .93rem;
  transition: border-color .2s, box-shadow .2s; outline: none;
}
.form-control::placeholder { color: var(--text-3); }
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-hint { font-size: .76rem; color: var(--text-3); margin-top: .35rem; }

/* ── Badge ────────────────────────────────────────────────── */
.badge {
  display: inline-block; padding: .2rem .65rem;
  border-radius: 99px; font-size: .7rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
}
.badge-green  { background: var(--green-dim);  color: var(--green); }
.badge-red    { background: var(--red-dim);    color: var(--red); }
.badge-accent { background: var(--accent-glow); color: var(--accent-2); }
.badge-muted  { background: var(--bg-3); color: var(--text-3); }

/* ── Carona Card ──────────────────────────────────────────── */
.carona-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem;
  transition: border-color .2s, transform .22s;
  display: flex; flex-direction: column;
}
.carona-card:hover { border-color: var(--border-2); transform: translateY(-2px); }

.carona-rota { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.1rem; }
.carona-rota .local { font-size: .98rem; font-weight: 600; }
.route-line {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--border-2) 0%, transparent 100%);
  position: relative;
}
.route-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
}

.carona-meta { display: flex; gap: 2rem; flex-wrap: wrap; margin-bottom: 1.25rem; flex: 1; }
.meta-item { display: flex; flex-direction: column; gap: .1rem; }
.meta-label { font-size: .67rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.meta-value { font-size: .88rem; color: var(--text-2); font-weight: 500; }

.carona-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 1.1rem; border-top: 1px solid var(--border);
}
.preco-label { font-size: .67rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin-bottom: .1rem; }
.preco-valor { font-size: 1.35rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }

/* ── Avatar ───────────────────────────────────────────────── */
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #22d3a0);
  color: #fff; display: flex; align-items: center;
  justify-content: center; font-weight: 700; font-size: .82rem; flex-shrink: 0;
}
.avatar-lg { width: 52px; height: 52px; font-size: 1.1rem; }
.user-row { display: flex; align-items: center; gap: .75rem; }
.user-name { font-size: .9rem; font-weight: 600; color: var(--text); }
.user-rating { font-size: .76rem; color: var(--text-3); font-family: var(--font-mono); }
.stars { color: var(--amber); font-size: .78rem; }

/* ── Stats ────────────────────────────────────────────────── */
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.4rem 1.6rem;
  min-height: 110px;
  display: flex; flex-direction: column; justify-content: center;
}
.stat-num {
  font-size: 2.1rem; font-weight: 700; color: var(--text);
  line-height: 1; font-variant-numeric: tabular-nums; margin-bottom: .3rem;
}
.stat-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); }

/* ── Chat ─────────────────────────────────────────────────── */
.chat-wrap {
  display: flex; flex-direction: column; height: 440px;
  border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border);
}
.chat-messages {
  flex: 1; overflow-y: auto; padding: 1.25rem;
  display: flex; flex-direction: column; gap: .85rem; background: var(--bg-2);
}
.mensagem { max-width: 72%; }
.mensagem.minha { align-self: flex-end; }
.mensagem-bubble {
  padding: .65rem 1rem; border-radius: var(--radius);
  font-size: .88rem; line-height: 1.55;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2);
}
.mensagem.minha .mensagem-bubble { background: var(--accent); border-color: transparent; color: #fff; }
.mensagem-hora { font-size: .68rem; color: var(--text-3); margin-top: .28rem; font-family: var(--font-mono); }
.mensagem.minha .mensagem-hora { text-align: right; }
.chat-input {
  display: flex; gap: .6rem; padding: .85rem 1rem;
  background: var(--surface); border-top: 1px solid var(--border);
}
.chat-input .form-control { background: var(--bg-3); }

/* ── Sugestão de preço ────────────────────────────────────── */
.price-suggestion {
  background: var(--accent-glow); border: 1px solid rgba(108,99,255,.25);
  border-radius: var(--radius-sm); padding: 1rem 1.2rem; margin-bottom: 1.2rem;
}
.price-suggestion .suggested-value {
  font-size: 1.75rem; font-weight: 700; color: var(--accent-2);
  font-variant-numeric: tabular-nums;
}
.price-suggestion p { font-size: .78rem; color: var(--text-3); margin-top: .2rem; }

/* ── Info rows ────────────────────────────────────────────── */
.info-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: .75rem 0; border-bottom: 1px solid var(--border); font-size: .9rem;
}
.info-row:last-child { border: none; padding-bottom: 0; }
.info-row .label { color: var(--text-3); font-size: .82rem; }
.info-row .value { font-weight: 600; color: var(--text); }

/* ── Filtros ──────────────────────────────────────────────── */
.filtros {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.2rem 1.5rem; margin: 1.5rem 0;
}
.filtros-grid { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 1.25rem; align-items: end; }

/* ── Page header ──────────────────────────────────────────── */
.page-header { padding: 2.5rem 0 1.5rem; }
.page-header h2 { font-size: 1.55rem; font-weight: 700; letter-spacing: -.4px; }
.page-header p { color: var(--text-2); margin-top: .3rem; font-size: .9rem; }

/* ── Divider ──────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 1.5rem 0; }

/* ── Alert ────────────────────────────────────────────────── */
.alert { padding: .8rem 1rem; border-radius: var(--radius-sm); font-size: .87rem; margin-bottom: 1rem; border: 1px solid; white-space: pre-wrap; }
.alert-success { background: var(--green-dim); color: var(--green); border-color: rgba(34,211,160,.2); }
.alert-error   { background: var(--red-dim);   color: var(--red);   border-color: rgba(255,92,92,.2); }

/* ── Empty state ──────────────────────────────────────────── */
.empty-state { text-align: center; padding: 4rem 2rem; color: var(--text-3); }
.empty-state p { font-size: .88rem; }

/* ── Animações ────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up   { animation: fadeUp .3s ease both; }
.fade-up-1 { animation-delay: .06s; }
.fade-up-2 { animation-delay: .12s; }
.fade-up-3 { animation-delay: .18s; }

/* ── Helpers ──────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; }
.mt-1{margin-top:.5rem} .mt-2{margin-top:1rem} .mt-3{margin-top:1.5rem}
.mb-1{margin-bottom:.5rem} .mb-2{margin-bottom:1rem}
.text-center{text-align:center} .text-muted{color:var(--text-3);font-size:.88rem}
.flex{display:flex} .gap-1{gap:.5rem} .gap-2{gap:1rem}

/* --- RESPONSIVIDADE GLOBAL --- */

.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  z-index: 201;
}

.navbar-toggle span {
  width: 25px;
  height: 2px;
  background-color: var(--text);
  border-radius: 2px;
  transition: 0.3s;
}

@media (max-width: 992px) {
  .detalhe-layout { grid-template-columns: 1fr; }
  .navbar-links { gap: 1rem; }
}

@media (max-width: 900px) {
  .filtros-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .navbar .container { 
    justify-content: flex-start;
    gap: 1rem;
  }

  .navbar-toggle { display: flex; }
  
  .navbar-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--surface);
    flex-direction: column;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    z-index: 200;
  }

  .navbar-links.active { display: flex; }

  .navbar-links li {
    width: 100%;
    text-align: center;
  }

  .navbar-links a {
    display: block;
    padding: 12px;
    font-size: .9rem;
    white-space: normal;
  }

  .card { padding: 1.25rem; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .container { padding: 0 1rem; }

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

  .carona-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .msg-layout { grid-template-columns: 1fr; }
  .msg-lista { display: none; }
  .msg-chat { display: flex; }
  .chat-open .msg-lista { display: none; }
  .chat-open .msg-chat { display: flex; }
}

@media (max-width: 600px) {
  .filtros-grid .btn { width: 100%; }
  .avaliacao-rota { margin-left: 0 !important; margin-top: .5rem; }
  .stats-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
  .features { grid-template-columns: 1fr; }
  .hero-buttons { flex-direction: column; }
  .btn-lg { width: 100%; justify-content: center; }
  .action-buttons { flex-wrap: wrap; }
  .error-actions { flex-wrap: wrap; }
  .user-card { grid-template-columns: 1fr; }
  h2 { font-size: 1.3rem; }
  .page-header h2 { font-size: 1.25rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 0.75rem; }
  .card { padding: 1rem; }
  .navbar { padding: 0.7rem 0; }
  .navbar .container { gap: 0.4rem; }
  .navbar-brand-img { width: 32px; height: 32px; }
  .navbar-brand-text { font-size: 1.05rem; letter-spacing: -.3px; }
  .navbar-actions { gap: 0.3rem; }
  .navbar-toggle { padding: 3px; }
  .navbar-toggle span { width: 22px; }
  .lang-toggle { padding: 0 0.5rem; font-size: 0.65rem; height: 30px; }
  .theme-toggle { width: 30px; height: 30px; }
  .avatar-trigger { width: 30px; height: 30px; font-size: 0.75rem; }
  .hero h1 { font-size: 1.75rem; }
  .login-card { padding: 1.5rem; }
  .login-wrap { padding: 1.5rem 0; }
  .stat-num { font-size: 1.6rem; }
  .footer-content { flex-direction: column; gap: 0.5rem; align-items: center; text-align: center; }
  .stats-grid { grid-template-columns: 1fr; }
  .metodo-grid { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .metodo-desc { display: none; }
  #mapa-carona { height: 220px; }
  .chat-wrap { height: 340px; }
}

/* ── Academic banner mobile ─────────────────────────────── */
@media (max-width: 750px) {
  .academic-banner {
    flex-direction: column;
    text-align: center;
    padding: 1rem 1.25rem;
  }
  .academic-banner .banner-body {
    min-width: 0;
  }
  .academic-banner .btn {
    width: 100%;
  }
}
@media (max-width: 480px) {
  .academic-banner .banner-text {
    word-break: break-word;
  }
}

/* Focus ring no padrão UniCaronas */
input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.campo-obrigatorio {
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: var(--accent);
  border-radius: 50%;
  margin-left: 4px;
  vertical-align: middle;
  cursor: help;
}

.icone-erro {
  width: 14px;
  height: 14px;
  color: var(--accent);
  margin-right: 5px;
  vertical-align: middle;
  flex-shrink: 0;
}

.mensagem-erro {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  font-size: 0.8rem;
  margin-top: 4px;
}

.icone-sucesso {
  width: 14px;
  height: 14px;
  color: var(--accent);
  margin-right: 5px;
  vertical-align: middle;
  flex-shrink: 0;
}

.mensagem-sucesso {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  font-size: 0.8rem;
  margin-top: 4px;
}

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 3rem 0;
  margin-top: auto;
  color: var(--text-3);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.footer-logo {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-2);
  letter-spacing: -.3px;
}

.footer-logo span { color: var(--accent-2); }

.footer-dev {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.footer-dev a {
  color: var(--accent-2);
  text-decoration: none;
}

.footer-dev a:hover {
  text-decoration: underline;
}

.footer-copyright {
  font-size: 0.75rem;
  color: var(--text-3);
  font-family: var(--font-mono);
}

.footer-disclaimer {
  font-size: 0.6rem;
  color: var(--text-3);
  background: var(--surface-2);
  padding: 2px 10px;
  border-radius: 99px;
  display: inline-block;
  letter-spacing: 0.03em;
}

.academic-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 1px solid var(--border-2);
  margin-bottom: 1.5rem;
}
.academic-banner .banner-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(245, 166, 35, 0.1);
  border: 1px solid rgba(245, 166, 35, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.academic-banner .banner-icon svg,
.academic-banner .banner-icon i {
  color: var(--amber);
}
.academic-banner .banner-body {
  flex: 1;
  min-width: 200px;
}
.academic-banner .banner-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--amber);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}
.academic-banner .banner-text {
  font-size: 0.85rem;
  color: var(--text-2);
  line-height: 1.6;
}
.academic-banner .banner-text strong {
  color: var(--text);
  font-weight: 600;
}

/* ── Perfil avatar fix ─────────────────────────────────────── */
.perfil-avatar {
  flex-shrink: 0 !important;
  overflow: hidden !important;
  word-break: break-all !important;
}

/* ── Form group consistent bottom margin ─────────────────── */
.grid-2 .form-group,
.grid-3 .form-group {
  margin-bottom: 0;
}

/* ── Consistent section spacing ──────────────────────────── */
.card > .grid-2:not(:last-child),
.card > .grid-3:not(:last-child) {
  margin-bottom: 1.15rem;
}

/* ── Filtros button alinhado com inputs ──────────────────── */
.filtros-grid .btn {
  height: 42px;
  align-self: end;
}

/* ── Criar carona: price suggestion inside flow ──────────── */
.calc-note {
  font-size: .76rem; color: var(--text-3);
  font-family: var(--font-mono);
  margin-top: .3rem;
  display: block;
}
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; border-radius: 99px;
  background: var(--red); color: #fff;
  font-size: 10px; font-weight: 700; padding: 0 4px;
  margin-left: 4px; vertical-align: middle;
}

/* ── Carona recorrente - Toggle ──────────────────────────── */
.toggle-wrap { display: flex; align-items: center; gap: .75rem; padding: .75rem 0; }
.toggle-label { font-size: .88rem; color: var(--text-2); }
.toggle { position: relative; width: 40px; height: 22px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; background: var(--border-2);
  border-radius: 99px; cursor: pointer; transition: .2s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; left: 3px; top: 3px; transition: .2s;
}
.toggle input:checked + .toggle-slider { background: var(--accent); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

/* ── Badge Semanal nos cards ─────────────────────────────── */
.badge-semanal {
  background: #6a0dad;
  color: #fff;
  padding: .15rem .5rem;
  border-radius: 4px;
  font-size: .65rem;
  margin-left: .5rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: .05em;
  vertical-align: middle;
}

/* ── Modal ────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.85);
  backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  z-index: 1000; padding: 1.5rem;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 480px;
  padding: 2rem; box-shadow: var(--shadow-md);
  animation: modalIn .3s ease-out;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(.95) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-title { font-size: 1.25rem; font-weight: 700; margin-bottom: .5rem; }
.modal-desc  { font-size: .9rem; color: var(--text-2); margin-bottom: 1.5rem; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: .75rem; margin-top: 1.5rem;
}

/* ── Star Rating (CSS Only) ──────────────────────────────── */
.star-rating {
  display: flex; flex-direction: row-reverse; justify-content: flex-end;
  gap: .4rem; margin-bottom: 1rem;
}
.star-rating input { display: none; }
.star-rating label {
  cursor: pointer; width: 28px; height: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2355556a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'%3E%3C/polygon%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; transition: .15s;
}
.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23f5a623' stroke='%23f5a623' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'%3E%3C/polygon%3E%3C/svg%3E");
}

/* ── Badge Histórico ──────────────────────────────────────── */
.badge-role {
  padding: .25rem .6rem; border-radius: 4px; font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
}
.badge-motorista { background: var(--accent-glow); color: var(--accent-2); border: 1px solid rgba(108,99,255,.2); }
.badge-passageiro { background: var(--green-dim); color: var(--green); border: 1px solid rgba(34,211,160,.2); }

/* ── Badge Só Mulheres ────────────────────────────────────── */
.badge-mulheres {
  background: rgba(156, 39, 176, 0.12);
  color: #d161e9;
  border: 1px solid rgba(156, 39, 176, 0.3);
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-transform: uppercase;
}
[data-theme="light"] .badge-mulheres {
  background: #fdf2ff;
  color: #9c27b0;
  border: 1px solid #e1bee7;
}

.carona-mulheres {
  border-top: 4px solid #9c27b0 !important;
}
[data-theme="dark"] .carona-mulheres {
  background: linear-gradient(to bottom, rgba(156, 39, 176, 0.05), var(--surface));
}