:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --bg-soft: #e8f4fb;
  --panel: rgba(255, 255, 255, 0.96);
  --panel-solid: #ffffff;
  --primary: #1677b7;
  --primary-dark: #00477c;
  --primary-soft: #e8f5ff;
  --accent: #0b5f91;
  --accent-soft: #e9f7ff;
  --text: #172033;
  --muted: #667085;
  --border: #dce5f4;
  --success: #0f9f6e;
  --warning: #b7791f;
  --danger: #c2410c;
  --shadow-sm: 0 10px 28px rgba(20, 32, 54, 0.08);
  --shadow-md: 0 20px 50px rgba(36, 84, 214, 0.14);
  --radius-lg: 1.35rem;
  --radius-md: 0.95rem;
  --focus-ring: 0 0 0 4px rgba(36, 84, 214, 0.16);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 12% 12%, rgba(22, 119, 183, 0.08), transparent 18rem),
    radial-gradient(circle at 82% 16%, rgba(7, 93, 145, 0.06), transparent 18rem),
    linear-gradient(135deg, #f7fbfd 0%, #eef6fa 48%, #f7f9fb 100%);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(30deg, transparent 0 47%, rgba(22, 119, 183, 0.07) 48% 49%, transparent 50% 100%),
    linear-gradient(150deg, transparent 0 47%, rgba(7, 93, 145, 0.055) 48% 49%, transparent 50% 100%),
    linear-gradient(90deg, transparent 0 47%, rgba(16, 24, 40, 0.035) 48% 49%, transparent 50% 100%);
  background-size: 220px 130px, 220px 130px, 140px 180px;
  opacity: 0.9;
  mask-image: linear-gradient(to bottom, #000 0%, #000 72%, transparent 100%);
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

h1 {
  max-width: 880px;
  font-size: clamp(2.35rem, 7vw, 5.25rem);
  font-weight: 900;
}

h2 {
  font-size: clamp(1.28rem, 2vw, 1.9rem);
  font-weight: 850;
}

h3 {
  margin-bottom: 0.7rem;
  font-size: 1.02rem;
  font-weight: 850;
}

p {
  margin: 0;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
select {
  -webkit-tap-highlight-color: transparent;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: none;
  min-height: min(720px, 74vh);
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 3.5rem) clamp(1rem, 5vw, 5rem) clamp(1rem, 3vw, 2rem);
}

.hero--login {
  min-height: 100vh;
}

.eyebrow {
  margin: 0 0 0.45rem;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero__copy,
.section-heading p {
  max-width: 920px;
  margin-top: 0.75rem;
  color: var(--muted);
}

.hero__copy {
  font-size: clamp(0.96rem, 1.1vw, 1.08rem);
}

.hero-card {
  width: min(100%, 1100px);
  padding: clamp(1.4rem, 4vw, 3.1rem) clamp(1.2rem, 4.5vw, 4rem) clamp(1.2rem, 3.5vw, 2.3rem);
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 1.15rem;
  box-shadow: 0 34px 80px rgba(0, 29, 54, 0.18);
}

.hero-card--login {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  width: min(100%, 1180px);
  background: rgba(255, 255, 255, 0.74);
  border-color: rgba(255, 255, 255, 0.88);
  box-shadow: 0 30px 80px rgba(18, 43, 68, 0.12);
}

.hero-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(2.1rem, 5vw, 4.7rem);
}

.service-title {
  color: #111827;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  font-weight: 950;
  letter-spacing: -0.05em;
}

.service-badge {
  padding: 0.48rem 0.86rem;
  color: #075d91;
  background: #eef8fd;
  border: 1px solid #d4edf8;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 850;
}

.hero-card__body {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
}

.brand-block {
  display: grid;
  justify-items: center;
  text-align: center;
}

.brand-block__sub {
  color: #2b83bd;
  font-size: clamp(0.9rem, 1.4vw, 1.15rem);
  font-weight: 850;
  letter-spacing: 0.48em;
  text-indent: 0.48em;
}

.brand-block__title {
  color: #126fe8;
  font-size: clamp(3.4rem, 8vw, 6.7rem);
  font-weight: 950;
  line-height: 0.95;
  letter-spacing: -0.09em;
  text-shadow: 0 4px 0 rgba(0, 50, 130, 0.06);
}

.brand-block__title--developer {
  max-width: 18rem;
  color: #075d91;
  font-size: clamp(1.45rem, 3.4vw, 2.65rem);
  line-height: 1.18;
  letter-spacing: -0.06em;
  word-break: keep-all;
}

.brand-block__copy {
  margin-top: 0.8rem;
  color: #2b4054;
  font-size: clamp(0.78rem, 1.1vw, 0.95rem);
  font-weight: 800;
}

.hero-panel {
  display: grid;
  gap: 0.85rem;
  padding-left: clamp(1.2rem, 3vw, 2.4rem);
  border-left: 1px solid #d5dce6;
}

.hero-panel--intro {
  max-width: 820px;
  padding-left: 0;
  border-left: 0;
}

.hero-panel h1 {
  max-width: 560px;
  color: #111827;
  font-size: clamp(1.75rem, 3.5vw, 3.1rem);
}

.hero-panel--intro h1 {
  max-width: 820px;
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 950;
  letter-spacing: -0.05em;
  white-space: nowrap;
}

.hero-panel--intro .hero__copy {
  max-width: 780px;
  color: #667085;
  font-size: clamp(1.02rem, 1.7vw, 1.45rem);
  line-height: 1.85;
}

.login-card {
  display: grid;
  gap: 1.35rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(220, 229, 244, 0.96);
  border-radius: 1.2rem;
  box-shadow: 0 22px 46px rgba(16, 24, 40, 0.12);
}

.login-card__heading {
  display: grid;
  gap: 0.35rem;
}

.login-card__heading p:not(.eyebrow),
.login-card__notice {
  color: var(--muted);
  font-size: 0.92rem;
}

.login-form {
  display: grid;
  gap: 0.9rem;
}

.login-form button {
  width: 100%;
  min-height: 3.2rem;
  margin-top: 0.35rem;
}

.login-error {
  margin: 0;
  padding: 0.75rem 0.85rem;
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 0.8rem;
  font-size: 0.88rem;
  font-weight: 800;
}

.login-card__notice {
  padding-top: 0.85rem;
  border-top: 1px solid rgba(220, 229, 244, 0.9);
  font-weight: 800;
  text-align: center;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.55rem;
}

.hero-actions span {
  padding: 0.52rem 0.8rem;
  color: #075d91;
  background: #f1f9fd;
  border: 1px solid #d7edf7;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 850;
}

.hero-card__footer {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-top: clamp(2rem, 5vw, 4.2rem);
  padding: 0.95rem 1rem;
  color: #31556d;
  background: #f5f7f9;
  border-top: 1px solid #b9c3ce;
  font-size: 0.92rem;
}

.hero-card__footer a {
  flex: 0 0 auto;
  color: #9d174d;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.muted {
  color: var(--muted);
  font-size: 0.88rem;
}

.score-card {
  position: relative;
  display: grid;
  gap: 0.55rem;
  padding: clamp(1rem, 2.5vw, 1.35rem);
  overflow: hidden;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 255, 0.94));
  border: 1px solid rgba(220, 229, 244, 0.95);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.score-card::after {
  position: absolute;
  right: -3rem;
  bottom: -3rem;
  width: 8rem;
  height: 8rem;
  content: "";
  background: radial-gradient(circle, rgba(255, 181, 71, 0.55), transparent 68%);
}

.score-card strong {
  position: relative;
  z-index: 1;
  font-size: 1.05rem;
}

.score-card span {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 2.2rem;
  padding: 0.5rem 0.72rem;
  color: #344054;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(220, 229, 244, 0.82);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 750;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(250px, 300px) minmax(0, 1fr);
  gap: clamp(1rem, 2.5vw, 1.6rem);
  align-items: start;
  max-width: 1680px;
  margin: 0 auto;
  padding: clamp(1.2rem, 3vw, 2.25rem) clamp(1rem, 5vw, 5rem) clamp(3rem, 6vw, 5rem);
}

.topbar {
  display: flex;
  grid-column: 1 / -1;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.top-user-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 0.92rem;
}

.top-user-info strong {
  color: var(--text);
  font-size: 1.02rem;
}

.top-user-info span {
  padding: 0.35rem 0.65rem;
  background: rgba(241, 249, 253, 0.9);
  border: 1px solid rgba(215, 237, 247, 0.95);
  border-radius: 999px;
}

.sidebar-collapsed .sidebar {
  display: none;
}

.sidebar-collapsed .content-stack {
  grid-column: 1 / -1;
}

.content-stack {
  display: grid;
  min-width: 0;
  gap: clamp(1rem, 2.5vw, 1.6rem);
}

.panel {
  background: var(--panel);
  border: 1px solid rgba(220, 229, 244, 0.92);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
  padding: clamp(1rem, 2.6vw, 2rem);
}

.sidebar {
  position: sticky;
  top: 1rem;
  display: grid;
  gap: 1rem;
}

.sidebar h2 {
  margin-top: 0.35rem;
  font-size: 1.04rem;
}

.wide {
  min-width: 0;
  overflow: hidden;
}

.section-heading {
  margin-bottom: 1.25rem;
}

.section-heading.row {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.grid-form,
.stack-form {
  display: grid;
  gap: 0.95rem;
}

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

.grid-form.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
}

.split-grid,
.portal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
}

