/* ==================== Consulta Semanas Cotizadas IMSS ==================== */

#csi-app {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    max-width: 600px;
    margin: 0 auto;
    color: #1e293b;
    line-height: 1.6;
}

#csi-app * {
    box-sizing: border-box;
}

/* Header */
.csi-header {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 20px 16px;
}

.csi-header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.csi-header-between {
    justify-content: space-between;
}

.csi-shield-icon {
    width: 24px;
    height: 24px;
    color: #059669;
    flex-shrink: 0;
}

.csi-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.3;
}

.csi-subtitle {
    font-size: 13px;
    color: #94a3b8;
    margin: 0;
}

/* Main */
.csi-main {
    padding: 32px 16px;
}

.csi-result-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Form */
.csi-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.csi-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.csi-label {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

.csi-input {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    font-size: 17px;
    border: 2px solid #cbd5e1;
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
    color: #0f172a;
}

.csi-input-mono {
    font-family: 'SF Mono', 'Cascadia Mono', 'Consolas', monospace;
    text-align: center;
    letter-spacing: 2px;
}

.csi-input:focus {
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.csi-input::placeholder {
    color: #94a3b8;
    letter-spacing: 0.5px;
    font-size: 14px;
}

.csi-input:disabled {
    background: #f1f5f9;
    cursor: not-allowed;
}

.csi-help {
    font-size: 12px;
    color: #94a3b8;
    margin: 0;
}

.csi-help a {
    color: #059669;
    text-decoration: none;
}

.csi-help a:hover {
    text-decoration: underline;
}

/* Error */
.csi-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #991b1b;
    font-size: 14px;
}

/* Buttons */
.csi-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    text-decoration: none;
    font-size: 15px;
}

.csi-btn:active {
    transform: scale(0.98);
}

.csi-btn-primary {
    width: 100%;
    height: 52px;
    background: #059669;
    color: #fff;
    font-size: 17px;
}

.csi-btn-primary:hover:not(:disabled) {
    background: #047857;
}

.csi-btn-primary:disabled {
    background: #cbd5e1;
    color: #64748b;
    cursor: not-allowed;
    transform: none;
}

.csi-btn-icon {
    width: 20px;
    height: 20px;
}

.csi-spinner {
    width: 20px;
    height: 20px;
    animation: csi-spin 1s linear infinite;
}

@keyframes csi-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.csi-wait {
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
    margin: 0;
}

/* Info Section */
.csi-info {
    margin-top: 40px;
}

.csi-info-divider {
    border-top: 1px solid #e2e8f0;
    padding-top: 0;
}

.csi-info-title {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    margin: 20px 0 12px 0;
}

.csi-info-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.csi-info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.csi-info-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #ecfdf5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.csi-info-icon svg {
    width: 16px;
    height: 16px;
    color: #059669;
}

.csi-info-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.csi-info-item-desc {
    font-size: 12px;
    color: #64748b;
    margin: 2px 0 0 0;
}

.csi-privacy {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 12px;
}

.csi-shield-sm {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Footer */
.csi-footer {
    border-top: 1px solid #e2e8f0;
    background: #fff;
    padding: 16px;
    text-align: center;
    margin-top: 32px;
}

.csi-footer p {
    font-size: 12px;
    color: #94a3b8;
    margin: 0;
}

/* ==================== RESULTADOS ==================== */

/* Back button */
.csi-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

.csi-back-btn:hover {
    color: #0f172a;
}

/* Hero Card */
.csi-hero {
    background: linear-gradient(135deg, #ecfdf5, #f0fdfa);
    border: 2px solid #a7f3d0;
    border-radius: 14px;
    padding: 36px 20px;
    text-align: center;
}

.csi-hero-label {
    font-size: 13px;
    font-weight: 600;
    color: #047857;
    margin: 0 0 8px 0;
    letter-spacing: 0.5px;
}

.csi-hero-count {
    font-size: 56px;
    font-weight: 800;
    color: #047857;
    margin: 0;
    line-height: 1.1;
}

.csi-hero-nss {
    font-size: 13px;
    color: #059669;
    margin: 8px 0 0 0;
}

/* Badge */
.csi-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 14px;
}

.csi-badge svg {
    width: 14px;
    height: 14px;
}

.csi-badge-success {
    background: #059669;
    color: #fff;
}

.csi-badge-warning {
    background: #f59e0b;
    color: #fff;
}

/* Demo alert */
.csi-demo-alert {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.csi-demo-alert svg {
    color: #d97706;
}

.csi-demo-alert-title {
    font-size: 14px;
    font-weight: 600;
    color: #92400e;
    margin: 0;
}

.csi-demo-alert-text {
    font-size: 13px;
    color: #a16207;
    margin: 4px 0 0 0;
}

.csi-demo-alert-hint {
    font-size: 12px;
    color: #b45309;
    margin: 8px 0 0 0;
}

/* PDF Card */
.csi-pdf-card {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.csi-pdf-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.csi-pdf-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e40af;
    margin: 0;
}

.csi-pdf-hint {
    font-size: 12px;
    color: #3b82f6;
    margin: 2px 0 0 0;
}

.csi-btn-pdf {
    background: #2563eb;
    color: #fff;
    padding: 10px 18px;
    white-space: nowrap;
    flex-shrink: 0;
}

.csi-btn-pdf:hover {
    background: #1d4ed8;
}

/* Historial Card */
.csi-historial-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
}

.csi-historial-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 20px 0 20px;
}

.csi-historial-title {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.csi-historial-desc {
    font-size: 13px;
    color: #64748b;
    margin: 2px 0 0 0;
}

.csi-historial-list {
    padding: 16px 20px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.csi-empleo {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    transition: border-color 0.2s;
}

.csi-empleo:hover {
    border-color: #cbd5e1;
}

.csi-empleo-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.csi-empleo-name {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}

.csi-empleo-reg {
    font-size: 12px;
    color: #94a3b8;
    margin: 2px 0 0 0;
}

.csi-empleo-badge {
    background: #f1f5f9;
    color: #475569;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.csi-empleo-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

@media (min-width: 480px) {
    .csi-empleo-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.csi-empleo-detail {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #475569;
}

.csi-empleo-detail svg {
    width: 14px;
    height: 14px;
    color: #94a3b8;
    flex-shrink: 0;
}

.csi-empleo-detail-label {
    font-size: 11px;
    color: #94a3b8;
    margin: 0;
}

.csi-empleo-detail-value {
    font-weight: 500;
    color: #334155;
    margin: 0;
}

.csi-empty {
    text-align: center;
    padding: 32px 16px;
    color: #94a3b8;
    font-size: 14px;
}

/* CTA Card */
.csi-cta-card {
    background: linear-gradient(135deg, #ecfdf5, #f0fdfa);
    border: 1px solid #a7f3d0;
    border-radius: 14px;
    padding: 28px 20px;
    text-align: center;
}

.csi-cta-title {
    font-size: 17px;
    font-weight: 700;
    color: #047857;
    margin: 0 0 8px 0;
}

.csi-cta-text {
    font-size: 14px;
    color: #059669;
    margin: 0 0 18px 0;
}

.csi-btn-cta {
    background: #059669;
    color: #fff;
    padding: 14px 28px;
    font-size: 15px;
    border-radius: 10px;
}

.csi-btn-cta:hover {
    background: #047857;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 480px) {
    .csi-pdf-card {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .csi-hero-count {
        font-size: 44px;
    }
}
