/* 강사 포털 공통 레이아웃 스타일 (라이트/다크 테마 변수화) */
:root {
    --t-primary: #2563eb;
    --t-primary-dark: #1d4ed8;
    --t-bg: #f1f5f9;
    --t-surface: #ffffff;
    --t-border: #e2e8f0;
    --t-text: #1e293b;
    --t-muted: #64748b;
    --t-hover: #f8fafc;
    --t-thead: #f8fafc;
    --t-active-bg: #eff6ff;
    --t-header-h: 56px;
    --t-sidebar-w: 220px;
}

/* 다크 테마 (teacher-theme.js 가 <html data-theme="dark"> 설정) */
:root[data-theme="dark"] {
    --t-primary: #3b82f6;
    --t-primary-dark: #60a5fa;
    --t-bg: #0f172a;
    --t-surface: #1e293b;
    --t-border: #334155;
    --t-text: #e2e8f0;
    --t-muted: #94a3b8;
    --t-hover: #273449;
    --t-thead: #172033;
    --t-active-bg: #1e3a5f;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--t-bg);
    color: var(--t-text);
}

/* 상단 헤더 */
.t-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--t-header-h);
    background: var(--t-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.t-header .t-brand { font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.t-header .t-right { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.t-header .t-user { display: flex; align-items: center; gap: 8px; }
.t-header .t-ctrl {
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.35);
    color: #fff;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    line-height: 1.4;
    white-space: nowrap;
}
.t-header .t-ctrl:hover { background: rgba(255,255,255,.28); }
.t-header .t-logout {
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.35);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}
.t-header .t-logout:hover { background: rgba(255,255,255,.28); }

/* 레이아웃 셸 */
.t-shell { display: flex; padding-top: var(--t-header-h); min-height: 100vh; }

/* 사이드바 */
.t-sidebar {
    width: var(--t-sidebar-w);
    background: var(--t-surface);
    border-right: 1px solid var(--t-border);
    position: fixed;
    top: var(--t-header-h);
    bottom: 0; left: 0;
    padding: 16px 0;
    overflow-y: auto;
}
.t-sidebar .t-nav-group {
    padding: 16px 20px 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--t-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
}
.t-sidebar .t-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: var(--t-text);
    text-decoration: none;
    font-size: 14px;
    border-left: 3px solid transparent;
}
.t-sidebar .t-nav-item:hover { background: var(--t-hover); }
.t-sidebar .t-nav-item.active {
    background: var(--t-active-bg);
    color: var(--t-primary-dark);
    border-left-color: var(--t-primary);
    font-weight: 600;
}

/* 메인 */
.t-main {
    margin-left: var(--t-sidebar-w);
    padding: 24px;
    flex: 1;
    width: calc(100% - var(--t-sidebar-w));
}
.t-page-title { font-size: 20px; font-weight: 700; margin: 0 0 18px; }

/* 카드 */
.t-card {
    background: var(--t-surface);
    border: 1px solid var(--t-border);
    border-radius: 10px;
    padding: 18px;
}

/* 테이블 */
.t-table-wrap { overflow-x: auto; background: var(--t-surface); border: 1px solid var(--t-border); border-radius: 10px; }
.t-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 720px; }
.t-table th, .t-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--t-border); white-space: nowrap; }
.t-table th { background: var(--t-thead); color: var(--t-muted); font-weight: 600; }
.t-table tbody tr:hover { background: var(--t-hover); }

/* 시간 셀 (필리핀 + 한국 병기) */
.t-time-ph { font-weight: 600; }
.t-time-kr { display: block; font-size: 11px; color: var(--t-muted); margin-top: 2px; }

/* 배지 */
.t-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.t-badge.lvl { background: #fef3c7; color: #92400e; }
.t-badge.absent { background: #fee2e2; color: #991b1b; }
:root[data-theme="dark"] .t-badge.lvl { background: #78350f; color: #fde68a; }
:root[data-theme="dark"] .t-badge.absent { background: #7f1d1d; color: #fecaca; }

.t-empty { padding: 40px; text-align: center; color: var(--t-muted); }
.t-tz-note { font-size: 12px; color: var(--t-muted); margin: 10px 2px 0; }

/* 모바일 */
@media (max-width: 768px) {
    .t-sidebar { transform: translateX(-100%); transition: transform .2s; }
    .t-sidebar.open { transform: translateX(0); }
    .t-main { margin-left: 0; width: 100%; }
}