.portal-grid {
  margin-top: 1.35rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.85rem;
}

.stat-card,
.mvp-list-card {
  padding: 1rem;
  background: rgba(248, 250, 255, 0.74);
  border: 1px solid rgba(220, 229, 244, 0.86);
  border-radius: var(--radius-md);
}

.stat-card {
  display: grid;
  gap: 0.35rem;
}

.stat-card span,
.stat-card small {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.stat-card strong {
  color: var(--primary-dark);
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  line-height: 1;
}

.mvp-list-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.mvp-list-card {
  display: grid;
  gap: 0.75rem;
  min-width: 0;
}

.mvp-list-card h3 {
  margin: 0;
}

.compact-table table {
  min-width: 520px;
}

.compact-table th,
.compact-table td {
  padding: 0.72rem 0.8rem;
  font-size: 0.88rem;
}

.stack-form {
  align-content: start;
  padding: clamp(0.9rem, 2vw, 1.2rem);
  background: rgba(248, 250, 255, 0.72);
  border: 1px solid rgba(220, 229, 244, 0.86);
  border-radius: var(--radius-md);
}

label {
  display: grid;
  gap: 0.42rem;
  color: #344054;
  font-size: 0.94rem;
  font-weight: 800;
}

input,
textarea,
select {
  width: 100%;
  min-height: 3rem;
  padding: 0.86rem 0.96rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--border);
  border-radius: 0.88rem;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

select {
  cursor: pointer;
}

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

input::placeholder,
textarea::placeholder {
  color: #98a2b3;
}

input:focus,
textarea:focus,
select:focus {
  background: #fff;
  border-color: rgba(36, 84, 214, 0.78);
  box-shadow: var(--focus-ring);
}

button {
  min-height: 3rem;
  padding: 0.9rem 1.1rem;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary), #3d72ff);
  border: 0;
  border-radius: 0.9rem;
  box-shadow: 0 10px 22px rgba(36, 84, 214, 0.18);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

button:hover:not(:disabled) {
  filter: brightness(0.96);
  box-shadow: 0 14px 28px rgba(36, 84, 214, 0.22);
  transform: translateY(-1px);
}

button:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring), 0 14px 28px rgba(36, 84, 214, 0.22);
}

