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

:root {
    --primary: #000000;
    --primary-dark: #1a1a1a;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --light: #f8fafc;
    --dark: #1e293b;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--dark);
}

/* Login Page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    max-width: 450px;
    width: 100%;
    animation: slideDown 0.5s ease;
}

.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.login-logo {
    width: 150px;
    height: auto;
    margin-bottom: 20px;
}

.login-header i {
    font-size: 60px;
    color: var(--primary);
    margin-bottom: 15px;
}

.login-header h1 {
    font-size: 26px;
    color: var(--dark);
    margin-bottom: 8px;
}

.login-header p {
    color: var(--secondary);
    font-size: 14px;
}

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

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
    font-size: 14px;
}

.login-form label i {
    color: var(--primary);
    margin-right: 5px;
}

.login-form input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s ease;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.btn-block {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    margin-top: 10px;
}

/* User Info in Header */
.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--dark);
    font-weight: 600;
}

.user-name i {
    color: var(--primary);
    font-size: 20px;
}

.user-role {
    font-size: 12px;
    color: var(--secondary);
    font-weight: 500;
}

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

/* Header */
.header {
    background: white;
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

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

.header-logo {
    width: 60px;
    height: auto;
}

.header h1 {
    font-size: 24px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0;
}

.header h1 i {
    color: var(--primary);
    font-size: 32px;
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.month-selector {
    padding: 12px 20px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    background: white;
    color: var(--dark);
    transition: all 0.3s ease;
}

.month-selector:hover {
    border-color: var(--primary);
}

.month-selector:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

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

.btn-secondary:hover {
    background: #475569;
    transform: translateY(-2px);
}

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

.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--danger);
    color: white;
    padding: 8px 16px;
    font-size: 14px;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Dashboard */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.summary-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-5px);
}

.card-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}

