/* =====================================================
   Portal do Colaborador - Design System
   Cores: Azul (#1e3a5f, #2563eb) e Laranja (#f97316, #fb923c)
   ===================================================== */

/* === CSS Variables (Design Tokens) === */
:root {
    /* Primary Colors - Azul */
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;
    --primary-950: #172554;

    /* Accent Colors - Laranja */
    --accent-50: #fff7ed;
    --accent-100: #ffedd5;
    --accent-200: #fed7aa;
    --accent-300: #fdba74;
    --accent-400: #fb923c;
    --accent-500: #f97316;
    --accent-600: #ea580c;
    --accent-700: #c2410c;
    --accent-800: #9a3412;
    --accent-900: #7c2d12;

    /* Neutral Colors */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Semantic Colors */
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #3b82f6;
    --info-light: #dbeafe;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 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);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition: 200ms ease;
    --transition-slow: 300ms ease;
}

/* === Base Styles === */
html {
    font-size: 14px;
    scroll-behavior: smooth;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

html, body {
    min-height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--gray-900);
    line-height: 1.3;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--accent-500) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === Navbar === */
.navbar-custom {
    background: linear-gradient(135deg, var(--primary-900) 0%, var(--primary-700) 100%);
    box-shadow: var(--shadow-md);
    padding: 0.75rem 0;
}

.navbar-custom .navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.025em;
    color: white !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-custom .navbar-brand i {
    color: var(--accent-400);
    font-size: 1.5rem;
}

.navbar-custom .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius);
    transition: var(--transition);
    margin: 0 0.25rem;
}

.navbar-custom .nav-link:hover {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar-custom .nav-link.active {
    color: white !important;
    background-color: var(--accent-500);
}

.navbar-custom .dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    margin-top: 0.5rem;
}

.navbar-custom .dropdown-item {
    border-radius: var(--radius-sm);
    padding: 0.5rem 1rem;
    transition: var(--transition-fast);
}

.navbar-custom .dropdown-item:hover {
    background-color: var(--gray-100);
}

.user-badge {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-lg);
    color: white !important;
}

.user-badge i {
    color: var(--accent-400);
}

/* === Buttons === */
.btn {
    font-weight: 500;
    border-radius: var(--radius);
    padding: 0.5rem 1.25rem;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.4);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent-500) 0%, var(--accent-600) 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(249, 115, 22, 0.3);
}

.btn-accent:hover {
    background: linear-gradient(135deg, var(--accent-400) 0%, var(--accent-500) 100%);
    color: white;
    box-shadow: 0 4px 8px rgba(249, 115, 22, 0.4);
    transform: translateY(-1px);
}

.btn-outline-primary {
    border: 2px solid var(--primary-600);
    color: var(--primary-600);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-600);
    color: white;
}

.btn-outline-accent {
    border: 2px solid var(--accent-500);
    color: var(--accent-600);
    background: transparent;
}

.btn-outline-accent:hover {
    background: var(--accent-500);
    color: white;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* === Cards === */
.card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 1.25rem;
}

.card-body {
    padding: 1.25rem;
}

.card-informe {
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

.card-informe:hover {
    border-color: var(--primary-300);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card-informe .icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--accent-100) 0%, var(--accent-50) 100%);
}

.card-informe .icon-wrapper i {
    font-size: 1.75rem;
    color: var(--accent-600);
}

/* === Forms === */
.form-control {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 0.625rem 0.875rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-control-lg {
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

.form-label {
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.form-check-input:checked {
    background-color: var(--primary-600);
    border-color: var(--primary-600);
}

/* === Alerts === */
.alert {
    border: none;
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    border-left: 4px solid;
}

.alert-success {
    background-color: var(--success-light);
    border-left-color: var(--success);
    color: #065f46;
}

.alert-danger {
    background-color: var(--danger-light);
    border-left-color: var(--danger);
    color: #991b1b;
}

.alert-warning {
    background-color: var(--warning-light);
    border-left-color: var(--warning);
    color: #92400e;
}

.alert-info {
    background-color: var(--info-light);
    border-left-color: var(--info);
    color: #1e40af;
}

/* === Page Header === */
.page-header {
    background: linear-gradient(135deg, var(--primary-800) 0%, var(--primary-600) 100%);
    color: white;
    padding: 2rem 0;
    margin: -1.5rem -15px 2rem;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-500) 0%, var(--accent-400) 100%);
    transform: skewX(-15deg) translateX(100px);
    opacity: 0.3;
}

.page-header h1, .page-header h4 {
    color: white;
    position: relative;
    z-index: 1;
}

.page-header .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* === Welcome Section === */
.welcome-section {
    background: linear-gradient(135deg, var(--primary-900) 0%, var(--primary-700) 50%, var(--primary-800) 100%);
    border-radius: var(--radius-xl);
    padding: 3rem;
    color: white;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

.welcome-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--accent-500) 0%, var(--accent-400) 100%);
    border-radius: 50%;
    opacity: 0.2;
}

