/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette */
    --primary-color: #1e40af;
    --primary-light: #3b82f6;
    --primary-dark: #1e3a8a;
    --secondary-color: #0ea5e9;
    --accent-color: #06b6d4;

    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;

    --bg-main: #f8fafc;
    --bg-white: #ffffff;
    --bg-light: #f1f5f9;
    --bg-card: #ffffff;

    --border-color: #e2e8f0;
    --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);

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-base: 16px;
    --line-height-base: 1.6;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-base: 250ms ease-in-out;
    --transition-slow: 350ms ease-in-out;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--text-primary);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: var(--spacing-xl) var(--spacing-md);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   CONTAINER
   ============================================ */
.container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: var(--spacing-3xl) var(--spacing-xl);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-lg);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.hero-icon svg {
    width: 40px;
    height: 40px;
    stroke: white;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    position: relative;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.125rem;
    font-weight: 400;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    line-height: 1.7;
}

/* ============================================
   CONTENT SECTIONS
   ============================================ */
.content {
    padding: var(--spacing-2xl) var(--spacing-xl);
}

.section {
    margin-bottom: var(--spacing-2xl);
    animation: fadeIn 0.8s ease-out backwards;
}

.section:nth-child(2) {
    animation-delay: 0.1s;
}

.section:nth-child(3) {
    animation-delay: 0.2s;
}

.section:nth-child(4) {
    animation-delay: 0.3s;
}

.section:nth-child(5) {
    animation-delay: 0.4s;
}

.section:nth-child(6) {
    animation-delay: 0.5s;
}

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

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

.section-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: var(--spacing-lg);
    line-height: 1.3;
}

.subsection-title {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    line-height: 1.4;
}

.section-text {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: var(--spacing-md);
}

.section-text.emphasis {
    font-weight: 500;
    color: var(--primary-color);
    background: linear-gradient(to right, var(--primary-light), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   LISTS
   ============================================ */
.list {
    list-style: none;
    margin: var(--spacing-lg) 0;
}

.list-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    background: var(--bg-light);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    cursor: default;
}

.list-item:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%);
    transform: translateX(5px);
    box-shadow: var(--shadow-sm);
}

.list-icon {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    min-width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.list-item span:last-child {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   INFO CARDS
   ============================================ */
.info-card,
.warning-card {
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    border-left: 4px solid;
    position: relative;
    overflow: hidden;
}

.info-card {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.05) 0%, rgba(6, 182, 212, 0.05) 100%);
    border-left-color: var(--secondary-color);
}

.warning-card {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, rgba(251, 191, 36, 0.05) 100%);
    border-left-color: var(--warning-color);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
}

.info-card .card-icon {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
}

.warning-card .card-icon {
    background: linear-gradient(135deg, var(--warning-color), #fbbf24);
}

.card-icon svg {
    width: 24px;
    height: 24px;
    stroke: white;
}

/* ============================================
   DECLARATION SECTION
   ============================================ */
.declaration-section {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    border: 2px solid rgba(99, 102, 241, 0.2);
}

.declaration-text {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--primary-dark);
    text-align: center;
    line-height: 1.7;
}

/* ============================================
   FORM SECTION
   ============================================ */
.form-section {
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-white) 100%);
    padding: var(--spacing-2xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.form-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: var(--spacing-xl);
    text-align: center;
}

.form-group {
    margin-bottom: var(--spacing-xl);
}

.form-label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.form-textarea {
    width: 100%;
    padding: var(--spacing-md);
    font-family: var(--font-family);
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    resize: vertical;
    min-height: 200px;
    transition: all var(--transition-base);
    line-height: 1.6;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input {
    width: 100%;
    padding: var(--spacing-md);
    font-family: var(--font-family);
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    line-height: 1.6;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
    text-transform: none;
    letter-spacing: normal;
}

.input-hint {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: var(--spacing-xs);
    font-style: italic;
}

.form-textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.char-counter {
    text-align: right;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: var(--spacing-xs);
    font-weight: 500;
}

/* ============================================
   SUBMIT BUTTON
   ============================================ */
.submit-btn {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-xl);
    font-family: var(--font-family);
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.submit-btn::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 0.5s;
}

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

.submit-btn:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 20px -5px rgba(59, 130, 246, 0.4);
}

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

/* ============================================
   RESULT AREA
   ============================================ */
.result-area {
    margin-top: var(--spacing-2xl);
    animation: fadeInUp 0.5s ease-out;
}

