/* ==========================================================================
   O CÉREBRO — DESIGN SYSTEM: DARK EMERALD & OBSIDIAN
   Aesthetics: Deep Forest Obsidian, High-End Emerald Accents, Glassmorphism
   Zero Emojis — Strictly Refined Typography and Vector Icons
   ========================================================================== */

:root {
  /* Dark Green Theme Color Palette */
  --bg-deep: #050d09;
  --bg-main: #07130e;
  --bg-surface: #0a1b14;
  --bg-panel: rgba(10, 27, 20, 0.75);
  --bg-panel-hover: rgba(14, 38, 28, 0.85);
  
  --border-subtle: rgba(52, 211, 153, 0.12);
  --border-medium: rgba(52, 211, 153, 0.22);
  --border-focus: #10b981;

  /* Primary Emerald Brand Colors */
  --primary: #10b981;
  --primary-hover: #059669;
  --primary-dark: #047857;
  --primary-light: #34d399;
  --primary-glow: rgba(16, 185, 129, 0.35);

  /* Secondary Accents */
  --accent-teal: #14b8a6;
  --accent-sage: #6ee7b7;
  --accent-purple: #a855f7;
  --purple: #a855f7;
  --emerald: #10b981;
  --amber: #f59e0b;
  --amber-glow: rgba(245, 158, 11, 0.25);
  --rose: #f43f5e;
  --rose-glow: rgba(244, 63, 94, 0.25);
  --blue: #0ea5e9;

  /* Text Hierarchy */
  --text-main: #f0fdf4;
  --text-primary: #f0fdf4;
  --text-secondary: #a7f3d0;
  --text-muted: #6ee7b7;
  --text-dim: #4b6357;

  /* Shapes & Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 9999px;

  /* Elevation & Shadows */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 20px -3px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px var(--primary-glow);
  --shadow-panel: 0 8px 32px 0 rgba(0, 15, 8, 0.5);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition-fast: 0.16s ease;
  --transition-normal: 0.26s ease;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-deep);
  background-image: 
    radial-gradient(at 15% 10%, rgba(16, 185, 129, 0.14) 0px, transparent 45%),
    radial-gradient(at 85% 90%, rgba(5, 150, 105, 0.10) 0px, transparent 50%),
    linear-gradient(180deg, #050d09 0%, #07130e 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #050d09;
}
::-webkit-scrollbar-thumb {
  background: rgba(52, 211, 153, 0.25);
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: all var(--transition-fast);
}
a:hover {
  color: #ffffff;
  text-shadow: 0 0 8px var(--primary-glow);
}

/* Glassmorphism Panel */
.glass-panel {
  background: var(--bg-panel);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
  transition: border-color var(--transition-fast);
}
.glass-panel:hover {
  border-color: var(--border-medium);
}

/* Utilities */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-dim); }
.text-emerald { color: var(--primary-light); }
.text-amber { color: var(--amber); }
.text-rose { color: var(--rose); }

/* Glows */
.glow-icon {
  color: var(--primary);
  filter: drop-shadow(0 0 10px var(--primary));
}
.glow-text {
  color: var(--primary-light);
  text-shadow: 0 0 10px var(--primary-glow);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.badge-version {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.badge-counter {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  margin-left: auto;
}
.badge-admin {
  background: rgba(16, 185, 129, 0.2);
  color: #a7f3d0;
  border: 1px solid rgba(16, 185, 129, 0.4);
}
.badge-user {
  background: rgba(20, 184, 166, 0.2);
  color: #99f6e4;
  border: 1px solid rgba(20, 184, 166, 0.4);
}
.badge-success {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.badge-warning {
  background: rgba(245, 158, 11, 0.18);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.badge-danger {
  background: rgba(244, 63, 94, 0.18);
  color: #fecdd3;
  border: 1px solid rgba(244, 63, 94, 0.35);
}

/* Status Indicators */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}
.status-dot.success {
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
}
.status-dot.warning {
  background: var(--amber);
  box-shadow: 0 0 10px var(--amber);
}
.status-dot.danger {
  background: var(--rose);
  box-shadow: 0 0 10px var(--rose);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  outline: none;
  letter-spacing: 0.2px;
}
.btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--primary-glow);
  border: 1px solid rgba(52, 211, 153, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #34d399 0%, #059669 100%);
  box-shadow: 0 6px 20px var(--primary-glow);
}
.btn-primary:active {
  transform: translateY(0);
}
.btn-secondary {
  background: rgba(16, 185, 129, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}
.btn-secondary:hover {
  background: rgba(16, 185, 129, 0.16);
  border-color: var(--border-medium);
  color: #ffffff;
}
.btn-danger {
  background: linear-gradient(135deg, #f43f5e 0%, #be123c 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--rose-glow);
  border: 1px solid rgba(244, 63, 94, 0.3);
}
.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--rose-glow);
}
.btn-block { width: 100%; }
.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}
.btn-lg {
  padding: 14px 24px;
  font-size: 0.98rem;
}
.btn-link {
  background: none;
  border: none;
  color: var(--primary-light);
  font-weight: 600;
  cursor: pointer;
  padding: 0 4px;
}
.btn-link:hover {
  color: #ffffff;
  text-decoration: underline;
}
.btn-icon {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-icon:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--border-medium);
  color: #ffffff;
}

