/* =========================================================
   COMPLYSCAN — SHARED STYLESHEET
   Used by:
   - index.html
   - dashboard.html
   - report.html
   ========================================================= */


/* =========================
   ROOT VARIABLES
   ========================= */

:root {
    --bg: #f7f8f5;
    --surface: #ffffff;
    --surface-2: #f1f3ef;

    --text: #17201c;
    --muted: #68736d;

    --line: #dfe5df;

    --orange: #ef6c35;
    --orange-dark: #d95522;
    --orange-light: #fff0e9;

    --teal: #168b78;
    --teal-dark: #0f6f61;
    --teal-light: #e3f5f0;

    --blue: #3976d8;
    --blue-light: #eaf1ff;

    --danger: #d94b3d;
    --danger-light: #ffe8e5;

    --warning: #c47a16;
    --warning-light: #fff4dc;

    --radius: 18px;

    --shadow:
        0 10px 30px rgba(25, 35, 30, 0.08);

    --shadow-hover:
        0 16px 35px rgba(25, 35, 30, 0.13);
}


/* =========================
   DARK MODE
   ========================= */

body.dark,
body.dark-mode {
    --bg: #101512;
    --surface: #18201c;
    --surface-2: #202923;

    --text: #f1f5f2;
    --muted: #a7b2ac;

    --line: #303a34;

    --orange: #ff8652;
    --orange-dark: #ff7040;
    --orange-light: #3a241b;

    --teal: #43bba5;
    --teal-dark: #63ceb9;
    --teal-light: #17352f;

    --blue: #6e9ff1;
    --blue-light: #1d2d48;

    --danger: #ff766a;
    --danger-light: #40211e;

    --warning: #e7a342;
    --warning-light: #3b2e1a;

    --shadow:
        0 10px 30px rgba(0, 0, 0, 0.25);

    --shadow-hover:
        0 16px 35px rgba(0, 0, 0, 0.35);
}


/* =========================
   RESET
   ========================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family:
        "DM Sans",
        Arial,
        sans-serif;
    line-height: 1.6;
    transition:
        background 0.25s ease,
        color 0.25s ease;
}

a {
    color: inherit;
}

button,
input {
    font: inherit;
}


/* =========================
   NAVBAR
   ========================= */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 18px 6%;
    background:
        color-mix(
            in srgb,
            var(--surface) 92%,
            transparent
        );
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
    transition: 0.25s ease;
}

/* INDEX BRAND */

.brand,
.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-family:
        "Space Grotesk",
        Arial,
        sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    white-space: nowrap;
}

.brand span span {
    color: var(--orange);
}

.brand-icon,
.logo-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--orange);
    color: white;
    font-weight: 800;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: 0.2s ease;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--orange);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    transition: 0.2s ease;
}

.theme-toggle:hover {
    border-color: var(--orange);
    transform: translateY(-2px);
}

.nav-button,
.nav-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 17px;
    border-radius: 10px;
    background: var(--orange);
    color: white;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 700;
    transition: 0.2s ease;
    white-space: nowrap;
}

.nav-button:hover,
.nav-cta:hover {
    background: var(--orange-dark);
    transform: translateY(-2px);
}


/* =========================
   COMMON BUTTONS
   ========================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 20px;
    border-radius: 11px;
    text-decoration: none;
    font-weight: 700;
    border: 1px solid transparent;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--orange);
    color: white;
}

.btn-primary:hover {
    background: var(--orange-dark);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border-color: var(--line);
}

.btn-secondary:hover {
    border-color: var(--orange);
}


/* =========================
   HERO
   ========================= */

.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns:
        minmax(0, 1.05fr)
        minmax(350px, 0.95fr);
    align-items: center;
    gap: 70px;
    padding: 140px 7% 80px;
    max-width: 1500px;
    margin: auto;
}

.hero-content {
    max-width: 680px;
}

