.leon-lms-dashboard {
  --lld-accent: var(--e-global-color-primary, #35bfc5);
  --lld-accent-dark: #199ea5;
  --lld-navy: #263b63;
  --lld-text: #222831;
  --lld-muted: #758093;
  --lld-border: #e6eaf0;
  --lld-soft: #f6f8fa;
  --lld-white: #fff;
  --lld-radius: 18px;
  --lld-shadow: 0 14px 44px rgba(26, 39, 65, .07);
  width: 100%;
  color: var(--lld-text);
  border: 0 !important;
  font: inherit;
  box-sizing: border-box;
}

.leon-lms-dashboard *,
.leon-lms-dashboard *::before,
.leon-lms-dashboard *::after { box-sizing: border-box; }

.leon-lms-dashboard a { text-decoration: none; }

.lld-welcome {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 30px;
}

.lld-welcome h2,
.lld-section-heading h2,
.lld-section-heading h3 {
  margin: 0;
  color: var(--lld-text);
  letter-spacing: -.035em;
  line-height: 1.28;
}

.lld-welcome h2 { font-size: clamp(25px, 2.2vw, 34px); font-weight: 700; }
.lld-welcome > div > p:last-child,
.lld-section-heading > p:last-child { margin: 9px 0 0; color: var(--lld-muted); font-size: 14px; line-height: 1.7; }
.lld-eyebrow { margin: 0 0 8px !important; color: var(--lld-accent-dark) !important; font-size: 11px !important; font-weight: 800; letter-spacing: .14em; }

.lld-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 30px;
  align-items: start;
  width: 100%;
  min-width: 0;
}

.lld-sidebar {
  position: sticky;
  top: 28px;
  overflow: hidden;
  border: 1px solid var(--lld-border);
  border-radius: var(--lld-radius);
  background: var(--lld-white);
  box-shadow: var(--lld-shadow);
}

