/*
   LINS IMPORTS — Identidade Visual
   "Tecnologia importada. Qualidade garantida."
   Dark First · Preto profundo · Dourado metálico · Branco gelo
*/

@import url('https://fonts.googleapis.com/css2?Montserrat:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  /* LINS IMPORTS — Brand Tokens */
  --li-blue: #3B82F6;
  --li-blue-light: #60A5FA;
  --li-blue-dark: #1D4ED8;
  --li-blue-rgb: 59, 130, 246;

  --li-black: #0A0A0A;
  --li-graphite: #1A1A1A;
  --li-dark: #121212;

  --li-white: #FFFFFF;
  --li-gray: #555555;
  --li-light-gray: #F2F2F2;

  --li-success: #2ECC71;
  --li-warning: #F39C12;
  --li-danger: #E74C3C;

  /* Color Palette (mapeada para a identidade MP) */
  --bg-primary: var(--li-black);
  --bg-secondary: var(--li-dark);
  --bg-tertiary: var(--li-graphite);
  --card-bg: rgba(26, 26, 26, 0.72);
  --card-border: rgba(59, 130, 246, 0.12);
  --card-border-hover: rgba(59, 130, 246, 0.45);

  --text-primary: var(--li-light-gray); /* branco gelo, nunca branco puro */
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;

  /* Accent Colors (semântica financeira preservada) */
  --color-success: var(--li-success);
  --color-success-rgb: 46, 204, 113;
  --color-danger: var(--li-danger);
  --color-danger-rgb: 231, 76, 60;
  --color-warning: var(--li-warning);
  --color-warning-rgb: 243, 156, 18;
  --color-info: var(--li-blue);
  --color-info-rgb: 59, 130, 246;

  /* Fonts */
  --font-brand: 'Montserrat', sans-serif;
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Shadows & Radius */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.65);
  --shadow-glow: 0 0 25px rgba(59, 130, 246, 0.18);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 24px;
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-body);
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
  line-height: 1.5;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Layout Framework */
#app-layout {
  display: flex;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar Navigation */
aside.sidebar {
  width: 240px;
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--card-border);
}

.sidebar-logo {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.35));
}

.sidebar-title {
  font-family: var(--font-brand);
  font-size: 0.92rem;
  font-weight: 700;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--li-blue-dark) 0%, var(--li-blue) 45%, var(--li-blue-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 1.5px;
  line-height: 1.25;
}

.sidebar-menu {
  flex: 1;
  padding: 12px 12px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

.sidebar-item a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 14px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.sidebar-item a:hover {
  background-color: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}

.sidebar-item.active a {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.14) 0%, rgba(59, 130, 246, 0.03) 100%);
  color: var(--li-blue);
  border-left: 3px solid var(--li-blue);
  font-weight: 600;
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--li-blue-dark) 0%, var(--li-blue) 55%, var(--li-blue-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--li-black);
  font-size: 0.9rem;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.25);
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 0.9rem;
  font-weight: 600;
}

.user-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Main Content Area */
main.main-content {
  margin-left: 240px;
  flex: 1;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: all 0.3s ease;
  scrollbar-gutter: stable;
}

/* Header Action Bar */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.page-title-area {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.page-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.page-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

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

/* Dashboard Cards (Módulo 8 & 5) */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.kpi-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(20px);
}

.kpi-card:hover {
  transform: translateY(-4px);
  border-color: var(--card-border-hover);
  box-shadow: var(--shadow-glow), var(--shadow-md);
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent-color, var(--color-info));
}

.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kpi-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
}

.kpi-icon {
  width: 24px;
  height: 24px;
  color: var(--accent-color, var(--color-info));
  opacity: 0.8;
}

.kpi-value {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 4px 0;
}

.kpi-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.trend-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

.trend-up {
  color: var(--color-success);
}

.trend-down {
  color: var(--color-danger);
}

/* Section Components */
.dashboard-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}

