/* ==========================================================================
   VISORA DESIGN SYSTEM - CSS VARIABLES & GLOBAL STYLES
   Author: Senior Frontend Engineer (Gemini)
   Based on: UI Screenshots Analysis
   ========================================================================== */

:root {
  /* --- PALETA DE CORES (Color Palette) --- */
  
  /* Primária: O Verde Profundo/Teal usado na Sidebar e Botões de Ação */
  --color-primary: #0D3B3E;       /* Deep Teal - Extraído da Sidebar/Botão */
  --color-primary-hover: #164E52; /* Ligeiramente mais claro para hover */
  
  /* Fundo e Superfícies */
  --color-bg-app: #F8FAFC;        /* Off-white muito sutil para o fundo geral */
  --color-bg-surface: #FFFFFF;    /* Branco puro para Cards e Modais */
  --color-bg-sidebar: #0D3B3E;    /* O mesmo da primária, mas semanticamente separado */
  
  /* Texto */
  --color-text-main: #111827;     /* Quase preto para Títulos (Gray 900) */
  --color-text-body: #374151;     /* Cinza escuro para textos gerais (Gray 700) */
  --color-text-muted: #6B7280;    /* Cinza médio para legendas/placeholders (Gray 500) */
  --color-text-inverse: #FFFFFF;  /* Texto sobre fundos escuros */
  
  /* Estados e Feedbacks */
  --color-border: #E2E8F0;        /* Bordas sutis (Gray 200) */
  --color-success-bg: #DCFCE7;    /* Fundo verde claro (Badge de Créditos) */
  --color-success-text: #166534;  /* Texto verde escuro (Badge de Créditos) */
  --color-active-nav: rgba(255, 255, 255, 0.1); /* Fundo do item de menu ativo */

  /* --- TIPOGRAFIA (Typography) --- */
  --font-family-ui: 'Inter', system-ui, -apple-system, sans-serif;
  --font-family-brand: 'Lobster Two', cursive; /* Para o Logo Visora */
  
  --font-size-xs: 0.75rem;  /* 12px */
  --font-size-sm: 0.875rem; /* 14px */
  --font-size-base: 1rem;   /* 16px */
  --font-size-lg: 1.125rem; /* 18px */
  --font-size-xl: 1.25rem;  /* 20px - Títulos de Cards */
  --font-size-2xl: 1.5rem;  /* 24px - Títulos de Página */

  /* --- ESPAÇAMENTO E BORDAS (Spacing & Radius) --- */
  --radius-sm: 4px;
  --radius-md: 8px;   /* Padrão para Inputs e Botões */
  --radius-lg: 12px;  /* Padrão para Cards */
  
  --spacing-xs: 0.5rem;
  --spacing-sm: 0.75rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;

  /* --- SOMBRAS (Shadows) --- */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 83%;
}

body {
  font-family: var(--font-family-ui);
  background-color: var(--color-bg-app);
  color: var(--color-text-body);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  color: var(--color-text-main);
  margin-top: 0;
  font-weight: 600;
}

/* Marca Visora (Logo na Sidebar) */
.brand-logo {
  font-family: var(--font-family-brand);
  font-size: 2.5rem; /* Aprox 40px */
  color: var(--color-text-inverse);
  font-style: italic;
  font-weight: 700; /* Bold para ficar igual à imagem */
}

/* ==========================================================================
   LAYOUT COMPONENTS (Grid & Structure)
   ========================================================================== */

/* Layout Principal: Sidebar fixa + Conteúdo Fluido */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Layout para Páginas de Autenticação */
.auth-container {
  display: flex;
  min-height: 100vh;
  padding: 0; /* Remove padding to allow full split */
  background-color: var(--color-bg-app);
}

.auth-split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    height: 100vh; /* Fixed height */
    border-radius: 0; /* Remove radius */
    overflow: hidden;
}

