/* ============================================
   따능스쿨 강사 성과 관리 시스템 — Style
   Light theme + Teal accent
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700;900&display=swap');

:root {
  --primary: #3CCCBB;
  --primary-dark: #2BA89A;
  --primary-light: #E8F8F6;
  --primary-bg: rgba(60,204,187,0.08);
  --orange: #FF6B35;
  --bg: #F8FAFB;
  --white: #FFFFFF;
  --card: #FFFFFF;
  --card-border: #E5E9ED;
  --card-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --card-shadow-hover: 0 4px 12px rgba(0,0,0,0.08);
  --text: #1A2B3C;
  --text-secondary: #5A6B7C;
  --text-muted: #8899AA;
  --border: #E5E9ED;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --info: #3B82F6;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --nav-height: 64px;
}

/* ── RESET ── */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── NAVIGATION ── */
.nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.nav-logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nav-logo .dot {
  width: 10px;
  height: 10px;
  background: var(--primary);
  border-radius: 50%;
}

.nav-links {
  display: flex;
  gap: 4px;
  margin-left: 32px;
  flex: 1;
  overflow-x: auto;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all 0.15s;
}

.nav-links a:hover {
  background: var(--primary-bg);
  color: var(--primary-dark);
  text-decoration: none;
}

.nav-links a.active {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 700;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}

.nav-user img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-user .name {
  font-size: 0.88rem;
  font-weight: 500;
}

.nav-user .role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ── LAYOUT ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

.container-wide {
  max-width: 1300px;
  margin: 0 auto;
  padding: 24px;
}

.page-header {
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-top: 4px;
}

/* ── CARDS ── */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.2s;
}

.card:hover {
  box-shadow: var(--card-shadow-hover);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.card-header h3 {
  font-size: 1rem;
  font-weight: 700;
}

/* ── STAT CARDS ── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--card-shadow);
  text-align: center;
}

.stat-card .icon {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.stat-card .number {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--primary-dark);
  line-height: 1.2;
}

.stat-card .label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover { background: var(--primary-dark); }

.btn-secondary {
  background: var(--white);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg); }

.btn-danger {
  background: #FEF2F2;
  color: var(--danger);
  border: 1px solid #FECACA;
}

.btn-google {
  background: var(--white);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 12px 28px;
  font-size: 1rem;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
}
.btn-google:hover {
  box-shadow: var(--card-shadow-hover);
  background: #FAFAFA;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.82rem;
}

/* ── FORMS ── */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.form-group .hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

input[type="text"],
input[type="date"],
input[type="number"],
input[type="url"],
input[type="email"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.15s;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(60,204,187,0.15);
}

textarea { resize: vertical; min-height: 80px; }

/* ── TABS ── */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
  overflow-x: auto;
}

.tab {
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: all 0.15s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: inherit;
}

.tab:hover { color: var(--text); }

.tab.active {
  color: var(--primary-dark);
  border-bottom-color: var(--primary);
  font-weight: 700;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── TABLE ── */
.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  background: var(--bg);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 10px 14px;
  text-align: left;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  vertical-align: middle;
}

tbody tr:hover { background: rgba(60,204,187,0.03); }

