:root {
    --primary-50: #E3F2FD;
    --primary-100: #BBDEFB;
    --primary-200: #90CAF9;
    --primary-300: #64B5F6;
    --primary-400: #42A5F5;
    --primary-500: #2196F3;
    --primary-600: #1E88E5;
    --primary-700: #1976D2;
    --primary-800: #1565C0;
    --primary-900: #0D47A1;
    
    --accent-100: #FFECB3;
    --accent-200: #FFE082;
    --accent-400: #FFCA28;
    --accent-700: #FFA000;
    
    --success-400: #66BB6A;
    --success-700: #388E3C;
    
    --danger-400: #EF5350;
    --danger-700: #D32F2F;
    
    --warning-400: #FFA726;
    --warning-700: #F57C00;
    
    --gray-50: #FAFAFA;
    --gray-100: #F5F5F5;
    --gray-200: #EEEEEE;
    --gray-300: #E0E0E0;
    --gray-400: #BDBDBD;
    --gray-500: #9E9E9E;
    --gray-600: #757575;
    --gray-700: #616161;
    --gray-800: #424242;
    --gray-900: #656d78;
    
    --text-primary: var(--gray-900);
    --text-secondary: var(--gray-600);
    --text-disabled: var(--gray-400);
    
    --divider: rgba(0, 0, 0, 0.12);
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.1);
    
    --elevation-1: 0 1px 3px rgba(0,0,0,0.12);
    --elevation-2: 0 4px 6px rgba(0,0,0,0.1);
    --elevation-3: 0 10px 15px rgba(0,0,0,0.1);
    
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    --border-radius-full: 9999px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    
    --sidebar-width: 280px;
    --header-height: 64px;
    --bottom-nav-height: 60px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
      font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
            background: var(--primary-50) url('assets/images/optic-background.jpg') no-repeat center center fixed;
            background-size: cover;
            color: var(--text-primary);
            -webkit-font-smoothing: antialiased;
            position: relative;
    padding-bottom: var(--bottom-nav-height);
}

/* Layout Structure */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar - Modernizado com gradiente */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(135deg, var(--primary-800), var(--primary-600));
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    transform: translateX(-100%);
    transition: var(--transition);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    height: var(--header-height);
    position: relative;
    overflow: hidden;
}

.sidebar-header::before {
    content: "";
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background-color: white;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-600);
    font-weight: bold;
    font-size: 18px;
    box-shadow: var(--shadow-sm);
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: white;
}

.sidebar-menu {
    padding: 16px;
    list-style: none;
    flex: 1;
}

.menu-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.6);
    padding: 12px 16px;
    margin-top: 8px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    color: rgba(255,255,255,0.9);
    transition: var(--transition-fast);
    margin-bottom: 4px;
}

.menu-item.active {
    background-color: rgba(255,255,255,0.1);
    color: white;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.menu-item:hover:not(.active) {
    background-color: rgba(255,255,255,0.05);
    transform: translateX(4px);
}

.menu-item i {
    width: 24px;
    margin-right: 12px;
    font-size: 18px;
    text-align: center;
    color: rgba(255,255,255,0.8);
}

.menu-item.active i {
    color: white;
}

.menu-item .badge {
    margin-left: auto;
    background-color: var(--accent-400);
    color: var(--gray-900);
    font-size: 10px;
    padding: 2px 6px;
    border-radius: var(--border-radius-full);
    font-weight: 600;
}

.sidebar-footer {
    padding: 16px;
    text-align: center;
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 0;
    transition: var(--transition);
}

/* Header - Modernizado com sombra e efeito de vidro */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 900;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.header-left {
    display: flex;
    align-items: center;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-primary);
    margin-right: 16px;
    cursor: pointer;
    padding: 8px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.menu-toggle:hover {
    background-color: var(--gray-100);
}

.page-title {
    font-size: 18px;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-btn {
    position: relative;
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.notification-btn:hover {
    background-color: var(--gray-100);
}

.notification-btn i {
    font-size: 20px;
    color: var(--text-secondary);
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background-color: var(--danger-400);
    color: white;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border: 2px solid white;
}

.profile-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary-500);
    cursor: pointer;
    transition: var(--transition-fast);
}

.profile-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
}

.profile-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Content */
.content {
    padding: 20px;
    margin-top: var(--header-height);
}

