* { box-sizing: border-box; }

body {
    margin: 0;
    background: #f3f8fc;
    color: #173b57;
    font: 16px/1.55 system-ui, sans-serif;
}

.histori-wrap {
    width: min(1120px, calc(100% - 32px));
    margin-inline: auto;
}

.histori-header {
    background: #fff;
    border-bottom: 1px solid #d9e8f2;
}

.histori-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 68px;
}

.histori-nav img {
    display: block;
    width: auto;
    height: clamp(37px, 7vw, 51px);
}

a { color: #17638e; }

.histori-back {
    font-size: .875rem;
    font-weight: 650;
    text-decoration: none;
}

.histori-back:hover { text-decoration: underline; }

.histori-intro {
    margin: 24px 0 18px;
    padding: clamp(24px, 5vw, 52px);
    border-radius: 20px;
    background: linear-gradient(110deg, #123c60, #116881);
    color: #fff;
}

.histori-intro p { margin: 8px 0 0; }

.histori-intro .histori-label {
    margin: 0;
    color: #b8e7f3;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

h1 {
    margin: 6px 0 0;
    font-size: clamp(1.85rem, 5vw, 3rem);
    line-height: 1.12;
}

.histori-card {
    margin-bottom: 16px;
    padding: clamp(16px, 3vw, 28px);
    border: 1px solid #dce9f2;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px #123c600a;
}

h2 {
    margin: 0 0 12px;
    font-size: 1.25rem;
}

.histori-form {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(150px, 1fr) auto;
    align-items: end;
    gap: 14px;
}

.histori-form label {
    display: block;
    margin-bottom: 6px;
    font-size: .875rem;
    font-weight: 650;
}

.histori-form input,
.histori-form button {
    min-height: 46px;
    border-radius: 9px;
    padding: 8px 12px;
    font: inherit;
}

.histori-form input {
    width: 100%;
    border: 1px solid #a9c2d4;
    color: inherit;
}

.histori-form button {
    padding-inline: 18px;
    border: 1px solid transparent;
    background: #17638e;
    color: #fff;
    font-weight: 650;
    cursor: pointer;
}

.histori-form button:hover { background: #124f75; }

:focus-visible {
    outline: 3px solid #2582b0;
    outline-offset: 3px;
}

.histori-alert {
    padding: 10px 12px;
    border-radius: 8px;
    background: #fff1df;
    color: #754519;
    font-size: .875rem;
}

.histori-results p {
    margin: 0 0 12px;
    color: #45647b;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}

th, td {
    padding: 12px;
    border-bottom: 1px solid #e3edf4;
    text-align: left;
    vertical-align: top;
}

th {
    white-space: nowrap;
    background: #eaf4f9;
}

td:nth-child(6), td:nth-child(7) {
    min-width: 185px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.histori-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    background: #fff1df;
    color: #754519;
    white-space: nowrap;
    font-size: .75rem;
    font-weight: 700;
}

.histori-status-done {
    background: #e4f6ef;
    color: #155f49;
}

footer {
    padding: 12px 16px 24px;
    color: #45647b;
    text-align: center;
    font-size: .75rem;
}

@media (max-width: 700px) {
    .histori-form { grid-template-columns: minmax(0, 1fr); }
}
