@charset "utf-8";

/* ========================================
   CARNA ASIA Partner Community
   Theme: Clean White + Orange Accent
   ======================================== */

@import url('https://hangeul.pstatic.net/hangeul_static/css/nanum-square-neo.css');

:root {
  --primary: #f97316;
  --primary-hover: #ea580c;
  --primary-light: rgba(249, 115, 22, 0.08);
  --primary-glow: rgba(249, 115, 22, 0.15);
  --bg-white: #ffffff;
  --bg-light: #f7f8fa;
  --bg-section: #fafbfc;
  --text-dark: #1a1a1a;
  --text-body: #333333;
  --text-secondary: #666666;
  --text-muted: #999999;
  --text-placeholder: #bbb;
  --border: #e5e7eb;
  --border-light: #f0f0f0;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --info: #2563eb;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.1);
  --radius: 12px;
  --radius-lg: 16px;
  --radius-sm: 8px;
  --font: 'NanumSquareNeo', -apple-system, 'Malgun Gothic', sans-serif;
  --transition: all 0.2s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

/* ========== 로그인 / 회원가입 (동영상 배경) ========== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
  position: relative;
  overflow: hidden;
}

.auth-video-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  opacity: 0.4;
  z-index: 0;
}

.auth-page::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.3) 100%);
  z-index: 1;
}

.auth-container {
  position: relative;
  z-index: 2;
  width: 420px;
  padding: 44px 36px;
  background: rgba(255, 255, 255, 0.97);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

.auth-container.wide {
  width: 520px;
}

.auth-logo {
  text-align: center;
  margin-bottom: 6px;
}

.auth-logo h1 {
  font-size: 30px;
  font-weight: 900;
  color: #1a1a1a;
  letter-spacing: -1px;
}

.auth-logo h1 span {
  color: var(--primary);
}

.auth-subtitle {
  text-align: center;
  font-size: 12px;
  color: #aaa;
  margin-bottom: 32px;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.auth-form .form-group {
  margin-bottom: 18px;
}

.auth-form .form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #555;
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}

.auth-form .form-group input,
.auth-form .form-group select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  color: #1a1a1a;
  font-size: 14px;
  font-family: var(--font);
  transition: var(--transition);
  outline: none;
}

.auth-form .form-group input:focus,
.auth-form .form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
  background: #fff;
}

.auth-form .form-group input::placeholder {
  color: #ccc;
}

.auth-form .form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.auth-form .form-group select option {
  background: #fff;
  color: #1a1a1a;
}

.auth-form .form-row {
  display: flex;
  gap: 12px;
}

.auth-form .form-row .form-group {
  flex: 1;
}

.auth-form .form-group textarea {
  width: 100%;
  height: 80px;
  padding: 12px 14px;
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  color: #1a1a1a;
  font-size: 14px;
  font-family: var(--font);
  transition: var(--transition);
  outline: none;
  resize: vertical;
}

.auth-form .form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
  background: #fff;
}

.auth-btn {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 6px;
}

.auth-btn:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.auth-error {
  margin-top: 14px;
  padding: 11px 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  color: #dc2626;
  font-size: 13px;
  display: none;
}

.auth-error.show {
  display: block;
}

.auth-success {
  padding: 14px 16px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  color: #16a34a;
  font-size: 13px;
  line-height: 1.6;
}

.auth-links {
  margin-top: 24px;
  text-align: center;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.auth-links a {
  color: #999;
  font-size: 13px;
  transition: var(--transition);
}

.auth-links a:hover {
  color: var(--primary);
}

.auth-links .divider {
  color: #ddd;
}

.auth-footer {
  margin-top: 28px;
  text-align: center;
  font-size: 11px;
  color: #ccc;
}

/* ========== 메인 레이아웃 (화이트 테마) ========== */
.partner-body {
  font-family: var(--font);
  background: var(--bg-light);
  color: var(--text-body);
  min-height: 100vh;
}

/* 헤더 */
.partner-header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.partner-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 24px;
}

.partner-header .logo a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dark);
}

