/* css/estilos.css */

:root {
    --primary-color: #311b92;
    --primary-dark: #1a237e;
    --primary-light: #6746c3;
    --secondary-color: #ff5722;
    --secondary-dark: #e64a19;
    --secondary-light: #ff8a50;
    --text-color: #333;
    --text-light: #666;
    --text-lighter: #999;
    --bg-color: #f5f7fa;
    --bg-light: #ffffff;
    --border-color: #e0e0e0;
    --success-color: #2e7d32;
    --warning-color: #f57c00;
    --danger-color: #c62828;
    --info-color: #0288d1;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-light: 0 2px 6px rgba(0, 0, 0, 0.05);
    --radius: 10px;
    --radius-sm: 5px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
}

.login-box {
    background: var(--bg-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    animation: fadeIn 0.5s ease;
}

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

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

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

.login-header h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.login-header p {
    color: var(--text-light);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
}

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

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    border: none;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

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

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

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

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

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

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

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

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

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

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

.btn-block {
    width: 100%;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 var(--radius) var(--radius);
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: inherit;
}

.logo i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.logo h1 {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.8rem;
}

.logo span {
    color: var(--secondary-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.weather-widget {
    background: var(--primary-color);
    color: white;
    padding: 8px 15px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    white-space: nowrap;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    cursor: pointer;
}

.user-avatar {
    width: 45px;
    height: 45px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.2rem;
}

.user-menu {
    position: absolute;
    top: 60px;
    right: 0;
    background: var(--bg-light);
    box-shadow: var(--shadow);
    border-radius: var(--radius-sm);
    width: 200px;
    z-index: 1000;
    display: none;
}

.user-menu.active {
    display: block;
}

.user-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.user-menu a:hover {
    background: var(--bg-color);
}

.user-menu a:last-child {
    border-bottom: none;
    color: var(--secondary-color);
}

/* Dashboard Layout */
.main-dashboard {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 25px;
    margin-bottom: 40px;
}

@media (max-width: 992px) {
    .main-dashboard {
        grid-template-columns: 1fr;
    }
}

/* Sidebar */
.sidebar {
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow-light);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.nav-menu {
    list-style: none;
    margin-bottom: 30px;
}

.nav-menu li {
    margin-bottom: 8px;
}

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: var(--text-light);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
    background: var(--primary-color);
    color: white;
}

.nav-menu i {
    font-size: 1.2rem;
    width: 25px;
}

/* Services Summary */
.services-summary {
    background: var(--bg-color);
    padding: 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

.services-summary h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.service-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--border-color);
}

/* Content Area */
.content-area {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Welcome Banner */
.welcome-banner {
    background: linear-gradient(90deg, var(--secondary-color) 0%, var(--secondary-light) 100%);
    color: white;
    padding: 25px;
    border-radius: var(--radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.welcome-text h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

/* Sections */
.invoices-section,
.services-section,
.profile-section,
.admin-section,
.support-section {
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow-light);
}

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

.section-header h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.section-header i {
    color: var(--secondary-color);
    font-size: 1.8rem;
}

/* Invoice Cards */
.invoices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.invoice-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 20px;
    transition: var(--transition);
    background: var(--bg-light);
}

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

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

.invoice-status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background: rgba(245, 124, 0, 0.1);
    color: var(--warning-color);
}

.status-paid {
    background: rgba(46, 125, 50, 0.1);
    color: var(--success-color);
}

.status-overdue {
    background: rgba(198, 40, 40, 0.1);
    color: var(--danger-color);
}

.invoice-details p {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.invoice-details p:last-child {
    border-bottom: none;
}

.invoice-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 20px;
}

/* Service Cards */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.service-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 20px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    background: var(--bg-light);
}

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

.service-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.service-card h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.service-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.service-status {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-active {
    background: rgba(46, 125, 50, 0.1);
    color: var(--success-color);
}

.status-inactive {
    background: rgba(117, 117, 117, 0.1);
    color: #757575;
}

/* Admin Panel */
.admin-panel {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.admin-card {
    background: var(--bg-color);
    border-radius: var(--radius-sm);
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

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

.admin-card:hover h3,
.admin-card:hover p,
.admin-card:hover .admin-icon {
    color: white;
}

.admin-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    transition: var(--transition);
}

.admin-card h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.3rem;
    transition: var(--transition);
}

.admin-card p {
    color: var(--text-light);
    margin-bottom: 20px;
    transition: var(--transition);
}

/* Tables */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.admin-table th,
.admin-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.admin-table tr:hover {
    background: var(--bg-color);
}

/* Forms */
.profile-form {
    max-width: 600px;
}

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

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 30px;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition);
}

.page-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-link.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: rgba(46, 125, 50, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(46, 125, 50, 0.2);
}

.alert-warning {
    background: rgba(245, 124, 0, 0.1);
    color: var(--warning-color);
    border: 1px solid rgba(245, 124, 0, 0.2);
}

.alert-danger {
    background: rgba(198, 40, 40, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(198, 40, 40, 0.2);
}

.alert-info {
    background: rgba(2, 136, 209, 0.1);
    color: var(--info-color);
    border: 1px solid rgba(2, 136, 209, 0.2);
}

/* Footer */
footer {
    margin-top: 40px;
    text-align: center;
    color: var(--text-light);
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.developer-info {
    background: var(--bg-color);
    padding: 15px;
    border-radius: var(--radius-sm);
    display: inline-block;
}

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

.developer-info a:hover {
    text-decoration: underline;
}

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

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

.modal {
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 30px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow);
}

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

.modal-header h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}

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

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .user-info {
        flex-direction: column;
        align-items: stretch;
    }
    
    .weather-widget {
        justify-content: center;
    }
    
    .welcome-banner {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .invoices-grid,
    .services-grid,
    .admin-panel {
        grid-template-columns: 1fr;
    }
    
    .invoice-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}