/* Variáveis CSS */
:root {
    /* Cores de Marca */
    --primary-color: #4cb04f;
    --primary-hover: #45a049;
    --primary-dark: #388e3c;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --success-color: #2e7d32;
    --warning-color: #f9a825;
    --danger-color: #d32f2f;

    /* Cores de Interface (Light Mode) */
    --background-color: #f8fafc;
    --card-background: #ffffff;
    --text-main: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --shadow-color: rgba(0, 0, 0, 0.05);

    /* Sidebar Light */
    --sidebar-bg: #111827;
    --sidebar-text: #d1d5db;
    --sidebar-hover: rgba(255, 255, 255, 0.1);
    --sidebar-active-bg: var(--primary-color);
    --sidebar-active-text: #ffffff;

    /* Utilitários */
    --radius-sm: 0.375rem;
    --radius: 0.75rem;
    --radius-lg: 1rem;
    --shadow: 0 4px 6px -1px var(--shadow-color), 0 2px 4px -1px var(--shadow-color);
}

/* Dark Mode Variables - Midnight Luxe */
[data-theme="dark"] {
    --background-color: #0d1117;
    /* Fundo principal estilo GitHub/Linear */
    --card-background: #161b22;
    /* Superfície secundária */
    --surface-hover: #21262d;
    /* Hover e destaque */
    --text-main: #f0f6fc;
    --text-secondary: #8b949e;
    --text-muted: #586069;
    --border-color: #30363d;
    --shadow-color: rgba(0, 0, 0, 0.6);

    --sidebar-bg: #010409;
    --sidebar-text: #c9d1d9;
    --sidebar-hover: rgba(255, 255, 255, 0.05);

    --primary-color: #4cb04f;
    --primary-hover: #5ec461;

    transition: background-color 0s;
    /* Evita flash branco em carregamento se possível */
}

/* Global Elements in Dark Mode */
[data-theme="dark"] body {
    background-color: var(--background-color);
    color: var(--text-main);
}

[data-theme="dark"] .card,
[data-theme="dark"] .card-mesa,
[data-theme="dark"] .modal-content,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .filter-card-premium,
[data-theme="dark"] .stat-card-lux,
[data-theme="dark"] .caixa-item-card,
[data-theme="dark"] .payment-card {
    background-color: var(--card-background) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] .nav-bar {
    background-color: rgba(22, 27, 34, 0.85);
    backdrop-filter: blur(12px) saturate(180%);
    border-bottom: 1px solid var(--border-color);
}

/* Intercalação de Linhas em Dark Mode */
[data-theme="dark"] tr:nth-child(even),
[data-theme="dark"] .order-item:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.015);
}

[data-theme="dark"] tr:hover td,
[data-theme="dark"] .order-item:hover {
    background-color: var(--surface-hover) !important;
}

[data-theme="dark"] .table th {
    background-color: #0d1117;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
}

/* Inputs e Seleções Premium */
[data-theme="dark"] .form-input,
[data-theme="dark"] .premium-select,
[data-theme="dark"] .premium-date,
[data-theme="dark"] .pix-code-input {
    background-color: #0d1117 !important;
    border-color: var(--border-color) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] .form-input:focus,
[data-theme="dark"] .premium-select:focus,
[data-theme="dark"] .premium-date:focus {
    background-color: #161b22 !important;
    border-color: var(--primary-color) !important;
}

/* Elementos Luxuosos (Dashboard) */
[data-theme="dark"] .stat-card-lux .stat-value {
    color: var(--text-main);
}

[data-theme="dark"] .stat-card-lux .stat-label,
[data-theme="dark"] .caixa-val-label,
[data-theme="dark"] .filter-group-premium label {
    color: var(--text-secondary);
}

[data-theme="dark"] .stat-icon {
    filter: brightness(0.8) contrast(1.2);
}

[data-theme="dark"] .stat-blue .stat-icon {
    background: rgba(37, 99, 235, 0.15);
}

[data-theme="dark"] .stat-green .stat-icon {
    background: rgba(22, 163, 74, 0.15);
}

[data-theme="dark"] .stat-amber .stat-icon {
    background: rgba(217, 119, 6, 0.15);
}

[data-theme="dark"] .stat-danger .stat-icon {
    background: rgba(220, 38, 38, 0.15);
}

/* Caixa e Financeiro */
[data-theme="dark"] .caixa-date,
[data-theme="dark"] .caixa-val-amount {
    color: var(--text-main);
}

[data-theme="dark"] .btn-view-premium,
[data-theme="dark"] .plan-summary-box,
[data-theme="dark"] .due-date-box,
[data-theme="dark"] .qr-code-frame {
    background-color: var(--surface-hover) !important;
    border-color: var(--border-color) !important;
    color: var(--text-main) !important;
}

/* Modal e Utilitários */
[data-theme="dark"] .close-button {
    background-color: var(--surface-hover);
    color: var(--text-secondary);
}

[data-theme="dark"] .modal {
    background-color: rgba(0, 0, 0, 0.85);
}

[data-theme="dark"] .global-loader {
    background: rgba(13, 17, 23, 0.8);
    backdrop-filter: blur(4px);
}

[data-theme="dark"] .spinner {
    border-color: rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-color);
}

[data-theme="dark"] .stat-danger .stat-icon {
    background: rgba(220, 38, 38, 0.15);
}

/* Dark Mode Refinements for Configurations */
[data-theme="dark"] .card-header-premium {
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .header-text h2 {
    color: var(--text-main);
}

[data-theme="dark"] .header-text p {
    color: var(--text-secondary);
}

[data-theme="dark"] .bg-primary-soft {
    background-color: rgba(76, 175, 80, 0.15);
}

[data-theme="dark"] .bg-secondary-soft {
    background-color: rgba(59, 130, 246, 0.15);
}

[data-theme="dark"] .form-group-premium label {
    color: var(--text-secondary);
}

[data-theme="dark"] .input-premium-wrapper .input-icon {
    color: var(--text-muted);
}

[data-theme="dark"] .btn-upload {
    background-color: var(--surface-hover);
    border-color: var(--border-color);
    color: var(--text-main);
}

[data-theme="dark"] .btn-upload:hover {
    background-color: rgba(76, 175, 80, 0.1);
}

[data-theme="dark"] .btn-toggle-form {
    background-color: var(--surface-hover);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

[data-theme="dark"] .btn-toggle-form:hover {
    background-color: var(--border-color);
    color: var(--text-main);
}

[data-theme="dark"] .collapsible {
    background-color: rgba(255, 255, 255, 0.02);
    border-color: var(--border-color);
}

[data-theme="dark"] .user-avatar-small {
    background-color: var(--border-color);
    color: var(--text-main);
}

[data-theme="dark"] .btn-action-icon {
    background-color: var(--surface-hover);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

[data-theme="dark"] .btn-action-icon:hover {
    background-color: var(--border-color);
    color: var(--primary-color);
}

[data-theme="dark"] .suggestions {
    background-color: var(--card-background);
    border-color: var(--border-color);
}

/* Status Badges no Dark Mode */
[data-theme="dark"] .status-disponivel {
    background: rgba(22, 163, 74, 0.2);
    color: #4ade80;
}

[data-theme="dark"] .status-ocupada {
    background: rgba(220, 38, 38, 0.2);
    color: #f87171;
}

[data-theme="dark"] .status-fechada {
    background: rgba(220, 38, 38, 0.2);
    color: #f87171;
}

[data-theme="dark"] .status-reservada {
    background: rgba(217, 119, 6, 0.2);
    color: #fbbf24;
}

[data-theme="dark"] .diff-pos {
    background: rgba(22, 163, 74, 0.2);
    color: #4ade80;
}

[data-theme="dark"] .diff-neg {
    background: rgba(220, 38, 38, 0.2);
    color: #f87171;
}

/* Scrollbar Style */
[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #39414a;
}

[data-theme="dark"] ::-webkit-scrollbar-track {
    background: #0d1117;
}

/* Reset e Estilos de Transição */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.5;
    color: var(--text-main);
    background-color: var(--background-color);
    transition: background-color 0s, color 0.3s ease;
    /* Transição de 0s no BG para evitar flash */
}

[data-theme="dark"] .form-input,
[data-theme="dark"] select,
[data-theme="dark"] input {
    background-color: #0f172a;
    border-color: var(--border-color);
    color: #fff;
}

[data-theme="dark"] .btn-secondary {
    background-color: var(--border-color);
    color: var(--text-main);
}

/* Sidebar Styling */
.sidebar {
    width: 280px;
    background-color: var(--sidebar-bg);
    position: fixed;
    height: 100vh;
    top: 0;
    left: -280px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 1.25rem 0;
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.sidebar.active {
    left: 0;
}

.nav-link {
    text-decoration: none;
    color: var(--sidebar-text);
    padding: 0.75rem 1rem;
    border-radius: 0.625rem;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background-color: var(--sidebar-hover);
    color: #fff;
    transform: translateX(4px);
}

.nav-link.active {
    background-color: var(--sidebar-active-bg);
    color: var(--sidebar-active-text);
}

/* Navbar & Toggle Theme */
.nav-bar {
    background-color: var(--card-background);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 1px solid var(--border-color);
}

.btn-theme-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

[data-theme="dark"] .btn-theme-toggle {
    color: #fbbf24;
}

.btn-theme-toggle:hover {
    background-color: var(--border-color);
}

.user-name {
    font-weight: 600;
    color: var(--text-main);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--gray-400);
}

.min-h-screen {
    min-height: 100vh;
}

/* Sidebar */
.logo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem 2rem;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
}

.logo-text {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.logo-text span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.logo i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    flex-direction: column;
    padding: 0 0.75rem;
    overflow-y: auto;
    flex: 1;
}

/* Custom Scrollbar for Sidebar */
.nav-links::-webkit-scrollbar {
    width: 4px;
}

.nav-links::-webkit-scrollbar-track {
    background: transparent;
}

.nav-links::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.nav-link i,
.nav-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #9ca3af;
    transition: color 0.2s;
}

.nav-link:hover i,
.nav-link:hover svg {
    color: var(--primary-color);
}

.nav-link.active i,
.nav-link.active svg {
    color: white;
}

/* Main Content */
.main-content {
    margin-left: 0;
    transition: margin-left 0.3s ease;
    min-height: 100vh;
}

.main-content.expanded {
    margin-left: 280px;
}

.nav-bar {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-bottom: 0.875rem;
    /* Safe area para PWA no iPhone (notch / câmera) */
    padding-top: env(safe-area-inset-top, 0px);
    /* iOS 11.2+ */
    /* Garante espaço mínimo mesmo quando safe-area-inset-top = 0 (browser normal) */
    padding-top: max(0.875rem, calc(env(safe-area-inset-top, 0px) + 0.5rem));
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.nav-bar h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.nav-toggle {
    background: #f3f4f6;
    border: none;
    color: #4b5563;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.75rem;
    /* Área de toque um pouco maior */
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 50;
    /* PWA iOS touch fixes */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.nav-toggle i,
.nav-toggle svg {
    color: #4b5563;
    transition: color 0.2s ease;
    pointer-events: none;
    /* Evita que o SVG roube o evento de clique do botão no celular */
}

.nav-toggle:hover {
    background-color: #e5e7eb;
    color: #111827;
}

.nav-toggle:hover i,
.nav-toggle:hover svg {
    color: #111827;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-back {
    background: #f3f4f6;
    border: none;
    color: #4b5563;
    padding: 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

.nav-back i,
.nav-back svg {
    color: #4b5563;
    transition: color 0.2s ease;
    pointer-events: none;
}

.nav-back:hover {
    background: #e5e7eb;
    color: #111827;
}

.nav-back:hover i,
.nav-back:hover svg {
    color: #111827;
}

.mobile-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.75rem;
    /* alvo de toque melhor */
    border-radius: 0.5rem;
    transition: all 0.2s;
    display: none;
    touch-action: manipulation;
}

.mobile-close i,
.mobile-close svg {
    pointer-events: none;
}

.mobile-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    font-weight: 600;
    color: #4b5563;
    font-size: 0.9375rem;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
}

/* Main Container */
.main-container {
    padding: 1.5rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background-color: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.stat-info h3 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Dashboard Grid */

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(520px, 1fr));
    gap: 1.5rem;
    width: 100%;
    /* Ocupa a largura total por padrão */
}

