:root {
    --bg: #f5f5f1;
    --surface: #ffffff;
    --surface-2: #eeeeea;
    --text: #11120f;
    --muted: #77786f;
    --border: #dedfd8;

    --accent: #d8ff45;
    --accent-dark: #bce72d;

    --danger: #ff5e57;
    --warning: #ffb547;

    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family:
        Inter,
        ui-sans-serif,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.hidden {
    display: none !important;
}

.topbar {
    height: 80px;
    max-width: 1280px;
    margin: auto;
    padding: 0 28px;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    color: var(--text);
    text-decoration: none;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -.03em;
}

.brand-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;

    width: 38px;
    height: 38px;

    border-radius: 12px;
    background: var(--accent);

    color: #111;
    font-weight: 950;
}

.brand-icon.big {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    margin-bottom: 10px;
}

.nav-actions,
.dashboard-actions,
.hero-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn {
    border: 0;
    border-radius: 12px;

    padding: 11px 17px;

    font-weight: 750;

    transition: .15s ease;
}

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

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

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

.btn.ghost {
    background: transparent;
    color: var(--text);
}

.btn.large {
    padding: 15px 22px;
    border-radius: 14px;
}

.btn.full {
    width: 100%;
    padding: 14px;
}

.hero {
    max-width: 870px;

    margin: 110px auto 55px;
    padding: 0 24px;

    text-align: center;
}

.hero-badge,
.eyebrow {
    font-size: 12px;
    letter-spacing: .12em;
    font-weight: 850;
    text-transform: uppercase;
    color: var(--muted);
}

.hero-badge {
    display: inline-block;
    background: var(--surface-2);
    padding: 8px 12px;
    border-radius: 100px;
}

.hero h1 {
    margin: 26px 0 20px;

    font-size: clamp(54px, 8vw, 100px);
    line-height: .92;
    letter-spacing: -.07em;
}

.hero h1 span {
    background: var(--accent);
    padding: 0 .08em;
}

.hero-text {
    max-width: 680px;
    margin: auto;

    color: var(--muted);
    font-size: 19px;
    line-height: 1.6;
}

.hero-buttons {
    justify-content: center;
    margin-top: 32px;
}

.small-note {
    color: var(--muted);
    font-size: 13px;
    margin-top: 15px;
}

.preview-card {
    width: min(620px, calc(100% - 40px));
    margin: 30px auto 100px;

    background: #141510;
    color: white;

    border-radius: 30px;
    padding: 26px;

    box-shadow: 0 35px 90px rgba(0,0,0,.13);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    color: #aaa;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 100%;
    background: var(--accent);
}

.preview-card h2 {
    margin: 14px 0 22px;
    font-size: 28px;
    letter-spacing: -.04em;
}

.fake-item {
    display: flex;
    justify-content: space-between;
    align-items: center;

    background: #20211c;

    padding: 17px;
    border-radius: 15px;
    margin-top: 9px;
}

.fake-item div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fake-item span {
    color: #9d9e95;
    font-size: 13px;
}

.fake-item.danger {
    border-left: 3px solid var(--danger);
}

.fake-item.warning {
    border-left: 3px solid var(--warning);
}

