:root{
  --accent:#0284c7;
  --border:#cbd5e1;
  --header-h: 60px;
  --ask-bg: #eaf2ff;
  --ask-border: #d6e6ff;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; overflow-x: hidden; position: relative; }
body { margin: 0; font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji"; color: #0f172a; background: #f8fafc; line-height: 1.5; -webkit-text-size-adjust: 100%; }
a { color: inherit; } img { max-width: 100%; height: auto; }

/* ===== SIDEBAR ===== */
.sidebar {
  position: fixed; top: 0; left: 0; height: 100%; width: 260px;
  background: #f8fafc; border-right: 1px solid #e2e8f0;
  z-index: 5000; display: flex; flex-direction: column;
  transform: translateX(-100%); transition: transform 0.3s ease;
}
.sidebar.open { transform: translateX(0); }

.sidebar-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.4); z-index: 4500; display: none; opacity: 0; transition: opacity 0.3s; }
.sidebar-overlay.visible { display: block; opacity: 1; }

.sidebar-top { padding: 16px; border-bottom: 1px solid #e2e8f0; display: flex; gap: 12px; align-items: center; }

#btn-new-chat-sidebar { flex: 1; width: auto; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; background: #fff; border: 1px solid #cbd5e1; border-radius: 6px; font-weight: 600; color: #334155; cursor: pointer; transition: 0.2s; height: 42px; }
#btn-new-chat-sidebar:hover { border-color: #94a3b8; background: #f1f5f9; }

.btn-close-sidebar { width: 42px; height: 42px; background: transparent; border: none; color: #94a3b8; font-size: 28px; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; padding: 0; line-height: 1; }
.btn-close-sidebar:hover { color: #0f172a; }

.sidebar-section { flex: 1; overflow-y: auto; padding: 0; display: flex; flex-direction: column; }
.sidebar-title { padding: 18px 16px 8px; font-size: 0.75rem; font-weight: 700; color: #94a3b8; letter-spacing: 0.05em; }

.history-list { list-style: none; padding: 0; margin: 0; padding-bottom: 20px; }

.history-item { 
  padding: 10px 16px; 
  cursor: pointer; 
  border-bottom: 1px solid #f1f5f9; 
  transition: background 0.2s; 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  gap: 8px;
  position: relative;
}
.history-item:hover { background: #e2e8f0; }
.history-item.active { background: #fff; border-left: 4px solid var(--accent); }

.history-info {
  flex: 1;
  min-width: 0; 
  display: flex;
  flex-direction: column;
}

.history-title { 
  font-size: 0.9rem; 
  font-weight: 600; 
  color: #334155; 
  margin-bottom: 2px; 
  white-space: nowrap; 
  overflow: hidden; 
  text-overflow: ellipsis; 
  display: block;
  width: 100%;
}

.history-meta { font-size: 0.75rem; color: #94a3b8; }

.history-opts { position: relative; flex-shrink: 0; }
.opts-btn { 
  background: transparent; 
  border: none; 
  color: #94a3b8; 
  cursor: pointer; 
  font-size: 16px; 
  padding: 4px 8px; 
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.opts-btn:hover { color: #0f172a; background: #e2e8f0; }

.opts-menu { 
  display: none; 
  position: absolute; 
  right: 0; 
  top: 100%; 
  background: #fff; 
  border: 1px solid #e2e8f0; 
  border-radius: 8px; 
  box-shadow: 0 4px 12px rgba(0,0,0,0.1); 
  z-index: 50; 
  min-width: 120px; 
  overflow: hidden; 
}
.opts-menu.show { display: block; }

.opts-item { 
  padding: 8px 12px; 
  font-size: 0.85rem; 
  cursor: pointer; 
  color: #334155; 
  transition: background 0.2s; 
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  border: none;
  background: none;
  text-align: left;
}
.opts-item:hover { background: #f8fafc; color: var(--accent); }
.opts-item.delete { color: #ef4444; }
.opts-item.delete:hover { background: #fef2f2; color: #dc2626; }

/* ===== HEADER ===== */
.header { position: fixed; top: 0; left: 0; width: 100%; z-index: 4000; background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(15, 23, 42, 0.06); box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02); display: flex; justify-content: space-between; align-items: center; height: var(--header-h); }
.header-left { display: flex; align-items: center; gap: 12px; padding: 0 16px; height: var(--header-h); }
.header-right { display: flex; align-items: center; gap: 12px; padding-right: 16px; flex-shrink: 0; position: relative; }

@media (min-width: 1024px) {
  .sidebar { transform: translateX(0); top: 0; z-index: 100; padding-top: 80px; }
  .btn-close-sidebar { display: none !important; }
  .header-left { padding-left: 276px !important; flex: 1; }
  .main-content, .footer { padding-left: 260px; width: 100%; }
  .sidebar-toggle { display: none !important; }
}

/* Sidebar Toggle Base Style */
.sidebar-toggle { background: none; border: none; cursor: pointer; padding: 4px; color: #64748b; font-size: 1.5rem; transition: color 0.2s; }
.sidebar-toggle:hover { color: #0f172a; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #0f172a; }
.brand-logo { height: 32px; width: auto; max-width: 150px; object-fit: contain; flex-shrink: 0; display: block; }
.brand-title { font-weight: 600; font-size: 1.1rem; letter-spacing: -0.02em; white-space: nowrap; }
.brand-prefix { color: #0f172a; font-weight: 700; }
.brand-sep { color: #cbd5e1; }

/* ===== MENU DE IDIOMAS ===== */
.lang-dropdown {
  position: relative;
  z-index: 4001;
}

.lang-toggle-btn {
  background: none;
  border: 1px solid transparent;
  cursor: pointer;
  padding: 0;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  width: 40px;
  height: 40px;
}

.lang-toggle-btn:hover {
  background: #f1f5f9;
}

.lang-flag-img {
  width: 25px;
  height: auto;
  min-height: 18px;
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  display: block;
  object-fit: cover;
}

@media (max-width: 600px) {
  .lang-flag-img {
    width: 24px;
    min-height: 16px;
  }
}

.lang-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  min-width: 150px;
  overflow: hidden;
  display: none;
  flex-direction: column;
  z-index: 9999;
}

.lang-menu.show {
  display: flex;
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.lang-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: none;
  border: none;
  cursor: pointer;
  color: #334155;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
}

.lang-menu-item:hover {
  background: #f8fafc;
  color: var(--accent);
}

.lang-menu-item img {
  width: 20px;
  height: auto;
  border-radius: 2px;
  flex-shrink: 0;
}

.lang-menu-item span {
  flex: 1;
  white-space: nowrap;
}

.nav { display: none; gap: 16px; font-size: 0.9rem; }
.nav a { text-decoration: none; color: #64748b; font-weight: 500; }
.nav a:hover { color: var(--accent); }
@media (min-width: 900px) { .nav { display: flex; } }

/* ===== MAIN ===== */
.main-content { padding-top: 78px; min-height: 100vh; padding-bottom: 170px; }

.hero { padding: 28px 16px 18px; }
.hero.hidden { display: none !important; }
.hero-inner { max-width: 800px; margin: 0 auto; text-align: center; }
.hero-header-block { margin-bottom: 24px; }
.hero-kicker { font-size: 0.75rem; font-weight: 700; color: var(--accent); letter-spacing: 0.05em; margin-bottom: 6px; text-transform: uppercase; }
.hero-title { font-size: 2rem; margin: 0 0 8px 0; color: #0f172a; letter-spacing: -0.02em; }
.hero-subtitle { color: #64748b; margin-bottom: 0; font-size: 1.05rem; }

/* ===== SEARCH MODES ===== */
.mode-instruction {
  font-size: 0.9rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 10px;
  text-align: center;
}

.search-modes {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: nowrap;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.mode-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  position: relative;
  flex: 1;
  min-width: 0;
}

.mode-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.mode-card:hover {
  border-color: #94a3b8;
  transform: translateY(-1px);
}

.mode-card.active {
  background: #f0f9ff;
  border-color: var(--accent);
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.15);
}

.mode-card.active .mode-icon svg {
  color: var(--accent);
}

.mode-icon {
  display: flex;
  align-items: center;
  color: #64748b;
}

.mode-info {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.1;
}

.mode-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #1e293b;
  white-space: nowrap;
}

.mode-time {
  font-size: 0.7rem;
  color: #64748b;
  margin-top: 1px;
}

@media (max-width: 480px) {
  .search-modes {
    gap: 8px;
    max-width: 100%;
  }
  .mode-card {
    padding: 6px 8px;
  }
  .mode-icon svg {
    width: 20px;
    height: 20px;
  }
  .mode-title {
    font-size: 0.85rem;
  }
}

/* ===== FORM & SEARCH ===== */
.search-form { position: relative; max-width: 700px; margin: 0 auto 14px auto; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.search-form .input-wrapper { width: 100%; position: relative; }

.search-input{
  width: 100%;
  padding: 14px 40px 14px 20px;
  border: 1px solid var(--ask-border);
  border-radius: 24px;
  font-size: 1rem;
  line-height: 1.45;
  resize: none;
  font-family: inherit;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
  min-height: 52px;
  max-height: 150px;
  overflow-y: hidden;
  background: var(--ask-bg);
}
.search-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(2,132,199,0.1); background: #ffffff; }

.btn-clear { position: absolute; right: 12px; top: 14px; background: transparent; border: none; color: #94a3b8; font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 0; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; transition: color 0.2s; z-index: 5; }
.btn-clear:hover { color: #64748b; }

.search-button { position: static; background: #0284c7; color: white; border: none; cursor: pointer; transition: background 0.2s; font-weight: 600; border-radius: 24px; padding: 0 32px; font-size: 0.95rem; height: 48px; min-width: 160px; display: flex; align-items: center; justify-content: center; }
.search-button:hover { background: #0369a1; }
.search-button:disabled { background: #94a3b8; cursor: wait; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip { background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 16px; padding: 6px 12px; font-size: 0.85rem; color: #475569; cursor: pointer; transition: all 0.2s; }
.chip:hover { background: #e2e8f0; color: #1e293b; border-color: #cbd5e1; }

.thread { max-width: 800px; margin: 0 auto; padding: 0 16px; }
.hidden { display: none !important; }
.turn { margin-bottom: 32px; animation: fadeIn 0.4s ease; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 20px; }

.turn-label { font-size: 0.7rem; font-weight: 700; color: #94a3b8; margin-bottom: 6px; letter-spacing: 0.05em; text-transform: uppercase; }
.turn-question { font-size: 1.1rem; font-weight: 500; color: #0f172a; margin-bottom: 16px; line-height: 1.4; }

.turn.loading .turn-qwrap {
  position: sticky;
  top: calc(var(--header-h) + 8px);
  z-index: 20;
  background: rgba(248, 250, 252, 0.98);
  backdrop-filter: blur(8px);
  padding-top: 6px;
  margin-top: -6px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}
.turn.loading .turn-question { margin-bottom: 10px; }

.turn-answer { font-size: 1rem; line-height: 1.65; color: #334155; }
.turn-answer h2 { font-size: 1.2rem; color: #1e293b; margin: 18px 0 10px 0; font-weight: 700; }
.turn-answer h3 { font-size: 1.05rem; color: #1e293b; margin: 14px 0 8px 0; font-weight: 600; }
.turn-answer ul, .turn-answer ol { margin-left: 20px; margin-bottom: 12px; padding: 0; }
.turn-answer li { margin-bottom: 6px; padding-left: 4px; }
.turn-answer p { margin: 0 0 12px 0; }
.turn-answer a { color: var(--accent); text-decoration: none; }
.turn-answer a:hover { text-decoration: underline; }

.turn-actions { 
  display: flex; 
  gap: 8px; 
  margin-top: 14px; 
  padding-top: 10px; 
  opacity: 0.9; 
  border-top: 1px solid #e2e8f0; 
  flex-wrap: wrap; 
}

.action-btn { background: transparent; border: none; cursor: pointer; padding: 6px; display: flex; align-items: center; justify-content: center; color: #64748b; transition: all 0.2s ease; border-radius: 6px; }
.action-btn:hover { color: #0f172a; background-color: #f1f5f9; }
.action-btn svg { width: 20px; height: 20px; stroke-width: 2px; fill: none; stroke: currentColor; }
.action-btn.active { color: var(--accent); }

/* SUCCESS STATE FOR COPY BUTTON */
.action-btn.success { color: #10b981; }
.action-btn.success:hover { background-color: #ecfdf5; color: #059669; }

.loading-state {
  color: #64748b;
  font-weight: 700;
  margin-top: 6px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.loading-state .ld-text{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.followup{
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #f8fafc;
  border-top: 0;
  padding: 16px 16px;
  z-index: 1000;
  box-shadow: none;
  display: flex;
  justify-content: center;
}
@media (min-width: 1024px) {
  .followup { left: 260px; width: calc(100% - 260px); }
}
.followup.hidden { display: none !important; }

.followup .container { width: 100%; max-width: 800px; padding: 0 16px; margin: 0 auto; }
.followup-form { display: flex; flex-direction: row; align-items: flex-end; gap: 12px; width: 100%; }
.followup-form .input-wrapper { flex: 1; min-width: 0; width: auto; }

.followup-input{
  width: 100%;
  min-width: 0;
  padding: 14px 22px;
  border: 1px solid var(--ask-border);
  background: var(--ask-bg);
  border-radius: 28px;
  font-size: 1rem;
  line-height: 1.35;
  resize: none;
  font-family: inherit;
  min-height: 52px;
  max-height: 150px;
  overflow-y: hidden;
}
/* MOBILE ZOOM FIX: Force 16px to prevent zoom on focus */
@media (max-width: 600px) {
  .followup-input {
    font-size: 16px; 
  }
  .search-input {
    font-size: 16px;
  }
}

.followup-input:focus { outline: 2px solid #0284c7; background: #fff; border-color: var(--accent); }

#followup-button { width: 48px; height: 48px; min-width: 48px; background: #0284c7; color: white; border: none; padding: 0; border-radius: 50%; margin: 0; display: flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer; transition: background 0.2s; }
#followup-button:hover { background: #0369a1; }
#followup-button svg { width: 24px; height: 24px; }

.content-section { padding: 40px 16px; border-top: 1px solid #f1f5f9; }
.content-section .container { max-width: 800px; margin: 0 auto; padding: 0 16px; }
.content-section h2 { margin: 0 0 10px 0; color: #0f172a; }
.content-section p { margin: 0 0 12px 0; color: #334155; }

.footer { padding: 28px 16px; background: #fff; text-align: center; color: #94a3b8; font-size: 0.85rem; border-top: 1px solid #e2e8f0; }
.footer-warning { margin: 0 0 14px 0; font-size: 0.8rem; color: #64748b; }
.footer-bottom { margin-top: 8px; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ===== MOBILE HEADER & ADJUSTMENTS ===== */
@media (max-width: 600px) {
  .header-left { 
    padding-left: 10px !important; 
    gap: 12px;
    flex: 1;
  }
  
  .header-right { 
    padding-right: 12px; 
    gap: 8px; 
  }

  .sidebar-toggle {
    font-size: 2.25rem; 
    padding: 0; 
  }

  .brand-logo {
    height: 42px; 
    width: auto;
  }

  .brand-title { 
    font-size: 1.25rem; 
  }
  .brand-prefix, .brand-sep { display: none; }

  .search-form { flex-direction: column; align-items: stretch; gap: 12px; }
  .search-form .search-button { width: 100%; margin-top: 0; border-radius: 24px; height: 52px; display: flex; }

  .followup { padding: 10px 12px; border-top-left-radius: 18px; border-top-right-radius: 18px; }
  .followup-form { gap: 8px; }
  
  /* Adjusted above in specific rule for inputs */
  #followup-button{ width: 42px; height: 42px; min-width: 42px; }
  #followup-button svg{ width: 20px; height: 20px; }
  .loading-state { font-size: 0.92rem; }
}

/* ===== Tooltip/Popover References ===== */
.ocp-refwrap { position: relative; display: inline-block; vertical-align: baseline; }
.ocp-refwrap .ocp-ref,
.ocp-refwrap a.ocp-ref { color: var(--accent); text-decoration: none; font-weight: 700; cursor: pointer; }
.ocp-refwrap .ocp-ref:hover,
.ocp-refwrap a.ocp-ref:hover { text-decoration: underline; }

.ocp-refwrap .ocp-pop {
  position: absolute;
  left: 0;
  top: 1.2em;
  min-width: 280px;
  max-width: 520px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 12px 24px rgba(2, 8, 23, 0.15);
  z-index: 9999;
  word-break: break-word;
  overflow-wrap: anywhere;
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .ocp-refwrap .ocp-pop { font-size: 11px; }
  .ocp-pop .ocp-pop-title { font-size: 10px; }
  .ocp-pop .ocp-pop-meta { font-size: 10px; }
  .ocp-pop a { font-size: 11px; }
}

.ocp-refwrap:hover .ocp-pop,
.ocp-refwrap:focus-within .ocp-pop { display: block; }
.ocp-refwrap.open .ocp-pop { display: block; }

@media (hover: none) and (pointer: coarse) {
  .ocp-refwrap .ocp-pop {
    position: fixed;
    left: 8px;
    top: 100px;
    max-width: min(92vw, 520px);
  }
}

.ocp-pop .ocp-pop-title { font-weight: 800; color: #0f172a; margin: 0 0 6px 0; }
.ocp-pop .ocp-pop-meta { color: #475569; margin: 0; line-height: 1.35; }
.ocp-pop a { color: var(--accent); text-decoration: none; font-weight: 700; }
.ocp-pop a:hover { text-decoration: underline; }

/* ===== CUSTOM MODAL CSS ===== */


/* ===== Download modal options (export) ===== */
.dl-grid{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px;}
.dl-grid .modal-btn{flex:1;min-width:110px;}
.dl-hint{margin-top:10px;font-size:0.9rem;color:#64748b;line-height:1.35;}

/* Compact download box (somente botões) */
.modal-box.dl-compact{padding:16px;max-width:280px;}
.modal-box.dl-compact .modal-content{margin:0;}
.dl-grid.dl-compact{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-top:0;}
.dl-grid.dl-compact .modal-btn{width:100%;min-width:0;}



/* Compact download modal (somente botões) */
.modal-box.dl-compact{padding:16px;max-width:320px;}
.modal-box.dl-compact .modal-content{margin-bottom:0;}
.dl-grid.dl-compact{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-top:0;}
.dl-grid.dl-compact .modal-btn{width:100%;min-width:0;}



.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(2px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.2s;
}
.modal-overlay.hidden {
  display: none;
  opacity: 0;
}

.modal-box {
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  width: 90%;
  max-width: 400px;
  transform: translateY(0);
  transition: transform 0.2s;
}

.modal-title {
  margin: 0 0 16px 0;
  font-size: 1.25rem;
  color: #0f172a;
  font-weight: 700;
}

.modal-content {
  margin-bottom: 24px;
  font-size: 1rem;
  color: #334155;
}

.modal-content input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 1rem;
  margin-top: 8px;
}
.modal-content input:focus {
  outline: 2px solid var(--accent);
  border-color: var(--accent);
}

.modal-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 1rem;
  margin-top: 8px;
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
}
.modal-textarea:focus {
  outline: 2px solid var(--accent);
  border-color: var(--accent);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.modal-btn {
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.2s;
}

.modal-btn.secondary {
  background: #f1f5f9;
  color: #475569;
}
.modal-btn.secondary:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.modal-btn.primary {
  background: var(--accent);
  color: #fff;
}
.modal-btn.primary:hover {
  background: #0369a1;
}

.modal-btn.danger {
  background: #ef4444;
  color: #fff;
}
.modal-btn.danger:hover {
  background: #dc2626;
}

/* --- NOVA BOLINHA DE SELEÇÃO (RADIO) --- */
.radio-circle {
  width: 18px;
  height: 18px;
  border: 2px solid #cbd5e1; /* Cinza inativo */
  border-radius: 50%;
  margin-right: 4px; /* Espaço até o ícone */
  position: relative;
  flex-shrink: 0; /* Não deixa esmagar */
  transition: all 0.2s ease;
}

/* Quando o card está ATIVO, a borda fica azul */
.mode-card.active .radio-circle {
  border-color: var(--accent);
}

/* O "miolo" azul da bolinha quando ativo */
.mode-card.active .radio-circle::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background-color: var(--accent);
  border-radius: 50%;
}

/* --- NOVOS CARDS DE DIFERENCIAIS (HERO) --- */
.hero-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
  width: 100%;
}

.feature-card {
  background-color: #f3f4f6; /* Fundo Cinza Claro */
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 1.2rem;
  border-radius: 12px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border-color: var(--accent);
}

.feature-icon {
  font-size: 1.8rem;
  margin-bottom: 0.6rem;
  display: block;
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.4rem 0;
}

.feature-card p {
  font-size: 0.85rem;
  color: #64748b; /* Cor secundária */
  line-height: 1.3;
  margin: 0;
}

/* Modo Escuro (Prevenção) */
@media (prefers-color-scheme: dark) {
  .feature-card {
    background-color: #1e293b;
    border-color: #334155;
  }
}

/* Ajuste Mobile: Empilhar e Compactar */
@media (max-width: 768px) {
  .hero-features {
    grid-template-columns: 1fr; /* Um por linha */
    gap: 0.6rem; /* Gap reduzido */
    margin-top: 1rem;
  }
  
  .feature-card {
    padding: 0.8rem 1rem; /* Mais fino verticalmente */
    display: flex; /* Layout horizontal no mobile */
    align-items: center;
    text-align: left;
    gap: 1rem;
  }
  
  .feature-icon {
    margin-bottom: 0;
    font-size: 1.6rem;
  }
  
  .feature-card div {
    flex: 1;
  }
  
  .feature-card h3 {
    margin-bottom: 0.2rem;
    font-size: 0.95rem;
  }
}