/* ==========================================================================
   AUTH SCREEN (Login & Register)
   ========================================================================== */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-card {
  width: 100%;
  max-width: 440px;
  padding: 38px;
  animation: fadeIn 0.35s ease-out;
  border-top: 3px solid var(--primary);
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.auth-header {
  text-align: center;
  margin-bottom: 28px;
}
.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.auth-subtitle {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-top: 6px;
}
.auth-form {
  display: none;
  flex-direction: column;
  gap: 18px;
}
.auth-form.active {
  display: flex;
}
.form-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.form-note {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  color: #a7f3d0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.45;
}
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.input-group label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* High-End Form Inputs */
.input-group input,
.input-group textarea,
.input-group select,
select {
  width: 100%;
  box-sizing: border-box;
  background: rgba(5, 16, 11, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: #ffffff;
  font-size: 0.92rem;
  font-family: inherit;
  transition: all var(--transition-fast);
}

.input-group select,
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2334d399' stroke-width='2.2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 13px 13px;
  padding-right: 36px;
  cursor: pointer;
}

.input-group select option,
select option {
  background-color: #06130e;
  color: #f0fdf4;
  padding: 10px;
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(7, 22, 15, 0.95);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Fix browser autofill white background */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #06170f inset !important;
  -webkit-text-fill-color: #ffffff !important;
  border: 1px solid var(--border-subtle) !important;
  transition: background-color 5000s ease-in-out 0s;
  caret-color: #ffffff;
}
.password-wrapper {
  position: relative;
  width: 100%;
  display: block;
  box-sizing: border-box;
}
.password-wrapper input {
  width: 100% !important;
  display: block !important;
  box-sizing: border-box !important;
  padding-right: 46px !important;
}
.btn-toggle-pass {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 1.05rem;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  line-height: 1;
  transition: color var(--transition-fast);
}
.btn-toggle-pass:hover {
  color: var(--primary-light);
}
.auth-footer {
  margin-top: 10px;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-dim);
}

/* ==========================================================================
   SOPHISTICATED DROPDOWNS (<select>)
   ========================================================================== */
.custom-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #071911;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2334d399'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 16px;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 12px 42px 12px 16px;
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-fast);
  width: 100%;
}
.custom-select:hover {
  border-color: var(--primary);
  background-color: #092016;
}
.custom-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background-color: #0a251a;
}
.custom-select option {
  background-color: #071810;
  color: #f0fdf4;
  padding: 12px;
  font-size: 0.92rem;
}

/* ==========================================================================
   HIGH-END SEARCH BAR
   ========================================================================== */
.search-bar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 440px;
}
.search-input-wrapper i.search-icon {
  position: absolute;
  left: 14px;
  color: var(--primary-light);
  font-size: 0.95rem;
  pointer-events: none;
}
.search-input-wrapper input {
  width: 100%;
  background: rgba(5, 16, 11, 0.85);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-pill);
  padding: 11px 40px 11px 42px !important;
  color: #ffffff;
  font-size: 0.9rem;
  font-family: inherit;
  transition: all var(--transition-fast);
}
.search-input-wrapper input:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(7, 23, 16, 0.95);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.btn-clear-search {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  transition: all var(--transition-fast);
}
.btn-clear-search:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}
.search-results-counter {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ==========================================================================
   MAIN DASHBOARD LAYOUT (Sidebar + Main)
   ========================================================================== */
.app-wrapper {
  display: flex;
  min-height: 100vh;
  position: relative;
  width: 100%;
}
/* Mobile Sidebar Overlay */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 10, 7, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99990;
  transition: opacity 0.25s ease;
}
.sidebar-overlay.hidden {
  display: none;
}
.sidebar {
  width: 260px;
  min-height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  border-radius: 0;
  border-top: none;
  border-left: none;
  border-bottom: none;
  border-right: 1px solid var(--border-subtle);
  background: rgba(7, 19, 14, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 90;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.sidebar-header {
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}
.sidebar-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mobile-sidebar-close {
  display: none;
  color: var(--text-dim);
  font-size: 1.1rem;
  padding: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.mobile-sidebar-close:hover {
  color: #ffffff;
}
.brand-name {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
  color: #ffffff;
}
.sidebar-nav {
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
  width: 100%;
}
.nav-item:hover {
  background: rgba(16, 185, 129, 0.08);
  color: #ffffff;
}
.nav-item.active {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.22), rgba(5, 150, 105, 0.06));
  color: #ffffff;
  font-weight: 600;
  border-left: 3px solid var(--primary);
}
.nav-item i {
  font-size: 1.1rem;
  width: 20px;
  color: var(--primary-light);
}
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-subtle);
}
.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(5, 16, 11, 0.7);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}
.user-avatar {
  font-size: 1.6rem;
  color: var(--primary-light);
}
.user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
}
.user-name {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.btn-logout {
  color: var(--rose);
}
.btn-logout:hover {
  background: rgba(244, 63, 94, 0.2);
  color: #ffffff;
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 85;
  transition: opacity 0.25s ease;
}

/* Main Content Area */
.main-content {
  margin-left: 260px;
  flex: 1;
  width: calc(100% - 260px);
  min-width: 0;
  max-width: 1650px;
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Top Bar */
.top-header {
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-left: 3px solid var(--primary);
  gap: 16px;
}
.header-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.mobile-menu-btn {
  display: none;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--border-subtle);
  color: var(--primary-light);
  border-radius: var(--radius-md);
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}
.mobile-menu-btn:hover {
  background: rgba(16, 185, 129, 0.2);
  color: #fff;
}
.header-title-area {
  min-width: 0;
}
.header-title-area h1 {
  font-size: 1.38rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: #ffffff;
}
.header-title-area p {
  color: var(--text-secondary);
  font-size: 0.84rem;
  margin-top: 1px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.status-pill {
  display: flex;
  align-items: center;
  padding: 6px 14px;
  background: rgba(5, 16, 11, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* Views */
.content-view {
  display: none;
  flex-direction: column;
  gap: 24px;
  animation: fadeIn 0.3s ease-out;
}
.content-view.active {
  display: flex;
}
.view-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.view-header-bar h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
}
.view-header-bar p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* KPI Cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  width: 100%;
}
.kpi-card {
  padding: 18px 20px;
  min-height: 94px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: var(--bg-panel);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.kpi-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-medium);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}
.icon-purple {
  background: rgba(168, 85, 247, 0.16);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.28);
}
.icon-blue {
  background: rgba(14, 165, 233, 0.16);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.28);
}
.icon-emerald {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.28);
}
.icon-amber {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.28);
}
.icon-cyan {
  background: rgba(6, 182, 212, 0.16);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.28);
}
.icon-forest {
  background: rgba(5, 150, 105, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(5, 150, 105, 0.35);
}
.icon-teal {
  background: rgba(20, 184, 166, 0.18);
  color: #5eead4;
  border: 1px solid rgba(20, 184, 166, 0.3);
}

.kpi-details {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  overflow: hidden;
}
.kpi-label {
  font-size: 0.76rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kpi-value {
  font-size: 1.38rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

/* Control Panel */
.control-panel {
  position: relative;
  z-index: 20;
  overflow: visible;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
.panel-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}
.panel-header p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 2px;
}
.launcher-form {
  position: relative;
  z-index: 30;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: rgba(5, 16, 11, 0.6);
  padding: 18px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}
.launcher-controls-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 16px;
  width: 100%;
  position: relative;
  z-index: 40;
}
.input-group-inline {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  z-index: 50;
  min-width: 0;
}
.input-group-inline label {
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Toggle Switch */
.execution-options {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.toggle-container {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  background: rgba(8, 22, 16, 0.75);
  padding: 7px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}
.toggle-container:hover {
  background: rgba(12, 32, 24, 0.95);
  border-color: var(--border-medium);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.15);
}
.toggle-container input { display: none; }
.toggle-slider {
  width: 44px;
  height: 24px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-pill);
  position: relative;
  transition: background var(--transition-fast), box-shadow var(--transition-fast);
  flex-shrink: 0;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform var(--transition-fast);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.toggle-container input:checked + .toggle-slider {
  background: var(--primary);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}
.toggle-container input:checked + .toggle-slider-purple {
  background: var(--accent-purple);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
}
.toggle-container input:checked + .toggle-slider::before {
  transform: translateX(20px);
}
.toggle-label {
  font-size: 0.85rem;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Steps Progress Bar */
.steps-progress-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(5, 16, 11, 0.65);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  overflow-x: auto;
}
.step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.45;
  transition: all var(--transition-fast);
}
.step-item.active {
  opacity: 1;
  color: var(--primary-light);
}
.step-item.completed {
  opacity: 1;
  color: #6ee7b7;
}
.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}
.step-item.active .step-circle {
  background: var(--primary);
  color: #050d09;
  font-weight: 700;
  box-shadow: 0 0 14px var(--primary-glow);
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}
.step-item.completed .step-circle {
  background: var(--primary-dark);
  color: #ffffff;
}
.step-title {
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}
.step-connector {
  flex: 1;
  height: 2px;
  background: rgba(52, 211, 153, 0.15);
  margin: 0 10px;
}