button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.6);
  opacity: 0.48;
  transform: none;
}

button[type="submit"] {
  align-self: end;
}

.secondary {
  color: var(--primary-dark);
  background: linear-gradient(135deg, #f8fbff, var(--primary-soft));
  border: 1px solid #cfdbff;
  box-shadow: none;
}

.danger-button {
  color: #fff;
  background: linear-gradient(135deg, #dc2626, var(--danger));
  box-shadow: 0 10px 22px rgba(194, 65, 12, 0.18);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.row-actions button {
  min-height: 2.45rem;
  padding: 0.62rem 0.78rem;
  font-size: 0.86rem;
}

.organization-form {
  margin-bottom: 1.2rem;
}

.permission-summary {
  display: grid;
  gap: 0.32rem;
  padding: 0.95rem;
  background: linear-gradient(160deg, #f8faff, #ffffff);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.permission-summary strong {
  font-size: 1.08rem;
}

.role-menu,
.access-matrix {
  display: grid;
  gap: 0.48rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.role-menu li,
.access-matrix li {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  min-height: 2.7rem;
  padding: 0.66rem 0.78rem;
  color: #344054;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  border-radius: 0.82rem;
}

.role-menu li {
  justify-content: flex-start;
  padding: 0;
  overflow: hidden;
}

.menu-category {
  padding: 0.9rem 0.78rem 0.2rem;
  min-height: unset;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 0;
  pointer-events: none;
  user-select: none;
  margin-top: 0.25rem;
}

.menu-category:first-child {
  margin-top: 0;
  padding-top: 0.2rem;
}

.menu-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 2.7rem;
  padding: 0.66rem 0.78rem;
  color: #344054;
  background: transparent;
  border: 0;
  border-radius: 0.82rem;
  box-shadow: none;
  font-weight: 850;
  text-align: left;
}

.menu-link:hover,
.menu-link:focus-visible {
  color: var(--primary-dark);
  background: var(--primary-soft);
  transform: none;
  box-shadow: none;
}

.menu-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.member-form {
  margin-bottom: 1.2rem;
}

.member-table-wrap table {
  min-width: 780px;
}

.card-list {
  display: grid;
  gap: 0.75rem;
}

.mini-card,
.placement-card {
  display: grid;
  gap: 0.42rem;
  padding: 1rem;
  background: var(--panel-solid);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: 0 8px 20px rgba(20, 32, 54, 0.045);
}

.mini-card strong,
.placement-card strong {
  font-size: 1rem;
}

.mini-card span,
.placement-card div {
  color: var(--primary-dark);
  font-size: 0.87rem;
  font-weight: 750;
}

.mini-card p {
  color: var(--muted);
}


.link-button {
  display: inline;
  min-height: auto;
  padding: 0;
  color: var(--primary-dark);
  background: transparent;
  border: 0;
  box-shadow: none;
  font-weight: 900;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.link-button:hover {
  transform: none;
  box-shadow: none;
}

.detail-panel {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  background: var(--primary-soft);
  border: 1px solid #cfe7ff;
  border-radius: 1rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}

.detail-grid > div {
  display: grid;
  gap: 0.3rem;
  padding: 0.85rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
}

.detail-grid strong {
  color: var(--primary-dark);
  font-size: 0.84rem;
}

.detail-grid span {
  color: var(--text);
  font-weight: 700;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.tab {
  min-height: 2.7rem;
  padding: 0.66rem 0.95rem;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: none;
}

.tab.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #3d72ff);
  border-color: transparent;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  min-width: 1380px;
  background: #fff;
  border-collapse: collapse;
}

.matching-table {
  min-width: 1840px;
}

.career-table {
  min-width: 1180px;
}

th,
td {
  padding: 0.86rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #344054;
  font-size: 0.84rem;
  font-weight: 900;
  white-space: nowrap;
  background: #f7faff;
}

tbody tr:hover {
  background: #fcfdff;
}

.score {
  color: var(--primary-dark);
  font-weight: 950;
}

.reason {
  min-width: 300px;
  color: #475467;
}

.warning-cell {
  min-width: 220px;
  color: var(--danger);
  font-weight: 800;
}

.placement-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.placement-actions button {
  min-height: 2.35rem;
  padding: 0.58rem 0.75rem;
  font-size: 0.82rem;
  white-space: nowrap;
}

.grade-best,
.grade-good,
.grade-conditional,
.grade-review,
.grade-no {
  font-weight: 950;
}

.grade-best {
  color: var(--success);
}

.grade-good {
  color: var(--primary);
}

.grade-conditional {
  color: var(--warning);
}

.grade-review,
.grade-no {
  color: var(--danger);
}

.placements {
  display: grid;
  gap: 0.75rem;
}

.empty,
.notice {
  color: var(--muted);
}

.notice {
  padding: 1rem;
  text-align: center;
}

@media (min-width: 1280px) {
  .content-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-stack > .wide,
  .content-stack > :first-child,
  .content-stack > :last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar > .eyebrow,
  .sidebar > label,
  .sidebar > .permission-summary {
    grid-column: 1 / -1;
  }

  .grid-form.compact,
  .stat-grid,
  .mvp-list-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-grid,
  .split-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .hero {
    min-height: auto;
  }

  .hero-card__body {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .brand-block {
    justify-items: start;
    text-align: left;
  }

  .brand-block__sub {
    text-indent: 0;
  }

  .hero-card--login {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    padding-top: 1.5rem;
    padding-left: 0;
    border-top: 1px solid #d5dce6;
    border-left: 0;
  }

  .hero-panel--intro {
    padding-top: 0;
    border-top: 0;
  }

  .section-heading.row {
    align-items: stretch;
    flex-direction: column;
  }

  .section-heading.row button {
    width: 100%;
  }

  .grid-form,
  .grid-form.compact,
  .sidebar,
  .stat-grid,
  .mvp-list-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .top-user-info {
    justify-content: flex-start;
  }

  .tabs {
    flex-wrap: nowrap;
    padding-bottom: 0.2rem;
    overflow-x: auto;
  }

  .tab {
    flex: 0 0 auto;
    max-width: 85vw;
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  body {
    background:
      radial-gradient(circle at 18% 8%, rgba(22, 119, 183, 0.08), transparent 14rem),
      linear-gradient(180deg, #f7fbfd 0%, #eef6fa 52%, #f7f9fb 100%);
  }

  .hero,
  .app-shell {
    padding-right: max(0.85rem, env(safe-area-inset-right));
    padding-left: max(0.85rem, env(safe-area-inset-left));
  }

  .hero {
    padding-top: 1rem;
  }

  .hero-card {
    border-radius: 0.95rem;
    box-shadow: 0 24px 56px rgba(18, 43, 68, 0.12);
  }

  .hero-card__top,
  .hero-card__footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-card__top {
    margin-bottom: 2rem;
  }

  .service-badge {
    align-self: flex-start;
  }

  .hero-card__footer {
    gap: 0.5rem;
    margin-top: 2rem;
  }

  .hero-actions {
    display: grid;
  }

  .panel {
    border-radius: 1.1rem;
  }

  button,
  input,
  textarea,
  select {
    min-height: 3.15rem;
  }

  button[type="submit"] {
    width: 100%;
  }

  .role-menu,
  .access-matrix {
    gap: 0.42rem;
  }

  .role-menu li,
  .access-matrix li {
    align-items: flex-start;
    flex-direction: column;
  }

  .table-wrap {
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  table,
  .career-table,
  .matching-table {
    min-width: 0;
    background: transparent;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  tbody {
    display: grid;
    gap: 0.9rem;
  }

  tr {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: 0 8px 20px rgba(20, 32, 54, 0.055);
  }

  tbody tr:hover {
    background: #fff;
  }

  td {
    display: grid;
    grid-template-columns: minmax(7.5rem, 38%) minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
    padding: 0.78rem 0.9rem;
    border-bottom: 1px solid rgba(220, 229, 244, 0.76);
  }

  td:last-child {
    border-bottom: 0;
  }

  td::before {
    color: #667085;
    font-size: 0.8rem;
    font-weight: 900;
  }

  .notice {
    display: block;
  }

  .notice::before {
    content: none;
  }

  .reason {
    min-width: 0;
  }

  .matching-table td:nth-child(1)::before { content: "순위"; }
  .matching-table td:nth-child(2)::before { content: "강사명"; }
  .matching-table td:nth-child(3)::before { content: "총점"; }
  .matching-table td:nth-child(4)::before { content: "교육 대상"; }
  .matching-table td:nth-child(5)::before { content: "프로그램"; }
  .matching-table td:nth-child(6)::before { content: "전문 분야"; }
  .matching-table td:nth-child(7)::before { content: "핵심 역량"; }
  .matching-table td:nth-child(8)::before { content: "기술/도구"; }
  .matching-table td:nth-child(9)::before { content: "강사 유형"; }
  .matching-table td:nth-child(10)::before { content: "학생 수준"; }
  .matching-table td:nth-child(11)::before { content: "추천 결과"; }
  .matching-table td:nth-child(12)::before { content: "추천 사유"; }
  .matching-table td:nth-child(13)::before { content: "경력 요약"; }
  .matching-table td:nth-child(14)::before { content: "배치"; }

  .career-table td:nth-child(1)::before { content: "강사명"; }
  .career-table td:nth-child(2)::before { content: "소속 여부"; }
  .career-table td:nth-child(3)::before { content: "소속 기관"; }
  .career-table td:nth-child(4)::before { content: "전문 분야"; }
  .career-table td:nth-child(5)::before { content: "프로그램 경력"; }
  .career-table td:nth-child(6)::before { content: "대상 학년"; }
  .career-table td:nth-child(7)::before { content: "SW/교구"; }
  .career-table td:nth-child(8)::before { content: "총 차시"; }
  .career-table td:nth-child(9)::before { content: "증빙자료"; }
  .career-table td:nth-child(10)::before { content: "승인 상태"; }
  .career-table td:nth-child(11)::before { content: "최근 수정"; }
}

@media (max-width: 420px) {
  h1 {
    font-size: 2.15rem;
  }

  .brand-block__title {
    font-size: 3.2rem;
  }

  .brand-block__title--developer {
    max-width: 14rem;
    font-size: 1.45rem;
    letter-spacing: -0.05em;
  }

  .brand-block__sub {
    letter-spacing: 0.32em;
  }

  .panel,
  .hero-card,
  .stack-form,
  .mini-card,
  .placement-card {
    padding: 0.9rem;
  }

  td {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  td::before {
    font-size: 0.76rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

.submission-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
}

.mobile-submit-form,
.submission-review-panel {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  background: rgba(248, 250, 255, 0.78);
  border: 1px solid var(--border);
  border-radius: 1rem;
}

.mobile-submit-form {
  position: sticky;
  top: 1rem;
}

.mobile-submit-form h3 {
  margin: 0;
}

.submission-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto auto;
  gap: 0.75rem;
  align-items: end;
}

.submission-summary,
.submission-group-summary {
  display: grid;
  gap: 0.75rem;
}

.submission-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
}

.submission-stat,
.submission-group-summary article {
  display: grid;
  gap: 0.22rem;
  padding: 0.8rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
}

.submission-stat span,
.submission-group-summary span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.submission-stat strong {
  color: var(--primary-dark);
  font-size: 1.45rem;
  line-height: 1;
}

.submission-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.75rem;
}

.submission-card {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: 0 8px 20px rgba(20, 32, 54, 0.045);
}

.submission-card__head {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  justify-content: space-between;
}

.submission-card__head > div {
  display: grid;
  gap: 0.18rem;
}

.submission-card__head span:not(.status-badge) {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.status-badge {
  flex: 0 0 auto;
  padding: 0.38rem 0.62rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 950;
  white-space: nowrap;
}

.status-approved {
  color: #067647;
  background: #ecfdf3;
  border-color: #abefc6;
}

.status-submitted {
  color: #075d91;
  background: #e9f7ff;
  border-color: #b9e6fe;
}

.status-rejected {
  color: #b42318;
  background: #fef3f2;
  border-color: #fecdca;
}

.status-supplement {
  color: #b54708;
  background: #fffaeb;
  border-color: #fedf89;
}

.status-missing {
  color: #475467;
  background: #f2f4f7;
  border-color: #e4e7ec;
}

.submission-meta {
  display: grid;
  gap: 0.45rem;
  margin: 0;
}

.submission-meta div {
  display: grid;
  grid-template-columns: 5.6rem minmax(0, 1fr);
  gap: 0.55rem;
}

.submission-meta dt {
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 900;
}

.submission-meta dd {
  margin: 0;
  color: #344054;
  font-weight: 700;
}

.review-note {
  display: grid;
  gap: 0.24rem;
  padding: 0.72rem;
  color: #7a2e0e;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 0.85rem;
}

.review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.review-actions button {
  min-height: 2.35rem;
  padding: 0.58rem 0.75rem;
  font-size: 0.82rem;
}

.danger-button {
  background: linear-gradient(135deg, #d92d20, #b42318);
}

.settlement-layout {
  grid-template-columns: minmax(280px, 0.62fr) minmax(0, 1.38fr);
}

.settlement-toolbar {
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto auto;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-top: 0.2rem;
}

.report-table {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
  padding: 0.9rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
  border-radius: 1rem;
}

.report-table h3 {
  margin: 0;
}

.settlement-detail-grid {
  margin-top: 1rem;
}

.compact-table {
  margin-top: 0.65rem;
}

.performance-table td,
.performance-table th {
  vertical-align: top;
}

.performance-table td:nth-child(6),
.performance-table td:nth-child(7),
.performance-table td:nth-child(8),
.performance-table td:nth-child(9) {
  min-width: 12rem;
  white-space: normal;
}

.performance-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 0.75rem;
}

@media (max-width: 1180px) {
  .submission-layout,
  .submission-toolbar,
  .settlement-toolbar {
    grid-template-columns: 1fr;
  }

  .mobile-submit-form {
    position: static;
  }

  .submission-stats,
  .performance-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .download-actions {
    justify-content: stretch;
  }

  .download-actions button {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .submission-card-grid {
    grid-template-columns: 1fr;
  }

  .submission-card,
  .mobile-submit-form,
  .submission-review-panel {
    padding: 0.9rem;
  }

  .submission-card__head {
    flex-direction: column;
  }

  .status-badge,
  .review-actions button {
    width: 100%;
    text-align: center;
  }

  .performance-stats {
    grid-template-columns: 1fr;
  }

  .submission-meta div {
    grid-template-columns: 1fr;
  }
}