@media (max-width: 1024px) {
  .dashboard-row {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(20px);
}

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

.card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Custom SVGs and Graphs styling */
.chart-container {
  position: relative;
  width: 100%;
  height: 300px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-top: 20px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--li-blue), var(--li-blue-light));
  color: var(--li-black);
  font-weight: 700;
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.25);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(59, 130, 246, 0.40);
}

.btn-secondary {
  background-color: transparent;
  border-color: var(--card-border);
  color: var(--text-primary);
}
.btn-secondary:hover {
  background-color: rgba(59, 130, 246, 0.06);
  border-color: var(--li-blue-dark);
}

.btn-info {
  background-color: transparent;
  border-color: var(--li-blue);
  color: var(--li-blue);
}
.btn-info:hover {
  background-color: rgba(59, 130, 246, 0.12);
  box-shadow: 0 0 18px rgba(59, 130, 246, 0.25);
}

.btn-danger {
  background-color: var(--color-danger);
  color: #fff;
}
.btn-danger:hover {
  background-color: #dc2626;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Form Styles */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

input, select, textarea {
  background-color: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: all 0.2s ease;
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--li-blue);
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.22);
}

input::placeholder, textarea::placeholder {
  color: var(--text-muted);
}

select {
  cursor: pointer;
  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='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

th {
  background-color: var(--bg-secondary);
  color: var(--text-secondary);
  font-weight: 600;
  padding: 14px 18px;
  border-bottom: 1px solid var(--card-border);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--card-border);
  color: var(--text-primary);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background-color: rgba(255, 255, 255, 0.01);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-success {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--color-success);
}

.badge-danger {
  background-color: rgba(239, 68, 68, 0.15);
  color: var(--color-danger);
}

.badge-warning {
  background-color: rgba(245, 158, 11, 0.15);
  color: var(--color-warning);
}

.badge-info {
  background-color: rgba(99, 102, 241, 0.15);
  color: var(--color-info);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.modal-overlay.active .modal-content {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--card-border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background-color: var(--bg-primary);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.slide-up {
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Progress bars for Goals */
.progress-bar-container {
  width: 100%;
  height: 8px;
  background-color: var(--bg-tertiary);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--li-blue-dark) 0%, var(--li-blue) 55%, var(--li-blue-light) 100%);
  border-radius: 9999px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  aside.sidebar {
    width: 100%;
    /* safe-area: sem o inset, a barra fica embaixo da barra de gestos do iPhone */
    height: calc(60px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    top: auto;
    bottom: 0;
    border-right: none;
    border-top: 1px solid var(--card-border);
  }
  
  .sidebar-header {
    display: none; /* Hide header on mobile view */
  }
  
  .sidebar-menu {
    flex-direction: row;
    justify-content: space-around;
    padding: 0;
    gap: 0;
  }
  
  .sidebar-item a {
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px;
    font-size: 0.65rem;
    border-radius: 0;
  }

  .sidebar-item[data-view="batches"],
  .sidebar-item[data-view="stock"],
  .sidebar-item[data-view="goals"],
  .sidebar-item[data-view="reports"],
  .sidebar-item[data-view="orders"] {
    display: none !important;
  }

  .sidebar-item a svg {
    width: 20px;
    height: 20px;
  }
  
  .sidebar-item.active a {
    border-left: none;
    border-bottom: 3px solid var(--li-blue);
    background: transparent;
  }

  .sidebar-footer {
    display: none; /* Hide profile footer in bottom bar */
  }
  
  main.main-content {
    margin-left: 0;
    padding: 16px;
    padding-top: calc(16px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); /* Space for the bottom nav */
    gap: 20px;
  }
  
  .page-title {
    font-size: 1.5rem;
  }

  .modal-content {
    max-height: 100%;
    height: 100%;
    border-radius: 0;
    max-width: 100%;
  }
}

/* Print Overrides for PDF generation (Módulo 9) */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }
  aside.sidebar, .page-actions, .btn, .modal-overlay {
    display: none !important;
  }
  main.main-content {
    margin-left: 0 !important;
    padding: 0 !important;
  }
  .card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
  table {
    border: 1px solid #ddd !important;
  }
  th {
    background-color: #f5f5f5 !important;
    color: #000 !important;
  }
  td, th {
    border-bottom: 1px solid #ddd !important;
  }
}