/* Live Terminal Log */
.terminal-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border-medium);
}
.terminal-header {
  padding: 12px 18px;
  background: #040c08;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}
.terminal-dots {
  display: flex;
  gap: 6px;
}
.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.dot-red { background: #f43f5e; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }
.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 1px;
  color: var(--primary-light);
  font-weight: 600;
}
.terminal-actions {
  display: flex;
  gap: 8px;
}
.btn-terminal {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.78rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 4px;
}
.btn-terminal:hover {
  color: #ffffff;
  background: rgba(16, 185, 129, 0.15);
}
.terminal-body {
  padding: 18px;
  background: #030806;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #34d399;
}
.log-line {
  display: flex;
  gap: 10px;
  line-height: 1.4;
  word-break: break-all;
  white-space: pre-wrap;
}
.log-time {
  color: var(--text-dim);
  font-size: 0.78rem;
  user-select: none;
}
.log-text { color: #d1fae5; }
.log-system .log-text { color: #6ee7b7; }
.log-error .log-text { color: #fca5a5; font-weight: 600; }
.log-success .log-text { color: #6ee7b7; font-weight: 600; }
.log-warning .log-text { color: #fde68a; }

/* Tables & Controls */
.table-container {
  padding: 22px 24px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-panel);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color var(--transition-fast);
}
.table-container:hover {
  border-color: var(--border-medium);
}
.table-responsive {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: rgba(4, 13, 9, 0.6);
}
.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.custom-table th {
  padding: 13px 18px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-medium);
  background: rgba(6, 17, 12, 0.95);
  position: sticky;
  top: 0;
  z-index: 10;
  white-space: nowrap;
}
.custom-table td {
  padding: 14px 18px;
  font-size: 0.88rem;
  color: #f0fdf4;
  border-bottom: 1px solid rgba(52, 211, 153, 0.08);
  vertical-align: middle;
  transition: background var(--transition-fast);
}
.custom-table tr:hover td {
  background: rgba(16, 185, 129, 0.06);
}
.custom-table tr:last-child td {
  border-bottom: none;
}
.custom-table td strong {
  color: #ffffff;
  font-weight: 600;
}
.custom-table td code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  background: rgba(16, 185, 129, 0.1);
  color: #6ee7b7;
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(52, 211, 153, 0.18);
}
.table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

/* Grid & Cards */
.grid-2-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 900px) {
  .grid-2-col {
    grid-template-columns: 1fr;
  }
}
.card-padding {
  padding: 24px;
}
.card-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.card-section-title h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}
.setup-steps {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.setup-steps li {
  line-height: 1.55;
}
.setup-steps li strong {
  color: #ffffff;
  font-weight: 600;
}
.setup-steps li p {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 0.86rem;
}
.setup-steps code {
  background: rgba(16, 185, 129, 0.15);
  padding: 2px 7px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.28);
}

/* Service Account Copy Box */
.service-account-box {
  margin-top: 20px;
  background: rgba(5, 16, 11, 0.75);
  border: 1px solid var(--border-medium);
  padding: 16px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.box-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.copy-field {
  display: flex;
  gap: 8px;
}
.copy-field input {
  flex: 1;
  background: #030a06;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: #6ee7b7;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

/* Upload Area */
.creds-status-indicator {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.creds-status-indicator.success {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #a7f3d0;
}
.creds-status-indicator.warning {
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fde68a;
}
.drop-zone {
  border: 2px dashed rgba(52, 211, 153, 0.25);
  border-radius: var(--radius-md);
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  background: rgba(5, 16, 11, 0.45);
}
.drop-zone:hover {
  border-color: var(--primary);
  background: rgba(16, 185, 129, 0.06);
}
.drop-icon {
  font-size: 2.4rem;
  color: var(--primary-light);
  margin-bottom: 10px;
}
.drop-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
}
.drop-hint {
  font-size: 0.8rem;
  color: var(--text-dim);
  display: block;
  margin-top: 4px;
}
.selected-file-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 12px;
  background: rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.or-separator {
  text-align: center;
  position: relative;
  margin: 18px 0;
}
.or-separator span {
  background: var(--bg-surface);
  padding: 0 10px;
  color: var(--text-dim);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
}

#json-credentials-text {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.5;
  background: rgba(4, 13, 9, 0.9);
  color: #a7f3d0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  resize: vertical;
}

#json-credentials-text:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 10, 7, 0.85);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}
.modal-dialog {
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 26px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-medium);
  border-top: 3px solid var(--primary);
  border-radius: var(--radius-lg);
}

/* Modal de Confirmação In-App High-End */
.modal-confirm-dialog {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 28px 26px;
  border-top: 3px solid #f43f5e;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 25px rgba(244, 63, 94, 0.12);
  animation: modalConfirmPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalConfirmPop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.confirm-icon-wrapper {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.65rem;
  margin-bottom: 16px;
  border: 1px solid rgba(244, 63, 94, 0.35);
  background: rgba(244, 63, 94, 0.12);
  box-shadow: 0 0 20px rgba(244, 63, 94, 0.22);
}

.confirm-title {
  font-size: 1.22rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}

.confirm-message {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 380px;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
}
.modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.grid-2-col-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 600px) {
  .grid-2-col-inputs {
    grid-template-columns: 1fr;
  }
}
.helper-text {
  font-size: 0.78rem;
  color: var(--text-dim);
}
.modal-footer {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* Toast Container */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-md);
  animation: slideInRight 0.3s ease-out;
  min-width: 280px;
  max-width: 450px;
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}
.toast-success {
  background: #062e1e;
  color: #a7f3d0;
  border: 1px solid #10b981;
}
.toast-error {
  background: #3b0d14;
  color: #fecdd3;
  border: 1px solid #f43f5e;
}
.toast-warning {
  background: #3b2006;
  color: #fde68a;
  border: 1px solid #f59e0b;
}
.toast-info {
  background: #08291d;
  color: #a7f3d0;
  border: 1px solid #14b8a6;
}

