/* ===== 출석체크 페이지 ===== */
.spk-attend-wrap { max-width: 100%; color: #1a2233; }
.spk-attend-header {
    background: linear-gradient(135deg, #0c2d5e, #1a6dff);
    border-radius: var(--spk-radius, 16px);
    padding: 16px 20px;
    color: #fff;
    margin-bottom: 10px;
}
.spk-attend-header h2 { margin: 0 0 4px; font-size: 18px; font-weight: 900; }
.spk-attend-header h2 i { margin-right: 6px; }
.spk-attend-header p { margin: 0; font-size: 12px; color: #8ca; }

.spk-attend-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 16px;
    align-items: flex-start;
}
@media (max-width: 900px) {
    .spk-attend-layout { grid-template-columns: 1fr; }
}

.spk-attend-main { display: flex; flex-direction: column; gap: 16px; }

/* ── 오늘 출석 카드 ── */
.spk-attend-today {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(17, 25, 40, 0.06);
    overflow: hidden;
}
.att-today-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px 24px;
    flex-wrap: wrap;
}
.att-today-icon {
    width: 64px; height: 64px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
    background: #eaf2ff; color: #1a6dff;
}
.att-state-done .att-today-icon { background: #e7f8ed; color: #1fa24c; }
.att-state-ready .att-today-icon { background: #fff6e0; color: #f08a00; }
.att-state-guest .att-today-icon { background: #f1f3f5; color: #7b8795; }
.att-today-text { flex: 1; min-width: 200px; }
.att-today-text strong { display: block; font-size: 17px; font-weight: 800; color: #0e1726; margin-bottom: 4px; }
.att-today-text span { font-size: 13px; color: #5a6b7a; line-height: 1.5; }
.att-today-text span em { font-style: normal; color: #f08a00; font-weight: 700; }
.att-today-text span b { color: #1a6dff; }
.att-today-stats { display: flex; gap: 14px; }
.att-today-stats > div {
    text-align: center;
    padding: 8px 14px;
    background: #f7fafe;
    border-radius: 10px;
}
.att-today-stats b { display: block; font-size: 22px; font-weight: 900; color: #1a6dff; }
.att-today-stats span { font-size: 11px; color: #7b8795; }

.att-today-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}
.att-today-actions .att-comment-input { flex: 1; min-width: 180px; }
.att-comment-input {
    border: 1px solid #d4dae0;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.att-comment-input:focus { border-color: #1a6dff; box-shadow: 0 0 0 3px rgba(26,109,255,.12); }

.att-today-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 11px 22px;
    background: #0e1726;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    border-radius: 10px;
    border: none;
    text-decoration: none;
    cursor: pointer;
    transition: transform .12s, box-shadow .12s;
}
.att-today-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,.15); }
.att-today-btn.att-primary {
    background: linear-gradient(135deg, #1a6dff, #2d8df5);
    box-shadow: 0 4px 12px rgba(26,109,255,.35);
}
.att-today-btn.att-primary:hover { box-shadow: 0 8px 20px rgba(26,109,255,.45); }
.att-today-btn[disabled] { opacity: .6; cursor: not-allowed; }

/* ── 달력 ── */
.spk-attend-calendar {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(17, 25, 40, 0.06);
    padding: 18px 20px 20px;
}
.att-cal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.att-cal-head h3 { margin: 0; font-size: 18px; font-weight: 800; color: #0e1726; }
.att-cal-nav {
    width: 32px; height: 32px;
    border-radius: 8px;
    border: 1px solid #e5e8ed;
    background: #fff;
    color: #5a6b7a;
    cursor: pointer;
    transition: background .12s;
}
.att-cal-nav:hover { background: #f1f5f9; color: #1a6dff; }

.att-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 6px;
}
.att-cal-weekdays > span {
    text-align: center;
    padding: 8px 0;
    font-size: 12px;
    font-weight: 700;
    color: #5a6b7a;
}
.att-cal-weekdays .sun { color: #e24b4b; }
.att-cal-weekdays .sat { color: #1a6dff; }

.att-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    min-height: 240px;
}
.att-cal-loading {
    grid-column: 1 / -1;
    padding: 60px 0;
    text-align: center;
    color: #98a6b7;
    font-size: 13px;
}
.att-cal-empty { visibility: hidden; }
.att-cal-cell {
    position: relative;
    aspect-ratio: 1;
    min-height: 58px;
    padding: 5px 4px;
    border-radius: 8px;
    background: #f7fafe;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 2px;
}
.att-cal-cell.sun .att-cal-num { color: #e24b4b; }
.att-cal-cell.sat .att-cal-num { color: #1a6dff; }
.att-cal-num { font-size: 12px; font-weight: 700; color: #5a6b7a; }
.att-cal-cell.is-today {
    background: linear-gradient(135deg, #fff6e0, #ffe7b3);
    box-shadow: 0 0 0 2px #f08a00 inset;
}
.att-cal-cell.is-today .att-cal-num { color: #c96e00; font-weight: 900; }
.att-cal-cell.is-monthend .att-cal-num::after { content: '★'; margin-left: 2px; font-size: 9px; color: #f08a00; }

.att-cal-cell.is-done {
    background: linear-gradient(135deg, #e7f8ed, #d3f4de);
    color: #1fa24c;
}
.att-cal-cell.is-done .att-cal-num { color: #1fa24c; font-weight: 800; }
.att-cal-cell.is-bonus-streak {
    background: linear-gradient(135deg, #fff5e6, #ffe0b3);
}
.att-cal-cell.is-bonus-streak .att-cal-num { color: #e27200; }
.att-cal-cell.is-bonus-monthend {
    background: linear-gradient(135deg, #ffe7ec, #ffb8c4);
    box-shadow: 0 0 0 2px #e24b6b inset;
}
.att-cal-cell.is-bonus-monthend .att-cal-num { color: #b3244a; }

.att-cal-cell.is-missed { background: #fafafa; opacity: .55; }
.att-cal-cell.is-missed .att-cal-num { color: #98a6b7; }

.att-cal-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    margin-top: auto;
    padding: 3px 6px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    align-self: center;
}
.att-cal-mark i { font-size: 9px; }
.att-cal-cell.is-done .att-cal-mark        { background: rgba(31,162,76,.95);  color: #fff; box-shadow: 0 2px 6px rgba(31,162,76,.25); }
.att-cal-cell.is-bonus-streak .att-cal-mark{ background: rgba(226,114,0,.95);  color: #fff; box-shadow: 0 2px 6px rgba(226,114,0,.25); }
.att-cal-cell.is-bonus-monthend .att-cal-mark{ background: rgba(179,36,74,.95); color: #fff; box-shadow: 0 2px 6px rgba(179,36,74,.25); }

.att-cal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #eef1f4;
    font-size: 11px;
    color: #5a6b7a;
}
.att-leg {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    font-weight: 700;
}
.att-leg i { font-size: 10px; }
.att-leg-done     { background: rgba(31,162,76,.12); color: #1fa24c; }
.att-leg-streak   { background: rgba(226,114,0,.12); color: #e27200; }
.att-leg-monthend { background: rgba(179,36,74,.12); color: #b3244a; }
.att-leg-miss     { background: #f1f3f5; color: #98a6b7; }

/* ── 사이드 ── */
.spk-attend-side { display: flex; flex-direction: column; gap: 16px; }
.att-info-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(17, 25, 40, 0.06);
    padding: 16px 18px;
}
.att-info-card h3 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 800;
    color: #0e1726;
    display: flex;
    align-items: center;
    gap: 6px;
}
.att-info-card h3 i { color: #1a6dff; }

.att-info-list { list-style: none; margin: 0; padding: 0; }
.att-info-list li {
    font-size: 12.5px;
    color: #5a6b7a;
    padding: 5px 0;
    padding-left: 14px;
    position: relative;
    line-height: 1.55;
}
.att-info-list li::before {
    content: '•';
    position: absolute;
    left: 0; top: 5px;
    color: #1a6dff;
    font-weight: 900;
}
.att-info-list b { color: #1a6dff; }

.att-bonus-list { list-style: none; margin: 0; padding: 0; }
.att-bonus-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    margin-bottom: 6px;
    background: #f7fafe;
    border-radius: 8px;
    font-size: 12.5px;
}
.att-bonus-list li:last-child { margin-bottom: 0; }
.att-bonus-list .att-bonus-when { color: #3f4856; font-weight: 600; }
.att-bonus-list b { color: #f08a00; font-weight: 900; }
.att-bonus-list li.att-bonus-monthend {
    background: linear-gradient(135deg, #ffe7ec, #fff0f3);
}
.att-bonus-list li.att-bonus-monthend b { color: #b3244a; }

.att-bonus-tip {
    margin: 10px 0 0;
    font-size: 11px;
    color: #7b8795;
    padding: 8px 10px;
    background: #f7fafe;
    border-radius: 6px;
}
.att-bonus-tip i { color: #f08a00; margin-right: 4px; }

.att-rank-list { list-style: none; margin: 0; padding: 0; counter-reset: rank; }
.att-rank-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    margin-bottom: 4px;
    border-radius: 8px;
    font-size: 12.5px;
    background: #fafbfc;
}
.att-rank-row.is-me { background: #eaf2ff; border: 1px solid #c2d9ff; }
.att-rank-num {
    width: 24px; height: 24px;
    border-radius: 50%;
    background: #e5e8ed;
    color: #5a6b7a;
    font-size: 11px;
    font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.att-rank-num.medal-1 { background: linear-gradient(135deg, #ffd84d, #ffa500); color: #fff; }
.att-rank-num.medal-2 { background: linear-gradient(135deg, #c0c4cd, #8e95a0); color: #fff; }
.att-rank-num.medal-3 { background: linear-gradient(135deg, #cd7f32, #a05a1f); color: #fff; }
.att-rank-nick {
    flex: 1;
    color: #0e1726;
    font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.att-rank-nick em { color: #1a6dff; font-style: normal; font-weight: 700; font-size: 11px; }
.att-rank-days {
    color: #1a6dff;
    font-weight: 700;
    font-size: 12px;
}
.att-rank-empty, .att-rank-loading {
    padding: 16px 10px;
    text-align: center;
    color: #98a6b7;
    font-size: 12px;
}

@media (max-width: 500px) {
    .att-today-inner { padding: 16px; }
    .att-today-icon { width: 48px; height: 48px; font-size: 22px; }
    .att-today-stats > div { padding: 6px 10px; }
    .att-today-stats b { font-size: 18px; }
    .spk-attend-calendar { padding: 12px; }
    .att-cal-cell { min-height: 46px; padding: 3px; }
    .att-cal-num { font-size: 11px; }
    .att-cal-mark { font-size: 9px; padding: 2px 4px; }
    .att-cal-mark i { font-size: 8px; }
}
