.bm-attendance-page {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bm-attendance-card,
.bm-attendance-hero {
    background: #1f1f1f;
    border: 1px solid #343434;
    border-radius: 14px;
}

.bm-attendance-hero {
    padding: 24px 20px;
}

.bm-attendance-hero-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    font-size: 34px;
    font-weight: 800;
    color: #ffffff;
}

.bm-attendance-hero-title-text {
    display: inline-block;
    color: #ffffff;
}

.bm-attendance-hero-title-text > span {
    color: #12D5D3;
}

.bm-attendance-hero-check {
    width: auto;
    height: 70px;
    object-fit: contain;
}

.bm-attendance-card {
    padding: 18px;
}

.bm-attendance-calendar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.bm-attendance-calendar-heading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-align: center;
}

.bm-attendance-calendar-titleline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.bm-attendance-calendar-date-full {
    font-size: 34px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
}

.bm-attendance-calendar-stats {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    margin-bottom: 16px;
}

.bm-attendance-stat-chip {
    flex: 1 1 0;
    min-width: 0;
    padding: 10px 14px;
    border: 1px solid #343434;
    border-radius: 12px;
    background: #171717;
}

.bm-attendance-stat-chip strong {
    display: block;
    margin-bottom: 4px;
    color: #8f8f8f;
    font-size: 12px;
    font-weight: 700;
}

.bm-attendance-stat-chip span {
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
}

.bm-attendance-calendar-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.bm-attendance-nav-btn,
.bm-attendance-policy-btn,
.bm-attendance-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid #4b4b4b;
    background: #2d2d2d;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.bm-attendance-policy-btn {
    margin-left: auto;
    background: #124844;
    border-color: #124844;
}

.bm-attendance-calendar-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.bm-attendance-calendar {
    width: 980px;
    min-width: 980px;
    max-width: none;
    border-collapse: collapse;
    table-layout: fixed;
}

.bm-attendance-calendar th {
    height: 42px;
    background: #083131;
    border: 1px solid #303030;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
}

.bm-attendance-week-short {
    display: none;
}

.bm-attendance-calendar th.is-sunday {
    color: #ff6b6b;
}

.bm-attendance-calendar th.is-saturday {
    color: #60a5fa;
}

.bm-attendance-calendar td {
    height: 112px;
    border: 1px solid #303030;
    background: #1f1f1f;
    vertical-align: top;
}

.bm-attendance-calendar td.is-empty {
    background: #111111;
}

.bm-attendance-calendar td.is-selected {
    background: #12383f;
}

.bm-attendance-day-link {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: 0;
    color: inherit;
}

.bm-attendance-day-mark {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.bm-attendance-day-mark img {
    max-width: calc(100% - 4px);
    max-height: calc(100% - 4px);
    width: auto;
    height: auto;
    object-fit: contain;
}

.bm-attendance-day-num {
    position: absolute;
    top: 1px;
    left: 2px;
    text-align: left;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
    z-index: 2;
}

.bm-attendance-day-num.is-sunday {
    color: #ff6b6b;
}

.bm-attendance-day-num.is-saturday {
    color: #60a5fa;
}

.bm-attendance-day-count {
    position: absolute;
    right: 2px;
    bottom: 2px;
    text-align: right;
    font-size: 18px;
    font-weight: 700;
    color: #fbbf24;
    line-height: 1;
    z-index: 2;
}

.bm-attendance-guide-top {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.bm-attendance-guide-time {
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
}

.bm-attendance-policy {
    margin-top: 14px;
    padding: 14px;
    border: 2px solid #dc2626;
    border-radius: 12px;
    background: #1a1a1a;
}

.bm-attendance-policy-table {
    width: 100%;
    border-collapse: collapse;
}

.bm-attendance-policy-table th,
.bm-attendance-policy-table td {
    padding: 10px 12px;
    border: 1px solid #333333;
    text-align: center;
}

.bm-attendance-policy-table th {
    background: #2a2a2a;
    color: #ffffff;
}

.bm-attendance-policy-table td {
    color: #ffffff;
}

.bm-attendance-form,
.bm-attendance-login-callout {
    display: flex;
    align-items: center;
    gap: 0;
}

.bm-attendance-input {
    flex: 1;
    min-width: 0;
    height: 52px;
    padding: 0 16px;
    border: 1px solid #dc2626;
    border-right: 0;
    border-radius: 12px 0 0 12px;
    background: #111111;
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
}

.bm-attendance-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 154px;
    height: 52px;
    border: 1px solid #dc2626;
    border-radius: 0 12px 12px 0;
    background: #dc2626;
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
}

.bm-attendance-submit-btn:disabled {
    background: #666666;
    border-color: #666666;
    cursor: default;
}

.bm-attendance-submit-arrow {
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
}

.bm-attendance-login-callout {
    justify-content: space-between;
    gap: 12px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
}

.bm-attendance-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    color: #ffffff;
    font-size: 16px;
}

