* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #0b0f16;
    color: #e6edf7;
}

.page {
    max-width: 1680px;
    margin: 0 auto;
    padding: 24px;
}

.hero {
    margin-bottom: 18px;
}

h1 {
    margin: 0 0 8px 0;
    font-size: 32px;
    line-height: 1.2;
    color: #f5f7fb;
}

h2 {
    margin: 0;
    font-size: 20px;
    color: #f5f7fb;
}

.subhead {
    margin: 0;
    color: #b6c2d1;
    font-size: 15px;
}

.panel {
    background: #121923;
    border: 1px solid #2b3647;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 18px;
}

.group-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
}

.full-width-group {
    grid-column: 1 / -1;
}

.input-group {
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 14px;
    margin: 0;
    background: #0f141d;
    min-width: 0;
}

.input-group legend {
    padding: 0 10px;
    color: #dbe4ef;
    font-weight: bold;
    font-size: 14px;
}

.field-stack {
    display: flex;
    flex-direction: row;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    min-width: 200px;
    flex: 1;
}

label {
    font-size: 13px;
    color: #b7c3d4;
}

input,
select,
button {
    font: inherit;
}

input,
select {
    width: 100%;
    max-width: 200px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #3a475a;
    background: #0b1118;
    color: #eef4fd;
    outline: none;
}

input:focus,
select:focus {
    border-color: #6ca3ff;
    box-shadow: 0 0 0 2px rgba(108, 163, 255, 0.18);
}

input[readonly] {
    background: #0d131c;
    color: #aebacc;
}

.timeSlotInputsContainer {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    padding-top: 8px;
}

.timeSlotInputCard {
    border: 1px solid #334155;
    border-radius: 10px;
    background: #0b1118;
    padding: 14px;
}

.timeSlotInputTitle {
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: bold;
    color: #e8eef7;
}

.timeSlotInputHelp {
    margin-top: 8px;
    font-size: 12px;
    color: #90a1b7;
    line-height: 1.4;
}

.actions-panel {
    margin-top: 18px;
    padding: 14px;
    border: 1px solid #334155;
    border-radius: 10px;
    background: linear-gradient(to bottom, rgba(19, 28, 40, 0.95), rgba(13, 20, 30, 0.95));
}

.actions-panel-title {
    margin-bottom: 25px;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9fb1c8;
}

.actions-row {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    align-items: stretch;
}

.action-item {
    min-width: 0;
}

.action-button-wrap::before {
    content: "";
    display: block;
    height: 18px;
}

.btn-primary,
.btn-secondary {
    width: 100%;
    min-height: 52px;
    height: 52px;
    border: 1px solid #3b495e;
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    line-height: 1.2;
}

.btn-primary {
    background: #2852d1;
    color: #ffffff;
}

.btn-primary:hover {
    background: #1f44b2;
}

.btn-secondary {
    background: #1b2431;
    color: #f0f4fa;
}

.btn-secondary:hover {
    background: #243041;
}

.table-panel {
    overflow: hidden;
}

.table-topbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.table-title-block {
    min-width: 0;
}

.planner-params {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
    margin: 10px 0 0 0;
}

.param-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border: 1px solid #334155;
    border-radius: 999px;
    background: rgba(17, 24, 37, 0.88);
    color: #d9e2ef;
    font-size: 13px;
}

.table-scroll {
    overflow-x: auto;
}

.resultTable {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 720px;
    background: #0f151f;
    border: 1px solid #2b3647;
    border-radius: 12px;
    overflow: hidden;
}

.resultTable th,
.resultTable td {
    padding: 12px 14px;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid #253143;
    border-right: 1px solid #253143;
    font-size: 15px;
}

.resultTable th:last-child,
.resultTable td:last-child {
    border-right: 0;
}

.resultTable thead th {
    background: linear-gradient(180deg, #1a2432 0%, #121923 100%);
    color: #f4f8ff;
    font-size: 16px;
    font-weight: bold;
}

.resultTable tbody td {
    font-weight: 600;
    color: #d9e3ef;
    background: #121923;
}

.resultTable tbody tr:nth-child(even) td {
    background: #0f151f;
}

.resultTable tbody tr:hover td {
    background: #162131;
}

.locationCell {
    font-size: 17px;
    font-weight: bold;
    color: #ffffff;
    background: #182231;
}

.resetRow td {
    background: #101722 !important;
    color: #a9bdd6;
    font-weight: 600;
}

.emptyState {
    color: #9fb1c8;
    font-style: italic;
}

.errorState {
    color: #ffcccc;
}

@media (max-width: 900px) {
    .group-grid {
        grid-template-columns: 1fr;
    }

    .actions-row {
        grid-template-columns: 1fr;
    }

    .page {
        padding: 16px;
    }
}