*{box-sizing:border-box}body{margin:0;font-family:-apple-system,Microsoft JhengHei,PingFang TC,sans-serif;background:#f5f6f8;color:#1a1a1a}.app-layout{min-height:100vh;display:flex;flex-direction:column}.app-header{display:flex;align-items:center;gap:16px;padding:12px 24px;background:#fff;border-bottom:1px solid #e2e4e8;position:sticky;top:0;z-index:90;box-shadow:0 2px 4px #0000000d}.app-header__title{min-width:0;font-size:20px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.app-header__right{margin-left:auto;display:flex;align-items:center;gap:20px;flex-shrink:0}.app-header__icon-btn{display:flex;align-items:center;justify-content:center;background:none;border:none;padding:4px;cursor:pointer;transition:opacity .2s}.app-header__icon-btn:hover{opacity:.7}.lang-toggle{display:flex;align-items:center;justify-content:center;min-width:32px;height:28px;padding:0 8px;background:none;border:1px solid #ccc;border-radius:6px;font-size:12px;font-weight:600;color:#666;cursor:pointer;transition:opacity .2s}.lang-toggle:hover{opacity:.7}.login-lang-toggle{position:absolute;top:16px;right:16px}.app-header__icon-btn img{width:22px;height:22px}@media (max-width: 767px){.app-header{padding:12px 16px}.app-header__title{font-size:18px}}.welcome-header{margin-bottom:24px;text-align:center}.welcome-header h1{margin:0 0 8px;font-size:32px;font-weight:700}.welcome-header p{margin:0;font-size:16px;color:#666}@media (max-width: 767px){.welcome-header h1{font-size:24px}.welcome-header p{font-size:14px}}.page-header{display:flex;justify-content:space-between;align-items:flex-start;flex-wrap:wrap;gap:16px;margin-bottom:20px}.page-header h2{margin:0 0 4px;font-size:22px;font-weight:600}.page-subtitle{margin:0;font-size:14px;color:#666}@media (max-width: 767px){.page-header h2{font-size:18px}}.app-main{flex:1;padding:24px;max-width:960px;width:100%;margin:0 auto}.btn{border:1px solid #d0d3d8;background:#fff;border-radius:6px;padding:8px 14px;cursor:pointer;font-size:14px}.btn:hover{background:#f0f1f3}.btn--primary{background:#2563eb;border-color:#2563eb;color:#fff}.btn--primary:hover{background:#1d4ed8}.btn--ghost{background:transparent}.btn--danger{color:#b91c1c;border-color:#f2c1c1}.card{background:#fff;border:1px solid #e2e4e8;border-radius:8px;padding:16px 20px;margin-bottom:16px}.form-row{display:flex;flex-direction:column;gap:4px;margin-bottom:12px}.form-row label{font-size:13px;color:#555}.form-row input,.form-row select{padding:8px 10px;border:1px solid #d0d3d8;border-radius:6px;font-size:14px}.error-text{color:#b91c1c;font-size:13px}.badge{display:inline-block;padding:2px 8px;border-radius:999px;font-size:12px}.badge--pending{background:#fef3c7;color:#92400e}.badge--open{background:#dcfce7;color:#166534}.badge--closed{background:#e5e7eb;color:#374151}.table{width:100%;border-collapse:collapse}.table th,.table td{text-align:left;padding:8px 10px;border-bottom:1px solid #eee;font-size:14px}.login-page{min-height:100vh;display:flex;align-items:center;justify-content:center;background:#f5f6f8}.login-card{position:relative;width:360px;background:#fff;border-radius:10px;padding:32px;box-shadow:0 4px 24px #0000000f}.login-card h1{font-size:20px;text-align:center;margin-bottom:4px}.login-card .subtitle{text-align:center;color:#888;font-size:13px;margin-bottom:20px}.badge--missing{background:#fee2e2;color:#991b1b}.attendance-overview{background:#fff;border:1px solid #e0e0e0;border-radius:8px;padding:1rem}.attendance-overview-scroll{overflow-x:auto}.attendance-matrix{border-collapse:collapse;table-layout:fixed}.attendance-matrix--fill{width:100%}.attendance-matrix th,.attendance-matrix td{box-sizing:border-box;border:1px solid #eee;text-align:center;padding:.3rem .25rem;font-size:.8rem;white-space:nowrap}.attendance-matrix-student-col{position:sticky;left:0;z-index:1;background:#fff;text-align:left!important;font-weight:600;width:110px;padding:.3rem .4rem}.attendance-matrix-student-name{overflow:hidden;text-overflow:ellipsis}.attendance-matrix-withdrawn{margin-left:4px;font-size:.65rem;font-weight:400;color:#b45309}.attendance-matrix-student-meta{display:flex;align-items:center;gap:.25rem;margin-top:.15rem;font-weight:400}.attendance-matrix-student-no{font-size:.7rem;color:#999;overflow:hidden;text-overflow:ellipsis}.attendance-matrix-student-class{font-size:.68rem;color:#555;background:#eef2f7;border-radius:3px;padding:1px;flex-shrink:0}.attendance-matrix-date-col{width:34px;padding:.2rem .1rem}.attendance-date-chip{display:flex;flex-direction:column;align-items:center}.attendance-date-month{font-size:.62rem;font-weight:700;color:#888;letter-spacing:.02em;padding-bottom:.15rem;border-bottom:1px solid #ddd;width:100%}.attendance-date-day{font-size:.8rem;font-weight:700;color:#333;padding-top:.15rem}.attendance-matrix-cell{font-weight:700;width:34px}.attendance-matrix-cell-not-joined,.attendance-legend-swatch.attendance-matrix-cell-not-joined{background:#f5f5f5;color:#8a8a8a;font-weight:400}.attendance-matrix-cell-unmarked,.attendance-legend-swatch.attendance-matrix-cell-unmarked{background:transparent;color:#29241a;font-weight:700}.attendance-matrix th.attendance-month-even{background:#e3ecf7}.attendance-matrix-cell-not-joined.attendance-month-even{background:#edf2f8}.attendance-matrix-cell-holiday{background:#2aceff;color:#fff;font-weight:700}.attendance-matrix-cell-cancelled{background:#3c3c3c;color:#fff;font-weight:700}.attendance-matrix-cell-rescheduled{background:#185abd;color:#fff;font-weight:700}.attendance-matrix-cell-empty{background:#fafafa}.attendance-matrix-pagination{display:flex;align-items:center;justify-content:center;gap:1rem;margin-bottom:.75rem}.attendance-matrix-page-info{font-size:.85rem;color:#555;font-weight:600;white-space:nowrap}.attendance-legend{display:flex;flex-wrap:wrap;gap:1rem;margin-top:.75rem}.attendance-legend-item{display:flex;align-items:center;gap:.4rem;font-size:.85rem;color:#555}.attendance-legend-swatch{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:4px;color:#fff;font-weight:700;font-size:.75rem}.table__row--clickable{cursor:pointer}.table__row--clickable:hover td{background:#fef2f2}.modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;display:flex;align-items:center;justify-content:center;padding:16px;background:#0006}.modal{width:100%;max-width:420px;max-height:calc(100vh - 32px);overflow-y:auto;background:#fff;border-radius:10px;padding:20px 24px;box-shadow:0 8px 32px #0003}.modal__info{width:100%;border-collapse:collapse;margin-bottom:16px;font-size:14px}.modal__info th,.modal__info td{text-align:left;padding:6px 8px;border-bottom:1px solid #eee}.modal__info th{width:90px;color:#555;font-weight:500}.modal__actions{display:flex;justify-content:flex-end;gap:8px;margin-top:8px}.name-en{font-size:12px;color:#666}.password-input-wrapper{position:relative}.password-input-wrapper input{width:100%;padding-right:42px}.password-toggle-btn{position:absolute;right:4px;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:32px;height:32px;border:none;background:transparent;border-radius:6px;cursor:pointer}.password-toggle-btn:hover:not(:disabled){background:#f3f4f6}.password-toggle-btn:disabled{cursor:not-allowed;opacity:.5}.password-toggle-btn img{width:18px;height:18px;display:block}