/* Status Banner for Loop Automation */
.loop-status-banner {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  animation: fadeIn 0.3s ease-out;
}

.loop-pulse-dot {
  width: 10px;
  height: 10px;
  background-color: var(--emerald);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--emerald);
  animation: pulseDot 1.5s infinite;
  display: inline-block;
  flex-shrink: 0;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 14px var(--emerald); }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.loop-banner-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #6ee7b7;
  flex: 1;
}

/* ==========================================================================
   ESTOQUES (INVENTORY) VIEW STYLES
   ========================================================================== */
.inventory-controls-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(18px);
}

.store-selector-box {
  display: flex;
  align-items: center;
  gap: 14px;
}

.store-icon-badge {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(6, 182, 212, 0.2));
  border: 1px solid rgba(16, 185, 129, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: #34d399;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.15);
}

.store-select-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.store-select-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
}

/* ==========================================================================
   MENUS SUSPENSOS ELEGANTES (CUSTOM SELECTS)
   ========================================================================== */
.custom-select-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.custom-select-wrapper.flex-select {
  flex: 1;
  width: 100%;
  min-width: 0;
  display: flex;
}

.custom-select-wrapper.flex-select .custom-dropdown-container {
  width: 100%;
}

.custom-select-wrapper.flex-select .custom-dropdown-trigger {
  width: 100%;
}

.custom-select-wrapper.flex-select .custom-dropdown-menu {
  min-width: 100%;
}

.custom-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: rgba(9, 24, 18, 0.85);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2334d399' stroke-width='2.2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 13px 13px;
  border: 1px solid rgba(52, 211, 153, 0.22);
  color: #f0fdf4;
  padding: 0 34px 0 14px;
  height: 40px;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  max-width: 100%;
}

.custom-select:hover {
  border-color: rgba(52, 211, 153, 0.45);
  background-color: rgba(12, 32, 24, 0.95);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.2);
}

.custom-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
  background-color: rgba(8, 22, 16, 1);
}

.custom-select option {
  background-color: #06120d;
  color: #f0fdf4;
  padding: 10px 14px;
}

.custom-select-wrapper.select-limit .custom-select {
  min-width: 95px;
}

/* ==========================================================================
   HIGH-END CUSTOM DROPDOWNS (MENU SUSPENSO PERSONALIZADO DARK EMERALD)
   ========================================================================== */
.custom-dropdown-container {
  position: relative;
  display: inline-block;
  user-select: none;
  z-index: 50;
}

.custom-dropdown-container.active {
  z-index: 9999;
}

.custom-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 40px;
  padding: 0 14px;
  background: rgba(9, 24, 18, 0.88);
  border: 1px solid rgba(52, 211, 153, 0.22);
  border-radius: var(--radius-md);
  color: #f0fdf4;
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  font-family: inherit;
  white-space: nowrap;
}

.custom-dropdown-trigger:hover {
  border-color: rgba(52, 211, 153, 0.5);
  background: rgba(12, 32, 24, 0.96);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.25);
  color: #ffffff;
}

.custom-dropdown-trigger.active {
  border-color: var(--primary);
  background: rgba(6, 18, 13, 1);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25), 0 0 16px var(--primary-glow);
}

.custom-dropdown-label {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
  color: #f0fdf4;
  pointer-events: none;
}

.custom-dropdown-arrow {
  font-size: 0.72rem;
  color: #34d399;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.custom-dropdown-trigger.active .custom-dropdown-arrow {
  transform: rotate(180deg);
}

/* Menu Pop-up flutuante Dark Glass */
.custom-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 100%;
  max-width: 320px;
  max-height: 280px;
  overflow-y: auto;
  background: rgba(6, 17, 12, 0.98);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(52, 211, 153, 0.4);
  border-radius: var(--radius-md);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.85), 0 0 24px rgba(16, 185, 129, 0.22);
  padding: 6px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: dropdownPopIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownPopIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.custom-dropdown-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  font-size: 0.83rem;
  font-weight: 500;
  color: #d1fae5;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.14s ease;
  white-space: nowrap;
}

.custom-dropdown-option:hover {
  background: rgba(16, 185, 129, 0.18);
  color: #ffffff;
  padding-left: 15px;
}

.custom-dropdown-option.selected {
  background: rgba(16, 185, 129, 0.28);
  color: #6ee7b7;
  font-weight: 600;
}

.custom-dropdown-option .opt-check {
  font-size: 0.75rem;
  color: var(--primary-light);
}

