/* IT Evolution — CRS & FATCA Validator */

:root {
    --ite-dark: #1A1D21;
    --ite-primary: #455A73;
    --ite-blue: #5D809E;
    --ite-blue-light: #7D9BB5;
    --ite-accent-green: #94A8A6;
    --ite-coming-soon-bg: #6B9E96;
    --ite-coming-soon-dark: #4A7A72;
    --ite-info-amber: #E6A817;
    --ite-cta-red: #C0392B;
    --ite-cta-red-hover: #A93226;
    --ite-bg: #F4F6F8;
    --ite-card-bg: #FFFFFF;
    --ite-text-dark: #2C3E50;
    --ite-text-muted: #6C757D;
    --ite-text-on-dark: #FFFFFF;

    --bs-primary: #455A73;
    --bs-primary-rgb: 69, 90, 115;
    --bs-danger: #C0392B;
    --bs-danger-rgb: 192, 57, 43;
}

body {
    background-color: var(--ite-bg);
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--ite-text-dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.ite-header {
    background-color: var(--ite-dark);
    color: var(--ite-text-on-dark);
    padding: 1rem 0;
}

.ite-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.ite-header-brand {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    text-decoration: none;
    color: inherit;
}

.ite-header-brand:hover {
    color: inherit;
    opacity: 0.95;
}

.ite-logo-wrap {
    background: #ffffff;
    border-radius: 8px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.ite-logo {
    height: 52px;
    width: auto;
    max-width: 280px;
    display: block;
}

.ite-app-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--ite-text-on-dark);
    opacity: 0.9;
    border-left: 1px solid rgba(255, 255, 255, 0.25);
    padding-left: 1.25rem;
}

.ite-header-link {
    color: var(--ite-text-on-dark);
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.9;
}

.ite-header-link:hover {
    color: var(--ite-text-on-dark);
    opacity: 1;
    text-decoration: underline;
}

/* Feedback */
.ite-feedback {
    background-color: var(--ite-card-bg);
    border-top: 1px solid rgba(69, 90, 115, 0.12);
    border-bottom: 1px solid rgba(69, 90, 115, 0.12);
    padding: 1.25rem 0;
}

.ite-feedback-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.ite-feedback-text {
    font-size: 0.9rem;
    color: var(--ite-text-muted);
    margin: 0;
    flex: 1;
    min-width: 200px;
}

.ite-feedback-text strong {
    color: var(--ite-text-dark);
}

.ite-feedback-icon {
    color: var(--ite-info-amber);
    margin-right: 0.35rem;
}

.ite-feedback-form-panel {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(69, 90, 115, 0.12);
}