/* ── TAGS ── */
.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.tag-green { background: #ECFDF5; color: #059669; }
.tag-blue { background: #EFF6FF; color: #2563EB; }
.tag-yellow { background: #FFFBEB; color: #D97706; }
.tag-red { background: #FEF2F2; color: #DC2626; }
.tag-purple { background: #F5F3FF; color: #7C3AED; }
.tag-teal { background: var(--primary-light); color: var(--primary-dark); }
.tag-orange { background: #FFF7ED; color: #EA580C; }

/* ── BADGE ── */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--danger);
  color: white;
}

/* ── POST CARD ── */
.post-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 12px;
  box-shadow: var(--card-shadow);
}

.post-card .post-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.post-card .post-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--primary-dark);
}

.post-card .post-meta .author {
  font-weight: 600;
  font-size: 0.9rem;
}

.post-card .post-meta .time {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.post-card .post-body {
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 12px;
}

.post-card .post-image {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.post-card .post-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--primary-dark);
  font-size: 0.85rem;
  padding: 6px 12px;
  background: var(--primary-bg);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.post-card .post-actions {
  display: flex;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.post-card .post-actions button {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
}

.post-card .post-actions button:hover { color: var(--primary-dark); }
.post-card .post-actions button.liked { color: var(--danger); }

/* ── CHECKLIST ── */
.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.checklist-item:last-child { border-bottom: none; }

.checklist-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.checklist-item .item-content { flex: 1; }

.checklist-item .item-title {
  font-size: 0.9rem;
  font-weight: 500;
}

.checklist-item .item-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.checklist-item.checked .item-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* ── PROGRESS BAR ── */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar .fill {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  transition: width 0.3s;
}

/* ── CALENDAR ITEM ── */
.schedule-item {
  display: flex;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.schedule-item:last-child { border-bottom: none; }

.schedule-date {
  width: 52px;
  text-align: center;
  flex-shrink: 0;
}

.schedule-date .day {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--primary-dark);
}

.schedule-date .month {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.schedule-info { flex: 1; }

.schedule-info .title {
  font-weight: 600;
  font-size: 0.92rem;
}

.schedule-info .detail {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ── PROFILE (PUBLIC) ── */
.profile-hero {
  text-align: center;
  padding: 48px 24px;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--white) 100%);
  border-bottom: 1px solid var(--border);
}

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 900;
  margin: 0 auto 16px;
}

.profile-name {
  font-size: 1.6rem;
  font-weight: 900;
}

.profile-course {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.profile-sns {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.profile-sns a {
  padding: 6px 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.profile-sns a:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
  text-decoration: none;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 600px;
  margin: 24px auto 0;
}

/* ── LOGIN PAGE ── */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg);
}

.login-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
  max-width: 420px;
  width: 100%;
  margin: 24px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.login-card .logo {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.login-card .subtitle {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 32px;
}

.login-card .divider {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin: 20px 0;
  position: relative;
}

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state .icon { font-size: 2.5rem; margin-bottom: 12px; }
.empty-state .title { font-size: 1.05rem; font-weight: 600; color: var(--text-secondary); }
.empty-state .desc { font-size: 0.88rem; margin-top: 4px; }

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal-overlay.active { display: flex; }

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 520px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

.modal h2 {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

/* ── GRID LAYOUTS ── */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--text);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 300;
  display: none;
}

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

/* ── MOBILE RESPONSIVE ── */
@media (max-width: 768px) {
  .nav { padding: 0 16px; }
  .nav-links { margin-left: 16px; gap: 2px; }
  .nav-links a { padding: 6px 10px; font-size: 0.82rem; }
  .nav-user .name, .nav-user .role { display: none; }

  .container, .container-wide { padding: 16px; }

  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .profile-stats { grid-template-columns: repeat(2, 1fr); }

  .card { padding: 16px; }
  .login-card { padding: 32px 24px; }

  table { font-size: 0.82rem; }
  thead th, tbody td { padding: 8px 10px; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-card .number { font-size: 1.4rem; }
  .nav-links { display: none; }
}

/* ── HAMBURGER MENU (MOBILE) ── */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 8px;
  color: var(--text);
}

@media (max-width: 480px) {
  .nav-hamburger { display: block; }
}

.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0; right: 0; bottom: 0;
  background: var(--white);
  z-index: 99;
  padding: 16px;
}

.mobile-menu.active { display: block; }

.mobile-menu a {
  display: block;
  padding: 14px 16px;
  font-size: 1rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.mobile-menu a.active {
  color: var(--primary-dark);
  font-weight: 700;
}

/* ── UTILITY ── */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary-dark); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.font-bold { font-weight: 700; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.gap-8 { gap: 8px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; }
.hidden { display: none; }
