/* ===== RESET E BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== LAYOUT PRINCIPAL ===== */
.admin-layout {
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

.sidebar {
    width: 250px;
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #444;
}

.sidebar-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 10px;
}

.sidebar h3 {
    color: #ffd700;
    font-size: 18px;
    font-weight: bold;
}

.sidebar-nav ul {
    list-style: none;
    padding: 20px 0;
}

.sidebar-nav li {
    margin: 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #ccc;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
    border-left-color: #ffd700;
}

.sidebar-nav a.active {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    border-left-color: #ffd700;
}

.sidebar-nav i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

.main-wrapper {
    flex: 1;
    margin-left: 250px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: calc(100% - 250px);
    max-width: calc(100vw - 250px);
    overflow-x: hidden;
}

/* ===== HEADER SUPERIOR ===== */
.top-header {
    background: white;
    padding: 15px 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.sidebar-toggle:hover {
    background: #f0f0f0;
}

.header-left h1 {
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    text-align: right;
}

.user-info span {
    display: block;
    font-weight: 600;
    color: #333;
}

.user-info small {
    color: #666;
    font-size: 12px;
}

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

/* ===== CONTEÚDO PRINCIPAL ===== */
.main-content {
    flex: 1;
    padding: 30px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    color: #333;
    font-size: 28px;
    margin-bottom: 5px;
}

.page-header p {
    color: #666;
    font-size: 16px;
}

/* ===== CARDS DE ESTATÍSTICAS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ffd700, #ffed4e, #ffd700);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card.alert {
    border-left: 4px solid #ff6b6b;
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #1a1a1a;
}

.stat-content h3 {
    font-size: 32px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.stat-content p {
    color: #666;
    font-size: 14px;
    margin-bottom: 5px;
}

.stat-content small {
    color: #999;
    font-size: 12px;
}

/* ===== GRID DO DASHBOARD ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.dashboard-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.card-header {
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.card-content {
    padding: 20px;
}

/* ===== LISTAS ===== */
.product-list, .order-list {
    space-y: 15px;
}

.product-item, .order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.product-name, .order-info {
    font-weight: 500;
    color: #333;
}

.product-sales, .order-value {
    color: #666;
    font-size: 14px;
}

.order-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.status-aprovado { background: #d4edda; color: #155724; }
.status-pendente { background: #fff3cd; color: #856404; }
.status-cancelado { background: #f8d7da; color: #721c24; }

/* ===== BOTÕES MODERNOS 2024 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #1a1a1a;
    border: 2px solid transparent;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ffed4e 0%, #ffd700 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
    color: white;
    border: 2px solid transparent;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #dc3545 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.4);
}

.btn-outline {
    background: transparent;
    color: #666;
    border: 2px solid #ddd;
    box-shadow: none;
}

.btn-outline:hover {
    background: #f8f9fa;
    color: #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    border-radius: 8px;
}

.btn-lg {
    padding: 1.25rem 2rem;
    font-size: 1.1rem;
    border-radius: 16px;
}

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

/* ===== ALERTAS ===== */
.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

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

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* ===== PÁGINA DE LOGIN ===== */
.login-page {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    padding: 30px;
    text-align: center;
    color: #1a1a1a;
}

.login-header .logo-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 15px;
}

.login-header h1 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.login-header p {
    font-size: 14px;
    opacity: 0.8;
}

.login-form {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #ffd700;
}

.login-footer {
    background: #f8f9fa;
    padding: 20px 30px;
    text-align: center;
    font-size: 12px;
    color: #666;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    .admin-layout {
        overflow-x: hidden;
    }
    
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        position: fixed;
        z-index: 1000;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden;
    }
    
    .main-content {
        padding: 15px;
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden;
        margin-left: 0 !important;
    }
    
    .container {
        max-width: 100%;
        padding: 0 10px;
        overflow-x: hidden;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .card {
        margin-bottom: 15px;
    }
    
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .filters-form {
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-group {
        min-width: 100%;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        margin-bottom: 5px;
    }
}

/* ===== RESPONSIVIDADE EXTRA PEQUENA ===== */
@media (max-width: 480px) {
    .main-content {
        padding: 8px;
        width: 100vw;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    .container {
        padding: 0;
        max-width: 100vw;
        width: 100%;
        overflow-x: hidden;
    }
    
    .card {
        margin-bottom: 10px;
        padding: 12px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .stats-grid {
        gap: 8px;
        grid-template-columns: 1fr;
        width: 100%;
    }
    
    .dashboard-grid {
        gap: 8px;
        grid-template-columns: 1fr;
        width: 100%;
    }
    
    .table-responsive {
        font-size: 12px;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .btn {
        padding: 6px 10px;
        font-size: 12px;
        width: 100%;
        margin-bottom: 5px;
    }
    
    .btn-group {
        width: 100%;
        flex-direction: column;
    }
    
    .btn-group .btn {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .modal-dialog {
        margin: 5px;
        max-width: calc(100vw - 10px);
        width: calc(100vw - 10px);
    }
    
    .filters-form {
        flex-direction: column;
        width: 100%;
    }
    
    .filter-group {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .filter-group input,
    .filter-group select {
        width: 100%;
        box-sizing: border-box;
    }
    
    .data-table {
        min-width: 500px;
        font-size: 11px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 4px;
        white-space: nowrap;
    }
    
    .header-right {
        flex-direction: column;
        align-items: flex-end;
    }
    
    .user-info {
        font-size: 12px;
    }
    
    .user-actions {
        margin-top: 5px;
    }
    
    .user-actions .btn {
        padding: 4px 8px;
        font-size: 10px;
    }
    
    /* Títulos mais curtos em mobile */
    .top-header h1 {
        font-size: 16px;
    }
    
    .user-info span {
        font-size: 12px;
    }
    
    .user-info small {
        font-size: 10px;
    }
    
    /* Forçar sidebar oculta em mobile */
    .sidebar {
        display: none !important;
    }
    
    .sidebar.open {
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        height: 100vh !important;
        z-index: 9999 !important;
        transform: translateX(0) !important;
    }
    
    /* Overlay para mobile */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9998;
    }
    
    .sidebar.open + .sidebar-overlay {
        display: block;
    }
}

/* ===== CORREÇÃO ESPECÍFICA PARA MOBILE MUITO PEQUENO ===== */
@media (max-width: 360px) {
    .main-content {
        padding: 5px;
    }
    
    .container {
        padding: 0;
    }
    
    .card {
        padding: 8px;
    }
    
    .stats-grid {
        gap: 5px;
    }
    
    .dashboard-grid {
        gap: 5px;
    }
    
    .data-table {
        min-width: 400px;
        font-size: 10px;
    }
    
    .data-table th,
    .data-table td {
        padding: 6px 2px;
    }
    
    .btn {
        padding: 4px 8px;
        font-size: 10px;
    }
    
    /* Títulos ainda menores em mobile muito pequeno */
    .top-header h1 {
        font-size: 14px;
    }
    
    .user-info span {
        font-size: 11px;
    }
    
    .user-info small {
        font-size: 9px;
    }
    
    /* Forçar sidebar oculta em mobile muito pequeno */
    .sidebar {
        display: none !important;
    }
    
    .sidebar.open {
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        height: 100vh !important;
        z-index: 9999 !important;
        transform: translateX(0) !important;
    }
}

/* ===== GESTÃO DE PRODUTOS ===== */
.filters-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.filters-form {
    display: flex;
    gap: 15px;
    align-items: end;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.search-input {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
}

.filter-select {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

.actions-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.stats-info {
    color: #666;
    font-size: 14px;
}

.table-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* ===== TABELAS MODERNAS 2024 ===== */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto;
    min-width: 600px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
}

.data-table::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ffd700, #ffed4e, #ffd700);
    z-index: 1;
}

.data-table th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1.25rem 1.5rem;
    text-align: left;
    font-weight: 700;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
    user-select: none;
    position: sticky;
    top: 0;
    z-index: 10;
    transition: all 0.3s ease;
}

.data-table th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #ffd700, #ffed4e);
}

.data-table th:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.data-table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    vertical-align: middle;
    font-weight: 500;
    color: #2c3e50;
    transition: all 0.3s ease;
}

.data-table tr {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.data-table tr:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05) 0%, rgba(255, 237, 78, 0.05) 100%);
    transform: scale(1.01);
}

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

.product-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 5px;
}

.badge-premium {
    background: #ffd700;
    color: #1a1a1a;
}

.badge-new {
    background: #28a745;
    color: white;
}

.price-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.price {
    font-weight: 600;
    color: #333;
}

.price-old {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
}

.stock {
    font-weight: 600;
}

.stock.low {
    color: #dc3545;
}

.status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.status-ativo {
    background: #d4edda;
    color: #155724;
}

.status-inativo {
    background: #f8d7da;
    color: #721c24;
}

.action-buttons {
    display: flex;
    gap: 5px;
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header h3 {
    margin: 0;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 5px;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

/* ===== FORMULÁRIOS MODERNOS 2024 ===== */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.15), 0 4px 20px rgba(255, 215, 0, 0.1);
    transform: translateY(-1px);
    background: #ffffff;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

/* Select Moderno - APLICAR A TODOS OS SELECTS */
select,
.form-control[type="select"],
.form-select {
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e") !important;
    background-position: right 1rem center !important;
    background-repeat: no-repeat !important;
    background-size: 1.5em 1.5em !important;
    padding-right: 3rem !important;
    cursor: pointer !important;
    width: 100% !important;
    padding: 1rem 1.25rem !important;
    border: 2px solid #e1e8ed !important;
    border-radius: 12px !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

select:focus,
.form-control[type="select"]:focus,
.form-select:focus {
    outline: none !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.15), 0 4px 20px rgba(255, 215, 0, 0.1) !important;
    transform: translateY(-1px) !important;
    background: #ffffff !important;
}

/* Search Input Especial */
.search-input {
    position: relative;
}

.search-input input {
    padding-left: 3rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3e%3c/svg%3e");
    background-position: left 1rem center;
    background-repeat: no-repeat;
    background-size: 1.25rem 1.25rem;
}

/* Date Input Moderno */
input[type="date"] {
    position: relative;
    color: #2c3e50;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z'/%3e%3c/svg%3e");
    background-size: 1.25rem 1.25rem;
    background-repeat: no-repeat;
    background-position: right 1rem center;
    width: 1.5rem;
    height: 1.5rem;
    cursor: pointer;
}

/* Checkbox e Radio Modernos */
.form-check {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.75rem;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    position: relative;
}

.form-check-input:checked {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

.form-check-input:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 0.875rem;
}

.form-check-label {
    font-weight: 500;
    color: #2c3e50;
    cursor: pointer;
    user-select: none;
}

/* ===== FILTROS E BUSCA MODERNOS 2024 ===== */
.filters-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.filters-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ffd700, #ffed4e, #ffd700);
}

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

.filter-group {
    position: relative;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.15), 0 4px 20px rgba(255, 215, 0, 0.1);
    transform: translateY(-1px);
    background: #ffffff;
}

