/* ==========================================================================
   CLOUD FOTOS — estilos da plataforma (tema escuro)
   Paleta padrão: azul. Outros temas (ex.: theme-gold.css) só trocam as variáveis abaixo.
   ========================================================================== */
:root {
  color-scheme: dark;
  --brand: #2f8fff;
  --brand-rgb: 47,143,255;
  --brand-600: #1f78e6;
  --brand-light: #7cc4ff;
  --brand-soft: #93c5fd;
  --brand-text: #bfdbfe;
  --brand-50: rgba(var(--brand-rgb),.14);
  --on-brand: #fff;
  --ink: #e8eef9;
  --ink-2: #c2cde0;
  --muted: #8494b0;
  --placeholder: #5b6b88;
  --faint: #334463;
  --line: #1f2b45;
  --line-2: #152038;
  --line-strong: #2a3a5c;
  --bg: #060c18;
  --bg-rgb: 6,12,24;
  --panel: #08101f;
  --deep: #050b17;
  --card: #0d1628;
  --card-2: #111c33;
  --input: #0a1324;
  --accent-deep: #13284d;
  --accent-deep-2: #0d2a5c;
  --green: #34d399; --green-50: rgba(52,211,153,.13);
  --red: #f87171;   --red-50: rgba(248,113,113,.13);
  --amber: #fbbf24; --amber-50: rgba(251,191,36,.13);
  --gray-50: var(--line-2);
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.55);
  --sidebar: 248px;
  --font-brand: Orbitron, Inter, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link, var(--brand)); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
