<style>
/* ========================================
   ESTILOS RESPONSIVOS GLOBAIS - MontaLoja
   ======================================== */

/* ============ VARIÁVEIS ============ */
:root {
    --mobile-breakpoint: 480px;
    --tablet-breakpoint: 768px;
    --desktop-breakpoint: 1024px;
    --wide-breakpoint: 1200px;
}

/* ============ RESET RESPONSIVO ============ */
* {
    box-sizing: border-box;
}

img, video {
    max-width: 100%;
    height: auto;
}

/* ============ PAGE HEADER ============ */
.page-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

@media (max-width: 480px) {
    .page-header-flex {
        flex-direction: column;
        align-items: stretch;
    }
    
    .page-header-flex .btn {
        width: 100%;
        justify-content: center;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
}

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

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.5rem !important;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
}

/* ============ CARDS GRID ============ */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

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

/* ============ DATA TABLE ============ */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -1rem;
    padding: 0 1rem;
}

.data-table {
    width: 100%;
    min-width: 600px;
}

.data-table th,
.data-table td {
    white-space: nowrap;
    padding: 0.75rem 1rem;
}

@media (max-width: 768px) {
    .data-table th,
    .data-table td {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
}

/* ============ MOBILE CARDS (Alternativa à Tabela) ============ */
.mobile-cards {
    display: none;
}

.desktop-table {

@media (min-width: 1025px) {
    .mobile-cards {
        display: none !important;
    }
}
    display: block;
}

    
    .mobile-cards {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 400px) {
    .mobile-cards {
        grid-template-columns: 1fr;
    }
}

/* Card Item Mobile */
.mobile-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.2s ease;
}

.mobile-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

.mobile-card-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.mobile-card-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mobile-card-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.mobile-card-info-item {
    text-align: center;
}

.mobile-card-info-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.mobile-card-info-value {
    font-weight: 600;
    font-size: 0.95rem;
}

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

.mobile-card-actions .btn {
    flex: 1;
    min-width: 80px;
    justify-content: center;
}

/* ============ FILTER BAR ============ */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

@media (max-width: 600px) {
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-bar select,
    .filter-bar input {
        width: 100% !important;
        min-width: unset !important;
    }
    
    .filter-bar label {
        margin-bottom: 0.25rem;
    }
    
    .filter-bar .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============ MODAL RESPONSIVO ============ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
}

.modal-content {
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1.5rem;
    margin: auto;
}

@media (max-width: 600px) {
    .modal-overlay {
        padding: 0.5rem;
    }
    
    .modal-content {
        padding: 1.25rem;
        border-radius: 12px;
        max-height: 95vh;
    }
    
    .modal-content h2 {
        font-size: 1.1rem;
    }
}

/* ============ FORM GRIDS ============ */
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

@media (max-width: 600px) {
    .form-grid-2,
    .form-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* ============ BUTTONS ============ */
.btn-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

@media (max-width: 480px) {
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        width: 100%;
        justify-content: center;
    }
}

.actions-cell {
    display: flex;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

@media (max-width: 480px) {
    .actions-cell .btn-sm {
        padding: 0.4rem;
    }
}

/* ============ EMPTY STATE ============ */
.empty-state {
    padding: 3rem 1.5rem;
    text-align: center;
}

@media (max-width: 480px) {
    .empty-state {
        padding: 2rem 1rem;
    }
    
    .empty-state iconify-icon {
        font-size: 3rem !important;
    }
    
    .empty-state h3 {
        font-size: 1.1rem;
    }
    
    .empty-state p {
        font-size: 0.9rem;
    }
}

/* ============ BADGES ============ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

/* ============ TABS ============ */
.tabs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.tab {
    padding: 0.75rem 1.25rem;
    border-radius: 8px 8px 0 0;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}

@media (max-width: 480px) {
    .tab {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* ============ CALENDAR / AGENDA ============ */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .calendar-grid {
        gap: 0.25rem;
    }
    
    .calendar-day {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .calendar-grid {
        grid-template-columns: repeat(7, 1fr);
        gap: 2px;
    }
    
    .calendar-day {
        padding: 0.35rem;
        font-size: 0.75rem;
    }
    
    .calendar-day-name {
        font-size: 0.65rem;
    }
}

/* ============ TIMELINE ============ */
.timeline {
    position: relative;
}

.timeline-slot {
    display: flex;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

@media (max-width: 600px) {
    .timeline-slot {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .timeline-time {
        font-size: 0.9rem;
    }
}

/* ============ HIDE/SHOW UTILITIES ============ */
.hide-mobile {
    display: block;
}

.show-mobile {
    display: none;
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
    
    .show-mobile {
        display: block !important;
    }
}

.hide-tablet {
    display: block;
}

@media (max-width: 1024px) {
    .hide-tablet {
        display: none !important;
    }
}

/* ============ SPACING UTILITIES ============ */
@media (max-width: 480px) {
    .card {
        padding: 1rem;
        border-radius: 12px;
    }
    
    .main-content {
        padding: 1rem;
        padding-top: 4.5rem;
    }
}

/* ============ TYPOGRAPHY RESPONSIVE ============ */
@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
    
    h3 {
        font-size: 1.1rem;
    }
}

/* ============ COLORS UTILITIES ============ */
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-warning { color: var(--warning); }
.text-primary { color: var(--primary); }
.text-muted { color: var(--text-muted); }

.bg-success { background-color: rgba(34, 197, 94, 0.1); }
.bg-error { background-color: rgba(239, 68, 68, 0.1); }
.bg-warning { background-color: rgba(245, 158, 11, 0.1); }
.bg-primary { background-color: rgba(var(--primary-rgb), 0.1); }
</style>