.bm-attendance-list-table-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.bm-attendance-list-table {
    width: 1120px;
    min-width: 1120px;
    max-width: none;
    border-collapse: collapse;
    table-layout: auto;
}

.bm-attendance-list-table th,
.bm-attendance-list-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #303030;
    color: #ffffff;
    font-size: 14px;
    white-space: nowrap;
}

.bm-attendance-list-table th {
    background: #083131;
    font-size: 14px;
    font-weight: 800;
    text-align: center;
}

.bm-attendance-list-table td {
    background: #1f1f1f;
}

.bm-attendance-list-table .td-num,
.bm-attendance-list-table .td-point {
    text-align: center;
    white-space: nowrap;
}

.bm-attendance-list-table .td-point {
    color: #f87171;
    font-weight: 800;
}

.bm-attendance-list-table .td-content {
    min-width: 320px;
    white-space: nowrap;
    word-break: normal;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bm-attendance-member {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.bm-attendance-writer {
    justify-content: flex-start;
    gap: 6px;
    max-width: 100%;
}

.bm-attendance-member-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.bm-attendance-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.bm-attendance-pagination .pg_page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid #3d3d3d;
    background: #242424;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}

.bm-attendance-pagination .pg_page.current {
    background: #dc2626;
    border-color: #dc2626;
}

@media (max-width: 1100px) {
    .bm-attendance-hero-title {
        font-size: 28px;
    }

    .bm-attendance-hero-check {
        width: auto;
        height: 70px;
    }

    .bm-attendance-card {
        padding: 14px;
    }

    .bm-attendance-calendar-head {
        flex-direction: column;
        align-items: center;
    }

    .bm-attendance-calendar-titleline {
        gap: 8px;
    }

    .bm-attendance-calendar-date-full {
        font-size: 24px;
    }

    .bm-attendance-calendar-stats {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .bm-attendance-calendar-nav {
        width: 100%;
        justify-content: center;
    }

    .bm-attendance-nav-btn {
        flex: 1 1 calc(33.333% - 6px);
        min-width: 0;
    }

    .bm-attendance-input,
    .bm-attendance-submit-btn {
        font-size: 16px;
    }

    .bm-attendance-stat-chip {
        min-width: 0;
    }

    .bm-attendance-login-callout {
        flex-direction: column;
        align-items: stretch;
    }

    .bm-attendance-guide-top {
        justify-content: center;
        text-align: center;
    }

    .bm-attendance-guide-time {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .bm-attendance-policy-btn {
        margin-left: 0;
    }

    .bm-attendance-calendar-wrap,
    .bm-attendance-list-table-wrap {
        overflow-x: visible;
        overflow-y: visible;
        margin-right: 0;
        padding-bottom: 0;
    }

    .bm-attendance-calendar {
        width: 100%;
        min-width: 0;
        table-layout: fixed;
    }

    .bm-attendance-calendar th {
        height: 36px;
        font-size: 11px;
        padding: 0 2px;
    }

    .bm-attendance-week-full {
        display: none;
    }

    .bm-attendance-week-short {
        display: inline;
    }

    .bm-attendance-calendar td {
        height: 76px;
        padding: 0;
    }

    .bm-attendance-day-link {
        padding: 0;
        line-height: 1;
    }

    .bm-attendance-day-mark img {
        max-width: calc(105% + 8px);
        max-height: calc(105% + 8px);
        width: auto;
        height: auto;
        object-fit: contain;
        transform: translateY(3px);
    }

    .bm-attendance-day-num {
        top: -6px;
        left: -5px;
        font-size: 14px;
        line-height: 0.9;
    }

    .bm-attendance-day-count {
        display: block;
        right: -8px;
        bottom: -9px;
        font-size: 12px;
        line-height: 0.9;
    }

    .bm-attendance-list-head {
        flex-direction: column;
        align-items: flex-start;
        font-size: 14px;
    }

    .bm-attendance-list-table {
        width: 100%;
        min-width: 0;
        table-layout: fixed;
    }

    .bm-attendance-list-table th,
    .bm-attendance-list-table td {
        padding: 8px 4px;
        font-size: 11px;
        white-space: normal;
        word-break: break-word;
    }

    .bm-attendance-list-table th:nth-child(1),
    .bm-attendance-list-table td:nth-child(1) {
        width: 8%;
    }

    .bm-attendance-list-table th:nth-child(2),
    .bm-attendance-list-table td:nth-child(2) {
        width: 16%;
    }

    .bm-attendance-list-table th:nth-child(3),
    .bm-attendance-list-table td:nth-child(3) {
        width: 44%;
    }

    .bm-attendance-list-table th:nth-child(4),
    .bm-attendance-list-table td:nth-child(4) {
        display: none;
    }

    .bm-attendance-list-table th:nth-child(5),
    .bm-attendance-list-table td:nth-child(5) {
        width: 18%;
    }

    .bm-attendance-list-table th:nth-child(6),
    .bm-attendance-list-table td:nth-child(6) {
        width: 14%;
    }

    .bm-attendance-list-table .td-content {
        min-width: 0;
        white-space: normal;
        word-break: break-word;
        overflow: visible;
        text-overflow: clip;
    }

    .bm-attendance-member {
        gap: 4px;
        align-items: center;
    }

    .bm-attendance-writer {
        gap: 4px;
        justify-content: flex-start;
        align-items: flex-start;
    }

    .bm-attendance-member-icon {
        width: 18px;
        height: 18px;
    }

    .bm-attendance-writer .bm-level-chip {
        min-width: 20px;
        height: 20px;
        padding: 0 5px;
        font-size: 10px;
    }

    .bm-attendance-writer .bm-writer-nick {
        max-width: none;
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
        word-break: break-all;
        line-height: 1.2;
        font-size: 10px;
    }

    .bm-attendance-pagination {
        gap: 4px;
    }

    .bm-attendance-pagination .pg_page {
        min-width: 34px;
        height: 34px;
        padding: 0 8px;
        font-size: 12px;
    }
}

@media (max-width: 640px) {
    .bm-attendance-calendar-stats {
        grid-template-columns: 1fr;
    }

    .bm-attendance-form {
        flex-direction: column;
        gap: 8px;
    }

    .bm-attendance-input {
        width: 100%;
        border-right: 1px solid #dc2626;
        border-radius: 12px;
        font-size: 15px;
    }

    .bm-attendance-submit-btn {
        width: 100%;
        min-width: 0;
        border-radius: 12px;
        font-size: 16px;
    }

    .bm-attendance-list-table th,
    .bm-attendance-list-table td {
        font-size: 10px;
        padding: 7px 3px;
    }

    .bm-attendance-day-num {
        font-size: 12px;
    }

    .bm-attendance-day-count {
        font-size: 11px;
    }
}