/* ─── Tooltip ⓘ ─────────────────────────────────────────────────── */
.tooltip-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.15);
  color: var(--li-blue);
  font-size: 0.65rem;
  font-weight: 700;
  cursor: help;
  position: relative;
  vertical-align: middle;
  margin-left: 4px;
  user-select: none;
  transition: background 0.2s;
}
.tooltip-trigger:hover {
  background: rgba(59, 130, 246, 0.3);
}
.tooltip-trigger::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(18, 18, 18, 0.97);
  border: 1px solid var(--card-border-hover);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 400;
  white-space: normal;
  width: max-content;
  max-width: 220px;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 1000;
  line-height: 1.4;
  box-shadow: var(--shadow-md);
}
.tooltip-trigger:hover::after {
  opacity: 1;
}

/* ─── Alert Bell button in sidebar-header ─────────────────────────── */
#alert-bell-btn {
  flex-shrink: 0;
}
#alert-bell-btn:hover svg {
  stroke: var(--color-warning);
}
#alert-bell-badge {
  transition: background 0.3s;
}

/* ─── Keyboard shortcut hint ─────────────────────────────────────── */
.sidebar-item a::after {
  content: attr(data-shortcut);
  display: inline-flex;
  font-size: 0.6rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--card-border);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: auto;
  color: var(--text-muted);
  font-family: monospace;
  opacity: 0;
  transition: opacity 0.2s;
}
.sidebar-item:hover a::after,
.sidebar:hover .sidebar-item a::after {
  opacity: 1;
}

/* ─── Action item hover ───────────────────────────────────────────── */
.action-item:hover {
  opacity: 0.85;
  transform: translateX(2px);
  transition: all 0.15s ease;
}

