* {
    font-family: sans-serif;
}

:root {
    --bg: #f6f8fb;
    --card: #ffffff;
    --muted: #6b7280;
    --accent: #2563eb;
    --border: #e6e9ef;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    background: linear-gradient(180deg, #f8fafc, var(--bg));
    color: #0f172a;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1000px;
    padding: 20px;
    margin-left: auto;
    margin-right: auto;
}

h1 {
    margin: 0 0 16px 0;
    font-size: 1.6rem;
}

h2 {
    margin: 18px 0 8px 0;
    font-size: 1.1rem;
    color: var(--muted);
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}

.controls {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}

.btn {
    background: var(--accent);
    color: #fff;
    border: 0;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
}

.btn.secondary {
    background: #eef2ff;
    color: var(--accent);
}

.table-wrapper {
    overflow-x: auto;
}

table {
    border-collapse: collapse;
    width: 100%;
    min-width: 480px;
}

th,
td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}

th {
    font-size: 0.85rem;
    color: var(--muted);
    background: transparent;
    position: sticky;
    top: 0;
}

tbody tr:nth-child(even) {
    background: #fbfdff;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Mobile: convert table into stacked rows */
@media (max-width:640px) {
    table {
        min-width: 0;
    }

    thead {
        display: none;
    }

    tbody tr {
        display: block;
        margin: 0 0 12px 0;
        border-radius: 8px;
        border: 1px solid var(--border);
        overflow: hidden;
    }

    td {
        display: flex;
        justify-content: space-between;
        padding: 10px;
        border-bottom: none;
    }

    td:before {
        content: attr(data-label);
        color: var(--muted);
        font-weight: 600;
        margin-right: 8px;
    }

    td:last-child {
        border-top: 1px solid var(--border);
    }

    .controls {
        flex-wrap: wrap;
    }
}

/* Small improvement for icons or long text */
td,
th {
    white-space: nowrap;
}