/*
 * MYINSURIA
 * MYI-023-009 — Import History Workspace V1
 * Phase B — Frontend Core
 */

:root {
    --myi-history-radius: 16px;
}

.myi-history-shell {
    min-height: 100vh;
    padding: 32px;
}

.myi-history-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.myi-history-header h1 {
    margin: 6px 0 8px;
}

.myi-history-header p {
    max-width: 820px;
    margin: 0;
    opacity: .78;
    line-height: 1.6;
}

.myi-history-eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    opacity: .62;
}

.myi-history-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    font-weight: 600;
}

.myi-history-main {
    display: grid;
    gap: 18px;
}

.myi-history-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border: 1px solid rgba(127, 127, 127, .22);
    border-radius: var(--myi-history-radius);
}

.myi-history-toolbar__group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.myi-history-select {
    min-width: 90px;
    padding: 9px 12px;
    border-radius: 10px;
}

.myi-history-workspace {
    border: 1px solid rgba(127, 127, 127, .22);
    border-radius: var(--myi-history-radius);
    overflow: hidden;
}

.myi-history-state {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 54px 24px;
    text-align: center;
}

.myi-history-state span {
    max-width: 620px;
    opacity: .72;
}

.myi-history-state--error {
    padding-top: 44px;
    padding-bottom: 44px;
}

.myi-history-spinner {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 3px solid rgba(127, 127, 127, .24);
    border-top-color: currentColor;
    animation: myi-history-spin .8s linear infinite;
}

@keyframes myi-history-spin {
    to {
        transform: rotate(360deg);
    }
}

.myi-history-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.myi-history-table {
    width: 100%;
    border-collapse: collapse;
}

.myi-history-table th,
.myi-history-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(127, 127, 127, .16);
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.myi-history-table th {
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
    opacity: .66;
}

.myi-history-table tr:last-child td {
    border-bottom: 0;
}

.myi-history-session-code {
    display: grid;
    gap: 3px;
}

.myi-history-session-code strong {
    font-size: 14px;
}

.myi-history-session-code span {
    font-size: 12px;
    opacity: .62;
}

.myi-history-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    border: 1px solid rgba(127, 127, 127, .24);
    font-size: 12px;
    font-weight: 700;
}

.myi-history-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid rgba(127, 127, 127, .25);
    cursor: pointer;
    font: inherit;
}

.myi-history-button:disabled {
    cursor: not-allowed;
    opacity: .4;
}

.myi-history-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
}

.myi-history-status {
    min-height: 22px;
    font-size: 13px;
    opacity: .7;
}

@media (max-width: 760px) {
    .myi-history-shell {
        padding: 18px;
    }

    .myi-history-header {
        display: grid;
    }

    .myi-history-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .myi-history-pagination {
        justify-content: space-between;
    }
}