.ite-feedback-form .form-label {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.ite-feedback-thanks {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(148, 168, 166, 0.15);
    border-radius: 8px;
    color: var(--ite-text-dark);
    font-size: 0.9rem;
}

.ite-feedback-thanks i {
    color: #27AE60;
    margin-right: 0.35rem;
}

/* Footer */
.ite-footer {
    background-color: var(--ite-dark);
    color: var(--ite-text-on-dark);
    padding: 2rem 0 1.5rem;
    margin-top: auto;
}

.ite-footer a {
    color: var(--ite-blue-light);
    text-decoration: none;
}

.ite-footer a:hover {
    color: var(--ite-text-on-dark);
    text-decoration: underline;
}

.ite-footer-logo-wrap {
    background: #ffffff;
    border-radius: 8px;
    padding: 5px 8px;
    display: inline-flex;
    align-items: center;
    margin-bottom: 1rem;
}

.ite-footer-logo {
    height: 44px;
    width: auto;
    max-width: 240px;
    display: block;
}

.ite-footer-status {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Main content */
.ite-main {
    flex: 1;
    padding: 2rem 0 3rem;
}

/* SEO intro */
.ite-seo-intro {
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.ite-seo-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--ite-primary);
    margin-bottom: 0.75rem;
}

.ite-seo-lead {
    font-size: 1rem;
    color: var(--ite-text-muted);
    line-height: 1.7;
    margin-bottom: 0;
}

/* Buttons — navy for actions; red reserved for errors only */
.btn-ite-primary {
    background-color: var(--ite-primary);
    border-color: var(--ite-primary);
    color: #fff;
    border-radius: 50px;
    font-weight: 600;
    padding: 0.6rem 1.75rem;
    transition: all 0.15s ease-in-out;
}

.btn-ite-primary:hover,
.btn-ite-primary:focus {
    background-color: var(--ite-blue);
    border-color: var(--ite-blue);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

.btn-ite-accent {
    background-color: var(--ite-accent-green);
    border-color: var(--ite-accent-green);
    color: #fff;
    border-radius: 50px;
    font-weight: 600;
    padding: 0.6rem 1.75rem;
    transition: all 0.15s ease-in-out;
}

.btn-ite-accent:hover,
.btn-ite-accent:focus {
    background-color: #7d9694;
    border-color: #7d9694;
    color: #fff;
}

.btn-ite-secondary {
    border-radius: 50px;
    font-weight: 500;
    padding: 0.6rem 1.5rem;
    border: 2px solid var(--ite-primary);
    color: var(--ite-primary);
    background: transparent;
}

.btn-ite-secondary:hover {
    background-color: var(--ite-primary);
    color: #fff;
    border-color: var(--ite-primary);
}

/* Cards */
.ite-card {
    background: var(--ite-card-bg);
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.ite-card-accent {
    border-left: 4px solid var(--ite-info-amber);
}

.ite-info-icon {
    color: var(--ite-info-amber);
}

/* Coming soon banner */
.ite-coming-soon {
    background-color: var(--ite-coming-soon-bg);
    color: var(--ite-text-on-dark);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
}

.ite-coming-soon .badge {
    background-color: var(--ite-coming-soon-dark);
    color: #fff;
    font-size: 0.75rem;
}

/* Selection cards */
.ite-select-card {
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
    background: var(--ite-card-bg);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.ite-select-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.ite-select-card.selected {
    border-color: var(--ite-primary);
    box-shadow: 0 0 0 3px rgba(69, 90, 115, 0.2);
}

.ite-select-card-header {
    background-color: var(--ite-blue);
    color: var(--ite-text-on-dark);
    padding: 1.5rem;
    text-align: center;
}

.ite-select-card.selected .ite-select-card-header {
    background-color: var(--ite-primary);
}

.ite-select-card-header i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.ite-select-card-body {
    padding: 1.25rem;
}

/* Progress stepper */
.ite-stepper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.ite-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ite-step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    background-color: var(--ite-blue-light);
    color: #fff;
}

.ite-step.active .ite-step-circle {
    background-color: var(--ite-primary);
}

.ite-step.completed .ite-step-circle {
    background-color: var(--ite-primary);
}

.ite-step-label {
    font-size: 0.8rem;
    color: var(--ite-text-muted);
    display: none;
}

.ite-step.active .ite-step-label,
.ite-step.completed .ite-step-label {
    color: var(--ite-text-dark);
    font-weight: 500;
}

.ite-step-connector {
    width: 40px;
    height: 2px;
    background-color: var(--ite-blue-light);
    margin: 0 0.5rem;
}

.ite-step.completed + .ite-step-connector,
.ite-step-connector.completed {
    background-color: var(--ite-primary);
}

@media (min-width: 768px) {
    .ite-step-label {
        display: inline;
    }
    .ite-step-connector {
        width: 60px;
    }
}

/* Summary stat cards */
.ite-stat-card {
    background: var(--ite-card-bg);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ite-stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--ite-primary);
    line-height: 1.2;
}

.ite-stat-card .stat-value.error {
    color: var(--ite-cta-red);
}

.ite-stat-card .stat-value.success {
    color: #27AE60;
}

.ite-stat-card .stat-value.warning {
    color: #E67E22;
}

.ite-stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--ite-text-muted);
    margin-top: 0.25rem;
}

