/**
 * Class Check PWA App Shell Styles (v1.4.0)
 *
 * 모바일 우선 설계. 하단 탭 네비 + safe-area-inset 대응.
 */

/* ─────────────────────────────────────────────────────
   기본 리셋 (public.css와 충돌 최소화)
   ───────────────────────────────────────────────────── */
html, body.cc-app {
    margin: 0;
    padding: 0;
    height: 100%;
    overscroll-behavior-y: contain; /* iOS의 bouncy scroll 방지 */
    -webkit-tap-highlight-color: transparent;
    background: #f5f7fa;
    color: #2c3e50;
    font-family: -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

body.cc-app {
    /* 하단 탭바 + safe-area 확보 */
    padding-bottom: calc(68px + env(safe-area-inset-bottom));
    padding-top: env(safe-area-inset-top);
    min-height: 100vh;
    box-sizing: border-box;
}

.cc-app-root {
    max-width: 720px;
    margin: 0 auto;
    min-height: 100%;
    position: relative;
}

/* ─────────────────────────────────────────────────────
   초기 로딩 화면
   ───────────────────────────────────────────────────── */
.cc-app-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    padding: 40px 20px;
    text-align: center;
}
/* β36: HTML5 hidden 속성이 CSS display 선언에 가려지는 문제 일괄 해결 */
[hidden] {
    display: none !important;
}
.cc-app-loading-icon {
    font-size: 64px;
    margin-bottom: 12px;
}
.cc-app-loading-title {
    font-size: 22px;
    font-weight: 700;
    color: #1E88E5;
    margin-bottom: 24px;
}
.cc-app-loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e3f2fd;
    border-top-color: #1E88E5;
    border-radius: 50%;
    animation: cc-spin 0.8s linear infinite;
    margin-bottom: 12px;
}
.cc-app-loading-text {
    color: #5a6a7a;
    font-size: 14px;
}
@keyframes cc-spin {
    to { transform: rotate(360deg); }
}

/* ─────────────────────────────────────────────────────
   메인 앱 영역
   ───────────────────────────────────────────────────── */
.cc-app-main {
    padding: 16px;
    /* β36: 모든 페이지 공통 — 하단 탭바(약 60px) + safe-area + 여유 24px */
    padding-bottom: calc(60px + env(safe-area-inset-bottom) + 24px);
    min-height: calc(100vh - 68px - env(safe-area-inset-bottom) - env(safe-area-inset-top));
}

/* 플레이스홀더 (v1.5.0 ~ v1.8.0 구현 전) */
.cc-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #5a6a7a;
}
.cc-placeholder-icon {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.6;
}
.cc-placeholder-title {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 8px;
}
.cc-placeholder-desc {
    font-size: 14px;
    color: #8a9aaa;
    margin: 0;
}

/* ─────────────────────────────────────────────────────
   하단 탭 네비게이션
   ───────────────────────────────────────────────────── */
.cc-app-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
    z-index: 100;
    box-shadow: 0 -1px 8px rgba(0, 0, 0, 0.04);
}
.cc-nav-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 2px;
    text-decoration: none;
    color: #8a9aaa;
    font-size: 10px;
    transition: color 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.cc-nav-tab:hover,
.cc-nav-tab:focus {
    color: #1E88E5;
    outline: none;
}
.cc-nav-tab.cc-nav-active {
    color: #1E88E5;
}
.cc-nav-icon {
    font-size: 20px;
    line-height: 1;
    margin-bottom: 3px;
}
.cc-nav-label {
    font-size: 10px;
    font-weight: 500;
}

/* ─────────────────────────────────────────────────────
   오프라인 배너
   ───────────────────────────────────────────────────── */
.cc-offline-banner {
    position: sticky;
    top: 0;
    background: #fff3e0;
    color: #7a4a00;
    padding: 8px 16px;
    text-align: center;
    font-size: 13px;
    z-index: 50;
    border-bottom: 1px solid #ffe0b2;
}

/* ─────────────────────────────────────────────────────
   상단 동기화 상태 배지 (v1.6.0)
   - 아주 얇고 작게, 상단에 sticky
   - 탭하면 지금 동기화 실행
   ───────────────────────────────────────────────────── */
.cc-sync-badge {
    position: sticky;
    top: 0;
    z-index: 49;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 4px 12px;
    font-size: 11px;
    line-height: 1.3;
    background: #f1f8e9;
    color: #33691e;
    border-bottom: 1px solid #dcedc8;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}
.cc-sync-badge:active {
    background: #dcedc8;
}
.cc-sync-badge-icon {
    font-size: 12px;
    line-height: 1;
}
.cc-sync-badge-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cc-sync-badge.is-syncing {
    background: #e3f2fd;
    color: #1565c0;
    border-bottom-color: #bbdefb;
}
.cc-sync-badge.is-error {
    background: #ffebee;
    color: #b71c1c;
    border-bottom-color: #ffcdd2;
}
.cc-sync-badge.is-stale {
    background: #fff8e1;
    color: #795548;
    border-bottom-color: #ffecb3;
}

/* ─────────────────────────────────────────────────────
   업데이트 배너 (새 버전 감지 시)
   ───────────────────────────────────────────────────── */
.cc-update-banner {
    position: fixed;
    bottom: calc(80px + env(safe-area-inset-bottom));
    left: 12px;
    right: 12px;
    max-width: 696px;
    margin: 0 auto;
    background: #1E88E5;
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(33, 150, 243, 0.28);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    z-index: 200;
    font-size: 14px;
}
.cc-update-banner button {
    background: #ffffff;
    color: #1E88E5;
    border: 0;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

/* ─────────────────────────────────────────────────────
   iOS standalone에서 상단 여백 보정
   ───────────────────────────────────────────────────── */
@media all and (display-mode: standalone) {
    body.cc-app {
        /* iOS 노치 대응 */
        padding-top: max(env(safe-area-inset-top), 0px);
    }
}

/* 작은 화면 대응 */
@media (max-width: 360px) {
    .cc-nav-label {
        font-size: 9px;
    }
    .cc-nav-icon {
        font-size: 18px;
    }
}

/* ─────────────────────────────────────────────────────
   v1.5.0: 설정 탭 스타일
   ───────────────────────────────────────────────────── */
.cc-settings {
    max-width: 720px;
    margin: 0 auto;
}
.cc-page-title {
    font-size: 22px;
    font-weight: 700;
    color: #2c3e50;
    margin: 8px 0 20px;
}
.cc-section {
    margin-bottom: 24px;
}
.cc-section-title {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 6px;
}
.cc-section-desc {
    font-size: 13px;
    color: #5a6a7a;
    margin: 0 0 10px;
    line-height: 1.5;
}
.cc-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
}

/* Google 상태 카드 */
.cc-google-card {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.cc-google-icon {
    font-size: 28px;
    flex-shrink: 0;
}
.cc-google-body {
    flex: 1;
    min-width: 180px;
}
.cc-google-body strong {
    display: block;
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 2px;
}
.cc-google-body p {
    margin: 0;
    font-size: 12px;
    color: #5a6a7a;
    line-height: 1.4;
}
.cc-google-email {
    font-family: ui-monospace, 'SF Mono', Menlo, monospace;
    color: #1565C0 !important;
    font-size: 12px !important;
    word-break: break-all;
}
.cc-google-folder-link {
    display: inline-block;
    margin-top: 6px;
    color: #1E88E5;
    font-size: 12px;
    text-decoration: none;
}
.cc-google-folder-link:hover {
    text-decoration: underline;
}
.cc-google-card.cc-connected {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-color: #81c784;
}
.cc-google-card.cc-disconnected {
    background: #f8fafc;
}
.cc-google-card.cc-error {
    background: #ffebee;
    border-color: #ef9a9a;
}

/* 정보 카드 (key-value rows) */
.cc-info-card {
    padding: 12px 16px;
}
.cc-kv-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f3f6;
    font-size: 14px;
    gap: 12px;
    flex-wrap: wrap;
}
.cc-kv-row:last-child {
    border-bottom: 0;
}
.cc-kv-row > span:first-child {
    color: #5a6a7a;
    font-size: 13px;
}
.cc-kv-row code {
    font-family: ui-monospace, 'SF Mono', Menlo, monospace;
    font-size: 12px;
    background: #f5f7fa;
    padding: 2px 6px;
    border-radius: 4px;
    color: #37474f;
}
.cc-badge {
    font-style: normal;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 4px;
}
.cc-badge-ok {
    background: #e8f5e9;
    color: #2e7d32;
}
.cc-badge-warn {
    background: #fff3e0;
    color: #e65100;
}

/* 로딩 카드 */
.cc-loading-card {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #5a6a7a;
    font-size: 13px;
}
.cc-spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid #e3f2fd;
    border-top-color: #1E88E5;
    border-radius: 50%;
    animation: cc-spin 0.8s linear infinite;
    flex-shrink: 0;
}

/* 버튼 (app 내부용) */
.cc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #D1D5DB;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    text-decoration: none;
    background: #ffffff;
    color: #1F2937;
}
.cc-btn:hover:not(:disabled) {
    background: #F3F4F6;
    border-color: #9CA3AF;
}
.cc-btn:disabled {
    opacity: 1;
    cursor: not-allowed;
    background: #F3F4F6;
    color: #6B7280;
    border-color: #D1D5DB;
}
/* β40: primary — 진한 파란 배경 + 흰 글씨 */
.cc-btn.cc-btn-primary {
    background: #1565C0 !important;
    color: #ffffff !important;
    border-color: #1565C0 !important;
}
.cc-btn.cc-btn-primary:hover:not(:disabled) {
    background: #0D47A1 !important;
    border-color: #0D47A1 !important;
    color: #ffffff !important;
}
.cc-btn.cc-btn-primary:disabled {
    background: #64B5F6 !important;
    border-color: #64B5F6 !important;
    color: #ffffff !important;
    opacity: 1;
}
/* β40: outline — 흰 배경 + 진한 파란 글씨 + 명확한 테두리 */
.cc-btn.cc-btn-outline {
    background: #ffffff !important;
    color: #1565C0 !important;
    border-color: #1565C0 !important;
}
.cc-btn.cc-btn-outline:hover:not(:disabled) {
    background: #E3F2FD !important;
    color: #0D47A1 !important;
    border-color: #0D47A1 !important;
}
.cc-btn.cc-btn-outline:disabled {
    background: #F3F4F6 !important;
    color: #6B7280 !important;
    border-color: #D1D5DB !important;
    opacity: 1;
}