.income .card-icon {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.expense .card-icon {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.balance .card-icon {
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    color: white;
}

.card-content h3 {
    font-size: 14px;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.card-content .amount {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
}

/* Charts */
.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.chart-box {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
}

.chart-box h3 {
    margin-bottom: 20px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-box h3 i {
    color: var(--primary);
}

/* Content Grid */
.content-grid {
    display: grid;
    gap: 25px;
}

.section {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-header h2 {
    font-size: 22px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header h2 i {
    color: var(--primary);
}

/* Filters */
.filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-input,
.filter-select {
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    flex: 1;
    min-width: 200px;
}

.search-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.data-table thead {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.data-table th {
    padding: 15px;
    text-align: left;
    color: white;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.2s ease;
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

.data-table td {
    padding: 15px;
    font-size: 14px;
}

.data-table td:nth-child(5) {
    font-weight: 700;
    color: var(--danger);
}

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

.btn-edit,
.btn-delete {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.btn-edit {
    background: #3b82f6;
    color: white;
}

.btn-edit:hover {
    background: #2563eb;
}

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

.btn-delete:hover {
    background: #dc2626;
}

/* Category Summary */
.category-summary {
    display: grid;
    gap: 15px;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--light);
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.category-item span:first-child {
    font-weight: 600;
    color: var(--dark);
}

.category-item span:last-child {
    font-weight: 700;
    font-size: 16px;
    color: var(--danger);
}

/* Notes */
.notes-textarea {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    margin-bottom: 15px;
}

.notes-textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    max-width: 600px;
    box-shadow: var(--shadow-lg);
    animation: slideDown 0.3s ease;
}

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

.modal-header {
    padding: 25px 30px;
    border-bottom: 2px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 22px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.close {
    font-size: 28px;
    font-weight: 700;
    color: var(--secondary);
    cursor: pointer;
    transition: color 0.2s ease;
}

.close:hover {
    color: var(--danger);
}

form {
    padding: 30px;
}

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

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
    font-size: 14px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .header {
        padding: 20px;
    }

    .header h1 {
        font-size: 22px;
    }

    .dashboard {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .dashboard .summary-card:last-child {
        grid-column: 1 / -1;
    }

    .charts-container {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .filters {
        flex-direction: column;
    }

    .search-input,
    .filter-select {
        width: 100%;
    }

    .table-container {
        font-size: 12px;
    }

    .data-table th,
    .data-table td {
        padding: 10px;
    }
}

/* Loading State */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.spinner {
    border: 4px solid var(--border);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Receipt Upload */
.receipt-upload-container {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.receipt-upload-container input[type="file"] {
    flex: 1;
}

.receipt-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.receipt-preview-item {
    position: relative;
    border: 2px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--light);
}

.receipt-preview-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.receipt-preview-item .pdf-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    font-size: 40px;
    color: var(--danger);
}

.receipt-preview-item .remove-receipt {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    z-index: 2;
}

.receipt-preview-item .remove-receipt:hover {
    background: #dc2626;
}

.receipt-preview-item .edit-receipt {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    z-index: 2;
    transition: background 0.2s ease;
}

.receipt-preview-item .edit-receipt:hover {
    background: var(--primary-dark);
}

.help-text {
    font-size: 12px;
    color: var(--secondary);
    margin-top: 5px;
}

.attachment-icon {
    cursor: pointer;
    color: var(--primary);
    font-size: 18px;
    transition: color 0.2s ease;
}

.attachment-icon:hover {
    color: var(--primary-dark);
}

.no-attachment {
    color: #cbd5e1;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: white;
    padding: 20px 25px;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 2000;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast i {
    font-size: 24px;
}

.toast.success i {
    color: var(--success);
}

.toast.error i {
    color: var(--danger);
}

/* Settings Modal Styles */
.settings-modal {
    max-width: 900px;
    width: 95%;
}

.settings-content {
    padding: 0;
}

.settings-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    background: var(--light);
    padding: 0;
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: transparent;
    color: var(--secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

.tab-btn.active {
    color: var(--primary);
    background: white;
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
    padding: 30px;
}

.tab-content.active {
    display: block;
}

.param-section {
    background: white;
}

.param-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border);
}

.param-header h3 {
    font-size: 18px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.param-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.param-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--light);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.3s;
}

.param-item:hover {
    background: #f1f5f9;
    border-color: var(--primary);
}

.param-item.editing {
    background: #eff6ff;
    border-color: var(--primary);
}

.param-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--dark);
}

.param-input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid var(--primary);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

.param-input:focus {
    outline: none;
    border-color: var(--primary-dark);
}

.param-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    background: none;
    border: none;
    padding: 6px 10px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-icon.edit {
    color: var(--primary);
}

.btn-icon.edit:hover {
    background: #eff6ff;
}

.btn-icon.delete {
    color: var(--danger);
}

.btn-icon.delete:hover {
    background: #fef2f2;
}

.btn-icon.save {
    color: var(--success);
}

.btn-icon.save:hover {
    background: #f0fdf4;
}

.btn-icon.cancel {
    color: var(--secondary);
}

.btn-icon.cancel:hover {
    background: var(--light);
}

.param-item-new {
    background: #eff6ff;
    border: 2px dashed var(--primary);
}

.empty-params {
    text-align: center;
    padding: 40px 20px;
    color: var(--secondary);
    font-size: 14px;
}

/* User Management Styles */
.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.user-meta {
    display: flex;
    gap: 12px;
    align-items: center;
}

.user-username {
    font-size: 13px;
    color: var(--secondary);
    font-weight: 500;
}

.user-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-admin {
    background: linear-gradient(135deg, #000000, #1a1a1a);
    color: white;
}

.badge-normal {
    background: #f3f4f6;
    color: #6b7280;
}

/* Responsive */
@media (max-width: 768px) {
    .settings-tabs {
        flex-wrap: wrap;
    }

    .tab-btn {
        flex: 1 1 50%;
        font-size: 12px;
        padding: 12px 10px;
    }

    .tab-btn i {
        display: none;
    }

    .param-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .param-actions {
        width: 100%;
        justify-content: flex-end;
    }

    /* Mobile optimizations */
    .login-container {
        padding: 25px;
    }

    .login-logo {
        max-width: 120px;
    }

    /* Header mobile - compacto e horizontal */
    .header {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px 15px;
        align-items: center;
    }

    .header-left {
        flex-direction: row;
        align-items: center;
        gap: 10px;
        flex: 1;
    }

    .header-logo {
        width: 40px;
        min-width: 40px;
    }

    .header h1 {
        font-size: 14px;
        gap: 6px;
    }

    .header h1 i {
        font-size: 18px;
    }

    /* Navegação mobile - botões lado a lado em 2 colunas */
    .header-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .header-actions .btn {
        font-size: 11px;
        padding: 9px 8px;
        justify-content: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* User info compacto */
    .user-info {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-left: auto;
    }

    .user-role {
        display: none;
    }

    /* Dashboard cards - 2 colunas no tablet */
    .dashboard {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        margin-bottom: 20px;
    }

    .dashboard .summary-card:last-child {
        grid-column: 1 / -1;
    }

    .summary-card {
        padding: 15px;
        gap: 12px;
    }

    .card-icon {
        width: 50px;
        height: 50px;
        font-size: 22px;
        min-width: 50px;
    }

    .card-content h3 {
        font-size: 11px;
        letter-spacing: 0.5px;
    }

    .card-content .amount {
        font-size: 20px;
    }

    /* Gráficos */
    .charts-container {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 20px;
    }

    .chart-box {
        padding: 15px;
    }

    /* Seções */
    .section {
        padding: 15px;
    }

    .section-header {
        margin-bottom: 15px;
        gap: 10px;
    }

    .section-header h2 {
        font-size: 16px;
    }

    .section-header .btn {
        font-size: 12px;
        padding: 8px 12px;
    }

    /* Modais */
    .modal-content {
        max-width: 95%;
        margin: 10px auto;
    }

    .modal-header {
        padding: 15px 20px;
    }

    .modal-header h2 {
        font-size: 16px;
    }

    form {
        padding: 15px 20px;
    }

    /* Tabelas - scroll horizontal */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .data-table {
        min-width: 650px;
    }

    .data-table th,
    .data-table td {
        padding: 10px 8px;
        font-size: 12px;
    }

    .btn {
        padding: 10px 15px;
        font-size: 13px;
    }

    .btn-block {
        width: 100%;
    }

    /* Filtros */
    .filters {
        gap: 8px;
    }

    .search-input,
    .filter-select {
        min-width: unset;
        width: 100%;
    }
}

@media (max-width: 480px) {
    body {
        padding: 8px;
    }

    /* Login */
    .login-container {
        padding: 20px;
        border-radius: 15px;
    }

    .login-header h1 {
        font-size: 20px;
    }

    .login-header p {
        font-size: 13px;
    }

    .login-logo {
        width: 110px;
    }

    /* Header compactíssimo no celular */
    .header {
        padding: 10px 12px;
        gap: 8px;
    }

    .header h1 {
        font-size: 13px;
    }

    .header-logo {
        width: 34px;
        min-width: 34px;
    }

    /* Navegação em 2 colunas no celular */
    .header-actions {
        grid-template-columns: 1fr 1fr;
        gap: 5px;
    }

    .header-actions .btn {
        font-size: 10px;
        padding: 8px 5px;
        gap: 4px;
    }

    .header-actions .btn i {
        font-size: 12px;
    }

    /* Dashboard cards - 2 colunas no celular */
    .dashboard {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .summary-card {
        padding: 12px 10px;
        gap: 8px;
        flex-direction: column;
        align-items: flex-start;
    }

    .card-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
        min-width: 40px;
    }

    .card-content h3 {
        font-size: 10px;
        letter-spacing: 0;
    }

    .card-content .amount {
        font-size: 16px;
        font-weight: 800;
    }

    /* Gráficos */
    .chart-box {
        padding: 12px;
    }

    .chart-box h3 {
        font-size: 14px;
        margin-bottom: 12px;
    }

    /* Seções */
    .section {
        padding: 12px;
        border-radius: 10px;
    }

    .section-header h2 {
        font-size: 14px;
    }

    /* Modal full-screen no celular */
    .modal-content {
        max-width: 100%;
        width: 100%;
        margin: 0;
        border-radius: 15px 15px 0 0;
        position: fixed;
        bottom: 0;
        left: 0;
        max-height: 92vh;
        overflow-y: auto;
    }

    .modal {
        align-items: flex-end;
        display: flex;
    }

    .modal-header {
        padding: 15px;
        position: sticky;
        top: 0;
        background: white;
        z-index: 1;
        border-radius: 15px 15px 0 0;
    }

    .modal-header h2 {
        font-size: 15px;
    }

    form {
        padding: 12px 15px;
    }

    .modal-actions {
        flex-direction: column-reverse;
        gap: 8px;
    }

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

    /* Tabelas */
    .data-table {
        min-width: 550px;
        font-size: 11px;
    }

    .data-table th,
    .data-table td {
        padding: 8px 6px;
    }

    /* Botões de ação menores */
    .btn-edit,
    .btn-delete {
        padding: 5px 8px;
        font-size: 11px;
    }

    /* Toast menor */
    .toast {
        bottom: 15px;
        right: 10px;
        left: 10px;
        padding: 12px 15px;
        font-size: 13px;
    }
}


/* Sync Modal Styles */
.sync-info {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 4px solid #2196f3;
}

.sync-info p {
    margin: 0;
    color: #1565c0;
    font-size: 14px;
}

.sync-options {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sync-option {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

.sync-option h3 {
    color: #2c3e50;
    font-size: 18px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sync-option p {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 15px;
}

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

.sync-warning {
    background: #fff3cd;
    padding: 15px;
    border-radius: 8px;
    margin-top: 25px;
    border-left: 4px solid #ffc107;
}

.sync-warning p {
    margin: 0;
    color: #856404;
    font-size: 14px;
}

#qrCodeImage {
    background: white;
    padding: 20px;
    border-radius: 10px;
    display: inline-block;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .sync-actions {
        flex-direction: column;
    }

    .sync-actions button {
        width: 100%;
    }
}

/* Image Cropper Modal */
.modal-cropper .modal-content {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.cropper-container-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 400px;
}

.cropper-controls {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: var(--light);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    justify-content: center;
}

.cropper-controls .btn-sm {
    padding: 8px 12px;
    font-size: 13px;
    white-space: nowrap;
}

.cropper-image-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cropper-image-container img {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

/* Cropper.js overrides for mobile */
.cropper-container {
    direction: ltr;
    font-size: 0;
    line-height: 0;
    position: relative;
    touch-action: none;
    user-select: none;
}

.cropper-wrap-box,
.cropper-canvas,
.cropper-drag-box,
.cropper-crop-box,
.cropper-modal {
    bottom: 0;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

@media (max-width: 768px) {
    .modal-cropper .modal-content {
        max-width: 95vw;
        max-height: 95vh;
        margin: 2.5vh auto;
    }

    .cropper-container-wrapper {
        min-height: 300px;
    }

    .cropper-controls {
        gap: 6px;
        padding: 8px;
    }

    .cropper-controls .btn-sm {
        padding: 6px 10px;
        font-size: 12px;
    }

    .cropper-controls .btn-sm i {
        font-size: 11px;
    }
}

/* Page Loading Overlay */
#pageLoadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

#pageLoadingOverlay .loading-spinner {
    text-align: center;
    color: white;
}

#pageLoadingOverlay .loading-spinner i {
    margin-bottom: 20px;
    color: var(--primary);
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5));
}

#pageLoadingOverlay .loading-spinner p {
    font-size: 18px;
    font-weight: 500;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Loading spinner animation */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.fa-spin {
    animation: spin 1s linear infinite;
}
