.event-table-wrap {
    margin-top: 1.25rem;
}

.event-table-tools {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.9rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.event-table-search-block {
    display: grid;
    gap: 0.35rem;
}

.event-table-search-label {
    font-size: 0.8rem;
    color: #f2d3c4;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.event-table-search {
    width: min(100%, 24rem);
    min-height: 2.5rem;
    padding: 0.62rem 0.95rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 160, 76, 0.25);
    color: var(--text);
    background: linear-gradient(160deg, rgba(22, 14, 28, 0.84), rgba(44, 19, 36, 0.76));
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
    appearance: none;
}

.event-table-search:focus {
    outline: 2px solid rgba(157, 78, 221, 0.45);
    border-color: rgba(157, 78, 221, 0.55);
}

.event-table-scroll {
    overflow-x: auto;
    overflow-y: visible;
    border: 1px solid rgba(255, 160, 76, 0.2);
    border-radius: 1rem;
    background: linear-gradient(175deg, rgba(20, 12, 27, 0.92), rgba(34, 15, 34, 0.88));
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.26);
}

.event-table {
    width: 100%;
    min-width: 48rem;
    border-collapse: collapse;
}

.event-table thead th {
    padding: 0.85rem 0.95rem;
    border-bottom: 1px solid rgba(255, 160, 76, 0.2);
    background: rgba(255, 255, 255, 0.03);
    position: sticky;
    top: 0;
    z-index: 2;
}

.event-sort-button {
    width: 100%;
    border: 1px solid rgba(255, 160, 76, 0.14);
    padding: 0.36rem 0.65rem;
    border-radius: 999px;
    margin: 0;
    text-align: left;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #f2d3c4;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.event-sort-button:hover,
.event-sort-button:focus-visible {
    color: #fff6ef;
    border-color: rgba(255, 160, 76, 0.25);
    background: rgba(255, 255, 255, 0.04);
}

.event-sort-button::after {
    content: "↕";
    margin-left: 0.45rem;
    color: rgba(246, 223, 210, 0.55);
    display: inline-block;
    font-size: 0.75rem;
    opacity: 0.9;
}

.event-sort-button[data-dir="asc"]::after {
    content: "↑";
    color: #fff6ef;
}

.event-sort-button[data-dir="desc"]::after {
    content: "↓";
    color: #fff6ef;
}

.event-sort-button[data-dir="asc"],
.event-sort-button[data-dir="desc"] {
    color: #fff6ef;
    border-color: rgba(255, 160, 76, 0.32);
    background: rgba(255, 255, 255, 0.05);
}

.event-table tbody td {
    padding: 0.78rem 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--muted);
    vertical-align: middle;
}

.event-table tbody tr:last-child td {
    border-bottom: 0;
}

.champion-cell {
    display: inline-flex;
    align-items: center;
    gap: 0.62rem;
    color: #ffe9de;
}

.champion-icon {
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 0.5rem;
    object-fit: cover;
    border: 1px solid rgba(255, 160, 76, 0.28);
    background: rgba(255, 255, 255, 0.03);
}

.event-table-empty {
    text-align: center;
    color: var(--muted);
}

.az-summary {
    display: flex;
    align-items: center;
    gap: 1.2em;
    flex-wrap: wrap;
}

.az-column-summary {
    display: grid;
    grid-template-columns: 1fr 1fr 1.3fr 1fr 1fr 0.8fr;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0.75rem 0.95rem;
    border-radius: 0.75rem;
    background: rgba(157, 78, 221, 0.08);
    border: 1px solid rgba(157, 78, 221, 0.2);
    min-width: 48rem;
}

.az-column-summary.has-actions {
    grid-template-columns: 1fr 1fr 1.3fr 1fr 1fr 0.8fr 1fr;
}

.az-col-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-align: center;
}

.az-col-label {
    font-size: 0.75rem;
    color: #d0a8e0;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 600;
}