/* Welcome Banner - Modernizado com gradiente */
.welcome-banner {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
    color: white;
    border-radius: var(--border-radius-lg);
    padding: 16px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.welcome-banner::before {
    content: "";
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.welcome-banner::after {
    content: "";
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 250px;
    height: 250px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.welcome-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.welcome-text {
    font-size: 14px;
    opacity: 0.9;
    position: relative;
    z-index: 1;
    max-width: 80%;
}

/* Stats Grid - Cards modernizados */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background-color: white;
    border-radius: var(--border-radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-200);
}

.stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--primary-500);
}

.stat-card.primary::before {
    background-color: var(--primary-500);
}

.stat-card.success::before {
    background-color: var(--success-400);
}

.stat-card.warning::before {
    background-color: var(--warning-400);
}

.stat-card.danger::before {
    background-color: var(--danger-400);
}

.stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    box-shadow: var(--shadow-sm);
}

.stat-icon.primary {
    background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
}

.stat-icon.success {
    background: linear-gradient(135deg, var(--success-400), var(--success-700));
}

.stat-icon.warning {
    background: linear-gradient(135deg, var(--warning-400), var(--warning-700));
}

.stat-icon.danger {
    background: linear-gradient(135deg, var(--danger-400), var(--danger-700));
}

.stat-title {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    margin: 8px 0 4px;
    color: var(--text-primary);
}

.stat-change {
    font-size: 12px;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.stat-change.positive {
    color: var(--success-700);
}

.stat-change.negative {
    color: var(--danger-700);
}

/* Cards modernizados */
.card {
    background-color: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    overflow: hidden;
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 10px 16px;
    border-bottom: 1px solid var(--divider);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--gray-50);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title i {
    color: var(--primary-500);
}

.card-link {
    font-size: 12px;
    color: var(--primary-600);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition-fast);
}

.card-link:hover {
    color: var(--primary-800);
}

.card-link i {
    font-size: 10px;
}

.card-body {
    padding: 0;
}

 /* Tables modernizadas */
 @media (max-width: 767px) {
.table-responsive {
width: 100%;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
display: block;
}
}

.table {
    width: 100%;
    min-width: 600px; 
    border-collapse: collapse;
}

.table th, .table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid var(--divider);
    font-size: 13px;
}

.actions {
display: flex;
gap: 4px;
}

