/* ==========================================================================
   IQ OPTION — PAINEL ADMINISTRATIVO HQ
   Design System: IQ Dark Slate & Orange Signature · Glassmorphism · Bento Grid
   ========================================================================== */

:root {
  /* Surfaces */
  --bg: #0e121a;
  --panel: #131822;
  --panel-elevated: #1a202c;
  --card: #1a202c;
  --card-elevated: #202838;
  --card-hover: #263042;
  
  /* Borders & Lines */
  --line: rgba(255, 255, 255, 0.06);
  --line-hover: rgba(255, 255, 255, 0.12);
  --line-purple: rgba(255, 84, 0, 0.22);
  --line-purple-bright: rgba(255, 110, 38, 0.55);
  
  /* Brand Violet / Purple */
  --purple: #ff5400;
  --purple-hover: #ff6e26;
  --purple-dark: #e04800;
  --purple-light: #ffc2a6;
  --purple-glow: 0 0 26px -2px rgba(255, 84, 0, 0.45);
  --purple-subtle: rgba(255, 84, 0, 0.08);

  /* Status Accents */
  --ok: #10b981;
  --ok-glow: rgba(16, 185, 129, 0.25);
  --bad: #f43f5e;
  --bad-glow: rgba(244, 63, 94, 0.25);
  --warn: #f59e0b;
  --warn-glow: rgba(245, 158, 11, 0.25);
  --gold: #eab308;

  /* Typography */
  --text: #f5f4fb;
  --text-secondary: #c4c0db;
  --muted: #7f7a9f;
  --font: -apple-system, BlinkMacSystemFont, 'Inter', 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;

  /* Radii */
  --radius-xl: 22px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --radius-pill: 9999px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.admin-app {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  background: radial-gradient(1000px circle at 85% 0%, rgba(255, 84, 0, 0.06), transparent 50%),
              radial-gradient(800px circle at 15% 100%, rgba(224, 72, 0, 0.05), transparent 45%),
              var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 84, 0, 0.4);
}

/* Form Elements */
input, select, textarea {
  font: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  width: 100%;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 84, 0, 0.6);
  box-shadow: 0 0 0 3px rgba(255, 84, 0, 0.18), var(--purple-glow);
}
input::placeholder, textarea::placeholder {
  color: var(--muted);
  opacity: 0.7;
}
input[type=checkbox] {
  width: 16px;
  height: 16px;
  accent-color: var(--purple);
  cursor: pointer;
}
textarea {
  min-height: 85px;
  resize: vertical;
}

/* ==========================================================================
   SIDEBAR DOCK
   ========================================================================== */
.sidebar {
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 16px 8px 14px 8px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 20;
  backdrop-filter: blur(20px);
}

.sidebar-top {
  padding: 0 4px 14px 4px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.brand img, .brand svg {
  height: 28px;
  width: auto;
  display: block;
  margin-left: 0;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}

/* Nav Items */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  overflow-y: auto;
  padding: 0;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 6px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 13px;
  border: 1px solid transparent;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.sidebar-nav a .nav-ico {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  margin-left: 0;
  margin-right: 2px;
  color: var(--muted);
  flex: 0 0 22px;
  transition: color 0.18s ease, transform 0.18s ease;
}
.sidebar-nav a span:not(.nav-ico) {
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-nav a:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  transform: translateX(2px);
}
.sidebar-nav a:hover .nav-ico {
  color: var(--purple-light);
}
.sidebar-nav a.active {
  background: linear-gradient(90deg, rgba(255, 84, 0, 0.18) 0%, rgba(255, 84, 0, 0.04) 100%);
  border: 1px solid rgba(255, 84, 0, 0.25);
  color: #fff;
  font-weight: 600;
  box-shadow: inset 0 0 16px rgba(255, 84, 0, 0.1);
}
.sidebar-nav a.active .nav-ico {
  color: var(--purple);
  filter: drop-shadow(0 0 8px rgba(255, 84, 0, 0.6));
}

.pill {
  background: var(--warn);
  color: #0b0914;
  font-size: 10px;
  border-radius: var(--radius-pill);
  padding: 1px 6px;
  font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}
.pill:empty {
  display: none;
}

/* Sidebar Footer */
.sidebar-foot {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.admin-profile-compact {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
}
.avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  box-shadow: 0 0 12px rgba(255, 84, 0, 0.35);
  flex-shrink: 0;
}
.profile-info {
  min-width: 0;
  flex: 1;
}
.profile-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-email {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.quick-links {
  display: flex;
  gap: 8px;
}
.foot-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  transition: all 0.15s ease;
}
.foot-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.15);
}
.foot-btn.logout:hover {
  background: rgba(244, 63, 94, 0.1);
  color: #fb7185;
  border-color: rgba(244, 63, 94, 0.3);
}