.az-col-value {
    font-size: 0.95rem;
    color: #fff;
    font-weight: 600;
}

.az-col-spacer {
    /* Empty spacer for Champion and Status columns */
}

.az-summary-stat {
    font-size: 0.9em;
    white-space: nowrap;
}

.az-summary-open strong {
    color: #e0a030;
}

.az-summary-done strong {
    color: #4caf7d;
}

.az-win-loss {
    display: inline-flex;
    gap: 0.35em;
    align-items: baseline;
    font-variant-numeric: tabular-nums;
}

.az-win {
    color: #4caf7d;
    font-weight: 600;
}

.az-loss {
    color: #e05c5c;
    font-weight: 600;
}

.az-winpct {
    color: #aaa;
    font-size: 0.85em;
}

.az-actions-cell {
    white-space: nowrap;
    text-align: right;
}

.az-btn-action {
    display: inline-flex;
    align-items: center;
    padding: 0.32rem 0.7rem;
    border: 1px solid rgba(255, 160, 76, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    color: #f2d3c4;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.az-btn-action + .az-btn-action {
    margin-left: 0.4rem;
}

.az-btn-action:hover,
.az-btn-action:focus-visible {
    color: #fff6ef;
    border-color: rgba(255, 179, 106, 0.5);
    background: rgba(255, 140, 66, 0.12);
}

.az-modal {
    padding: 0;
    border: 1px solid rgba(255, 160, 76, 0.22);
    border-radius: 1.35rem;
    background: linear-gradient(175deg, rgba(18, 10, 24, 0.98), rgba(34, 14, 32, 0.97));
    color: var(--text);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.55);
    max-width: min(92vw, 30rem);
    width: 100%;
}

.az-modal::backdrop {
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(5px);
}

.az-modal-inner {
    padding: 1.6rem;
    display: grid;
    gap: 1.1rem;
}

.az-modal-title {
    margin: 0;
    font-size: 1.15rem;
    color: #fff6ef;
}

.az-modal-form {
    display: grid;
    gap: 1.1rem;
}

.az-modal-field {
    display: grid;
    gap: 0.4rem;
}

.az-modal-field > label {
    font-size: 0.8rem;
    color: #f2d3c4;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.az-modal-input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid rgba(255, 179, 106, 0.22);
    border-radius: 0.85rem;
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    appearance: none;
}

select.az-modal-input {
    background-color: #1e1e2e;
    color: var(--text);
}

.az-modal-input:focus {
    outline: 2px solid rgba(157, 78, 221, 0.45);
    border-color: rgba(157, 78, 221, 0.5);
}

.az-modal-row3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem;
}

.az-radio-group {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.az-radio-group--col {
    flex-direction: column;
    gap: 0.55rem;
}

.az-radio-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--muted);
    cursor: pointer;
    font-size: 0.92rem;
}

.az-radio-label input[type="radio"] {
    accent-color: var(--violet);
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

.az-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
    padding-top: 0.2rem;
}

.az-modal-cancel {
    padding: 0.72rem 1.1rem;
    border: 1px solid rgba(255, 160, 76, 0.2);
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 0.9rem;
    transition: color 150ms ease, border-color 150ms ease;
}

.az-modal-cancel:hover,
.az-modal-cancel:focus-visible {
    color: var(--text);
    border-color: rgba(255, 160, 76, 0.38);
}

.az-modal-submit {
    padding: 0.72rem 1.25rem;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--orange-soft), var(--orange));
    color: #170d13;
    font-weight: 700;
    letter-spacing: 0.06em;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(255, 140, 66, 0.22);
    transition: transform 150ms ease;
}

.az-modal-submit:hover,
.az-modal-submit:focus-visible {
    transform: translateY(-1px);
}

@media (max-width: 560px) {
    .event-table-tools {
        align-items: stretch;
        justify-content: flex-start;
    }

    .event-table-search {
        width: 100%;
    }
}
