/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Backgrounds — tom sobre tom laranja/âmbar */
  --bg:       #fef3e8;
  --surface:  #fff8f2;
  --surface2: #fde8cc;
  --border:   #f5cfa4;

  /* Primária — laranja */
  --primary:       #ea6c0a;
  --primary-hover: #d45e07;
  --primary-dark:  #b34d05;
  --primary-dim:   rgba(234, 108, 10, 0.12);
  --primary-glow:  rgba(234, 108, 10, 0.20);

  /* Alias */
  --accent:       #ea6c0a;
  --accent-hover: #d45e07;
  --accent-light: #fb923c;

  /* Status */
  --green:  #16a34a;
  --yellow: #b45309;
  --red:    #dc2626;
  --blue:   #2563eb;

  /* Texto — tons quentes da mesma família */
  --text:       #431506;
  --text-muted: #92400e;
  --text-dim:   #d4956a;

  /* Misc */
  --radius: 8px;
  --shadow: 0 4px 20px rgba(120, 50, 10, 0.10);
  --navbar-h: 58px;
}

html, body {
  height: 100%;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }

/* ===== Layout ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }

/* ===== Navbar ===== */
.navbar {
  background: linear-gradient(90deg, #fff8f2 0%, #fef6ee 60%, #fff8f2 100%);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: var(--navbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(120, 50, 10, 0.08);
}
.navbar-brand {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.3px;
}
.navbar-brand .brand-accent { color: var(--primary); }
.navbar-brand svg { width: 22px; height: 22px; color: var(--primary); }
.navbar-user { display: flex; align-items: center; gap: 12px; color: var(--text-muted); font-size: 13px; }
.navbar-user strong { color: var(--text); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s, opacity 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(234, 108, 10, 0.30);
}
.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  box-shadow: 0 2px 16px rgba(234, 108, 10, 0.40);
}
.btn-success {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(234, 108, 10, 0.28);
}
.btn-success:hover:not(:disabled) { background: var(--primary-hover); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #dc2626; }
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--surface2);
  color: var(--primary);
  border-color: var(--primary);
}
.btn-sm { padding: 5px 10px; font-size: 12px; }

/* ===== Cards ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title svg { width: 18px; height: 18px; color: var(--primary); }

/* ===== Tables ===== */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
thead { background: var(--surface2); }
th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface2); }

/* ===== Forms ===== */
.form-group { margin-bottom: 14px; }
label { display: block; font-size: 12px; font-weight: 500; color: var(--text-muted); margin-bottom: 5px; }
input, select, textarea {
  width: 100%;
  padding: 9px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(234, 108, 10, 0.18);
}
input::placeholder { color: var(--text-dim); }
select option { background: var(--surface2); }

/* ===== Badges ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.badge-green  { background: rgba(22,163,74,.12);   color: #15803d; }
.badge-yellow { background: rgba(217,119,6,.12);  color: #b45309; }
.badge-red    { background: rgba(220,38,38,.12);  color: #b91c1c; }
.badge-blue   { background: rgba(37,99,235,.12);  color: #1d4ed8; }
.badge-gray   { background: rgba(120,113,108,.10); color: var(--text-muted); }

/* ===== Auth Page ===== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(234,108,10,0.10) 0%, transparent 55%),
    radial-gradient(ellipse at 90% 110%, rgba(180,77,5,0.07) 0%, transparent 50%),
    var(--bg);
}
.auth-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 38px 42px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow), 0 0 40px rgba(249,115,22,0.05);
}
.auth-logo {
  text-align: center;
  margin-bottom: 26px;
}
.auth-logo h1 {
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.5px;
}
.auth-logo h1 span { color: var(--primary); }
.auth-logo p { color: var(--text-muted); font-size: 13px; margin-top: 4px; }
.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.auth-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
}
.auth-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.auth-form { display: none; }
.auth-form.active { display: block; }

/* ===== Dashboard Layout ===== */
.layout { display: flex; min-height: calc(100vh - var(--navbar-h)); }
.sidebar {
  width: 224px;
  background: linear-gradient(180deg, #fef0e0 0%, #fde8cc 100%);
  border-right: 1px solid var(--border);
  padding: 16px 0 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  transition: width 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  border-left: 3px solid transparent;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.sidebar-item:hover { color: var(--primary); background: rgba(234,108,10,0.09); }
.sidebar-item.active {
  color: var(--primary);
  border-left-color: var(--primary);
  background: rgba(234,108,10,0.13);
}
.sidebar-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.sidebar-label { transition: opacity 0.15s; }
.sidebar-section {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 16px 20px 6px;
  white-space: nowrap;
}

/* Botão de colapso */
.sidebar-collapse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  width: 100%;
  padding: 12px 0;
  background: none;
  border: none;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.sidebar-collapse-btn:hover { color: var(--primary); background: rgba(234,108,10,0.09); }
.sidebar-collapse-btn svg { transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1); flex-shrink: 0; }

/* Estado colapsado (desktop) */
.sidebar.collapsed { width: 56px; }
.sidebar.collapsed .sidebar-label { opacity: 0; width: 0; overflow: hidden; display: inline-block; }
.sidebar.collapsed .sidebar-section .sidebar-label { display: none; }
.sidebar.collapsed .sidebar-item { padding: 10px 0; justify-content: center; border-left-color: transparent !important; }
.sidebar.collapsed .sidebar-item.active { background: rgba(234,108,10,0.13); }
.sidebar.collapsed .sidebar-item.active svg { color: var(--primary); }

.main-content { flex: 1; padding: 28px; overflow: auto; }

/* ===== Section ===== */
.section { display: none; }
.section.active { display: block; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

/* Meu Cadastro — sem scroll de página */
#section-cadastro.active {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--navbar-h) - 56px); /* 56px = padding main 28×2 */
}
#section-cadastro .section-header { flex-shrink: 0; }
#cadastro-content {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
#cadastro-content .cad-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  height: 100%;
}
.cad-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.cad-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.cad-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cad-card-fields {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 2px;
}
.cad-card-fields::-webkit-scrollbar { width: 3px; }
.cad-card-fields::-webkit-scrollbar-track { background: transparent; }
.cad-card-fields::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
.cad-card-footer { flex-shrink: 0; margin-top: 14px; }
.section-title { font-size: 20px; font-weight: 700; }
.section-sub { color: var(--text-muted); font-size: 13px; margin-top: 2px; }

