#ls-wrap {
    font-family: 'Segoe UI', system-ui, sans-serif;
    max-width: 900px;
    margin: 2rem auto;
    color: #1a2332;
}

/* Card */
.ls-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 28px rgba(0,90,180,.10);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.ls-header {
    background: linear-gradient(135deg, #1a6fcf 0%, #0d4fa0 100%);
    color: #fff;
    padding: 1.2rem 2rem;
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -.01em;
}
.ls-header svg { width: 26px; height: 26px; flex-shrink: 0; }

.ls-form {
    padding: 1.8rem 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 1.2rem;
    align-items: end;
}

.ls-field { display: flex; flex-direction: column; gap: .4rem; }

.ls-field label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #6b7a8d;
}

.ls-input-group {
    display: flex;
    border: 1.5px solid #dde4ed;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
}
.ls-input-group:focus-within {
    border-color: #1a6fcf;
    box-shadow: 0 0 0 3px rgba(26,111,207,.15);
}

.ls-input-group input {
    border: none;
    outline: none;
    padding: .7rem .9rem;
    font-size: .98rem;
    font-family: inherit;
    color: #1a2332;
    width: 100%;
    background: transparent;
    -moz-appearance: textfield;
}
.ls-input-group input::-webkit-inner-spin-button,
.ls-input-group input::-webkit-outer-spin-button { -webkit-appearance: none; }

.ls-unit {
    padding: 0 .8rem;
    background: #f0f5ff;
    color: #1a6fcf;
    font-weight: 700;
    font-size: .88rem;
    display: flex;
    align-items: center;
    border-left: 1.5px solid #dde4ed;
    white-space: nowrap;
}

#ls-calc {
    padding: .72rem 1.8rem;
    background: linear-gradient(135deg, #1a6fcf, #0d4fa0);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: .95rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
    white-space: nowrap;
    height: fit-content;
}
#ls-calc:hover  { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(26,111,207,.35); }
#ls-calc:active { transform: none; box-shadow: none; }

/* Error shake */
.ls-input-group.ls-error { border-color: #e53e3e; animation: ls-shake .35s; }
@keyframes ls-shake {
    0%,100% { transform: translateX(0); }
    25%      { transform: translateX(-5px); }
    75%      { transform: translateX(5px); }
}

/* Summary */
.ls-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 1px;
    background: #dde4ed;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.ls-summary-item {
    flex: 1 1 160px;
    background: #fff;
    padding: 1.1rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: .3rem;
}
.ls-summary-label {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #6b7a8d;
}
.ls-summary-val {
    font-size: 1.3rem;
    font-weight: 800;
    color: #1a6fcf;
    letter-spacing: -.02em;
}
.ls-summary-item:last-child .ls-summary-val { color: #e05a1e; }

/* Table */
.ls-table-wrap {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0,90,180,.08);
    overflow-x: auto;
}
.ls-table-wrap table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}
.ls-table-wrap thead {
    position: sticky;
    top: 0;
    z-index: 1;
}
.ls-table-wrap th {
    background: #1a6fcf;
    color: #fff;
    padding: .75rem 1.1rem;
    text-align: left;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    white-space: nowrap;
}
.ls-table-wrap td {
    padding: .6rem 1.1rem;
    border-bottom: 1px solid #eef1f6;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.ls-table-wrap tr:last-child td { border-bottom: none; }
.ls-table-wrap tbody tr:nth-child(even) { background: #f7f9fd; }
.ls-table-wrap tbody tr:hover { background: #eef4ff; }

.ls-table-wrap td:first-child { color: #9aabbd; font-weight: 600; font-size: .8rem; }
.ls-table-wrap td:nth-child(3) { font-weight: 700; color: #1a2332; }
.ls-table-wrap td:nth-child(4) { color: #0d4fa0; }
.ls-table-wrap td:nth-child(5) { color: #e05a1e; }
.ls-table-wrap td:nth-child(6) { font-weight: 600; }

/* Fade-in animation */
#ls-results { animation: ls-fadein .3s ease; }
@keyframes ls-fadein {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 640px) {
    .ls-form {
        grid-template-columns: 1fr;
        padding: 1.25rem;
    }
    #ls-calc { width: 100%; justify-content: center; }
    .ls-header { padding: 1rem 1.25rem; }
}
