/* ========================= */
/* History */
/* ========================= */

.history-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    margin: 28px 0 26px;
    padding: 18px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
}

.history-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.history-toolbar form {
    margin: 0;
}

.history-list {
    display: grid;
    gap: 20px;
}

.history-card {
    border: 1px solid var(--border);
    background:
        rgba(255, 255, 255, 0.075);
    border-radius: var(--radius-lg);
    padding: 26px;
    box-shadow: var(--shadow);
}

.history-card-header {
    display: flex;
    justify-content: space-between;
    gap: 22px;
    align-items: flex-start;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.history-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.history-card h2 {
    font-size: 2rem;
    line-height: 1;
    letter-spacing: -0.025em;
    margin: 0;
}

.history-id {
    color: var(--muted-dark);
    font-size: 0.86rem;
    font-weight: 900;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.history-date {
    color: var(--muted-dark);
    line-height: 1.55;
    margin: 10px 0 0;
}

.history-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.module-badge {
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(75, 159, 225, 0.14);
    border: 1px solid rgba(75, 159, 225, 0.3);
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 900;
    white-space: nowrap;
}

.history-content {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 18px;
    margin-top: 20px;
}

.history-block {
    padding: 18px;
    border-radius: var(--radius-lg);
    background: rgba(2, 6, 23, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.history-block h3 {
    color: var(--accent);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin: 0 0 12px;
}

.history-block p {
    color: var(--muted);
    line-height: 1.7;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.history-card-footer {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.history-meta {
    color: var(--muted-dark);
    line-height: 1.6;
}

.history-meta strong {
    color: var(--text);
}

.history-card-footer form {
    margin: 0;
}

.empty-state {
    border: 1px solid var(--border);
    background:
        var(--card);
    border-radius: var(--radius-lg);
    padding: 38px;
    box-shadow: var(--shadow);
    text-align: center;
}

.empty-state h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.1;
    letter-spacing: -0.025em;
    margin: 0 0 14px;
}

.empty-state p {
    max-width: 640px;
    color: var(--muted);
    line-height: 1.75;
    margin: 0 auto;
}

.empty-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 26px;
}