.auth-promo-panel {
    background-color: var(--color-primary);
    color: var(--color-text-inverse);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between; /* Space content: Logo top, Quote center, Footer bottom */
    padding: var(--spacing-xl);
    text-align: center;
    height: 100vh; /* Fixed height matching viewport */
    overflow: hidden; /* Prevent content overflow */
}

.auth-promo-panel .auth-logo {
    font-size: 3rem;
    color: var(--color-text-inverse);
}

.auth-quote {
    font-family: var(--font-family-brand); /* Or generic serif */
    font-size: 2rem;
    line-height: 1.4;
    max-width: 80%;
    font-style: italic;
    opacity: 0.95;
}

.auth-form-panel {
    display: flex;
    align-items: center;
    justify-content: center; /* Start from top to respect padding */
    padding: var(--spacing-xl);
    background-color: var(--color-bg-app);
    height: 100vh; /* Fixed height matching viewport */
    overflow-y: auto; /* Enable vertical scroll when content exceeds viewport */
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background-color: transparent; /* Remove card bg if wanting a cleaner look on right, or keep surface */
    /* background-color: var(--color-bg-surface); */
    /* box-shadow: var(--shadow-md); */
    padding: var(--spacing-xl);
    box-shadow: none; /* Cleaner look for split screen */
    margin: auto 0; /* Center vertically when there's space, but respect padding when scrolling */
}

/* If keeping card style */
.auth-card {
    background-color: var(--color-bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.auth-card-title {
    font-size: 1.75rem; 
    font-weight: 600; 
    color: var(--color-text-main); 
    margin-bottom: var(--spacing-xs);
}

.auth-logo {
    font-family: var(--font-family-brand);
    font-size: 3rem;
    color: var(--color-primary);
    text-align: center;
    margin-bottom: var(--spacing-lg);
    font-style: italic;
}

/* Desktop: back button lives in the promo panel (white on green bg) */
.auth-back-btn-form {
    display: none;
}
.auth-back-btn-promo {
    display: inline-flex;
    color: rgba(255, 255, 255, 0.85);
}
.auth-back-btn-promo:hover {
    color: #fff;
}

@media (max-width: 860px) {
    .auth-container {
        padding: 0;
    }
    .auth-split-layout {
        grid-template-columns: 1fr;
        max-width: 100%;
        min-height: 100vh;
        border-radius: 0;
    }
    .auth-promo-panel {
        display: none;
    }
    .auth-form-panel {
        padding: var(--spacing-lg);
        align-items: flex-start;
    }
    .auth-card {
        box-shadow: none;
    }
    /* Mobile: back button on white bg */
    .auth-back-btn-form {
        display: inline-flex;
    }
    .auth-back-btn-promo {
        position: static;
        color: var(--color-text-main);
        margin-bottom: var(--spacing-lg);
    }
    .auth-back-btn-promo:hover {
        color: var(--color-primary);
    }
}


/* Sidebar (Menu Lateral) */
.sidebar {
  width: 260px;
  background-color: var(--color-bg-sidebar);
  color: var(--color-text-inverse);
  display: flex;
  flex-direction: column;
  padding: var(--spacing-lg);
  flex-shrink: 0;
  
  /* Fixar a sidebar na altura da janela */
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto; /* Permitir scroll interno se necessário */
}

/* Links da Navegação */
.nav-link {
  display: flex;
  align-items: center;
  padding: var(--spacing-sm) var(--spacing-md);
  color: #94A3B8; /* Slate 400 - inativo */
  text-decoration: none;
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-xs);
  transition: all 0.2s;
  font-weight: 500;
}

.nav-link:hover {
  color: var(--color-text-inverse);
  background-color: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: var(--color-text-inverse);
  background-color: var(--color-active-nav);
  font-weight: 600;
}

/* Área Principal de Conteúdo */
.main-content {
  flex: 1;
  padding: var(--spacing-xl);
  overflow-y: auto;
}

/* Cabeçalho da Página (Ex: "Bem-vindo(a), Demo") */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-xl);
}

