/* =====================================
   NEXO GESTOR - Modern Design System
   ===================================== */

/* CSS Variables */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary-color: #10b981;
    --secondary-dark: #059669;
    --danger-color: #ef4444;
    --danger-dark: #dc2626;
    --warning-color: #f59e0b;
    --warning-dark: #d97706;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --transition: all 0.3s ease;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    max-width: 100vw;
}


/* Navigation - Modern Sidebar/Top Design */
.nav-list {
    list-style: none;
    display: flex;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    padding: 0;
    margin: 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
    flex-wrap: wrap;
}

.nav-item {
    margin: 0;
}

.nav-item a,
.nav-item button {
    color: var(--white);
    text-decoration: none;
    padding: 1rem 1.5rem;
    display: block;
    font-weight: 500;
    font-size: 0.875rem;
    text-transform: capitalize;
    transition: var(--transition);
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
}

.nav-item a:hover,
.nav-item button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.nav-item a.active {
    background-color: rgba(255, 255, 255, 0.15);
    border-bottom: 3px solid var(--secondary-color);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Page Headers */
h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-700);
}

/* Cards - Modern Design */
.card {
    background-color: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    transition: var(--transition);
    border: 1px solid var(--gray-200);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card h2, .card h3 {
    margin-bottom: 1rem;
    color: var(--gray-800);
}

.card p {
    color: var(--gray-600);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.card a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    display: inline-block;
    margin-top: 0.5rem;
}

.card a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Buttons - Comprehensive System */
button, .btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

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

.btn-primary, button:not([class]) {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover, button:not([class]):hover {
    background-color: var(--primary-dark);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: var(--secondary-dark);
    box-shadow: var(--shadow-md);
}

.btn-danger {
    background-color: var(--danger-color);
    color: var(--white);
}

.btn-danger:hover {
    background-color: var(--danger-dark);
    box-shadow: var(--shadow-md);
}

.btn-warning {
    background-color: var(--warning-color);
    color: var(--gray-900);
}

.btn-warning:hover {
    background-color: var(--warning-dark);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

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

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

/* Forms - Modern Input Design */
input, select, textarea {
    width: 100%;
    padding: 0.75rem;
    font-size: 0.9375rem;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius);
    font-family: inherit;
    transition: var(--transition);
    background-color: var(--white);
    color: var(--gray-900);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 1.5rem;
}

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

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

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

/* Dashboard Specific */
.dashboard {
    padding: 2rem;
    background-color: var(--gray-50);
}

.dashboard h1 {
    margin-bottom: 2rem;
    font-size: 2.25rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.stat-card {
    background: linear-gradient(135deg, var(--white) 0%, var(--gray-50) 100%);
    border-left: 4px solid var(--primary-color);
}

.stat-card h3 {
    font-size: 0.875rem;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

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


/* Tables - Modern Design */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background-color: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow);
}

thead {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8125rem;
    letter-spacing: 0.5px;
}

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

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background-color: var(--gray-50);
}

/* Modals - Modern Overlay */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: var(--white);
    margin: 3% auto;
    padding: 2rem;
    border: none;
    width: 90%;
    max-width: 600px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close, .close-print {
    color: var(--gray-400);
    float: right;
    font-size: 1.75rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    background: none;
    border: none;
    padding: 0;
    width: auto;
}

.close:hover, .close-print:hover {
    color: var(--gray-700);
}

.modal h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--gray-900);
    font-size: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gray-200);
}

/* Agenda Styles */
.agenda {
    padding: 2rem;
}

.event {
    background-color: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border-left: 4px solid var(--primary-color);
}

.event:hover {
    box-shadow: var(--shadow-lg);
    transform: translateX(4px);
}

.event h3 {
    margin-bottom: 0.5rem;
    color: var(--gray-900);
}

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

.observation {
    background-color: var(--gray-50);
    padding: 1rem;
    margin: 0.75rem 0;
    border-radius: var(--radius);
    border-left: 4px solid var(--primary-color);
    position: relative;
}

.observation p {
    margin: 0 0 0.5rem 0;
    color: var(--gray-700);
}

.observation small {
    color: var(--gray-500);
    font-size: 0.75rem;
}

