/* ================================
   RanxVerify™ - Global Styles
   ================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --neon-green: #39FF14;
    --black: #000000;
    --dark-gray: #1a1a1a;
    --medium-gray: #333333;
    --light-gray: #999999;
    --white: #ffffff;
    --red: #ff4444;
    --orange: #ff8c00;
    --yellow: #ffd700;
    --card-shadow: 0 0 40px rgba(57, 255, 20, 0.15);
    --hover-shadow: 0 0 60px rgba(57, 255, 20, 0.25);
}

body {
    font-family: 'Rajdhani', sans-serif;
    background: var(--black);
    color: var(--white);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    line-height: 1.6;
}

/* ================================
   Container & Card Layout
   ================================ */

.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.login-card,
.report-card {
    background: var(--dark-gray);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(57, 255, 20, 0.2);
    overflow: hidden;
}

.report-card {
    max-width: 1200px;
}

/* ================================
   Card Header
   ================================ */

.card-header {
    background: linear-gradient(135deg, var(--black) 0%, var(--medium-gray) 100%);
    padding: 40px 30px;
    text-align: center;
    border-bottom: 2px solid var(--neon-green);
}

.brand-title {
    font-size: 48px;
    font-weight: 700;
    color: var(--neon-green);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(57, 255, 20, 0.6);
}

.brand-subtitle {
    font-size: 18px;
    font-weight: 400;
    color: var(--light-gray);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ================================
   Card Body
   ================================ */

.card-body {
    padding: 40px 30px;
}

/* ================================
   Upload Sections
   ================================ */

.upload-section {
    margin-bottom: 35px;
}

.upload-label {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}

.label-text {
    font-size: 20px;
    font-weight: 600;
    color: var(--neon-green);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 4px;
}

.label-hint {
    font-size: 14px;
    font-weight: 400;
    color: var(--light-gray);
    letter-spacing: 1px;
}

.file-input-wrapper {
    position: relative;
    margin-bottom: 8px;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.file-input-display {
    background: var(--medium-gray);
    border: 2px dashed rgba(57, 255, 20, 0.3);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-input-wrapper:hover .file-input-display {
    border-color: var(--neon-green);
    background: rgba(57, 255, 20, 0.05);
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.1);
}

.file-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}

.file-text {
    font-size: 16px;
    font-weight: 500;
    color: var(--light-gray);
    letter-spacing: 1px;
}

.file-input-wrapper input[type="file"]:focus + .file-input-display {
    border-color: var(--neon-green);
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.2);
}

.file-info {
    font-size: 13px;
    color: var(--light-gray);
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* ================================
   Buttons
   ================================ */

.button-section {
    margin-top: 40px;
}

.btn-compare {
    width: 100%;
    background: linear-gradient(135deg, var(--neon-green) 0%, #2ecc40 100%);
    color: var(--black);
    border: none;
    border-radius: 12px;
    padding: 18px 30px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(57, 255, 20, 0.3);
}

.btn-compare:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(57, 255, 20, 0.5);
}

.btn-compare:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 24px;
}

.btn-text {
    font-size: 20px;
}

/* ================================
   Processing Indicator
   ================================ */

.processing-indicator {
    text-align: center;
    margin-top: 30px;
    padding: 30px;
    background: rgba(57, 255, 20, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(57, 255, 20, 0.2);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(57, 255, 20, 0.2);
    border-top-color: var(--neon-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.processing-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--neon-green);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.processing-subtext {
    font-size: 14px;
    color: var(--light-gray);
    font-weight: 400;
}

/* ================================
   Card Footer
   ================================ */

.card-footer {
    background: var(--black);
    padding: 25px 30px;
    text-align: center;
    border-top: 1px solid rgba(57, 255, 20, 0.2);
}

.footer-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--light-gray);
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.footer-subtext {
    font-size: 12px;
    font-weight: 400;
    color: var(--light-gray);
    letter-spacing: 0.5px;
}

/* ================================
   REPORT PAGE - Summary Section
   ================================ */

.report-summary {
    background: var(--medium-gray);
    padding: 30px;
    margin: 30px;
    border-radius: 12px;
    border: 1px solid rgba(57, 255, 20, 0.2);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 15px;
}

.summary-row:last-child {
    margin-bottom: 0;
}

.summary-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.summary-item-wide {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.summary-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--light-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.summary-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--white);
    letter-spacing: 0.5px;
}