/* ==========================================================================
   UI COMPONENTS (Cards, Buttons, Inputs)
   ========================================================================== */

/* --- CARDS --- */
.card {
  background-color: var(--color-bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  padding: var(--spacing-lg);
  transition: box-shadow 0.2s;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

/* Variação: Card de Crédito Escuro (Visto na Dashboard) */
.card-primary {
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
  border: none;
}

/* --- BOTÕES --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem; /* 10px 20px */
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: var(--font-size-sm);
  cursor: pointer;
  transition: background-color 0.2s;
  border: none;
  line-height: 1.25;
  font-family: 'Inter';
}

/* Botão Primário (Verde Escuro) */
.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
}

/* Botão Secundário/Outline (Para 'Gerenciar Clientes' ou ações secundárias) */
.btn-ghost {
  background-color: transparent;
  color: var(--color-text-body);
}

.btn-ghost:hover {
  background-color: #F1F5F9;
}

/* --- INPUTS & FORMS --- */
.input-field, .select-field {
  width: 100%;
  padding: 0.625rem var(--spacing-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  color: var(--color-text-main);
  background-color: var(--color-bg-surface);
  outline: none;
  transition: border-color 0.2s;
}

.input-field:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(13, 59, 62, 0.1);
}

/* Label dos Inputs */
.input-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-main);
  margin-bottom: var(--spacing-xs);
}

/* --- UPLOAD ZONE (Visto na tela de Provador) --- */
.upload-zone {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--spacing-xl);
  text-align: center;
  background-color: #FAFAFA;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 140px;
}

.upload-zone:hover {
  border-color: var(--color-primary);
  background-color: #F0FDFA; /* Mint bem claro */
}

.upload-text-main {
  font-weight: 500;
  color: var(--color-text-main);
  margin-bottom: 4px;
}

.upload-text-sub {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

/* --- TABS (Visto na tela do Provador: "Modo Padrão" | "Modo Plus") --- */
.tabs-container {
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--spacing-lg);
  display: flex;
  gap: var(--spacing-lg);
}

.tab-item {
  padding-bottom: var(--spacing-sm);
  color: var(--color-text-muted);
  font-weight: 500;
  cursor: pointer;
  position: relative;
}

.tab-item.active {
  color: var(--color-primary);
  font-weight: 600;
}

.tab-item.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-primary);
}

/* --- BADGES (Visto: "50 Créditos") --- */
.badge-success {
  background-color: var(--color-success-bg);
  color: var(--color-success-text);
  padding: 2px 8px;
  border-radius: 99px;
  font-size: var(--font-size-xs);
  font-weight: 600;
}

/* --- BADGE Genérico --- */
.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 99px;
    background-color: #E2E8F0; /* Cinza claro como padrão */
    color: #475569; /* Cinza escuro */
}

.badge-danger {
    background-color: #FFE4E6;
    color: #9B1C1C;
}

/* --- ALERTS (Notifications inside page content) --- */
.alert {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
    text-align: center;
    font-size: var(--font-size-sm);
}

.alert-danger {
    background-color: #FFE4E6; /* Based on badge-danger */
    color: #9B1C1C; /* Based on badge-danger */
}
.alert-success {
    background-color: var(--color-success-bg);
    color: var(--color-success-text);
}

/* --- PAGINAÇÃO --- */
.pagination {
    display: flex;
    justify-content: center;
    padding-left: 0;
    list-style: none;
    margin-top: var(--spacing-lg);
}

.page-item .page-link {
    position: relative;
    display: block;
    padding: 0.5rem 0.75rem;
    margin-left: -1px;
    line-height: 1.25;
    color: var(--color-primary);
    background-color: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    text-decoration: none;
    transition: all 0.2s;
}