.partner-header .logo h1 {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.partner-header .logo h1 span {
  color: var(--primary);
}

.partner-header .logo .badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 1px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.header-user .company-name {
  color: var(--text-dark);
  font-weight: 700;
}

.header-user .partner-type {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
}

.header-user .partner-type.odm {
  background: #eff6ff;
  color: #2563eb;
}

.header-user .partner-type.distributor {
  background: #f5f3ff;
  color: #7c3aed;
}

.header-user .partner-type.dealer {
  background: #f0fdf4;
  color: #16a34a;
}

.header-user .partner-type.agent {
  background: #fff7ed;
  color: #ea580c;
}

.profile-btn {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 13px;
  transition: var(--transition);
  background: transparent;
  cursor: pointer;
  font-family: var(--font);
}

.profile-btn:hover,
.profile-btn.active {
  border-color: var(--primary);
  color: var(--primary);
}

.logout-btn {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 13px;
  transition: var(--transition);
  background: transparent;
  cursor: pointer;
  font-family: var(--font);
}

.logout-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* 네비게이션 */
.partner-nav {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: relative;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 20px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-dark);
  border-radius: 1px;
}

.partner-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 0;
  width: 100%;
}

.partner-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: 1;
  padding: 12px 8px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}

.partner-nav a:hover {
  color: var(--text-dark);
}

.partner-nav a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 800;
}

.partner-nav a .nav-icon {
  font-size: 14px;
}

/* 컨텐츠 영역 */
.partner-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px;
}

/* ========== 대시보드 ========== */
.dashboard-welcome {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 36px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.dashboard-welcome::before {
  content: '';
  position: absolute;
  right: -40px;
  top: -40px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
  border-radius: 50%;
}

.dashboard-welcome h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 6px;
  position: relative;
}

.dashboard-welcome h2 span {
  color: var(--primary);
}

.dashboard-welcome p {
  font-size: 14px;
  color: var(--text-muted);
  position: relative;
}

/* 카테고리 카드 */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.dashboard-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  transition: var(--transition);
  cursor: pointer;
  display: block;
  color: inherit;
}

.dashboard-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

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

.dashboard-card .card-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.card-icon.notice {
  background: #eff6ff;
}

.card-icon.news {
  background: #f5f3ff;
}

.card-icon.report {
  background: #f0fdf4;
}

.card-icon.update {
  background: #fff7ed;
}

.card-icon.materials {
  background: #fdf2f8;
}

.card-icon.qna {
  background: #ecfeff;
}

.dashboard-card .card-count {
  font-size: 26px;
  font-weight: 900;
  color: var(--text-dark);
}

.dashboard-card .card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 3px;
}

.dashboard-card .card-desc {
  font-size: 12px;
  color: var(--text-muted);
}

/* 최신 글 리스트 */
.dashboard-latest {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.latest-section {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.latest-section .section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-section);
}

.latest-section .section-header h3 {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-dark);
}

.latest-section .section-header a {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
}

.latest-section .section-header a:hover {
  text-decoration: underline;
}

.latest-list {
  padding: 0;
  margin: 0;
}

.latest-list li {
  padding: 11px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

.latest-list li:last-child {
  border-bottom: 0;
}

.latest-list li:hover {
  background: var(--bg-section);
}

.latest-list li a {
  color: var(--text-body);
  font-size: 13px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 10px;
  transition: var(--transition);
}

.latest-list li a:hover {
  color: var(--primary);
}

.latest-list li .date {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.latest-list .pinned {
  color: var(--primary) !important;
  font-weight: 700;
}

.latest-list .pinned::before {
  content: '[필독] ';
  font-size: 11px;
}

.latest-list .empty-msg {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 28px 20px;
}

/* ========== 게시판 ========== */
.board-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.board-header h2 {
  font-size: 20px;
  font-weight: 900;
  color: var(--text-dark);
}

.board-header .board-count {
  font-size: 13px;
  color: var(--text-muted);
}

.board-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.board-search select {
  height: 38px;
  padding: 0 30px 0 12px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-body);
  font-family: var(--font);
  font-size: 13px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  outline: none;
}

.board-search select:focus {
  border-color: var(--primary);
}

.board-search input[type="text"] {
  height: 38px;
  padding: 0 14px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dark);
  font-size: 13px;
  width: 250px;
  font-family: var(--font);
  outline: none;
}

.board-search input[type="text"]:focus {
  border-color: var(--primary);
}

.board-search input[type="text"]::placeholder {
  color: var(--text-placeholder);
}