/* ===== Plan Cards ===== */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.plan-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 22px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}
.plan-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(234,108,10,0.15);
}
.plan-card.selected {
  border-color: var(--primary);
  background: rgba(234,108,10,0.07);
  box-shadow: 0 0 24px rgba(234,108,10,0.15);
}
.plan-name { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.plan-price {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 14px;
}
.plan-price span { font-size: 13px; color: var(--text-muted); font-weight: 400; }
.plan-specs { list-style: none; }
.plan-specs li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}
.plan-specs li svg { width: 14px; height: 14px; color: var(--primary); flex-shrink: 0; }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  backdrop-filter: blur(3px);
}
.modal-overlay.hidden { display: none; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow), 0 0 30px rgba(249,115,22,0.05);
}
.modal-title { font-size: 18px; font-weight: 700; margin-bottom: 20px; }
.modal-footer { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* ===== Alerts ===== */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 12px;
}
.alert-error   { background: rgba(220,38,38,.08);  color: #b91c1c; border: 1px solid rgba(220,38,38,.25); }
.alert-success { background: rgba(22,163,74,.08);  color: #15803d; border: 1px solid rgba(22,163,74,.25); }
.alert-info    { background: rgba(37,99,235,.08);  color: #1d4ed8; border: 1px solid rgba(37,99,235,.25); }
.hidden { display: none !important; }

/* ===== Stats ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--primary);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.stat-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.stat-value { font-size: 28px; font-weight: 800; margin-top: 4px; color: var(--primary); }

/* ===== VPS Cards (client) ===== */
.vps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.vps-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.vps-card:hover {
  border-color: rgba(234,108,10,0.45);
  box-shadow: 0 4px 18px rgba(234,108,10,0.12);
}
.vps-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.vps-hostname { font-size: 14px; font-weight: 600; word-break: break-all; color: var(--text); }
.vps-info { list-style: none; }
.vps-info li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font-size: 12px;
  border-top: 1px solid var(--border);
}
.vps-info li:first-child { border-top: none; }
.vps-info .label { color: var(--text-muted); }
.vps-info .value { font-weight: 500; font-family: 'DM Mono', monospace; }
.copy-btn { cursor: pointer; color: var(--primary); }
.copy-btn:hover { color: var(--primary-hover); }

/* ===== Consumo / Usage Cards ===== */
.usage-list-wrap { display: flex; flex-direction: column; gap: 14px; }

.usage-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.usage-card:hover {
  border-color: rgba(234,108,10,0.35);
  box-shadow: 0 2px 14px rgba(234,108,10,0.10);
}
.usage-card-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  gap: 10px;
}
.usage-card-hdr-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.usage-live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px rgba(22,163,74,0.50);
  flex-shrink: 0;
  animation: pulse 2.2s ease-in-out infinite;
}
.usage-hostname { font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.usage-meta     { font-size: 10px; color: var(--text-muted); margin-top: 1px; }
.usage-card-hdr-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.usage-card-body { padding: 14px 16px; }

/* Metric cells */
.usage-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.usage-metric-cell {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.usage-metric-lbl {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
}
.usage-metric-lbl-right { margin-left: auto; font-size: 9px; font-weight: 500; color: var(--text-dim); text-transform: none; letter-spacing: 0; }
.usage-metric-val {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  margin-top: 3px;
}
.usage-metric-sub {
  font-size: 10px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.usage-metric-divider {
  height: 1px;
  background: var(--border);
  margin: 3px 0;
}
.usage-bar {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 5px;
}
.usage-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.7s ease;
}

/* History charts */
.usage-hist-wrap {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.usage-hist-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.usage-hist-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.usage-chart-panel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 10px 12px;
}
.usage-chart-lbl {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.usage-chart-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

/* Responsive */
@media (max-width: 900px) {
  .usage-metric-grid { grid-template-columns: 1fr 1fr; }
  .usage-hist-grid   { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .usage-metric-grid { grid-template-columns: 1fr; }
  .usage-hist-grid   { grid-template-columns: 1fr; }
  .usage-card-hdr    { flex-wrap: wrap; }
}

/* Consumo compacto — grids inline via JS */
@media (max-width: 900px) {
  #usage-list [style*="grid-template-columns:repeat(6"] { grid-template-columns: repeat(3,1fr) !important; }
  #usage-list [style*="grid-template-columns:repeat(4"] { grid-template-columns: repeat(2,1fr) !important; }
}
@media (max-width: 540px) {
  #usage-list [style*="grid-template-columns:repeat(6"] { grid-template-columns: repeat(2,1fr) !important; }
  #usage-list [style*="grid-template-columns:repeat(4"] { grid-template-columns: repeat(2,1fr) !important; }
}

/* ===== Loading spinner ===== */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.65s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Empty state ===== */
.empty { text-align: center; padding: 60px 20px; color: var(--text-dim); }
.empty svg { width: 48px; height: 48px; margin-bottom: 12px; opacity: 0.2; }
.empty p { font-size: 14px; }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface2); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ===== Code ===== */
code {
  background: rgba(234,108,10,0.10);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--primary-dark);
}

/* ===== Hamburger ===== */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.2s;
}

/* ===== Sidebar overlay (mobile) ===== */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--navbar-h);
  background: rgba(0,0,0,0.55);
  z-index: 199;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.open { display: block; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  /* Hamburger visível */
  .hamburger { display: flex; }

  /* Botão de colapso oculto no mobile */
  .sidebar-collapse-btn { display: none; }

  /* Sidebar vira drawer lateral */
  .sidebar {
    position: fixed;
    left: -260px;
    top: var(--navbar-h);
    height: calc(100vh - var(--navbar-h));
    width: 240px !important;
    z-index: 200;
    transition: left 0.25s ease;
    overflow-y: auto;
    padding-bottom: 24px;
  }
  .sidebar.open {
    left: 0;
    box-shadow: 6px 0 24px rgba(0,0,0,0.12);
  }
  /* Garante labels visíveis no drawer mobile mesmo se colapsado no desktop */
  .sidebar .sidebar-label { opacity: 1 !important; width: auto !important; display: inline !important; }
  .sidebar .sidebar-item { padding: 10px 20px !important; justify-content: flex-start !important; }
  .sidebar .sidebar-section .sidebar-label { display: inline !important; }

  /* Layout: main-content ocupa 100% */
  .layout { display: block; }
  .main-content { padding: 16px; }

  /* Navbar */
  .navbar { padding: 0 14px; }
  .navbar-greeting { display: none; }

  /* Auth */
  .auth-box { padding: 24px 18px; margin: 16px; }

  /* Grids — coluna única */
  .vps-grid { grid-template-columns: 1fr; }
  .plans-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }

  /* Meu Cadastro — empilha cards no mobile */
  #cadastro-content .cad-grid { grid-template-columns: 1fr !important; }
  #section-cadastro.active { height: auto; }
  #cadastro-content { overflow: auto; }

  /* Section header */
  .section-title { font-size: 17px; }
  .section-header { flex-wrap: wrap; gap: 10px; }

  /* Modais dinâmicos (criados via JS) */
  .modal { margin: 0 12px; }
}

@media (max-width: 480px) {
  /* Telas muito pequenas */
  .stats-grid { grid-template-columns: 1fr; }
  .main-content { padding: 12px; }
  .section-title { font-size: 15px; }

  /* Botões de ação da VPS em wrap */
  .power-btn { width: 34px !important; height: 34px !important; }

  /* Navbar compacta */
  .navbar { padding: 0 10px; }
  .btn-sm { padding: 5px 8px; font-size: 11px; }
}