.grid-container.centered {
    max-width: 1200px;
    /* Define uma largura máxima */
    margin: 0 auto;
    /* Centraliza horizontalmente */
    padding: 1rem;
    /* Adiciona um pouco de espaço ao redor */
}


/* Cards */
.card {
    background-color: var(--card-background);
    border-radius: 1rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Status Badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-disponivel {
    background-color: #dcfce7;
    color: #166534;
}

.status-ocupada {
    background-color: #fee2e2;
    color: #991b1b;
}

.status-fechada {
    background-color: #fee2e2;
    color: red;
}

.status-reservada {
    background-color: #fef3c7;
    color: #92400e;
}

[data-theme="dark"] .status-disponivel {
    background-color: rgba(22, 101, 52, 0.2);
    color: #4ade80;
}

[data-theme="dark"] .status-ocupada {
    background-color: rgba(153, 27, 27, 0.2);
    color: #f87171;
}

[data-theme="dark"] .status-fechada {
    background-color: rgba(153, 27, 27, 0.2);
    color: #f87171;
}

[data-theme="dark"] .status-reservada {
    background-color: rgba(146, 64, 14, 0.2);
    color: #fbbf24;
}

/* Lista de Pedidos */
.orders-list {
    margin: 1rem 0;
    min-height: 60px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-color);
}

.order-item:last-child {
    border-bottom: none;
}

/* =============================================
   BOTÕES - Sistema de design moderno iOS-ready
   =============================================*/

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.25rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.625rem;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary i,
.btn-primary svg {
    pointer-events: none;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.25rem;
    background-color: #f3f4f6;
    color: #374151;
    border: 1.5px solid #d1d5db;
    border-radius: 0.625rem;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
}

.btn-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.25rem;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 0.625rem;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
}

.btn-info:hover {
    background-color: #2563eb;
}

.btn-info:active {
    transform: scale(0.98);
}


.btn-secondary:hover {
    background-color: #e5e7eb;
}

.btn-secondary:active {
    transform: scale(0.98);
}

.btn-secondary i,
.btn-secondary svg {
    pointer-events: none;
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.25rem;
    background-color: #fee2e2;
    color: #dc2626;
    border: 1.5px solid #fecaca;
    border-radius: 0.625rem;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
}

.btn-danger:hover {
    background-color: #fecaca;
    border-color: #fca5a5;
}

.btn-danger:active {
    transform: scale(0.98);
}

.btn-danger i,
.btn-danger svg {
    pointer-events: none;
}

.btn-success {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.25rem;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    border: none;
    border-radius: 0.625rem;
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
    transition: all 0.2s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
    width: 100%;
}

.btn-success:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
}

.btn-success:active {
    transform: scale(0.98);
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.3);
}

.btn-success i,
.btn-success svg {
    pointer-events: none;
}

.btn-warning {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.25rem;
    background-color: #fef3c7;
    color: #92400e;
    border: 1.5px solid #fde68a;
    border-radius: 0.625rem;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    touch-action: manipulation;
    min-height: 44px;
}

.btn-warning:hover {
    background-color: #fde68a;
}

.btn-delete {
    background: #fee2e2;
    color: #ef4444;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    min-height: 40px;
    min-width: 40px;
}

.btn-delete:hover {
    background: #fecaca;
}

.btn-delete i,
.btn-delete svg {
    pointer-events: none;
}

.btn-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
}

.btn-link:hover {
    text-decoration: underline;
}

.icon {
    width: 1.25rem;
    height: 1.25rem;
}


.btn-warning {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: #f1c40f;
    color: yellow;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-warning:hover {
    background-color: #f1c40f;
}

.btn-link {
    color: #4CAF50;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
}

.btn-link:hover {
    text-decoration: underline;
}

/* Table */
.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table th {
    padding: 0.75rem 1.5rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    color: #6b7280;
    background-color: #f9fafb;
}

.table td {
    padding: 1rem 1.5rem;
    white-space: nowrap;
    border-top: 1px solid #e5e7eb;
}

.table tr:hover td {
    background-color: #f9fafb;
}


.product-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.product-info i {
    color: #4CAF50;
}

/* Badges */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-warning {
    background-color: #fff3e0;
    color: #ef6c00;
}

.badge-danger {
    background-color: #ffebee;
    color: #c62828;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-critical {
    background-color: #ffebee;
    color: #c62828;
}

/* Chart */
.chart-container {
    padding: 1.5rem;
    height: 300px;
}

/* Receipt footer */
.receipt-footer {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.125rem;
    font-weight: 600;
}

/* Delete button */
.btn-delete {
    color: #dc2626;
    background: #fee2e2;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    padding: 0.5rem 0.65rem;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    min-width: 40px;
    touch-action: manipulation;
}

.btn-delete:hover {
    background: #fecaca;
}

.btn-delete i,
.btn-delete svg {
    pointer-events: none;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    padding: 1rem;
    /* Safe area iOS */
    padding-top: max(1rem, env(safe-area-inset-top));
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
    backdrop-filter: blur(2px);
}

.modal-content {
    background-color: white;
    border-radius: 1.25rem;
    padding: 1.75rem;
    width: 100%;
    max-width: 520px;
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-color);
}

.close-button {
    background: #f3f4f6;
    border: none;
    font-size: 1.2rem;
    color: #6b7280;
    cursor: pointer;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

.close-button:hover {
    background: #e5e7eb;
}

.modal-body {
    margin-bottom: 1.25rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* =============================================
   FORMULÁRIOS - Altura de toque iOS-friendly
   =============================================*/
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid #d1d5db;
    border-radius: 0.625rem;
    font-size: 0.9375rem;
    min-height: 48px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 176, 79, 0.15);
}

select.form-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

textarea.form-input {
    min-height: 100px;
    resize: vertical;
}

.delete-item {
    margin-left: 10px;
    cursor: pointer;
    color: #ff0000;
    font-size: 18px;
    font-weight: bold;
}

.delete-item:hover {
    color: #cc0000;
}

.suggestions {
    border: 1px solid #ccc;
    max-height: 150px;
    overflow-y: auto;
    position: absolute;
    background-color: white;
    max-width: 300px;
    /* Define a largura máxima */
    width: 100%;
    /* Ocupa 100% da largura do contêiner pai, até o máximo de 300px */
    z-index: 1000;
}

.suggestion-item {
    padding: 8px;
    cursor: pointer;
}

.suggestion-item:hover {
    background-color: #f0f0f0;
}

.payment-method-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-payment-method {
    padding: 10px 20px;
    border: 2px solid #ccc;
    border-radius: 5px;
    background-color: #f9f9f9;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
}

.btn-payment-method.selected {
    border-color: #4CAF50;
    background-color: #4CAF50;
    color: white;
}

/* Responsividade Global */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 280px;
        left: -280px;
        z-index: 1000;
    }

    .mobile-close {
        display: block;
    }

    .main-content {
        margin-left: 0 !important;
    }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .sidebar.active+.sidebar-overlay {
        opacity: 1;
        visibility: visible;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .nav-bar h1 {
        font-size: 1.1rem;
    }

    .user-name {
        display: none;
    }

    .card {
        border-radius: 0.75rem;
        padding: 1.125rem;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .card-actions {
        width: 100%;
        justify-content: flex-start;
    }

    /* Tabela Mobile Cards - global */
    .table-mobile-cards thead {
        display: none;
    }

    .table-mobile-cards tr {
        display: block;
        margin-bottom: 0.75rem;
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 0.75rem;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
        overflow: hidden;
    }

    .table-mobile-cards td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.7rem 0.85rem;
        border-bottom: 1px solid #f3f4f6;
        font-size: 0.9rem;
    }

    .table-mobile-cards td:last-child {
        border-bottom: none;
    }

    .table-mobile-cards td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #6b7280;
        text-transform: uppercase;
        font-size: 0.72rem;
        letter-spacing: 0.04em;
        flex-shrink: 0;
        margin-right: 0.75rem;
    }

    .table-mobile-cards td.action-cell {
        justify-content: flex-end;
    }

    .table-mobile-cards td.action-cell::before {
        display: none;
    }

    .grid-container {
        grid-template-columns: 1fr !important;
    }

    .modal-content {
        border-radius: 1rem;
        padding: 1.25rem;
        margin: 0;
    }

    .modal-footer {
        flex-direction: column-reverse;
    }

    .modal-footer .btn-primary,
    .modal-footer .btn-secondary,
    .modal-footer .btn-danger {
        width: 100%;
        justify-content: center;
    }

    .btn-primary,
    .btn-secondary,
    .btn-danger,
    .btn-success,
    .btn-warning {
        min-height: 48px;
        font-size: 0.9375rem;
    }
}