.board-search button {
  height: 38px;
  padding: 0 20px;
  border: none;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.board-search button:hover {
  background: var(--primary-hover);
}

.board-table {
  width: 100%;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}

.board-table thead th {
  padding: 12px 12px;
  background: var(--bg-section);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}

.board-table tbody td {
  padding: 13px 12px;
  font-size: 14px;
  color: var(--text-body);
  border-bottom: 1px solid var(--border-light);
  text-align: center;
}

.board-table tbody tr:last-child td {
  border-bottom: none;
}

.board-table tbody tr:hover td {
  background: var(--bg-section);
}

.board-table .td-title {
  text-align: left;
  max-width: 0;
}

.board-table .td-title a {
  color: var(--text-body);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: var(--transition);
}

.board-table .td-title a:hover {
  color: var(--primary);
}

.board-table .td-num {
  width: 60px;
  color: var(--text-muted);
}

.board-table .td-author {
  width: 100px;
  color: var(--text-secondary);
}

.board-table .td-date {
  width: 100px;
  color: var(--text-muted);
  font-size: 13px;
}

.board-table .td-views {
  width: 70px;
  color: var(--text-muted);
}

.board-table .td-file {
  width: 50px;
}

.board-table .pinned-row td {
  background: var(--primary-light);
}

.board-table .pinned-badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 10px;
}

.board-table .new-badge {
  display: inline-block;
  background: var(--danger);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 8px;
  margin-left: 6px;
  vertical-align: middle;
}

.file-icon {
  color: var(--text-muted);
  font-size: 15px;
}

.board-empty {
  text-align: center;
  padding: 60px 20px !important;
  color: var(--text-muted) !important;
  font-size: 14px;
}

/* 페이지네이션 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin-top: 24px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  transition: var(--transition);
}

.pagination a:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.pagination .current {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 800;
}

/* ========== 게시판 상세 ========== */
.board-view {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.board-view-header {
  padding: 28px 30px 20px;
  border-bottom: 1px solid var(--border-light);
}

.board-view-header h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 12px;
  line-height: 1.5;
}

.board-view-meta {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.board-view-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.board-view-content {
  padding: 30px;
  min-height: 300px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-body);
}

.board-view-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.board-view-file {
  padding: 16px 30px;
  background: var(--bg-section);
  border-top: 1px solid var(--border-light);
}

.board-view-file h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.board-view-file a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--primary);
  font-size: 13px;
  transition: var(--transition);
}

.board-view-file a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.board-view-footer {
  padding: 16px 30px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: center;
  gap: 10px;
}

.board-nav-prev-next {
  padding: 0 30px;
  border-top: 1px solid var(--border-light);
}

.board-nav-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.board-nav-item .nav-label {
  font-size: 13px;
  color: var(--text-muted);
  min-width: 50px;
}

.board-nav-item a {
  color: var(--text-body);
  font-size: 14px;
  transition: var(--transition);
}

.board-nav-item a:hover {
  color: var(--primary);
}

.btn-list {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 28px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
  background: var(--bg-white);
  cursor: pointer;
  font-family: var(--font);
}

.btn-list:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ========== Q&A ========== */
.qna-write-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 22px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.qna-write-btn:hover {
  background: var(--primary-hover);
}

.qna-status {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
}

.qna-status.waiting {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

.qna-status.answered {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

/* Q&A 작성 폼 */
.qna-form {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.qna-form .form-group {
  margin-bottom: 18px;
}

.qna-form .form-group label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.qna-form .form-group input[type="text"] {
  width: 100%;
  height: 46px;
  padding: 0 16px;
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dark);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
}

.qna-form .form-group input[type="text"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.qna-form .form-group textarea {
  width: 100%;
  height: 250px;
  padding: 16px;
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dark);
  font-size: 14px;
  font-family: var(--font);
  resize: vertical;
  line-height: 1.7;
  outline: none;
}

.qna-form .form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.qna-form .form-group input::placeholder,
.qna-form .form-group textarea::placeholder {
  color: var(--text-placeholder);
}

.qna-form .form-actions {
  text-align: center;
  margin-top: 24px;
  display: flex;
  gap: 10px;
  justify-content: center;
}

.qna-form .btn-submit {
  padding: 11px 36px;
  border: none;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.qna-form .btn-submit:hover {
  background: var(--primary-hover);
}

.qna-form .btn-cancel {
  padding: 11px 36px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-white);
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: var(--transition);
}

.qna-form .btn-cancel:hover {
  border-color: var(--text-muted);
  color: var(--text-dark);
}

/* 파일 입력 */
.file-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dark);
  font-size: 14px;
  font-family: var(--font);
  cursor: pointer;
}

