* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f8fafc;
    color: #0f172a;
}

header {
    max-width: 1180px;
    margin: auto;
    padding: 22px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header > a {
    font-size: 24px;
    font-weight: 800;
    color: #2563eb;
    text-decoration: none;
}

header nav {
    display: flex;
    gap: 26px;
}

header nav a {
    color: #475569;
    text-decoration: none;
    font-weight: 600;
}

header nav a:hover {
    color: #2563eb;
}

main {
    max-width: 1180px;
    margin: auto;
    padding: 25px 24px 70px;
}


/* HERO */

.hero {
    padding: 55px 0 40px;
}

.hero > b {
    display: inline-block;
    color: #2563eb;
    font-size: 13px;
    letter-spacing: .06em;
    margin-bottom: 15px;
}

.hero h1 {
    margin: 0;
    max-width: 800px;
    font-size: clamp(38px, 6vw, 62px);
    line-height: 1.04;
    letter-spacing: -.04em;
}

.hero h1 span {
    color: #2563eb;
}

.hero p {
    max-width: 760px;
    margin: 20px 0 0;
    color: #64748b;
    font-size: 18px;
    line-height: 1.7;
}


/* MAIN CARDS */

.card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 30px;
    margin-bottom: 24px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, .04);
}

.card h2 {
    margin-top: 0;
}

.head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px;
}

.head h2 {
    margin: 0 0 7px;
}

.head p {
    margin: 0;
    color: #64748b;
    line-height: 1.6;
}

.head > button {
    width: auto;
    min-width: 0;
    height: auto;
    padding: 12px 18px;
    align-self: center;
    white-space: nowrap;
}


/* BUTTONS */

button {
    border: 0;
    border-radius: 10px;
    padding: 12px 18px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.head button {
    background: #e2e8f0;
    color: #334155;
}

.primary {
    background: #2563eb;
    color: #fff;
}

.danger {
    background: #fee2e2;
    color: #b91c1c;
}


/* MODE TABS */

.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 22px;
    padding: 5px;
    width: fit-content;
    background: #f1f5f9;
    border-radius: 12px;
}

.tabs button {
    background: transparent;
    color: #64748b;
}

.tabs button.active {
    background: #fff;
    color: #2563eb;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .08);
}


/* FORM */

.formula {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
    padding: 15px 17px;
    border-radius: 12px;
    margin-bottom: 22px;
    line-height: 1.6;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #334155;
}

label small {
    color: #94a3b8;
    font-weight: 500;
    line-height: 1.45;
}

input,
select {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    color: #0f172a;
    font: inherit;
    outline: none;
}

input:focus,
select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .10);
}

.actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.warning {
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: 10px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
}


/* RESULTS */

.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 12px;
    letter-spacing: .04em;
    white-space: nowrap;
}

.results {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
}

.result {
    min-height: 125px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.result small {
    color: #64748b;
    line-height: 1.4;
}

.result strong {
    margin-top: 8px;
    font-size: 25px;
}

.result.featured {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.result.featured strong {
    color: #2563eb;
}

.dark {
    margin-top: 16px;
    padding: 22px;
    border-radius: 15px;
    background: #0f172a;
    color: #fff;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.dark div {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.dark small {
    color: #94a3b8;
}

.dark strong {
    font-size: 20px;
}


/* SPACE VISUAL */

.space-visual {
    margin-top: 10px;
}

.visual-bar {
    width: 100%;
    height: 80px;
    display: flex;
    overflow: hidden;
    background: #e2e8f0;
    border-radius: 14px;
}

.storage-bar,
.aisle-bar,
.support-bar {
    width: 0;
    transition: width .35s ease;
}

.storage-bar {
    background: #2563eb;
}

.aisle-bar {
    background: #94a3b8;
}

.support-bar {
    background: #cbd5e1;
}

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 18px;
}

.legend span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    font-size: 14px;
}

.legend i {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.storage-key {
    background: #2563eb;
}

.aisle-key {
    background: #94a3b8;
}

.support-key {
    background: #cbd5e1;
}

.disclaimer {
    margin: 22px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.65;
}


/* INFORMATION */

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

.info-grid > div {
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
}

.info-grid b {
    color: #2563eb;
}

.info-grid h3 {
    margin: 12px 0 8px;
}

.info-grid p {
    margin: 0;
    color: #64748b;
    line-height: 1.6;
}


/* RELATED TOOLS */

.related-section h2 {
    margin-bottom: 24px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.related-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: transform .2s ease,
                border-color .2s ease,
                box-shadow .2s ease;
}

.related-card > span {
    font-size: 26px;
    flex-shrink: 0;
}

.related-card div {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.related-card strong {
    font-size: 17px;
    color: #0f172a;
}

.related-card small {
    font-size: 14px;
    line-height: 1.5;
    color: #64748b;
}

.related-card:hover {
    transform: translateY(-2px);
    border-color: #2563eb;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
}


/* FOOTER */

footer {
    max-width: 1180px;
    margin: auto;
    padding: 30px 24px 45px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: #64748b;
}

footer strong {
    color: #2563eb;
}


/* RESPONSIVE */

@media (max-width: 900px) {

    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .results {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

}

@media (max-width: 700px) {

    header {
        align-items: flex-start;
    }

    header nav {
        gap: 12px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    main {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero {
        padding-top: 35px;
    }

    .card {
        padding: 20px;
    }

    .head {
        flex-direction: column;
    }

    .head > button {
        align-self: flex-start;
    }

    .grid,
    .results,
    .dark,
    .info-grid {
        grid-template-columns: 1fr;
    }

    .tabs {
        width: 100%;
    }

    .tabs button {
        flex: 1;
    }

    .visual-bar {
        height: 65px;
    }

    footer {
        flex-direction: column;
    }

}

@media (max-width: 480px) {

    header nav {
        display: none;
    }

    .hero h1 {
        font-size: 37px;
    }

    .actions {
        flex-direction: column;
    }

    .actions button {
        width: 100%;
    }

}
/* ===== WAREHOUSE INFORMATION CARD GRID ===== */

.card .three {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.card .three > div {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 28px 26px;
}

.card .three > div > b {
    display: inline-block;
    margin-bottom: 16px;
    font-size: 15px;
    font-weight: 700;
    color: #2563eb;
}

.card .three > div h3 {
    margin: 0 0 14px;
    font-size: 20px;
    line-height: 1.35;
}

.card .three > div p {
    margin: 0;
    line-height: 1.7;
}

@media (max-width: 700px) {
    .card .three {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .card .three > div {
        padding: 22px 20px;
        border-radius: 18px;
    }
}