table, td, th {
    margin: 0 auto;
    text-align: center;
    border-collapse: collapse;
    font-family: inherit;
}

/* Responsive table wrapper */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 1rem;
    border-radius: 8px;
}

.table-responsive table {
    width: 100%;
    min-width: 600px;
}

td, th {
    width: max-content;
    height: auto;
    padding: 12px 16px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: background-color 0.2s ease;
}

td:nth-last-of-type(4) {
    border-right: 2px solid #5591af;
}

th {
    background: #5591af;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.025em;
}

.even {
    background: rgba(85, 145, 175, 0.05);
}

.odd {
    background: rgba(255, 255, 255, 0.8);
}

.even:hover,
.odd:hover {
    background: rgba(102, 126, 234, 0.1);
}

table.lost-items {
    margin: 1.5rem auto;
    text-align: center;
    border-collapse: collapse;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

table.lost-items th {
    text-align: center;
    background: #5591af;
    color: #ffffff;
}

table.lost-items td, table.lost-items th {
    width: max-content;
    min-width: 12em;
    height: auto;
    padding: 12px 16px;
    text-align: center;
    border: 1px solid rgba(226, 232, 240, 0.6);
}

tr.table-item-noborder td {
    border: 0;
    text-align: left;
}

tr.table-item-noborder th {
    border: 0;
    text-align: right;
    background: #ffffff;
}

tr, th {
    text-align: left;
}

/* モバイル用テーブルスタイル */
@media screen and (max-width: 959px) {
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .table-responsive table {
        min-width: 800px;
        font-size: 0.85rem;
    }

    .table-responsive td,
    .table-responsive th {
        padding: 8px 12px;
        white-space: nowrap;
    }

    /* テーブルヘッダーを固定表示する場合 */
    .table-responsive thead th {
        position: sticky;
        top: 0;
        background: #5591af;
        z-index: 10;
    }

    /* スクロールヒントの追加 */
    .table-responsive::after {
        content: "← スクロール可能 →";
        display: block;
        text-align: center;
        font-size: 0.75rem;
        color: #666;
        padding: 0.5rem;
        background: rgba(85, 145, 175, 0.05);
        border-top: 1px solid rgba(226, 232, 240, 0.8);
    }
}