/* ─── Enhanced Mobile Responsiveness ──────────────────────────── */
@media (max-width: 768px) {
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .page-actions {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }

  .page-actions .btn,
  .page-actions button {
    flex: 1 1 auto;
    min-height: 44px;
    font-size: 0.85rem;
    justify-content: center;
  }

  .kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
  }

  .kpi-value {
    font-size: 1.4rem;
  }

  .card {
    padding: 16px;
    gap: 14px;
  }

  table {
    font-size: 0.8rem;
  }

  th, td {
    padding: 8px 10px;
  }

  .btn {
    min-height: 40px;
  }

  /* Tab toggle buttons row - wrap on mobile */
  .page-actions > div[style*="inline-flex"] {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .btn-tab {
    font-size: 0.75rem !important;
    padding: 6px 10px !important;
    white-space: nowrap;
  }

  /* Form groups full width on mobile */
  .form-group {
    width: 100%;
  }

  /* Dashboard row already 1-col at 1024px, ensure it on mobile too */
  .dashboard-row {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  /* Sidebar icon labels - shorter */
  .sidebar-item a span {
    display: inline-block;
  }

  /* POS table action column */
  .table-wrapper {
    -webkit-overflow-scrolling: touch;
  }

  /* Modal full height on mobile */
  .modal-overlay {
    align-items: flex-end;
  }

  .modal-content {
    max-height: 90vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  /* Page subtitle smaller */
  .page-subtitle {
    font-size: 0.82rem;
  }

  /* Raio-X and breakdown grids */
  [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Reduce filter rows in reports */
  [style*="display:flex; gap:16px; flex-wrap:wrap"] {
    flex-direction: column;
  }
}

/* Very small screens (< 400px) */
@media (max-width: 400px) {
  .kpi-grid {
    grid-template-columns: 1fr 1fr;
  }

  .kpi-value {
    font-size: 1.1rem;
  }

  .sidebar-item a {
    padding: 8px 2px;
  }
}

/* ── COMPONENTES PERSONALIZADOS LINS IMPORTS ── */

.MPCard, .mp-card {
  background-color: var(--li-graphite);
  border: 1px solid rgba(59, 130, 246, 0.12);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-md);
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.MPCard:hover, .mp-card:hover {
  border-color: var(--li-blue);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(59, 130, 246, 0.08);
}

.MPButton, .mp-button {
  background: linear-gradient(135deg, var(--li-blue), var(--li-blue-light));
  color: black !important;
  font-weight: 700;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.25);
  cursor: pointer;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: 0.3s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.MPButton:hover, .mp-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(59, 130, 246, 0.40);
  background: linear-gradient(135deg, var(--li-blue-light), var(--li-blue));
}

.MPInput, .mp-input {
  background-color: rgba(10, 10, 10, 0.8) !important;
  border: 1px solid rgba(59, 130, 246, 0.2) !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  outline: none;
  font-family: var(--font-body);
  transition: border-color 0.3s, box-shadow 0.3s;
  width: 100%;
}

.MPInput:focus, .mp-input:focus {
  border-color: var(--li-blue) !important;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.15) !important;
}

.MPBadge, .mp-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background-color: rgba(59, 130, 246, 0.12);
  color: var(--li-blue);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.MPModal, .mp-modal {
  background-color: var(--li-black);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  padding: 32px;
  max-width: 500px;
  width: 100%;
  backdrop-filter: blur(20px);
}

.MPNavbar, .mp-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  background-color: var(--li-black);
  border-bottom: 1px solid rgba(59, 130, 246, 0.12);
}

.MPSidebar, .mp-sidebar {
  width: 240px;
  background-color: var(--li-dark);
  border-right: 1px solid rgba(59, 130, 246, 0.12);
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.MPTable, .mp-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.MPTable th {
  background-color: rgba(59, 130, 246, 0.05);
  color: var(--li-blue-light);
  font-family: var(--font-heading);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 1px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(59, 130, 246, 0.15);
  text-align: left;
}

.MPTable td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(59, 130, 246, 0.08);
  color: var(--text-primary);
  font-size: 0.88rem;
}

.MPTable tr:hover td {
  background-color: rgba(59, 130, 246, 0.02);
}

.MPProductCard, .mp-product-card {
  background-color: var(--li-graphite);
  border: 1px solid rgba(59, 130, 246, 0.12);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.MPProductCard:hover, .mp-product-card:hover {
  border-color: var(--li-blue);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(59, 130, 246, 0.1);
}

.MPHeroBanner, .mp-hero-banner {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.08) 0%, transparent 100%), var(--li-black);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

.MPCard, .MPGlassContainer, .mp-glass-container {
  background: rgba(26, 26, 26, 0.65);
  backdrop-filter: blur(25px);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

/* ─── Show/Hide Mobile Utilities ─── */
.show-mobile {
  display: none !important;
}
.hide-mobile {
  display: inline-block !important;
}
@media (max-width: 768px) {
  .show-mobile {
    display: inline-block !important;
  }
  .hide-mobile {
    display: none !important;
  }
}

/* ─── Sub-navigation tabs inside views ─── */
.view-tabs {
  display: flex;
  gap: 8px;
  background: var(--bg-secondary);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  margin-bottom: 24px;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  /* main.main-content é flex-column com altura fixa (100vh); sem isso, o
     flexbox pode encolher esta barra (que tem overflow próprio, então "perde"
     a disputa por espaço) até virar uma tira quase invisível. */
  flex-shrink: 0;
}

.view-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.view-tab:hover {
  color: var(--text-primary);
}

.view-tab.active {
  background: rgba(59, 130, 246, 0.12);
  color: var(--li-blue);
}