.summary-label-large {
    font-size: 16px;
    font-weight: 600;
    color: var(--light-gray);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.summary-value-large {
    font-size: 36px;
    font-weight: 700;
    color: var(--neon-green);
    text-shadow: 0 0 15px rgba(57, 255, 20, 0.4);
    letter-spacing: 1px;
}

.recovered-profit-row {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid rgba(57, 255, 20, 0.3);
}

/* ================================
   REPORT PAGE - Discrepancy Sections
   ================================ */

.discrepancy-section {
    margin: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-radius: 12px 12px 0 0;
    margin-bottom: 0;
}

.critical-header {
    background: linear-gradient(135deg, #cc0000 0%, #ff4444 100%);
}

.warning-header {
    background: linear-gradient(135deg, #cc8800 0%, #ffd700 100%);
}

.matched-header {
    background: linear-gradient(135deg, #00aa00 0%, var(--neon-green) 100%);
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--white);
}

.section-count {
    font-size: 28px;
    font-weight: 700;
    color: var(--white);
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 20px;
    border-radius: 20px;
    min-width: 60px;
    text-align: center;
}

.discrepancy-list,
.matched-list {
    background: var(--medium-gray);
    border-radius: 0 0 12px 12px;
    border: 1px solid rgba(57, 255, 20, 0.2);
    border-top: none;
}

/* ================================
   Discrepancy Items
   ================================ */

.discrepancy-item {
    background: var(--dark-gray);
    margin: 15px;
    padding: 25px;
    border-radius: 10px;
    border: 1px solid rgba(57, 255, 20, 0.1);
    transition: all 0.3s ease;
}

.discrepancy-item:hover {
    border-color: rgba(57, 255, 20, 0.3);
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.1);
}

.discrepancy-item.excluded {
    opacity: 0.5;
    background: rgba(26, 26, 26, 0.5);
}

.discrepancy-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(57, 255, 20, 0.1);
}

.discrepancy-title {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.deal-number {
    font-size: 18px;
    font-weight: 700;
    color: var(--neon-green);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.customer-name {
    font-size: 16px;
    font-weight: 500;
    color: var(--white);
    letter-spacing: 0.5px;
}

.variance-badge {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.variance-direction {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 20px;
    letter-spacing: 1px;
}

.variance-direction.dealer-lost {
    background: var(--neon-green);
    color: var(--black);
}

.variance-direction.dealer-gained {
    background: var(--red);
    color: var(--white);
}

.variance-direction.neutral {
    background: var(--light-gray);
    color: var(--black);
}

.variance-amount {
    font-size: 24px;
    font-weight: 700;
    color: var(--neon-green);
    letter-spacing: 0.5px;
}

.discrepancy-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.product-info {
    display: flex;
    gap: 10px;
    align-items: center;
}

.product-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--light-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--white);
}

.comparison-row {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 8px;
}

.file-comparison {
    display: flex;
    gap: 30px;
}

.file-value {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.file-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--light-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.file-amount {
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
}

.ai-explanation {
    background: rgba(57, 255, 20, 0.05);
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid var(--neon-green);
}

.explanation-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--neon-green);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 8px;
}

.explanation-text {
    font-size: 15px;
    font-weight: 400;
    color: var(--white);
    line-height: 1.6;
}

/* ================================
   Exclusion Controls
   ================================ */

.exclusion-controls {
    margin-top: 10px;
}

.exclusion-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.exclusion-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--neon-green);
}