.custom-dropdown-menu::-webkit-scrollbar {
  width: 6px;
}
.custom-dropdown-menu::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
.custom-dropdown-menu::-webkit-scrollbar-thumb {
  background: rgba(52, 211, 153, 0.3);
  border-radius: 999px;
}
.custom-dropdown-menu::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ==========================================================================
   CONSULTA DE PRODUTOS MULTI-LOJAS — SEARCH HERO BAR
   ========================================================================== */
.search-hero-bar {
  position: relative;
  z-index: 20;
  overflow: visible;
  padding: 16px 20px;
  margin-bottom: 18px;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  background: rgba(8, 22, 16, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.search-main-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.search-input-field {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.search-icon-main {
  position: absolute;
  left: 16px;
  font-size: 1.15rem;
  color: var(--primary-light);
  pointer-events: none;
  opacity: 0.9;
}

.search-main-input {
  width: 100%;
  height: 48px;
  padding: 0 46px 0 48px;
  font-size: 0.98rem;
  font-weight: 500;
  color: #ffffff;
  background: rgba(5, 13, 9, 0.9);
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: var(--radius-md);
  outline: none;
  transition: all 0.2s ease;
  font-family: inherit;
}

.search-main-input::placeholder {
  color: #4b6b5a;
  font-weight: 400;
}

.search-main-input:focus {
  border-color: var(--primary);
  background: rgba(7, 18, 13, 0.98);
  box-shadow: 0 0 20px var(--primary-glow);
}

.search-clear-btn-main {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.05rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.search-clear-btn-main:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.search-primary-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.search-sub-row {
  position: relative;
  z-index: 22;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* Segmented control for stock status */
.filter-segmented-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(5, 14, 10, 0.85);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(52, 211, 153, 0.18);
  max-width: 100%;
}

.filter-seg-btn {
  background: transparent;
  border: none;
  color: #a7f3d0;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.18s ease;
  font-family: inherit;
  white-space: nowrap !important;
  user-select: none;
}

.filter-seg-btn:hover {
  color: #ffffff;
  background: rgba(16, 185, 129, 0.12);
}

.filter-seg-btn.active {
  background: var(--primary);
  color: #050d09;
  font-weight: 700;
  box-shadow: 0 0 10px var(--primary-glow);
}

.filter-seg-btn.filter-seg-danger.active {
  background: #f43f5e;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.35);
}

.filter-count-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
  display: inline-flex;
  align-items: center;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.filter-seg-btn.active .filter-count-badge {
  background: rgba(0, 0, 0, 0.25);
  color: #050d09;
}

.filter-seg-btn.filter-seg-danger.active .filter-count-badge {
  background: rgba(0, 0, 0, 0.25);
  color: #ffffff;
}

.search-selects-inline {
  position: relative;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ==========================================================================
   PAINEL & TABELA DE RESULTADOS (SAAS GRADE)
   ========================================================================== */
.search-results-card {
  position: relative;
  z-index: 1;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: rgba(8, 22, 16, 0.8);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.search-results-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 20px;
  background: rgba(5, 14, 10, 0.6);
  border-bottom: 1px solid var(--border-subtle);
}

.results-count-indicator {
  font-size: 0.86rem;
  color: #cbd5e1;
}

.results-count-indicator strong {
  color: var(--primary-light);
}

.results-sync-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.results-sync-tag .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--primary);
  box-shadow: 0 0 8px var(--primary);
}

.inventory-table-wrapper {
  max-height: 640px;
  overflow-y: auto;
  overflow-x: auto;
}

.inventory-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.inventory-table thead th {
  position: sticky;
  top: 0;
  background: #06130e;
  z-index: 2;
  box-shadow: 0 1px 0 rgba(52, 211, 153, 0.15);
  padding: 13px 16px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #a7f3d0;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.inventory-table td {
  padding: 13px 16px;
  vertical-align: middle;
  border-bottom: 1px solid rgba(52, 211, 153, 0.08);
}

.inventory-table tbody tr {
  transition: background-color 0.12s ease;
}

.inventory-table tbody tr:hover {
  background-color: rgba(16, 185, 129, 0.05);
}

/* Badge Loja */
.badge-store {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  color: #7dd3fc;
  white-space: nowrap;
}

.badge-store i {
  font-size: 0.76rem;
}

/* Badge Código */
.code-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 500;
  white-space: nowrap;
}

.product-name-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.product-title {
  font-weight: 600;
  color: #f0fdf4;
  line-height: 1.35;
}

.badge-category {
  display: inline-block;
  background: rgba(52, 211, 153, 0.08);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.18);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge-margin-high {
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-weight: 600;
  font-family: var(--font-mono);
}

/* ==========================================================================
   BARRA DE PAGINAÇÃO (PAGINATION BAR)
   ========================================================================== */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 14px 20px;
  background: rgba(4, 13, 9, 0.88);
  border-top: 1px solid var(--border-subtle);
  position: relative;
  z-index: 10;
}

.pagination-info {
  font-size: 0.84rem;
  color: var(--text-secondary);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-indicator {
  font-weight: 600;
  color: #f0fdf4;
  padding: 5px 14px;
  font-size: 0.82rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: var(--radius-pill);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pagination-controls .btn {
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.pagination-controls .btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
}

/* ==========================================================================
   RESUMO POR LOJA (STORE SUMMARY VIEW) STYLES — DARK EMERALD & OBSIDIAN
   ========================================================================== */
.summary-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.summary-main-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.summary-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.summary-title-group h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.summary-title-group p {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

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

.summary-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.summary-loading-placeholder {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 20px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.summary-loading-placeholder i {
  font-size: 2rem;
  color: var(--primary-light);
}

.store-summary-card {
  background: rgba(8, 22, 16, 0.82);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  backdrop-filter: blur(18px);
  position: relative;
  overflow: hidden;
}

.store-summary-card:hover {
  transform: translateY(-3px);
  border-color: rgba(52, 211, 153, 0.38);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55), 0 0 20px rgba(16, 185, 129, 0.12);
}

.store-summary-card.status-card-success {
  border-top: 3px solid #10b981;
}

.store-summary-card.status-card-running {
  border-top: 3px solid #f59e0b;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.18);
}

.store-summary-card.status-card-error {
  border-top: 3px solid #f43f5e;
  box-shadow: 0 0 18px rgba(244, 63, 94, 0.18);
}

.store-summary-card.status-card-pending {
  border-top: 3px solid rgba(52, 211, 153, 0.25);
}

.store-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.store-card-title-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.store-card-title-box > div {
  min-width: 0;
  flex: 1;
}

.store-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #34d399;
  flex-shrink: 0;
}

.store-card-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-card-meta {
  font-size: 0.78rem;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-health-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.2px;
  flex-shrink: 0;
}

.store-health-pill.pill-success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}

.store-health-pill.pill-running {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
}

.store-health-pill.pill-error {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.35);
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.15);
}