/* ─────────────────────────────────────────────────────
   v1.5.0: 토스트 알림
   ───────────────────────────────────────────────────── */
.cc-toast-container {
    position: fixed;
    bottom: calc(80px + env(safe-area-inset-bottom));
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 300;
    pointer-events: none;
    padding: 0 16px;
}
.cc-toast {
    background: #2c3e50;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    max-width: 440px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: auto;
}
.cc-toast.cc-toast-visible {
    opacity: 1;
    transform: translateY(0);
}
.cc-toast-success {
    background: #2e7d32;
}
.cc-toast-error {
    background: #c62828;
}

/* ─────────────────────────────────────────────────────
   v1.5.4: 홈 화면
   ───────────────────────────────────────────────────── */
.cc-home {
    max-width: 720px;
    margin: 0 auto;
}
.cc-home-hero {
    padding: 20px 4px 16px;
}
.cc-home-title {
    font-size: 22px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 6px;
}
.cc-home-sub {
    color: #5a6a7a;
    font-size: 14px;
    margin: 0;
}
.cc-home-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 16px;
}
.cc-stat-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.cc-stat-label {
    color: #5a6a7a;
    font-size: 13px;
}
.cc-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #1565C0;
}
.cc-stat-value span {
    font-size: 14px;
    color: #5a6a7a;
    margin-left: 4px;
    font-weight: 500;
}
.cc-stat-link {
    color: #1E88E5;
    font-size: 13px;
    text-decoration: none;
}
.cc-home-notice {
    background: #e3f2fd;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    color: #1565C0;
    margin-top: 12px;
}
.cc-home-notice p { margin: 0; line-height: 1.5; }

/* 로딩 중앙 배치 */
.cc-loading-center {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

/* ─────────────────────────────────────────────────────
   v1.5.4: 경고/공지 배너
   ───────────────────────────────────────────────────── */
.cc-banner {
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
}
.cc-banner strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}
.cc-banner p {
    margin: 0 0 10px;
    color: inherit;
    opacity: 0.88;
    font-size: 13px;
}
.cc-banner-warning {
    background: #fff8e1;
    color: #7a4a00;
    border: 1px solid #ffe082;
}
.cc-banner .cc-btn {
    font-size: 12px;
    padding: 6px 12px;
}

/* ─────────────────────────────────────────────────────
   v1.5.4: 온보딩 위저드
   ───────────────────────────────────────────────────── */
.cc-onboard {
    max-width: 520px;
    margin: 0 auto;
    padding: 8px 4px;
}
.cc-onboard-progress {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 12px 0 24px;
}
.cc-step {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f0f3f6;
    color: #8a9aaa;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}
.cc-step-active {
    background: #1E88E5;
    color: #fff;
}
.cc-step-done {
    background: #43a047;
    color: #fff;
}
.cc-onboard-title {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 8px;
    color: #2c3e50;
}
.cc-onboard-desc {
    text-align: center;
    color: #5a6a7a;
    font-size: 14px;
    margin: 0 0 24px;
    line-height: 1.5;
}
.cc-onboard-desc small {
    color: #8a9aaa;
    font-size: 12px;
}
.cc-onboard-actions {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    justify-content: space-between;
}
.cc-onboard-actions .cc-btn {
    flex: 1;
    padding: 12px;
    font-size: 14px;
}

/* 폼 공통 */
.cc-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.cc-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.cc-field-label {
    font-size: 13px;
    color: #5a6a7a;
    font-weight: 500;
}
.cc-input {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    font-size: 15px;
    background: #fff;
    color: #2c3e50;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
    font-family: inherit;
}
.cc-input:focus {
    outline: none;
    border-color: #1E88E5;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.12);
}
.cc-input-large {
    font-size: 20px;
    padding: 14px;
    text-align: center;
    font-weight: 600;
}

.cc-btn-block {
    width: 100%;
}

/* 이름 입력 리스트 (Step 3) */
.cc-name-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* v1.5.7: max-height/overflow 제거.
       리스트 자체 스크롤 대신 페이지 전체가 스크롤되도록 (iOS 키보드와 잘 어울림). */
    padding: 8px;
    background: #f8fafc;
    border-radius: 10px;
}
.cc-name-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 2px;
}
.cc-name-num {
    width: 32px;
    text-align: center;
    font-weight: 700;
    color: #1565C0;
    font-size: 14px;
    flex-shrink: 0;
}
.cc-name-input {
    flex: 1;
    padding: 8px 10px;
    font-size: 14px;
}

/* ─────────────────────────────────────────────────────
   v1.5.4: 학생 탭
   ───────────────────────────────────────────────────── */
.cc-students {
    max-width: 720px;
    margin: 0 auto;
}
.cc-students-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.cc-btn-small {
    padding: 6px 12px;
    font-size: 13px;
}
.cc-student-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.cc-student-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px 6px 4px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}
.cc-student-row.cc-student-missing {
    border-color: #ffc107;
    background: #fffbea;
}
.cc-student-num {
    width: 32px;
    text-align: center;
    font-weight: 700;
    color: #1565C0;
    font-size: 14px;
    flex-shrink: 0;
}
.cc-student-name {
    flex: 1;
    border: 1px solid transparent;
    background: transparent;
    padding: 8px 10px;
    font-size: 15px;
    border-radius: 6px;
}
.cc-student-name:focus {
    background: #fff;
    border-color: #1E88E5;
}
.cc-student-name.cc-input-saved {
    background: #e8f5e9;
    transition: background 0.4s;
}
.cc-icon-btn {
    background: transparent;
    border: 0;
    font-size: 18px;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    color: #5a6a7a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cc-icon-btn:hover {
    background: #f5f7fa;
}

/* ─────────────────────────────────────────────────────
   v1.5.4: 설정 탭 - 학급 정보 카드
   ───────────────────────────────────────────────────── */
.cc-class-card {
    padding: 14px 16px;
}
.cc-class-card.cc-disconnected {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.cc-class-body {
    flex: 1;
    min-width: 180px;
}
.cc-class-body strong {
    display: block;
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 2px;
}
.cc-class-body p {
    margin: 0;
    font-size: 12px;
    color: #5a6a7a;
}

/* ─────────────────────────────────────────────────────
   v1.5.7: 온보딩 레이아웃 - sticky footer 복귀 + padding 충분
   
   v1.5.5 sticky 스타일이 가장 자연스러웠음 (텍스트 입력 + 버튼 고정 모두 매끄러움).
   그 당시 버튼이 가렸던 원인은 content padding-bottom 부족이었음 (16px 였음).
   
   해결:
     - sticky 복귀
     - content padding-bottom 을 32px → 키보드 없을 때도 충분한 여백
     - 마지막 입력칸과 sticky 버튼 사이에 숨쉬는 공간 확보
   ───────────────────────────────────────────────────── */
.cc-onboard {
    display: flex;
    flex-direction: column;
    /* 탭바 높이 제외한 화면 높이 → sticky 가 제대로 붙도록 */
    min-height: calc(100vh - 68px - env(safe-area-inset-bottom, 0px) - env(safe-area-inset-top, 0px));
    max-width: 520px;
    margin: 0 auto;
    padding: 0;
}

.cc-onboard-body {
    flex: 1;
    /* 마지막 입력칸 아래 32px 여백 → sticky footer 경계선과 시각적 구분 */
    padding: 8px 4px 32px;
    -webkit-overflow-scrolling: touch;
}

.cc-onboard-actions {
    position: sticky;
    bottom: 0;
    background: #f5f7fa;
    padding: 12px 4px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #e5e7eb;
    margin-top: auto;
    z-index: 10;
    display: flex;
    gap: 8px;
}
.cc-onboard-actions > * {
    flex: 1;
}

/* ─────────────────────────────────────────────────────
   v1.5.5: 개인정보 보호 안내 박스 (온보딩 Step 1)
   ───────────────────────────────────────────────────── */
.cc-privacy-notice {
    background: #fff3e0;
    border: 1px solid #ffcc80;
    border-radius: 10px;
    padding: 14px 16px;
    margin: 16px 0 20px;
    font-size: 13px;
    line-height: 1.6;
    color: #5d3a00;
}
.cc-privacy-notice strong {
    display: block;
    font-size: 14px;
    color: #bf6000;
    margin-bottom: 6px;
}
.cc-privacy-notice p {
    margin: 0;
}
.cc-privacy-notice em {
    font-style: normal;
    background: rgba(255, 152, 0, 0.15);
    padding: 0 4px;
    border-radius: 3px;
    color: #7a4a00;
}

/* 입력 필드 하단 설명 */
.cc-field-help {
    display: block;
    font-size: 11px;
    color: #8a9aaa;
    margin-top: 4px;
    line-height: 1.4;
}

/* ─────────────────────────────────────────────────────
   v1.6.0: 동기화 카드 + 초기화 카드
   ───────────────────────────────────────────────────── */
.cc-sync-card {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.cc-sync-card.cc-disconnected {
    background: #f8fafc;
}
.cc-sync-body {
    flex: 1;
    min-width: 180px;
}
.cc-sync-body strong {
    display: block;
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 2px;
}
.cc-sync-body p {
    margin: 0;
    font-size: 12px;
    color: #5a6a7a;
}
.cc-sync-body .cc-kv-row {
    padding: 4px 0;
    font-size: 13px;
}

/* 초기화 카드 */
.cc-reset-card {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.cc-reset-body {
    flex: 1;
    min-width: 180px;
}
.cc-reset-body p {
    margin: 0 0 4px;
    font-size: 13px;
    color: #2c3e50;
}
.cc-reset-body small {
    color: #8a9aaa;
    font-size: 12px;
    line-height: 1.5;
    display: block;
}

/* 위험 버튼 (초기화 등) */
/* β40: cc-btn-danger 통일 정의는 아래쪽 (background:#DC2626) 사용 */

/* ─────────────────────────────────────────────────────
   디버그 로그 섹션 (v1.6.0)
   ───────────────────────────────────────────────────── */
.cc-debug-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cc-debug-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.cc-btn-sm {
    padding: 4px 10px !important;
    font-size: 12px !important;
    min-height: auto !important;
}
.cc-debug-output {
    background: #fafafa;
    color: #212121;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 11px;
    line-height: 1.4;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    max-height: 360px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
    user-select: text;
    -webkit-user-select: text;
}

/* ─────────────────────────────────────────────────────
   v1.6.2: 복원 모달 + 학생 번호 너비 조정
   ───────────────────────────────────────────────────── */

/* 번호 너비는 그대로 유지 — 화면에는 기본 번호만 표시됨 */

/* 모달 오버레이 */
.cc-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 16px;
    animation: cc-modal-fade-in 0.15s ease-out;
}
@keyframes cc-modal-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.cc-modal {
    background: #fff;
    border-radius: 14px;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: cc-modal-slide-up 0.18s ease-out;
}
@keyframes cc-modal-slide-up {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.cc-modal-header {
    padding: 18px 20px 12px;
    border-bottom: 1px solid #eee;
}
.cc-modal-header h2 {
    margin: 0;
    font-size: 17px;
    color: #333;
}

.cc-modal-body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
}

.cc-modal-desc {
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 1.55;
    color: #555;
}

.cc-modal-divider {
    height: 1px;
    background: #eee;
    margin: 14px 0;
}

.cc-modal-footer {
    padding: 12px 20px 16px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    border-top: 1px solid #eee;
}

/* 복원 후보 리스트 */
.cc-restore-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.cc-restore-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
}

.cc-restore-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}
.cc-restore-num {
    font-weight: 700;
    color: #1565C0;
    background: #E3F2FD;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 13px;
    flex-shrink: 0;
}
.cc-restore-name {
    font-size: 14px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cc-restore-btn {
    flex-shrink: 0;
    white-space: nowrap;
}

/* 공통 버튼 유틸 */
.cc-btn-block {
    width: 100%;
    display: block;
}
/* β40: ghost — 명확한 글씨 + 부드러운 호버 */
.cc-btn-ghost {
    background: transparent;
    border: 1px solid transparent;
    color: #4B5563;
    font-weight: 500;
}
.cc-btn-ghost:hover:not(:disabled) {
    background: #F3F4F6;
    color: #1F2937;
}
.cc-btn-ghost:disabled {
    color: #D1D5DB;
}

/* ─────────────────────────────────────────────────────
   v1.7.0-α: 학생 데이터 점검 모달
   ───────────────────────────────────────────────────── */

.cc-modal-wide {
    max-width: 640px;
}

.cc-inspect-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 55vh;
    overflow-y: auto;
    padding: 2px;
}