@media (max-width: 640px) {
    .main-container {
        padding: 0.75rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .card {
        padding: 1rem;
    }

    .table-container {
        margin: 0 -0.75rem;
        padding: 0 0.75rem;
    }

    .table td,
    .table th {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 390px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .main-container {
        padding: 0.6rem;
    }
}

/* Mobile Responsive Tables (Card Pattern) */
@media (max-width: 640px) {
    .table-mobile-cards thead {
        display: none;
    }

    .table-mobile-cards tr {
        display: block;
        margin-bottom: 1.5rem;
        background: #fff;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 0.5rem;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    }

    .table-mobile-cards td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        padding: 0.75rem 0.5rem !important;
        border-bottom: 1px solid #f3f4f6;
    }

    .table-mobile-cards td:last-child {
        border-bottom: none;
    }

    .table-mobile-cards td::before {
        content: attr(data-label);
        font-weight: 600;
        text-align: left;
        margin-right: 1rem;
        color: #6b7280;
    }

    .table-mobile-cards .product-info {
        flex-direction: row-reverse;
    }
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.grid-container.centered {
    justify-content: center;
}

@media (max-width: 1024px) {
    .grid-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.color-config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

/* Helper Classes */

.flex-stack {
    display: flex;
    gap: 1rem;
    align-items: center;
}

@media (max-width: 640px) {
    .flex-stack {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Modal Responsive Helpers */
.modal-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .modal-grid-container {
        grid-template-columns: 1fr;
    }
}
















/* Cards */
.card {
    background-color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 1.5rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--gray-50);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem;
    border-radius: var(--radius-md);
}

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

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
}

/* Search Container */
.search-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-input-group {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.filter-group {
    display: flex;
    gap: 1rem;
}

.filter-select {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--gray-700);
    background-color: white;
    cursor: pointer;
}

/* Inventory Card */
.inventory-card {
    margin-top: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-actions {
    display: flex;
    gap: 0.75rem;
}

/* Table */
.table-container {
    overflow-x: auto;
    margin: 0 -1.5rem;
    padding: 0 1.5rem;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table th {
    background-color: var(--gray-50);
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--gray-700);
    border-bottom: 2px solid var(--gray-200);
    white-space: nowrap;
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
    vertical-align: middle;
}

.product-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.product-icon {
    font-size: 1.25rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    color: white;
}

.product-icon.wine {
    background-color: #e74c3c;
}

.product-icon.beer {
    background-color: #f1c40f;
}

.product-detail {
    font-size: 0.875rem;
    color: var(--gray-600);
    display: block;
}

.stock-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
}

.stock-badge.high {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.stock-badge.low {
    background-color: #ffebee;
    color: #c62828;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
}

.status-badge.active {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.status-badge.warning {
    background-color: #fff3e0;
    color: #ef6c00;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background-color: var(--gray-100);
    color: var(--gray-800);
}

/* Table Footer */
.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    margin-top: 1rem;
}

.table-info {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.pagination {
    display: flex;
    gap: 0.25rem;
}

.pagination-btn {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-300);
    background-color: white;
    color: var(--gray-700);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    background-color: var(--gray-100);
    border-color: var(--gray-400);
}

.pagination-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

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

.pagination-ellipsis {
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
    color: var(--gray-600);
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background-color: var(--gray-100);
    border-color: var(--gray-400);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 100;
}

.modal-content {
    background-color: white;
    margin: 2rem auto;
    padding: 2rem;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 800px;
    position: relative;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-800);
}

.close-btn {
    background: none;
    border: none;
    color: var(--gray-500);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.close-btn:hover {
    background-color: var(--gray-100);
    color: var(--gray-800);
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

.form-input {
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem
}


/*Alert*/
.alert {
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
    font-size: 14px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert {
    padding: 15px;
    margin: 20px;
    border-radius: 4px;
}

.alert-sucesso {
    background-color: #dff0d8;
    border-color: #d6e9c6;
    color: #3c763d;
}

.alert-erro {
    background-color: #f2dede;
    border-color: #ebccd1;
    color: #a94442;
}

#abatimentoLink {
    display: block;
    margin-top: 5px;
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
}

#abatimentoLink:hover {
    text-decoration: underline;
}

/* Estilos para o Modal de Fechar Mesa */
.table-info-section,
.items-section,
.payment-section {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    background: #f9f9f9;
}

.items-list {
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.payment-options {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-payment {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    background: #f0f0f0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-payment.active {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.payment-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-abater {
    padding: 8px 15px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-abater:hover {
    background: var(--primary-hover);
}

h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.toggle-value {
    cursor: pointer;
    margin-left: 10px;
    color: #666;
    font-size: 0.9em;
}

.hidden-value {
    filter: blur(5px);
    user-select: none;
}

/* Responsividade */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        left: -100%;
    }

    .main-content.expanded {
        margin-left: 0;
    }

    .grid-container {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-group {
        flex-direction: column;
    }

    .modal-content {
        margin: 1rem;
        padding: 1.5rem;
        width: calc(100% - 2rem);
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .card-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .card-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .table-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .pagination {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .nav-bar {
        /* Não usar shorthand 'padding' aqui — sobrescreveria o padding-top com safe-area */
        padding-left: 1rem;
        padding-right: 1rem;
        padding-bottom: 0.875rem;
        padding-top: max(1rem, calc(env(safe-area-inset-top, 0px) + 0.5rem));
    }

    .nav-bar h1 {
        font-size: 1.25rem;
    }

    .btn-primary,
    .btn-secondary {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .table td,
    .table th {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }

    .product-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .action-buttons {
        flex-direction: column;
    }
}

/* Utilitários */
.text-2xl {
    font-size: 1.5rem;
}

.font-bold {
    font-weight: 700;
}

/* --- New UI Enhancements (Toasts, Modals, Back Button) --- */

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 250px;
    padding: 15px 20px;
    border-radius: 8px;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    color: #1f2937;
    animation: slideInRight 0.3s ease-out;
    border-left: 5px solid #ccc;
}

.toast.toast-success {
    border-left-color: #27ae60;
}

.toast.toast-error {
    border-left-color: #e74c3c;
}

.toast.toast-warning {
    border-left-color: #f1c40f;
}

.toast.toast-info {
    border-left-color: #3498db;
}

.toast i {
    font-size: 1.2rem;
}

.toast.toast-success i {
    color: #27ae60;
}

.toast.toast-error i {
    color: #e74c3c;
}

.toast.hide {
    animation: slideOutRight 0.5s ease-in forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(120%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

/* Back Button */
.nav-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-back {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-back:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(-3px);
}

/* Global Loader */
.global-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    display: none;
    /* Controlled by JS */
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Modal Enhancements */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9000;
    backdrop-filter: blur(3px);
}

.modal-card {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.modal-header {
    padding: 1.25rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 1.5rem;
    color: #4b5563;
}

.modal-footer {
    padding: 1rem 1.25rem;
    background: #f9fafb;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}


@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Search Controls (for pages like cadastrar/mesas) */
.page-controls {
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.search-input {
    width: 100%;
    padding: 10px 10px 10px 35px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.search-input:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
    outline: none;
}

/* Subscription Tracker - Premium Design */
.subscription-tracker {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 1rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    margin-right: 0.5rem;
}

.subscription-tracker:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: #4CAF50;
}

.tracker-icon {
    width: 32px;
    height: 32px;
    background: #4CAF50;
    color: white;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.tracker-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.tracker-label {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #166534;
    letter-spacing: 0.025em;
}

.tracker-value {
    font-size: 0.95rem;
    font-weight: 900;
    color: #064e3b;
}

/* Warning State (10 days or less) */
.subscription-tracker.warning {
    background: #fffbeb;
    border-color: #fde68a;
}

.subscription-tracker.warning .tracker-icon {
    background: #d97706;
}

.subscription-tracker.warning .tracker-label {
    color: #92400e;
}

.subscription-tracker.warning .tracker-value {
    color: #78350f;
}

/* Critical State (5 days or less) */
.subscription-tracker.critical {
    background: #fef2f2;
    border-color: #fecaca;
    animation: tracker-pulse 2s infinite;
}

.subscription-tracker.critical .tracker-icon {
    background: #dc2626;
}

.subscription-tracker.critical .tracker-label {
    color: #991b1b;
}

.subscription-tracker.critical .tracker-value {
    color: #7f1d1d;
}

.tracker-action {
    margin-left: 0.5rem;
    padding-left: 0.75rem;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
}

.btn-renew {
    font-size: 0.7rem;
    font-weight: 900;
    background: #1e293b;
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.subscription-tracker:hover .btn-renew {
    background: #4CAF50;
}

@keyframes tracker-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

@media (max-width: 768px) {

    .tracker-info,
    .tracker-action {
        display: none;
    }

    .subscription-tracker {
        padding: 0.4rem;
        margin-right: 0.25rem;
    }
}

/* ================================================
   AUDIT LOGS - PREMIUM
   ================================================ */

.audit-page-wrapper {
    padding: 1.5rem;
    max-width: 1600px;
    margin: 0 auto;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.audit-hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 2rem;
    padding: 3rem;
    color: white;
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.audit-hero::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.audit-hero h1 {
    font-size: 2.5rem;
    font-weight: 900;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.audit-hero p {
    font-size: 1.1rem;
    color: #94a3b8;
    max-width: 600px;
    margin: 0;
}

.audit-hero-actions {
    position: absolute;
    top: 3rem;
    right: 3rem;
    display: flex;
    gap: 1rem;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card-lux {
    background: white;
    padding: 2rem;
    border-radius: 1.5rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: transform 0.3s;
}

.stat-card-lux:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-info .label {
    font-size: 0.875rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-info .value {
    font-size: 1.75rem;
    font-weight: 900;
    color: #1e293b;
}

.filter-panel-lux {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    border: 1px solid #e2e8f0;
    margin-bottom: 2.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.input-group-lux label {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    color: #475569;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.input-lux {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 2px solid #f1f5f9;
    border-radius: 1rem;
    font-weight: 600;
    color: #1e293b;
    transition: all 0.2s;
    background: #f8fafc;
}

.input-lux:focus {
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    outline: none;
}

.table-container-lux {
    background: white;
    border-radius: 1.5rem;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
}

.table-lux {
    width: 100%;
    border-collapse: collapse;
}

.table-lux th {
    background: #f8fafc;
    padding: 1.25rem 1.5rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 800;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #f1f5f9;
}

.table-lux td {
    padding: 1.25rem 1.5rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.95rem;
    color: #334155;
}

.table-lux tr:hover {
    background: #f1f5f9;
}

.badge-lux {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 0.8rem;
}

.time-lux {
    font-weight: 700;
    color: #1e293b;
}

.date-lux {
    font-size: 0.8rem;
    color: #64748b;
    display: block;
}

.btn-view-log {
    width: 38px;
    height: 38px;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background: white;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-view-log:hover {
    background: #1e293b;
    color: white;
    border-color: #1e293b;
    transform: rotate(15deg);
}

.pagination-lux {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 2.5rem;
}

.page-link-lux {
    min-width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: white;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
}

.page-link-lux:hover,
.page-link-lux.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.modal-lux {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-lux.active {
    display: flex;
}

.modal-content-lux {
    background: white;
    border-radius: 2rem;
    padding: 0;
    overflow: hidden;
    border: none;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 700px;
}

.modal-header-lux {
    background: #f8fafc;
    padding: 2rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body-lux {
    padding: 2rem;
}

.json-canvas {
    background: #0f172a;
    color: #38bdf8;
    padding: 1.5rem;
    border-radius: 1rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    white-space: pre-wrap;
    line-height: 1.6;
    border: 1px solid #1e293b;
}

/* ================================================
   PEDIDO ESPETINHO - PREMIUM
   ================================================ */

.espetinho-hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 2rem;
    padding: 3rem 2rem;
    margin-bottom: 2.5rem;
    color: white;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 2rem;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.2);
}

.espetinho-hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: url('https://images.unsplash.com/photo-1544025162-d76694265947?ixlib=rb-4.0.3&auto=format&fit=crop&w=1469&q=80') center/cover;
    opacity: 0.15;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    flex: 1;
}

.hero-content h2 {
    font-size: 2.25rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.hero-content p {
    color: #94a3b8;
    font-size: 1.1rem;
    max-width: 500px;
}

.order-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
    align-items: start;
}

.products-section {
    background: white;
    border-radius: 2rem;
    padding: 2rem;
    border: 1px solid #e2e8f0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.espetinho-grid-lux {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
}

.espetinho-card-lux {
    background: #f8fafc;
    border: 2px solid #f1f5f9;
    border-radius: 1.5rem;
    padding: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
}

.espetinho-card-lux:hover {
    border-color: var(--primary-color);
    background: white;
    transform: translateY(-5px);
    box-shadow: 0 15px 30px -10px rgba(76, 175, 80, 0.15);
}

.espetinho-card-lux.selected {
    border-color: var(--primary-color);
    background: #f0fdf4;
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.1);
}

.card-lux-icon {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--primary-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.espetinho-card-lux.selected .card-lux-icon {
    background: var(--primary-color);
    color: white;
}

.card-lux-info h4 {
    font-size: 1rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.card-lux-price {
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--primary-color);
}

.qty-controls-lux {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px dashed #cbd5e1;
}

.selected .qty-controls-lux {
    display: flex;
}

.btn-qty-lux {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: white;
    color: #1e293b;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.btn-qty-lux:hover {
    background: var(--primary-color);
    color: white;
}

.qty-display-lux {
    font-weight: 800;
    color: #1e293b;
    min-width: 20px;
    text-align: center;
}

.toppings-lux {
    display: none;
    margin-top: 0.5rem;
    flex-direction: column;
    gap: 0.5rem;
}

.selected .toppings-lux {
    display: flex;
}

.topping-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    padding: 0.4rem 0.75rem;
    background: white;
    border-radius: 2rem;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.topping-item.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.order-sidebar {
    position: sticky;
    top: 100px;
    background: white;
    border-radius: 2rem;
    padding: 2rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.summary-title {
    font-size: 1.25rem;
    font-weight: 900;
    color: #1e293b;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.customer-input-box {
    margin-bottom: 1.5rem;
}

.customer-input-box label {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

.customer-field {
    width: 100%;
    height: 56px;
    padding: 0 1.25rem;
    background: #f8fafc;
    border: 2px solid #f1f5f9;
    border-radius: 1rem;
    font-weight: 700;
    color: #1e293b;
    transition: all 0.2s;
}

.customer-field:focus {
    border-color: var(--primary-color);
    background: white;
    outline: none;
}

.order-items-scroll {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1.5rem;
    padding-right: 0.5rem;
}

.summary-item-row {
    display: flex;
    justify-content: space-between;
    padding: 0.85rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.summary-item-row:last-child {
    border-bottom: none;
}

.summary-item-info {
    display: flex;
    flex-direction: column;
}

.summary-item-name {
    font-weight: 700;
    color: #1e293b;
    font-size: 0.95rem;
}

.summary-item-subs {
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 600;
}

.summary-item-price {
    font-weight: 800;
    color: #1e293b;
}

.total-box-lux {
    background: #1e293b;
    padding: 1.5rem;
    border-radius: 1.25rem;
    color: white;
    margin-bottom: 1.5rem;
}

.total-label-lux {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    opacity: 0.6;
}

.total-value-lux {
    font-size: 1.75rem;
    font-weight: 900;
    display: block;
}

.empty-cart-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #94a3b8;
}

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

    .order-sidebar {
        position: static;
    }
}

@media (max-width: 640px) {
    .espetinho-hero {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1.5rem;
    }

    .hero-content h2 {
        font-size: 1.75rem;
    }
}

/* ================================================
   RECEBER PEDIDO ESPETINHO - PREMIUM
   ================================================ */

.kitchen-status-bar {
    background: white;
    border-radius: 1.5rem;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.kitchen-info h2 {
    font-size: 1.5rem;
    font-weight: 900;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.kitchen-info p {
    margin: 0;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 600;
}

.pulse-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #f0fdf4;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    border: 1px solid #bbf7d0;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background: #22c55e;
    border-radius: 50%;
    position: relative;
}

.pulse-dot::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: inherit;
    animation: pulse-ring 1.5s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.5);
        opacity: 0.8;
    }

    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

.pulse-text {
    font-size: 0.75rem;
    font-weight: 800;
    color: #166534;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.kitchen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 1.5rem;
}

.order-ticket {
    background: white;
    border-radius: 2rem;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: ticketPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes ticketPop {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.order-ticket.new-alert {
    border-color: #fbbf24;
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.1), 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.ticket-header {
    background: #f8fafc;
    padding: 1.5rem;
    border-bottom: 1px dashed #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.ticket-number {
    font-size: 1.25rem;
    font-weight: 900;
    color: #1e293b;
}

.ticket-time {
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
}

.ticket-status-badge {
    background: #1e293b;
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 0.75rem;
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
}

.new-alert .ticket-status-badge {
    background: #fbbf24;
    color: #78350f;
}

.ticket-body {
    padding: 1.5rem;
    flex: 1;
}

.ticket-customer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #f1f5f9;
    padding: 1rem;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
}

.customer-avatar {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.customer-name {
    font-weight: 800;
    color: #334155;
    font-size: 1.1rem;
}

.ticket-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ticket-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #fdfdfd;
    border: 1px solid #f1f5f9;
    border-radius: 1rem;
}

.item-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.item-qty-circle {
    width: 28px;
    height: 28px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 900;
}

.pill-farofa {
    background: #fee2e2;
    color: #991b1b;
}

.pill-vinagrete {
    background: #e0f2fe;
    color: #075985;
}

.item-info-text {
    display: flex;
    flex-direction: column;
}

.item-name-ticket {
    font-weight: 800;
    color: #1e293b;
    font-size: 0.95rem;
}

.item-addons {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.25rem;
}

.addon-pill {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    border-radius: 2rem;
}

/* ================================================
   DASHBOARD - PREMIUM
   ================================================ */

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    gap: 2rem;
}

.welcome-text h1 {
    font-size: 1.8rem;
    color: #111827;
    margin-bottom: 0.5rem;
}

.welcome-text p {
    color: #6b7280;
    font-size: 1rem;
}

.system-feed {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 450px;
    width: 100%;
}

.feed-item {
    background: #fff;
    padding: 1rem;
    border-radius: 12px;
    display: flex;
    gap: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    border: 1px solid #f3f4f6;
    align-items: center;
}

.feed-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feed-icon.info {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.feed-icon.warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.feed-content strong {
    display: block;
    font-size: 0.85rem;
    color: #111827;
}

.feed-content p {
    font-size: 0.8rem;
    color: #6b7280;
    margin: 0;
}

.stat-card-premium {
    background: #fff;
    padding: 1.5rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
    transition: transform 0.2s;
}

.stat-card-premium:hover {
    transform: translateY(-3px);
}

.icon-box {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #fff;
}

.icon-box.bg-blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.icon-box.bg-red {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.icon-box.bg-green {
    background: linear-gradient(135deg, #10b981, #059669);
}

.stat-data .label {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 500;
}

.stat-data .value {
    font-size: 1.4rem;
    color: #111827;
    margin: 0;
    font-weight: 800;
}

.stat-data .value small {
    font-size: 0.85rem;
    color: #9ca3af;
    font-weight: 400;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 1.5rem;
}

.card-premium {
    border-radius: 16px;
    border: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    background: #fff;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.card-header-modern {
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f3f4f6;
}

.title-with-icon {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.title-with-icon i {
    font-size: 1.1rem;
}

.title-with-icon h2 {
    font-size: 1.1rem;
    margin: 0;
    font-weight: 700;
    color: #111827;
}

.btn-minimal {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-minimal:hover {
    background: var(--primary-color);
    color: #fff;
}

.table-modern {
    width: 100%;
    border-collapse: collapse;
}

.table-modern th {
    text-align: left;
    padding: 1rem 1.5rem;
    font-size: 0.75rem;
    color: #9ca3af;
    text-transform: uppercase;
    font-weight: 600;
}

.table-modern td {
    padding: 1rem 1.5rem;
    border-top: 1px solid #f9fafb;
    font-size: 0.9rem;
    color: #374151;
}

.prod-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.prod-icon {
    width: 32px;
    height: 32px;
    background: #f9fafb;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 0.8rem;
}

.mini-list {
    padding: 1rem 1.5rem;
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f9fafb;
}

.list-item:last-child {
    border-bottom: none;
}

.item-info strong {
    display: block;
    font-size: 0.9rem;
    color: #111827;
}

.item-info span {
    font-size: 0.75rem;
    color: #ef4444;
}

.top-items-list {
    padding: 0.5rem 1.5rem 1.5rem;
}

.top-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f9fafb;
}

.top-item:last-child {
    border-bottom: none;
}

.rank {
    width: 28px;
    height: 28px;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #6b7280;
}

.item-details {
    flex: 1;
}

.item-details strong {
    display: block;
    font-size: 0.9rem;
    color: #111827;
}

.item-details span {
    font-size: 0.75rem;
    color: #9ca3af;
}

.item-revenue {
    font-weight: 700;
    color: #111827;
    font-size: 0.9rem;
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: #9ca3af;
    font-size: 0.9rem;
}

@media (max-width: 1024px) {
    .dashboard-header {
        flex-direction: column;
    }

    .system-feed {
        max-width: 100%;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .welcome-text h1 {
        font-size: 1.5rem;
    }

    .stat-card-premium {
        padding: 1rem;
        gap: 0.75rem;
    }

    .icon-box {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }

    .stat-data .value {
        font-size: 1.2rem;
    }
}

/* ================================================
   CAIXA - PREMIUM
   ================================================ */

.caixa-header {
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.caixa-title h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.caixa-title p {
    color: #64748b;
    margin: 0.25rem 0 0;
    font-size: 0.95rem;
}

.premium-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card-lux {
    background: white;
    padding: 1.5rem;
    border-radius: 1.5rem;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: all 0.3s ease;
}

.stat-card-lux:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.05);
}

.stat-lux-icon {
    width: 56px;
    height: 56px;
    border-radius: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-lux-info .label {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.stat-lux-info .value {
    display: block;
    font-size: 1.4rem;
    font-weight: 900;
    color: #1e293b;
}

.mesas-premium-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.mesa-lux-card {
    background: white;
    border-radius: 1.5rem;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-left: 6px solid var(--primary-color);
}

.mesa-lux-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.08);
}

.mesa-lux-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mesa-lux-number {
    font-size: 1.25rem;
    font-weight: 900;
    color: #1e293b;
}

.mesa-lux-status {
    font-size: 0.65rem;
    font-weight: 900;
    background: #f0fdf4;
    color: #16a34a;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    text-transform: uppercase;
}

.mesa-lux-details {
    display: flex;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px dashed #e2e8f0;
}

.history-card-premium {
    background: white;
    border-radius: 1.75rem;
    border: 1px solid #e2e8f0;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.history-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.history-table-header h2 {
    font-size: 1.2rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.premium-action-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-action-lux {
    height: 48px;
    padding: 0 1.25rem;
    border-radius: 1rem;
    border: none;
    font-weight: 800;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    transition: all 0.2s;
}

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 2rem 1rem;
}

.modal-content {
    background: white;
    border-radius: 2rem;
    padding: 0;
    width: 100%;
    max-width: 600px;
    border: none;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.trans-item-premium {
    padding: 1.25rem;
    border-radius: 1.25rem;
    border: 1px solid #f1f5f9;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: all 0.2s;
}

.trans-item-premium:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.trans-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.trans-details {
    flex: 1;
}

.trans-date {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 700;
    display: block;
    margin-bottom: 2px;
}

.trans-desc {
    font-size: 0.95rem;
    font-weight: 800;
    color: #334155;
}

.trans-amount {
    font-size: 1.1rem;
    font-weight: 900;
}

.payment-methods {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.payment-method-btn {
    height: 80px;
    border-radius: 1.25rem;
    border: 2px solid #f1f5f9;
    background: white;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.payment-method-btn.selected {
    border-color: var(--primary-color);
    background: #f0fdf4;
}

.payment-method-btn i {
    font-size: 1.5rem;
}

.payment-method-btn span {
    font-weight: 800;
    font-size: 0.75rem;
    color: #64748b;
}

@media (max-width: 768px) {
    .caixa-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .history-table-header {
        flex-direction: column;
        gap: 1.25rem;
        align-items: flex-start;
    }

    .premium-action-group {
        width: 100%;
    }

    .premium-action-group button {
        flex: 1;
    }

    .payment-methods {
        grid-template-columns: repeat(2, 1fr);
    }
}

.ticket-footer {
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    background: #f8fafc;
}

.btn-ticket {
    flex: 1;
    height: 48px;
    border-radius: 1rem;
    border: none;
    font-weight: 900;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
    text-transform: uppercase;
}

.btn-ticket-ready {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

.btn-ticket-ready:hover {
    background: #16a34a;
    transform: translateY(-2px);
}

.btn-ticket-cancel {
    background: white;
    color: #ef4444;
    border: 1px solid #fee2e2;
}

.btn-ticket-cancel:hover {
    background: #fef2f2;
}

.empty-kitchen {
    grid-column: 1 / -1;
    text-align: center;
    padding: 8rem 2rem;
    background: white;
    border-radius: 3rem;
    border: 2px dashed #e2e8f0;
}

.empty-kitchen i {
    font-size: 5rem;
    color: #e2e8f0;
    margin-bottom: 2rem;
    display: block;
}

.empty-kitchen h3 {
    font-size: 1.5rem;
    font-weight: 900;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.empty-kitchen p {
    color: #94a3b8;
    font-weight: 600;
}

.new-order-pulse {
    animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
    0% {
        border-color: #fbbf24;
        box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.4);
    }

    70% {
        border-color: #fbbf24;
        box-shadow: 0 0 0 15px rgba(251, 191, 36, 0);
    }

    100% {
        border-color: #fbbf24;
        box-shadow: 0 0 0 0 rgba(251, 191, 36, 0);
    }
}

/* ================================================
   VENDER.PHP - STYLES
   ================================================ */

.pos-layout {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 1.25rem;
    align-items: start;
    padding-bottom: 2rem;
}

.status-bar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    padding: 0.5rem 1.125rem;
    border-radius: 99px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35);
    letter-spacing: 0.01em;
}

.quantity-control {
    display: flex;
    align-items: stretch;
    gap: 0;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    height: 56px;
}

.quantity-btn {
    background: #f9fafb;
    border: none;
    color: #4CAF50;
    cursor: pointer;
    width: 60px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: bold;
    transition: background 0.15s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.quantity-btn:active {
    background: #e5e7eb;
}

.quantity-display {
    flex: 1;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    border: none;
    border-left: 2px solid #e5e7eb;
    border-right: 2px solid #e5e7eb;
    background: white;
    outline: none;
    -moz-appearance: textfield;
    -webkit-appearance: none;
    appearance: textfield;
    width: 100%;
    min-width: 0;
}

.receipt-footer {
    padding-top: 1rem;
}

.subtotal-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f0fdf4;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    font-size: 1.35rem;
    font-weight: 800;
    color: #166534;
    border: 1px solid #bbf7d0;
    margin-bottom: 1.25rem;
}

.payment-buttons-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.payment-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 8px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.88rem;
    font-weight: 600;
    color: #374151;
    touch-action: manipulation;
}

.payment-btn i {
    font-size: 1.5rem;
    color: #6b7280;
    transition: color 0.2s;
}

.payment-btn.selected {
    border-color: #4CAF50;
    background: #f0fdf4;
    color: #166534;
}

.payment-btn.selected i {
    color: #16a34a;
}

.payment-method-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.85rem;
}

.payment-value-input {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    width: 100%;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    background: white;
    outline: none;
    transition: border-color 0.2s;
}

.troco-info {
    font-weight: 700;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-top: 0.75rem;
    font-size: 0.95rem;
}

.btn-finalizar {
    width: 100%;
    padding: 1.1rem;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    font-size: 1.2rem;
    font-weight: 800;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    margin-top: 1.25rem;
    box-shadow: 0 6px 18px rgba(34, 197, 94, 0.45);
    transition: all 0.2s;
}

.btn-adicionar {
    width: 100%;
    padding: 0.95rem;
    background: var(--primary-color);
    color: white;
    font-size: 1.05rem;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
}

.btn-add-payment {
    width: 100%;
    padding: 0.875rem;
    background: #f3f4f6;
    color: #374151;
    font-size: 0.95rem;
    font-weight: 600;
    border: 1.5px dashed #d1d5db;
    border-radius: 12px;
    cursor: pointer;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

@media (max-width: 768px) {
    .pos-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding-bottom: 1rem;
    }

    .subtotal-box {
        font-size: 1.15rem;
    }

    .payment-buttons-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .table-mobile-cards thead {
        display: none;
    }

    .table-mobile-cards tr {
        display: block;
        margin-bottom: 0.75rem;
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 10px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
        overflow: hidden;
    }

    .table-mobile-cards td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.7rem 0.85rem;
        border-bottom: 1px solid #f3f4f6;
        font-size: 0.9rem;
    }

    .table-mobile-cards td:last-child {
        border-bottom: none;
    }

    .table-mobile-cards td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #6b7280;
        text-transform: uppercase;
        font-size: 0.72rem;
        letter-spacing: 0.04em;
        flex-shrink: 0;
        margin-right: 0.75rem;
    }

    .table-mobile-cards td.action-cell {
        justify-content: flex-end;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .table-mobile-cards td.action-cell::before {
        display: none;
    }
}

@media (max-width: 375px) {
    .payment-buttons-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .payment-btn {
        padding: 10px 6px;
        font-size: 0.82rem;
    }

    .payment-btn i {
        font-size: 1.2rem;
    }

    .btn-finalizar {
        font-size: 1.1rem;
    }
}

/* ================================================
   MESAS.PHP - STYLES
   ================================================ */

.componentes {
    margin-top: 5px;
    padding-left: 15px;
    border-left: 2px solid #ddd;
}

.componente-item {
    font-size: 0.8em;
    color: #666;
    margin-top: 3px;
}

.order-item {
    position: relative;
}

.modal-grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.modal-section {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    height: 100%;
}

.scrollable {
    max-height: 300px;
    overflow-y: auto;
    margin: 10px 0;
}

.payment-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 15px;
}

.tab-btn {
    padding: 8px 15px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 3px solid transparent;
}

.tab-btn.active {
    border-bottom: 3px solid #4CAF50;
    font-weight: bold;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.search-box {
    position: relative;
    margin-bottom: 10px;
}

.search-box input {
    padding-left: 30px;
    width: 100%;
}

.search-box i {
    position: absolute;
    left: 10px;
    top: 10px;
    color: #999;
}

.item-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.item-row:last-child {
    border-bottom: none;
}

.item-name {
    flex: 1;
}

.item-price {
    font-weight: bold;
    min-width: 80px;
    text-align: right;
}

.total-display,
.remaining-amount,
.split-amount-display {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 16px;
}

#addTableModal .modal-content {
    max-width: 450px;
    padding: 0;
    overflow: hidden;
}

.add-mesa-body {
    padding: 2rem;
    background: white;
}

.mesa-icon-preview {
    width: 70px;
    height: 70px;
    background: #f0fdf4;
    color: var(--primary-color);
    border-radius: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(76, 175, 80, 0.1);
}

.form-group-premium {
    margin-bottom: 1.5rem;
}

.form-group-premium label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.status-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.status-option-card {
    border: 1.5px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
}

.status-option-card:hover {
    border-color: var(--primary-color);
    background: #f0fdf4;
}

.status-option-card.active {
    border-color: var(--primary-color);
    background: #f0fdf4;
    color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

#closeTableModal .modal-content {
    max-width: 900px;
    padding: 0;
    border-radius: 1.5rem;
}

.checkout-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    min-height: 550px;
}

.checkout-items-panel {
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.checkout-panel-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.checkout-items-list {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 1.5rem;
    padding-right: 0.5rem;
}

.checkout-item-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s;
    cursor: pointer;
}

.checkout-item-checkbox {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 0.35rem;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkout-item-info {
    flex: 1;
}

.checkout-item-name {
    font-weight: 700;
    color: #334155;
    font-size: 0.95rem;
    display: block;
}

.checkout-item-price {
    font-weight: 800;
    color: var(--primary-color);
    font-size: 1rem;
}

.checkout-payment-panel {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    background: white;
}

.payment-tabs-premium {
    display: flex;
    background: #f1f5f9;
    padding: 0.35rem;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    gap: 0.25rem;
}

.tab-btn-premium {
    flex: 1;
    padding: 0.75rem 0.5rem;
    border-radius: 0.75rem;
    font-size: 0.85rem;
    font-weight: 800;
    color: #64748b;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.tab-btn-premium.active {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.payment-summary-card {
    background: #1e293b;
    padding: 1.5rem;
    border-radius: 1.25rem;
    color: white;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.summary-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.7;
}

.summary-value {
    font-size: 2.25rem;
    font-weight: 800;
    display: block;
}

.summary-sub-row {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-sub-item {
    display: flex;
    flex-direction: column;
}

.summary-sub-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    opacity: 0.6;
}

.summary-sub-value {
    font-size: 1.1rem;
    font-weight: 700;
}

.split-config-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
}

.history-item-premium {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
}

#addProductModal .modal-content {
    max-width: 600px;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: calc(100dvh - 2rem);
}

.product-search-container {
    padding: 1.5rem;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.product-selection-grid {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.product-item-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: white;
    border: 1.5px solid #e5e7eb;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.product-item-icon {
    width: 40px;
    height: 40px;
    background: #f3f4f6;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
}

.product-item-details {
    display: flex;
    flex-direction: column;
}

.product-item-name {
    font-weight: 700;
    color: #111827;
    font-size: 1rem;
}

.product-item-price {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.product-footer-actions {
    padding: 1.5rem;
    background: white;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.quantity-selector-premium {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.btn-qty {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid #d1d5db;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
    color: #374151;
    transition: all 0.2s;
}

.qty-display {
    font-size: 1.75rem;
    font-weight: 800;
    color: #111827;
    min-width: 50px;
    text-align: center;
}

.add-confirm-row {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.total-preview {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.total-preview-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.total-preview-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #111827;
}

.empty-search-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #9ca3af;
}

.modal-submit-btn {
    flex: 1.5;
    height: 54px;
    border-radius: 1rem;
    font-size: 1.05rem;
    font-weight: 800;
    box-shadow: 0 10px 15px -3px rgba(76, 175, 80, 0.3);
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.card-mesa {
    background: white;
    border-radius: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

.card-mesa:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.card-mesa-header {
    padding: 1.25rem;
    background: #fdfdfd;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-mesa-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: #111827;
}

.orders-scrollable {
    padding: 1rem 1.25rem;
    flex-grow: 1;
    min-height: 120px;
    max-height: 250px;
    overflow-y: auto;
    background: #fff;
}

.order-item-compact {
    display: flex;
    padding: 0.625rem 0;
    border-bottom: 1px dashed #e5e7eb;
    position: relative;
    font-size: 0.9rem;
    gap: 0.5rem;
}

.order-item-info {
    flex: 1;
    min-width: 0;
}

.order-item-name {
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.order-item-price {
    font-weight: 700;
    color: var(--primary-color);
    white-space: nowrap;
}

.delete-item-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ef4444;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
}

.sub-items-list {
    margin-top: 0.25rem;
    padding-left: 0.75rem;
    border-left: 2px solid #e5e7eb;
}

.sub-item-text {
    font-size: 0.75rem;
    color: #6b7280;
    display: block;
}

.card-mesa-footer {
    padding: 1.15rem;
    background: #f9fafb;
    border-top: 1px solid #f3f4f6;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding: 0 0.25rem;
}

.total-label {
    color: #6b7280;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.total-value {
    color: #111827;
    font-weight: 800;
    font-size: 1.2rem;
}

.button-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.btn-mesa {
    height: 44px;
    padding: 0 0.75rem;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-mesa-danger-small {
    grid-column: span 2;
    background: transparent;
    color: #9ca3af;
    border: 1px dashed #d1d5db;
    font-size: 0.75rem;
    min-height: 38px;
    opacity: 0.7;
    transition: all 0.2s;
}

.status-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ================================================
   CADASTRAR.PHP - STYLES
   ================================================ */

.inventory-header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.inventory-title h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.inventory-title p {
    color: #64748b;
    margin: 0.25rem 0 0;
    font-size: 0.95rem;
}

.search-filter-premium {
    background: white;
    padding: 1.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.premium-search-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-inner-group {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.search-inner-group i {
    position: absolute;
    left: 1.25rem;
    top: 1.1rem;
    color: #94a3b8;
}

.premium-search-input {
    width: 100%;
    height: 52px;
    padding-left: 3rem;
    padding-right: 1.5rem;
    border-radius: 1rem;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    font-weight: 600;
    transition: all 0.2s;
}

.premium-search-input:focus {
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.1);
    outline: none;
}

.premium-filter-select {
    height: 52px;
    padding: 0 1.5rem;
    border-radius: 1rem;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    font-weight: 700;
    color: #475569;
    min-width: 180px;
}

.products-grid-premium {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.product-card-premium {
    background: white;
    border-radius: 1.5rem;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.product-card-premium:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--primary-color-light);
}

.prod-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.prod-icon-wrapper {
    width: 54px;
    height: 54px;
    border-radius: 1.25rem;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #64748b;
}

.prod-status-tag {
    padding: 0.4rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tag-high {
    background: #f0fdf4;
    color: #16a34a;
}

.tag-medium {
    background: #fffbeb;
    color: #d97706;
}

.tag-low {
    background: #fef2f2;
    color: #dc2626;
}

.prod-card-info h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.3;
}

.prod-card-sub {
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.prod-price-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-top: 1rem;
    border-top: 1px dashed #e2e8f0;
}

.price-label {
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 700;
    text-transform: uppercase;
    display: block;
}

.price-value {
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--primary-color);
}

.prod-card-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-action-small {
    width: 40px;
    height: 40px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    color: #64748b;
    border: 1.5px solid #e2e8f0;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-action-small:hover {
    background: white;
    color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.btn-delete-small:hover {
    color: #ef4444;
    border-color: #ef4444;
}

@media (max-width: 640px) {
    .btn-new-product {
        position: fixed;
        bottom: 2rem;
        right: 1.5rem;
        z-index: 99;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 10px 15px -3px rgba(76, 175, 80, 0.4);
    }

    .btn-new-product span {
        display: none;
    }

    .btn-new-product i {
        margin: 0;
        font-size: 1.5rem;
    }

    .products-grid-premium {
        grid-template-columns: 1fr;
    }
}

/* ================================================
   LOGIN.PHP - STYLES
   ================================================ */

.login-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 50%, #a7f3d0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
}

.background-pattern {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2310b981' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: 1;
}

.login-wrapper {
    width: 100%;
    max-width: 28rem;
    position: relative;
    z-index: 10;
}

.brand-section {
    text-align: center;
    margin-bottom: 2rem;
    animation: fadeIn 0.6s ease-out 0.2s both;
}

.logo-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 5rem;
    height: 5rem;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    margin-bottom: 1rem;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

.logo-circle i {
    font-size: 2.5rem;
    color: white;
}

.brand-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.brand-subtitle {
    color: #6b7280;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 0.75rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    animation: slideUp 0.5s ease-out;
}

.card-header {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.card-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
}

.card-content {
    padding: 1.5rem;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-alert {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.error-alert i {
    font-size: 1rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #10b981;
    font-size: 1rem;
    z-index: 2;
}

.form-input {
    width: 100%;
    height: 3rem;
    padding: 0 1rem 0 2.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s ease;
    z-index: 2;
}

.password-toggle:hover {
    color: #10b981;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.remember-me input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: #10b981;
}

.forgot-password {
    color: #10b981;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-password:hover {
    color: #059669;
}

.login-button {
    width: 100%;
    height: 3rem;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.login-button:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.login-button:active {
    transform: translateY(0);
}

.signup-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
}

.signup-link a {
    color: #10b981;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.signup-link a:hover {
    color: #059669;
}

.divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.divider span {
    padding: 0 1rem;
}

.quick-access {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.quick-button {
    height: 2.5rem;
    background: transparent;
    border: 1px solid #d1fae5;
    color: #10b981;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.quick-button:hover {
    background: #ecfdf5;
    border-color: #a7f3d0;
    text-decoration: none;
}

.footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.footer .address {
    color: #9ca3af;
    margin-top: 0.25rem;
}

@media (max-width: 640px) {
    .login-container {
        padding: 0.5rem;
    }

    .brand-title {
        font-size: 1.5rem;
    }

    .logo-circle {
        width: 4rem;
        height: 4rem;
    }

    .logo-circle i {
        font-size: 2rem;
    }

    .card-content {
        padding: 1rem;
    }

    .form-options {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }

    .quick-access {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .login-wrapper {
        max-width: 100%;
    }

    .card-header {
        padding: 1rem;
    }

    .card-title {
        font-size: 1.25rem;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-form.loading .login-button {
    opacity: 0.7;
    cursor: not-allowed;
}

.login-form.loading .form-input {
    pointer-events: none;
}

/* ================================================
   MENU.PHP - STYLES
   ================================================ */

.nav-section-title {
    padding: 20px 25px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #9ca3af;
    letter-spacing: 0.05em;
}

.nav-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 15px 25px;
}

.logout-link {
    color: #ef4444 !important;
}

.logout-link:hover {
    background: #fef2f2 !important;
}

.logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 6px;
}

.nav-link.active {
    background-color: var(--primary-color) !important;
    color: white !important;
}

.nav-link.active i {
    color: white !important;
}

/* ================================================
   EM-CONSTRUCAO.PHP - STYLES
   ================================================ */

.construction-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 50%, #a7f3d0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
}

.content-wrapper {
    width: 100%;
    max-width: 32rem;
    position: relative;
    z-index: 10;
    text-align: center;
}

.construction-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    padding: 3rem 2rem;
    animation: slideUp 0.6s ease-out;
}

.icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 6rem;
    height: 6rem;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    margin-bottom: 2rem;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
    position: relative;
}

.icon-wrapper i {
    font-size: 2.5rem;
    color: white;
}

.gear-icon {
    position: absolute;
    font-size: 1.25rem !important;
    top: 0;
    right: 0;
    background: #f59e0b;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid rgba(255, 255, 255, 0.85);
    animation: spin 4s linear infinite;
}

.title {
    font-size: 2.25rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

.message {
    font-size: 1.125rem;
    color: #4b5563;
    margin-bottom: 2.5rem;
    max-width: 24rem;
    margin-left: auto;
    margin-right: auto;
}

.progress-container {
    width: 100%;
    background: #e5e7eb;
    border-radius: 9999px;
    height: 0.75rem;
    margin-bottom: 3rem;
    overflow: hidden;
}

.progress-bar {
    width: 75%;
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 9999px;
    position: relative;
    animation: progressAnim 2s ease-in-out;
}

.progress-bar::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shine 1.5s infinite;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 3rem;
}

.social-link {
    color: #6b7280;
    font-size: 1.5rem;
    transition: color 0.2s;
}

.social-link:hover {
    color: #10b981;
}

.blob {
    position: absolute;
    width: 25rem;
    height: 25rem;
    background: rgba(16, 185, 129, 0.1);
    filter: blur(80px);
    border-radius: 50%;
    z-index: 0;
    animation: float 10s infinite alternate;
}

.blob-1 {
    top: -10rem;
    left: -10rem;
}

.blob-2 {
    bottom: -10rem;
    right: -10rem;
    animation-delay: -5s;
}

@keyframes float {
    from {
        transform: translate(0, 0);
    }

    to {
        transform: translate(3rem, 3rem);
    }
}

@keyframes progressAnim {
    from {
        width: 0;
    }

    to {
        width: 75%;
    }
}

@keyframes shine {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(100%);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ================================================
   CONFIGURACOES.PHP - STYLES
   ================================================ */

.config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
}

.settings-card, .users-card {
    display: flex;
    flex-direction: column;
}

@media (max-width: 992px) {
    .config-grid {
        grid-template-columns: 1fr;
    }
}

.card-header-premium {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.header-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.bg-primary-soft {
    background-color: rgba(76, 175, 80, 0.1);
    color: var(--primary-color);
}

.bg-secondary-soft {
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.header-text h2 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main);
}

.header-text p {
    margin: 4px 0 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group-premium {
    margin-bottom: 1.5rem;
}

.input-premium-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-premium-wrapper .input-icon {
    position: absolute;
    left: 1rem;
    color: #9ca3af;
    width: 18px;
    height: 18px;
    pointer-events: none;
    z-index: 1;
}

.input-premium-wrapper input,
.input-premium-wrapper select,
.form-group-premium > input,
.form-group-premium > select {
    width: 100%;
    height: 52px;
    padding: 0.75rem 1rem !important;
    background: var(--card-background);
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.95rem;
    color: var(--text-main);
    transition: all 0.2s ease;
    outline: none;
}

.input-premium-wrapper input,
.input-premium-wrapper select {
    padding-left: 3rem !important;
}

.input-premium-wrapper input:focus,
.input-premium-wrapper select:focus,
.form-group-premium > input:focus,
.form-group-premium > select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.1);
    background: var(--background-color);
}

.input-premium-wrapper select,
.form-group-premium > select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
    padding-right: 3rem !important;
}

.form-group-premium label {
    display: block;
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.logo-interaction {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo-preview-container {
    width: 110px;
    height: 110px;
    background: #f9fafb;
    border-radius: 20px;
    border: 2px dashed #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

#logo-preview {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}

.logo-placeholder {
    font-size: 2.5rem;
    color: #9ca3af;
}

.btn-upload {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: white;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-upload:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(76, 175, 80, 0.05);
}

.upload-hint {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-top: 8px;
}

.hidden-input {
    display: none;
}

.btn-premium {
    height: 48px;
    padding: 0 1.5rem;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.2);
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(76, 175, 80, 0.3);
    background-color: var(--primary-hover);
}

.btn-premium:active {
    transform: translateY(0);
}

.btn-premium.btn-save {
    width: 100%;
    height: 54px;
    font-size: 1.1rem;
    margin-top: 1rem;
}

.btn-premium.btn-cancel {
    background: #fff1f2;
    color: #ef4444;
    box-shadow: none;
    border: 1.5px solid #fecaca;
}

.btn-premium.btn-cancel:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    transform: translateY(-2px);
}

[data-theme="dark"] .btn-premium.btn-cancel {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.2);
}

[data-theme="dark"] .btn-premium.btn-cancel:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* Toggle Switch Premium */
.toggle-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--background-color);
    padding: 1rem 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-top: 0.5rem;
}

.switch-premium {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

.switch-premium input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-premium {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 34px;
}

.slider-premium:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

input:checked + .slider-premium {
    background-color: var(--primary-color);
}

input:checked + .slider-premium:before {
    transform: translateX(24px);
}

[data-theme="dark"] .slider-premium {
    background-color: #334155;
}

.section-title {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.25rem;
}

.add-user-section {
    margin-bottom: 2rem;
    padding: 1.25rem;
    background: var(--background-color);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.btn-toggle-form {
    width: 100%;
    padding: 1rem;
    background: var(--card-background);
    border: 1.5px dashed var(--border-color);
    border-radius: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.2s;
}

.btn-toggle-form:hover {
    background: var(--background-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.collapsible {
    display: none;
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--background-color);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.collapsible.active {
    display: block;
    animation: slideDown 0.3s ease-out;
}

.user-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 600px) {
    .user-form-grid {
        grid-template-columns: 1fr;
    }
}

.form-actions {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end;
}

.form-actions-inline {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.table-responsive-wrapper {
    overflow-x: auto;
    margin: 0 -1rem;
    padding: 0 1rem;
}

.user-info-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar-small {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #4b5563;
    font-size: 0.85rem;
}

.user-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
}

.role-admin {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.role-funcionario {
    background: rgba(107, 114, 128, 0.1);
    color: #4b5563;
}

.action-buttons-group {
    display: flex;
    gap: 0.4rem;
    justify-content: flex-end;
}

.btn-action-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: white;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-action-icon:hover {
    background: #f3f4f6;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-delete-user:hover {
    color: #ef4444;
    border-color: #fca5a5;
    background: #fff1f2;
}

.owner-placeholder {
    color: #d1d5db;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.animate-fadeIn {
    animation: fadeIn 0.5s ease-out forwards;
}

@media (max-width: 600px) {
    .logo-interaction {
        flex-direction: column;
        text-align: center;
    }

    .logo-preview-container {
        margin: 0 auto;
    }

    .form-actions-inline {
        flex-direction: column;
    }

    .btn-premium {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .table-mobile-cards td::before {
        font-weight: 700;
        color: #9ca3af;
        text-transform: uppercase;
        font-size: 0.7rem;
    }
}

/* ================================================
   ENTRADAS-SAIDAS.PHP - STYLES
   ================================================ */

.finance-header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1rem;
}

.finance-title h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
}

.finance-title p {
    color: #64748b;
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
}

.stats-grid-premium {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card-premium {
    background: white;
    padding: 1.5rem;
    border-radius: 1.25rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: transform 0.2s;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-card-premium:hover {
    transform: translateY(-4px);
}

.stat-icon-box {
    width: 56px;
    height: 56px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-info-box {
    display: flex;
    flex-direction: column;
}

.stat-label-text {
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e293b;
}

.stat-card-success .stat-icon-box {
    background: #f0fdf4;
    color: #22c55e;
}

.stat-card-success {
    border-bottom: 4px solid #22c55e;
}

.stat-card-danger .stat-icon-box {
    background: #fef2f2;
    color: #ef4444;
}

.stat-card-danger {
    border-bottom: 4px solid #ef4444;
}

.stat-card-balance .stat-icon-box {
    background: #f0f9ff;
    color: #0ea5e9;
}

.stat-card-balance {
    border-bottom: 4px solid #0ea5e9;
}

.finance-main-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 2rem;
    align-items: start;
}

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

.premium-form-card {
    background: white;
    padding: 2rem;
    border-radius: 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.form-section-header {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-section-header i {
    width: 38px;
    height: 38px;
    background: #f1f5f9;
    color: var(--primary-color);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-section-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 1rem;
    top: 1.1rem;
    color: #94a3b8;
    font-size: 0.9rem;
}

.premium-input {
    width: 100%;
    height: 50px;
    padding-left: 2.75rem;
    border-radius: 0.85rem;
    border: 1.5px solid #e2e8f0;
    font-weight: 600;
    transition: all 0.2s;
}

.premium-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.1);
    outline: none;
}

.history-card {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.transaction-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.transaction-item-premium {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-radius: 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.transaction-item-premium:hover {
    background: white;
    border-color: #cbd5e1;
    transform: translateX(4px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.trans-type-icon {
    width: 44px;
    height: 44px;
    border-radius: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.25rem;
    font-size: 1rem;
}

.trans-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.trans-desc {
    font-weight: 700;
    color: #1e293b;
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
}

.trans-meta {
    font-size: 0.8rem;
    color: #94a3b8;
    display: flex;
    gap: 1rem;
}

.trans-value-box {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.trans-amount {
    font-size: 1.15rem;
    font-weight: 800;
}

@media (max-width: 640px) {
    .transaction-item-premium {
        padding: 0.85rem;
    }

    .trans-type-icon {
        width: 38px;
        height: 38px;
        margin-right: 0.75rem;
    }

    .trans-amount {
        font-size: 1rem;
    }
}

.type-entrada .trans-type-icon {
    background: #f0fdf4;
    color: #22c55e;
}

.type-entrada .trans-amount {
    color: #22c55e;
}

.type-saida .trans-type-icon {
    background: #fef2f2;
    color: #ef4444;
}

.type-saida .trans-amount {
    color: #ef4444;
}

/* ================================================
   RELATORIO-VENDAS.PHP - STYLES
   ================================================ */

.report-container {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.report-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.filters-container {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.filter-group label {
    margin-right: 10px;
    min-width: 120px;
    font-weight: 500;
}

.filter-group input,
.filter-group select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    flex-grow: 1;
    max-width: 250px;
}

.filter-group input[type="time"] {
    max-width: 120px;
    margin-left: 10px;
}

.export-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.export-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 15px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
}

.export-btn i {
    margin-right: 8px;
}

.export-btn.excel {
    background-color: #1d6f42;
}

.export-btn.pdf {
    background-color: #d32f2f;
}

.chart-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-box {
    background-color: #fff;
    border-radius: 6px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: 300px;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.report-table th,
.report-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.report-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.report-table tr:hover {
    background-color: #f5f5f5;
}

.total-row {
    font-weight: 600;
    background-color: #f0f7ff;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination a {
    padding: 8px 16px;
    margin: 0 4px;
    text-decoration: none;
    border: 1px solid #ddd;
    color: #333;
    border-radius: 4px;
}

.pagination a.active {
    background-color: #4CAF50;
    color: white;
    border: 1px solid #4CAF50;
}

.pagination a:hover:not(.active) {
    background-color: #ddd;
}

.rankings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.ranking-card {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
}

.ranking-card h3 {
    font-size: 1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 8px;
}

.ranking-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ranking-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f9f9f9;
}

.ranking-item:last-child {
    border-bottom: none;
}

.ranking-name {
    font-size: 0.9rem;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}

.ranking-qty {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

@media (max-width: 768px) {
    .filter-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-group label {
        margin-bottom: 5px;
    }

    .filter-group input,
    .filter-group select {
        max-width: 100%;
        width: 100%;
    }

    .filter-group input[type="time"] {
        margin-left: 0;
        margin-top: 5px;
    }

    .export-buttons {
        flex-direction: column;
    }
}

/* ================================================
   RELATORIO-PAGAMENTOS.PHP - STYLES
   ================================================ */

.filtros {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.filtros label {
    margin-right: 10px;
    font-weight: bold;
}

.filtros input,
.filtros select {
    padding: 5px;
    margin-right: 15px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.filtros button {
    padding: 5px 15px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.filtros button:hover {
    background-color: var(--primary-hover);
}

.total {
    font-weight: bold;
    color: #2a6496;
}

/* ================================================
   DEVEDORES.PHP - STYLES
   ================================================ */

.debtors-header {
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.debtors-title h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.debtors-title p {
    color: #64748b;
    margin: 0.25rem 0 0;
    font-size: 0.95rem;
}

.debtors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.debtor-card-premium {
    background: white;
    border-radius: 1.75rem;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.debtor-card-premium:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: #ef4444;
}

.debtor-card-header {
    padding: 1.5rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.debtor-avatar {
    width: 54px;
    height: 54px;
    border-radius: 1.25rem;
    background: #fef2f2;
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 800;
}

.debtor-info h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: #1e293b;
}

.debtor-phone {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.debt-items-container {
    padding: 1.25rem;
    flex-grow: 1;
    max-height: 250px;
    overflow-y: auto;
}

.debt-items-container::-webkit-scrollbar {
    width: 4px;
}

.debt-items-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.debt-item-row {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px dashed #f1f5f9;
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s;
}

.debt-item-row:hover {
    background: #f8fafc;
    border-radius: 0.5rem;
}

.item-name {
    font-weight: 600;
    color: #334155;
    font-size: 0.95rem;
}

.item-qty {
    font-size: 0.75rem;
    font-weight: 800;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 0.2rem 0.5rem;
    border-radius: 0.5rem;
}

.item-price {
    font-weight: 700;
    color: #1e293b;
    font-size: 0.95rem;
}

.btn-delete-item {
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.btn-delete-item:hover {
    color: #ef4444;
}

.debtor-card-footer {
    padding: 1.5rem;
    background: white;
    border-top: 1px solid #f1f5f9;
}

.debtor-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.total-label {
    font-size: 0.8rem;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
}

.total-amount {
    font-size: 1.5rem;
    font-weight: 900;
    color: #ef4444;
}

.debtor-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.btn-card-action {
    height: 44px;
    border-radius: 0.85rem;
    border: none;
    font-weight: 800;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-item {
    background: #f1f5f9;
    color: #475569;
}

.btn-add-item:hover {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-remove-debtor {
    background: #fff1f2;
    color: #e11d48;
}

.btn-remove-debtor:hover {
    background: #e11d48;
    color: white;
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.3);
}

@media (max-width: 640px) {
    .btn-new-debtor {
        position: fixed;
        bottom: 2rem;
        right: 1.5rem;
        z-index: 99;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 10px 15px -3px rgba(76, 175, 80, 0.4);
    }

    .btn-new-debtor span {
        display: none;
    }

    .btn-new-debtor i {
        margin: 0;
        font-size: 1.5rem;
    }

    .debtors-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================================
   RELATORIO-FECHAMENTO-PARCIAL.PHP - STYLES
   ================================================ */

.header-report {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 3px solid #2d5016;
    padding-bottom: 20px;
}

.header-report h1 {
    color: #2d5016;
    margin-bottom: 10px;
}

.info-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.info-label {
    font-weight: bold;
    color: #666;
}

.info-value {
    color: #333;
}

.summary-report {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.summary-card-report {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border-left: 4px solid #2d5016;
}

.summary-card-report h3 {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.summary-card-report .value {
    font-size: 24px;
    font-weight: bold;
    color: #2d5016;
}

.entrada {
    color: #28a745;
    font-weight: bold;
}

.saida {
    color: #dc3545;
    font-weight: bold;
}

.footer-report {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #ddd;
    color: #666;
}

@media print {
    .no-print {
        display: none;
    }
}

@media (max-width: 600px) {
    .summary-report {
        grid-template-columns: 1fr 1fr;
    }
}

/* ================================================
   RELATORIO-CAIXA.PHP - STYLES
   ================================================ */

.report-header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.report-title h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.report-title p {
    color: #64748b;
    margin: 0.25rem 0 0;
    font-size: 0.95rem;
}

.filter-card-premium {
    background: white;
    padding: 1.5rem;
    border-radius: 1.25rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    margin-bottom: 2.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.premium-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
    align-items: end;
}

.filter-group-premium {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group-premium label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.premium-select,
.premium-date {
    width: 100%;
    height: 48px;
    padding: 0 1rem;
    border-radius: 0.75rem;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    font-weight: 600;
    color: #1e293b;
    transition: all 0.2s;
}

.premium-select:focus,
.premium-date:focus {
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.1);
    outline: none;
}

.stats-grid-lux {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card-lux {
    background: white;
    padding: 1.75rem;
    border-radius: 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    border-bottom: 5px solid transparent;
    transition: transform 0.3s;
}

.stat-card-lux:hover {
    transform: translateY(-8px);
}

.stat-card-lux::before {
    content: "";
    position: absolute;
    top: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    background: currentColor;
    opacity: 0.05;
    border-radius: 50%;
}

.stat-card-lux .stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
}

.stat-card-lux .stat-value {
    font-size: 1.85rem;
    font-weight: 800;
    display: block;
    margin-bottom: 0.25rem;
}

.stat-card-lux .stat-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
}

.stat-blue {
    color: #2563eb;
    border-color: #2563eb;
}

.stat-blue .stat-icon {
    background: #eff6ff;
}

.stat-green {
    color: #16a34a;
    border-color: #16a34a;
}

.stat-green .stat-icon {
    background: #f0fdf4;
}

.stat-amber {
    color: #d97706;
    border-color: #d97706;
}

.stat-amber .stat-icon {
    background: #fffbeb;
}

.stat-danger {
    color: #dc2626;
    border-color: #dc2626;
}

.stat-danger .stat-icon {
    background: #fef2f2;
}

.caixa-item-card {
    background: white;
    border-radius: 1.25rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid #e2e8f0;
    display: grid;
    grid-template-columns: auto 1fr auto auto auto;
    align-items: center;
    gap: 2rem;
    transition: all 0.2s;
}

.caixa-main-info {
    display: flex;
    flex-direction: column;
}

.caixa-date {
    font-weight: 800;
    color: #1e293b;
    font-size: 1rem;
}

.caixa-user {
    font-size: 0.85rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.caixa-val-group {
    display: flex;
    flex-direction: column;
}

.caixa-val-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
}

.caixa-val-amount {
    font-size: 1rem;
    font-weight: 700;
    color: #334155;
}

.caixa-diff-badge {
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 800;
    font-size: 0.9rem;
}

.diff-pos {
    background: #f0fdf4;
    color: #16a34a;
}

.diff-neg {
    background: #fef2f2;
    color: #dc2626;
}

.btn-view-premium {
    width: 44px;
    height: 44px;
    border-radius: 0.85rem;
    background: #f1f5f9;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-view-premium:hover {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

@media (max-width: 1024px) {
    .caixa-item-card {
        grid-template-columns: 1fr 1fr;
        gap: 1.25rem;
    }
}

@media (max-width: 640px) {
    .caixa-item-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* ================================================
   MANUTENCAO.PHP - STYLES
   ================================================ */

.baloon {
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px 5px;
    background-color: #ffeb3b;
    color: #333;
    border-radius: 10px;
    box-shadow: 0px 0px 10px #888;
    font-family: Arial, sans-serif;
    animation: flutuar 2s infinite;
    z-index: 9999;
    text-align: center;
    width: 100%;
    max-width: 450px;
}

@keyframes flutuar {

    0%,
    100% {
        transform: translate(-50%, -50%);
    }

    50% {
        transform: translate(-50%, -60%);
    }
}

/* ================================================
   PAYMENT.PHP - STYLES
   ================================================ */

.payment-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.payment-card {
    background: white;
    border-radius: 1.25rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    padding: 2rem;
    width: 100%;
    border-top: 5px solid #e2e8f0;
}

.payment-card.status-active {
    border-top-color: #4CAF50;
}

.payment-card.status-pending {
    border-top-color: #f44336;
}

.payment-card-header {
    text-align: center;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.status-icon-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1rem;
}

.status-active .status-icon-circle {
    background-color: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.status-pending .status-icon-circle {
    background-color: rgba(244, 67, 54, 0.1);
    color: #f44336;
}

.status-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 2rem;
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-active .status-badge {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-pending .status-badge {
    background: #ffebee;
    color: #c62828;
}

.plan-summary-box {
    background: #f8fafc;
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.due-date-box {
    border: 2px solid #f1f5f9;
    border-radius: 1rem;
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.payment-alert {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #ef4444;
    padding: 1.25rem;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    font-size: 0.9rem;
}

.config-form-group {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.qr-code-wrapper {
    text-align: center;
    padding: 2rem 0;
}

.qr-code-frame {
    background: white;
    padding: 1rem;
    border-radius: 1.5rem;
    display: inline-block;
    margin-bottom: 1.5rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.pix-code-container {
    position: relative;
    margin-bottom: 1.5rem;
}

.pix-code-input {
    width: 100%;
    border: 2px solid #e2e8f0;
    background: #f8fafc;
    padding: 1.25rem;
    padding-right: 3.5rem;
    border-radius: 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: #475569;
}

.btn-copy-code {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    color: var(--primary-color);
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.btn-copy-code:hover {
    background: var(--primary-color);
    color: white;
}

.btn-verify-status {
    width: 100%;
    background: #fffbeb;
    color: #92400e;
    border: 2px solid #fef3c7;
    border-radius: 1rem;
    padding: 1.25rem;
    font-weight: 800;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.2s;
}

.btn-verify-status:hover {
    background: #fef3c7;
    transform: translateY(-2px);
}

.btn-reset-creds {
    background: none;
    border: none;
    color: #94a3b8;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.85rem;
    margin-top: 2rem;
    display: block;
    width: 100%;
    text-align: center;
}

.btn-reset-creds:hover {
    color: #64748b;
}

@media (max-width: 640px) {

    .plan-summary-box,
    .due-date-box {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
}

/* ================================================
   DARK MODE - COMPREHENSIVE OVERRIDES
   ================================================ */
[data-theme="dark"] {
    color-scheme: dark;
}

[data-theme="dark"] .nav-bar,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .filter-card-premium,
[data-theme="dark"] .stat-card-lux,
[data-theme="dark"] .caixa-item-card,
[data-theme="dark"] .payment-card,
[data-theme="dark"] .card,
[data-theme="dark"] .card-mesa {
    background-color: var(--card-background) !important;
    border-color: var(--border-color) !important;
    color: var(--text-main) !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4) !important;
}

[data-theme="dark"] .nav-bar h1,
[data-theme="dark"] .card-title,
[data-theme="dark"] .stat-value,
[data-theme="dark"] .caixa-date,
[data-theme="dark"] .caixa-val-amount,
[data-theme="dark"] .modal-title {
    color: var(--text-main) !important;
}

[data-theme="dark"] .stat-label,
[data-theme="dark"] .caixa-val-label,
[data-theme="dark"] .filter-group-premium label,
[data-theme="dark"] .form-label,
[data-theme="dark"] .user-name {
    color: var(--text-secondary) !important;
}

/* Intercalação de Cores (Zebra Stripes) */
[data-theme="dark"] .table tr:nth-child(even),
[data-theme="dark"] tr:nth-child(even),
[data-theme="dark"] .order-item:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.02) !important;
}

[data-theme="dark"] .table tr:hover td,
[data-theme="dark"] tr:hover td,
[data-theme="dark"] .order-item:hover,
[data-theme="dark"] .caixa-item-card:hover {
    background-color: var(--surface-hover) !important;
}

[data-theme="dark"] .table th,
[data-theme="dark"] th {
    background-color: #0d1117 !important;
    color: var(--text-secondary) !important;
    border-bottom: 2px solid var(--border-color) !important;
}

[data-theme="dark"] .table td,
[data-theme="dark"] td,
[data-theme="dark"] .order-item {
    border-color: var(--border-color) !important;
}

/* Elementos de Navegação e Botões */
[data-theme="dark"] .nav-toggle,
[data-theme="dark"] .nav-back,
[data-theme="dark"] .close-button,
[data-theme="dark"] .btn-view-premium,
[data-theme="dark"] .btn-secondary {
    background-color: var(--surface-hover) !important;
    border-color: var(--border-color) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] .nav-toggle:hover,
[data-theme="dark"] .nav-back:hover,
[data-theme="dark"] .close-button:hover,
[data-theme="dark"] .btn-view-premium:hover,
[data-theme="dark"] .btn-secondary:hover {
    background-color: #2d333b !important;
}

/* Inputs e Formulários */
[data-theme="dark"] .form-input,
[data-theme="dark"] .premium-select,
[data-theme="dark"] .premium-date,
[data-theme="dark"] .pix-code-input,
[data-theme="dark"] select,
[data-theme="dark"] input {
    background-color: #0d1117 !important;
    border-color: var(--border-color) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] .form-input:focus,
[data-theme="dark"] .premium-select:focus,
[data-theme="dark"] .premium-date:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(76, 176, 80, 0.15) !important;
}

[data-theme="dark"] .suggestions {
    background-color: var(--card-background) !important;
    border-color: var(--border-color) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] .suggestion-item:hover {
    background-color: var(--surface-hover) !important;
}

/* Componentes Especiais */
[data-theme="dark"] .stat-card-lux::before {
    opacity: 0.1;
}

[data-theme="dark"] .user-avatar {
    border-color: var(--border-color);
}

[data-theme="dark"] .plan-summary-box,
[data-theme="dark"] .due-date-box,
[data-theme="dark"] .qr-code-frame {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .stat-blue .stat-icon {
    background: rgba(37, 99, 235, 0.2);
}

[data-theme="dark"] .stat-green .stat-icon {
    background: rgba(22, 163, 74, 0.2);
}

[data-theme="dark"] .stat-amber .stat-icon {
    background: rgba(217, 119, 6, 0.2);
}

[data-theme="dark"] .stat-danger .stat-icon {
    background: rgba(220, 38, 38, 0.2);
}

[data-theme="dark"] .modal {
    background-color: rgba(0, 0, 0, 0.8) !important;
}

/* Correção de cores vibrantes no escuro */
[data-theme="dark"] .status-disponivel {
    background: rgba(76, 175, 80, 0.15) !important;
    color: #4ade80 !important;
}

[data-theme="dark"] .status-ocupada,
[data-theme="dark"] .status-fechada {
    background: rgba(244, 67, 54, 0.15) !important;
    color: #f87171 !important;
}

[data-theme="dark"] .status-reservada {
    background: rgba(255, 193, 7, 0.15) !important;
    color: #fbbf24 !important;
}

[data-theme="dark"] .diff-pos {
    background: rgba(76, 175, 80, 0.15) !important;
    color: #4ade80 !important;
}

[data-theme="dark"] .diff-neg {
    background: rgba(244, 67, 54, 0.15) !important;
    color: #f87171 !important;
}

[data-theme="dark"] .payment-alert {
    background: rgba(244, 67, 54, 0.1);
    border-color: rgba(244, 67, 54, 0.2);
    color: #f87171;
}

/* Floating Chat Widget */
.chat-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 2000;
    font-family: 'Inter', sans-serif;
}

.chat-button {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--card-background);
    animation: bounceIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
}

@keyframes bounceIn {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

.chat-container {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: var(--card-background);
    border-radius: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-color);
    animation: slideUp 0.3s ease-out;
}

.chat-container.active {
    display: flex;
}

.chat-header {
    background: var(--primary-color);
    color: white;
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chat-close {
    cursor: pointer;
    opacity: 0.8;
    transition: 0.2s;
}

.chat-close:hover {
    opacity: 1;
}

.chat-messages {
    flex: 1;
    padding: 1.25rem 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: #f0f2f5;
    background-image: radial-gradient(var(--border-color) 0.5px, transparent 0.5px);
    background-size: 15px 15px;
}

[data-theme="dark"] .chat-messages {
    background: #0d1117;
    background-image: radial-gradient(rgba(255,255,255,0.05) 0.5px, transparent 0.5px);
}

.chat-messages .message {
    max-width: 85%;
    padding: 0.65rem 0.9rem;
    border-radius: 1.25rem;
    font-size: 0.925rem;
    line-height: 1.5;
    position: relative;
    word-wrap: break-word;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.chat-messages .message-received {
    align-self: flex-start;
    margin-right: auto;
    margin-left: 0 !important;
    background: white;
    color: var(--text-main);
    border-bottom-left-radius: 2px;
    border: 1px solid rgba(0,0,0,0.02);
}

.chat-messages .message-sent {
    align-self: flex-end;
    margin-left: auto;
    margin-right: 0 !important;
    background: var(--primary-color);
    color: white;
    border-bottom-right-radius: 2px;
}

.message-info {
    font-size: 0.75rem;
    margin-bottom: 0.2rem;
    display: block;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.message-received .message-info {
    color: var(--primary-color);
}

.message-sent .message-info {
    color: rgba(255, 255, 255, 0.9);
    text-align: right;
}

.message-content {
    word-break: break-word;
}

[data-theme="dark"] .message-received .message-info {
    color: #4ade80;
}

.chat-input-area {
    padding: 1rem;
    background: var(--card-background);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.5rem;
}

.chat-input {
    flex: 1;
    border: 1.5px solid var(--border-color);
    border-radius: 1rem;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    outline: none;
    transition: 0.2s;
    background: var(--background-color);
    color: var(--text-main);
}

.chat-input:focus {
    border-color: var(--primary-color);
}

.btn-chat-send {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
}

.btn-chat-send:hover {
    transform: scale(1.05);
    background: var(--primary-hover);
}

[data-theme="dark"] .message-received {
    background: #161b22 !important;
    border-color: #30363d !important;
}

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

@media (max-width: 480px) {
    .chat-container {
        width: calc(100vw - 4rem);
        height: 400px;
    }
}