/* Members Page */
.membros {
    padding: 2rem;
}

.membros h1 {
    margin-bottom: 2rem;
    font-size: 2rem;
    color: var(--gray-900);
}

.actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    align-items: center;
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
}

.actions input[type="text"], 
.actions select {
    flex: 1;
    min-width: 200px;
}

#membersTable img {
    border-radius: 50%;
    object-fit: cover;
    width: 40px;
    height: 40px;
    border: 2px solid var(--white);
    box-shadow: var(--shadow-sm);
}

/* Projects */
.projetos {
    padding: 2rem;
}

.project {
    background-color: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--secondary-color);
    transition: var(--transition);
}

.project:hover {
    box-shadow: var(--shadow-lg);
    transform: translateX(4px);
}

/* Drive */
.drive {
    padding: 2rem;
}

.folder {
    background: linear-gradient(135deg, var(--white) 0%, var(--gray-100) 100%);
    padding: 2rem;
    margin: 0;
    cursor: pointer;
    border-radius: var(--radius-md);
    border: 2px solid var(--gray-300);
    transition: var(--transition);
    box-shadow: var(--shadow);
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.folder::before {
    content: '📁';
    position: absolute;
    font-size: 3rem;
    opacity: 0.1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.folder:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.folder:hover h3 {
    color: var(--white);
}

.folder h3 {
    margin: 0;
    color: var(--gray-900);
    font-size: 1.125rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.upload-area {
    border: 2px dashed var(--gray-300);
    padding: 3rem;
    text-align: center;
    margin: 2rem 0;
    border-radius: var(--radius-md);
    transition: var(--transition);
    background-color: var(--gray-50);
}

.upload-area.dragover {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
    background-image: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(37, 99, 235, 0.1) 100%);
}

.upload-area p {
    margin: 0 0 1rem 0;
    color: var(--gray-600);
}

/* Login Page */
.login {
    max-width: 420px;
    margin: 4rem auto;
    padding: 2.5rem;
    background-color: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

.login h1 {
    text-align: center;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login input {
    margin-bottom: 1rem;
}

.login button {
    width: 100%;
    padding: 0.875rem;
    font-size: 1rem;
    margin-top: 0.5rem;
}

.login p {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--gray-600);
}

.login a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.login a:hover {
    text-decoration: underline;
}

/* Dashboards Selection */
.dashboards {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard-item {
    background-color: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: var(--transition);
    border-left: 4px solid var(--secondary-color);
}

.dashboard-item h3 {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.dashboard-item p {
    color: var(--gray-600);
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.dashboard-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateX(4px);
}

/* Filters */
.filters {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
}

.filters h2 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.filters label {
    display: inline-block;
    margin-right: 1rem;
    font-size: 0.875rem;
}

.filters input, .filters select {
    padding: 0.5rem;
    margin-right: 1rem;
    width: auto;
    display: inline-block;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--gray-800) 0%, var(--gray-900) 100%);
    color: var(--white);
    margin-top: 4rem;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* =====================================
   RESPONSIVE DESIGN - Mobile First
   ===================================== */

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: var(--white);
    font-size: 1.5rem;
    padding: 0.75rem;
    cursor: pointer;
    position: fixed;
    right: 1rem;
    top: 1rem;
    z-index: 1001;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

.mobile-menu-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background-color: var(--white);
    margin: 6px 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.mobile-menu-toggle.active {
    background: rgba(255, 255, 255, 0.25);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.3));
    backdrop-filter: blur(5px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Nav icon and text styles */
.nav-icon {
    font-size: 1.2rem;
    margin-right: 0.5rem;
    display: inline-block;
}

.nav-text {
    display: inline-block;
}

/* Smartphones (320px - 480px) */
@media (max-width: 480px) {
    /* Navigation Mobile */
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-list {
        flex-direction: column;
        position: fixed;
        top: 0;
        left: -100%;
        width: 75%;
        max-width: 300px;
        height: 100vh;
        padding-top: 5rem;
        transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        overflow-y: auto;
        overflow-x: hidden;
        z-index: 1000;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    }
    
    .nav-list.active {
        left: 0;
        box-shadow: 8px 0 40px rgba(0, 0, 0, 0.5);
    }
    
    .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-item {
        opacity: 0;
        transform: translateX(-20px);
        transition: all 0.3s ease;
    }

    .nav-list.active .nav-item {
        opacity: 1;
        transform: translateX(0);
    }

    .nav-list.active .nav-item:nth-child(1) { transition-delay: 0.05s; }
    .nav-list.active .nav-item:nth-child(2) { transition-delay: 0.1s; }
    .nav-list.active .nav-item:nth-child(3) { transition-delay: 0.15s; }
    .nav-list.active .nav-item:nth-child(4) { transition-delay: 0.2s; }
    .nav-list.active .nav-item:nth-child(5) { transition-delay: 0.25s; }
    .nav-list.active .nav-item:nth-child(6) { transition-delay: 0.3s; }
    .nav-list.active .nav-item:nth-child(7) { transition-delay: 0.35s; }
    .nav-list.active .nav-item:nth-child(8) { transition-delay: 0.4s; }
    .nav-list.active .nav-item:nth-child(9) { transition-delay: 0.45s; }
    .nav-list.active .nav-item:nth-child(10) { transition-delay: 0.5s; }

    .nav-item a,
    .nav-item button {
        padding: 1.25rem 1.5rem;
        width: 100%;
        text-align: left;
        display: flex;
        align-items: center;
        gap: 0.75rem;
        font-size: 1rem;
        position: relative;
        overflow: hidden;
    }

    .nav-item a::before,
    .nav-item button::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        height: 100%;
        width: 4px;
        background: var(--white);
        transform: scaleY(0);
        transition: transform 0.3s ease;
    }

    .nav-item a:hover::before,
    .nav-item button:hover::before,
    .nav-item a:active::before,
    .nav-item button:active::before {
        transform: scaleY(1);
    }

    .nav-item a:active,
    .nav-item button:active {
        background-color: rgba(255, 255, 255, 0.2);
        transform: scale(0.98);
    }
    
    /* Esconder texto em telas muito pequenas */
    .nav-text {
        display: inline-block;
    }
    
    .nav-icon {
        font-size: 1.3rem;
        margin-right: 0;
    }
    
    /* Container Mobile */
    .container {
        padding: 1rem;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* Divs genéricas */
    div {
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* Typography Mobile */
    h1 {
        font-size: 1.5rem;
        word-wrap: break-word;
    }
    
    h2 {
        font-size: 1.25rem;
        word-wrap: break-word;
    }
    
    h3 {
        font-size: 1.125rem;
        word-wrap: break-word;
    }
    
    p {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Cards Mobile */
    .card {
        padding: 1rem;
        max-width: 100%;
        overflow: hidden;
    }
    
    /* Grid Mobile */
    .grid, .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
        gap: 1rem;
        width: 100%;
    }
    
    /* Widgets Mobile */
    .widgets {
        grid-template-columns: 1fr;
        gap: 1rem;
        width: 100%;
    }
    
    .widget {
        min-height: auto;
        max-width: 100%;
        overflow: hidden;
    }
    
    /* Main content areas */
    main {
        padding: 1rem;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    /* Event, Project, Member cards */
    .event, .project, .member, .folder {
        max-width: 100%;
        overflow: hidden;
        margin-bottom: 1rem;
    }
    
    /* Actions Mobile */
    .actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .actions input,
    .actions select,
    .actions button {
        width: 100%;
        margin: 0;
    }
    
    /* Tables Mobile */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    table thead {
        display: none;
    }
    
    table tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid var(--gray-200);
        border-radius: var(--radius);
        padding: 0.5rem;
    }
    
    table tbody td {
        display: flex;
        justify-content: space-between;
        padding: 0.75rem 0.5rem;
        border-bottom: 1px solid var(--gray-100);
    }
    
    table tbody td:last-child {
        border-bottom: none;
    }
    
    table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--gray-700);
        margin-right: 1rem;
    }
    
    /* Buttons Mobile */
    button, .btn {
        padding: 0.75rem 1rem;
        font-size: 1rem;
        width: 100%;
        justify-content: center;
    }
    
    .btn-sm {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    /* Forms Mobile */
    input, select, textarea {
        font-size: 16px; /* Previne zoom no iOS */
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .form-group {
        margin-bottom: 1rem;
        max-width: 100%;
    }
    
    form {
        max-width: 100%;
        overflow: hidden;
    }
    
    /* Images and media */
    img, video, iframe {
        max-width: 100%;
        height: auto;
        display: block;
    }
    
    /* Modals */
    .modal-content {
        width: 95%;
        max-width: 95vw;
        margin: 1rem auto;
        padding: 1rem;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    /* Login Mobile */
    .login {
        margin: 2rem 1rem;
        padding: 1.5rem;
    }
    
    /* Dashboards Page Mobile */
    .dashboards {
        padding: 1rem;
    }
    
    .dashboards h1 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .dashboards h2 {
        font-size: 1.25rem;
    }
    
    /* Dashboard Items Mobile */
    .dashboard-item {
        padding: 1rem;
        transform: none !important;
    }
    
    .dashboard-item:hover {
        transform: none !important;
    }
    
    .dashboard-item h3 {
        font-size: 1.125rem;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .dashboard-item button {
        width: 100%;
        flex: none !important;
        min-width: auto !important;
    }
    
    /* Filters Mobile */
    .filters {
        padding: 1rem;
    }
    
    .filters label {
        display: block;
        margin: 0.5rem 0;
    }
    
    .filters input,
    .filters select {
        width: 100%;
        margin: 0.5rem 0;
    }
    
    /* Upload Area Mobile */
    .upload-area {
        padding: 2rem 1rem;
    }
    
    /* Folders Mobile */
    .folders {
        grid-template-columns: 1fr;
    }
    
    /* Modal Mobile */
    .modal-content {
        width: 95%;
        margin: 1rem;
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* Tablets (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    /* Navigation Tablet */
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-list {
        flex-direction: column;
        position: fixed;
        top: 0;
        left: -100%;
        width: 50%;
        max-width: 320px;
        height: 100vh;
        padding-top: 4rem;
        transition: left 0.3s ease;
        overflow-y: auto;
        z-index: 1000;
    }
    
    .nav-list.active {
        left: 0;
    }
    
    .nav-item {
        width: 100%;
    }
    
    /* Container Tablet */
    .container {
        padding: 1.5rem;
    }
    
    /* Grid Tablet */
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .widgets {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Tables Tablet */
    table {
        font-size: 0.875rem;
    }
    
    table td, table th {
        padding: 0.75rem 0.5rem;
    }
    
    /* Actions Tablet */
    .actions {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .actions input,
    .actions select {
        flex: 1;
        min-width: 200px;
    }
    
    /* Login Tablet */
    .login {
        margin: 3rem auto;
        max-width: 400px;
    }
    
    /* Modal Tablet */
    .modal-content {
        width: 80%;
        max-width: 600px;
    }
}

/* Tablets Large & Small Desktops (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 960px;
        padding: 1.75rem;
    }
    
    .grid-3, .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .widgets {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .nav-list {
        flex-wrap: wrap;
    }
    
    .nav-item a,
    .nav-item button {
        padding: 0.875rem 1.25rem;
        font-size: 0.8125rem;
    }
}

/* Large Desktops (1025px+) */
@media (min-width: 1025px) {
    .container {
        max-width: 1400px;
    }
    
    .grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Extra Large Screens (1920px+) */
@media (min-width: 1920px) {
    .container {
        max-width: 1600px;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .nav-list {
        flex-direction: row;
        flex-wrap: wrap;
        height: auto;
        max-height: 100vh;
        overflow-y: auto;
    }
    
    .nav-item {
        width: auto;
    }
    
    .login {
        margin: 1rem auto;
        padding: 1.5rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    button, .btn, a {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-item a,
    .nav-item button {
        padding: 1rem 1.5rem;
    }
    
    /* Remove hover effects on touch */
    .card:hover {
        transform: none;
    }
    
    button:hover,
    .btn:hover {
        transform: none;
    }
}

/* Print Styles */
@media print {
    body * {
        visibility: hidden;
    }
    #printSection, #printSection * {
        visibility: visible;
    }
    #printSection {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background: white;
        padding: 20px;
    }
    
    .nav-list, .actions, .modal {
        display: none !important;
    }
}