.welcome-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, var(--accent-400) 0%, var(--accent-300) 100%);
    border-radius: 50%;
    opacity: 0.1;
}

.welcome-section h1 {
    color: white;
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.welcome-section p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
    margin-bottom: 0;
    position: relative;
    z-index: 1;
}

.welcome-section .btn {
    position: relative;
    z-index: 1;
}

/* === Stats Cards === */
.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-left: 4px solid var(--primary-500);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card.accent {
    border-left-color: var(--accent-500);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card .stat-icon.primary {
    background: var(--primary-100);
    color: var(--primary-600);
}

.stat-card .stat-icon.accent {
    background: var(--accent-100);
    color: var(--accent-600);
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
}

.stat-card .stat-label {
    font-size: 0.875rem;
    color: var(--gray-500);
    font-weight: 500;
}

/* === Quick Access Grid === */
.quick-access-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    display: block;
    color: var(--gray-800);
}

.quick-access-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    color: var(--gray-800);
    text-decoration: none;
}

.quick-access-card .icon-box {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.75rem;
    transition: var(--transition);
}

.quick-access-card:hover .icon-box {
    transform: scale(1.1);
}

.quick-access-card .icon-box.primary {
    background: linear-gradient(135deg, var(--primary-100) 0%, var(--primary-50) 100%);
    color: var(--primary-600);
}

.quick-access-card .icon-box.accent {
    background: linear-gradient(135deg, var(--accent-100) 0%, var(--accent-50) 100%);
    color: var(--accent-600);
}

.quick-access-card h6 {
    margin-bottom: 0.25rem;
}

.quick-access-card p {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 0;
}

/* === Footer === */
.footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 1.5rem 0;
    margin-top: auto;
}

.footer a {
    color: var(--accent-400);
    text-decoration: none;
}

.footer a:hover {
    color: var(--accent-300);
}

/* === Empty State === */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state .icon {
    font-size: 5rem;
    color: var(--gray-300);
    margin-bottom: 1.5rem;
}

.empty-state h5 {
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--gray-500);
}

/* === Loading Spinner === */
.spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 2px;
}

/* === Company Group Header === */
.company-header {
    background: linear-gradient(135deg, var(--primary-50) 0%, white 100%);
    border-bottom: 2px solid var(--primary-200);
    padding: 1rem 1.25rem;
}

.company-header h5 {
    color: var(--primary-800);
    margin-bottom: 0;
}

.company-header .badge {
    background: var(--primary-100);
    color: var(--primary-700);
    font-weight: 500;
}

/* === Animations === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease forwards;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* === Utility Classes === */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
}

.bg-gradient-accent {
    background: linear-gradient(135deg, var(--accent-500) 0%, var(--accent-600) 100%);
}

.text-primary-600 {
    color: var(--primary-600);
}

.text-accent-500 {
    color: var(--accent-500);
}

.border-primary {
    border-color: var(--primary-500) !important;
}

.border-accent {
    border-color: var(--accent-500) !important;
}

/* === Responsive Adjustments === */
@media (max-width: 768px) {
    .welcome-section {
        padding: 2rem 1.5rem;
    }

    .welcome-section h1 {
        font-size: 1.75rem;
    }

    .page-header {
        padding: 1.5rem 0;
    }

    .stat-card {
        margin-bottom: 1rem;
    }
}

/* === Print Styles === */
@media print {
    .navbar-custom,
    .footer,
    .btn {
        display: none !important;
    }

    body {
        background: white;
    }

    .card {
        box-shadow: none;
        border: 1px solid var(--gray-300);
    }
}