.search-input {
    position: relative;
}

.search-input input {
    padding-left: 3rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3e%3c/svg%3e");
    background-position: left 1rem center;
    background-repeat: no-repeat;
    background-size: 1.25rem 1.25rem;
}

.date-range {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

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

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.checkbox-group:hover {
    border-color: var(--primary-color);
    background: rgba(255, 215, 0, 0.05);
}

.checkbox-group input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    position: relative;
}

.checkbox-group input[type="checkbox"]:checked {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

.checkbox-group input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 0.875rem;
}

.checkbox-group label {
    font-weight: 500;
    color: #2c3e50;
    cursor: pointer;
    user-select: none;
    margin: 0;
    text-transform: none;
    letter-spacing: normal;
}

/* ===== BOTÃO VER SITE ESPECIAL ===== */
.site-btn {
    background: linear-gradient(135deg, #17a2b8 0%, #20c997 100%) !important;
    color: white !important;
    border: 2px solid transparent !important;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.site-btn:hover {
    background: linear-gradient(135deg, #20c997 0%, #17a2b8 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(23, 162, 184, 0.4);
}

.site-btn:hover::before {
    left: 100%;
}

.site-btn i {
    margin-right: 0.5rem;
    font-size: 1rem;
}

.site-btn .btn-text {
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Animação especial para o botão site */
@keyframes siteBtnPulse {
    0%, 100% { 
        box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
    }
    50% { 
        box-shadow: 0 4px 20px rgba(23, 162, 184, 0.5);
    }
}

.site-btn:hover {
    animation: siteBtnPulse 2s infinite;
}

/* Responsividade para o botão site */
@media (max-width: 768px) {
    .site-btn .btn-text {
        display: none;
    }
    
    .site-btn {
        padding: 0.5rem !important;
        border-radius: 50% !important;
        width: 40px !important;
        height: 40px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .site-btn i {
        margin-right: 0;
        font-size: 1.2rem;
    }
}

/* ===== OTIMIZAÇÃO MOBILE - SÓ ÍCONES ===== */
@media (max-width: 768px) {
    /* Botões do header - só ícones */
    .user-actions .btn {
        padding: 0.5rem !important;
        border-radius: 50% !important;
        width: 40px !important;
        height: 40px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin-left: 0.5rem;
    }
    
    .user-actions .btn span,
    .user-actions .btn .btn-text {
        display: none !important;
    }
    
    .user-actions .btn i {
        margin-right: 0 !important;
        font-size: 1.2rem;
    }
    
    /* Botões de ação nas tabelas - só ícones */
    .action-buttons .btn {
        padding: 0.375rem !important;
        border-radius: 50% !important;
        width: 32px !important;
        height: 32px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 0.25rem;
    }
    
    .action-buttons .btn span {
        display: none !important;
    }
    
    .action-buttons .btn i {
        margin-right: 0 !important;
        font-size: 0.9rem;
    }
    
    /* Botões de filtro - só ícones */
    .filters-row .btn {
        padding: 0.5rem !important;
        border-radius: 50% !important;
        width: 40px !important;
        height: 40px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .filters-row .btn span {
        display: none !important;
    }
    
    .filters-row .btn i {
        margin-right: 0 !important;
        font-size: 1.1rem;
    }
    
    /* Botões de exportação - só ícones */
    .export-buttons .btn {
        padding: 0.5rem !important;
        border-radius: 50% !important;
        width: 40px !important;
        height: 40px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 0.25rem;
    }
    
    .export-buttons .btn span {
        display: none !important;
    }
    
    .export-buttons .btn i {
        margin-right: 0 !important;
        font-size: 1.1rem;
    }
    
    /* Botões de modal - só ícones */
    .modal-footer .btn {
        padding: 0.5rem !important;
        border-radius: 50% !important;
        width: 40px !important;
        height: 40px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 0.25rem;
    }
    
    .modal-footer .btn span {
        display: none !important;
    }
    
    .modal-footer .btn i {
        margin-right: 0 !important;
        font-size: 1.1rem;
    }
    
    /* Botões de formulário - só ícones */
    .form-actions .btn {
        padding: 0.5rem !important;
        border-radius: 50% !important;
        width: 40px !important;
        height: 40px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 0.25rem;
    }
    
    .form-actions .btn span {
        display: none !important;
    }
    
    .form-actions .btn i {
        margin-right: 0 !important;
        font-size: 1.1rem;
    }
    
    /* Botões de status - só ícones */
    .status-actions .btn {
        padding: 0.375rem !important;
        border-radius: 50% !important;
        width: 32px !important;
        height: 32px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 0.25rem;
    }
    
    .status-actions .btn span {
        display: none !important;
    }
    
    .status-actions .btn i {
        margin-right: 0 !important;
        font-size: 0.9rem;
    }
}

/* ===== CAMPOS DE FILTRO ESPECÍFICOS ===== */
/* Forçar estilização em todos os selects, mesmo os que não têm classe */
select[name="status"],
select[name="categoria"],
select[name="periodo"],
select[name="tipo"],
select[name="metodo_pagamento"],
select[name="status_pedido"],
select[name="status_cliente"] {
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e") !important;
    background-position: right 1rem center !important;
    background-repeat: no-repeat !important;
    background-size: 1.5em 1.5em !important;
    padding-right: 3rem !important;
    cursor: pointer !important;
    width: 100% !important;
    padding: 1rem 1.25rem !important;
    border: 2px solid #e1e8ed !important;
    border-radius: 12px !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

select[name="status"]:focus,
select[name="categoria"]:focus,
select[name="periodo"]:focus,
select[name="tipo"]:focus,
select[name="metodo_pagamento"]:focus,
select[name="status_pedido"]:focus,
select[name="status_cliente"]:focus {
    outline: none !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.15), 0 4px 20px rgba(255, 215, 0, 0.1) !important;
    transform: translateY(-1px) !important;
    background: #ffffff !important;
}

/* Campos de input também */
input[name="busca"],
input[type="search"],
input[placeholder*="Nome"],
input[placeholder*="email"],
input[placeholder*="CPF"] {
    width: 100% !important;
    padding: 1rem 1.25rem !important;
    border: 2px solid #e1e8ed !important;
    border-radius: 12px !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

input[name="busca"]:focus,
input[type="search"]:focus,
input[placeholder*="Nome"]:focus,
input[placeholder*="email"]:focus,
input[placeholder*="CPF"]:focus {
    outline: none !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.15), 0 4px 20px rgba(255, 215, 0, 0.1) !important;
    transform: translateY(-1px) !important;
    background: #ffffff !important;
}

/* ===== BOTÃO FLUTUANTE VER SITE ===== */
.floating-site-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.floating-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #17a2b8 0%, #20c997 100%);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 8px 32px rgba(23, 162, 184, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.floating-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.floating-btn:hover {
    background: linear-gradient(135deg, #20c997 0%, #17a2b8 100%);
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 12px 40px rgba(23, 162, 184, 0.5);
}

.floating-btn:hover::before {
    left: 100%;
}

.floating-btn i {
    font-size: 1.5rem;
    z-index: 2;
    position: relative;
}

.floating-tooltip {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.floating-tooltip::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: rgba(0, 0, 0, 0.8);
}

.floating-btn:hover .floating-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Animação de pulso para o botão flutuante */
@keyframes floatingPulse {
    0%, 100% { 
        box-shadow: 0 8px 32px rgba(23, 162, 184, 0.3);
    }
    50% { 
        box-shadow: 0 8px 40px rgba(23, 162, 184, 0.6);
    }
}

.floating-btn {
    animation: floatingPulse 3s infinite;
}

/* Responsividade para o botão flutuante */
@media (max-width: 768px) {
    .floating-site-btn {
        bottom: 20px;
        right: 20px;
    }
    
    .floating-btn {
        width: 50px;
        height: 50px;
    }
    
    .floating-btn i {
        font-size: 1.25rem;
    }
    
    .floating-tooltip {
        display: none;
    }
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* ===== UTILITÁRIOS ===== */
.text-muted {
    color: #999;
    font-style: italic;
}

.text-center {
    text-align: center;
}

.text-warning {
    color: #ffc107;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

.hidden {
    display: none !important;
}

/* ===== GESTÃO DE CUPONS ===== */
.coupon-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.coupon-info small {
    color: #666;
    font-size: 12px;
}

.discount-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.discount-value {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.discount-info small {
    color: #666;
    font-size: 12px;
}

.usage-info {
    display: flex;
    align-items: center;
    gap: 2px;
}

.usage-count {
    font-weight: 600;
    color: #333;
}

.usage-info small {
    color: #666;
    font-size: 12px;
}

.date-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
}

.status-expirado {
    background: #f8d7da;
    color: #721c24;
}

.status-futuro {
    background: #fff3cd;
    color: #856404;
}

.status-esgotado {
    background: #d1ecf1;
    color: #0c5460;
}

/* ===== BOTÕES ADICIONAIS ===== */
.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

@keyframes modalSlideIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