.store-health-pill.pill-pending {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.store-health-pill.pill-warning {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
}

/* ==========================================================================
   STORE CARD PROCESS TRACKER / 5-STEP PIPELINE
   ========================================================================== */
.store-pipeline-section {
  background: rgba(4, 15, 10, 0.75);
  border: 1px solid rgba(52, 211, 153, 0.14);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.store-pipeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.72rem;
}

.store-pipeline-title {
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.store-pipeline-status-text {
  font-weight: 600;
  font-size: 0.74rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.store-pipeline-status-text.text-running {
  color: #fbbf24;
}

.store-pipeline-status-text.text-success {
  color: #34d399;
}

.store-pipeline-status-text.text-warning {
  color: #fbbf24;
}

.store-pipeline-status-text.text-error {
  color: #fb7185;
}

.store-pipeline-status-text.text-pending {
  color: #94a3b8;
}

.store-stepper-track {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  padding: 2px 2px 0 2px;
}

.store-step-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  position: relative;
  z-index: 2;
  cursor: default;
  flex: 0 0 auto;
  width: 44px;
}

.store-step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(15, 30, 23, 0.95);
  border: 1.5px solid rgba(148, 163, 184, 0.25);
  color: #64748b;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.store-step-label {
  font-size: 0.65rem;
  color: var(--text-dim);
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  transition: color 0.25s ease;
}

/* Step States */
.store-step-node.completed .store-step-dot {
  background: rgba(16, 185, 129, 0.22);
  border-color: #10b981;
  color: #34d399;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.35);
}
.store-step-node.completed .store-step-label {
  color: #a7f3d0;
  font-weight: 600;
}

.store-step-node.active .store-step-dot {
  background: rgba(245, 158, 11, 0.25);
  border-color: #f59e0b;
  color: #fbbf24;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.55);
  animation: pulse-step 1.6s infinite ease-in-out;
}
.store-step-node.active .store-step-label {
  color: #fde68a;
  font-weight: 700;
}

.store-step-node.warning .store-step-dot {
  background: rgba(245, 158, 11, 0.22);
  border-color: #f59e0b;
  color: #fbbf24;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.35);
}
.store-step-node.warning .store-step-label {
  color: #fde68a;
  font-weight: 600;
}

.store-step-node.error .store-step-dot {
  background: rgba(244, 63, 94, 0.25);
  border-color: #f43f5e;
  color: #fb7185;
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.45);
}
.store-step-node.error .store-step-label {
  color: #fca5a5;
  font-weight: 600;
}

.store-step-message-box.msg-warning {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.25);
  color: #fcd34d;
}


/* Connecting Line between steps */
.store-step-line {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  margin-top: 13px; /* Align with center of 28px dot */
  position: relative;
  z-index: 1;
  transition: background 0.3s ease;
}

.store-step-line.completed {
  background: linear-gradient(90deg, #10b981, #10b981);
}

.store-step-line.active {
  background: linear-gradient(90deg, #10b981, #f59e0b);
}

@keyframes pulse-step {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(245, 158, 11, 0);
    transform: scale(1.06);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    transform: scale(1);
  }
}

.store-step-message-box {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border-left: 3px solid #38bdf8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-step-message-box.msg-running {
  border-left-color: #f59e0b;
  background: rgba(245, 158, 11, 0.06);
  color: #fde68a;
}

.store-step-message-box.msg-success {
  border-left-color: #10b981;
  background: rgba(16, 185, 129, 0.06);
  color: #a7f3d0;
}

.store-step-message-box.msg-error {
  border-left-color: #f43f5e;
  background: rgba(244, 63, 94, 0.06);
  color: #fca5a5;
}

.store-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: rgba(4, 13, 9, 0.72);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(52, 211, 153, 0.1);
}

.store-info-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.store-info-label {
  font-size: 0.69rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.store-info-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: #f0fdf4;
  display: flex;
  align-items: center;
  gap: 6px;
}

.store-error-box {
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.28);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 0.78rem;
  color: #fca5a5;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}

.store-error-box i {
  color: #fb7185;
  margin-top: 2px;
}

.store-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(52, 211, 153, 0.1);
}

.btn-icon-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 500;
}

/* ==========================================================================
   MASTER RESPONSIVE BREAKPOINTS & UNIVERSAL JUSTIFICATION
   Supports Mobile, Tablet, Laptop, Desktop and Ultrawide Displays
   ========================================================================== */

/* Large Screens & Ultrawide (> 1600px) */
@media (min-width: 1600px) {
  .main-content {
    max-width: 1720px;
    padding: 32px 48px;
    gap: 28px;
  }
  .kpi-card {
    min-height: 104px;
    padding: 22px 24px;
  }
  .kpi-value {
    font-size: 1.6rem;
  }
  .summary-cards-container {
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
  }
}

/* Laptops & Standard Desktop (1200px - 1440px) */
@media (max-width: 1440px) {
  .main-content {
    padding: 22px 26px;
    gap: 20px;
  }
  .kpi-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
  }
  .kpi-card {
    padding: 16px 18px;
  }
  .kpi-value {
    font-size: 1.3rem;
  }
  .launcher-controls-grid {
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 14px;
  }
}

/* Smaller Laptops & Landscape Tablets (993px - 1200px) */
@media (max-width: 1200px) {
  .sidebar {
    width: 240px;
  }
  .main-content {
    margin-left: 240px;
    width: calc(100% - 240px);
    padding: 20px 22px;
  }
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .launcher-controls-grid {
    grid-template-columns: 1fr 1fr;
  }
  .input-group-inline#group-loop-interval {
    grid-column: span 2;
  }
  .summary-cards-container {
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  }
}