/* ==========================================================================
   TOPBAR COMMAND HEADER
   ========================================================================== */
.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 32px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(7, 6, 11, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 15;
}

.topbar-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.topbar-left h1 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}
.topbar-crumb {
  font-size: 11.5px;
  color: var(--muted);
}

.topbar-center {
  flex: 1;
  max-width: 440px;
  margin: 0 16px;
}
.search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.search-box .search-icon {
  position: absolute;
  left: 14px;
  color: var(--muted);
  display: grid;
  place-items: center;
  pointer-events: none;
}
.search-box input {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  padding: 8px 36px 8px 38px;
  font-size: 12.5px;
  color: var(--text);
  width: 100%;
  backdrop-filter: blur(10px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.search-box input:focus {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 84, 0, 0.55);
  box-shadow: 0 0 20px -2px rgba(255, 84, 0, 0.35);
}
.clear-search-btn {
  position: absolute;
  right: 12px;
  color: var(--muted);
  font-size: 12px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transition: color 0.15s ease, background 0.15s ease;
}
.clear-search-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Quick Ranges Segmented Control */
.quick-ranges {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
}
.range-pill {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
  transition: all 0.16s ease;
}
.range-pill:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}
.range-pill.active {
  background: var(--purple);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 0 16px rgba(255, 84, 0, 0.45);
}

.topbar-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  color: var(--text-secondary);
  transition: all 0.18s ease;
}
.topbar-icon-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  border-color: rgba(255, 84, 0, 0.35);
}

.actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Main View Container */
.view {
  padding: 24px 32px 64px;
  animation: viewEnter 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes viewEnter {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   GLASSMORPHISM BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 4px 14px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 84, 0, 0.35);
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 6px 20px rgba(255, 84, 0, 0.18);
  color: #fff;
}
.btn:active {
  transform: translateY(0.5px) scale(0.985);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

.btn.primary {
  background: linear-gradient(135deg, #ff5400 0%, #e04800 100%);
  border-color: rgba(255, 110, 38, 0.5);
  color: #fff;
  box-shadow: 0 4px 22px rgba(124, 58, 237, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn.primary:hover {
  background: linear-gradient(135deg, #ff6e26 0%, #ff5400 100%);
  box-shadow: 0 6px 30px rgba(255, 84, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transform: translateY(-1.5px);
}

.btn.ok {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34d399;
  box-shadow: inset 0 1px 0 rgba(16, 185, 129, 0.2), 0 4px 14px rgba(0, 0, 0, 0.3);
}
.btn.ok:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

.btn.bad {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.3);
  color: #fb7185;
  box-shadow: inset 0 1px 0 rgba(244, 63, 94, 0.2), 0 4px 14px rgba(0, 0, 0, 0.3);
}
.btn.bad:hover {
  background: rgba(244, 63, 94, 0.2);
  border-color: rgba(244, 63, 94, 0.5);
  box-shadow: 0 0 20px rgba(244, 63, 94, 0.3);
  color: #fda4af;
}

.btn.gold {
  background: rgba(234, 179, 8, 0.12);
  border-color: rgba(234, 179, 8, 0.35);
  color: #fde047;
  box-shadow: inset 0 1px 0 rgba(234, 179, 8, 0.2), 0 4px 14px rgba(0, 0, 0, 0.3);
}
.btn.gold:hover {
  background: rgba(234, 179, 8, 0.22);
  border-color: rgba(234, 179, 8, 0.6);
  box-shadow: 0 0 20px rgba(234, 179, 8, 0.3);
}

.btn.sm {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 6px;
}
.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  transition: all 0.15s ease;
}
.icon-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  border-color: var(--line-hover);
}

/* ==========================================================================
   BENTO GRID ARCHITECTURE (DASHBOARD)
   ========================================================================== */
.bento-hero {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 18px;
  margin-bottom: 20px;
}

.bento-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.bento-card:hover {
  border-color: var(--line-purple);
  box-shadow: 0 12px 36px -4px rgba(0, 0, 0, 0.6), 0 0 22px -4px rgba(255, 84, 0, 0.18);
  transform: translateY(-2px);
}
.bento-card.highlight {
  border-color: rgba(255, 84, 0, 0.35);
  background: radial-gradient(400px circle at 100% 0%, rgba(255, 84, 0, 0.09), transparent 60%),
              var(--card);
}

/* Card Header */
.bento-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.bento-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.bento-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  border: 1px solid var(--line);
}
.bento-tag.purple {
  background: rgba(255, 84, 0, 0.12);
  border-color: rgba(255, 84, 0, 0.3);
  color: var(--purple-light);
}

/* Big Balance Overview */
.bento-big-num {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: #fff;
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}
.bento-sub {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}
.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 700;
}
.stat-pill.pos {
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.stat-pill.neg {
  background: rgba(244, 63, 94, 0.14);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.25);
}

/* Glowing Curve Area Chart */
.chart-box {
  width: 100%;
  position: relative;
  margin-top: 8px;
}
.chart-svg {
  width: 100%;
  height: 180px;
  display: block;
  overflow: visible;
}
.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(18, 15, 32, 0.94);
  border: 1px solid rgba(255, 84, 0, 0.4);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6), 0 0 16px rgba(255, 84, 0, 0.3);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 12px;
  transform: translate(-50%, -115%);
  white-space: nowrap;
  z-index: 30;
  transition: opacity 0.15s ease, transform 0.1s ease;
  opacity: 0;
}
.chart-tooltip.visible {
  opacity: 1;
}

/* KPI Cards Grid */
.bento-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.kpi-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.kpi-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-purple);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5), 0 0 16px rgba(255, 84, 0, 0.14);
}
.kpi-card .kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.kpi-card .kpi-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.kpi-card .kpi-ico {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  color: var(--muted);
}
.kpi-card.ok .kpi-ico {
  color: #34d399;
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.2);
}
.kpi-card.bad .kpi-ico {
  color: #fb7185;
  background: rgba(244, 63, 94, 0.08);
  border-color: rgba(244, 63, 94, 0.2);
}
.kpi-card.purple .kpi-ico {
  color: var(--purple);
  background: rgba(255, 84, 0, 0.1);
  border-color: rgba(255, 84, 0, 0.25);
}
.kpi-card.warn .kpi-ico {
  color: #fde047;
  background: rgba(234, 179, 8, 0.08);
  border-color: rgba(234, 179, 8, 0.25);
}