.features {
    max-width: 1100px;
    margin: 0 auto 120px;
    padding: 0 25px;

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.features article {
    background: var(--surface);
    padding: 28px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.features h3 {
    font-size: 22px;
    margin: 20px 0 8px;
}

.features p {
    color: var(--muted);
    line-height: 1.6;
}

.feature-number {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.dashboard {
    max-width: 1280px;
    margin: auto;
    padding: 50px 28px 100px;
}

.dashboard-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 25px;
}

.dashboard-heading h1 {
    margin: 7px 0 0;
    font-size: clamp(36px, 5vw, 60px);
    letter-spacing: -.055em;
}

.stats-grid {
    margin-top: 45px;

    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.stat-card {
    min-height: 150px;
    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: var(--radius);

    padding: 20px;

    display: flex;
    flex-direction: column;
}

.stat-card > span,
.stat-card small {
    color: var(--muted);
}

.stat-card strong {
    font-size: 42px;
    letter-spacing: -.05em;
    margin-top: auto;
}

.stat-card.accent {
    background: var(--accent);
    border-color: var(--accent);
}

.stat-card.accent span,
.stat-card.accent small {
    color: #424631;
}

.content-grid {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 14px;

    margin-top: 14px;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
}

.panel-header h2 {
    font-size: 25px;
    margin: 5px 0 18px;
}

.list-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.list-item {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    align-items: center;

    padding: 15px;
    background: var(--bg);

    border-radius: 14px;
}

.list-item-main {
    overflow: hidden;
}

.list-item-main strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.list-item-main span {
    color: var(--muted);
    font-size: 13px;
}

.list-item-value {
    font-weight: 800;
    white-space: nowrap;
}

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

.user-email {
    color: var(--muted);
    font-size: 13px;
}

/* MODAL */

.modal {
    position: fixed;
    inset: 0;
    z-index: 50;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.38);
    backdrop-filter: blur(8px);
}

.modal-card {
    position: relative;
    z-index: 2;

    width: min(430px, 100%);

    background: var(--surface);
    border-radius: 25px;

    padding: 30px;

    box-shadow: 0 30px 100px rgba(0,0,0,.25);
}

.modal-card.wide {
    width: min(620px, 100%);
}

.modal-card h2 {
    margin: 6px 0 7px;
    font-size: 30px;
    letter-spacing: -.04em;
}

.modal-card > p {
    color: var(--muted);
    margin-top: 0;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;

    width: 36px;
    height: 36px;

    border: 0;
    border-radius: 100%;

    background: var(--bg);

    font-size: 22px;
}

form label {
    display: flex;
    flex-direction: column;
    gap: 7px;

    font-size: 13px;
    font-weight: 700;

    margin-top: 15px;
}

input,
select,
textarea {
    width: 100%;

    border: 1px solid var(--border);
    background: var(--bg);

    padding: 13px 14px;
    border-radius: 12px;

    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #999;
}

.form-error {
    margin: 12px 0;
    color: #bb302b;
    font-size: 13px;
}

.switch-auth {
    width: 100%;
    margin-top: 15px;

    border: 0;
    background: transparent;

    color: var(--muted);
}

.dropzone {
    text-align: center;
    padding: 35px 20px;
    background: var(--bg);
    border: 2px dashed var(--border);
    border-radius: 18px;
}

.dropzone span {
    color: var(--muted);
    font-weight: 400;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 12px;
}

.full-column {
    grid-column: 1 / -1;
}

.checkbox-label {
    flex-direction: row;
    align-items: center;
    align-self: end;

    min-height: 46px;
}

.checkbox-label input {
    width: auto;
}

@media (max-width: 850px) {

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

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

    .hero {
        margin-top: 70px;
    }

    .hero-buttons,
    .dashboard-actions {
        flex-direction: column;
        width: 100%;
    }

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

    .user-email {
        display: none;
    }
}

@media (max-width: 550px) {

    .topbar {
        padding: 0 16px;
    }

    .dashboard {
        padding-left: 15px;
        padding-right: 15px;
    }

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

    .full-column {
        grid-column: auto;
    }
}

/* ==========================================================
   GOOGLE LOGIN
   ========================================================== */

.google-login {
    width: 100%;

    margin-top: 20px;
    padding: 13px 16px;

    border: 1px solid var(--border);
    border-radius: 12px;

    background: #fff;
    color: #222;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    font-weight: 750;

    cursor: pointer;
}

.google-login:hover {
    background: #f8f8f6;
}

.google-g {
    width: 24px;
    height: 24px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #ddd;
    border-radius: 50%;

    font-weight: 900;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;

    margin: 20px 0 5px;

    color: var(--muted);
    font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
    content: "";

    height: 1px;
    flex: 1;

    background: var(--border);
}



/* ==========================================================
   ANALYSE DOCUMENT
   ========================================================== */

.document-actions {
    display: flex;
    gap: 7px;
    align-items: center;
}

.btn.analyze {
    background: var(--accent);
    color: #111;
}

.analysis-loading {
    margin-top: 25px;
    padding: 30px;

    text-align: center;

    background: var(--bg);
    border-radius: 16px;

    font-weight: 750;
}

.analysis-grid {
    margin: 25px 0;

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.analysis-grid > div {
    background: var(--bg);
    border-radius: 14px;

    padding: 14px;
}

.analysis-grid span {
    display: block;

    margin-bottom: 5px;

    color: var(--muted);
    font-size: 12px;
}

.analysis-grid strong {
    display: block;

    overflow: hidden;
    text-overflow: ellipsis;

    font-size: 15px;
}

.analysis-confidence {
    margin-bottom: 18px;

    color: var(--muted);
    font-size: 13px;
}

.analysis-confidence strong {
    color: var(--text);
}

@media (max-width: 550px) {

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

    .document-actions {
        flex-direction: column;
        align-items: stretch;
    }
}
