/**
 * HMRC Red Flag Scan - Clean Professional Frontend
 * Elegant, minimal design with perfect spacing and alignment
 */

/* CSS Variables for Consistency */
:root {
    /* Primary colors - will be overridden by PHP-generated custom variables */
    --primary-color: var(--devedge-hmrc-primary, #2563eb);
    --primary-hover: var(--devedge-hmrc-primary-hover, #1d4ed8);
    --success-color: var(--devedge-hmrc-success, #059669);
    --warning-color: var(--devedge-hmrc-warning, #d97706);
    --danger-color: var(--devedge-hmrc-danger, #dc2626);
    --info-color: var(--devedge-hmrc-info, #17a2b8);
    
    /* Risk colors */
    --risk-high-color: var(--devedge-hmrc-risk-high, #dc2626);
    --risk-medium-color: var(--devedge-hmrc-risk-medium, #d97706);
    --risk-low-color: var(--devedge-hmrc-risk-low, #059669);
    
    /* Button colors */
    --btn-primary-bg: var(--devedge-hmrc-btn-primary-bg, #2563eb);
    --btn-primary-text: var(--devedge-hmrc-btn-primary-text, #ffffff);
    --btn-primary-bg-hover: var(--devedge-hmrc-btn-primary-bg-hover, #1d4ed8);
    --btn-primary-text-hover: var(--devedge-hmrc-btn-primary-text-hover, #ffffff);
    --btn-secondary-bg: var(--devedge-hmrc-btn-secondary-bg, #ffffff);
    --btn-secondary-text: var(--devedge-hmrc-btn-secondary-text, #2563eb);
    --btn-secondary-bg-hover: var(--devedge-hmrc-btn-secondary-bg-hover, #f6f7f7);
    --btn-secondary-text-hover: var(--devedge-hmrc-btn-secondary-text-hover, #1d4ed8);
    
    /* Header gradient */
    --header-gradient: var(--devedge-hmrc-header-gradient, linear-gradient(135deg, #2563eb, #1d4ed8));
    
    /* Layout colors */
    --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;
    --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);
    --border-radius: 12px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Base Styles */
.devedge-hmrc-scan-tool * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Main Container - Clean Design */
.devedge-hmrc-scan-tool {
    max-width: 1350px;
    margin: 2rem auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

/* Responsive Container Width */
@media (max-width: 1024px) {
    .devedge-hmrc-scan-tool {
        margin: 1rem;
    }
}

/* Header - Minimal Clean Design */
.devedge-hmrc-header {
    background: var(--gray-50);
    padding: 3rem 2rem;
    text-align: center;
    border-bottom: 1px solid var(--gray-200);
}

.devedge-hmrc-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

/* Red Flag Text Styling */
.devedge-hmrc-title .red-flag-text {
    color: #dc2626;
    font-weight: 700;
}

.devedge-hmrc-subtitle {
    font-size: 1.125rem;
    color: var(--gray-600);
    font-weight: 400;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* Progress Steps - Clean Minimal */
.devedge-hmrc-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2.5rem 2rem;
    background: #ffffff;
    border-bottom: 1px solid var(--gray-200);
    gap: 4rem;
}

.devedge-hmrc-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transition: var(--transition);
}

.devedge-hmrc-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: calc(100% + 1rem);
    top: 1rem;
    width: 2rem;
    height: 1px;
    background: var(--gray-300);
    transition: var(--transition);
}

.devedge-hmrc-step.active:not(:last-child)::after {
    background: var(--primary-color);
}

.step-number {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--gray-100);
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    transition: var(--transition);
    border: 2px solid var(--gray-300);
}

.devedge-hmrc-step.active .step-number {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.step-label {
    font-weight: 500;
    color: var(--gray-500);
    font-size: 0.875rem;
    transition: var(--transition);
}

.devedge-hmrc-step.active .step-label {
    color: var(--gray-900);
    font-weight: 600;
}

/* Form Container - Clean Layout */
.devedge-hmrc-form-container {
    padding: 3rem 2rem;
}

.devedge-hmrc-form {
    width: 100%;
}

.devedge-hmrc-step-content {
    opacity: 0;
    animation: fadeIn 0.4s ease-out forwards;
}

/* Form Groups - Professional Spacing */
.devedge-hmrc-input-group {
    margin-bottom: 2rem;
}

.devedge-hmrc-label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--gray-900);
    font-size: 0.875rem;
    letter-spacing: 0.025em;
}

.required {
    color: var(--danger-color);
}

.devedge-hmrc-input {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: #ffffff;
    color: var(--gray-900);
    font-weight: 400;
}

.devedge-hmrc-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.devedge-hmrc-input::placeholder {
    color: var(--gray-400);
}

.devedge-hmrc-field-hint {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-500);
    line-height: 1.5;
}

/* Buttons - Clean Professional Design */
.devedge-hmrc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    min-width: 120px;
    letter-spacing: 0.025em;
}

.devedge-hmrc-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.devedge-hmrc-btn-primary {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border-color: var(--btn-primary-bg);
}

.devedge-hmrc-btn-primary:hover:not(:disabled) {
    background: var(--btn-primary-bg-hover);
    color: var(--btn-primary-text-hover);
    border-color: var(--btn-primary-bg-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.devedge-hmrc-btn-secondary {
    background: var(--btn-secondary-bg);
    color: var(--btn-secondary-text);
    border-color: var(--btn-secondary-text);
}

.devedge-hmrc-btn-secondary:hover:not(:disabled) {
    background: var(--btn-secondary-bg-hover);
    color: var(--btn-secondary-text-hover);
    border-color: var(--btn-secondary-text-hover);
    transform: translateY(-1px);
}

/* Form Actions */
.devedge-hmrc-form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
}

/* File Upload - Clean Design */
.devedge-hmrc-file-upload {
    position: relative;
}

.devedge-hmrc-file-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.devedge-hmrc-file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    border: 2px dashed var(--gray-300);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    background: var(--gray-50);
    text-align: center;
    gap: 1rem;
}

.devedge-hmrc-file-label:hover,
.devedge-hmrc-file-input:focus + .devedge-hmrc-file-label {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.file-icon {
    font-size: 2rem;
    color: var(--gray-400);
}

.file-text {
    color: var(--gray-700);
}

.file-text strong {
    color: var(--primary-color);
    font-weight: 600;
}

.file-text small {
    display: block;
    color: var(--gray-500);
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.devedge-hmrc-file-info {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
    font-size: 0.875rem;
    color: var(--gray-700);
}

/* Checkbox - Clean Design */
.devedge-hmrc-checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    line-height: 1.6;
    gap: 0.75rem;
}

.devedge-hmrc-checkbox {
    margin-top: 0.125rem;
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary-color);
}

.checkbox-text {
    font-size: 0.875rem;
    color: var(--gray-700);
    line-height: 1.6;
}

/* Company Search Results - Clean Professional */
.devedge-hmrc-company-results {
    margin-top: 2rem;
    animation: fadeIn 0.4s ease-out;
}

.devedge-hmrc-company-results h4 {
    margin: 0 0 1rem 0;
    color: var(--gray-900);
    font-weight: 600;
    font-size: 1rem;
}

.devedge-hmrc-company-list {
    max-height: 350px;
    overflow-y: auto;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    background: white;
}

.company-option {
    padding: 1.25rem;
    border-bottom: 1px solid var(--gray-100);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.company-option:last-child {
    border-bottom: none;
}

.company-option:hover {
    background: var(--gray-50);
}

.company-option.selected {
    background: rgba(37, 99, 235, 0.05);
    border-left: 4px solid var(--primary-color);
    padding-left: calc(1.25rem - 4px);
}

.company-name {
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.company-details {
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.company-status {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.company-status.active {
    background: rgba(5, 150, 105, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.company-status.dissolved {
    background: rgba(220, 38, 38, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(220, 38, 38, 0.2);
}

/* Report Container - Clean Full Width */
.devedge-hmrc-report {
    background: white;
    margin: 0;
    animation: fadeIn 0.5s ease-out;
}

/* Report Header - Clean Professional */
.report-header {
    background: var(--header-gradient);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
}

.report-header .container {
    max-width: 1350px;
    margin: 0 auto;
}

/* Report Header Company Name - White for Dark Background */
.report-header .company-name {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    letter-spacing: -0.025em;
    color: #ffffff;
}

.report-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.report-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Risk Score - Clean Design */
.report-score {
    padding: 4rem 2rem;
    text-align: center;
    background: var(--gray-50);
}

.report-score .container {
    max-width: 1350px;
    margin: 0 auto;
}

/* New Score Section with CTA Layout */
.report-score-section {
    padding: 4rem 2rem;
    background: var(--gray-50);
}

.report-score-section .container {
    max-width: 1350px;
    margin: 0 auto;
}

.score-cta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: 300px;
}

/* CTA Section Styles */
.cta-section {
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--primary-color);
}

.cta-content {
    text-align: left;
}

.cta-heading {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--gray-900);
    margin: 0 0 1rem 0;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.cta-description {
    font-size: 1rem;
    color: var(--gray-700);
    margin: 0 0 2rem 0;
    line-height: 1.6;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background: var(--btn-primary-bg-hover, #005177);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
    color: white;
}

.cta-button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Score Section within Grid */
.score-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.score-display {
    display: inline-block;
}

.score-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    margin: 0 auto 2rem;
    box-shadow: var(--shadow-xl);
    transition: var(--transition);
}

.score-display.risk-low .score-circle {
    background: var(--risk-low-color);
}

.score-display.risk-medium .score-circle {
    background: var(--risk-medium-color);
}

.score-display.risk-medium-high .score-circle {
    background: var(--risk-medium-color);
}

.score-display.risk-high .score-circle {
    background: var(--risk-high-color);
}

.score-number {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
}

.score-label {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.score-subtitle {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-top: 0.25rem;
}

.risk-status {
    text-align: center;
}

.risk-badge {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: white;
    box-shadow: var(--shadow-md);
}

.risk-badge.risk-low {
    background: var(--risk-low-color);
}

.risk-badge.risk-medium {
    background: var(--risk-medium-color);
}

.risk-badge.risk-medium-high {
    background: var(--risk-medium-color);
}

.risk-badge.risk-high {
    background: var(--risk-high-color);
}

/* Risk Summary - Clean Design */
.risk-summary {
    padding: 3rem 2rem;
    background: white;
    border-bottom: 1px solid var(--gray-200);
}

.risk-interpretation {
    max-width: 1350px;
    margin: 0 auto;
    text-align: center;
}

.risk-alert {
    padding: 2rem;
    border-radius: var(--border-radius);
    background: white;
    box-shadow: var(--shadow-md);
    border-left: 4px solid;
    text-align: left;
    max-width: 1350px;
    margin: 0 auto;
}

.risk-alert.high {
    border-left-color: var(--risk-high-color);
    background: rgba(220, 38, 38, 0.02);
}

.risk-alert.medium-high {
    border-left-color: var(--risk-medium-color);
    background: rgba(217, 119, 6, 0.02);
}

.risk-alert.medium {
    border-left-color: var(--risk-medium-color);
    background: rgba(217, 119, 6, 0.02);
}

.risk-alert.low {
    border-left-color: var(--risk-low-color);
    background: rgba(5, 150, 105, 0.02);
}

.risk-alert strong {
    display: block;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
}

.risk-alert p {
    margin: 0;
    line-height: 1.7;
    color: var(--gray-700);
    font-size: 1rem;
}

/* Report Content Grid - Clean Layout */
.report-content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    padding: 3rem 2rem;
    max-width: 1350px;
    margin: 0 auto;
    background: var(--gray-50);
}

/* Report sections hover and focus states */
.report-section {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

.report-section:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* File Analysis Section Specific Styling */
.report-section.file-analysis {
    border-left: 4px solid var(--info-color);
}

.report-section.file-analysis .section-header {
    background: rgba(0, 160, 210, 0.05);
}

.file-analysis-content {
    background: var(--gray-50);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 3px solid var(--info-color);
}

.file-analysis-content .analysis-heading {
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 600;
    margin: 1rem 0 0.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.file-analysis-content .analysis-text {
    color: var(--gray-700);
    line-height: 1.6;
    margin: 0.75rem 0;
    font-size: 0.95rem;
}

.file-analysis-summary {
    background: rgba(0, 160, 210, 0.1);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(0, 160, 210, 0.2);
}

.file-analysis-summary .analysis-text {
    color: var(--gray-700);
    font-weight: 500;
    margin: 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.section-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--gray-900);
    flex: 1;
}

.section-icon {
    font-size: 1.5rem;
    padding: 0.5rem;
    border-radius: 8px;
    background: white;
    box-shadow: var(--shadow-sm);
    margin-right: 0;
}

.item-count {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: auto;
}

.section-content {
    padding: 1.5rem;
}

.summary-text {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--gray-700);
    margin: 0;
}

/* Lists - Clean Card Style */
.risk-list,
.positive-list,
.recommendation-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.risk-item,
.positive-item,
.recommendation-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    border: 1px solid;
    background: white;
}

.risk-item:hover,
.positive-item:hover,
.recommendation-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.risk-item {
    border-color: rgba(220, 38, 38, 0.2);
    background: rgba(220, 38, 38, 0.02);
}

.positive-item {
    border-color: rgba(5, 150, 105, 0.2);
    background: rgba(5, 150, 105, 0.02);
}

.recommendation-item {
    border-color: rgba(217, 119, 6, 0.2);
    background: rgba(217, 119, 6, 0.02);
}

.item-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
    padding: 0.5rem;
    border-radius: 8px;
    background: white;
    box-shadow: var(--shadow-sm);
}

.item-text {
    flex: 1;
    line-height: 1.6;
    color: var(--gray-700);
    font-size: 0.875rem;
}

/* Email Confirmation - Clean Design */
.email-confirmation {
    background: rgba(5, 150, 105, 0.05);
    border: 1px solid rgba(5, 150, 105, 0.2);
    margin: 2rem auto;
    border-radius: var(--border-radius);
    overflow: hidden;
    max-width: 1350px;
}

.email-success {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    color: var(--success-color);
}

.email-icon {
    font-size: 2rem;
    flex-shrink: 0;
    padding: 0.75rem;
    border-radius: var(--border-radius);
    background: rgba(5, 150, 105, 0.1);
}

.email-text strong {
    display: block;
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

.email-text p {
    margin: 0;
    color: var(--gray-700);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* HMRC Consultation CTA Box - Professional Design */
.hmrc-consultation-cta {
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin: 3rem auto;
    max-width: 1350px;
    text-align: center;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.hmrc-consultation-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.hmrc-consultation-cta .cta-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.hmrc-consultation-cta .cta-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
    line-height: 1.3;
    letter-spacing: -0.025em;
}

.hmrc-consultation-cta .cta-description {
    font-size: 1.125rem;
    color: var(--gray-700);
    margin-bottom: 2rem;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hmrc-consultation-cta .cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    cursor: pointer;
}

.hmrc-consultation-cta .cta-button:hover {
    background: var(--btn-primary-bg-hover);
    color: var(--btn-primary-text-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.hmrc-consultation-cta .cta-button-icon {
    font-size: 1.125rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hmrc-consultation-cta {
        margin: 2rem 1.5rem;
        padding: 1.5rem;
    }
    
    .hmrc-consultation-cta .cta-title {
        font-size: 1.25rem;
    }
    
    .hmrc-consultation-cta .cta-description {
        font-size: 1rem;
    }
    
    .hmrc-consultation-cta .cta-button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hmrc-consultation-cta {
        margin: 1.5rem 1rem;
        padding: 1.25rem;
    }
    
    .hmrc-consultation-cta .cta-title {
        font-size: 1.125rem;
    }
    
    .hmrc-consultation-cta .cta-description {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
}
.report-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 3rem 2rem;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
}

.report-actions .container {
    max-width: 1350px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    min-width: 160px;
    justify-content: center;
}

.action-btn.primary {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border: 1px solid var(--btn-primary-bg);
}

.action-btn.primary:hover {
    background: var(--btn-primary-bg-hover);
    color: var(--btn-primary-text-hover);
    border-color: var(--btn-primary-bg-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.action-btn.secondary {
    background: var(--btn-secondary-bg);
    color: var(--btn-secondary-text);
    border: 1px solid var(--btn-secondary-text);
}

.action-btn.secondary:hover {
    background: var(--btn-secondary-bg-hover);
    color: var(--btn-secondary-text-hover);
    border-color: var(--btn-secondary-text-hover);
    transform: translateY(-1px);
}

/* Loading States - Clean Design */
.devedge-hmrc-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.devedge-hmrc-loading-content {
    text-align: center;
    max-width: 400px;
    padding: 2rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-200);
}

.devedge-hmrc-loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--gray-200);
    border-left: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem auto;
}

#loading-title {
    margin: 0 0 0.75rem 0;
    color: var(--gray-900);
    font-size: 1.25rem;
    font-weight: 600;
}

#loading-message {
    margin: 0 0 2rem 0;
    color: var(--gray-600);
    line-height: 1.5;
    font-size: 0.875rem;
}

.devedge-hmrc-loading-steps {
    text-align: left;
}

.loading-step {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    opacity: 0.5;
    transition: var(--transition);
    font-size: 0.875rem;
    color: var(--gray-600);
}

.loading-step.active {
    opacity: 1;
    background: rgba(37, 99, 235, 0.05);
    color: var(--primary-color);
    font-weight: 600;
}

.step-icon {
    margin-right: 0.75rem;
    font-size: 1.125rem;
}

/* Spinner */
.devedge-hmrc-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-left: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

/* Animations - Clean and Smooth */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Error States - Clean Design */
.devedge-hmrc-error {
    background: rgba(220, 38, 38, 0.05);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin: 1rem 0;
    color: var(--danger-color);
    font-size: 0.875rem;
    line-height: 1.5;
}

.field-error {
    border-color: var(--danger-color) !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

.error-message {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    line-height: 1.4;
}

/* Button Loading States */
.btn-loading {
    display: none;
}

.devedge-hmrc-btn.loading .btn-text {
    display: none;
}

.devedge-hmrc-btn.loading .btn-loading {
    display: flex;
    align-items: center;
}

/* Responsive Design - Mobile First */
@media (max-width: 1024px) {
    .score-cta-grid {
        gap: 3rem;
    }
    
    .cta-heading {
        font-size: 1.5rem;
    }
    
    .score-circle {
        width: 180px;
        height: 180px;
    }
    
    .score-number {
        font-size: 2.75rem;
    }
}

@media (max-width: 768px) {
    .devedge-hmrc-scan-tool {
        margin: 0.5rem;
        border-radius: var(--border-radius);
    }
    
    .devedge-hmrc-header {
        padding: 2rem 1.5rem;
    }
    
    .devedge-hmrc-title {
        font-size: 1.875rem;
    }
    
    .devedge-hmrc-subtitle {
        font-size: 1rem;
    }
    
    .devedge-hmrc-progress {
        padding: 2rem 1rem;
        gap: 2rem;
    }
    
    .devedge-hmrc-step:not(:last-child)::after {
        width: 1.5rem;
    }
    
    .step-number {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 0.8rem;
    }
    
    .step-label {
        font-size: 0.8rem;
    }
    
    .devedge-hmrc-form-container {
        padding: 2rem 1.5rem;
    }
    
    .devedge-hmrc-form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .devedge-hmrc-btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Report Mobile Styles */
    .devedge-hmrc-report {
        margin: 0;
    }
    
    .report-header {
        padding: 3rem 1.5rem;
    }
    
    .company-name {
        font-size: 2rem;
    }
    
    .report-meta {
        gap: 1rem;
        flex-direction: column;
        align-items: center;
    }
    
    .report-meta span {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .report-score {
        padding: 3rem 1.5rem;
    }
    
    .report-score-section {
        padding: 3rem 1.5rem;
    }
    
    .score-cta-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .cta-section {
        order: 2;
        padding: 1.5rem;
    }
    
    .score-section {
        order: 1;
    }
    
    .cta-content {
        text-align: center;
    }
    
    .cta-heading {
        font-size: 1.5rem;
    }
    
    .cta-button {
        padding: 0.875rem 2rem;
        font-size: 1rem;
        width: 100%;
        max-width: 280px;
    }
    
    .score-circle {
        width: 160px;
        height: 160px;
    }
    
    .score-number {
        font-size: 2.5rem;
    }
    
    .risk-summary {
        padding: 2rem 1.5rem;
    }
    
    .report-content-grid {
        grid-template-columns: 1fr;
        padding: 2rem 1.5rem;
        gap: 1.5rem;
    }
    
    .section-header {
        padding: 1.25rem;
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
    }
    
    .section-header h3 {
        flex: 1;
    }
    
    .section-content {
        padding: 1.25rem;
    }
    
    .risk-alert {
        padding: 1.5rem;
    }
    
    .email-confirmation {
        margin: 2rem 1.5rem 0 1.5rem;
        max-width: calc(100% - 3rem);
    }
    
    .email-success {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .report-actions {
        flex-direction: column;
        padding: 2rem 1.5rem;
        gap: 0.75rem;
    }
    
    .action-btn {
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .devedge-hmrc-scan-tool {
        margin: 0.25rem;
    }
    
    .report-score-section {
        padding: 2rem 1rem;
    }
    
    .cta-section {
        padding: 1.25rem;
        margin: 0 0.5rem;
    }
    
    .cta-heading {
        font-size: 1.25rem;
        line-height: 1.3;
    }
    
    .cta-description {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .cta-button {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
    }
    
    .score-circle {
        width: 140px;
        height: 140px;
    }
    
    .score-number {
        font-size: 2.25rem;
    }
    
    .score-label {
        font-size: 0.875rem;
    }
    
    .devedge-hmrc-header {
        padding: 1.5rem 1rem;
    }
    
    .devedge-hmrc-title {
        font-size: 1.5rem;
    }
    
    .devedge-hmrc-subtitle {
        font-size: 0.9rem;
    }
    
    .devedge-hmrc-progress {
        padding: 1.5rem 0.75rem;
        gap: 1.5rem;
    }
    
    .step-number {
        width: 2rem;
        height: 2rem;
        font-size: 0.75rem;
    }
    
    .step-label {
        font-size: 0.75rem;
    }
    
    .devedge-hmrc-form-container {
        padding: 1.5rem 1rem;
    }
    
    .devedge-hmrc-input {
        padding: 0.875rem 1rem;
    }
    
    /* Report Mobile Styles */
    .devedge-hmrc-report {
        margin: 0;
    }
    
    .report-header {
        padding: 2rem 1rem;
    }
    
    .company-name {
        font-size: 1.75rem;
    }
    
    .report-score {
        padding: 2.5rem 1rem;
    }
    
    .score-circle {
        width: 140px;
        height: 140px;
    }
    
    .score-number {
        font-size: 2rem;
    }
    
    .score-label {
        font-size: 0.875rem;
    }
    
    .risk-summary {
        padding: 2rem 1rem;
    }
    
    .report-content-grid {
        padding: 2rem 1rem;
        gap: 1rem;
    }
    
    .section-header {
        padding: 1rem;
    }
    
    .section-header h3 {
        font-size: 1.125rem;
    }
    
    .section-content {
        padding: 1rem;
    }
    
    .risk-alert {
        padding: 1.25rem;
    }
    
    .email-confirmation {
        margin: 1.5rem 1rem 0 1rem;
        max-width: calc(100% - 2rem);
    }
    
    .risk-item,
    .positive-item,
    .recommendation-item {
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .item-text {
        font-size: 0.8rem;
    }
    
    .report-actions {
        padding: 2rem 1rem;
    }
    
    .action-btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.8rem;
    }
}

/* Focus States for Accessibility */
.devedge-hmrc-input:focus,
.devedge-hmrc-btn:focus,
.action-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .devedge-hmrc-report {
        width: 100% !important;
        margin: 0 !important;
        box-shadow: none !important;
    }
    
    .report-actions {
        display: none !important;
    }
    
    .action-btn {
        display: none !important;
    }
    
    .report-header,
    .report-score,
    .risk-summary,
    .report-content-grid {
        break-inside: avoid;
    }
    
    .devedge-hmrc-progress,
    .devedge-hmrc-form-actions {
        display: none !important;
    }
}

/* Professional Financial Analysis Styling */
.file-analysis-content.professional-format {
    background: #ffffff;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 2rem;
    line-height: 1.7;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.analysis-section-heading {
    color: var(--gray-900);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 2rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.analysis-section-heading:first-child {
    margin-top: 0;
}

.analysis-sub-heading {
    color: var(--gray-800);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem 0;
    padding-left: 1rem;
    border-left: 3px solid var(--primary-color);
}

.analysis-paragraph {
    color: var(--gray-700);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.7;
    text-align: justify;
}

.analysis-bullet {
    color: var(--gray-700);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
    list-style: none;
    line-height: 1.6;
}

.analysis-bullet::before {
    content: '\2022';
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 1.1rem;
}

/* Enhanced Professional Error Handling */
.file-analysis-error {
    background: #fef2f2 !important;
    border: 1px solid #fecaca !important;
    color: #991b1b !important;
    padding: 1.5rem !important;
    border-radius: 8px !important;
    margin: 1rem 0 !important;
}

.file-analysis-error h4 {
    color: #991b1b !important;
    margin-top: 0 !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
}