@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    --bg-body: #0f172a;
    --bg-surface: #1e293b;
    --bg-surface-elevated: #26334d;
    --bg-input: #0f172a;
    --border-color: rgba(148, 163, 184, 0.16);
    --border-focus: #6366f1;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-primary: #6366f1;
    --accent-primary-hover: #4f46e5;
    --accent-secondary: #ec4899;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    --accent-info: #0ea5e9;
    --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.35), 0 4px 12px -2px rgba(0, 0, 0, 0.25);
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 8px;
}

* {
    box-sizing: border-box;
}

html, body {
    background-color: var(--bg-body) !important;
    color: var(--text-primary) !important;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Navbar Moderna */
.cinema-navbar {
    background: rgba(15, 23, 42, 0.88) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: none !important;
    border-bottom: 1px solid var(--border-color) !important;
    border-radius: 0 !important;
    margin-bottom: 24px !important;
    padding: 8px 16px;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.cinema-brand {
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 18px !important;
    color: #fff !important;
    letter-spacing: -0.02em;
    padding: 10px 16px !important;
    text-decoration: none !important;
}

.cinema-brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.cinema-navbar .navbar-nav > li > a {
    color: var(--text-secondary) !important;
    font-weight: 600;
    font-size: 13.5px;
    padding: 10px 14px !important;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 7px;
}

.cinema-navbar .navbar-nav > li > a:hover,
.cinema-navbar .navbar-nav > li.open > a,
.cinema-navbar .navbar-nav > li.active > a {
    color: #fff !important;
    background: rgba(99, 102, 241, 0.14) !important;
}

.cinema-navbar .dropdown-menu {
    background-color: var(--bg-surface) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    padding: 8px !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45) !important;
    margin-top: 6px !important;
    min-width: 210px;
}

.cinema-navbar .dropdown-menu > li > a {
    color: var(--text-secondary) !important;
    font-weight: 500;
    font-size: 13.5px;
    padding: 9px 14px !important;
    border-radius: 8px;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cinema-navbar .dropdown-menu > li > a:hover {
    color: #fff !important;
    background: rgba(99, 102, 241, 0.2) !important;
    transform: translateX(2px);
}

/* Containers e Cards */
#main-content, .cinema-container {
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 24px 48px 24px !important;
}

#main.container-fluid {
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 24px;
}

.page-header {
    border-bottom: 1px solid var(--border-color) !important;
    margin: 8px 0 24px 0 !important;
    padding-bottom: 16px !important;
    color: var(--text-primary) !important;
    font-weight: 800;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cinema-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-card);
}

.cinema-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 12px;
}

.cinema-card-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cinema-card-title i {
    color: var(--accent-primary);
}

.cinema-section-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

/* Formulários e Inputs */
label {
    font-weight: 600 !important;
    font-size: 12.5px !important;
    color: #cbd5e1 !important;
    margin-bottom: 6px !important;
    display: block;
    letter-spacing: 0.01em;
}

.form-group {
    margin-bottom: 18px !important;
}

.form-control,
select.form-control,
input[type="text"].form-control,
input[type="password"].form-control,
input[type="email"].form-control,
input[type="number"].form-control {
    background-color: var(--bg-input) !important;
    border: 1px solid rgba(148, 163, 184, 0.24) !important;
    border-radius: var(--radius-md) !important;
    color: var(--text-primary) !important;
    height: 42px !important;
    padding: 8px 13px !important;
    font-size: 13.5px !important;
    font-weight: 500;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease !important;
}

.form-control:focus,
select.form-control:focus {
    border-color: var(--border-focus) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25) !important;
    background-color: #131c33 !important;
}

.form-control[readonly],
.form-control[disabled] {
    background-color: rgba(15, 23, 42, 0.55) !important;
    color: var(--text-secondary) !important;
    cursor: not-allowed;
    border-style: dashed !important;
}

.form-control::placeholder {
    color: var(--text-muted) !important;
}

/* Botões Modernos */
.btn, button[type="submit"] {
    border-radius: var(--radius-md) !important;
    font-weight: 600 !important;
    font-size: 13.5px !important;
    padding: 9px 18px !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none !important;
    cursor: pointer;
}