.file-input:hover {
  border-color: var(--primary);
}

.file-help {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.file-list {
  margin-top: 8px;
  padding: 0;
}

.file-list li {
  padding: 6px 12px;
  background: var(--bg-section);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
  list-style: none;
}

.file-list li::before {
  content: '\1f4ce ';
}

/* Q&A 답변 */
.qna-answer {
  margin-top: 16px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  border-left: 3px solid var(--primary);
}

.qna-answer h4 {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.qna-answer .answer-content {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-body);
}

.qna-answer .answer-meta {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ========== 푸터 ========== */
.partner-footer {
  background: var(--bg-white);
  border-top: 1px solid var(--border);
  padding: 28px 0;
  margin-top: 48px;
}

.partner-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}

.partner-footer p {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.8;
}

.partner-footer .footer-logo {
  font-size: 15px;
  font-weight: 900;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.partner-footer .footer-logo span {
  color: var(--primary);
}

/* ========== 알림 ========== */
.alert {
  padding: 13px 18px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 18px;
}

.alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--danger);
}

.alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: var(--success);
}

/* ========== 유틸리티 ========== */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.mt-10 {
  margin-top: 10px;
}

.mt-20 {
  margin-top: 20px;
}

.mt-30 {
  margin-top: 30px;
}

.mb-10 {
  margin-bottom: 10px;
}

.mb-20 {
  margin-bottom: 20px;
}

.mb-30 {
  margin-bottom: 30px;
}