/* Tablets & Small Laptops (769px - 992px) */
@media (max-width: 992px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    transform: translateX(-100%);
    box-shadow: none;
    z-index: 99999;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.9), 0 0 40px rgba(16, 185, 129, 0.25);
    z-index: 99999;
  }
  .mobile-sidebar-close {
    display: inline-flex;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
  .main-content {
    margin-left: 0;
    width: 100%;
    padding: 18px 20px;
  }
  .top-header {
    padding: 14px 18px;
  }
  .header-title-area h1 {
    font-size: 1.25rem;
  }
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .summary-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .summary-cards-container {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
  }
  .launcher-controls-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .input-group-inline#group-loop-interval {
    grid-column: span 1;
  }
  .search-sub-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .filter-segmented-group {
    width: 100%;
    display: flex;
    gap: 4px;
    padding: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    background: rgba(5, 14, 10, 0.85);
    border-radius: var(--radius-md);
  }
  .filter-segmented-group::-webkit-scrollbar {
    display: none;
  }
  .filter-seg-btn {
    flex: 1;
    min-width: 0;
    justify-content: center;
    text-align: center;
    padding: 8px 8px;
    font-size: 0.78rem;
    white-space: nowrap !important;
  }
  .search-selects-inline {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
  }
  .search-selects-inline .custom-select-wrapper:nth-child(1) {
    grid-column: 1 / -1;
    width: 100%;
    display: flex;
  }
  .search-selects-inline .custom-select-wrapper:nth-child(2) {
    grid-column: 1 / 2;
    width: 100%;
    min-width: 0;
    display: flex;
  }
  .search-selects-inline .custom-select-wrapper:nth-child(3),
  .search-selects-inline .custom-select-wrapper.select-limit {
    grid-column: 2 / 3;
    width: auto;
    min-width: 100px;
    display: flex;
  }
  .search-selects-inline .custom-dropdown-container,
  .search-selects-inline .custom-dropdown-trigger {
    width: 100%;
  }
  .search-selects-inline .custom-dropdown-label {
    max-width: 100%;
  }
}

/* Tablets Portrait & Mobile (< 768px) */
@media (max-width: 768px) {
  .main-content {
    padding: 14px 16px;
    gap: 16px;
  }
  .top-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px 16px;
  }
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
  .panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .execution-options {
    width: 100%;
    flex-direction: column;
    gap: 8px;
  }
  .toggle-container {
    width: 100%;
    justify-content: space-between;
  }
  .search-main-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .search-primary-actions {
    width: 100%;
    display: flex;
    gap: 8px;
  }
  .search-primary-actions .btn {
    flex: 1;
    justify-content: center;
  }
  .summary-cards-container {
    grid-template-columns: 1fr;
  }
  .summary-kpi-grid {
    grid-template-columns: 1fr 1fr;
  }
  .store-summary-card {
    padding: 16px;
  }
  .grid-2-col {
    grid-template-columns: 1fr;
  }
  .table-container {
    padding: 16px;
  }
  .table-responsive {
    -webkit-overflow-scrolling: touch;
  }
  .table-responsive::-webkit-scrollbar {
    height: 6px;
  }
  .steps-progress-wrapper {
    padding: 12px 14px;
    gap: 8px;
  }
  .step-item {
    min-width: 100px;
    flex-shrink: 0;
  }
  .terminal-body {
    height: 250px;
    font-size: 0.78rem;
    padding: 14px;
  }
  .modal-backdrop {
    padding: 10px;
  }
  .modal-dialog {
    padding: 20px 16px;
    max-height: 94vh;
  }
  .grid-2-col-inputs {
    grid-template-columns: 1fr;
  }
  .auth-card {
    padding: 24px 20px;
    max-width: 95vw;
  }
  .pagination-bar {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
  }
  .pagination-info {
    text-align: center;
    justify-content: center;
  }
  .pagination-controls {
    width: 100%;
    justify-content: center;
  }
}

/* Small Smartphones (< 480px) */
@media (max-width: 480px) {
  .main-content {
    padding: 10px 12px;
    gap: 14px;
  }
  .kpi-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .summary-kpi-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .kpi-card {
    padding: 14px 16px;
    min-height: auto;
  }
  .header-title-area h1 {
    font-size: 1.15rem;
  }
  .summary-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .summary-actions {
    width: 100%;
    display: flex;
    gap: 8px;
  }
  .summary-actions .btn {
    flex: 1;
    justify-content: center;
  }
  .filter-word-prefix {
    display: none;
  }
  .filter-segmented-group {
    padding: 3px;
    gap: 3px;
  }
  .filter-seg-btn {
    padding: 7px 4px;
    font-size: 0.72rem;
    gap: 4px;
  }
  .filter-count-badge {
    font-size: 0.67rem;
    padding: 1px 5px;
  }
  .store-card-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .store-card-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .store-card-actions > div {
    width: 100%;
    display: flex;
    gap: 6px;
  }
  .store-card-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .launcher-actions {
    flex-direction: column;
  }
  .launcher-actions .btn {
    width: 100%;
  }
  .pagination-controls {
    display: flex;
    justify-content: space-between;
    gap: 8px;
  }
  .pagination-controls .btn {
    flex: 1;
    padding: 6px 8px;
    justify-content: center;
  }
}

/* ==========================================================================
   CONFIGURAÇÃO DE IFRAMES & EMBEDS
   ========================================================================== */
.iframes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 16px;
  width: 100%;
}

.iframe-card {
  border-radius: var(--radius-md);
  border: 1px solid rgba(16, 185, 129, 0.16);
  background: rgba(8, 22, 16, 0.75);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 20px;
  gap: 14px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
}

.iframe-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2.5px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0.7;
}

.iframe-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-glow);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.iframe-card.iframe-card-inactive {
  opacity: 0.6;
}

.iframe-card.iframe-card-inactive::before {
  background: linear-gradient(90deg, var(--danger), transparent);
}