.eyebrow {
    color: var(--orange);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero .eyebrow span {
    margin-right: 6px;
}

.hero h1 {
    margin: 18px 0;
    font-family:
        "Space Grotesk",
        Arial,
        sans-serif;
    font-size:
        clamp(3rem, 6vw, 5.8rem);
    line-height: 0.98;
    letter-spacing: -0.045em;
}

.hero h1 span {
    display: block;
    color: var(--orange);
}

.hero-content > p {
    max-width: 600px;
    color: var(--muted);
    font-size: 1.08rem;
    margin-bottom: 28px;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 42px;
}

.hero-stats div {
    display: flex;
    flex-direction: column;
}

.hero-stats strong {
    font-family:
        "Space Grotesk",
        Arial,
        sans-serif;
    font-size: 1.45rem;
}

.hero-stats span {
    color: var(--muted);
    font-size: 0.8rem;
}


/* =========================
   HERO VISUAL
   ========================= */

.hero-visual {
    position: relative;
    min-height: 500px;
    display: grid;
    place-items: center;
}

.product-card {
    position: relative;
    width: min(330px, 75%);
    min-height: 390px;
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 25px;
    box-shadow: var(--shadow);
    transform: rotate(-3deg);
    z-index: 2;
}

.product-top {
    font-size: 0.68rem;
    color: var(--muted);
    letter-spacing: 0.12em;
    margin-bottom: 45px;
}

.product-brand {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    color: var(--orange);
}

.product-card h2 {
    font-family:
        "Space Grotesk",
        Arial,
        sans-serif;
    font-size: 3.5rem;
    line-height: 1;
    margin: 10px 0;
}

.product-quantity {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 60px;
}

.product-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.product-info div {
    display: flex;
    flex-direction: column;
}

.product-info small {
    color: var(--muted);
    font-size: 0.65rem;
}

.product-info strong {
    font-size: 1rem;
}

.green-text {
    color: var(--teal);
}

.scan-line {
    position: absolute;
    left: 15px;
    right: 15px;
    top: 48%;
    height: 2px;
    background: var(--orange);
    opacity: 0.65;
    box-shadow: 0 0 12px var(--orange);
}

.floating-card,
.result-card {
    position: absolute;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    z-index: 4;
}

.floating-card {
    padding: 11px 15px;
    font-size: 0.78rem;
    font-weight: 700;
}

.tag-one {
    top: 17%;
    right: 5%;
    color: var(--teal);
}

.tag-two {
    bottom: 20%;
    left: 3%;
    color: var(--warning);
}

.result-card {
    right: 2%;
    bottom: 8%;
    width: 145px;
    padding: 18px;
    display: flex;
    flex-direction: column;
}

.result-card span {
    font-size: 0.62rem;
    color: var(--muted);
    letter-spacing: 0.08em;
}

.result-card strong {
    font-family:
        "Space Grotesk",
        Arial,
        sans-serif;
    font-size: 2rem;
}

.result-card small {
    color: var(--muted);
    font-size: 0.68rem;
}

.progress {
    width: 100%;
    height: 5px;
    margin-top: 12px;
    background: var(--surface-2);
    border-radius: 999px;
    overflow: hidden;
}

.progress div {
    width: 66%;
    height: 100%;
    background: var(--teal);
}


/* =========================
   SECTIONS
   ========================= */

.section {
    max-width: 1200px;
    margin: auto;
    padding: 100px 6%;
}

.scanner-section {
    padding-top: 90px;
}

.section-heading {
    max-width: 700px;
    margin-bottom: 45px;
}

.section-heading.center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.section-heading h2 {
    margin: 10px 0 15px;
    font-family:
        "Space Grotesk",
        Arial,
        sans-serif;
    font-size:
        clamp(2rem, 4vw, 3.5rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.section-heading p {
    color: var(--muted);
    max-width: 650px;
}


/* =========================
   SCANNER
   ========================= */

.scanner-card {
    max-width: 850px;
    margin: auto;
    padding: 30px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.drop-area {
    padding: 55px 25px;
    border: 2px dashed var(--line);
    border-radius: 16px;
    text-align: center;
    background: var(--surface-2);
    transition: 0.2s ease;
}

.drop-area:hover,
.drop-area.dragover {
    border-color: var(--orange);
    background: var(--orange-light);
}

.upload-icon {
    width: 55px;
    height: 55px;
    margin: 0 auto 15px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: var(--orange-light);
    color: var(--orange);
    font-size: 1.7rem;
    font-weight: 700;
}

.drop-area h3 {
    font-family:
        "Space Grotesk",
        Arial,
        sans-serif;
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.drop-area p {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.file-label {
    display: inline-block;
    cursor: pointer;
}

.file-label input {
    display: none;
}

.file-label span {
    display: inline-flex;
    padding: 11px 18px;
    border-radius: 9px;
    background: var(--orange);
    color: white;
    font-weight: 700;
}

.drop-area > small {
    display: block;
    margin-top: 12px;
    color: var(--muted);
    font-size: 0.75rem;
}


/* IMAGE PREVIEW */

.preview-container {
    margin-top: 20px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-2);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.remove-image {
    border: 0;
    background: transparent;
    color: var(--danger);
    cursor: pointer;
    font-weight: 700;
}

.preview-container img {
    display: block;
    width: 100%;
    max-height: 420px;
    object-fit: contain;
    border-radius: 10px;
}


/* LOADING */

.loading-message {
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    color: var(--muted);
}

.loader {
    width: 22px;
    height: 22px;
    border: 3px solid var(--line);
    border-top-color: var(--orange);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* ERROR */

.error-message {
    margin-top: 15px;
    padding: 13px 15px;
    border-radius: 10px;
    background: var(--danger-light);
    color: var(--danger);
    border: 1px solid var(--danger);
}


/* SCAN BUTTON */

.scan-button {
    width: 100%;
    margin-top: 20px;
    border: 0;
}

.scan-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.scanner-note {
    margin-top: 12px;
    text-align: center;
    color: var(--muted);
    font-size: 0.75rem;
}


/* =========================
   FEATURES
   ========================= */

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card {
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: 0.25s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 800;
    margin-bottom: 22px;
}

.feature-icon.orange {
    background: var(--orange-light);
    color: var(--orange);
}

.feature-icon.blue {
    background: var(--blue-light);
    color: var(--blue);
}

.feature-icon.green {
    background: var(--teal-light);
    color: var(--teal);
}

.feature-card h3 {
    font-family: "Space Grotesk", Arial, sans-serif;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--muted);
    font-size: 0.9rem;
}


/* =========================
   HOW IT WORKS
   ========================= */

.how-section {
    background: var(--surface-2);
    max-width: none;
    padding-left: 7%;
    padding-right: 7%;
}

.steps-grid {
    max-width: 1100px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.step-card {
    padding: 30px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.step-number {
    color: var(--orange);
    font-family: "Space Grotesk", Arial, sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.blue-step {
    color: var(--blue);
}

.green-step {
    color: var(--teal);
}

.step-card h3 {
    font-family: "Space Grotesk", Arial, sans-serif;
    margin-bottom: 8px;
}

.step-card p {
    color: var(--muted);
    font-size: 0.9rem;
}


/* =========================
   CTA
   ========================= */

.cta-section {
    padding: 90px 6%;
    text-align: center;
    background: var(--orange);
    color: white;
}

.cta-icon {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    margin: 0 auto 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 1.4rem;
}

.cta-section h2 {
    font-family: "Space Grotesk", Arial, sans-serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.05;
    margin-bottom: 12px;
}

.cta-section p {
    max-width: 550px;
    margin: 0 auto 25px;
    opacity: 0.9;
}

.cta-button {
    background: white;
    color: var(--orange);
}

.cta-button:hover {
    background: #fff8f4;
}


/* =========================
   FOOTER
   ========================= */

.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    padding: 35px 6%;
    background: var(--surface);
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.82rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.footer-brand .brand-icon {
    width: 30px;
    height: 30px;
}


/* =========================================================
   DASHBOARD
   ========================================================= */

.dashboard-page {
    padding: 130px 6% 70px;
    max-width: 1400px;
    margin: auto;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 30px;
    margin-bottom: 45px;
}

.dashboard-header h1 {
    font-family: "Space Grotesk", Arial, sans-serif;
    font-size: clamp(2.4rem, 5vw, 4.5rem);
    line-height: 0.98;
    margin: 10px 0 15px;
    letter-spacing: -0.04em;
}

.dashboard-header p {
    color: var(--muted);
    max-width: 620px;
}

.dashboard-actions {
    display: flex;
    gap: 12px;
}

.dashboard-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    padding: 12px 18px;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 700;
    transition: 0.25s ease;
}

.dashboard-btn:hover {
    transform: translateY(-2px);
    border-color: var(--orange);
}


/* STATS */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    transition: 0.25s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.stat-label {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.stat-number {
    font-family: "Space Grotesk", Arial, sans-serif;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
}

.stat-card.total .stat-number {
    color: var(--orange);
}

.stat-card.compliant .stat-number {
    color: var(--teal);
}

.stat-card.non-compliant .stat-number {
    color: var(--danger);
}


/* DASHBOARD GRID */

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 25px;
    margin-bottom: 25px;
}

.dashboard-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
}

.card-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.card-heading h2 {
    font-family: "Space Grotesk", Arial, sans-serif;
    font-size: 1.35rem;
    margin: 0;
}

.card-heading span {
    color: var(--muted);
    font-size: 0.85rem;
}

.chart-container {
    position: relative;
    height: 330px;
}

.recent-scans {
    margin-top: 25px;
}


/* SCAN LIST */

.scan-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.scan-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 17px 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    background: var(--surface-2);
    transition: 0.25s ease;
}

.scan-item:hover {
    transform: translateX(4px);
    border-color: var(--orange);
}

.scan-info {
    min-width: 0;
}

.scan-title {
    font-weight: 700;
    margin-bottom: 5px;
}

.scan-date {
    color: var(--muted);
    font-size: 0.82rem;
}

.status-badge {
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.status-badge.pass {
    background: var(--teal-light);
    color: var(--teal);
}

.status-badge.fail {
    background: var(--danger-light);
    color: var(--danger);
}


/* DASHBOARD STATES */

.empty-state,
.loading-state {
    text-align: center;
    padding: 45px 20px;
    color: var(--muted);
}

.empty-state strong {
    display: block;
    color: var(--text);
    font-family: "Space Grotesk", Arial, sans-serif;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.error-box {
    display: none;
    margin-bottom: 25px;
    padding: 15px 18px;
    border-radius: 12px;
    background: var(--danger-light);
    color: var(--danger);
    border: 1px solid var(--danger);
}


/* =========================================================
   REPORT PAGE
   ========================================================= */

.report-page {
    padding: 130px 6% 70px;
    max-width: 1100px;
    margin: auto;
}

.report-container,
.container {
    width: 90%;
    max-width: 1100px;
    margin: 40px auto;
}

/* REPORT TITLE */

.page-title {
    font-family: "Space Grotesk", Arial, sans-serif;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1;
    margin-bottom: 8px;
}

.subtitle {
    color: var(--muted);
    margin-bottom: 30px;
}

/* REPORT STATUS */

.status-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
    text-align: center;
}

.status-label {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

#overallStatus {
    font-family: "Space Grotesk", Arial, sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.status-message {
    color: var(--muted);
    font-size: 0.9rem;
}

.compliant {
    color: var(--teal);
}

.non-compliant {
    color: var(--danger);
}

.unknown {
    color: var(--warning);
}

/* REPORT CARD */

.report-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
}

.report-card h2 {
    font-family: "Space Grotesk", Arial, sans-serif;
    margin-bottom: 20px;
    font-size: 1.4rem;
}

/* RULE */

.rule {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 15px;
    background: var(--surface-2);
    transition: 0.2s ease;
}

.rule:hover {
    border-color: var(--orange);
}

.rule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.rule-name {
    font-weight: 700;
    font-size: 1rem;
}

.rule-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
}

.rule-status.pass {
    background: var(--teal-light);
    color: var(--teal);
}

.rule-status.fail {
    background: var(--danger-light);
    color: var(--danger);
}

.rule-status.warning {
    background: var(--warning-light);
    color: var(--warning);
}

.rule-status.default {
    background: var(--surface-2);
    color: var(--muted);
    border: 1px solid var(--line);
}

.rule-detail {
    color: var(--muted);
    line-height: 1.6;
    font-size: 0.86rem;
}

/* REPORT BUTTONS */

.actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.actions button {
    border: 0;
    padding: 13px 22px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    transition: 0.2s ease;
}

.actions button:hover {
    transform: translateY(-2px);
}

.back-btn {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--line) !important;
}

.pdf-btn {
    background: var(--orange);
    color: white;
}

/* REPORT LOADING */

.loading {
    text-align: center;
    padding: 50px;
    color: var(--muted);
}

/* REPORT ERROR */

.error {
    background: var(--danger-light);
    color: var(--danger);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--danger);
}

/* REPORT EMPTY */

.empty {
    text-align: center;
    color: var(--muted);
    padding: 30px;
}


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

@media (max-width: 1000px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 30px;
        padding-top: 130px;
        text-align: center;
    }

    .hero-content {
        margin: auto;
    }

    .hero-content > p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons,
    .hero-stats {
        justify-content: center;
    }

    .hero-visual {
        min-height: 450px;
    }

    .features-grid,
    .steps-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-actions {
        width: 100%;
    }
}

/* MOBILE FIX (Screen <= 700px) */
@media (max-width: 700px) {
    .navbar {
        padding: 10px 4%;
        gap: 10px;
        flex-wrap: wrap;
    }

    .brand,
    .logo {
        font-size: 1.05rem;
    }

    .brand-icon,
    .logo-mark {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }

    /* Keep nav links accessible and horizontally scrollable on mobile */
    .nav-links {
        display: flex !important;
        order: 3;
        width: 100%;
        justify-content: flex-start;
        gap: 16px;
        padding: 6px 0 2px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        border-top: 1px solid var(--line);
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-links a {
        font-size: 0.82rem;
        padding: 4px 6px;
    }

    .nav-actions {
        gap: 8px;
    }

    .theme-toggle {
        width: 36px;
        height: 36px;
    }

    .nav-button,
    .nav-cta {
        padding: 8px 12px;
        font-size: 0.78rem;
    }

    .hero {
        padding: 120px 5% 60px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-stats {
        gap: 20px;
        flex-wrap: wrap;
    }

    .section {
        padding: 60px 5%;
    }

    .scanner-card,
    .dashboard-card,
    .stat-card,
    .report-card {
        padding: 18px;
    }

    .dashboard-page {
        padding: 120px 5% 50px;
    }

    .dashboard-actions {
        flex-direction: column;
    }

    .dashboard-btn {
        width: 100%;
    }

    .scan-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .chart-container {
        height: 260px;
    }

    .container {
        width: 94%;
        margin-top: 25px;
    }

    .rule-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .hero-visual {
        min-height: 360px;
    }

    .product-card {
        width: 82%;
        min-height: 320px;
        padding: 20px;
    }

    .product-card h2 {
        font-size: 2.5rem;
    }

    .product-quantity {
        margin-bottom: 35px;
    }

    .floating-card {
        font-size: 0.68rem;
        padding: 8px 10px;
    }

    .result-card {
        width: 120px;
        padding: 12px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .actions {
        flex-direction: column;
    }

    .actions button {
        width: 100%;
    }
}

/* =========================================================
   COMPLYSCAN HTML COMPATIBILITY FIX
   ========================================================= */

/* HERO BADGE */
.hero-badge {
    display: inline-block;
    color: var(--orange);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* HERO BUTTONS */
.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* HERO PRODUCT LABEL */
.product-label-card {
    position: relative;
    width: min(330px, 75%);
    min-height: 390px;
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 25px;
    box-shadow: var(--shadow);
    transform: rotate(-3deg);
    z-index: 2;
}

.label-top {
    font-size: 0.68rem;
    color: var(--muted);
    letter-spacing: 0.12em;
    margin-bottom: 45px;
}

.label-product {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 25px;
}

.label-details {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.label-details span {
    color: var(--muted);
    font-size: 0.85rem;
}

.label-details strong {
    font-size: 0.9rem;
}

.label-status {
    margin-top: 20px;
    color: var(--teal);
    font-weight: 700;
    font-size: 0.85rem;
}

/* FEATURES */
.features-section {
    max-width: 1200px;
    margin: auto;
    padding: 100px 6%;
}

/* HOW IT WORKS */
.how-it-works {
    max-width: 1200px;
    margin: auto;
    padding: 100px 6%;
}

/* STEP CARDS */
.step {
    padding: 30px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.step h3 {
    font-family: "Space Grotesk", Arial, sans-serif;
    margin-bottom: 8px;
}

.step p {
    color: var(--muted);
    font-size: 0.9rem;
}

@media (max-width: 1000px) {
    .hero-actions {
        justify-content: center;
    }

    .features-section,
    .how-it-works {
        padding-left: 5%;
        padding-right: 5%;
    }
}

@media (max-width: 480px) {
    .product-label-card {
        width: 75%;
        min-height: 330px;
        padding: 22px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
    }
}

/* =========================
   BROWSE BUTTON & REPORT LAYOUT
========================= */

.browse-button {
    display: inline-block;
    margin: 8px 0 12px;
    padding: 8px 18px;
    border-radius: 8px;
    background: var(--orange);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.browse-button:hover {
    background: var(--orange-dark);
}

/* Push content down so navbar doesn't cover heading */
.container {
    margin-top: 40px !important;
    padding: 20px !important;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-title {
    margin-top: 20px;
    font-size: 32px;
    font-weight: 800;
}

/* Clean centered image display */
.report-image img {
    max-width: 240px;
    max-height: 200px;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    display: inline-block;
    margin-top: 15px;
}

/* Dashboard Action Buttons */
.scan-item-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 16px 20px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-2);
    transition: 0.2s ease;
}

.scan-item-wrapper:hover {
    border-color: var(--orange);
    background: var(--surface);
}

.scan-clickable {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-grow: 1;
    text-decoration: none;
    color: inherit;
    gap: 15px;
}

.scan-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
    transition: 0.2s ease;
}

.btn-icon:hover {
    color: var(--text);
    border-color: var(--text);
}

.btn-icon.delete:hover {
    background: var(--danger-light);
    color: var(--danger);
    border-color: var(--danger);
}