*{box-sizing:border-box}body{margin:0;background:#f5f7f8;color:#152a3d;font:15px/1.55 system-ui,-apple-system,Segoe UI,Roboto,sans-serif}.cloud-shell{max-width:1050px;margin:32px auto;padding:0 18px 50px}.cloud-head{display:flex;align-items:center;gap:18px;margin-bottom:24px}.mark{height:57px;width:57px;border-radius:14px;background:#cc9c62;color:#14283d;display:grid;place-items:center;font-size:37px;flex-shrink:0}.eyebrow{letter-spacing:1.9px;font-size:10px;font-weight:800;color:#b17c42}.cloud-head h1{font-size:clamp(23px,4vw,35px);margin:4px 0}.cloud-head p{margin:0;color:#506072}.cloud-card{background:#fff;border:1px solid #dde4e9;border-radius:18px;padding:25px;margin:14px 0;box-shadow:0 5px 28px #243a4e09}.cloud-card h2{font-size:18px;margin:0 0 15px}.cloud-card p{color:#455b6e}.warning{border-radius:12px;background:#fdf4e8;border:1px solid #e3c49c;padding:16px;color:#684423}.status{background:#edf2f5;border:1px solid #d4dce2;border-radius:12px;padding:14px;min-height:50px;overflow-wrap:anywhere}.status.error{background:#fff1f0;border-color:#f0bdba;color:#9c3030}label{display:block;font-size:13px;font-weight:700;margin:12px 0}input,select{display:block;border:1px solid #a9bac7;padding:13px;width:100%;border-radius:9px;font:16px system-ui;margin-top:5px;background:white;color:#152a3d}button{border:1px solid #bfcbd4;padding:12px 17px;border-radius:10px;font-weight:750;cursor:pointer}button.primary{color:#fff;background:#14283d;border-color:#14283d}button:disabled{opacity:.5;cursor:not-allowed}.light{background:white;color:#173047}.subtle,small{color:#597082;font-size:12px}.cols{display:grid;grid-template-columns:1fr 1fr;gap:14px}.cloud-row{display:flex;justify-content:space-between;gap:14px;border-bottom:1px solid #e9edf0;padding:13px 0}.cloud-row strong{font-size:14px}.cloud-row small{white-space:nowrap}.head-row{display:flex;align-items:center;justify-content:space-between;gap:20px}.back{display:inline-block;margin:15px 0;text-decoration:none;color:#1d547d;font-weight:700}[hidden]{display:none!important}@media(max-width:670px){.cloud-shell{margin:12px auto;padding:0 12px 35px}.cloud-head{flex-wrap:wrap;align-items:center}.cloud-head-info{order:3;width:100%}.cloud-head .mark{order:1}.cloud-head .theme-switcher{order:2;margin-left:auto}.cloud-card{padding:18px}.cols{grid-template-columns:1fr}.cloud-row{flex-wrap:wrap}.cloud-row small{white-space:normal}.cloud-head p{font-size:13px}}

.sync-actions{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0}.sync-actions button{flex:1;min-width:230px}.legacy-body{padding-top:15px}details summary{cursor:pointer;font-weight:750;color:#1f3a4d}#cloud-revision-label{padding:9px 12px;background:#f1f4f7;border-radius:9px;overflow-wrap:anywhere}@media(max-width:500px){.sync-actions button{min-width:100%}}
.db-sync-row{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin:14px 0 6px}
.db-sync-feedback{margin:8px 0 0;padding:10px 14px;background:#eef4f8;border-radius:8px;font-size:13px;color:#1d4361;border-left:4px solid #cc9c62;display:flex;align-items:center;gap:8px;line-height:1.4}
.db-sync-feedback.syncing{background:#fff8ec;border-left-color:#e0a44f;color:#6d4b1a}
.db-sync-feedback.error{background:#fff1f0;border-left-color:#e0524f;color:#9c3030}

/* Safe areas para iPhone (iOS) e celulares Android */
body{padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px);padding-left:env(safe-area-inset-left,0px);padding-right:env(safe-area-inset-right,0px)}
@media(max-width:670px){
  .cloud-shell{padding:max(10px,env(safe-area-inset-top,0px)) max(14px,env(safe-area-inset-right,0px)) max(40px,env(safe-area-inset-bottom,0px)) max(14px,env(safe-area-inset-left,0px))}
  .head-row{flex-wrap:wrap}
}

/* V1.8.7: Seletor Discreto de Tema no Portal da Nuvem */
.theme-switcher {
  display: inline-flex;
  align-items: center;
  background: #eef2f5;
  border: 1px solid #d4dce2;
  border-radius: 9999px;
  padding: 2px;
  gap: 2px;
  user-select: none;
  flex-shrink: 0;
}
.cloud-head .theme-switcher {
  margin-left: auto;
}
.theme-btn {
  background: transparent;
  border: 0;
  border-radius: 9999px;
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  color: #597082;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.theme-btn:hover {
  color: #14283d;
}
.theme-btn.is-active,
.theme-btn[aria-pressed="true"] {
  background: #ffffff;
  color: #14283d;
  box-shadow: 0 1px 4px rgba(20, 40, 61, 0.16);
  font-weight: 700;
}
.cloud-head-info {
  flex: 1;
  min-width: 0;
}
.theme-btn:focus-visible {
  outline: 2px solid #cc9c62;
  outline-offset: 1px;
}
.theme-btn svg {
  width: 16px;
  height: 16px;
  display: block;
  flex-shrink: 0;
  pointer-events: none;
}

/* SOLAR STUDIO WW — Tema Escuro no Portal DEV */
:root[data-theme="dark"] {
  color-scheme: dark;
}
:root[data-theme="dark"] body {
  background: #0b141d;
  color: #e3ebf2;
}
:root[data-theme="dark"] .cloud-card {
  background: #13202e;
  border-color: #233446;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}
:root[data-theme="dark"] .cloud-head h1,
:root[data-theme="dark"] .cloud-card h2,
:root[data-theme="dark"] .cloud-row strong {
  color: #f0f4f8;
}
:root[data-theme="dark"] .cloud-head p,
:root[data-theme="dark"] .cloud-card p,
:root[data-theme="dark"] .subtle,
:root[data-theme="dark"] small {
  color: #8c9fae;
}
:root[data-theme="dark"] input,
:root[data-theme="dark"] select {
  background: #182838;
  border-color: #2a3d52;
  color: #f0f5fa;
}
:root[data-theme="dark"] input:focus,
:root[data-theme="dark"] select:focus {
  border-color: #cc9c62;
  outline: 2px solid rgba(204, 156, 98, 0.3);
}
:root[data-theme="dark"] button.light {
  background: #182838;
  border-color: #2a3d52;
  color: #d6e2ec;
}
:root[data-theme="dark"] button.light:hover {
  background: #1f3348;
  color: #ffffff;
}
:root[data-theme="dark"] .cloud-row {
  border-bottom-color: #203244;
}
:root[data-theme="dark"] .status {
  background: #101a24;
  border-color: #203244;
  color: #d6e2ec;
}
:root[data-theme="dark"] .status.error {
  background: #2a1414;
  border-color: #5c2828;
  color: #fca5a5;
}
:root[data-theme="dark"] .warning {
  background: #241a0d;
  border-color: #533816;
  color: #edd1a9;
}
:root[data-theme="dark"] #cloud-revision-label {
  background: #101a24;
  color: #8c9fae;
}
:root[data-theme="dark"] .db-sync-feedback {
  background: #101a24;
  color: #d6e2ec;
  border-left-color: #cc9c62;
}
:root[data-theme="dark"] .db-sync-feedback.syncing {
  background: #241a0d;
  color: #edd1a9;
  border-left-color: #e0a44f;
}
:root[data-theme="dark"] .db-sync-feedback.error {
  background: #2a1414;
  color: #fca5a5;
  border-left-color: #e0524f;
}
:root[data-theme="dark"] details summary {
  color: #adc1d0;
}
:root[data-theme="dark"] .back {
  color: #63a7d4;
}
:root[data-theme="dark"] .theme-switcher {
  background: #101c27;
  border-color: #223447;
}
:root[data-theme="dark"] .theme-btn {
  color: #8c9fae;
}
:root[data-theme="dark"] .theme-btn:hover {
  color: #f0f4f8;
}
:root[data-theme="dark"] .theme-btn.is-active,
:root[data-theme="dark"] .theme-btn[aria-pressed="true"] {
  background: #22384e;
  color: #f7fafc;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