.exclusion-checkbox label {
    font-size: 15px;
    font-weight: 500;
    color: var(--light-gray);
    cursor: pointer;
}

.exclusion-options {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.exclusion-reason,
.exclusion-custom-reason {
    width: 100%;
    padding: 12px 16px;
    background: var(--dark-gray);
    border: 1px solid rgba(57, 255, 20, 0.2);
    border-radius: 8px;
    color: var(--white);
    font-family: 'Rajdhani', sans-serif;
    font-size: 15px;
    font-weight: 500;
    outline: none;
    transition: all 0.3s ease;
}

.exclusion-reason:focus,
.exclusion-custom-reason:focus {
    border-color: var(--neon-green);
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.2);
}

.exclusion-reason option {
    background: var(--dark-gray);
    color: var(--white);
}

.btn-save-exclusion {
    padding: 12px 24px;
    background: var(--neon-green);
    color: var(--black);
    border: none;
    border-radius: 8px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.btn-save-exclusion:hover {
    background: #2ecc40;
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.4);
}

.excluded-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid var(--light-gray);
    margin-top: 10px;
}

.excluded-text {
    font-size: 14px;
    font-weight: 700;
    color: var(--light-gray);
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 6px;
}

.excluded-reason {
    font-size: 14px;
    font-weight: 500;
    color: var(--white);
}

/* ================================
   Matched Items
   ================================ */

.matched-item {
    padding: 15px 20px;
    margin: 10px 15px;
    background: rgba(57, 255, 20, 0.05);
    border-radius: 8px;
    border-left: 3px solid var(--neon-green);
    display: flex;
    gap: 15px;
    align-items: center;
}

.matched-deal {
    font-size: 14px;
    font-weight: 700;
    color: var(--neon-green);
    text-transform: uppercase;
}

.matched-customer {
    font-size: 15px;
    font-weight: 500;
    color: var(--white);
    flex: 1;
}

.matched-status {
    font-size: 13px;
    font-weight: 500;
    color: var(--light-gray);
}

/* ================================
   Action Buttons
   ================================ */

.action-buttons {
    display: flex;
    gap: 15px;
    padding: 30px;
    flex-wrap: wrap;
}

.btn-action {
    flex: 1;
    min-width: 200px;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-download {
    background: linear-gradient(135deg, var(--neon-green) 0%, #2ecc40 100%);
    color: var(--black);
    box-shadow: 0 4px 15px rgba(57, 255, 20, 0.3);
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(57, 255, 20, 0.5);
}

.btn-email {
    background: linear-gradient(135deg, #0066cc 0%, #0088ff 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(0, 136, 255, 0.3);
}

.btn-email:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 136, 255, 0.5);
}

.btn-back {
    background: linear-gradient(135deg, var(--medium-gray) 0%, var(--light-gray) 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-back:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.5);
}

.btn-action:active {
    transform: translateY(0);
}

/* ================================
   Responsive Design
   ================================ */

@media (max-width: 768px) {
    .brand-title {
        font-size: 36px;
        letter-spacing: 3px;
    }

    .brand-subtitle {
        font-size: 14px;
    }

    .card-body {
        padding: 30px 20px;
    }

    .summary-row {
        flex-direction: column;
        gap: 15px;
    }

    .file-comparison {
        flex-direction: column;
        gap: 15px;
    }

    .discrepancy-header {
        flex-direction: column;
        gap: 15px;
    }

    .variance-badge {
        align-items: flex-start;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn-action {
        min-width: 100%;
    }

    .report-summary,
    .discrepancy-section {
        margin: 20px 15px;
    }

    .discrepancy-item {
        margin: 10px;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .brand-title {
        font-size: 28px;
        letter-spacing: 2px;
    }

    .summary-value-large {
        font-size: 28px;
    }

    .section-title {
        font-size: 18px;
    }

    .section-count {
        font-size: 20px;
        padding: 6px 15px;
    }
}