small { font-size: .82em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
code { background: var(--line-2); padding: 2px 6px; border-radius: 6px; font-size: .88em; }
.muted { color: var(--muted); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0 } .mt { margin-top: 16px } .mt-lg { margin-top: 28px }
.mb-0 { margin-bottom: 0 } .mb { margin-bottom: 16px }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stack > * + * { margin-top: 12px; }
.hidden { display: none !important; }
.text-green { color: var(--green) } .text-red { color: var(--red) } .text-amber { color: var(--amber) }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--radius-sm); border: 1px solid transparent;
  background: var(--brand); color: var(--on-brand); font: inherit; font-weight: 600; font-size: 14px;
  cursor: pointer; white-space: nowrap; transition: background .15s, box-shadow .15s, transform .05s;
  text-decoration: none !important;
}
.btn:hover { background: var(--brand-600); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-light { background: var(--card-2); color: var(--ink-2); border-color: var(--line); }
.btn-light:hover { background: var(--line-2); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--line-2); }
.btn-danger { background: #dc2626; }
.btn-danger:hover { background: #b91c1c; }
.btn-danger-light { background: var(--red-50); color: var(--red); }
.btn-danger-light:hover { background: rgba(248,113,113,.22); }
.btn-green { background: #16a34a; }
.btn-green:hover { background: #15803d; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { height: 50px; padding: 0 24px; font-size: 16px; }
.btn-block { width: 100%; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--card-2);
  display: inline-grid; place-items: center; cursor: pointer; color: var(--ink-2); font-size: 18px;
}
.icon-btn:hover { background: var(--line-2); }

/* ---------- Formulários ---------- */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field small { color: var(--muted); display: block; margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date],
input[type=search], input[type=tel], input[type=url], input:not([type]), select, textarea {
  width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; color: var(--ink); background: var(--input); transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; min-height: 110px; padding: 10px 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
input[type=color] { width: 56px; height: 42px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--input); }
input::placeholder, textarea::placeholder { color: var(--placeholder); }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.input-group { display: flex; }
.input-group input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; height: 42px; }

/* ---------- Alertas e badges ---------- */
.alert {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm);
  margin-bottom: 16px; font-size: 14px; border: 1px solid transparent;
}
.alert i { font-size: 17px; line-height: 1.3; }
.alert-success { background: var(--green-50); color: #a7f3d0; border-color: rgba(52,211,153,.3); }
.alert-danger  { background: var(--red-50); color: #fecaca; border-color: rgba(248,113,113,.3); }
.alert-warning { background: var(--amber-50); color: #fde68a; border-color: rgba(251,191,36,.3); }
.alert-info    { background: var(--brand-50); color: var(--brand-text); border-color: rgba(var(--brand-rgb),.3); }
.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.badge-green { background: var(--green-50); color: var(--green); }
.badge-red { background: var(--red-50); color: var(--red); }
.badge-amber { background: var(--amber-50); color: var(--amber); }
.badge-gray { background: var(--gray-50); color: var(--muted); }
.badge-blue { background: var(--brand-50); color: var(--brand); }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-body { padding: 20px; }
.card-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; font-size: 16px; }
.card + .card, .card + .grid, .grid + .card { margin-top: 20px; }
.grid > .card, .grid > .card + .card, .event-list > .card + .card { margin-top: 0; }
.grid > div > .card + .card { margin-top: 20px; }
.grid { display: grid; gap: 20px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-main-side { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }

.stat { padding: 18px 20px; display: flex; gap: 14px; align-items: center; }
.stat-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 21px; background: var(--brand-50); color: var(--brand); flex: none; }
.stat-icon.green { background: var(--green-50); color: var(--green); }
.stat-icon.amber { background: var(--amber-50); color: var(--amber); }
.stat-icon.red { background: var(--red-50); color: var(--red); }
.stat-label { color: var(--muted); font-size: 13px; font-weight: 500; }
.stat-value { font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.stat-sub { font-size: 12px; color: var(--muted); }

.progress { height: 8px; background: var(--line-2); border-radius: 99px; overflow: hidden; margin: 6px 0; }
.progress > div { height: 100%; background: var(--brand); border-radius: 99px; transition: width .3s; }
.progress > div.danger { background: var(--red); }

/* ---------- Tabelas ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--card-2); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table td:not(:has(small)) { white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: rgba(var(--brand-rgb),.04); }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions form { display: inline; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty > i { font-size: 40px; display: block; margin-bottom: 10px; color: var(--faint); }
.empty .btn { margin-top: 4px; }
.pagination { display: flex; gap: 6px; justify-content: center; padding: 16px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); background: var(--card-2); color: var(--ink-2); font-size: 13px; padding: 0 8px; }
.pagination a.active { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filters input, .filters select { width: auto; min-width: 180px; height: 38px; }

/* ---------- Painel: shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar); flex: none; background: var(--panel); color: var(--ink-2); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 40; border-right: 1px solid var(--line);
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 20px 18px; color: #fff; text-decoration: none !important; flex-wrap: wrap; }
.sidebar-brand small { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 3px 8px; border-radius: 99px; background: var(--brand-50); color: var(--brand-soft); }
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; padding: 6px 12px; flex: 1; }
.sidebar-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: inherit; font-weight: 500; font-size: 14px; text-decoration: none !important; }
.sidebar-nav a i { font-size: 17px; opacity: .85; }
.sidebar-nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
.sidebar-nav a.active { background: var(--brand-50); color: #fff; box-shadow: inset 3px 0 0 var(--brand); }
.sidebar-nav a.active i { color: var(--brand); opacity: 1; }

/* ---------- Marca CLOUD FOTOS ---------- */
.logo-dot { width: 34px; height: 34px; border-radius: 10px; background: var(--deep) url(../img/icon.png) center / 88% no-repeat; border: 1px solid rgba(var(--brand-rgb),.35); box-shadow: 0 0 14px rgba(var(--brand-rgb),.25); display: inline-block; flex: none; }
.brand-name { font-family: var(--font-brand); font-weight: 800; letter-spacing: .04em; white-space: nowrap; line-height: 1; }
.brand-name b { color: #fff; font-weight: 800; }
.brand-name span { color: var(--brand); font-weight: 800; text-shadow: 0 0 12px rgba(var(--brand-rgb),.55); }
.sidebar-brand .brand-name { font-size: 17px; }
.sidebar-storage { margin: 12px; padding: 14px; border-radius: 12px; background: var(--line-2); font-size: 13px; }
.sidebar-storage small { color: var(--muted); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 68px; display: flex; align-items: center; gap: 14px; padding: 0 28px; background: rgba(var(--bg-rgb),.82); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.page-title { font-size: 19px; margin: 0; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.content { padding: 28px; max-width: 1320px; width: 100%; }
.user-chip { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--card-2); border-radius: 99px; padding: 4px 12px 4px 4px; cursor: pointer; font: inherit; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 8px); background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); min-width: 230px; padding: 6px; display: none; z-index: 50; }
.dropdown.open .dropdown-menu { display: block; }
.table-wrap .dropdown-menu { z-index: 90; text-align: left; }
.dropdown-menu a, .dropdown-menu button { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: var(--ink-2); font-size: 14px; width: 100%; background: none; border: 0; font: inherit; cursor: pointer; text-decoration: none !important; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--line-2); }
.dropdown-head { padding: 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.dropdown-head small { display: block; color: var(--muted); }
.impersonate-bar { background: #7c3aed; color: #fff; padding: 9px 28px; font-size: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.impersonate-bar a { color: #fff; text-decoration: underline; margin-left: auto; font-weight: 600; }
.sidebar-backdrop { display: none; }
.mobile-only { display: none; }

/* ---------- Abas ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 12px 16px; color: var(--muted); font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none !important; display: flex; gap: 8px; align-items: center; }
.tabs a:hover { color: var(--ink); }
.tabs a.active { color: var(--brand); border-bottom-color: var(--brand); }
.tabs .count { background: var(--line-2); color: var(--muted); border-radius: 99px; padding: 0 8px; font-size: 12px; }

/* ---------- Upload e grade de fotos ---------- */
.dropzone { border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 36px 20px; text-align: center; background: var(--input); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.drag { border-color: var(--brand); background: var(--brand-50); }
.dropzone i { font-size: 40px; color: var(--brand); }
.dropzone h3 { margin: 8px 0 4px; font-size: 17px; }
.upload-queue { margin-top: 14px; display: none; }
.upload-queue.show { display: block; }
.upload-summary { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.photo-tile { position: relative; border-radius: 10px; overflow: hidden; background: var(--line-2); aspect-ratio: 1; border: 2px solid transparent; }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; }
.photo-tile.selected { border-color: var(--brand); }
.photo-tile .tile-check { position: absolute; top: 8px; left: 8px; width: 24px; height: 24px; border-radius: 6px; background: rgba(var(--bg-rgb),.8); border: 1px solid rgba(255,255,255,.2); display: grid; place-items: center; cursor: pointer; }
.photo-tile .tile-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--brand); cursor: pointer; }
.photo-tile .tile-actions { position: absolute; right: 6px; top: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.photo-tile:hover .tile-actions { opacity: 1; }
.photo-tile .tile-actions button { width: 30px; height: 30px; border-radius: 8px; border: 0; background: rgba(15,23,42,.72); color: #fff; cursor: pointer; display: grid; place-items: center; }
.photo-tile .tile-actions button:hover { background: var(--red); }
.photo-tile .tile-actions button.cover-btn:hover { background: var(--brand); }
.photo-tile .tile-badge { position: absolute; left: 8px; bottom: 8px; background: var(--brand); color: var(--on-brand); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.photo-tile .tile-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px; font-size: 11px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.6)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity .15s; }
.photo-tile:hover .tile-name { opacity: 1; }
.bulkbar { position: sticky; top: 76px; z-index: 20; display: none; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 14px; background: var(--accent-deep); color: #fff; border: 1px solid rgba(var(--brand-rgb),.35); border-radius: 12px; box-shadow: var(--shadow-lg); flex-wrap: wrap; }
.bulkbar.show { display: flex; }
.bulkbar .btn-light { background: rgba(255,255,255,.12); color: #fff; border-color: transparent; }

.order-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.order-bar label { font-size: 14px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.order-bar select { width: auto; min-width: 250px; height: 36px; font-size: 14px; }

/* ---------- Planos e pagamento ---------- */
.plan-card { position: relative; }
.plan-card.is-current { border: 2px solid var(--brand); }
.plan-tag { position: absolute; top: 14px; right: 14px; }
.checkout-box { max-width: 460px; }
.ck-summary { background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.ck-summary small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ck-summary > b { display: block; font-size: 20px; margin: 2px 0 8px; color: var(--ink); }
.ck-line { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink-2); padding: 3px 0; }
.ck-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; }
.ck-total strong { font-size: 24px; color: var(--ink); }
.pay-btn { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; margin-bottom: 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .1s; }
.pay-btn:hover { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.pay-btn:active { transform: translateY(1px); }
.pay-btn > i { margin-left: auto; color: var(--muted); }
.pay-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; flex: none; }
.pay-ico.pix { background: rgba(50,188,173,.15); color: #32bcad; }
.pay-ico.card { background: rgba(0,158,227,.14); color: #009ee3; }
.pay-txt b { display: block; font-size: 15px; }
.pay-txt small { color: var(--muted); font-size: 13px; }
.ck-qr { background: #fff; border-radius: 16px; padding: 14px; width: 240px; margin: 0 auto 12px; border: 1px solid var(--line); }
.ck-qr img { width: 100%; height: auto; }
.ck-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 16px 0 10px; font-size: 14px; color: var(--ink); }
.ck-status small { width: 100%; text-align: center; }
.ck-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--amber); animation: ckPulse 1.2s ease-in-out infinite; }
@keyframes ckPulse { 50% { opacity: .3; transform: scale(.8); } }
.ck-spinner { width: 42px; height: 42px; margin: 20px auto 14px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: ckSpin .8s linear infinite; }
@keyframes ckSpin { to { transform: rotate(360deg); } }
.ck-ok { width: 64px; height: 64px; margin: 10px auto 12px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-size: 34px; animation: ckPop .35s ease; }
@keyframes ckPop { 0% { transform: scale(.4); } 70% { transform: scale(1.12); } 100% { transform: scale(1); } }

/* Lista de eventos */
.event-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.event-card { overflow: hidden; display: flex; flex-direction: column; color: inherit; text-decoration: none !important; transition: transform .15s, box-shadow .15s; }
.event-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.event-cover { aspect-ratio: 16/10; background: linear-gradient(135deg, var(--card-2), var(--input)); position: relative; display: grid; place-items: center; color: var(--faint); font-size: 38px; }
.event-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.event-cover .badge { position: absolute; top: 12px; left: 12px; }
.event-meta { padding: 14px 16px; }
.event-meta h3 { font-size: 16px; margin: 0 0 4px; }
.event-meta .row { color: var(--muted); font-size: 13px; gap: 14px; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(var(--bg-rgb),.8); display: none; align-items: center; justify-content: center; padding: 16px; z-index: 100; }
.modal.open { display: flex; }
.modal-box { background: var(--card); border: 1px solid var(--line); border-radius: 16px; width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal-box.lg { max-width: 820px; }
.modal-head { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.modal-head h3 { margin: 0; font-size: 17px; }
.modal-body { padding: 20px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.credential-box { background: var(--line-2); border-radius: 12px; padding: 16px; font-family: ui-monospace, Consolas, monospace; font-size: 15px; }
.credential-box div { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--accent-deep); color: #fff; border: 1px solid rgba(var(--brand-rgb),.35); padding: 12px 18px; border-radius: 12px; font-size: 14px; opacity: 0; transition: all .25s; z-index: 200; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.share-box { display: flex; gap: 8px; }
.share-box input { font-size: 13px; background: var(--line-2); }
.qr { background: #fff; padding: 10px; border-radius: 12px; border: 1px solid var(--line); display: inline-block; }
.list-plain { list-style: none; padding: 0; margin: 0; }
.list-plain li { padding: 10px 0; border-bottom: 1px solid var(--line-2); display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.list-plain li:last-child { border-bottom: 0; }
.chart-box { position: relative; height: 280px; }

/* ---------- Telas de login ---------- */
.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(1000px 600px at 10% -10%, rgba(var(--brand-rgb),.18), transparent), radial-gradient(900px 500px at 110% 110%, rgba(var(--brand-rgb),.10), transparent), var(--bg); }
.auth-card { width: 100%; max-width: 420px; background: var(--card); border-radius: 20px; padding: 32px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.auth-card h1 { font-size: 24px; margin-top: 18px; }
.auth-card.wide { max-width: 640px; }
.brand-mark { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none !important; }
.brand-mark .brand-name { font-size: 19px; }
.auth-logo { width: 150px; margin: 0 auto 4px; filter: drop-shadow(0 0 18px rgba(var(--brand-rgb),.25)); }
.err-code { font-size: 64px; font-weight: 800; color: var(--brand); line-height: 1; }
.plan-pick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
.plan-pick label { border: 2px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; display: block; }
.plan-pick input { display: none; }
.plan-pick label:has(input:checked) { border-color: var(--brand); background: var(--brand-50); }
.plan-pick b { display: block; }
.plan-pick span { font-size: 13px; color: var(--muted); }
.theme-pick label { display: flex; align-items: center; gap: 10px; }
.theme-pick b { display: inline; }
.swatch { width: 34px; height: 22px; border-radius: 6px; flex: none; border: 1px solid rgba(255,255,255,.12); }
.swatch-blue { background: linear-gradient(135deg, #060c18 50%, #2f8fff 50%); }
.swatch-gold { background: linear-gradient(135deg, #050505 50%, #d4af37 50%); }
.swatch-white { background: linear-gradient(135deg, #ffffff 34%, #0b0b0b 34% 67%, #cfbf8c 67%); border-color: #cfc9bb; }
.swatch-goldlight { background: linear-gradient(135deg, #ffffff 34%, #0b0b0b 34% 67%, #d4af37 67%); border-color: #cfc9bb; }
.swatch-round { width: 20px; height: 20px; border-radius: 50%; }

/* ---------- Botão de troca de tema ---------- */
.theme-switch { position: relative; flex: none; }
.theme-switch > summary { list-style: none; }
.theme-switch > summary::-webkit-details-marker { display: none; }
.theme-switch > summary:hover .swatch-round { transform: rotate(180deg); }
.theme-switch .swatch-round { transition: transform .35s ease; }
.theme-switch[open] > summary { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.theme-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 285px; max-width: calc(100vw - 24px); padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); animation: themeIn .16s ease; }
@keyframes themeIn { from { opacity: 0; transform: translateY(-4px); } }
.theme-menu small { display: block; padding: 6px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.theme-menu a { display: flex; align-items: center; gap: 10px; white-space: nowrap; padding: 9px 10px; border-radius: 9px; color: var(--ink-2); font-size: 14px; font-weight: 500; text-decoration: none !important; }
.theme-menu a:hover { background: var(--line-2); }
.theme-menu a.on { background: var(--brand-50); color: var(--ink); font-weight: 600; }
.theme-menu .tick { margin-left: auto; color: var(--link, var(--brand)); font-size: 16px; }
.theme-float { position: fixed; top: 16px; right: 16px; z-index: 70; }
.sidebar .theme-switch { display: none; }

/* ---------- Páginas públicas (início, suporte) ---------- */
.l-nav { max-width: 1180px; margin: 0 auto; padding: 18px 20px; display: flex; align-items: center; gap: 16px; }
.l-nav nav { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.l-nav nav a.link { color: var(--ink-2); font-weight: 500; padding: 8px 12px; }
.l-nav nav a.link.active { color: #fff; }
.l-foot { border-top: 1px solid var(--line); padding: 28px 20px; text-align: center; color: var(--muted); font-size: 14px; }
.l-foot a { color: var(--ink-2); }

.support-hero { max-width: 760px; margin: 0 auto; padding: 48px 20px 24px; text-align: center; }
.support-hero .eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); background: var(--brand-50); padding: 6px 12px; border-radius: 99px; }
.support-hero h1 { font-size: clamp(30px, 4.4vw, 46px); font-weight: 800; letter-spacing: -.03em; margin: 18px 0 12px; }
.support-hero p { font-size: 17px; color: var(--ink-2); margin: 0 auto; max-width: 580px; }
.wa-card { max-width: 760px; margin: 28px auto 0; padding: 28px; border-radius: 20px; background: radial-gradient(500px 220px at 0% 0%, rgba(37,211,102,.16), transparent), var(--card); border: 1px solid rgba(37,211,102,.35); display: flex; gap: 22px; align-items: center; }
.wa-icon { width: 64px; height: 64px; border-radius: 18px; background: #25d366; color: #fff; display: grid; place-items: center; font-size: 34px; flex: none; box-shadow: 0 0 28px rgba(37,211,102,.4); }
.wa-card h2 { font-size: 20px; margin: 0 0 4px; }
.wa-card p { color: var(--muted); margin: 0; font-size: 14px; }
.wa-card .wa-num { color: #fff; font-weight: 700; font-size: 16px; letter-spacing: .02em; margin-top: 6px; display: block; }
.btn-wa { background: #25d366; color: #05210f; margin-left: auto; }
.btn-wa:hover { background: #1ebe5b; }
.faq { max-width: 760px; margin: 0 auto; padding: 48px 20px 72px; }
.faq h2 { font-size: 22px; text-align: center; margin-bottom: 20px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; transition: border-color .2s; }
.faq details[open] { border-color: rgba(var(--brand-rgb),.45); }
.faq summary { list-style: none; cursor: pointer; padding: 16px 18px; font-weight: 600; display: flex; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary i:first-child { color: var(--brand); font-size: 18px; }
.faq summary::after { content: "\F282"; font-family: bootstrap-icons; margin-left: auto; color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(180deg); }
.faq details > div { padding: 0 18px 18px 48px; color: var(--ink-2); font-size: 14px; line-height: 1.65; }
.faq details > div p { margin: 0 0 8px; }

/* ---------- Responsivo ---------- */
@media (max-width: 1100px) {
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-main-side { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .sidebar-backdrop.open { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.4); z-index: 35; }
  .mobile-only { display: inline-grid; }
  .desktop-only { display: none; }
  .topbar { padding: 0 16px; }
  .content { padding: 16px; }
  .cols-2, .cols-3 { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .impersonate-bar { padding: 9px 16px; }
  .l-nav nav a.link { display: none; }
  .l-nav nav a.link.keep { display: inline; padding: 8px 6px; }
  .wa-card { flex-direction: column; text-align: center; }
  .btn-wa { margin: 6px 0 0; width: 100%; }
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)); gap: 8px; }
  .photo-tile .tile-actions { opacity: 1; }
  .topbar-actions .btn span { display: none; }
}
@media (max-width: 520px) {
  .l-nav { padding: 14px 12px; gap: 8px; }
  .l-nav nav { gap: 4px; }
  .l-nav .brand-mark { gap: 7px; }
  .l-nav .brand-name { font-size: 14px; }
  .l-nav .logo-dot { width: 28px; height: 28px; border-radius: 8px; }
  .l-nav nav .btn { height: 34px; padding: 0 10px; font-size: 13px; }
  .l-nav nav a.link.keep { font-size: 13px; padding: 6px 4px; }
  .wa-card > div { text-align: center !important; }
}
@media (max-width: 430px) {
  .l-nav nav .hide-xs { display: none; }
  .cols-4 { grid-template-columns: 1fr; }
  .auth-card { padding: 24px 20px; }
  .plan-pick { grid-template-columns: 1fr; }
  .filters input, .filters select { min-width: 0; width: 100%; }
}