/* ========== 제품 ========== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.product-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  display: block;
  color: inherit;
}

.product-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.product-card .product-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--bg-section);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 48px;
}

.product-card .product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card .product-info {
  padding: 18px 20px;
}

.product-card .product-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-card .product-price {
  font-size: 16px;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 8px;
}

.product-card .product-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 제품 상세 */
.product-detail {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.product-detail-top {
  display: flex;
  gap: 32px;
  padding: 32px;
}

.product-detail-image {
  width: 400px;
  min-height: 300px;
  flex-shrink: 0;
  background: var(--bg-section);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 64px;
}

.product-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-detail-info {
  flex: 1;
}

.product-detail-info h2 {
  font-size: 22px;
  font-weight: 900;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.product-detail-info .product-price {
  font-size: 24px;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 20px;
}

.product-detail-info .product-desc {
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.8;
  margin-bottom: 24px;
}

.product-detail-specs {
  padding: 24px 32px;
  border-top: 1px solid var(--border-light);
}

.product-detail-specs h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 16px;
}

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

.spec-table th,
.spec-table td {
  padding: 10px 14px;
  font-size: 14px;
  border-bottom: 1px solid var(--border-light);
  text-align: left;
}

.spec-table th {
  width: 160px;
  background: var(--bg-section);
  color: var(--text-secondary);
  font-weight: 700;
}

.spec-table td {
  color: var(--text-body);
}

.product-detail-footer {
  padding: 20px 32px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: center;
  gap: 10px;
}

.btn-order {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 32px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-order:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

/* ========== 주문 ========== */
.order-status {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
}

.order-status.pending {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

.order-status.confirmed {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.order-status.shipping {
  background: #f5f3ff;
  color: #7c3aed;
  border: 1px solid #ddd6fe;
}

.order-status.delivered {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.order-status.cancelled {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

/* 주문 상세 */
.order-detail {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.order-detail-header {
  padding: 28px 30px 20px;
  border-bottom: 1px solid var(--border-light);
}

.order-detail-header h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.order-detail-meta {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.order-detail-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.order-items-section {
  padding: 24px 30px;
}

.order-items-section h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 16px;
}

.order-items-table {
  width: 100%;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}

.order-items-table thead th {
  padding: 12px 14px;
  background: var(--bg-section);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.order-items-table tbody td {
  padding: 13px 14px;
  font-size: 14px;
  color: var(--text-body);
  border-bottom: 1px solid var(--border-light);
  text-align: center;
}

.order-items-table tbody tr:last-child td {
  border-bottom: none;
}

.order-items-table .td-product {
  text-align: left;
}

.order-total {
  padding: 20px 30px;
  border-top: 1px solid var(--border-light);
  text-align: right;
  font-size: 18px;
  font-weight: 900;
  color: var(--text-dark);
}

.order-total .total-label {
  color: var(--text-secondary);
  font-weight: 600;
  margin-right: 12px;
}

.order-total .total-amount {
  color: var(--primary);
}

.order-detail-footer {
  padding: 20px 30px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: center;
  gap: 10px;
}

.btn-cancel-order {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 28px;
  border: 1px solid var(--danger);
  border-radius: 6px;
  color: var(--danger);
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
  background: var(--bg-white);
  cursor: pointer;
  font-family: var(--font);
}

.btn-cancel-order:hover {
  background: var(--danger);
  color: #fff;
}

/* 주문 생성 폼 */
.order-form {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.order-form .form-group {
  margin-bottom: 18px;
}

.order-form .form-group label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.order-form .form-group input,
.order-form .form-group select,
.order-form .form-group textarea {
  width: 100%;
  height: 46px;
  padding: 0 16px;
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dark);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
}

.order-form .form-group input:focus,
.order-form .form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.order-form .form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.order-form .form-group textarea {
  height: 100px;
  padding: 12px 16px;
  resize: vertical;
}

.order-form-items {
  margin-bottom: 24px;
}

.order-form-items h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.order-item-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  padding: 14px 16px;
  background: var(--bg-section);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
}

.order-item-row select {
  flex: 3;
  height: 40px;
  padding: 0 32px 0 12px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dark);
  font-size: 13px;
  font-family: var(--font);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  outline: none;
}

.order-item-row input[type="number"] {
  flex: 1;
  height: 40px;
  padding: 0 10px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dark);
  font-size: 13px;
  font-family: var(--font);
  outline: none;
  text-align: right;
}

.order-item-row .item-subtotal {
  flex: 1;
  text-align: right;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  min-width: 100px;
}

.order-item-row .btn-remove-item {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-white);
  color: var(--danger);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.order-item-row .btn-remove-item:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.btn-add-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border: 1px dashed var(--border);
  border-radius: 6px;
  background: var(--bg-white);
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-add-item:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.order-form-total {
  text-align: right;
  padding: 16px 0;
  border-top: 1px solid var(--border-light);
  margin-top: 16px;
  font-size: 18px;
  font-weight: 900;
  color: var(--text-dark);
}

.order-form-total .total-amount {
  color: var(--primary);
}

.order-form .form-actions {
  text-align: center;
  margin-top: 24px;
  display: flex;
  gap: 10px;
  justify-content: center;
}

.order-form .btn-submit {
  padding: 11px 36px;
  border: none;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.order-form .btn-submit:hover {
  background: var(--primary-hover);
}

.order-form .btn-cancel {
  padding: 11px 36px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-white);
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.order-form .btn-cancel:hover {
  border-color: var(--text-muted);
  color: var(--text-dark);
}

/* 주문 필터 */
.order-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.order-filter select {
  height: 38px;
  padding: 0 30px 0 12px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-body);
  font-family: var(--font);
  font-size: 13px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  outline: none;
}

.order-filter select:focus {
  border-color: var(--primary);
}

/* ========== 반응형 ========== */
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-latest {
    grid-template-columns: 1fr;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-detail-top {
    flex-direction: column;
  }

  .product-detail-image {
    width: 100%;
    height: 250px;
  }
}

@media (max-width: 768px) {
  .auth-container {
    width: 92%;
    padding: 32px 24px;
  }

  .auth-container.wide {
    width: 92%;
  }

  .auth-form .form-row {
    flex-direction: column;
    gap: 0;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .partner-header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 20px;
    gap: 10px;
  }

  .nav-toggle {
    display: flex;
  }

  .partner-nav-inner {
    display: none;
    flex-direction: column;
    padding: 0;
  }

  .partner-nav-inner.open {
    display: flex;
  }

  .partner-nav a {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-light);
    border-left: 3px solid transparent;
  }

  .partner-nav a.active {
    border-bottom: 1px solid var(--border-light);
    border-left-color: var(--primary);
    background: var(--bg-section);
  }

  .board-table .td-author,
  .board-table .td-views {
    display: none;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .order-item-row {
    flex-wrap: wrap;
  }

  .order-item-row select {
    flex: 1 1 100%;
  }

  .course-grid {
    grid-template-columns: 1fr;
  }

  .course-detail-layout {
    flex-direction: column;
  }

  .course-detail-sidebar {
    min-width: 0;
  }
}

/* ========================================
   강의 & 시험 페이지
   ======================================== */

/* 강의 카드 그리드 */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.course-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

.course-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.course-card-thumb {
  width: 100%;
  height: 160px;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: var(--text-muted);
  overflow: hidden;
}

.course-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.course-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.4;
}

.course-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.course-card-meta .duration {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 난이도 뱃지 */
.difficulty-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
}

.difficulty-badge.beginner {
  background: #ecfdf5;
  color: var(--success);
}

.difficulty-badge.intermediate {
  background: #eff6ff;
  color: var(--info);
}

.difficulty-badge.advanced {
  background: #fef2f2;
  color: var(--danger);
}

/* 진행률 바 */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-top: auto;
}

.progress-bar.large {
  height: 10px;
  border-radius: 5px;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width 0.4s ease;
}

.progress-fill.completed {
  background: var(--success);
}

.progress-text {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  text-align: right;
}

/* 강의 상세 레이아웃 */
.course-detail {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.course-detail-thumb {
  width: 100%;
  max-height: 360px;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  color: var(--text-muted);
  overflow: hidden;
}

.course-detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-detail-layout {
  display: flex;
  gap: 24px;
  padding: 24px;
}

.course-detail-main {
  flex: 1;
}

.course-detail-main h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.course-detail-main .description {
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.7;
  margin-top: 16px;
  white-space: pre-line;
}

.course-detail-sidebar {
  min-width: 260px;
  background: var(--bg-section);
  border-radius: var(--radius-sm);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.course-detail-sidebar .info-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.course-detail-sidebar .info-row .label {
  color: var(--text-secondary);
}

.course-detail-sidebar .info-row .value {
  font-weight: 700;
  color: var(--text-dark);
}

/* 진행률 업데이트 슬라이더 */
.progress-slider-wrap {
  margin-top: 8px;
}

.progress-slider-wrap input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}

.progress-slider-wrap .slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.progress-update-btn {
  display: inline-block;
  padding: 8px 20px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 8px;
  width: 100%;
  text-align: center;
}

.progress-update-btn:hover {
  background: var(--primary-hover);
}

.progress-update-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 학습 상태 뱃지 */
.course-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}

.course-status.not_started {
  background: var(--bg-light);
  color: var(--text-muted);
}

.course-status.in_progress {
  background: #eff6ff;
  color: var(--info);
}

.course-status.completed {
  background: #ecfdf5;
  color: var(--success);
}

/* 시험 상태 뱃지 */
.test-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}

.test-status.passed {
  background: #ecfdf5;
  color: var(--success);
}

.test-status.failed {
  background: #fef2f2;
  color: var(--danger);
}

.test-status.in_progress {
  background: #eff6ff;
  color: var(--info);
}

/* 학습 대시보드 요약 카드 */
.learning-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.learning-summary-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.learning-summary-card .summary-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
}

.learning-summary-card .summary-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ========================================
   시험 목록 & 상세 & 응시
   ======================================== */

/* 시험 카드 그리드 */
.test-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.test-card {
  display: flex;
  align-items: stretch;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  overflow: hidden;
}

.test-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.test-card-icon {
  width: 72px;
  min-height: 100%;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
}

.test-card-body {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.test-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.4;
}

.test-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.test-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.test-card-footer {
  min-width: 100px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-left: 1px solid var(--border-light);
  flex-shrink: 0;
}

.test-card-score {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
}

.test-card-score small {
  color: var(--text-muted);
}

/* 시험 유형 뱃지 */
.test-type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
}