.cc-inspect-row {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 4px 12px;
    padding: 10px 12px;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    align-items: center;
}
.cc-inspect-main {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.cc-inspect-num {
    font-weight: 700;
    color: #1565C0;
    min-width: 42px;
}
.cc-inspect-name {
    color: #333;
}
.cc-inspect-meta {
    grid-column: 1 / 2;
    font-size: 12px;
    color: #888;
    font-family: ui-monospace, Menlo, Consolas, monospace;
}
.cc-inspect-meta code {
    background: #eee;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 11px;
}
.cc-inspect-actions {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
}

.cc-pill {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}
.cc-pill-green { background: #E8F5E9; color: #2E7D32; }
.cc-pill-gray  { background: #F5F5F5; color: #666; }

/* β40: cc-btn-danger 통일 정의는 아래쪽 (background:#DC2626) 사용 — 중복 제거 */

/* ─────────────────────────────────────────────────────
   v1.7.0-β: Drive 학급 목록 UI (온보딩 + 설정 탭)
   ───────────────────────────────────────────────────── */

.cc-drive-classes {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 16px;
}
.cc-drive-classes-empty {
    background: #FAFAFA;
}

.cc-drive-classes-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.cc-drive-classes-header strong {
    font-size: 14px;
    color: #333;
}
.cc-drive-classes-header small {
    font-size: 12px;
    color: #777;
}

.cc-drive-classes-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    color: #666;
    font-size: 13px;
}

.cc-drive-class-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cc-drive-class-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #CBD5E1;
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    font: inherit;
    transition: background 0.12s, border-color 0.12s;
}
.cc-drive-class-item:hover {
    background: #E0F2FE;
    border-color: #38BDF8;
}
.cc-drive-class-item:active {
    background: #BAE6FD;
}

.cc-drive-class-name {
    font-weight: 600;
    color: #0F172A;
}
.cc-drive-class-time {
    font-size: 12px;
    color: #64748B;
}

.cc-drive-classes-divider {
    text-align: center;
    font-size: 12px;
    color: #94A3B8;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed #CBD5E1;
}

.cc-dim {
    color: #64748B;
    font-size: 13px;
    margin: 0;
    line-height: 1.6;
}

/* 설정 탭 - Drive 학급 모달 행 */
.cc-drive-list-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 55vh;
    overflow-y: auto;
    padding: 2px;
}

.cc-drive-class-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
}
.cc-drive-class-info {
    flex: 1;
    min-width: 0;
}
.cc-drive-class-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}
.cc-drive-class-title strong {
    color: #0F172A;
    word-break: break-word;
}
.cc-drive-class-sub {
    font-size: 12px;
    color: #64748B;
}
.cc-drive-class-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.cc-class-actions {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.cc-error-text {
    color: #C62828;
    font-size: 13px;
    padding: 10px;
    background: #FFEBEE;
    border-radius: 8px;
    margin: 0;
}

/* ─────────────────────────────────────────────────────
   v1.7.0-β1: 문제 해결 섹션
   ───────────────────────────────────────────────────── */

.cc-troubleshoot-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}
.cc-troubleshoot-row:last-child {
    border-bottom: none;
}
.cc-troubleshoot-row > div:first-child {
    flex: 1;
    min-width: 0;
}
.cc-troubleshoot-row strong {
    display: block;
    margin-bottom: 2px;
    font-size: 14px;
    color: #333;
}
.cc-troubleshoot-row p {
    margin: 0;
    color: #666;
    line-height: 1.5;
}
.cc-troubleshoot-row button {
    flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────
   v1.7.0-β5: 학급정보 카드 액션 그리드 + 홈 빈상태
   ───────────────────────────────────────────────────── */

.cc-class-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
    justify-content: stretch;
}
.cc-class-actions-grid > .cc-btn {
    width: 100%;
    margin: 0;
}

.cc-btn-block {
    width: 100%;
    display: block;
}

.cc-home-empty {
    background: #F8F9FA;
    border: 1px dashed #DEE2E6;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-top: 16px;
}
.cc-home-empty p {
    margin: 0 0 12px;
    color: #495057;
    font-size: 14px;
}

/* ─────────────────────────────────────────────────────
   v1.7.0-β5: 시간표 자동계산 입력 (설정)
   ───────────────────────────────────────────────────── */

.cc-schedule-input {
    padding: 14px 14px 12px;
}

.cc-sched-section {
    margin-bottom: 12px;
}
.cc-sched-section-label {
    font-size: 12px;
    color: #6B7280;
    margin-bottom: 6px;
}

.cc-day-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.cc-day-pill {
    padding: 7px 14px;
    font-size: 13px;
    border-radius: 999px;
    border: 1px solid #D1D5DB;
    background: #FFFFFF;
    color: #374151;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s;
    font-weight: 400;
    line-height: 1;
    min-width: 36px;
}
.cc-day-pill:hover {
    border-color: #9CA3AF;
}
.cc-day-pill.cc-pill-on {
    background: #E3F2FD;
    color: #1565C0;
    border-color: #1565C0;
    font-weight: 500;
}

.cc-sched-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 12px;
    margin-top: 4px;
}

.cc-sched-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.cc-sched-field > span {
    font-size: 11px;
    color: #6B7280;
}

.cc-input-group {
    display: flex;
    align-items: center;
    gap: 4px;
}
.cc-input-group input {
    flex: 1;
    min-width: 0;
    padding: 7px 9px;
    font-size: 13px;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    background: #FFFFFF;
    color: #111827;
    -webkit-appearance: none;
    appearance: none;
}
.cc-input-group input:focus {
    outline: none;
    border-color: #1565C0;
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.15);
}
.cc-input-group em {
    font-size: 11px;
    color: #9CA3AF;
    font-style: normal;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────
   v1.7.0-β5: 시간표 본 그리드 (요일×교시)
   ───────────────────────────────────────────────────── */

.cc-schedule-page {
    padding: 16px;
}

.cc-tt-grid {
    display: grid;
    grid-template-columns: 48px repeat(5, 1fr);
    gap: 1px;
    background: #E5E7EB;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 12px;
}

.cc-tt-cell {
    background: #FFFFFF;
    padding: 8px 4px;
    text-align: center;
    font-size: 12px;
    min-height: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border: none;
    color: #111827;
    box-sizing: border-box;
}

.cc-tt-head {
    background: #F9FAFB;
    color: #6B7280;
    font-weight: 500;
    min-height: 36px;
}

.cc-tt-today {
    background: #E3F2FD;
    color: #1565C0;
}

.cc-tt-empty {
    color: #D1D5DB;
}

.cc-tt-slot {
    background: #FFFFFF;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
}
.cc-tt-slot:hover {
    background: #F3F4F6;
}
.cc-tt-slot:active {
    background: #E5E7EB;
}
.cc-tt-slot.cc-tt-custom {
    background: #FFFBEB;
}
.cc-tt-slot.cc-tt-custom:hover {
    background: #FEF3C7;
}

.cc-tt-time {
    font-size: 11px;
    color: #6B7280;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    line-height: 1;
}
.cc-tt-subj {
    font-size: 13px;
    font-weight: 500;
    color: #111827;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}
.cc-tt-subj em {
    color: #D1D5DB;
    font-style: normal;
    font-weight: 400;
}

.cc-tt-lunch {
    background: #FFF7ED;
    color: #9A3412;
}
.cc-tt-lunch-label {
    background: #FFF7ED;
    color: #9A3412;
    font-size: 14px;
    min-height: 32px;
}
.cc-tt-lunch .cc-tt-time {
    color: #9A3412;
}

.cc-tt-hint {
    margin-top: 10px;
    font-size: 12px;
    color: #9CA3AF;
    text-align: center;
}

/* ─────────────────────────────────────────────────────
   v1.7.0-β5: 다크모드 지원
   ───────────────────────────────────────────────────── */
@media not all {
    .cc-day-pill {
        background: #1F2937;
        color: #E5E7EB;
        border-color: #374151;
    }
    .cc-day-pill.cc-pill-on {
        background: #1E3A8A;
        color: #BFDBFE;
        border-color: #60A5FA;
    }
    .cc-input-group input {
        background: #111827;
        color: #E5E7EB;
        border-color: #374151;
    }
    .cc-tt-grid {
        background: #374151;
        border-color: #374151;
    }
    .cc-tt-cell {
        background: #1F2937;
        color: #E5E7EB;
    }
    .cc-tt-head {
        background: #111827;
        color: #9CA3AF;
    }
    .cc-tt-today {
        background: #1E3A8A;
        color: #BFDBFE;
    }
    .cc-tt-slot:hover {
        background: #374151;
    }
    .cc-tt-slot.cc-tt-custom {
        background: #422006;
    }
    .cc-tt-slot.cc-tt-custom:hover {
        background: #5B2C0C;
    }
    .cc-tt-time {
        color: #9CA3AF;
    }
    .cc-tt-subj {
        color: #F9FAFB;
    }
    .cc-tt-lunch,
    .cc-tt-lunch-label {
        background: #422006;
        color: #FED7AA;
    }
    .cc-tt-lunch .cc-tt-time {
        color: #FED7AA;
    }
    .cc-home-empty {
        background: #111827;
        border-color: #374151;
    }
    .cc-home-empty p {
        color: #D1D5DB;
    }
}

/* ─────────────────────────────────────────────────────
   v1.7.0-β8: 대시보드 그리드
   ───────────────────────────────────────────────────── */

.cc-dashboard .cc-home-hero {
    margin-bottom: 16px;
}

.cc-dash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0 12px;
}

.cc-dash-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 16px 14px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all 0.15s;
    min-height: 110px;
    position: relative;
}
.cc-dash-card:hover {
    border-color: #1565C0;
    background: #F8FAFE;
}
.cc-dash-card:active {
    transform: scale(0.98);
}