.page-item:first-child .page-link {
    margin-left: 0;
    border-top-left-radius: var(--radius-md);
    border-bottom-left-radius: var(--radius-md);
}

.page-item:last-child .page-link {
    border-top-right-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}

.page-item.active .page-link {
    z-index: 1;
    color: var(--color-text-inverse);
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.page-item.disabled .page-link {
    color: var(--color-text-muted);
    pointer-events: none;
    background-color: var(--color-bg-surface);
    border-color: var(--color-border);
}

.page-link:hover {
    background-color: #F8FAFC;
}



/* --- GRID SYSTEM PARA CLIENTES --- */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--spacing-lg);
}

.client-card-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-md);
}

/* --- TABELAS --- */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: var(--spacing-lg);
}
.table th, .table td {
    padding: var(--spacing-md);
    text-align: left;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}
.table thead th {
    font-weight: 600;
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    background-color: var(--color-bg-app);
}
.table tbody tr:hover {
    background-color: #F8FAFC; /* Um off-white sutil */
}

/* --- MODAIS --- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    display: none;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
    background-color: rgba(17, 24, 39, 0.6);
}
.modal.fade {
    transition: opacity .15s linear;
}
.modal.show {
    display: block;
}
.modal-dialog {
    position: relative;
    width: auto;
    margin: 0.5rem;
    pointer-events: none;
}
@media (min-width: 576px) {
    .modal-dialog {
        max-width: 500px;
        margin: 1.75rem auto;
    }
}
.modal.fade .modal-dialog {
    transition: transform .3s ease-out;
    transform: translate(0,-50px);
}
.modal.show .modal-dialog {
    transform: none;
}
@media (min-width: 992px) {
    .modal-lg, .modal-xl {
        max-width: 800px;
    }
}
.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: var(--color-bg-surface);
    background-clip: padding-box;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    outline: 0;
}
.modal-header {
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h5 {
    margin: 0;
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--color-text-main);
}
.modal-body {
    padding: var(--spacing-lg);
}
.modal-footer {
    padding: var(--spacing-md) var(--spacing-lg);
    background-color: #F8FAFC;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-sm);
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
}
.btn-close {
    border: none;
    background: transparent;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    color: var(--color-text-muted);
    line-height: 1;
}
.btn-close:hover {
    color: var(--color-text-main);
}
/* --- TAB SYSTEM (Custom Tabs) --- */
/* .tabs-container {
    display: flex;
    flex-direction: column;
} */

.tabs-header {
    display: flex;
    border-bottom: 2px solid var(--color-border);
    background-color: var(--color-bg-app);
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
}

.tab-button {
    padding: var(--spacing-md) var(--spacing-lg);
    background-color: transparent;
    border: none;
    color: var(--color-text-body);
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
}

.tab-button:hover {
    color: var(--color-text-main);
}

.tab-button.active {
    color: var(--color-primary);
    font-weight: 600;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--color-primary);
}

.tab-content {
    padding: var(--spacing-lg);
    display: none;
}

.tab-content.active {
    display: block;
}

.filter-form {
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    background-color: var(--color-bg-app);
    border-radius: var(--radius-md);
}

/* ==========================================================================
   UTILITIES (Continued)
   ========================================================================== */
.me-2 { margin-right: 0.5rem !important; }

/* ==========================================================================
   DASHBOARD SPECIFIC STYLES
   ========================================================================== */