.test-type-badge.quiz {
  background: #f0fdf4;
  color: var(--success);
}

.test-type-badge.exam {
  background: #eff6ff;
  color: var(--info);
}

.test-type-badge.assessment {
  background: #fefce8;
  color: var(--warning);
}

/* 미응시 상태 */
.test-status.not_attempted {
  background: var(--bg-light);
  color: var(--text-muted);
}

/* 시험 상세 */
.test-detail {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.test-detail-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-light);
}

.test-detail-header h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-dark);
}

.test-detail-layout {
  display: flex;
  gap: 24px;
  padding: 24px;
}

.test-detail-main {
  flex: 1;
}

.test-detail-sidebar {
  min-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.test-section {
  margin-bottom: 24px;
}

.test-section h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

.test-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.test-info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--bg-section);
  border-radius: var(--radius-sm);
}

.test-info-item .info-icon {
  font-size: 20px;
}

.test-info-item .info-label {
  font-size: 11px;
  color: var(--text-muted);
}

.test-info-item .info-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
}

/* 점수 카드 */
.test-score-card {
  background: var(--bg-section);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
}

.test-score-card .score-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.test-score-card .score-value {
  font-size: 36px;
  font-weight: 800;
}

.test-score-card .score-value.passed {
  color: var(--success);
}

