/* ============================================
   ME PROTEJA — identidade visual (logo oficial)
   Azul vibrante, azul-marinho e acento metálico
   ============================================ */

:root {
    /* Cores da marca */
    --primary-blue: #152A45;
    --primary-blue-dark: #0F3558;
    --primary-blue-light: #1E88E5;
    --accent-silver-mid: #5C6F82;
    --accent-silver-light: #9DB0C0;
    --accent-chrome: linear-gradient(145deg, #4A5F73 0%, #8FA3B4 55%, #5E7387 100%);

    /* Compat: nomes antigos usados no CSS (botão secundário = cromado, não laranja) */
    --accent-orange: #5C6F82;
    --accent-orange-dark: #3D5266;
    --accent-orange-light: #9DB0C0;

    /* Cores de suporte */
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #1E88E5;

    /* Neutros */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Gradientes (marinho → azul do botão da logo) */
    --bg-gradient: linear-gradient(135deg, #152A45 0%, #1E88E5 50%, #64B5F6 100%);
    --bg-gradient-dark: linear-gradient(135deg, #0F3558 0%, #152A45 100%);
    --accent-gradient: linear-gradient(145deg, #4A5F73 0%, #8FA3B4 55%, #5E7387 100%);

    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* Transições */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   TIPOGRAFIA
   ============================================ */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--gray-800);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   BOTÕES MODERNOS
   ============================================ */
.btn-primary-custom {
    background: var(--bg-gradient);
    border: none;
    color: white;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 12px;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.btn-primary-custom::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 var(--transition-slow);
}

.btn-primary-custom:hover::before {
    left: 100%;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    color: white;
}

.btn-primary-custom:active {
    transform: translateY(0);
}

.btn-orange {
    background: var(--accent-gradient);
    border: none;
    color: white;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 12px;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
}

.btn-orange:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    color: white;
}

/* ============================================
   CARDS MODERNOS
   ============================================ */
.card-modern {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    border: none;
    padding: 24px;
    transition: all var(--transition-base);
    margin-bottom: 24px;
}

.card-modern:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px);
}

.card-header-modern {
    background: var(--bg-gradient);
    color: white;
    padding: 16px 24px;
    border-radius: 12px 12px 0 0;
    font-weight: 700;
    font-size: 18px;
    border: none;
}

/* ============================================
   INPUTS MODERNOS
   ============================================ */
.form-control-modern {
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 15px;
    transition: all var(--transition-base);
    background: var(--gray-50);
}

        .form-control-modern:focus {
            outline: none;
            border-color: var(--primary-blue-light);
            background: white;
            box-shadow: 0 0 0 4px rgba(30, 136, 229, 0.12);
        }

        select.form-control-modern {
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23152A45' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 12px center;
            background-size: 12px;
            padding-right: 40px;
            appearance: none;
            -webkit-appearance: none;
            -moz-appearance: none;
            cursor: pointer;
        }

        select.form-control-modern option {
            padding: 12px;
        }

        .form-label-modern {
            color: var(--gray-700);
            font-weight: 600;
            font-size: 14px;
            margin-bottom: 8px;
        }

/* ============================================
   BADGES E ALERTAS
   ============================================ */
.badge-modern {
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 12px;
}

.badge-success {
    background: #ecfdf5;
    color: #065f46;
}

.badge-danger {
    background: #fef2f2;
    color: #991b1b;
}

.badge-warning {
    background: #fffbeb;
    color: #92400e;
}

.badge-info {
    background: #E3F2FD;
    color: #0D47A1;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.alert-modern {
    padding: 16px 20px;
    border-radius: 12px;
    border-left: 4px solid;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.alert-success-modern {
    background: #ecfdf5;
    color: #065f46;
    border-color: var(--success-color);
}

.alert-danger-modern {
    background: #fef2f2;
    color: #991b1b;
    border-color: var(--error-color);
}

.alert-warning-modern {
    background: #fffbeb;
    color: #92400e;
    border-color: var(--warning-color);
}

.alert-info-modern {
    background: #E3F2FD;
    color: #0D47A1;
    border-color: var(--info-color);
}

/* ============================================
   TABELAS MODERNAS
   ============================================ */
.table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-modern thead {
    background: var(--bg-gradient);
    color: white;
}

.table-modern thead th {
    padding: 16px;
    font-weight: 700;
    text-align: left;
    border: none;
    font-size: 14px;
}

.table-modern tbody tr {
    transition: all var(--transition-fast);
    border-bottom: 1px solid var(--gray-200);
}

.table-modern tbody tr:hover {
    background: var(--gray-50);
    transform: scale(1.01);
}

.table-modern tbody td {
    padding: 16px;
    color: var(--gray-700);
    border: none;
}

/* ============================================
   STATS CARDS
   ============================================ */
.stat-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
    border-left: 4px solid;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 140px;
}

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

.stat-card.primary {
    border-left-color: var(--primary-blue-light);
}

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

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

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

.stat-card .stat-label {
    font-size: 13px;
    color: var(--gray-600);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    line-height: 1.4;
}

.stat-card .stat-value {
    font-size: 36px;
    font-weight: 800;
    color: var(--gray-900);
    margin: 0;
    line-height: 1.2;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.stat-card .stat-icon {
    font-size: 48px;
    opacity: 0.15;
    position: absolute;
    right: 16px;
    bottom: 16px;
    line-height: 1;
    pointer-events: none;
}

/* ============================================
   MENU LATERAL MODERNO
   ============================================ */
.sidebar-modern {
    background: white;
    box-shadow: var(--shadow-xl);
    min-height: 100vh;
}

.sidebar-modern .nav-link {
    color: var(--gray-700);
    padding: 12px 20px;
    border-radius: 12px;
    margin: 4px 12px;
    transition: all var(--transition-base);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-modern .nav-link:hover {
    background: var(--gray-100);
    color: var(--primary-blue);
    transform: translateX(4px);
}

.sidebar-modern .nav-link.active {
    background: var(--bg-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

.sidebar-modern .nav-link i {
    font-size: 20px;
    width: 24px;
}

/* ============================================
   HEADER MODERNO
   ============================================ */
.header-modern {
    background: white;
    box-shadow: var(--shadow-md);
    padding: 16px 24px;
    border-bottom: 1px solid var(--gray-200);
}

.header-modern .navbar-brand {
    font-weight: 800;
    font-size: 20px;
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   UTILITÁRIOS
   ============================================ */
.text-primary-custom {
    color: var(--primary-blue) !important;
}

.bg-primary-custom {
    background: var(--bg-gradient) !important;
}

.bg-orange {
    background: var(--accent-gradient) !important;
}

.border-radius-modern {
    border-radius: 12px;
}

.shadow-modern {
    box-shadow: var(--shadow-lg);
}

/* ============================================
   RESPONSIVO
   ============================================ */
@media (max-width: 768px) {
    .stat-card .stat-value {
        font-size: 24px;
    }

    .card-modern {
        padding: 16px;
    }
}

/* ============================================
   ANIMAÇÕES
   ============================================ */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-12px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.animate-slide-in {
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   LOADING SPINNER
   ============================================ */
.spinner-modern {
    border: 3px solid var(--gray-200);
    border-top: 3px solid var(--primary-blue-light);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