.btn-xs {
    padding: 5px 11px !important;
    font-size: 12px !important;
    border-radius: 7px !important;
    margin-right: 4px;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
    filter: brightness(1.06);
}

.btn-primary, button[type="submit"] {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover, button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
    filter: brightness(1.06);
}

.btn-info {
    background: rgba(14, 165, 233, 0.16) !important;
    color: #38bdf8 !important;
    border: 1px solid rgba(14, 165, 233, 0.35) !important;
}

.btn-info:hover {
    background: #0ea5e9 !important;
    color: #fff !important;
}

.btn-warning {
    background: rgba(245, 158, 11, 0.16) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.35) !important;
}

.btn-warning:hover {
    background: #f59e0b !important;
    color: #fff !important;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.16) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.35) !important;
}

.btn-danger:hover {
    background: #ef4444 !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

.btn-default, .btn-secondary {
    background: rgba(148, 163, 184, 0.14) !important;
    color: #e2e8f0 !important;
    border: 1px solid var(--border-color) !important;
}

.btn-default:hover, .btn-secondary:hover {
    background: rgba(148, 163, 184, 0.24) !important;
    color: #fff !important;
}

/* Tabelas Modernas */
.table-responsive-modern {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.table {
    margin-bottom: 0 !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
    background: var(--bg-surface) !important;
}

.table-bordered {
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.table > thead > tr > th {
    background: rgba(15, 23, 42, 0.65) !important;
    color: #94a3b8 !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 14px 16px !important;
    border-bottom: 1px solid var(--border-color) !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
}

.table > tbody > tr > td {
    padding: 13px 16px !important;
    vertical-align: middle !important;
    border-top: 1px solid var(--border-color) !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
    color: #e2e8f0 !important;
    font-size: 13.5px;
    background: transparent !important;
}

.table > tbody > tr:hover > td {
    background: rgba(99, 102, 241, 0.07) !important;
}

/* Badges de Status */
.badge-modern {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-info {
    background: rgba(14, 165, 233, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(14, 165, 233, 0.3);
}

.badge-neutral {
    background: rgba(148, 163, 184, 0.15);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.25);
}

/* Paginação Moderna */
#navegacao {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 20px 0;
    padding: 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: transparent;
}

#navegacao a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 12px;
    border-radius: 8px;
    background: var(--bg-input);
    color: var(--text-secondary) !important;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none !important;
    border: 1px solid var(--border-color);
    transition: all 0.15s ease;
}

#navegacao a:hover {
    background: rgba(99, 102, 241, 0.2);
    color: #fff !important;
    border-color: var(--accent-primary);
}

#navegacao a strong {
    color: #fff;
}

#navegacao a:has(strong) {
    background: var(--accent-primary);
    color: #fff !important;
    border-color: var(--accent-primary);
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4);
}

/* Quick Pills (Atalhos de Hora / Data) */
.quick-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 6px;
}

.quick-pill {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(99, 102, 241, 0.12);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.25);
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.quick-pill:hover {
    background: var(--accent-primary);
    color: #fff;
}

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

.kpi-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.kpi-info h4 {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.kpi-info .kpi-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 2px;
}

/* SweetAlert2 Dark Theme Customization */
.swal2-popup {
    background: #1e293b !important;
    color: #f8fafc !important;
    border: 1px solid rgba(148, 163, 184, 0.2) !important;
    border-radius: 18px !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.65) !important;
}

.swal2-title {
    color: #f8fafc !important;
    font-weight: 700 !important;
}

.swal2-html-container {
    color: #cbd5e1 !important;
}

.swal2-confirm {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    padding: 10px 24px !important;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4) !important;
}

.swal2-cancel {
    background: rgba(148, 163, 184, 0.18) !important;
    color: #e2e8f0 !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    padding: 10px 20px !important;
}

/* Select2 Dark Theme Customization */
.select2-container--default .select2-selection--single {
    background-color: var(--bg-input) !important;
    border: 1px solid rgba(148, 163, 184, 0.24) !important;
    border-radius: var(--radius-md) !important;
    height: 42px !important;
    display: flex !important;
    align-items: center !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--text-primary) !important;
    line-height: 40px !important;
    padding-left: 13px !important;
    font-size: 13.5px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px !important;
    right: 8px !important;
}