.cc-dash-icon {
    font-size: 22px;
    line-height: 1;
    margin-bottom: 4px;
}

.cc-dash-title {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    line-height: 1.3;
}

.cc-dash-desc {
    font-size: 11px;
    color: #6B7280;
    line-height: 1.4;
}

.cc-dash-soon {
    margin-top: auto;
    padding-top: 6px;
    font-size: 10px;
    color: #9CA3AF;
    text-transform: none;
}

.cc-dash-card.cc-dash-placeholder {
    opacity: 0.85;
}

/* ─────────────────────────────────────────────────────
   v1.7.0-β8: 학생 명단 모달
   ───────────────────────────────────────────────────── */

.cc-modal-tall .cc-modal-body {
    max-height: 65vh;
    overflow-y: auto;
}

.cc-roster-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: #F9FAFB;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 12px;
}
.cc-roster-count {
    color: #6B7280;
}
.cc-roster-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    color: #6B7280;
}

.cc-roster-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: #E5E7EB;
    border-radius: 8px;
    overflow: hidden;
}

.cc-roster-row {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    background: #FFFFFF;
}

.cc-roster-row-inactive {
    opacity: 0.55;
    background: #F9FAFB;
}

.cc-roster-num {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 12px;
    color: #6B7280;
    text-align: center;
    background: #F3F4F6;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    padding: 5px 4px;
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1;
}
.cc-roster-num:hover {
    background: #E0E7FF;
    color: #1565C0;
    border-color: #1565C0;
}

.cc-roster-num-suffix {
    color: #1565C0;
    background: #E3F2FD;
    border-color: #BBDEFB;
}

.cc-roster-name {
    width: 100%;
    padding: 6px 8px;
    font-size: 13px;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    background: #FFFFFF;
}
.cc-roster-name:focus {
    outline: none;
    border-color: #1565C0;
    box-shadow: 0 0 0 2px rgba(21, 101, 192, 0.15);
}
.cc-roster-row-inactive .cc-roster-name {
    background: #F3F4F6;
}
.cc-roster-name-saved {
    border-color: #10B981 !important;
    background: #ECFDF5 !important;
}

.cc-roster-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 40px;
    justify-content: flex-end;
}
.cc-roster-badge {
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 999px;
    line-height: 1.4;
    white-space: nowrap;
}
.cc-roster-badge-x {
    background: #FCEBEB;
    color: #991B1B;
}
.cc-roster-badge-s {
    background: #FEF3C7;
    color: #92400E;
}

.cc-roster-empty {
    padding: 40px 20px;
    text-align: center;
    color: #9CA3AF;
    font-size: 13px;
    background: #FFFFFF;
}