.iframe-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.iframe-card-main-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.iframe-card-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.25);
  color: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.iframe-card-texts {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.iframe-card-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.iframe-slug-badge {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  color: #93c5fd;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.status-toggle-pill.active {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.status-toggle-pill.inactive {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.35);
  color: #fb7185;
}

.status-toggle-pill:hover {
  filter: brightness(1.2);
}

/* Micro-grade de especificações */
.iframe-specs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: rgba(4, 13, 9, 0.72);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(52, 211, 153, 0.1);
}

.iframe-spec-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.spec-label {
  font-size: 0.69rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.spec-value {
  font-size: 0.82rem;
  font-weight: 600;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spec-value.text-safe {
  color: #34d399;
  font-weight: 500;
  font-size: 0.78rem;
}

.spec-value.text-warn {
  color: #fbbf24;
  font-weight: 500;
  font-size: 0.78rem;
}

.iframe-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.action-buttons-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Form & Modal de Configuração */
.config-section-box {
  background: rgba(4, 13, 9, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-top: 14px;
}

.config-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.section-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-subtext {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 12px;
  line-height: 1.4;
}

.column-quick-actions {
  display: flex;
  gap: 10px;
}

.btn-text-action {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s ease;
}

.btn-text-action:hover {
  text-decoration: underline;
  color: var(--accent-light);
}

.input-group .custom-select-wrapper,
.input-group .custom-dropdown-container {
  width: 100%;
  display: block;
}

.input-group .custom-dropdown-trigger {
  width: 100%;
  display: flex;
  height: 42px;
  background: rgba(6, 17, 12, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
}

.input-group .custom-dropdown-trigger:hover {
  border-color: rgba(52, 211, 153, 0.4);
  background: rgba(9, 24, 18, 0.9);
}

.input-group .custom-dropdown-trigger.active {
  border-color: var(--primary);
  background: rgba(6, 18, 13, 0.95);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2), 0 0 16px var(--primary-glow);
}

.input-group .custom-dropdown-label {
  max-width: calc(100% - 24px);
  font-size: 0.88rem;
}

.input-group .custom-dropdown-menu {
  width: 100%;
  max-width: 100%;
}

.store-picker-grid,
.column-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.store-chip-label,
.column-chip-label {
  display: block;
  cursor: pointer;
  user-select: none;
}

.store-chip-label input[type="checkbox"],
.column-chip-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.store-chip-label .chip-content,
.column-chip-label .chip-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 44px;
  box-sizing: border-box;
}

.store-chip-label:hover .chip-content,
.column-chip-label:hover .chip-content {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.store-chip-label .chip-left,
.column-chip-label .chip-left {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  white-space: nowrap;
}

.store-chip-label .chip-left i,
.column-chip-label .chip-left i {
  font-size: 0.85rem;
  opacity: 0.85;
}

.store-chip-label .chip-main-text,
.column-chip-label .chip-main-text {
  font-weight: 500;
  letter-spacing: -0.01em;
}

.store-chip-label .chip-badge-tag,
.column-chip-label .chip-badge-tag {
  font-size: 0.62rem;
  padding: 2px 6px;
  border-radius: 9999px;
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fda4af;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-left: 2px;
}

.store-chip-label .chip-check-icon,
.column-chip-label .chip-check-icon {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.store-chip-label input[type="checkbox"]:not(:checked) + .chip-content .chip-check-icon,
.column-chip-label input[type="checkbox"]:not(:checked) + .chip-content .chip-check-icon {
  opacity: 0.3;
}

.store-chip-label input[type="checkbox"]:checked + .chip-content,
.column-chip-label input[type="checkbox"]:checked + .chip-content {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.45);
  color: #fff;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.18);
}

.store-chip-label input[type="checkbox"]:checked + .chip-content .chip-check-icon,
.column-chip-label input[type="checkbox"]:checked + .chip-content .chip-check-icon {
  color: #34d399;
  opacity: 1;
}

.column-chip-label.column-sensitive input[type="checkbox"]:checked + .chip-content {
  background: rgba(244, 63, 94, 0.16);
  border-color: rgba(244, 63, 94, 0.45);
  color: #fecdd3;
  box-shadow: 0 0 14px rgba(244, 63, 94, 0.2);
}

.column-chip-label.column-sensitive input[type="checkbox"]:checked + .chip-content .chip-check-icon {
  color: #fb7185;
  opacity: 1;
}

.toggle-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toggle-option-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.15s ease;
}

.toggle-option-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.toggle-option-row input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.toggle-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toggle-text strong {
  font-size: 0.85rem;
  color: #fff;
  font-weight: 600;
}

.toggle-text span {
  font-size: 0.75rem;
  color: var(--text-dim);
  line-height: 1.3;
}

.custom-input-select {
  width: 100%;
  background: rgba(4, 13, 9, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.custom-input-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

@media (max-width: 768px) {
  .iframes-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .iframe-specs-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .iframe-card {
    padding: 14px 16px;
  }
}

/* User Avatar & Enhanced Table Styling */
.user-table-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.3), rgba(56, 189, 248, 0.3));
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: #34d399;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Operator Read-Only Banners & Notices */
.operator-read-banner {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(16, 185, 129, 0.08));
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #bae6fd;
  font-size: 0.86rem;
  margin: 10px 0;
}

.operator-read-banner i {
  font-size: 1.25rem;
  color: #38bdf8;
  flex-shrink: 0;
}

.readonly-notice-box {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(16, 185, 129, 0.05));
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  color: #e0f2fe;
  margin-bottom: 16px;
}

.readonly-notice-box i {
  font-size: 1.4rem;
  color: #38bdf8;
  margin-top: 2px;
  flex-shrink: 0;
}

.readonly-notice-box strong {
  display: block;
  font-size: 0.95rem;
  color: #ffffff;
  margin-bottom: 4px;
}

.readonly-notice-box p {
  font-size: 0.84rem;
  color: var(--text-dim);
  margin: 0;
  line-height: 1.4;
}

.status-toggle-pill.static {
  cursor: default !important;
  pointer-events: none;
}

/* Server API Configuration Trigger & Modal */
.server-config-trigger-area {
  margin-top: 14px;
  display: flex;
  justify-content: center;
}

.btn-server-config {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 0.78rem;
  padding: 6px 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-server-config:hover {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.server-status-result {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.server-status-result.testing {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #7dd3fc;
}

.server-status-result.success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

.server-status-result.error {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fda4af;
}