.table th {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    background-color: var(--gray-50);
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover td {
    background-color: var(--gray-50);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-avatar .initials {
    font-weight: 600;
    color: var(--primary-600);
}

.user-name {
    font-weight: 500;
}

.user-email {
    font-size: 12px;
    color: var(--text-secondary);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--border-radius-full);
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
}

.badge i {
    font-size: 10px;
    margin-right: 4px;
}

.badge-primary {
    background-color: var(--primary-50);
    color: var(--primary-700);
}

.badge-success {
    background-color: rgba(102, 187, 106, 0.1);
    color: var(--success-700);
}

.badge-warning {
    background-color: rgba(255, 167, 38, 0.1);
    color: var(--warning-700);
}

.badge-danger {
    background-color: rgba(239, 83, 80, 0.1);
    color: var(--danger-700);
}

/* Activity List modernizada */
.activity-list {
    padding: 8px 0;
}

.activity-item {
    display: flex;
    padding: 16px;
    gap: 16px;
    transition: var(--transition-fast);
    border-bottom: 1px solid var(--divider);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item:hover {
    background-color: var(--gray-50);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    font-size: 16px;
    box-shadow: var(--shadow-sm);
}

.activity-icon.primary {
    background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
}

.activity-icon.success {
    background: linear-gradient(135deg, var(--success-400), var(--success-700));
}

.activity-icon.warning {
    background: linear-gradient(135deg, var(--warning-400), var(--warning-700));
}

.activity-icon.danger {
    background: linear-gradient(135deg, var(--danger-400), var(--danger-700));
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-text {
    font-size: 14px;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-meta {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: var(--text-secondary);
    flex-wrap: wrap;
    gap: 8px;
}

.activity-user {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
    color: var(--text-primary);
}

.activity-time {
    margin-left: auto;
    white-space: nowrap;
}

/* Two Columns Layout */
.two-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

/* Empty State */
.empty-state {
    padding: 40px 20px;
    text-align: center;
}

.empty-icon {
    font-size: 48px;
    color: var(--gray-300);
    margin-bottom: 16px;
}

.empty-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-text {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 14px;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background-color: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    display: flex;
    z-index: 900;
    padding: 0 8px;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 10px;
    transition: var(--transition-fast);
    border-radius: var(--border-radius-sm);
    margin: 0 4px;
    padding: 6px 0;
}

.nav-item.active {
    color: var(--primary-600);
    background-color: var(--primary-50);
    transform: translateY(-6px);
}
.nav-item.active .nav-icon {
    transform: translateY(-4px);
}

.nav-icon {
    font-size: 20px;
    margin-bottom: 4px;
    transition: var(--transition-fast);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-text {
    font-weight: 500;
}
/* Form Styles */
.form-group {
    margin-bottom: 16px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 16px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 16px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    transition: var(--transition-fast);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%239E9E9E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 36px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    border: none;
    text-decoration: none;
    gap: 8px;
}

.btn i {
    font-size: 16px;
}

.btn-primary {
    background-color: var(--primary-500);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-600);
    box-shadow: var(--shadow-sm);
}

.btn-secondary {
    background-color: var(--gray-200);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: var(--gray-300);
    box-shadow: var(--shadow-sm);
}

.btn-danger {
    background-color: var(--danger-400);
    color: white;
}

.btn-danger:hover {
    background-color: var(--danger-500);
    box-shadow: var(--shadow-sm);
}

.btn-sm {
    padding: 6px 8px;
    font-size: 12px;
}

.btn-sm i {
    font-size: 14px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

       /* Alert Messages */
       .alert {
    padding: 10px 12px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background-color: rgba(102, 187, 106, 0.1);
    color: var(--success-700);
    border-left: 4px solid var(--success-400);
}

.alert-danger {
    background-color: rgba(239, 83, 80, 0.1);
    color: var(--danger-700);
    border-left: 4px solid var(--danger-400);
}

.alert i {
    font-size: 20px;
}

/* Search bar - Flutter style */
.search-bar {
    padding: 16px;
    background-color: white;
    border-bottom: 1px solid var(--divider);
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 12px 16px 12px 48px;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--divider);
    font-size: 16px;
    transition: var(--transition-fast);
    background-color: var(--gray-50);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-500);
    background-color: white;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

.search-icon {
    margin-right: 15px; /* Ou qualquer valor desejado */
    position: absolute;
    left: 16px;
    color: var(--text-secondary);
}

/* Filter chips */
.filter-chips {
    display: grid;
    gap: 8px;
    padding: 0 12px 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.filter-chip {
    padding: 7px 7px;
    border-radius: var(--border-radius-full);
    background-color: var(--gray-100);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition-fast);
    border: none;
}

.filter-chip.active {
    background-color: var(--primary-500);
    color: white;
}


/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000; /* Valor muito alto para garantir que fique acima de tudo */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    z-index: 2001; /* Acima do overlay */
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--divider);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.modal-close:hover {
    background-color: var(--gray-100);
}

.modal-body {
    padding: 20px;
}

/* Responsive Adjustments */
@media (min-width: 768px) {
    .sidebar {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: var(--sidebar-width);
    }
    
    .menu-toggle {
        display: none;
    }
    
    .two-columns {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1024px) {
    .content {
        padding: 24px;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

.slide-in {
    animation: slideIn 0.4s ease-out forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* Utility Classes */
.text-primary { color: var(--primary-500); }
.text-success { color: var(--success-400); }
.text-warning { color: var(--warning-400); }
.text-danger { color: var(--danger-400); }
.text-muted { color: var(--text-secondary); }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; }

.far {
    font-weight: 400 !important;
}

.fab {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + 20px);
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--primary-500);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    z-index: 100;
    border: none;
    transition: var(--transition);
}

.fab:hover {
    background-color: var(--primary-600);
    box-shadow: var(--shadow-xl);
    transform: translateY(-3px) scale(1.05);
}

.fab:active {
    transform: translateY(0) scale(1);
}


@media (max-width: 768px) {
    .modal {
        align-items: flex-end;
    }
    
    .modal-content {
        border-radius: 16px 16px 0 0;
        width: 100%;
        max-height: 80vh;
        animation: slideUp 0.3s ease;
    }
    
    @keyframes slideUp {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }
    
    .modal-close {
        position: absolute;
        top: 16px;
        right: 16px;
    }
    
    .form-actions {
        position: sticky;
        bottom: 0;
        background: white;
        padding: 12px;
        border-top: 1px solid var(--divider);
    }
}

/* Adicione isso ao final do seu arquivo CSS */

/* Ajustes gerais para mobile */
@media (max-width: 767px) {
  body {
    padding-bottom: var(--bottom-nav-height);
    -webkit-text-size-adjust: 100%;
  }
  
  .content {
    padding: 16px 12px;
    margin-top: var(--header-height);
  }
  
  /* Header mais compacto */
  .header {
    height: 56px;
    padding: 0 12px;
  }
  
  .menu-toggle {
    margin-right: 8px;
    width: 36px;
    height: 36px;
  }
  
  .page-title {
    font-size: 16px;
  }
  
  /* Cards em mobile */
  .card {
    border-radius: var(--border-radius-md);
    margin-bottom: 16px;
  }
  
  .card-header {
    padding: 12px;
  }
  
  .card-title {
    font-size: 15px;
  }
  
  /* Stats Grid em mobile */
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  
  .stat-card {
    padding: 16px 12px;
  }
  
  .stat-icon {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
  
  .stat-value {
    font-size: 22px;
  }
  
  /* Welcome Banner mais compacto */
  .welcome-banner {
    padding: 14px;
    margin-bottom: 16px;
  }
  
  .welcome-title {
    font-size: 18px;
  }
  
  .welcome-text {
    font-size: 13px;
    max-width: 90%;
  }
  
  /* Modal fullscreen em mobile */
  .modal {
    align-items: flex-end;
  }
  
  .modal-content {
    width: 100%;
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    max-height: 90vh;
    animation: modalSlideUp 0.3s ease;
  }
  
  @keyframes modalSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
  
  .modal-header {
    padding: 14px 16px;
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
  }
  
  .modal-body {
    padding: 16px;
  }
  
  /* Formulários em mobile */
  .form-group {
    margin-bottom: 14px;
  }
  
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="date"],
  input[type="number"],
  select,
  textarea {
    padding: 10px 12px;
    font-size: 15px;
  }
  
  /* Botões maiores para toque fácil */
  .btn {
    padding: 12px 16px;
    font-size: 15px;
  }
  
  /* Tabelas com rolagem horizontal suave */
  .table-responsive {
    -webkit-overflow-scrolling: touch;
    margin-left: -12px;
    margin-right: -12px;
    width: calc(100% + 24px);
  }
  
  .table {
    min-width: 600px;
    padding-left: 12px;
    padding-right: 12px;
  }
  
  /* Ajustes na navegação inferior */
  .bottom-nav {
    height: 60px;
    padding: 0 4px;
  }
  
  .nav-item {
    font-size: 9px;
    padding: 4px 0;
    margin: 0 2px;
  }
  
  .nav-icon {
    font-size: 18px;
    width: 20px;
    height: 20px;
  }
  
  /* FAB position ajustado */
  .fab {
    bottom: calc(var(--bottom-nav-height) + 16px);
    right: 16px;
    width: 52px;
    height: 52px;
  }
  
  /* Ajustes de animação para performance */
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Melhorias adicionais para telas muito pequenas */
@media (max-width: 374px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .welcome-text {
    max-width: 100%;
  }
  
  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .card-link {
    margin-top: 4px;
  }
}

/* Ajustes para quando o teclado está aberto em mobile */
@media (max-height: 500px) {
  .modal-content {
    max-height: 70vh;
  }
  
  .modal-body {
    padding-bottom: 60px; /* Espaço para o teclado */
  }
}

/* Melhorias de toque para elementos interativos */
button, a, input, select, textarea, label {
  touch-action: manipulation;
}

/* Remove highlight no toque para iOS */
input, textarea, button, select, a {
  -webkit-tap-highlight-color: rgba(0,0,0,0);
}

/* Previne zoom em inputs no iOS */
@media screen and (-webkit-min-device-pixel-ratio:0) {
  select:focus,
  textarea:focus,
  input:focus {
    font-size: 16px;
  }
}