@media not all {
    .cc-dash-card {
        background: #1F2937;
        border-color: #374151;
    }
    .cc-dash-card:hover {
        background: #1E3A5F;
        border-color: #60A5FA;
    }
    .cc-dash-title { color: #F9FAFB; }
    .cc-dash-desc { color: #9CA3AF; }
    .cc-dash-soon { color: #6B7280; }

    .cc-roster-toolbar { background: #111827; }
    .cc-roster-count, .cc-roster-toggle { color: #9CA3AF; }
    .cc-roster-list { background: #374151; }
    .cc-roster-row { background: #1F2937; }
    .cc-roster-row-inactive { background: #111827; }
    .cc-roster-num { background: #111827; color: #9CA3AF; border-color: #374151; }
    .cc-roster-num:hover { background: #1E3A5F; color: #BFDBFE; border-color: #60A5FA; }
    .cc-roster-num-suffix { background: #1E3A5F; color: #BFDBFE; border-color: #1E40AF; }
    .cc-roster-name { background: #111827; color: #F9FAFB; border-color: #374151; }
    .cc-roster-name:focus { border-color: #60A5FA; }
    .cc-roster-row-inactive .cc-roster-name { background: #0F172A; }
    .cc-roster-empty { background: #1F2937; color: #6B7280; }
    .cc-roster-badge-x { background: #5B1A1A; color: #FECACA; }
    .cc-roster-badge-s { background: #422006; color: #FED7AA; }
}

/* ─────────────────────────────────────────────────────
   v1.7.0-β9: 학생 상태(status) 시각 처리
   ───────────────────────────────────────────────────── */

.cc-roster-toolbar {
    align-items: flex-start;
}
.cc-roster-toolbar .cc-roster-count {
    line-height: 1.5;
}
.cc-roster-sub {
    font-size: 11px;
    color: #9CA3AF;
    font-weight: 400;
}
.cc-ci-other {
    font-weight: 400;
    color: #9CA3AF;
    font-size: 12px;
    margin-left: 4px;
}

.cc-roster-row {
    grid-template-columns: 56px 1fr auto;
}

.cc-roster-action {
    background: transparent;
    border: 1px solid transparent;
    color: #6B7280;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    padding: 0;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cc-roster-action:hover {
    background: #F3F4F6;
    border-color: #E5E7EB;
}

/* status별 행 스타일 — 카운트 학생: 살짝 강조 / 비카운트: 흐리게 */
.cc-roster-row-deferred .cc-roster-name,
.cc-roster-row-alt .cc-roster-name {
    background: #FEFCE8;
}
.cc-roster-row-deferred,
.cc-roster-row-alt {
    background: #FFFEF5;
}

.cc-roster-row-out,
.cc-roster-row-vacant,
.cc-roster-row-inactive {
    opacity: 0.65;
    background: #F9FAFB;
}
.cc-roster-row-vacant .cc-roster-name {
    background: #F3F4F6;
    color: #9CA3AF;
    font-style: italic;
}

/* status 배지 — 6종 색상 */
.cc-roster-badge-active     { display: none; }
.cc-roster-badge-deferred     { background: #FEF3C7; color: #92400E; }
.cc-roster-badge-alt_school { background: #DBEAFE; color: #1E40AF; }
.cc-roster-badge-transferred_out { background: #FEE2E2; color: #991B1B; }
.cc-roster-badge-vacant     { background: #E5E7EB; color: #4B5563; }
.cc-roster-badge-inactive   { background: #FCEBEB; color: #991B1B; }

/* 상태 변경 메뉴 (popup) */
.cc-status-menu {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 4px;
    min-width: 160px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.cc-status-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    font-size: 13px;
    color: #111827;
    width: 100%;
}
.cc-status-menu-item:hover {
    background: #F3F4F6;
}
.cc-status-menu-item.cc-status-menu-current {
    background: #E0E7FF;
    color: #1E40AF;
    font-weight: 500;
}
.cc-status-menu-item small {
    margin-left: auto;
    font-size: 10px;
    color: #9CA3AF;
}
.cc-status-menu-item.cc-status-menu-current small {
    color: #1E40AF;
}

.cc-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.cc-status-dot-active     { background: #10B981; }
.cc-status-dot-deferred     { background: #F59E0B; }
.cc-status-dot-alt_school { background: #3B82F6; }
.cc-status-dot-transferred_out { background: #EF4444; }
.cc-status-dot-vacant     { background: #9CA3AF; }
.cc-status-dot-inactive   { background: #6B7280; }

@media not all {
    .cc-roster-sub { color: #6B7280; }
    .cc-ci-other { color: #6B7280; }

    .cc-roster-row-deferred,
    .cc-roster-row-alt { background: #2A2310; }
    .cc-roster-row-deferred .cc-roster-name,
    .cc-roster-row-alt .cc-roster-name { background: #2A2310; }

    .cc-roster-row-out,
    .cc-roster-row-vacant,
    .cc-roster-row-inactive { background: #111827; }
    .cc-roster-row-vacant .cc-roster-name { background: #0F172A; color: #6B7280; }

    .cc-roster-action { color: #9CA3AF; }
    .cc-roster-action:hover { background: #374151; border-color: #4B5563; }

    .cc-roster-badge-deferred { background: #422006; color: #FED7AA; }
    .cc-roster-badge-alt_school { background: #1E3A5F; color: #BFDBFE; }
    .cc-roster-badge-transferred_out { background: #5B1A1A; color: #FECACA; }
    .cc-roster-badge-vacant { background: #374151; color: #D1D5DB; }
    .cc-roster-badge-inactive { background: #5B1A1A; color: #FECACA; }

    .cc-status-menu {
        background: #1F2937;
        border-color: #374151;
        box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    }
    .cc-status-menu-item { color: #F9FAFB; }
    .cc-status-menu-item:hover { background: #374151; }
    .cc-status-menu-item.cc-status-menu-current {
        background: #1E3A5F;
        color: #BFDBFE;
    }
    .cc-status-menu-item small { color: #6B7280; }
    .cc-status-menu-item.cc-status-menu-current small { color: #BFDBFE; }
}

/* ─────────────────────────────────────────────────────
   v1.7.0-β10: 스크롤 체이닝 차단 + 메뉴 위치 보정
   ───────────────────────────────────────────────────── */

/* 모달 body 끝까지 스크롤해도 뒤쪽 페이지로 스크롤이 넘어가지 않도록 */
.cc-modal-tall .cc-modal-body,
.cc-modal-overlay .cc-modal-body {
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

/* 학생 명단 리스트 내부 스크롤이 따로 생길 경우에도 contain */
.cc-roster-list {
    overscroll-behavior: contain;
}

/* 상태 메뉴: 모달보다 위에 떠야 함 (모달 z-index 가 보통 1000~ 대) */
.cc-status-menu {
    z-index: 10000 !important;
}

/* 위쪽으로 펼쳐졌을 때 시각 표시(선택사항) — 메뉴 자체엔 변경 없음 */
.cc-status-menu-above { /* placeholder */ }
.cc-status-menu-below { /* placeholder */ }

/* ─────────────────────────────────────────────────────
   v1.7.0-β11: 전입(transferred_in) + 영구 삭제 메뉴
   ───────────────────────────────────────────────────── */

/* 전입 행: 카운트 학생이라 너무 흐리게 X. 옅은 청록 강조 */
.cc-roster-row-in {
    background: #F0FDFA;
}
.cc-roster-row-in .cc-roster-name {
    background: #F0FDFA;
}

/* 전입 배지 + 도트 */
.cc-roster-badge-transferred_in {
    background: #CCFBF1;
    color: #115E59;
}
.cc-status-dot-transferred_in { background: #14B8A6; }

/* 메뉴 구분선 */
.cc-status-menu-divider {
    height: 1px;
    background: #E5E7EB;
    margin: 4px 0;
}

/* 영구 삭제 메뉴 항목 — 빨간 강조 */
.cc-status-menu-delete {
    color: #B91C1C !important;
}
.cc-status-menu-delete:hover {
    background: #FEE2E2 !important;
    color: #991B1B !important;
}
.cc-status-menu-delete small {
    color: #DC2626 !important;
}
.cc-status-dot-delete { background: #DC2626; }

/* β43: 위험 액션 버튼 (영구 삭제용) — 빨간 배경 + 흰 글씨, !important 로 cascade 보장 */
.cc-btn.cc-btn-danger {
    background: #DC2626 !important;
    color: #FFFFFF !important;
    border: 1px solid #DC2626 !important;
    font-weight: 600;
}
.cc-btn.cc-btn-danger:hover:not(:disabled) {
    background: #991B1B !important;
    border-color: #991B1B !important;
    color: #FFFFFF !important;
}
.cc-btn.cc-btn-danger:disabled {
    background: #FCA5A5 !important;
    border-color: #FCA5A5 !important;
    color: #FFFFFF !important;
    cursor: not-allowed;
    opacity: 1;
}

@media not all {
    .cc-roster-row-in { background: #042F2A; }
    .cc-roster-row-in .cc-roster-name { background: #042F2A; }
    .cc-roster-badge-transferred_in { background: #115E59; color: #99F6E4; }

    .cc-status-menu-divider { background: #374151; }
    .cc-status-menu-delete { color: #FCA5A5 !important; }
    .cc-status-menu-delete:hover { background: #5B1A1A !important; color: #FECACA !important; }
    .cc-status-menu-delete small { color: #F87171 !important; }
}

/* ─────────────────────────────────────────────────────
   v1.7.0-β13: 기기의 데이터 삭제 모달
   ───────────────────────────────────────────────────── */

.cc-data-scope {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cc-data-scope-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.cc-data-scope-icon {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}

.cc-data-scope-row strong {
    font-size: 13px;
    color: #111827;
    display: block;
    margin-bottom: 2px;
}

.cc-data-scope-row p {
    font-size: 12px;
    color: #6B7280;
    margin: 0;
    line-height: 1.5;
}

.cc-data-scope-row em {
    font-style: normal;
    color: #B45309;
    font-weight: 500;
}

.cc-data-guide {
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 14px;
}

.cc-data-guide strong {
    display: block;
    font-size: 13px;
    color: #92400E;
    margin-bottom: 4px;
}

.cc-data-guide ol {
    margin: 0;
    padding-left: 20px;
    color: #92400E;
    font-size: 12px;
    line-height: 1.7;
}

.cc-data-list-title {
    font-size: 12px;
    color: #6B7280;
    margin-bottom: 6px;
    font-weight: 500;
}

.cc-clear-names-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    background: #FFFFFF;
}

.cc-clear-names-info {
    flex: 1;
    min-width: 0;
}

.cc-clear-names-alias {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
}

.cc-clear-names-meta {
    font-size: 12px;
    color: #6B7280;
    margin-top: 2px;
}

.cc-btn-danger-outline {
    color: #B91C1C;
    border-color: #FCA5A5;
}
.cc-btn-danger-outline:hover:not(:disabled) {
    background: #FEE2E2;
    border-color: #DC2626;
    color: #991B1B;
}
.cc-btn-danger-outline:disabled {
    color: #9CA3AF;
    border-color: #E5E7EB;
    background: transparent;
    cursor: not-allowed;
}

@media not all {
    .cc-data-scope {
        background: #111827;
        border-color: #374151;
    }
    .cc-data-scope-row strong { color: #F9FAFB; }
    .cc-data-scope-row p { color: #9CA3AF; }
    .cc-data-scope-row em { color: #FCD34D; }

    .cc-data-guide {
        background: #2A2310;
        border-color: #5A4310;
    }
    .cc-data-guide strong,
    .cc-data-guide ol { color: #FED7AA; }

    .cc-data-list-title { color: #9CA3AF; }

    .cc-clear-names-row { background: #1F2937; }
    .cc-clear-names-alias { color: #F9FAFB; }
    .cc-clear-names-meta { color: #9CA3AF; }

    .cc-btn-danger-outline {
        color: #FCA5A5;
        border-color: #5B1A1A;
    }
    .cc-btn-danger-outline:hover:not(:disabled) {
        background: #5B1A1A;
        border-color: #DC2626;
        color: #FECACA;
    }
    .cc-btn-danger-outline:disabled {
        color: #4B5563;
        border-color: #374151;
    }
}


/* ─────────────────────────────────────────────────────
   v1.7.0-β17: 생활기록·수합 (명령 + 셀별 텍스트 입력)
   ───────────────────────────────────────────────────── */

.cc-records-page {
    padding: 12px;
    /* β36: padding-bottom 은 .cc-app-main 의 공통 규칙 사용 */
}

/* 대분류 가로 탭 */
.cc-cat-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 8px;
    padding-bottom: 2px;
}
.cc-cat-tab {
    flex-shrink: 0;
    padding: 8px 14px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 999px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    white-space: nowrap;
}
.cc-cat-tab:hover { border-color: #1565C0; }
.cc-cat-tab-active {
    background: #1565C0;
    border-color: #1565C0;
    color: #FFFFFF;
    font-weight: 500;
}
.cc-cat-tab-add {
    background: transparent;
    border: 1px dashed #D1D5DB;
    color: #9CA3AF;
    font-weight: 500;
    min-width: 36px;
}
.cc-cat-tab-add:hover {
    border-color: #1565C0;
    color: #1565C0;
}

/* 컬럼브라우저 (2단) */
.cc-cb {
    display: flex;
    gap: 4px;
    background: #F3F4F6;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 10px;
}
.cc-cb-col {
    flex: 1;
    min-width: 0;
    max-height: 240px;
    overflow-y: auto;
    background: #FFFFFF;
    border-radius: 8px;
    padding: 4px;
}
.cc-cb-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 9px 10px;
    background: transparent;
    border: none;
    border-radius: 6px;
    text-align: left;
    font-size: 13px;
    color: #111827;
    cursor: pointer;
    margin-bottom: 1px;
    line-height: 1.3;
}
.cc-cb-item:hover { background: #F3F4F6; }
.cc-cb-item-active {
    background: #1565C0 !important;
    color: #FFFFFF;
    font-weight: 500;
}
.cc-cb-item-active .cc-cb-chevron { color: #FFFFFF; opacity: 0.7; }
.cc-cb-item-active .cc-cb-badge { background: rgba(255,255,255,0.2); color: #FFFFFF; }
.cc-cb-chevron {
    color: #9CA3AF;
    font-size: 14px;
    margin-left: 4px;
    flex-shrink: 0;
}
.cc-cb-badge {
    font-size: 10px;
    background: #E0E7FF;
    color: #1E40AF;
    padding: 1px 6px;
    border-radius: 999px;
    margin-left: 6px;
}
.cc-cb-badge-user { background: #CCFBF1; color: #115E59; }
.cc-cb-empty {
    padding: 16px 10px;
    text-align: center;
    font-size: 12px;
    color: #9CA3AF;
    line-height: 1.6;
}
.cc-cb-add {
    width: 100%;
    padding: 8px 10px;
    margin-top: 4px;
    background: transparent;
    border: 1px dashed #D1D5DB;
    border-radius: 6px;
    color: #9CA3AF;
    font-size: 12px;
    cursor: pointer;
}
.cc-cb-add:hover {
    border-color: #1565C0;
    color: #1565C0;
}

/* 선택 요약 */
.cc-cb-summary {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
}
.cc-cb-summary-empty { color: #9CA3AF; font-size: 13px; }
.cc-cb-summary-path {
    font-size: 13px;
    color: #111827;
    font-weight: 500;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cc-cb-summary-clear {
    background: transparent;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 11px;
    color: #6B7280;
    cursor: pointer;
}
.cc-cb-summary-text-hint {
    flex: 1;
    font-size: 13px;
    color: #92400E;
    line-height: 1.5;
}
.cc-cb-summary-text-hint strong { color: #78350F; }

/* 학생 명단 헤더 */
.cc-records-roster-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 12px 4px 8px;
}
.cc-records-roster-title { font-size: 13px; color: #6B7280; font-weight: 500; }
.cc-records-selcount { font-size: 12px; color: #1565C0; font-weight: 500; }

/* 학생 행 */
.cc-records-roster {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.cc-rs-row {
    display: flex;
    align-items: stretch;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    overflow: hidden;
    min-height: 56px;
}
.cc-rs-row-main {
    flex: 1;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    min-width: 0;
}
.cc-rs-row-main:hover { background: #F9FAFB; }

.cc-rs-row-selected {
    background: #EBF3FB;
    border-color: #1565C0;
}
.cc-rs-row-selected .cc-rs-row-main { background: transparent; }

.cc-rs-row-uncounted {
    opacity: 0.6;
    background: #F9FAFB;
}
.cc-rs-row-has-match:not(.cc-rs-row-selected) {
    /* 글씨 색만 강조 — 테두리·배경 변화 없음 (선택 표시와 시각 구분) */
}

.cc-rs-headline {
    display: flex;
    align-items: center;
    gap: 8px;
}
.cc-rs-num {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 12px;
    color: #6B7280;
    min-width: 22px;
    text-align: right;
}
.cc-rs-name {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cc-rs-status {
    font-size: 10px;
    color: #B91C1C;
    background: #FEE2E2;
    padding: 1px 6px;
    border-radius: 999px;
}

.cc-rs-summary {
    font-size: 11.5px;
    color: #6B7280;
    line-height: 1.4;
    padding-left: 30px;
}
.cc-rs-summary-empty { color: #D1D5DB; }
.cc-rs-row-has-match:not(.cc-rs-row-selected) .cc-rs-summary { color: #B45309; }

/* 텍스트형 입력 */
.cc-rs-textinput-wrap {
    display: flex;
    gap: 6px;
    padding-left: 30px;
    margin-top: 2px;
}
.cc-rs-textinput {
    flex: 1;
    padding: 5px 9px;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    font-size: 12px;
    background: #FFFFFF;
    min-width: 0;
}
.cc-rs-textinput:focus {
    outline: none;
    border-color: #1565C0;
}
.cc-rs-textsave {
    padding: 5px 12px;
    background: #1565C0;
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    flex-shrink: 0;
}
.cc-rs-textsave:hover:not(:disabled) { background: #0D47A1; }
.cc-rs-textsave:disabled { opacity: 0.5; cursor: not-allowed; }
.cc-rs-textval {
    font-size: 12px;
    color: #4B5563;
    padding-left: 30px;
}
.cc-rs-textval-label { color: #6B7280; }
.cc-rs-textval-value { color: #111827; font-weight: 500; }

/* 기록수정 버튼 */
.cc-rs-edit-btn {
    flex-shrink: 0;
    background: transparent;
    border: none;
    border-left: 1px solid #E5E7EB;
    color: #1565C0;
    padding: 0 14px;
    font-size: 11.5px;
    cursor: pointer;
    white-space: nowrap;
}
.cc-rs-edit-btn:hover { background: #EBF3FB; }
.cc-rs-row-selected .cc-rs-edit-btn { border-left-color: #1565C0; }

.cc-records-roster-empty {
    padding: 40px 20px;
    text-align: center;
    color: #9CA3AF;
    font-size: 13px;
    background: #F9FAFB;
    border-radius: 10px;
}

/* 저장바 */
.cc-records-savebar {
    margin-top: 16px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
#cc-records-savebar-label {
    font-size: 13px;
    color: #4B5563;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}
#cc-records-save {
    flex-shrink: 0;
    min-width: 80px;
}

/* 분류 추가 모달 — 기본 cc-modal 스타일 사용. cc-field-row 만 추가 */
.cc-field-row {
    flex-direction: row !important;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.cc-field-row input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }
.cc-input-sm { padding: 4px 8px; font-size: 12px; }

/* 기록수정 모달 */
.cc-rec-edit-scope {
    font-size: 12px;
    color: #6B7280;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #E5E7EB;
}
.cc-rec-edit-scope strong { color: #111827; }
.cc-rec-edit-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.cc-rec-edit-empty {
    padding: 30px 20px;
    text-align: center;
    color: #9CA3AF;
    font-size: 13px;
}
.cc-rec-edit-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: #F9FAFB;
    border-radius: 6px;
}
.cc-rec-edit-info {
    flex: 1;
    min-width: 0;
}
.cc-rec-edit-path {
    font-size: 12.5px;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 6px;
}
.cc-rec-edit-type {
    font-size: 9px;
    padding: 1px 6px;
    border-radius: 999px;
    font-weight: 500;
}
.cc-rec-edit-type-event { background: #DBEAFE; color: #1E40AF; }
.cc-rec-edit-type-attr { background: #FEF3C7; color: #92400E; }
.cc-rec-edit-textval { margin-top: 4px; }
.cc-rec-edit-date {
    font-size: 11px;
    color: #9CA3AF;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
.cc-rec-edit-del {
    background: transparent;
    border: 1px solid #FCA5A5;
    color: #B91C1C;
    padding: 4px 10px;
    font-size: 11px;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
}
.cc-rec-edit-del:hover { background: #FEE2E2; }

@media not all {
    .cc-cat-tab { background: #1F2937; border-color: #374151; color: #D1D5DB; }
    .cc-cat-tab:hover { border-color: #60A5FA; }
    .cc-cat-tab-active { background: #1565C0; border-color: #1565C0; color: #FFFFFF; }
    .cc-cat-tab-add { background: transparent; border-color: #4B5563; color: #6B7280; }

    .cc-cb { background: #111827; }
    .cc-cb-col { background: #1F2937; }
    .cc-cb-item { color: #F9FAFB; }
    .cc-cb-item:hover { background: #374151; }
    .cc-cb-chevron { color: #6B7280; }
    .cc-cb-badge { background: #1E3A5F; color: #BFDBFE; }
    .cc-cb-badge-user { background: #115E59; color: #99F6E4; }
    .cc-cb-empty { color: #6B7280; }
    .cc-cb-add { color: #6B7280; border-color: #4B5563; }

    .cc-cb-summary { background: #1F2937; border-color: #374151; }
    .cc-cb-summary-path { color: #F9FAFB; }
    .cc-cb-summary-empty { color: #6B7280; }
    .cc-cb-summary-clear { color: #9CA3AF; border-color: #374151; }
    .cc-cb-summary-text-hint { color: #FCD34D; }
    .cc-cb-summary-text-hint strong { color: #FED7AA; }

    .cc-records-roster-title { color: #9CA3AF; }

    .cc-rs-row { background: #1F2937; border-color: #374151; }
    .cc-rs-row-main:hover { background: #111827; }
    .cc-rs-row-selected { background: #1E3A5F; border-color: #1565C0; }
    .cc-rs-row-uncounted { background: #111827; }
    .cc-rs-row-has-match:not(.cc-rs-row-selected) {
        /* 글씨 색만 강조 */
    }
    .cc-rs-row-has-match:not(.cc-rs-row-selected) .cc-rs-summary { color: #FBBF24; }
    .cc-rs-num { color: #9CA3AF; }
    .cc-rs-name { color: #F9FAFB; }
    .cc-rs-summary { color: #9CA3AF; }
    .cc-rs-summary-empty { color: #4B5563; }
    .cc-rs-status { background: #5B1A1A; color: #FCA5A5; }

    .cc-rs-textinput { background: #111827; border-color: #4B5563; color: #F9FAFB; }
    .cc-rs-textinput:focus { border-color: #60A5FA; }
    .cc-rs-textval { color: #D1D5DB; }
    .cc-rs-textval-label { color: #9CA3AF; }
    .cc-rs-textval-value { color: #F9FAFB; }

    .cc-rs-edit-btn { color: #93C5FD; border-left-color: #374151; }
    .cc-rs-edit-btn:hover { background: #1E3A5F; }

    .cc-records-roster-empty { background: #111827; color: #6B7280; }
    .cc-records-savebar { background: #1F2937; border-color: #374151; }
    #cc-records-savebar-label { color: #D1D5DB; }

    .cc-rec-edit-scope { color: #9CA3AF; border-color: #374151; }
    .cc-rec-edit-scope strong { color: #F9FAFB; }
    .cc-rec-edit-row { background: #111827; }
    .cc-rec-edit-path { color: #F9FAFB; }
    .cc-rec-edit-type-event { background: #1E3A5F; color: #BFDBFE; }
    .cc-rec-edit-type-attr { background: #2A2310; color: #FCD34D; }
    .cc-rec-edit-date { color: #6B7280; }
    .cc-rec-edit-del { color: #FCA5A5; border-color: #5B1A1A; }
    .cc-rec-edit-del:hover { background: #5B1A1A; }
}

/* ─────────────────────────────────────────────────────
   v1.7.0-β19: 분류 항목 관리 (설정 카드)
   ───────────────────────────────────────────────────── */

.cc-pm {
    padding: 4px;
}

.cc-pm-cat-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px 14px;
    border-bottom: 1px solid #E5E7EB;
}
.cc-pm-cat-label { font-size: 13px; color: #6B7280; flex-shrink: 0; }
.cc-pm-cat-select {
    flex: 1;
    padding: 6px 8px;
    font-size: 13px;
}

.cc-pm-block {
    margin-top: 14px;
}
.cc-pm-block-title {
    font-size: 12px;
    color: #6B7280;
    font-weight: 500;
    margin-bottom: 6px;
    padding: 0 4px;
}

.cc-pm-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cc-pm-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 8px;
    border-radius: 6px;
    background: #F9FAFB;
}
.cc-pm-row:hover { background: #F3F4F6; }
.cc-pm-row-expanded {
    background: #EBF3FB;
    border: 1px solid #93C5FD;
}
.cc-pm-row-hidden { opacity: 0.55; }

.cc-pm-check {
    flex-shrink: 0;
    cursor: pointer;
}
.cc-pm-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.cc-pm-label {
    flex: 1;
    font-size: 13px;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cc-pm-label-clickable { cursor: pointer; }
.cc-pm-label-clickable:hover { color: #1565C0; }

.cc-pm-badge-user {
    display: inline-block;
    margin-left: 6px;
    font-size: 10px;
    padding: 0 6px;
    background: #CCFBF1;
    color: #115E59;
    border-radius: 999px;
    line-height: 1.5;
}

.cc-pm-arrow {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    color: #6B7280;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cc-pm-arrow:hover:not(:disabled) {
    background: #1565C0;
    border-color: #1565C0;
    color: #FFFFFF;
}
.cc-pm-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.cc-pm-del-btn {
    flex-shrink: 0;
    background: transparent;
    border: 1px solid #FCA5A5;
    color: #B91C1C;
    padding: 4px 10px;
    font-size: 11px;
    border-radius: 6px;
    cursor: pointer;
}
.cc-pm-del-btn:hover { background: #FEE2E2; }

.cc-pm-empty,
.cc-pm-empty-row {
    padding: 16px 12px;
    text-align: center;
    font-size: 12px;
    color: #9CA3AF;
}

@media not all {
    .cc-pm-cat-row { border-color: #374151; }
    .cc-pm-cat-label { color: #9CA3AF; }
    .cc-pm-block-title { color: #9CA3AF; }

    .cc-pm-row { background: #111827; }
    .cc-pm-row:hover { background: #1F2937; }
    .cc-pm-row-expanded { background: #1E3A5F; border-color: #3B82F6; }

    .cc-pm-label { color: #F9FAFB; }
    .cc-pm-label-clickable:hover { color: #93C5FD; }
    .cc-pm-badge-user { background: #115E59; color: #99F6E4; }

    .cc-pm-arrow {
        background: #1F2937;
        border-color: #4B5563;
        color: #9CA3AF;
    }
    .cc-pm-arrow:hover:not(:disabled) {
        background: #1565C0;
        border-color: #1565C0;
        color: #FFFFFF;
    }

    .cc-pm-del-btn { color: #FCA5A5; border-color: #5B1A1A; }
    .cc-pm-del-btn:hover { background: #5B1A1A; }

    .cc-pm-empty,
    .cc-pm-empty-row { color: #6B7280; }
}

/* ─────────────────────────────────────────────────────
   v1.7.0-β20: 분류 이름 변경 + hint
   ───────────────────────────────────────────────────── */

.cc-records-hint {
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    color: #1E40AF;
    margin-bottom: 12px;
    line-height: 1.5;
}
.cc-records-hint a {
    color: #1565C0;
    font-weight: 500;
    text-decoration: underline;
}

/* 편집 ✏️ 버튼 */
.cc-pm-edit-btn {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    padding: 0;
}
.cc-pm-edit-btn:hover {
    background: #FEF3C7;
    border-color: #F59E0B;
}

.cc-pm-edit-note {
    margin: 8px 0 0;
    font-size: 11.5px;
    color: #6B7280;
    line-height: 1.5;
}
.cc-pm-edit-note a {
    color: #1565C0;
    text-decoration: underline;
}

@media not all {
    .cc-records-hint {
        background: #1E3A5F;
        border-color: #1565C0;
        color: #BFDBFE;
    }
    .cc-records-hint a { color: #93C5FD; }

    .cc-pm-edit-btn {
        background: #1F2937;
        border-color: #4B5563;
    }
    .cc-pm-edit-btn:hover {
        background: #2A2310;
        border-color: #F59E0B;
    }

    .cc-pm-edit-note { color: #9CA3AF; }
    .cc-pm-edit-note a { color: #93C5FD; }
}

/* ─────────────────────────────────────────────────────
   v1.7.0-β21: 이전 기록 표시 + 일괄 삭제 버튼
   ───────────────────────────────────────────────────── */

.cc-rs-stale {
    font-size: 11px;
    color: #B45309;
    background: #FEF3C7;
    border-radius: 4px;
    padding: 2px 8px;
    margin-top: 4px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cc-rs-stale-label {
    font-weight: 500;
    color: #92400E;
}
.cc-rs-row-selected .cc-rs-stale {
    background: #FBBF24;
    color: #422006;
}
.cc-rs-row-selected .cc-rs-stale-label { color: #422006; }

.cc-pm-edit-divider {
    height: 1px;
    background: #E5E7EB;
    margin: 14px 0;
}

@media not all {
    .cc-rs-stale {
        background: #2A2310;
        color: #FCD34D;
    }
    .cc-rs-stale-label { color: #FED7AA; }
    .cc-rs-row-selected .cc-rs-stale {
        background: #78350F;
        color: #FED7AA;
    }
    .cc-rs-row-selected .cc-rs-stale-label { color: #FFEDD5; }

    .cc-pm-edit-divider { background: #374151; }
}

/* ─────────────────────────────────────────────────────
   v1.7.0-β22: 컬럼브라우저 요약 영역 ✏️ 편집 버튼
   ───────────────────────────────────────────────────── */

.cc-cb-summary-edit {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    padding: 0;
    margin-left: 4px;
}
.cc-cb-summary-edit:hover {
    background: #FEF3C7;
    border-color: #F59E0B;
}

.cc-cb-summary-shallow {
    color: #6B7280 !important;
    font-weight: 400 !important;
}
.cc-cb-summary-hint {
    flex: 1;
    font-size: 11.5px;
    color: #9CA3AF;
    text-align: right;
}

@media not all {
    .cc-cb-summary-edit {
        background: #1F2937;
        border-color: #4B5563;
    }
    .cc-cb-summary-edit:hover {
        background: #2A2310;
        border-color: #F59E0B;
    }
    .cc-cb-summary-shallow { color: #9CA3AF !important; }
    .cc-cb-summary-hint { color: #6B7280; }
}

/* ─────────────────────────────────────────────────────
   v1.7.0-β24: 시점 입력 그룹 (명렬표 위)
   ───────────────────────────────────────────────────── */

.cc-timing-bar {
    margin: 8px 0 12px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 6px;
}

.cc-timing-toggle {
    display: flex;
    gap: 4px;
}

.cc-timing-tab {
    flex: 1;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 6px 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    min-width: 0;
}
.cc-timing-tab:hover { background: #F3F4F6; }
.cc-timing-tab-active {
    background: #1565C0;
    border-color: #1565C0;
    color: #FFFFFF;
}
.cc-timing-tab-active:hover { background: #0D47A1; }

.cc-timing-tab-label {
    font-size: 10px;
    color: #6B7280;
    line-height: 1;
    margin-bottom: 2px;
}
.cc-timing-tab-active .cc-timing-tab-label { color: #BFDBFE; }

.cc-timing-tab-value {
    font-size: 12px;
    font-weight: 500;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    text-align: center;
    line-height: 1.3;
}
.cc-timing-tab-active .cc-timing-tab-value { color: #FFFFFF; }

.cc-timing-detail {
    display: flex;
    gap: 6px;
    padding: 8px 4px 2px;
    border-top: 1px solid #F3F4F6;
    margin-top: 4px;
}

.cc-timing-select {
    flex: 1;
    padding: 6px 8px;
    font-size: 12px;
}

.cc-timing-date,
.cc-timing-time {
    flex: 1;
    padding: 6px 8px;
    font-size: 12px;
    min-width: 0;
}

@media not all {
    .cc-timing-bar { background: #1F2937; border-color: #374151; }
    .cc-timing-tab:hover { background: #374151; }
    .cc-timing-tab-label { color: #9CA3AF; }
    .cc-timing-tab-value { color: #F9FAFB; }
    .cc-timing-detail { border-color: #374151; }
}

/* ─────────────────────────────────────────────────────
   v1.7.0-β25: 시간표 두 종류 + 현재 교시 음영
   ───────────────────────────────────────────────────── */

.cc-tt-kind-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}
.cc-tt-kind-tab {
    flex: 1;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    color: #6B7280;
    cursor: pointer;
}
.cc-tt-kind-tab:hover { border-color: #1565C0; color: #1565C0; }
.cc-tt-kind-tab-active {
    background: #1565C0;
    border-color: #1565C0;
    color: #FFFFFF;
    font-weight: 500;
}
.cc-tt-kind-tab-active:hover { background: #0D47A1; color: #FFFFFF; }

/* 현재 교시 음영 */
.cc-tt-now {
    background: #FEF3C7 !important;
    border-color: #F59E0B !important;
    box-shadow: inset 0 0 0 2px #F59E0B;
}
.cc-tt-now .cc-tt-time { color: #B45309; font-weight: 500; }
.cc-tt-now .cc-tt-subj { color: #78350F; font-weight: 500; }

@media not all {
    .cc-tt-kind-tab { background: #1F2937; border-color: #374151; color: #9CA3AF; }
    .cc-tt-kind-tab:hover { border-color: #60A5FA; color: #93C5FD; }
    .cc-tt-kind-tab-active { background: #1565C0; border-color: #1565C0; color: #FFFFFF; }

    .cc-tt-now {
        background: #2A2310 !important;
        border-color: #F59E0B !important;
    }
    .cc-tt-now .cc-tt-time { color: #FBBF24; }
    .cc-tt-now .cc-tt-subj { color: #FED7AA; }
}

/* ── v1.7.0-β26: 데이터 내보내기 ── */
.cc-export-sheet-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cc-export-sheet-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--cc-text, #1F2937);
}
.cc-export-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #1565C0;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}
.cc-export-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.cc-export-status {
    font-size: 13px;
    color: #6B7280;
}
.cc-export-status-error {
    color: #DC2626;
}
@media not all {
    .cc-export-sheet-list li { color: #E5E7EB; }
    .cc-export-status { color: #9CA3AF; }
}

/* ── v1.7.0-β47: 다크 모드 종합 보강 ──
 * 기본 .cc-card / .cc-section / 폼 요소가 라이트 색상 하드코딩되어
 * PC 다크 모드에서 가독성 저하·검은 박스 문제 발생 → 명시적 다크 색상 적용
 */
@media not all {
    /* 카드 / 섹션 */
    .cc-card {
        background: #1F2937;
        border-color: #374151;
        color: #E5E7EB;
    }
    .cc-section-title {
        color: #F3F4F6;
    }
    .cc-section-desc {
        color: #9CA3AF;
    }
    .cc-loading-card {
        color: #9CA3AF;
    }

    /* 페이지 제목 등 일반 텍스트 */
    .cc-page-title,
    .cc-settings h1,
    .cc-settings h2,
    .cc-settings h3 {
        color: #F3F4F6;
    }

    /* 폼 요소 — OS 기본 검은 박스 방지 */
    .cc-card input[type="text"],
    .cc-card input[type="number"],
    .cc-card input[type="email"],
    .cc-card input[type="password"],
    .cc-card input[type="time"],
    .cc-card input[type="date"],
    .cc-card select,
    .cc-card textarea {
        background: #111827;
        color: #E5E7EB;
        border: 1px solid #374151;
    }
    .cc-card input:focus,
    .cc-card select:focus,
    .cc-card textarea:focus {
        border-color: #60A5FA;
        outline: none;
    }
    .cc-card input::placeholder,
    .cc-card textarea::placeholder {
        color: #6B7280;
    }

    /* 키-밸류 행 (앱 정보 등) */
    .cc-kv-row {
        color: #E5E7EB;
    }
    .cc-kv-row code {
        background: #111827;
        color: #FBBF24;
        border-color: #374151;
    }

    /* info/warning 카드 */
    .cc-info-card {
        background: #1F2937;
        color: #E5E7EB;
    }

    /* 트러블슈팅 행 */
    .cc-troubleshoot-row {
        border-color: #374151;
    }
    .cc-troubleshoot-row strong {
        color: #F3F4F6;
    }
    .cc-troubleshoot-row p,
    .cc-troubleshoot-row small {
        color: #9CA3AF;
    }

    /* 데이터 내보내기 (β26) — 카드 배경에 맞춰 보강 */
    .cc-export-sheet-list li strong {
        color: #F3F4F6;
    }

    /* 디버그 출력창 */
    .cc-debug-output {
        background: #0F172A;
        color: #CBD5E1;
        border-color: #374151;
    }

    /* 기본 outline 버튼 — 다크에서 보이도록 */
    .cc-btn-outline {
        background: transparent;
        color: #93C5FD;
        border-color: #374151;
    }
    .cc-btn-outline:hover {
        background: #1F2937;
        border-color: #60A5FA;
        color: #BFDBFE;
    }
}

/* ── v1.7.0-β47: 대시보드 ── */
.cc-dashboard-page { padding: 16px; max-width: 900px; margin: 0 auto; }
.cc-dashboard-page .cc-page-sub {
    color: #6B7280;
    font-size: 13px;
    margin: 4px 0 16px;
}

.cc-dash-section { margin-bottom: 24px; }
.cc-dash-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.cc-dash-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #1F2937;
    margin: 0 0 12px;
}
.cc-dash-section-head .cc-dash-section-title { margin: 0; }

/* 오늘의 시간표 — 통합 표 (β37: 학급+교사 한 표) */
.cc-dash-tt-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    overflow: hidden;
    font-size: 13px;
}
.cc-dash-tt-table thead {
    background: #F3F4F6;
}
.cc-dash-tt-table th {
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    text-align: left;
    border-bottom: 1px solid #E5E7EB;
}
.cc-dash-tt-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #F3F4F6;
    color: #1F2937;
}
.cc-dash-tt-table tr:last-child td {
    border-bottom: none;
}
.cc-dash-tt-period {
    width: 40px;
    text-align: center;
    color: #6B7280;
    font-weight: 600;
}
.cc-dash-tt-time {
    width: 100px;
    color: #6B7280;
    font-size: 12px;
    white-space: nowrap;
}
.cc-dash-tt-subj {
    color: #1F2937;
}
.cc-dash-tt-row.cc-tt-now td {
    background: #FEF3C7;
    font-weight: 500;
}
/* 쉬는시간 / 점심시간 행 — 살짝 들어간 느낌 */
.cc-dash-tt-row.cc-dash-tt-break td {
    background: #FAFAFA;
    color: #9CA3AF;
    font-size: 12px;
    padding-top: 4px;
    padding-bottom: 4px;
}
.cc-dash-tt-row.cc-dash-tt-break .cc-dash-tt-period {
    color: #D1D5DB;
}
.cc-dash-tt-row.cc-dash-tt-lunch td {
    background: #FFF7ED;
    color: #92400E;
}
.cc-dash-tt-row.cc-dash-tt-break.cc-tt-now td {
    background: #FEF3C7;
    color: #92400E;
    font-weight: 500;
}


/* 카드 영역 */
.cc-dash-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.cc-dash-card-item {
    background: #ffffff;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 14px 16px;
}
.cc-dash-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 8px;
}
.cc-dash-card-title-text {
    font-weight: 600;
    font-size: 15px;
    color: #1F2937;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cc-dash-card-controls {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.cc-icon-btn {
    background: transparent;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    color: #6B7280;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.cc-icon-btn:hover:not(:disabled) {
    background: #F3F4F6;
    color: #1F2937;
    border-color: #9CA3AF;
}
.cc-icon-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* 수합 카드 본문 */
.cc-dash-coll-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.cc-dash-coll-num { font-weight: 600; }
.cc-dash-coll-ok { color: #047857; }
.cc-dash-coll-miss { color: #B91C1C; }
.cc-dash-coll-sep { color: #9CA3AF; }
.cc-dash-coll-total { color: #6B7280; font-size: 13px; }
.cc-dash-coll-missing {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    color: #991B1B;
    line-height: 1.6;
    margin-bottom: 10px;
}
.cc-dash-coll-missing-label { font-weight: 600; }
.cc-dash-coll-allok {
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    color: #047857;
    margin-bottom: 10px;
}
.cc-dash-coll-action { font-size: 13px; }
.cc-dash-coll-link {
    color: #1565C0;
    text-decoration: none;
    font-weight: 500;
}
.cc-dash-coll-link:hover { text-decoration: underline; }

/* TopN 카드 본문 */
.cc-dash-top-list {
    list-style: decimal inside;
    padding: 0;
    margin: 0;
    counter-reset: cc-top;
}
.cc-dash-top-item {
    padding: 10px 0;
    border-bottom: 1px solid #F3F4F6;
    font-size: 13px;
}
.cc-dash-top-item:last-child { border-bottom: none; }
.cc-dash-top-name {
    font-weight: 500;
    color: #1F2937;
    margin-bottom: 4px;
}
.cc-dash-top-total {
    color: #1565C0;
    font-size: 12px;
    font-weight: 600;
    margin-left: 4px;
}
.cc-dash-top-details {
    padding-left: 16px;
}
.cc-dash-top-detail-line {
    color: #6B7280;
    font-size: 12px;
    line-height: 1.7;
}
.cc-dash-top-detail-line strong {
    color: #374151;
    font-weight: 600;
}

.cc-dash-empty {
    padding: 16px;
    color: #9CA3AF;
    font-size: 13px;
    text-align: center;
}

/* 카드 추가 모달 — 타입 선택 */
.cc-dash-typepick {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cc-dash-typebtn {
    text-align: left;
    background: #ffffff;
    border: 1.5px solid #E5E7EB;
    border-radius: 10px;
    padding: 12px 14px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.cc-dash-typebtn:hover {
    border-color: #1565C0;
    background: #EFF6FF;
}
.cc-dash-typebtn strong {
    font-size: 14px;
    color: #1F2937;
}
.cc-dash-typebtn small {
    font-size: 12px;
    color: #6B7280;
}

/* 폼 행 */
.cc-form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}
.cc-form-row label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}
.cc-form-row label small { font-weight: 400; color: #6B7280; }
.cc-input,
.cc-input-readonly {
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 14px;
    width: 100%;
    background: #ffffff;
    color: #1F2937;
}
.cc-input-readonly { background: #F3F4F6; color: #6B7280; }

.cc-page-sub { color: #6B7280; font-size: 13px; margin: 4px 0 16px; }
.cc-placeholder-small {
    background: #F9FAFB;
    border: 1px dashed #D1D5DB;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    color: #6B7280;
    font-size: 13px;
}

/* β39: 시간표 탭 '오늘의 시간표' 뷰 컨테이너 */
.cc-schedule-today {
    margin-top: 12px;
}

/* β43: 시간표 자동계산 안내 박스 */
.cc-sched-notice {
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    color: #1E40AF;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 12px;
}
.cc-sched-notice strong {
    color: #1E3A8A;
}
.cc-sched-notice small {
    color: #3B82F6;
}

/* ─────────────────────────────────────────────────────
   β45: 홍보 배너 + 공유 카드
   ───────────────────────────────────────────────────── */

.cc-promo-host {
    margin-top: 24px;
}

.cc-promo-section {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 12px 14px;
}

.cc-promo-section-title {
    font-size: 12px;
    font-weight: 600;
    color: #6B7280;
    margin-bottom: 8px;
}

.cc-promo-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cc-promo-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    text-decoration: none;
    color: #1F2937;
    transition: background 0.15s, border-color 0.15s, transform 0.05s;
}

.cc-promo-card:hover {
    background: #F1F5F9;
    border-color: #CBD5E1;
}

.cc-promo-card:active {
    transform: scale(0.98);
}

.cc-promo-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.cc-promo-icon-emoji {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #EEF2FF;
    color: #4F46E5;
    font-size: 18px;
}

.cc-promo-body {
    flex: 1;
    min-width: 0;
}

.cc-promo-title {
    font-size: 14px;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 2px;
}

.cc-promo-desc {
    font-size: 12px;
    color: #6B7280;
    line-height: 1.4;
}

.cc-promo-arrow {
    color: #9CA3AF;
    font-size: 16px;
    flex-shrink: 0;
}

/* 공유 카드 */
.cc-share-section {
    margin-top: 24px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 12px 14px;
}

.cc-share-section-title {
    font-size: 12px;
    font-weight: 600;
    color: #6B7280;
    margin-bottom: 8px;
}

.cc-share-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cc-share-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    color: #1F2937;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    text-align: left;
}

.cc-share-btn:hover {
    background: #F1F5F9;
    border-color: #CBD5E1;
}

.cc-share-btn:active {
    transform: scale(0.98);
}

.cc-share-emoji {
    font-size: 22px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #EEF2FF;
    border-radius: 8px;
    flex-shrink: 0;
}

.cc-share-label {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.cc-share-label strong {
    font-size: 14px;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 2px;
}

.cc-share-label small {
    font-size: 12px;
    color: #6B7280;
}

.cc-share-action {
    flex-shrink: 0;
    padding: 4px 10px;
    background: #1565C0;
    color: #FFFFFF;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

/* ─────────────────────────────────────────────────────
   β46: 버그·요청 양식
   ───────────────────────────────────────────────────── */

.cc-bugreport-card {
    padding: 14px;
}

.cc-bug-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cc-textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
    line-height: 1.5;
}

.cc-bug-attach {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #4B5563;
    cursor: pointer;
}

.cc-bug-attach input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

.cc-bug-form-actions {
    display: flex;
    justify-content: flex-end;
}

.cc-subsection-title {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 8px;
}

.cc-bug-mylist {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cc-bug-item {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 12px 14px;
}

.cc-bug-item-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
    font-size: 12px;
}

.cc-bug-type {
    color: #4B5563;
    font-weight: 500;
}

.cc-bug-status {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.cc-bug-status-new {
    background: #FEF3C7;
    color: #92400E;
}

.cc-bug-status-review {
    background: #DBEAFE;
    color: #1E40AF;
}

.cc-bug-status-progress {
    background: #E0E7FF;
    color: #3730A3;
}

.cc-bug-status-resolved {
    background: #D1FAE5;
    color: #065F46;
}

.cc-bug-status-rejected {
    background: #F3F4F6;
    color: #4B5563;
}

.cc-bug-when {
    margin-left: auto;
    color: #9CA3AF;
}

.cc-bug-item .cc-bug-title {
    font-size: 14px;
    font-weight: 600;
    color: #1F2937;
    margin: 0;
}

.cc-bug-reply {
    margin-top: 10px;
    padding: 10px 12px;
    background: #F0FDF4;
    border-left: 3px solid #16A34A;
    border-radius: 6px;
}

.cc-bug-reply-label {
    font-size: 12px;
    font-weight: 600;
    color: #166534;
    margin-bottom: 4px;
}

.cc-bug-reply-body {
    font-size: 13px;
    color: #1F2937;
    line-height: 1.5;
}

.cc-empty-text {
    color: #9CA3AF;
    font-size: 13px;
    padding: 16px 0;
    text-align: center;
}