.select2-dropdown {
    background-color: var(--bg-surface) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5) !important;
    overflow: hidden;
}

.select2-search--dropdown .select2-search__field {
    background-color: var(--bg-input) !important;
    border: 1px solid rgba(148, 163, 184, 0.3) !important;
    border-radius: 8px !important;
    color: var(--text-primary) !important;
    padding: 7px 10px !important;
}

.select2-results__option {
    color: var(--text-secondary) !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--accent-primary) !important;
    color: #fff !important;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: rgba(99, 102, 241, 0.2) !important;
    color: #fff !important;
}

/* ==========================================================================
   Módulo Bomboniere (PDV / Frente de Caixa & Estoque)
   ========================================================================== */

.bomboniere-layout {
    display: grid;
    grid-template-columns: 1fr 410px;
    gap: 22px;
    align-items: start;
}

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

.bomboniere-cat-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.bomboniere-cat-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 999px;
    background: var(--bg-input);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
}

.bomboniere-cat-btn:hover {
    color: #fff;
    border-color: rgba(245, 158, 11, 0.45);
    background: rgba(245, 158, 11, 0.1);
}

.bomboniere-cat-btn.active {
    background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
}

.bomboniere-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
    gap: 14px;
}

.bomboniere-prod-card {
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.18s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    user-select: none;
}

.bomboniere-prod-card:hover {
    transform: translateY(-3px);
    border-color: rgba(245, 158, 11, 0.55);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.45), 0 0 16px rgba(245, 158, 11, 0.15);
    background: rgba(30, 41, 59, 0.92);
}

.bomboniere-prod-card:active {
    transform: scale(0.98);
}

.bomboniere-prod-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 10px;
}

.bomboniere-prod-icon {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    background: rgba(245, 158, 11, 0.14);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.bomboniere-prod-icon.cat-Combos {
    background: rgba(236, 72, 153, 0.14);
    color: #f472b6;
    border-color: rgba(236, 72, 153, 0.28);
}

.bomboniere-prod-icon.cat-Bebidas {
    background: rgba(14, 165, 233, 0.14);
    color: #38bdf8;
    border-color: rgba(14, 165, 233, 0.28);
}

.bomboniere-prod-icon.cat-Doces {
    background: rgba(168, 85, 247, 0.14);
    color: #c084fc;
    border-color: rgba(168, 85, 247, 0.28);
}

.bomboniere-prod-icon.cat-Salgados {
    background: rgba(16, 185, 129, 0.14);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.28);
}

.bomboniere-prod-name {
    font-size: 13.5px;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1.35;
    margin-bottom: 10px;
    min-height: 36px;
}

.bomboniere-prod-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 9px;
    border-top: 1px dashed rgba(148, 163, 184, 0.16);
}

.bomboniere-prod-price {
    font-size: 16px;
    font-weight: 800;
    color: #34d399;
}

.bomboniere-prod-add {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.18);
    color: #818cf8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: all 0.15s ease;
}

.bomboniere-prod-card:hover .bomboniere-prod-add {
    background: #f59e0b;
    color: #fff;
}

/* Carrinho / Cupom PDV */
.bomboniere-cart-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-card);
    position: sticky;
    top: 20px;
}

.bomboniere-cart-list {
    max-height: 310px;
    overflow-y: auto;
    margin: 12px 0;
    padding-right: 4px;
}

.bomboniere-cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 10px;
    margin-bottom: 8px;
}

.bomboniere-qty-ctrl {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2px 5px;
}

.bomboniere-qty-btn {
    background: transparent;
    border: none;
    color: #cbd5e1;
    width: 22px;
    height: 22px;
    border-radius: 5px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.bomboniere-qty-btn:hover {
    background: rgba(99, 102, 241, 0.25);
    color: #fff;
}

.pay-methods-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 6px;
}

.pay-method-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pay-method-pill:hover {
    border-color: rgba(99, 102, 241, 0.45);
    color: #fff;
}

.pay-method-pill.active {
    background: rgba(16, 185, 129, 0.16);
    border-color: #10b981;
    color: #34d399;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15);
}