.kpi-card .kpi-val {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: #fff;
  margin-bottom: 4px;
}
.kpi-card.ok .kpi-val { color: #34d399; }
.kpi-card.bad .kpi-val { color: #fb7185; }
.kpi-card.gold .kpi-val { color: #fde047; }

.kpi-card .kpi-footer {
  font-size: 11.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
.kpi-badge-alert {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-pill);
  padding: 1px 7px;
  font-size: 10.5px;
  font-weight: 700;
}

/* Secondary Filter Bar (Dashboard Specific) */
.dash-filters-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-bottom: 20px;
}
.filter-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.filter-date-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.filter-date-item input[type="date"] {
  width: auto;
  min-width: 130px;
  padding: 6px 10px;
  font-size: 12px;
}
.filter-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

/* ==========================================================================
   CARDS & TABLES
   ========================================================================== */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}
.card h3 {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card h3 small {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}
.grid-2 > *, .grid-3 > * { min-width: 0; }
.grid-2.grid-2-wide { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
@media (max-width: 1360px) { .grid-2.grid-2-wide { grid-template-columns: minmax(0, 1fr); } }

/* Data Table */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th {
  text-align: left;
  padding: 11px 14px;
  color: var(--muted);
  font-weight: 600;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
  white-space: nowrap;
}
th.num, td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  vertical-align: middle;
}
/* Células longas quebram em vez de empurrar a tabela para fora do card; números, tags e botões não quebram. */
td { overflow-wrap: anywhere; }
td.num, td .tag, td .btn, td .badge { white-space: nowrap; }
td pre { overflow-wrap: anywhere; white-space: pre-wrap; max-width: 100% !important; }
tr {
  transition: background 0.15s ease;
}
tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

.row-link {
  color: #fff;
  font-weight: 500;
  transition: color 0.15s;
}
.row-link:hover {
  color: var(--purple-light);
  text-decoration: underline;
}
.muted {
  color: var(--muted);
  font-size: 11.5px;
}

/* Status Tags (No Emojis) */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
  white-space: nowrap;
  border: 1px solid transparent;
}
.tag.active, .tag.approved, .tag.paid, .tag.won, .tag.finished {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.25);
}
.tag.blocked, .tag.rejected, .tag.lost, .tag.cancelled, .tag.bad {
  background: rgba(244, 63, 94, 0.12);
  color: #fb7185;
  border-color: rgba(244, 63, 94, 0.25);
}
.tag.pending, .tag.open, .tag.scheduled {
  background: rgba(245, 158, 11, 0.12);
  color: #fde047;
  border-color: rgba(245, 158, 11, 0.25);
}
.tag.vip {
  background: rgba(255, 84, 0, 0.15);
  color: var(--purple-light);
  border-color: rgba(255, 84, 0, 0.35);
  box-shadow: 0 0 10px rgba(255, 84, 0, 0.2);
}
.tag.marketing {
  background: rgba(236, 72, 153, 0.15);
  color: #f472b6;
  border-color: rgba(236, 72, 153, 0.3);
}
.tag.admin {
  background: linear-gradient(135deg, rgba(255, 84, 0, 0.25), rgba(224, 72, 0, 0.2));
  color: #ffc2a6;
  border-color: rgba(255, 110, 38, 0.4);
}

/* User Avatar Pill in Table */
.user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-cell-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--purple-light);
  flex-shrink: 0;
}

/* Empty State */
.empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
  font-size: 13.5px;
}

/* ==========================================================================
   DRAWER (SLIDE-OVER PANEL)
   ========================================================================== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 50;
}
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(780px, 100%);
  background: var(--panel);
  border-left: 1px solid var(--line);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.7);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 60;
  display: flex;
  flex-direction: column;
}
body.drawer-open .drawer {
  transform: translateX(0);
}
body.drawer-open .drawer-backdrop {
  opacity: 1;
  pointer-events: auto;
}
.drawer header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
}
.drawer header h2 {
  font-size: 17px;
  font-weight: 600;
  color: #fff;
}
.drawer-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

/* Forms inside Drawer / Views */
.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}
.form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.form label.full {
  grid-column: 1 / -1;
}
.form label.check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}
.form .hint {
  font-size: 11.5px;
  color: var(--muted);
  grid-column: 1 / -1;
  margin-top: -4px;
}
.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.section-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--purple-light);
  margin: 22px 0 10px;
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  margin: 18px 0 16px;
  overflow-x: auto;
}
.tabs button {
  padding: 9px 14px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  font-weight: 500;
  transition: all 0.15s ease;
}
.tabs button:hover {
  color: var(--text);
}
.tabs button.active {
  color: #fff;
  border-color: var(--purple);
}

