
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: #f5f7fb;
    color: #111827;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
.quick-actions a {
    border: 0;
    border-radius: 12px;
    padding: 12px 18px;
    cursor: pointer;
    background: #2563eb;
    color: white;
}

.topbar {
    height: 64px;
    background: white;
    border-bottom: 1px solid #e5e7eb;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 20px;

    position: sticky;
    top: 0;
    z-index: 10;
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 24px;
}

.hero {
    margin-bottom: 30px;
}

.dashboard-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(200px, 1fr)
        );

    gap: 16px;
}

.dashboard-card {
    background: white;
    border-radius: 18px;
    padding: 24px;

    min-height: 140px;

    display: flex;
    flex-direction: column;

    justify-content: center;

    box-shadow:
        0 2px 8px
        rgba(0,0,0,.05);
}

.dashboard-card .icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.dashboard-card small {
    color: #6b7280;
    margin-top: 5px;
}

.scanner-card {
    background: #2563eb;
    color: white;
}

.scanner-page {
    max-width: 700px;
}

#reader {
    background: black;
    border-radius: 20px;
    overflow: hidden;
    margin: 20px 0;
}

.asset-result {
    background: white;
    border-radius: 18px;
    padding: 24px;
    box-shadow:
        0 2px 10px
        rgba(0,0,0,.06);
}

.hidden {
    display: none;
}

.actions {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.stats {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(150px, 1fr)
        );

    gap: 15px;
}

.stat {
    background: white;
    border-radius: 16px;
    padding: 22px;

    display: flex;
    flex-direction: column;

    box-shadow:
        0 2px 8px
        rgba(0,0,0,.05);
}

.stat span {
    font-size: 30px;
    font-weight: 700;
}

.stat small {
    color: #6b7280;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 25px;
}

.search,
.login-box input {
    width: 100%;
    padding: 14px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    background: white;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
}

.login-box {
    width: min(420px, 90%);
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow:
        0 10px 30px
        rgba(0,0,0,.08);
}

.login-box form {
    display: grid;
    gap: 12px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.report-grid {
    display: grid;
    grid-template-columns:
        repeat(
            auto-fit,
            minmax(180px, 1fr)
        );

    gap: 15px;
}

.report-card {
    background: white;
    padding: 25px;
    border-radius: 16px;

    display: flex;
    flex-direction: column;
}

.report-card strong {
    font-size: 32px;
}

@media(max-width:600px) {

    .container {
        padding: 16px;
    }

    .topbar {
        padding: 0 12px;
    }

    .page-header {
        align-items: stretch;
        flex-direction: column;
    }

}

/* ============================================================
   ADD ASSET MODAL
   ============================================================ */

.modal {
    position: fixed;
    inset: 0;

    background: rgba(0, 0, 0, 0.55);

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    z-index: 1000;
}


.modal-box {
    background: white;

    width: min(
        600px,
        100%
    );

    max-height: 90vh;

    overflow-y: auto;

    border-radius: 20px;

    padding: 24px;

    box-shadow:
        0 20px 60px
        rgba(0, 0, 0, 0.25);
}


.modal-header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 20px;
}


.modal-header h2 {
    margin: 0;
}


.close-button {
    background: transparent;

    color: #111827;

    font-size: 28px;

    padding: 4px 10px;

    border: 0;

    cursor: pointer;
}


#addAssetForm {
    display: grid;

    gap: 15px;
}


#addAssetForm label {
    display: flex;

    flex-direction: column;

    gap: 7px;

    font-weight: 600;
}


#addAssetForm input,
#addAssetForm select,
#addAssetForm textarea {
    width: 100%;

    padding: 12px;

    border: 1px solid #d1d5db;

    border-radius: 10px;

    background: white;
}


#addAssetForm textarea {
    min-height: 100px;

    resize: vertical;
}


.modal-actions {
    display: flex;

    justify-content: flex-end;

    gap: 10px;

    margin-top: 10px;
}


.modal-actions button:first-child {
    background: #e5e7eb;

    color: #111827;
}


.form-error {
    color: #dc2626;

    margin: 0;
}


@media (max-width: 600px) {

    .modal {
        padding: 10px;

        align-items: flex-end;
    }

    .modal-box {
        max-height: 95vh;

        border-radius:
            20px 20px 0 0;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-actions button {
        width: 100%;
    }

}