.test-score-card .score-value.failed {
  color: var(--danger);
}

.test-score-card .score-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* 시험 시작 버튼 */
.test-start-btn {
  display: block;
  padding: 14px 20px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  text-decoration: none;
  width: 100%;
}

.test-start-btn:hover {
  background: var(--primary-hover);
}

.test-start-btn.resume {
  background: var(--info);
}

.test-start-btn.resume:hover {
  background: #1d4ed8;
}

.test-start-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--text-muted);
}

/* ========================================
   시험 응시 페이지
   ======================================== */
.test-take-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 12px;
}

.test-take-title h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-dark);
}

.test-timer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 20px;
  font-weight: 800;
  color: var(--text-dark);
  background: var(--bg-section);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
}

.test-timer.warning {
  background: #fef2f2;
  color: var(--danger);
  animation: timerPulse 1s ease-in-out infinite;
}

@keyframes timerPulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

.test-timer .timer-icon {
  font-size: 18px;
}

/* 진행 상황 바 */
.test-take-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-secondary);
}

.test-take-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.test-take-progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: inherit;
  transition: width 0.3s ease;
}

/* 문제 카드 */
.test-question {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 12px;
  transition: var(--transition);
}

.test-question.answered {
  border-color: var(--primary);
  border-left: 3px solid var(--primary);
}

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

.question-num {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary);
}

.question-points {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-light);
  padding: 2px 8px;
  border-radius: 8px;
}

.question-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.6;
  margin-bottom: 16px;
}

/* 선택지 */
.question-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.option-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.option-item:hover {
  background: var(--bg-light);
  border-color: var(--primary);
}

.option-item input[type="radio"] {
  display: none;
}

.option-item input[type="radio"]:checked+.option-marker {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.option-item input[type="radio"]:checked~.option-text {
  font-weight: 700;
  color: var(--text-dark);
}

.option-marker {
  width: 28px;
  height: 28px;
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: var(--transition);
}

.option-text {
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.5;
}

/* 주관식 */
.question-text-input textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px;
  resize: vertical;
  transition: var(--transition);
}

.question-text-input textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* 문제 상태 */
.question-status {
  font-size: 12px;
  margin-top: 8px;
  text-align: right;
}

.question-status.submitted {
  color: var(--success);
}

.question-status.error {
  color: var(--danger);
}

/* 제출 버튼 */
.test-take-actions {
  margin-top: 20px;
  padding: 20px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.test-submit-btn {
  display: inline-block;
  padding: 14px 48px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.test-submit-btn:hover {
  background: var(--primary-hover);
}

.test-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 결과 모달 */
.test-result-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.test-result-content {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: var(--shadow-lg);
}

.test-result-content .result-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.test-result-content .result-score {
  font-size: 48px;
  font-weight: 800;
}

.test-result-content .result-score.passed {
  color: var(--success);
}

.test-result-content .result-score.failed {
  color: var(--danger);
}

.test-result-content .result-status {
  font-size: 24px;
  font-weight: 700;
  margin-top: 8px;
}

.test-result-content .result-status.passed {
  color: var(--success);
}

.test-result-content .result-status.failed {
  color: var(--danger);
}

.test-result-content .result-detail {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 8px;
}

/* 반응형: 시험 */
@media (max-width: 768px) {
  .test-grid {
    grid-template-columns: 1fr;
  }

  .test-card-icon {
    width: 56px;
    font-size: 24px;
  }

  .test-card-footer {
    min-width: 80px;
    padding: 12px 10px;
  }

  .test-detail-layout {
    flex-direction: column;
  }

  .test-detail-sidebar {
    min-width: 0;
  }

  .test-info-grid {
    grid-template-columns: 1fr;
  }

  .test-take-header {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }

  .test-timer {
    align-self: flex-end;
  }
}