.result-card {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.result-card-analyzing {
    border-left: 4px solid #3b82f6;
}

.result-card-investigating {
    border-left: 4px solid #f59e0b;
}

.result-card-completed {
    border-left: 4px solid #10b981;
}

.result-card-pending {
    border-left: 4px solid #8b5cf6;
}

.result-card-error {
    border-left: 4px solid #ef4444;
}

.result-header {
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-white) 100%);
    padding: var(--spacing-lg) var(--spacing-xl);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.result-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.result-badge {
    display: inline-flex;
    align-items: center;
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-analyzing {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
    color: #1e40af;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-investigating {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(251, 191, 36, 0.1) 100%);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-completed {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
    color: #065f46;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-pending {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
    color: #6d28d9;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.result-body {
    padding: var(--spacing-xl);
}

.result-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--bg-light);
    gap: var(--spacing-md);
}

.result-info:last-of-type {
    border-bottom: none;
}

.result-info strong {
    font-weight: 600;
    color: var(--text-primary);
}

.result-info span {
    color: var(--text-secondary);
    text-align: right;
}

.result-message {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-white) 100%);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary-color);
}

.result-message p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

.result-message p+p {
    margin-top: var(--spacing-md);
}

.submit-btn svg {
    width: 20px;
    height: 20px;
    stroke: white;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--bg-light);
    padding: var(--spacing-xl);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.footer-text {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 0.9375rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.footer-text svg {
    width: 20px;
    height: 20px;
    stroke: var(--success-color);
}

.footer-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--primary-color);
    background: var(--bg-white);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition-base);
    cursor: pointer;
}

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

.footer-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    body {
        padding: var(--spacing-md) var(--spacing-sm);
    }

    .hero {
        padding: var(--spacing-2xl) var(--spacing-md);
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .content {
        padding: var(--spacing-xl) var(--spacing-md);
    }

    .section-title {
        font-size: 1.5rem;
    }

    .subsection-title {
        font-size: 1.25rem;
    }

    .form-section {
        padding: var(--spacing-xl) var(--spacing-md);
    }

    .list-item {
        flex-direction: column;
        gap: var(--spacing-xs);
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        justify-content: center;
    }

    .footer-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-icon {
        width: 60px;
        height: 60px;
    }

    .hero-icon svg {
        width: 30px;
        height: 30px;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .submit-btn {
        font-size: 1rem;
    }
}

/* ============================================
   SUCCESS MODAL & ALERTS
   ============================================ */
.success-modal {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(5, 150, 105, 0.05) 100%);
    border: 2px solid #10b981;
    border-radius: var(--radius-lg);
    padding: var(--spacing-2xl);
    margin-bottom: var(--spacing-2xl);
    text-align: center;
    animation: fadeInUp 0.5s ease-out;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-lg);
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

.success-icon svg {
    width: 40px;
    height: 40px;
    stroke: white;
}

.success-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #065f46;
    margin-bottom: var(--spacing-md);
}

.success-message {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
    line-height: 1.7;
}

.protocolo-display {
    background: white;
    border: 2px solid #10b981;
    border-radius: var(--radius-md);
    padding: var(--spacing-xl);
    margin: var(--spacing-xl) 0;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.protocolo-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.protocolo-code {
    font-size: 2rem;
    font-weight: 700;
    color: #065f46;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.1em;
    user-select: all;
}

.success-note {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    background: rgba(16, 185, 129, 0.1);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    color: #065f46;
    line-height: 1.6;
    text-align: left;
}

.success-note svg {
    width: 20px;
    height: 20px;
    stroke: #10b981;
    flex-shrink: 0;
    margin-top: 2px;
}

.btn-consultar {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition-base);
    margin-top: var(--spacing-lg);
}

.btn-consultar:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.3);
}

.error-alert {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, rgba(220, 38, 38, 0.05) 100%);
    border: 2px solid #ef4444;
    border-left: 4px solid #ef4444;
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    animation: fadeInUp 0.3s ease-out;
}

.error-alert svg {
    width: 24px;
    height: 24px;
    stroke: #ef4444;
    flex-shrink: 0;
}

.error-alert span {
    font-size: 1rem;
    color: #991b1b;
    font-weight: 500;
}

/* ============================================
   ANIMATIONS & MICRO-INTERACTIONS
   ============================================ */
@media (prefers-reduced-motion: reduce) {


    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}