/* public/assets/css/style.css - MODERNO SaaS PREMIUM COMPACTO */
:root {
    --primary: #1a2a3a;
    --primary-light: #2c4a6d;
    --primary-dark: #0f1722;
    --accent: #c5a059;
    --accent-light: #e0c188;
    --accent-dark: #9d8248;
    
    --success: #10b981;
    --success-light: #34d399;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --purple: #8b5cf6;
    
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-hover: #f1f5f9;
    --bg-sidebar: #1e293b;
    
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    --border-dark: #94a3b8;
    
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-tertiary: #64748b;
    --text-muted: #94a3b8;
    
    --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    
    --sidebar-width: 260px;
    --header-height: 68px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    font-feature-settings: 'cv11', 'ss01';
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container Moderno Compacto */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.dashboard-container {
    padding: 24px;
}

/* Header Premium Compacto */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 20px 0;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-light);
    position: relative;
}

.dashboard-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

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

.tenant-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tenant-subtitle {
    color: var(--text-tertiary);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.025em;
}

/* User Actions Modern Compacto */
.user-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
}

.user-info:hover {
    border-color: var(--accent-light);
    box-shadow: var(--shadow-md);
}

.user-greeting {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--bg-hover);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

/* Botões Premium Compactos */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.025em;
    position: relative;
    overflow: hidden;
}

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

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    border-color: var(--accent-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(197, 160, 89, 0.3);
}

.btn-accent:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px 0 rgba(197, 160, 89, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 0.95rem;
}

.btn-logout {
    background: transparent;
    color: var(--text-tertiary);
    border: 1px solid var(--border-light);
    padding: 8px 16px;
}

.btn-logout:hover {
    color: var(--danger);
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.05);
}

.btn-new-proposal {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: white;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 14px 0 rgba(197, 160, 89, 0.3);
}

.btn-new-proposal:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px 0 rgba(197, 160, 89, 0.4);
}

/* Estatísticas Premium Compactas */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-light);
}

.stat-number {
    display: block;
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 6px;
    line-height: 1;
}

.stat-label {
    color: var(--text-tertiary);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Search and Filters Modern Compacto */
.search-container {
    margin-bottom: 24px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 16px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

#searchInput {
    width: 100%;
    padding: 14px 20px 14px 48px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    transition: var(--transition-base);
    background: var(--bg-body) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cpath d='m21 21-4.35-4.35'%3E%3C/path%3E%3C/svg%3E") no-repeat 18px center;
}

#searchInput:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.1);
    background-color: white;
}

#bankFilter {
    padding: 14px 20px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    transition: var(--transition-base);
    background: white;
    color: var(--text-primary);
    min-width: 180px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' 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 14px center;
    background-size: 14px;
}

#bankFilter:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.1);
}

/* Kanban Board Compacto - 4 colunas lado a lado */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 24px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.kanban-board::-webkit-scrollbar {
    height: 5px;
}

.kanban-board::-webkit-scrollbar-track {
    background: var(--bg-hover);
    border-radius: 3px;
}

.kanban-board::-webkit-scrollbar-thumb {
    background: var(--border-dark);
    border-radius: 3px;
}

.kanban-column {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    min-height: 420px;
    display: flex;
    flex-direction: column;
    transition: var(--transition-base);
    flex-shrink: 0;
}

.kanban-column:hover {
    border-color: var(--accent-light);
    box-shadow: var(--shadow-md);
}

.column-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.column-icon {
    font-size: 1.1rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border-radius: var(--radius-sm);
}

.column-title {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.column-count {
    background: var(--bg-hover);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 28px;
    text-align: center;
}

.cards-container {
    flex: 1;
    overflow-y: auto;
    padding-right: 6px;
    min-height: 320px;
}

.cards-container::-webkit-scrollbar {
    width: 5px;
}

.cards-container::-webkit-scrollbar-track {
    background: var(--bg-hover);
    border-radius: 3px;
}

.cards-container::-webkit-scrollbar-thumb {
    background: var(--border-dark);
    border-radius: 3px;
}

.cards-container::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Cards de Proposta Compactos */
.proposal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.proposal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, var(--accent), var(--accent-light));
    opacity: 0;
    transition: opacity var(--transition-base);
}

.proposal-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-light);
}

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

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.client-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.proposal-id {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    background: var(--bg-hover);
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-weight: 600;
    flex-shrink: 0;
}

.bank-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 10px;
    box-shadow: var(--shadow-xs);
    width: fit-content;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-body {
    margin-bottom: 12px;
}