.page-header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}
.card-promo {
    /* grid-column: span 1 / -1; Removido para integrar ao fluxo natural do grid */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.card-promo-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-grow: 1;
}
.card-promo-content h3 {
    color: var(--color-text-inverse);
    margin-bottom: var(--spacing-sm);
}
.card-promo-content p {
    color: var(--color-text-inverse);
    opacity: 0.9;
    margin-bottom: 0;
}
.card-promo-credits .value {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1;
}
.card-promo-credits .label {
    color: #fff;
    opacity: 0.8;
    font-size: var(--font-size-sm);
}
.card-promo .btn-inverted {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    width: auto;
    margin-top: var(--spacing-md);
    align-self: flex-start;
    transition: background-color 0.2s;
}
.card-promo .btn-inverted:hover {
    background: rgba(255, 255, 255, 0.3);
}
.stat-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}
.stat-card__icon {
    background-color: #E0F2F1;
    color: var(--color-primary);
    padding: 12px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.stat-card__info .stat-card__value {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    line-height: 1;
    color: var(--color-text-main);
}
.stat-card__info .stat-card__label {
    color: var(--color-text-muted);
    margin: 0;
    margin-top: 4px;
    font-size: var(--font-size-sm);
}
.quick-access-links {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}


/* ==========================================================================
   UTILITIES
   ========================================================================== */
.d-none {
    display: none !important;
}

.w-100 {
    width: 100% !important;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

/* Flex Utilities (Replicating Bootstrap basic flex classes) */
.d-flex {
    display: flex !important;
}

.align-items-center {
    align-items: center !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.justify-content-center {
    justify-content: center !important;
}

.justify-content-end {
    justify-content: flex-end !important;
}

.flex-column {
    flex-direction: column !important;
}

.gap-sm {
    gap: var(--spacing-sm);
}

.gap-md {
    gap: var(--spacing-md);
}

.mb-md {
    margin-bottom: var(--spacing-md);
}

.mb-lg {
    margin-bottom: var(--spacing-lg);
}

.mt-lg {
    margin-top: var(--spacing-lg);
}

.link-muted {
    color: var(--color-text-muted); 
    font-size: var(--font-size-sm); 
    text-decoration: none;
    transition: color 0.2s;
}

.link-muted:hover {
    color: var(--color-text-body);
    text-decoration: underline;
}

/* ==========================================================================
   MOBILE RESPONSIVENESS
   ========================================================================== */

/* Overlay for Mobile Sidebar */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040; /* Just below sidebar */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: none;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
    visibility: visible;
}

/* Mobile Header (Hidden on Desktop) */
.mobile-header {
    display: none; /* Default hidden */
}

/* Hide d-md-none elements on desktop (min-width: 769px) */
@media (min-width: 769px) {
    .d-md-none {
        display: none !important;
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    /* Utilities */
    .d-md-none {
        display: flex !important;
    }
    
    .d-md-block {
        display: none !important;
    }

    /* Adjust Layout */
    .app-layout {
        flex-direction: column;
    }

    /* Mobile Header */
    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: var(--spacing-md);
        background-color: var(--color-bg-sidebar);
        color: var(--color-text-inverse);
        position: sticky;
        top: 0;
        z-index: 1030;
        box-shadow: var(--shadow-sm);
    }
    
    .mobile-logo {
        font-family: var(--font-family-brand);
        font-weight: 700;
        font-style: italic;
    }

    /* Sidebar on Mobile */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 280px;
        z-index: 1050; /* Above overlay */
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 4px 0 24px rgba(0,0,0,0.15);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    /* Main Content Adjustments */
    .main-content {
        width: 100%;
        padding: var(--spacing-md);
        margin-left: 0 !important; /* Ensure no margin push */
    }

    /* Adjust other components if needed */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }

    .page-header-actions {
        width: 100%;
        justify-content: space-between;
    }
}

/* Responsive Tables */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .table th, .table td {
        padding: var(--spacing-sm); /* Reduce padding on mobile */
        font-size: var(--font-size-xs); /* Smaller font on mobile */
        white-space: nowrap; /* Prevent text wrapping that makes rows too tall */
    }
}

/* Layout Assinatura */
.subscription-layout {
    display: block;
    grid-template-columns: 1fr 2fr;
    gap: var(--spacing-xl);
    align-items: flex-start;
}

@media (max-width: 900px) {
    .subscription-layout {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
}
