:root {
    /* Cores primárias */
    --primary: #8C2730;
    --primary-dark: #A62121;
    --primary-light: #F2D0D0;

    /* Cores secundárias */
    --secondary: #295773;
    --secondary-dark: #1e4058;
    --secondary-light: #F2F2F2;

    /* Cores neutras */
    --gray-100: #F2F2F2;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;

    /* Cores de estado */
    --success: #10b981;
    --success-dark: #065f46;
    --error: #ef4444;
    --error-dark: #991b1b;
    --warning: #f97316;
    --warning-dark: #7c2d12;
    --info: #3b82f6;
    --info-dark: #1e3a8a;

    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --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);

    /* Transições */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
}

/* ------------------------------
   Reset e estilos base
------------------------------- */
body {
    background-color: var(--gray-100);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ------------------------------
   Input tamanho pequeno (sm)
------------------------------- */
.input-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    border-radius: 0.375rem;
    border: 1px solid var(--gray-300);
    width: 100%;
    transition: all var(--transition-base);
}

.input-sm:focus {
    outline: none;
    ring: 2px solid var(--secondary);
    border-color: transparent;
}

/* Input com outline suave (classe adicional) */
.input-outline {
    transition: all 0.2s ease;
}

.input-outline:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(140, 39, 48, 0.1);
}

/* ------------------------------
   Botões – tamanho único (Bootstrap sm)
   ----------------------------- */
.btn-sm,
.btn-primary,
.btn-secondary,
.btn-outline,
.btn-primary-sm,
.btn-secondary-sm,
.btn-outline-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.375rem;
    transition: all var(--transition-base);
    display: inline-block;
    text-align: center;
    cursor: pointer;
    border: none;
}

/* Cores dos botões */
.btn-primary,
.btn-primary-sm {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-primary:hover,
.btn-primary-sm:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(140, 39, 48, 0.3);
}

.btn-secondary,
.btn-secondary-sm {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    color: white;
}

.btn-secondary:hover,
.btn-secondary-sm:hover {
    background: linear-gradient(135deg, var(--secondary-dark) 0%, var(--secondary) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(41, 87, 115, 0.3);
}

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

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

/* ------------------------------
   Label personalizado
------------------------------- */
.label-custom {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

/* ------------------------------
   Login e autenticação (imagem de fundo)
------------------------------- */
.login-left {
    background-image: url('../assets/images/login-model.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* ------------------------------
   Cards e containers
------------------------------- */
.card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: box-shadow var(--transition-slow);
}

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

.card-header {
    background-color: var(--secondary);
    color: white;
    padding: 1rem 1.5rem;
    font-weight: 600;
    border-bottom: 1px solid var(--info-dark);
}

.card-body {
    padding: 1.5rem;
}

/* ------------------------------
   Alertas e notificações
------------------------------- */
.alert-success {
    background-color: #d1fae5;
    border-left: 4px solid var(--success);
    color: var(--success-dark);
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
}

.alert-error {
    background-color: #fee2e2;
    border-left: 4px solid var(--error);
    color: var(--error-dark);
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
}

.alert-warning {
    background-color: #fed7aa;
    border-left: 4px solid var(--warning);
    color: var(--warning-dark);
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
}

.alert-info {
    background-color: #dbeafe;
    border-left: 4px solid var(--info);
    color: var(--info-dark);
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
}

/* ------------------------------
   Tabelas
------------------------------- */
.table-custom {
    min-width: 100%;
    border-collapse: collapse;
}

.table-custom thead {
    background-color: var(--gray-100);
    border-bottom: 2px solid var(--gray-200);
}

.table-custom th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-600);
}

.table-custom td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.table-custom tr:hover {
    background-color: var(--primary-light);
}

/* ------------------------------
   Sidebar / Navegação
------------------------------- */
.nav-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: var(--gray-600);
    border-radius: 0.375rem;
    transition: all var(--transition-base);
}

.nav-link:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}

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

/* ------------------------------
   Animações
------------------------------- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn var(--transition-slow) ease-out;
}

/* ------------------------------
   Scrollbar customizada
------------------------------- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ------------------------------
   Stats cards (Dashboard)
------------------------------- */
.stat-card {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    color: white;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

.stat-card-body {
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.9;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #8C2730 0%, #A62121 100%);
}

.bg-gradient-secondary {
    background: linear-gradient(135deg, #295773 0%, #1e4058 100%);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.bg-gradient-info {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.stat-card-modern {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.card-gradient-icon {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

/* ------------------------------
   Loading Splash
------------------------------- */
.loading-splash {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.5s;
}

.loading-splash.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loading-splash.hidden {
    display: none;
}

.splash-card {
    text-align: center;
    padding: 2rem;
    animation: floatIn 0.6s ease-out;
}

.spinner-container {
    position: relative;
    width: 70px;
    height: 70px;
    margin: 1.5rem auto;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #8C2730;
    animation: spin 1s linear infinite;
}

.spinner-ring-secondary {
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    border-top-color: #295773;
    animation: spinReverse 0.8s linear infinite;
}

.spinner-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #A62121;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulseDot 1.5s ease-in-out infinite;
}

.splash-text-wrapper {
    margin-top: 1rem;
}

.splash-title {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #8C2730 0%, #A62121 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.25rem;
}

.splash-subtitle {
    font-size: 0.85rem;
    color: #6b7280;
    letter-spacing: 0.5px;
}

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

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

@media (max-width: 640px) {
    .spinner-container {
        width: 50px;
        height: 50px;
    }

    .splash-title {
        font-size: 1.2rem;
    }
}

/* ------------------------------
   Footer fixo
------------------------------- */
.fixed-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 40;
    background-color: white;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.content-with-fixed-footer {
    padding-bottom: 80px;
}

@media (max-width: 640px) {
    .content-with-fixed-footer {
        padding-bottom: 100px;
    }
}

/* ------------------------------
   Utilitários diversos
------------------------------- */
[x-cloak] {
    display: none !important;
}

.question-item {
    transition: all 0.2s ease;
}

.question-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    ring: 2px solid var(--secondary);
    border-color: transparent;
}

.btn-submit {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    transition: all 0.3s;
}

.btn-submit:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(41, 87, 115, 0.3);
}

/* Melhoria para as respostas dentro do modal */
.modal-answer-item {
    background: #f9fafb;
    border-radius: 0.75rem;
    padding: 1rem;
    border-left: 4px solid #8C2730;
    transition: all 0.2s;
    margin-bottom: 0.75rem;
}

.modal-answer-item:hover {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.modal-answer-item strong {
    color: #295773;
    font-size: 0.875rem;
    display: block;
    margin-bottom: 0.5rem;
}

.modal-answer-item p {
    margin: 0;
    color: #374151;
    font-size: 0.875rem;
    line-height: 1.5;
}

.modal-answer-item em {
    color: #9ca3af;
    font-style: italic;
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fade-in-up 0.3s ease-out;
}