.client-cpf {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-bottom: 6px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.loan-amount {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
    font-size: 0.75rem;
}

.created-at {
    color: var(--text-tertiary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.created-at::before {
    content: '📅';
    font-size: 0.85rem;
}

.bank-name {
    color: var(--text-secondary);
    font-weight: 600;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 3px 8px;
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
}

/* Estado Vazio Compacto */
.empty-state {
    text-align: center;
    padding: 40px 16px;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.empty-state-icon {
    font-size: 2.5rem;
    opacity: 0.5;
}

.empty-state p {
    margin: 0;
    font-size: 0.9rem;
    max-width: 280px;
}

.btn-add-card {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 2px dashed var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-tertiary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-add-card:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(197, 160, 89, 0.05);
    transform: translateY(-1px);
}

/* Modal Container Premium Compacto */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
    animation: fadeIn var(--transition-fast);
}

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

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-lg {
    max-width: 800px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: white;
}

.modal-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.025em;
}

.modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    font-size: 1.1rem;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-full);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-form {
    padding: 24px;
}

/* Formulários Premium Compactos */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    letter-spacing: 0.025em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    transition: var(--transition-base);
    background: white;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    margin-top: 20px;
}

/* Badges de Status Premium Compactos */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: var(--shadow-xs);
}

.status-leads {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    color: #0369a1;
}

.status-documentacao {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.status-analise_banco {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
}

.status-aprovado {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
}

/* Toast Notification Premium Compacto */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-card);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 5px solid;
    border: 1px solid var(--border-light);
    min-width: 280px;
    backdrop-filter: blur(10px);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-left-color: var(--success);
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.toast.error {
    border-left-color: var(--danger);
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

.toast.info {
    border-left-color: var(--info);
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.toast-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.toast-message {
    color: var(--text-secondary);
    font-size: 0.8125rem;
}

/* Drag & Drop Estilos Compactos */
.proposal-card.dragging {
    opacity: 0.5;
    cursor: grabbing;
    border: 2px dashed var(--accent);
    transform: rotate(2deg);
    box-shadow: var(--shadow-md);
}

.kanban-column.drag-hover {
    background: linear-gradient(135deg, rgba(197, 160, 89, 0.05) 0%, rgba(197, 160, 89, 0.1) 100%);
    border: 2px dashed var(--accent);
    transform: translateY(-2px);
}

/* Responsividade Compacta */
@media (max-width: 1200px) {
    .kanban-board {
        grid-template-columns: repeat(4, minmax(200px, 1fr));
        gap: 12px;
    }
    
    .kanban-column {
        min-height: 400px;
        padding: 14px;
    }
}

@media (max-width: 1024px) {
    .kanban-board {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .kanban-column {
        min-height: 380px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .dashboard-container {
        padding: 20px 16px;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding-bottom: 20px;
    }
    
    .user-actions {
        width: 100%;
        flex-direction: column;
        gap: 12px;
    }
    
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .kanban-board {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .kanban-column {
        min-height: 350px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .modal {
        max-width: 100%;
        margin: 16px;
    }
    
    .modal-header {
        padding: 16px 20px;
    }
    
    .modal-form {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .user-info {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
    
    .toast {
        min-width: 260px;
        margin: 0 12px;
    }
}

/* Animações adicionais */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Glass Effect */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Loading States */
.loading-shimmer {
    background: linear-gradient(90deg, 
        var(--bg-hover) 0%, 
        rgba(255,255,255,0.5) 50%, 
        var(--bg-hover) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Document Actions Premium */
.document-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.document-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition-base);
}

.document-item:hover {
    background: var(--bg-hover);
    border-radius: var(--radius-md);
}

/* Tooltip */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:hover::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 6px;
    pointer-events: none;
}

[data-tooltip]:hover::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: var(--primary);
    margin-bottom: 2px;
    pointer-events: none;
}

/* =========================================
   LAYOUT SYSTEM (SIDEBAR + MAIN) - O QUE FALTAVA
   ========================================= */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    color: white;
    transition: transform var(--transition-base);
    border-right: 1px solid rgba(255,255,255,0.05);
}

.main-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 24px;
    transition: margin var(--transition-base), width var(--transition-base);
}

/* Sidebar Components Compactos */
.brand-area {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.brand-logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-menu {
    flex: 1;
    padding: 16px 8px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    color: #94a3b8;
    text-decoration: none;
    border-radius: var(--radius-md);
    margin-bottom: 4px;
    font-weight: 500;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.nav-item:hover {
    background: rgba(255,255,255,0.05);
    color: white;
}

.nav-item.active {
    background: var(--primary-light);
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.nav-icon { 
    margin-right: 10px; 
    font-size: 1rem; 
    width: 18px; 
    text-align: center; 
}

.user-profile {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0,0,0,0.1);
}

.avatar {
    width: 32px;
    height: 32px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.85rem;
}

/* Responsividade do Layout */
@media (max-width: 1024px) {
    .sidebar { 
        transform: translateX(-100%); 
        width: 240px;
    }
    .main-wrapper { 
        margin-left: 0; 
        width: 100%; 
        padding: 20px; 
    }
}