/**
 * CB Rustolin Assessoria - Estilos Principais
 * Design Moderno e Profissional
 * 
 * Cores:
 * - Primária: #968478 (azul escuro)
 * - Secundária: #CCC8BC (bege claro)
 * - Accent: #A2434C (vermelho)
 */

:root {
    --color-primary: #7f6b60;
    --color-secondary: #CCC8BC;
    --color-accent: #A2434C;
    --color-success: #28a745;
    --color-danger: #A2434C;
    --color-warning: #ffc107;
    --color-info: #17a2b8;
    --color-light: #f8f9fa;
    --color-dark: #212529;
    --font-primary: 'Montserrat', sans-serif;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: #333;
    line-height: 1.7;
    overflow-x: hidden;
    background: #fff;
}

/* ========================================
   NAVBAR
   ======================================== */

.navbar {
    background: #fff !important;
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary) !important;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.navbar-brand:hover {
    color: var(--color-accent) !important;
}

.nav-link {
    font-weight: 500;
    color: #555 !important;
    transition: var(--transition);
    padding: 0.5rem 1.2rem !important;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 60%;
}

.nav-link:hover {
    color: var(--color-primary) !important;
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* ========================================
   HERO / BANNER
   ======================================== */

.hero-section {
    background: linear-gradient(135deg, #968478 0%, #817a6b 100%);
    color: white;
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(220, 53, 69, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(204, 200, 188, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.4rem;
    margin-bottom: 2.5rem;
    color: rgba(255, 255, 255, 0.9);
    animation: fadeInUp 1s ease;
    font-weight: 300;
}

.hero-buttons {
    animation: fadeInUp 1.2s ease;
}

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

/* ========================================
   SECTIONS
   ======================================== */

section {
    padding: 90px 0;
}

section:nth-child(even) {
    background: var(--color-light);
}

.section-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--color-primary);
    position: relative;
    padding-bottom: 20px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: var(--color-accent);
    border-radius: 2px;
}

.text-center .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

.section-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 4rem;
    font-weight: 300;
}

/* ========================================
   CARDS
   ======================================== */

.card {
    border: none;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
    background: #fff;
}

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

.card-header {
    background: var(--color-primary);
    color: white;
    font-weight: 600;
    border: none;
    padding: 1.5rem;
    font-size: 1.1rem;
}

.card-body {
    padding: 2rem;
}

.shadow-custom {
    box-shadow: var(--shadow-md) !important;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
    border-radius: 8px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
    cursor: pointer;
}

.btn-lg {
    padding: 1rem 3rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

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

.btn-primary:hover {
    background: #0f1419;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(28, 35, 46, 0.3);
}

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

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.3);
}

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

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
}

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

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

.btn-light {
    background: white;
    color: var(--color-primary);
    border: 2px solid #e0e0e0;
}

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

/* ========================================
   FORMS
   ======================================== */

.form-control,
.form-select {
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    padding: 0.75rem 1rem;
    transition: var(--transition);
    font-size: 1rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.2rem rgba(28, 35, 46, 0.1);
    outline: none;
}

.form-label {
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.input-group-text {
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 8px 0 0 8px;
}

/* ========================================
   ALERTS
   ======================================== */

.alert {
    border-radius: 12px;
    border: none;
    padding: 1.2rem 1.5rem;
    animation: slideInDown 0.5s ease;
    box-shadow: var(--shadow-sm);
}

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

/* ========================================
   TABLES
   ======================================== */

.table {
    border-radius: 12px;
    overflow: hidden;
}

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

.table thead th {
    border: none;
    font-weight: 600;
    padding: 1rem;
    font-size: 0.95rem;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background: #f8f9fa;
}

.table-responsive {
    border-radius: 12px;
}

/* ========================================
   BADGES
   ======================================== */

.badge {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
}

/* ========================================
   SERVICE CARDS
   ======================================== */

.service-card {
    text-align: center;
    padding: 2.5rem 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    border: 2px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-accent);
}

.service-card i {
    font-size: 3.5rem;
    color: var(--color-accent);
    margin-bottom: 1.5rem;
    display: inline-block;
    transition: var(--transition);
}

.service-card:hover i {
    transform: scale(1.1);
}

.service-card h4 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.service-card p {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
}

/* ========================================
   PORTAL BOX
   ======================================== */

.portal-box {
    background: linear-gradient(135deg, var(--color-accent) 0%, #c82333 100%);
    color: white;
    padding: 4rem 3rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.portal-box::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.portal-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(220, 53, 69, 0.4);
}

.portal-box h3 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
}

.portal-box p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    position: relative;
}

.portal-box .btn {
    position: relative;
}

/* ========================================
   LOGIN / REGISTER PAGES
   ======================================== */

.login-container,
.register-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #968478 0%, #817a6b 100%);
    padding: 3rem 1rem;
}

.login-box,
.register-box {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 3rem;
    max-width: 500px;
    width: 100%;
    animation: fadeInUp 0.6s ease;
}

.register-box {
    max-width: 900px;
}

.login-box h2,
.register-box h2 {
    color: var(--color-primary);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-box p,
.register-box p {
    color: #666;
    margin-bottom: 2rem;
}

/* ========================================
   DASHBOARD
   ======================================== */

.dashboard-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, #817a6b 100%);
    color: white;
    padding: 2.5rem 0;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-md);
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition);
    border-left: 4px solid transparent;
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.stat-card i {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.stat-card h3 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--color-primary);
}

.stat-card p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 0;
}

/* ========================================
   FILE UPLOAD
   ======================================== */

.file-upload-box {
    border: 3px dashed #d0d0d0;
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    background: #fafafa;
}

.file-upload-box:hover {
    border-color: var(--color-primary);
    background: #f0f0f0;
}

.file-upload-box i {
    font-size: 4rem;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    display: inline-block;
}

.file-upload-box h5 {
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.file-upload-box p {
    color: #666;
    font-size: 0.95rem;
}

/* ========================================
   FOOTER
   ======================================== */

footer {
    background: var(--color-primary);
    color: white;
    padding: 3rem 0 1.5rem;
}

footer h5 {
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

footer p,
footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

footer a:hover {
    color: white;
    padding-left: 5px;
}

footer .social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-right: 10px;
    transition: var(--transition);
}

footer .social-links a:hover {
    background: var(--color-accent);
    transform: translateY(-3px);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 992px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    section {
        padding: 60px 0;
    }
    
    .login-box,
    .register-box {
        padding: 2rem;
        margin: 1rem;
    }
    
    .service-card {
        margin-bottom: 2rem;
    }
    
    .portal-box {
        padding: 3rem 2rem;
    }
    
    .stat-card {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 80px 0 60px;
    }
    
    .btn-lg {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }
    
    .stat-card h3 {
        font-size: 2.5rem;
    }
}

/* ========================================
   UTILITIES
   ======================================== */

.text-primary-custom {
    color: var(--color-primary) !important;
}

.text-accent {
    color: var(--color-accent) !important;
}

.bg-light-custom {
    background: var(--color-light) !important;
}

.mb-6 {
    margin-bottom: 4rem !important;
}

.mt-6 {
    margin-top: 4rem !important;
}

/* Smooth Scroll */
html {
    scroll-padding-top: 80px;
}

/* Loading Animation */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0f1419;
}