.lld-profile-card {
  padding: 30px 24px 25px;
  text-align: center;
  border-bottom: 1px solid var(--lld-border);
  background: linear-gradient(180deg, #fbfcfd 0%, #fff 100%);
}

.lld-avatar img,
.lld-profile-summary-avatar img {
  display: block;
  object-fit: cover;
  border-radius: 50%;
  background: #fff;
}

.lld-avatar img {
  width: 88px;
  height: 88px;
  margin: 0 auto 15px;
  border: 4px solid #fff;
  box-shadow: 0 6px 24px rgba(38, 59, 99, .12);
}

.lld-profile-text strong { display: block; margin-bottom: 5px; font-size: 17px; font-weight: 700; }
.lld-profile-text span { display: block; overflow: hidden; color: var(--lld-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.lld-profile-text em { display: inline-flex; margin-top: 12px; padding: 5px 10px; border-radius: 999px; background: rgba(53, 191, 197, .10); color: var(--lld-accent-dark); font-size: 11px; font-style: normal; font-weight: 700; }

.lld-nav { padding: 12px; }
.lld-nav-link {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 45px;
  margin: 2px 0;
  padding: 0 14px;
  border-radius: 11px;
  color: #505b6d;
  font-size: 13px;
  font-weight: 600;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.lld-nav-link:hover { background: var(--lld-soft); color: var(--lld-text); transform: translateX(2px); }
.lld-nav-link.is-active { background: rgba(53, 191, 197, .11); color: var(--lld-accent-dark); font-weight: 700; }
.lld-nav-link.is-active::before { content: ""; position: absolute; left: 4px; width: 3px; height: 18px; border-radius: 4px; background: var(--lld-accent); }
.lld-nav-link.lld-logout { margin-top: 10px; border-top: 1px solid var(--lld-border); border-radius: 0 0 10px 10px; color: #8b94a3; }

.lld-main {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

/* 각 탭에서 콘텐츠 카드 폭이 달라지지 않도록 메인 패널 폭을 통일합니다. */
.lld-main > .lld-panel {
  width: 100%;
  min-width: 0;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.lld-panel {
  overflow: hidden;
  padding: 30px;
  border: 1px solid var(--lld-border);
  border-radius: var(--lld-radius);
  background: var(--lld-white);
  box-shadow: var(--lld-shadow);
}
.lld-section-heading { margin-bottom: 25px; }
.lld-section-heading h3 { font-size: 22px; font-weight: 700; }
.lld-narrow-panel {
  width: 100%;
  max-width: none;
}

.lld-classroom-native,
.lld-native-form,
.lld-avatar-editor,
.lld-woocommerce-orders {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}


.lld-profile-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 28px;
  padding: 18px;
  border: 1px solid var(--lld-border);
  border-radius: 14px;
  background: var(--lld-soft);
}
.lld-profile-summary-avatar img { width: 60px; height: 60px; }
.lld-profile-summary strong,
.lld-profile-summary span,
.lld-profile-summary small { display: block; }
.lld-profile-summary strong { margin-bottom: 3px; font-size: 15px; }
.lld-profile-summary span { color: #596477; font-size: 12px; }
.lld-profile-summary small { margin-top: 5px; color: #98a0ae; font-size: 11px; }

.lld-learning-toolbar { margin: -5px 0 22px; padding-bottom: 18px; border-bottom: 1px solid var(--lld-border); }
.lld-learning-toolbar a { color: #667186; font-size: 13px; font-weight: 600; }
.lld-learning-toolbar a:hover { color: var(--lld-accent-dark); }
.leon-lms-dashboard.is-learning .lld-layout { display: block; }
.leon-lms-dashboard.is-learning .lld-panel { padding: 24px; }

/* Simple LMS - 목록 UI */
.leon-lms-dashboard .lld-classroom-native .cosmosfarm-simple-lms-classroom {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.leon-lms-dashboard .lld-classroom-native .simple-lms-search {
  grid-column: 1 / -1;
  width: 100% !important;
  margin: 0 0 4px !important;
  padding: 13px !important;
  border: 1px solid var(--lld-border) !important;
  border-radius: 13px !important;
  background: var(--lld-soft) !important;
}
.leon-lms-dashboard .lld-classroom-native .simple-lms-search .input-group {
  display: flex !important;
  gap: 8px !important;
  max-width: 520px !important;
  margin: 0 auto !important;
}
.leon-lms-dashboard .lld-classroom-native .simple-lms-search input {
  flex: 1 1 auto !important;
  width: auto !important;
  height: 42px !important;
  padding: 0 14px !important;
  border: 1px solid #dfe4ea !important;
  border-radius: 9px !important;
  outline: none !important;
  background: #fff !important;
  box-shadow: none !important;
  color: var(--lld-text) !important;
  font: inherit !important;
  font-size: 13px !important;
}
.leon-lms-dashboard .lld-classroom-native .simple-lms-search input:focus { border-color: var(--lld-accent) !important; box-shadow: 0 0 0 3px rgba(53, 191, 197, .11) !important; }
.leon-lms-dashboard .lld-classroom-native .simple-lms-button-small {
  flex: 0 0 auto !important;
  min-width: 80px !important;
  height: 42px !important;
  padding: 0 17px !important;
  border: 0 !important;
  border-radius: 9px !important;
  background: var(--lld-navy) !important;
  color: #fff !important;
  font: inherit !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
}

.leon-lms-dashboard .lld-classroom-native .classroom-item {
  position: relative !important;
  float: none !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 0 20px !important;
  overflow: hidden !important;
  border: 1px solid var(--lld-border) !important;
  border-radius: 15px !important;
  background: #fff !important;
  box-shadow: none !important;
  list-style: none !important;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.leon-lms-dashboard .lld-classroom-native .classroom-item:not(.item-no-found):hover { transform: translateY(-2px); border-color: #d7dde6 !important; box-shadow: 0 12px 28px rgba(38, 59, 99, .08) !important; }
.leon-lms-dashboard .lld-classroom-native .classroom-item-thumbnail { width: 100% !important; margin: 0 0 17px !important; overflow: hidden !important; background: #eef1f5 !important; }
.leon-lms-dashboard .lld-classroom-native .classroom-item-thumbnail a { display: block !important; }
.leon-lms-dashboard .lld-classroom-native .classroom-item-thumbnail img { display: block !important; width: 100% !important; height: auto !important; aspect-ratio: 16 / 9; object-fit: cover !important; transition: transform .35s ease; }
.leon-lms-dashboard .lld-classroom-native .classroom-item:hover .classroom-item-thumbnail img { transform: scale(1.02); }
.leon-lms-dashboard .lld-classroom-native .classroom-item-title { margin: 0 !important; padding: 0 18px !important; font-size: 16px !important; font-weight: 700 !important; line-height: 1.45 !important; }
.leon-lms-dashboard .lld-classroom-native .classroom-item-title a { color: var(--lld-text) !important; }
.leon-lms-dashboard .lld-classroom-native .classroom-item-success-percent { margin: 12px 0 0 !important; padding: 0 18px !important; color: var(--lld-muted) !important; font-size: 11px !important; line-height: 1.7 !important; }
.leon-lms-dashboard .lld-classroom-native .classroom-progress { height: 5px !important; margin-top: 12px !important; overflow: hidden !important; border-radius: 999px !important; background: #edf0f3 !important; }
.leon-lms-dashboard .lld-classroom-native .classroom-progress-bar { height: 100% !important; border-radius: 999px !important; background: var(--lld-accent) !important; }
.leon-lms-dashboard .lld-classroom-native .classroom-item-certificate-print { padding: 13px 18px 0 !important; }
.leon-lms-dashboard .lld-classroom-native .classroom-item-certificate-print button { min-height: 38px !important; padding: 0 14px !important; border: 1px solid var(--lld-border) !important; border-radius: 8px !important; background: #fff !important; color: #4f596a !important; font-size: 11px !important; }

.leon-lms-dashboard .lld-classroom-native .item-no-found {
  grid-column: 1 / -1;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 190px !important;
  padding: 30px !important;
  border-style: dashed !important;
  background: #fafbfc !important;
  text-align: center !important;
}
.leon-lms-dashboard .lld-classroom-native .no-found-message { color: #717b8b !important; font-size: 14px !important; line-height: 1.8 !important; }
.leon-lms-dashboard .lld-classroom-native .classroom-btn-wrap { grid-column: 1 / -1; display: flex !important; flex-wrap: wrap !important; justify-content: center !important; gap: 6px !important; margin: 8px 0 0 !important; }
.leon-lms-dashboard .lld-classroom-native .classroom-page-btn { min-width: 36px !important; height: 36px !important; padding: 0 10px !important; border: 1px solid var(--lld-border) !important; border-radius: 8px !important; background: #fff !important; color: #596477 !important; box-shadow: none !important; }
.lld-bottom-action { display: flex; justify-content: center; margin-top: 22px; }
.lld-bottom-action a { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 19px; border: 1px solid var(--lld-border); border-radius: 10px; color: #596477; font-size: 12px; font-weight: 700; }
.lld-bottom-action a:hover { border-color: var(--lld-accent); color: var(--lld-accent-dark); }

/* WP-Members / Cosmosfarm Members forms */
.leon-lms-dashboard .lld-native-form form,
.leon-lms-dashboard .lld-native-form fieldset { max-width: 100% !important; }
.leon-lms-dashboard .lld-native-form legend,
.leon-lms-dashboard .lld-native-form .div_text,
.leon-lms-dashboard .lld-native-form .req-text { color: var(--lld-muted) !important; }
.leon-lms-dashboard .lld-native-form label { color: #4f5968 !important; font-size: 12px !important; font-weight: 600 !important; }
.leon-lms-dashboard .lld-native-form input[type="text"],
.leon-lms-dashboard .lld-native-form input[type="email"],
.leon-lms-dashboard .lld-native-form input[type="password"],
.leon-lms-dashboard .lld-native-form input[type="tel"],
.leon-lms-dashboard .lld-native-form input[type="url"],
.leon-lms-dashboard .lld-native-form input[type="number"],
.leon-lms-dashboard .lld-native-form input[type="date"],
.leon-lms-dashboard .lld-native-form select,
.leon-lms-dashboard .lld-native-form textarea {
  width: 100% !important;
  min-height: 45px !important;
  padding: 10px 13px !important;
  border: 1px solid #dfe4ea !important;
  border-radius: 9px !important;
  outline: none !important;
  background: #fff !important;
  box-shadow: none !important;
  color: var(--lld-text) !important;
  font: inherit !important;
  font-size: 13px !important;
}
.leon-lms-dashboard .lld-native-form textarea { min-height: 110px !important; resize: vertical; }
.leon-lms-dashboard .lld-native-form input:focus,
.leon-lms-dashboard .lld-native-form select:focus,
.leon-lms-dashboard .lld-native-form textarea:focus { border-color: var(--lld-accent) !important; box-shadow: 0 0 0 3px rgba(53, 191, 197, .10) !important; }
.leon-lms-dashboard .lld-native-form input[type="submit"],
.leon-lms-dashboard .lld-native-form button[type="submit"],
.leon-lms-dashboard .lld-native-form .buttons,
.leon-lms-dashboard .lld-native-form .button {
  min-height: 43px !important;
  padding: 0 20px !important;
  border: 0 !important;
  border-radius: 9px !important;
  background: var(--lld-navy) !important;
  color: #fff !important;
  box-shadow: none !important;
  font: inherit !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
}
.leon-lms-dashboard .lld-native-form .form { width: 100% !important; }
.leon-lms-dashboard .lld-native-form .div_text,
.leon-lms-dashboard .lld-native-form .div_checkbox,
.leon-lms-dashboard .lld-native-form .div_multicheckbox,
.leon-lms-dashboard .lld-native-form .div_radio,
.leon-lms-dashboard .lld-native-form .div_select,
.leon-lms-dashboard .lld-native-form .div_file { margin-bottom: 14px !important; }
.leon-lms-dashboard .lld-native-form .wpmem_msg,
.leon-lms-dashboard .lld-native-form .wpmem_msg.success,
.leon-lms-dashboard .lld-native-form .wpmem_msg.error {
  margin: 0 0 18px !important;
  padding: 13px 15px !important;
  border: 1px solid var(--lld-border) !important;
  border-radius: 10px !important;
  background: var(--lld-soft) !important;
  color: #576172 !important;
  font-size: 12px !important;
}

/* WooCommerce 주문내역 */
.leon-lms-dashboard .lld-woocommerce-orders .woocommerce-MyAccount-navigation { display: none !important; }
.leon-lms-dashboard .lld-woocommerce-orders .woocommerce-MyAccount-content { float: none !important; width: 100% !important; }
.leon-lms-dashboard .lld-woocommerce-orders table { width: 100% !important; border: 0 !important; border-collapse: collapse !important; }
.leon-lms-dashboard .lld-woocommerce-orders th { padding: 12px 10px !important; border-bottom: 1px solid var(--lld-border) !important; color: #778193 !important; background: var(--lld-soft) !important; font-size: 11px !important; font-weight: 700 !important; text-align: left !important; }
.leon-lms-dashboard .lld-woocommerce-orders td { padding: 15px 10px !important; border: 0 !important; border-bottom: 1px solid #eef1f4 !important; color: #4e5869 !important; font-size: 12px !important; }
.leon-lms-dashboard .lld-woocommerce-orders .button { padding: 8px 12px !important; border-radius: 7px !important; background: var(--lld-navy) !important; color: #fff !important; font-size: 11px !important; font-weight: 700 !important; }

.lld-notice { padding: 18px; border: 1px solid #f1d7a5; border-radius: 12px; background: #fffaf0; color: #7c6641; font-size: 13px; }
.lld-login-panel { max-width: 620px; margin: 0 auto; }

/* 학습 상세는 기존 LMS 구조/기능을 우선하며 외곽만 정리 */
.leon-lms-dashboard.is-learning .lld-classroom-native .cosmosfarm-simple-lms-classroom { display: block !important; }

@media (max-width: 1024px) {
  .lld-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 20px; }
  .lld-panel { padding: 24px; }
  .leon-lms-dashboard .lld-classroom-native .cosmosfarm-simple-lms-classroom { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  .lld-welcome { margin-bottom: 20px; }
  .lld-welcome h2 { font-size: 24px; }
  .lld-welcome > div > p:last-child { font-size: 12px; }
  .lld-layout { display: block; }
  .lld-sidebar { position: static; margin-bottom: 18px; border-radius: 14px; }
  .lld-profile-card { display: flex; align-items: center; gap: 13px; padding: 17px; text-align: left; }
  .lld-avatar img { width: 56px; height: 56px; margin: 0; border-width: 3px; }
  .lld-profile-text { min-width: 0; }
  .lld-profile-text strong { font-size: 15px; }
  .lld-profile-text em { margin-top: 7px; padding: 3px 8px; font-size: 9px; }
  .lld-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 10px; border-top: 1px solid var(--lld-border); }
  .lld-nav-link { min-height: 41px; margin: 0; justify-content: center; padding: 0 8px; background: #fafbfc; font-size: 11px; text-align: center; }
  .lld-nav-link:hover { transform: none; }
  .lld-nav-link.is-active::before { left: 50%; top: 0; width: 18px; height: 2px; transform: translateX(-50%); }
  .lld-nav-link.lld-logout { margin: 0; border-top: 0; border-radius: 10px; }
  .lld-panel { padding: 19px 16px; border-radius: 14px; box-shadow: 0 8px 28px rgba(26,39,65,.05); }
  .lld-section-heading { margin-bottom: 19px; }
  .lld-section-heading h3 { font-size: 19px; }
  .lld-profile-summary { padding: 14px; }
  .leon-lms-dashboard .lld-classroom-native .simple-lms-search { padding: 10px !important; }
  .leon-lms-dashboard .lld-classroom-native .simple-lms-search .input-group { display: grid !important; grid-template-columns: minmax(0, 1fr) 70px !important; }
  .leon-lms-dashboard .lld-classroom-native .simple-lms-search input,
  .leon-lms-dashboard .lld-classroom-native .simple-lms-button-small { height: 40px !important; min-width: 0 !important; }
  .leon-lms-dashboard .lld-woocommerce-orders table,
  .leon-lms-dashboard .lld-woocommerce-orders tbody,
  .leon-lms-dashboard .lld-woocommerce-orders tr,
  .leon-lms-dashboard .lld-woocommerce-orders td { display: block !important; width: 100% !important; }
  .leon-lms-dashboard .lld-woocommerce-orders thead { display: none !important; }
  .leon-lms-dashboard .lld-woocommerce-orders tr { margin-bottom: 10px !important; padding: 10px 12px !important; border: 1px solid var(--lld-border) !important; border-radius: 10px !important; }
  .leon-lms-dashboard .lld-woocommerce-orders td { padding: 7px 0 !important; border-bottom: 1px dashed #edf0f3 !important; }
  .leon-lms-dashboard .lld-woocommerce-orders td:last-child { border-bottom: 0 !important; }
}

/* Cosmosfarm Members의 기존 아바타 변경 UI만 재사용 */
.leon-lms-dashboard .lld-avatar-editor { margin: 0 0 28px; }
.leon-lms-dashboard .lld-avatar-editor .members-link { display: none !important; }
.leon-lms-dashboard .lld-avatar-editor .wpmem_msg { display: none !important; }
.leon-lms-dashboard .lld-avatar-editor .cosmosfarm-members-form { margin: 0 !important; padding: 0 !important; }
.leon-lms-dashboard .lld-avatar-editor .profile-header {
  margin: 0 !important;
  padding: 18px !important;
  border: 1px solid var(--lld-border) !important;
  border-radius: 14px !important;
  background: var(--lld-soft) !important;
  text-align: left !important;
}
.leon-lms-dashboard .lld-avatar-editor .profile-header form { display: flex !important; align-items: center !important; gap: 16px !important; margin: 0 !important; }
.leon-lms-dashboard .lld-avatar-editor .avatar-img { flex: 0 0 auto !important; margin: 0 !important; }
.leon-lms-dashboard .lld-avatar-editor .avatar-img label { position: relative !important; display: block !important; cursor: pointer !important; }
.leon-lms-dashboard .lld-avatar-editor .avatar-img img { display: block !important; width: 62px !important; height: 62px !important; object-fit: cover !important; border: 3px solid #fff !important; border-radius: 50% !important; box-shadow: 0 5px 18px rgba(38,59,99,.10) !important; }
.leon-lms-dashboard .lld-avatar-editor .avatar-img input[type="file"] { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; }
.leon-lms-dashboard .lld-avatar-editor .change-avatar-message { margin: 5px 0 0 !important; color: var(--lld-accent-dark) !important; font-size: 10px !important; font-weight: 700 !important; text-align: center !important; }
.leon-lms-dashboard .lld-avatar-editor .display-name { margin: 0 !important; color: var(--lld-text) !important; font-size: 15px !important; font-weight: 700 !important; }