/* Verdict */
.ite-verdict {
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.ite-verdict.pass {
    background-color: #D5F5E3;
    color: #1E8449;
    border-left: 4px solid #27AE60;
}

.ite-verdict.fail {
    background-color: #FADBD8;
    color: #922B21;
    border-left: 4px solid var(--ite-cta-red);
}

.ite-verdict.advisory {
    background-color: #FDEBD0;
    color: #9A6324;
    border-left: 4px solid #E67E22;
}

/* Honeypot — hidden from users, visible to bots */
.ite-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* Drop zone */
.ite-dropzone {
    border: 2px dashed var(--ite-blue-light);
    border-radius: 12px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #fff;
}

.ite-dropzone:hover,
.ite-dropzone:focus {
    border-color: var(--ite-primary);
    background-color: rgba(69, 90, 115, 0.04);
    outline: none;
}

.ite-dropzone.dragover {
    border-color: var(--ite-primary);
    background-color: rgba(69, 90, 115, 0.08);
    border-style: solid;
}

.ite-dropzone.has-file {
    border-color: var(--ite-accent-green);
    border-style: solid;
    background-color: rgba(148, 168, 166, 0.08);
}

.ite-dropzone-icon {
    font-size: 2.5rem;
    color: var(--ite-blue);
    margin-bottom: 0.75rem;
    display: block;
}

.ite-dropzone-title {
    font-weight: 600;
    color: var(--ite-text-dark);
}

.ite-dropzone-hint {
    font-size: 0.875rem;
    color: var(--ite-text-muted);
}

.ite-dropzone-link {
    color: var(--ite-primary);
    font-weight: 500;
    text-decoration: underline;
}

.ite-dropzone-file {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ite-primary);
}

/* Forms */
.form-control {
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.form-control:focus {
    border-color: var(--ite-blue);
    box-shadow: 0 0 0 0.2rem rgba(93, 128, 158, 0.25);
}

/* Error table */
.ite-error-table th {
    background-color: var(--ite-primary);
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
}

.ite-error-table td {
    font-size: 0.875rem;
    vertical-align: top;
}

.badge-error {
    background-color: var(--ite-cta-red);
}

.badge-warning {
    background-color: #E67E22;
}

.badge-info {
    background-color: var(--ite-blue);
}

/* Filing info */
.filing-info-item {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--ite-bg);
}

.filing-info-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.filing-info-item strong {
    color: var(--ite-primary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Download options */
.ite-download-option {
    border: 2px solid var(--ite-bg);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: border-color 0.2s;
}

.ite-download-option.available:hover {
    border-color: var(--ite-primary);
}

.ite-download-option.disabled {
    opacity: 0.6;
}

/* CTA card */
.ite-cta-card {
    background: linear-gradient(135deg, var(--ite-primary) 0%, var(--ite-blue) 100%);
    color: var(--ite-text-on-dark);
    border-radius: 12px;
    padding: 2rem;
}

/* Loading */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Status badges */
.status-healthy {
    background-color: #27AE60 !important;
}

.status-unhealthy {
    background-color: var(--ite-cta-red) !important;
}

.status-pending {
    background-color: #E67E22 !important;
    color: #fff !important;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.4s ease-in-out;
}

.wizard-step {
    display: none;
}

.wizard-step.active {
    display: block;
}

/* Alerts */
.ite-alert-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    max-width: 400px;
}

/* Responsive */
@media (max-width: 768px) {
    .ite-header-inner {
        flex-direction: column;
        text-align: center;
    }

    .ite-header-brand {
        flex-direction: column;
        gap: 0.75rem;
    }

    .ite-app-title {
        border-left: none;
        padding-left: 0;
    }

    .ite-logo {
        height: 44px;
        max-width: 220px;
    }
}
