body {
    font-family: "Inter", "Segoe UI", sans-serif;
    min-height: 100vh;
}

.container {
    padding-left: 16px;
    padding-right: 16px;
}

.card h1,
.card h2,
.card h3 {
    font-weight: 600;
}

@media (min-width: 992px) {
    body {
        overflow: hidden;
    }

    .container {
        max-width: 100%;
        padding-left: 12px;
        padding-right: 12px;
        max-height: 100vh;
        overflow: hidden;
    }

    .row.g-4 {
        margin: 0;
    }

    .card {
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.06) !important;
    }

    .card-body {
        padding: 0.5rem;
    }

    .card {
        border-radius: 10px;
    }

    .stat-box {
        padding: 10px;
    }

    .stat-box .value {
        font-size: 1rem;
    }

    .table {
        font-size: 0.85rem;
    }

    #results {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        max-height: calc(100vh - 48px);
        overflow: hidden;
        grid-auto-rows: auto;
        align-items: start;
    }

    #results .card {
        margin: 0;
        height: auto;
        align-self: start;
    }

    #results .card-body {
        height: auto;
        display: block;
    }

    #results .card-sync-height {
        height: 100%;
    }

    .col-lg-5 {
        display: flex;
        flex-direction: column;
        height: calc(100vh - 48px);
    }

    .col-lg-5 > .card {
        flex: 1;
    }

    #alert-box {
        margin-top: 8px;
    }

    #results .card-span-2 {
        grid-column: span 2;
        height: auto;
    }

    #results .card-span-2 .card-body {
        height: auto;
    }

    .table {
        font-size: 0.78rem;
    }
}

.stat-box {
    background: #f8f9fb;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #e9ecef;
}

.stat-box .label {
    font-size: 0.85rem;
    color: #6c757d;
}

.stat-box .value {
    font-size: 1.25rem;
    font-weight: 600;
}

.stat-box.highlight {
    background: #fff6e5;
    border-color: #ffe0b2;
}

.placeholder-card {
    opacity: 0.85;
}

.table-success {
    --bs-table-bg: #e6f7ee;
}

.btn-iliad {
    background-color: #ed1c24;
    border-color: #ed1c24;
    color: #fff;
}

.btn-iliad:hover,
.btn-iliad:focus {
    background-color: #d81920;
    border-color: #d81920;
    color: #fff;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.form-control:focus,
.form-select:focus {
    border-color: #ed1c24;
    box-shadow: 0 0 0 0.2rem rgba(237, 28, 36, 0.2);
}

.dropzone {
    border: 2px dashed #ced4da;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    color: #6c757d;
    cursor: pointer;
    background: #f8f9fb;
}

.dropzone:hover,
.dropzone.dragover {
    border-color: #ed1c24;
    color: #ed1c24;
    background: #fff5f6;
}

.dropzone-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.9rem;
}

.card-body {
    padding: 1.25rem;
}

.vstack.gap-3 > * + * {
    margin-top: 0.75rem !important;
}

.row.g-3 {
    --bs-gutter-y: 0.75rem;
    --bs-gutter-x: 0.75rem;
}

@media (max-width: 768px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .card-body {
        padding: 1.25rem;
    }

    .stat-box {
        padding: 12px;
    }

    .stat-box .value {
        font-size: 1.1rem;
    }

    h1.h4,
    h2.h5,
    h3.h6 {
        font-size: 1.1rem;
    }

    .table-responsive {
        margin-bottom: 0;
    }
}

@media (max-width: 576px) {
    body {
        font-size: 0.95rem;
    }

    .card-body {
        padding: 0.9rem;
    }

    .btn {
        padding: 0.7rem 0.9rem;
    }

    .stat-box {
        text-align: left;
        padding: 10px;
    }

    .stat-box .label {
        font-size: 0.8rem;
    }

    .stat-box .value {
        font-size: 0.98rem;
    }

    .table {
        font-size: 0.85rem;
    }

    .badge {
        font-size: 0.7rem;
    }
}
