.attendance_list {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
}

.header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.vertical-line {
    width: 5px;
    height: 30px;
    background-color: black;
    margin-right: 10px;
}

.title {
    font-size: 20px;
    font-weight: bold;
}

.month-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 10px;
    border: none;
    border-radius: 5px;
    margin-bottom: 20px;
    background: #fff;
}

.month-nav a {
    text-decoration: none;
    color: #898989;
    font-size: 13px;
}

.month-nav a:hover {
    text-decoration: underline;
}

.center-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.current-month {
    font-size: 16px;
    font-weight: bold;
}

.material-symbols-outlined {
    font-variation-settings:
        'FILL' 0,
        'wght' 400,
        'GRAD' 0,
        'opsz' 24
}

.calendar-icon {
    vertical-align: middle;
    margin-right: 5px;
    color: #000;
    font-size: 20px;
    cursor: pointer;
}

.prev,
.next {
    text-decoration: none;
    color: #898989;
    font-size: 13px;
    white-space: nowrap;
}

.prev:hover,
.next:hover {
    text-decoration: underline;
}

.table-container {
    overflow-x: auto;
}

.attendance-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 5px;
    font-size: 14px;
    background-color: #fff;
}

.attendance-table th {
    padding: 10px;
    color: #898989;
    text-align: center;
    border-bottom: 2px solid #f4f4f4;
}

.attendance-table td {
    padding: 10px;
    border-bottom: 1px solid #f4f4f4;
    text-align: center;
    color: #898989;
}

.attendance-table tr:last-child td {
    border-bottom: none;
}

.detail-link {
    color: #000;
    text-decoration: none;
    font-weight: bold;
}

.detail-link:hover {
    text-decoration: underline;
}

#monthPicker {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

@media (min-width: 768px) and (max-width: 850px) {
    .attendance_list {
        margin: 25px auto;
        padding: 12px;
    }

    .title {
        font-size: 17px;
    }

    .vertical-line {
        height: 26px;
    }

    .month-nav {
        padding: 8px;
    }

    .current-month {
        font-size: 15px;
    }

    .calendar-icon {
        font-size: 18px;
    }

    .attendance-table {
        font-size: 12px;
    }

    .attendance-table th,
    .attendance-table td {
        padding: 8px 4px;
    }

    .detail-link {
        font-size: 12px;
    }
}

@media (max-width: 767px) {
    .attendance_list {
        margin: 20px auto;
        padding: 10px;
    }

    .title {
        font-size: 18px;
    }

    .vertical-line {
        height: 25px;
    }

    .month-nav {
        padding: 8px;
    }

    .month-nav a {
        font-size: 12px;
    }

    .prev {
        flex-shrink: 0;
    }

    .next {
        flex-shrink: 0;
    }

    .center-content {
        flex-shrink: 1;
        min-width: 0;
    }

    .current-month {
        font-size: 13px;
    }

    .calendar-icon {
        font-size: 16px;
        margin-right: 3px;
    }

    .table-container {
        overflow-x: visible;
    }

    /* テーブルをカード型に変換 */
    .attendance-table {
        border: none;
        background-color: transparent;
    }

    .attendance-table thead {
        display: none;
    }

    .attendance-table tbody {
        display: block;
    }

    .attendance-table tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #494949;
        border-radius: 8px;
        padding: 15px;
        background-color: #fff;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .attendance-table tr:last-child {
        margin-bottom: 0;
    }

    .attendance-table td {
        display: grid;
        grid-template-columns: 90px 1fr;
        gap: 10px;
        padding: 10px 0;
        border-bottom: 1px solid #e0e0e0;
        text-align: left;
        font-size: 14px;
        align-items: center;
    }

    .attendance-table td:last-child {
        border-bottom: none;
    }

    .attendance-table td::before {
        content: attr(data-label);
        font-weight: bold;
        color: #000;
        display: block;
    }

    .attendance-table td .detail-link {
        text-align: left;
    }

    .detail-link {
        font-size: 14px;
    }
}