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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    padding: 40px 20px;
    color: #1a1a1a;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

header {
    text-align: left;
    margin-bottom: 50px;
    padding-bottom: 20px;
    border-bottom: 2px solid #1a1a1a;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1a1a1a;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 1rem;
    color: #666;
    font-weight: 400;
}

.input-section {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 30px;
    margin-bottom: 40px;
}

.input-group {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

label {
    font-weight: 600;
    color: #1a1a1a;
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

input[type="number"] {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
    font-family: inherit;
}

input[type="number"]:focus {
    outline: none;
    border-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

button {
    padding: 12px 32px;
    background: #156082;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

button:hover {
    background: #1a7a9f;
}

button:active {
    transform: scale(0.98);
}

.results-container {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.detail-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 40px;
    margin-bottom: 20px;
}

h2 {
    color: #1a1a1a;
    margin-bottom: 30px;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    border-bottom: 2px solid #1a1a1a;
}

th {
    padding: 12px 8px;
    text-align: left;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #1a1a1a;
}

th:last-child {
    text-align: right;
}

td {
    padding: 12px 8px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
    font-size: 0.95rem;
}

td:last-child {
    text-align: right;
}

tr:last-child td {
    border-bottom: none;
}

tbody tr {
    transition: background 0.15s ease;
}

tbody tr:hover {
    background: #fafafa;
}

.cargo-name {
    font-weight: 600;
    color: #1a1a1a;
}

.price-value {
    font-weight: 600;
    color: #1a1a1a;
    font-variant-numeric: tabular-nums;
}

/* Section header styles */
.section-header td {
    background: #f8f8f8;
    color: #1a1a1a;
    font-weight: 700;
    font-size: 1rem;
    padding: 16px 8px !important;
    border-top: 2px solid #1a1a1a;
    border-bottom: 2px solid #1a1a1a;
}

.section-header:hover {
    background: #f8f8f8 !important;
}

/* Subtotal row styles */
.subtotal-row td {
    background: white;
    font-weight: 700;
    font-size: 0.95rem;
    border-top: 1px solid #d0d0d0 !important;
    border-bottom: 1px solid #d0d0d0 !important;
    padding: 14px 8px !important;
    color: #1a1a1a;
}

.subtotal-row:hover {
    background: white !important;
}

.total-card {
    background: #156082;
    color: white;
    text-align: left;
    padding: 30px 40px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-label {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.total-amount {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -1px;
    font-variant-numeric: tabular-nums;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 20px 15px;
    }

    h1 {
        font-size: 2rem;
    }

    .input-group {
        flex-direction: column;
        align-items: stretch;
    }

    input[type="number"],
    button {
        width: 100%;
    }

    .detail-card {
        padding: 25px 20px;
    }

    table {
        font-size: 0.85rem;
    }

    th,
    td {
        padding: 10px 6px;
    }

    .total-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .total-amount {
        font-size: 2rem;
    }

    /* Hide range column on mobile */
    th:nth-child(2),
    td:nth-child(2) {
        display: none;
    }
}

/* Print styles */
@media print {
    body {
        padding: 0;
    }

    .input-section {
        display: none;
    }

    button {
        display: none;
    }
}