.mini-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.mini-kpis div {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
}
.mini-kpis small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.mini-kpis strong {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

.note {
  font-size: 12.5px;
  color: var(--text-secondary);
  background: rgba(255, 84, 0, 0.06);
  border: 1px solid rgba(255, 84, 0, 0.2);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 16px;
}

/* ==========================================================================
   SUPPORT CHAT VIEW
   ========================================================================== */
.support {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 18px;
  height: calc(100vh - 150px);
  min-height: 460px;
}
.support-list {
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
}
.support-thread {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  transition: background 0.15s ease;
}
.support-thread:hover {
  background: rgba(255, 255, 255, 0.03);
}
.support-thread.active {
  background: rgba(255, 84, 0, 0.12);
  border-left: 3px solid var(--purple);
}
.support-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.support-when {
  font-size: 11px;
  color: var(--muted);
}
.support-chat {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  min-width: 0;
  overflow: hidden;
}
.support-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.support-head .btn {
  margin-left: auto;
}
.support-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.support-msg {
  max-width: 72%;
  background: var(--panel-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 13.5px;
  align-self: flex-start;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.support-msg.admin {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(255, 84, 0, 0.22), rgba(224, 72, 0, 0.28));
  border-color: rgba(255, 84, 0, 0.35);
}
.support-msg small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
.support-reply {
  display: flex;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
  align-items: flex-end;
}
.support-reply textarea {
  min-height: 60px;
}

/* SVG Icon Helper Style */
.svg-ico {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ==========================================================================
   RESPONSIVE LAYOUT
   ========================================================================== */
/* KPIs do dashboard (5 cards): 3 em cima + 2 embaixo, sem card sozinho na linha. */
.bento-kpi-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.bento-kpi-grid > .kpi-card { grid-column: span 2; min-width: 0; }
.bento-kpi-grid > .kpi-card:nth-child(n+4) { grid-column: span 3; }
@media (max-width: 1100px) {
  .bento-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento-kpi-grid > .kpi-card, .bento-kpi-grid > .kpi-card:nth-child(n+4) { grid-column: span 1; }
  .bento-kpi-grid > .kpi-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .bento-kpi-grid { grid-template-columns: minmax(0, 1fr); }
  .bento-kpi-grid > .kpi-card:last-child:nth-child(odd) { grid-column: auto; }
}

@media (max-width: 1200px) {
  .bento-hero {
    grid-template-columns: 1fr;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  body.admin-app {
    grid-template-columns: 1fr;
    position: relative;
  }
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 95;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }
  body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 4px 0 28px rgba(0, 0, 0, 0.6);
    background: #0d121f;
    display: flex;
    flex-direction: column;
    padding: 16px 14px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  body.sidebar-open .sidebar {
    transform: translateX(0);
  }
  .sidebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px 14px 4px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--line);
  }
  .sidebar-close-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .sidebar-close-btn:active {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
  }
  .sidebar-nav {
    flex-direction: column;
    flex-wrap: nowrap;
    overflow-y: auto;
    gap: 4px;
  }
  .sidebar-nav a {
    padding: 10px 12px;
    font-size: 13.5px;
  }
  .mobile-menu-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  .mobile-menu-btn:active {
    background: rgba(255, 255, 255, 0.14);
  }
  .topbar {
    padding: 12px 16px;
    gap: 12px;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .topbar-titles h1 {
    font-size: 18px;
  }
  .topbar-titles .topbar-crumb {
    font-size: 11px;
  }
  .topbar-center {
    width: 100%;
    max-width: 100%;
    margin: 4px 0 0 0;
    order: 3;
  }
  .topbar-right {
    margin-left: auto;
  }
  .view {
    padding: 14px 14px calc(24px + env(safe-area-inset-bottom, 24px));
  }
  .form {
    grid-template-columns: 1fr;
  }
  .support {
    grid-template-columns: 1fr;
    height: auto;
  }
}

/* Celular: a barra de cima quebra linha (o "Trancar" da Personalização cabia fora da tela) e os cartões de
   imagem da Personalização empilham a prévia em cima do texto. */
@media (max-width: 600px) {
  .topbar-right { flex-wrap: wrap; }
  .brand-img { flex-direction: column; align-items: stretch !important; }
  .brand-img > div:first-child { width: 100% !important; height: 90px !important; }
  .brand-img input[type=file] { width: 100%; max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .drawer, .drawer-backdrop, .btn, .bento-card, .kpi-card {
    transition: none !important;
    animation: none !important;
  }
}

/* Login próprio do painel */
.admin-login { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: #0b0f19; }
.admin-login[hidden] { display: none; }
.admin-login-card { width: min(360px, 92vw); display: grid; gap: 14px; padding: 28px; border-radius: 16px; background: #111827; border: 1px solid #1f2937; color: #e5e7eb; }
.admin-login-logo { height: 28px; justify-self: start; }
.admin-login-card h1 { margin: 0; font-size: 18px; }
.admin-login-card label { display: grid; gap: 6px; font-size: 12px; color: #9ca3af; }
.admin-login-card input { padding: 10px 12px; border-radius: 8px; border: 1px solid #374151; background: #0b0f19; color: #fff; font-size: 14px; }
.admin-login-err { min-height: 16px; margin: 0; font-size: 12px; color: #fca5a5; }
body.admin-locked > :not(#adminLogin) { display: none !important; }

/* Tela Segurança */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.kpi { display: grid; gap: 4px; padding: 14px 16px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); }
.kpi b { font-size: 22px; color: #fff; }
.kpi span { font-size: 12px; color: var(--muted, #9ca3af); }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-form input { padding: 8px 10px; border-radius: 8px; border: 1px solid #374151; background: #0b0f19; color: #fff; font-size: 13px; }
.btn.danger { background: rgba(239,68,68,.15); color: #fca5a5; border: 1px solid rgba(239,68,68,.4); }
.btn.danger:hover { background: rgba(239,68,68,.28); }
.admin-login-card label[hidden] { display: none; }
.inline-form input { width: auto; flex: 1 1 180px; }

/* IQWIN - Direcionador de Velas */
.mw-banner-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-bottom: 20px; }
.mw-banner { display: flex; align-items: flex-start; gap: 14px; padding: 16px; border-radius: 12px; background: rgba(30, 41, 59, 0.4); border: 1px solid rgba(255, 255, 255, 0.08); }
.mw-banner-purple { border-color: rgba(147, 51, 234, 0.3); background: linear-gradient(135deg, rgba(88, 28, 135, 0.25), rgba(17, 24, 39, 0.6)); }
.mw-banner-amber { border-color: rgba(245, 158, 11, 0.3); background: linear-gradient(135deg, rgba(120, 53, 15, 0.25), rgba(17, 24, 39, 0.6)); }
.mw-banner-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.mw-banner-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.mw-banner-text { font-size: 11px; color: #94a3b8; line-height: 1.5; }

.vbtn { border: 1px solid rgba(255, 255, 255, 0.12); padding: 5px 12px; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; transition: all .15s; background: rgba(30, 41, 59, 0.6); color: #cbd5e1; }
.vbtn:hover { background: rgba(51, 65, 85, 0.8); color: #fff; }
.vbtn-active { border-color: #ff5400 !important; background: #ff5400 !important; color: #fff !important; box-shadow: 0 0 10px rgba(124, 58, 237, 0.4); }
.vbtn-up.vbtn-active { border-color: #10b981 !important; background: #10b981 !important; box-shadow: 0 0 10px rgba(16, 185, 129, 0.4); }
.vbtn-down.vbtn-active { border-color: #ef4444 !important; background: #ef4444 !important; box-shadow: 0 0 10px rgba(239, 68, 68, 0.4); }
.vbtn-mkt.vbtn-active { border-color: #64748b !important; background: #64748b !important; }

/* Switch Toggle */
.mw-switch { position: relative; display: inline-block; width: 38px; height: 22px; vertical-align: middle; }
.mw-switch input { opacity: 0; width: 0; height: 0; }
.mw-slider { position: absolute; cursor: pointer; inset: 0; background-color: #334155; transition: .2s; border-radius: 22px; }
.mw-slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 3px; bottom: 3px; background-color: white; transition: .2s; border-radius: 50%; }
.mw-switch input:checked + .mw-slider { background-color: #ff5400; }
.mw-switch input:checked + .mw-slider:before { transform: translateX(16px); }
.mw-switch input:disabled + .mw-slider { opacity: 0.5; cursor: not-allowed; }

.mw-badge-up { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); }
.mw-badge-down { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.4); }
.mw-badge-mkt { background: rgba(100, 116, 139, 0.2); color: #94a3b8; border: 1px solid rgba(100, 116, 139, 0.4); }
.mw-badge-locked { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }

/* Helper styles for Mobile & Desktop layout */
.mobile-menu-btn { display: none; }
.sidebar-close-btn { display: none; }
.sidebar-backdrop { display: none; }
.mw-type-pill-mobile { display: none; }
.mw-type-pill-desktop { display: inline-flex; }
.mw-switch-label { display: none; }
.mw-action-wrap { display: flex; align-items: center; gap: 12px; }
.mw-switch-row { display: flex; align-items: center; }
.mw-ctl-btns { display: flex; gap: 6px; align-items: center; }
.mw-lock-wrap { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #fbbf24; }

/* IQWIN Mobile Optimizations */
@media (max-width: 768px) {
  /* No IQWIN, oculta a barra de busca do topo pois há campo de busca dedicado nos cards */
  body[data-view="iqwin"] .topbar-center {
    display: none !important;
  }
  .mw-topbar-speed {
    display: none !important;
  }

  /* Toolbar IQWIN no mobile */
  .iqwin-toolbar {
    padding: 12px 14px !important;
  }
  .iqwin-sync-indicator {
    display: none !important;
  }
  .mw-filter-pills {
    width: 100%;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .mw-filter-pills::-webkit-scrollbar {
    display: none;
  }
  .mw-speed-bar {
    padding: 12px 14px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .mw-speed-bar > div:last-child {
    max-width: 100% !important;
  }

  .iqwin-table-wrap {
    overflow-x: visible !important;
    padding: 0 12px 14px !important;
    background: transparent !important;
  }

  /* IQWIN Table -> Modern Native Mobile Cards */
  #iqwinTable,
  #iqwinTable tbody {
    display: block;
    width: 100%;
  }
  #iqwinTable thead {
    display: none;
  }
  #iqwinTable tbody tr {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto;
    gap: 10px 12px;
    align-items: center;
    padding: 16px 14px;
    margin-bottom: 12px;
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
    box-sizing: border-box;
    width: 100%;
  }
  #iqwinTable tbody tr:last-child {
    margin-bottom: 0;
  }
  .mw-col-id {
    display: none !important;
  }
  .mw-col-type {
    display: none !important;
  }
  .mw-type-pill-mobile {
    display: inline-flex !important;
  }
  .mw-col-ticker {
    grid-column: 1;
    grid-row: 1;
    padding: 0 !important;
    border: none !important;
  }
  .mw-col-price {
    grid-column: 2;
    grid-row: 1;
    text-align: right;
    font-size: 16px !important;
    font-weight: 800;
    color: #10b981;
    padding: 0 !important;
    border: none !important;
    justify-self: end;
    font-variant-numeric: tabular-nums;
  }
  .mw-col-status {
    grid-column: 1 / -1;
    grid-row: 2;
    padding: 10px 0 !important;
    border: none !important;
    border-top: 1px dashed rgba(255, 255, 255, 0.08) !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
  }
  .mw-col-actions {
    grid-column: 1 / -1;
    grid-row: 3;
    padding: 8px 0 0 0 !important;
    border: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    width: 100%;
  }
  .mw-action-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }
  .mw-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
  .mw-switch-label {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
  }
  /* Large touch switch for mobile thumbs */
  .mw-switch {
    width: 52px;
    height: 30px;
  }
  .mw-slider {
    border-radius: 30px;
  }
  .mw-slider:before {
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    border-radius: 50%;
  }
  .mw-switch input:checked + .mw-slider:before {
    transform: translateX(22px);
  }
  .mw-ctl-btns {
    display: flex;
    width: 100%;
    gap: 8px;
  }
  .vbtn {
    flex: 1 1 0;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    border-radius: 10px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
  }
  .vbtn:active {
    transform: scale(0.96);
  }
  .mw-lock-wrap {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
  }

  /* Evita auto-zoom do Safari no iOS ao focar em inputs */
  input[type="text"],
  input[type="search"],
  input[type="password"],
  input[type="email"],
  input[type="number"],
  select,
  textarea {
    font-size: 16px !important;
  }

  /* KPIs 2 colunas no mobile */
  .kpis {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  .kpis .kpi:last-child:nth-child(odd) {
    grid-column: 1 / -1 !important;
  }
}
