/* assets/css/dashboard.css */
:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #dbeafe;
    --secondary: #8b5cf6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1f2937;
    --light: #f9fafb;
    --lighter: #ffffff;
    --border: #e5e7eb;
    --text: #374151;
    --text-light: #6b7280;
    --text-lighter: #9ca3af;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
}

/* REMOVA ESTA PARTE COMPLETAMENTE - MODE ESCURO:
[data-theme="dark"] {
    --primary: #60a5fa;
    --primary-dark: #3b82f6;
    --primary-light: #1e3a8a;
    --dark: #f9fafb;
    --light: #111827;
    --lighter: #1f2937;
    --border: #374151;
    --text: #f9fafb;
    --text-light: #d1d5db;
    --text-lighter: #9ca3af;
}
*/

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text);
}

.dashboard-container {
    min-height: 100vh;
    background: var(--light);
}

/* Header */
.dashboard-header {
    background: var(--lighter);
    padding: 20px 40px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
}

.logo i {
    color: var(--primary);
    font-size: 28px;
}

.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    color: var(--text-light);
    font-size: 14px;
    margin-left: 10px;
}

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

/* REMOVA ESTE BOTÃO DE TEMA:
.btn-theme {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-theme:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
*/

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

/* Main Content */
.dashboard-main {
    padding: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Hero Section */
.hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
    background: var(--lighter);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.hero-content h2 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 30px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

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

.btn-secondary {
    background: var(--light);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.btn-large {
    padding: 18px 36px;
    font-size: 18px;
}

.hero-illustration {
    display: flex;
    align-items: center;
    justify-content: center;
}

.illustration-card {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    position: relative;
    transform: rotate(5deg);
}

.illustration-card i {
    position: absolute;
    color: rgba(255, 255, 255, 0.8);
    font-size: 48px;
}

.illustration-card i:nth-child(1) {
    top: 20%;
    left: 20%;
}

.illustration-card i:nth-child(2) {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 64px;
}

.illustration-card i:nth-child(3) {
    bottom: 20%;
    right: 20%;
}

/* Stats Section */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

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

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

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.stat-info h3 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-info p {
    color: var(--text-light);
    font-size: 14px;
}

/* Documents Section */
.documents-section {
    background: var(--lighter);
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 50px;
    box-shadow: var(--shadow);
}

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

.section-header h3 {
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s;
}

.btn-link:hover {
    gap: 10px;
}

.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* ESTRUTURA NOVA - Document Cards */
.document-card {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: var(--light);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.document-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.document-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 20px;
    flex-shrink: 0;
}

.document-info {
    flex: 1;
    min-width: 0; /* Permite que o conteúdo quebre corretamente */
}

.document-info h4 {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--text);
    word-break: break-all;
}

.document-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    flex-wrap: wrap;
    gap: 10px;
}

.document-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: var(--text-light);
    flex: 1;
    min-width: 200px;
}

.document-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.document-actions {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: var(--lighter);
    border: 1px solid var(--border);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
}

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

.btn-delete {
    background: #ef4444;
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
}

.btn-delete:hover {
    background: #dc2626;
    transform: scale(1.05);
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 64px;
    color: var(--text-lighter);
    margin-bottom: 20px;
}

.empty-state p {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 18px;
}

/* Features Section */
.features-section {
    background: var(--lighter);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
}

.features-section h3 {
    font-size: 20px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.feature-card {
    background: var(--light);
    border-radius: var(--radius);
    padding: 25px;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.feature-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    margin-bottom: 20px;
}

.feature-card h4 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text);
}

.feature-card p {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.5;
}

/* Footer */
.dashboard-footer {
    background: var(--lighter);
    border-top: 1px solid var(--border);
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 50px;
}

.dashboard-footer p {
    color: var(--text-light);
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary);
}

/* Product by */
.product-by {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 5px;
}

.product-by a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.product-by a:hover {
    text-decoration: underline;
}

/* Document count */
.document-count {
    color: var(--text-light);
    font-size: 14px;
    background: var(--light);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid var(--border);
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--lighter);
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.modal h3 {
    margin-top: 0;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal p {
    color: var(--text-light);
    margin: 20px 0;
}

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

.btn-modal {
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
}

.btn-modal.cancel {
    background: var(--light);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-modal.delete {
    background: #ef4444;
    color: white;
}

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

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}

.toast {
    background: var(--lighter);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
    min-width: 300px;
    max-width: 400px;
}

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

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

.toast.warning {
    border-left-color: var(--warning);
}

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

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

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

/* Responsividade */
@media (max-width: 1024px) {
    .hero-section {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-actions {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding: 20px;
    }
    
    .header-left {
        flex-direction: column;
        gap: 10px;
    }
    
    .tagline {
        margin-left: 0;
    }
    
    .dashboard-main {
        padding: 20px;
    }
    
    .hero-section {
        padding: 30px 20px;
    }
    
    .hero-content h2 {
        font-size: 32px;
    }
    
    .stats-section {
        grid-template-columns: 1fr;
    }
    
    .documents-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-footer {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    /* Ajustes para documentos em mobile */
    .document-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .document-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .document-meta {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .document-card {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .document-info {
        width: 100%;
        text-align: center;
    }
    
    .document-bottom {
        align-items: center;
    }
    
    .document-actions {
        justify-content: center;
    }
    
    .document-meta {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .btn-modal {
        width: 100%;
    }
}

/* ====== ADICIONE ESTAS REGRAS AO FINAL DO dashboard.css ====== */

/* Document name editable (renomeação) */
.document-name-editable {
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.document-name-editable:hover {
    background: var(--primary-light);
}

.document-name-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--primary);
    border-radius: 4px;
    background: var(--lighter);
    color: var(--text);
    font-size: 16px;
    font-family: inherit;
}

/* Form de renomeação */
.rename-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    color: var(--text);
}

.form-group input {
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--light);
    color: var(--text);
    font-size: 14px;
}

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

/* Botões de modal específicos */
.btn-modal.rename {
    background: #3b82f6;
    color: white;
}

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