:root {
  color: #17324d;
  background: #eef8fb;
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.94), transparent 30rem),
    linear-gradient(135deg, #dff5ff 0%, #fff7d6 54%, #c8e8a2 100%);
}

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

.landing-shell,
.student-home-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.landing-card,
.student-home-card {
  width: min(680px, 100%);
  padding: clamp(26px, 5vw, 48px);
  border: 1px solid rgba(23, 50, 77, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 64px rgba(23, 50, 77, 0.16);
}

.eyebrow,
.student-login-kicker {
  margin: 0;
  color: #0f766e;
  font-size: 14px;
  font-weight: 900;
}

h1 {
  margin: 10px 0 14px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.12;
}

p {
  line-height: 1.65;
}

.primary-link,
.student-login-submit,
.secondary-button,
.secondary-link,
.danger-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 900;
  text-decoration: none;
}

.primary-link,
.student-login-submit {
  border: 0;
  padding: 0 24px;
  color: #fff;
  background: linear-gradient(135deg, #0f766e, #2563eb);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.2);
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.secondary-link {
  padding: 0 24px;
  border: 1px solid rgba(15, 118, 110, 0.3);
  color: #115e59;
  background: #fff;
}

.student-login-shell {
  width: min(1080px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(20px, 5vh, 56px) 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  align-items: center;
  gap: clamp(20px, 4vw, 46px);
}

.student-login-visual {
  min-height: min(590px, calc(100vh - 96px));
  display: grid;
  align-items: end;
  padding: clamp(24px, 5vw, 52px);
  border-radius: 18px;
  background:
    radial-gradient(circle at 72% 24%, rgba(255, 255, 255, 0.85), transparent 13rem),
    linear-gradient(145deg, #80d6d1, #bae49c 52%, #f7d774);
  box-shadow: 0 28px 70px rgba(23, 50, 77, 0.2);
}

.student-login-visual-card {
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(10px);
}

.student-login-visual-card span {
  color: #0f766e;
  font-size: 13px;
  font-weight: 900;
}

.student-login-visual-card strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(26px, 4vw, 40px);
}

.student-login-visual-card p {
  margin-bottom: 0;
}

.student-login-panel {
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid rgba(23, 50, 77, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 22px 54px rgba(31, 41, 55, 0.16);
}

.student-login-back {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  margin-bottom: 16px;
  color: #35516a;
  font-weight: 800;
  text-decoration: none;
}

.student-login-heading {
  margin-bottom: 24px;
}

.student-login-form {
  display: grid;
  gap: 12px;
}

.student-login-form label {
  color: #27496b;
  font-weight: 900;
}

.student-login-form input {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(23, 50, 77, 0.22);
  border-radius: 12px;
  padding: 0 14px;
  background: #fff;
  color: #17324d;
  font-size: 18px;
}

input:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(14, 165, 233, 0.32);
  outline-offset: 2px;
}

.privacy-note {
  margin: 2px 0;
  color: #52677c;
  font-size: 14px;
}

.local-preview-login {
  display: grid;
  gap: 8px;
  margin: 4px 0;
  padding: 12px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 12px;
  background: #f0fdfa;
}

.local-preview-login[hidden] {
  display: none;
}

.local-preview-login p {
  margin: 0;
  color: #52677c;
  font-size: 14px;
}

.local-preview-login .compact-button {
  width: 100%;
}

.student-login-submit {
  margin-top: 4px;
  cursor: pointer;
}

.student-login-submit:disabled,
.secondary-button:disabled,
.danger-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.student-login-message,
.student-home-status {
  min-height: 24px;
  margin: 16px 0 0;
  color: #35516a;
  font-weight: 800;
}

[data-tone="bad"] {
  color: #b91c1c;
}

[data-tone="good"] {
  color: #047857;
}

.student-session-details {
  display: grid;
  gap: 10px;
  margin: 24px 0;
}

.student-session-details div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #dbe7ee;
}

.student-session-details dt {
  color: #52677c;
  font-weight: 800;
}

.student-session-details dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 900;
}

.student-home-next {
  padding: 18px;
  border-radius: 14px;
  background: #ecfeff;
}

.student-home-next p {
  margin-bottom: 0;
}

.secondary-button {
  width: 100%;
  margin-top: 18px;
  border: 1px solid rgba(15, 118, 110, 0.3);
  color: #115e59;
  background: #fff;
  cursor: pointer;
}

.auth-page {
  min-width: 320px;
}

.auth-shell {
  width: min(620px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(24px, 7vh, 72px) 0;
  display: grid;
  place-items: center;
}

.auth-shell-wide {
  width: min(760px, calc(100% - 32px));
}

.auth-card {
  width: 100%;
  padding: clamp(24px, 5vw, 44px);
  border: 1px solid rgba(23, 50, 77, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 64px rgba(23, 50, 77, 0.16);
}

.auth-guide {
  margin: 0 0 24px;
  padding: 14px 16px;
  border-radius: 12px;
  color: #35516a;
  background: #ecfeff;
}

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

.auth-form label,
.reset-result label {
  color: #27496b;
  font-weight: 900;
}

.auth-form input,
.auth-form textarea,
.reset-result textarea {
  width: 100%;
  border: 1px solid rgba(23, 50, 77, 0.22);
  border-radius: 12px;
  padding: 12px 14px;
  color: #17324d;
  background: #fff;
}

.auth-form input {
  min-height: 52px;
  font-size: 18px;
}

.auth-form textarea,
.reset-result textarea {
  resize: vertical;
  line-height: 1.5;
}

.reset-result,
.reset-success {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 14px;
  background: #f0fdfa;
}

.reset-result h2,
.reset-success h2 {
  margin: 0 0 10px;
}

.reset-result label {
  display: block;
  margin-bottom: 8px;
}

.reset-result textarea {
  overflow-wrap: anywhere;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.compact-button {
  width: auto;
  flex: 1 1 180px;
  margin-top: 12px;
  padding: 0 18px;
}

.danger-button {
  border: 1px solid rgba(185, 28, 28, 0.3);
  color: #991b1b;
  background: #fff;
  cursor: pointer;
}

.reset-success .primary-link {
  margin-top: 8px;
}

.management-page {
  min-width: 320px;
}

.management-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 72px;
}

.management-header,
.management-card,
.management-guide {
  border: 1px solid rgba(23, 50, 77, 0.14);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 48px rgba(23, 50, 77, 0.12);
}

.management-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(24px, 5vw, 42px);
  border-radius: 18px;
}

.management-header h1 {
  margin-bottom: 8px;
}

.management-header p:last-child {
  max-width: 720px;
  margin-bottom: 0;
}

.management-header .secondary-button {
  width: auto;
  flex: 0 0 auto;
  margin: 0;
}

.management-header > .notice-header-actions {
  display: grid;
  min-width: 180px;
  gap: 8px;
}

.management-header > .notice-header-actions .compact-button {
  width: 100%;
  margin: 0;
}

.management-guide {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 18px 0;
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
  list-style: none;
}

.management-guide li {
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 18px;
  background: #f8fcfd;
}

.management-guide strong {
  color: #0f766e;
}

.management-guide span {
  color: #52677c;
  font-size: 14px;
  line-height: 1.5;
}

.management-card {
  margin-top: 18px;
  padding: clamp(22px, 4vw, 34px);
  border-radius: 16px;
}

.management-card h2,
.management-card h3 {
  margin: 0 0 16px;
}

.management-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.management-section-heading span {
  display: block;
  margin-bottom: 4px;
  color: #0f766e;
  font-size: 13px;
  font-weight: 900;
}

.management-section-heading h2 {
  margin: 0;
}

.management-section-heading p {
  margin: 0;
  padding: 8px 12px;
  border-radius: 999px;
  color: #35516a;
  background: #ecfeff;
  font-size: 13px;
  font-weight: 900;
}

.management-message {
  min-height: 24px;
  margin: 16px 0 0;
  font-weight: 900;
}

#membershipTenantPicker {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
}

#membershipTenantPicker[hidden] {
  display: none;
}

#membershipTenantPicker label {
  display: grid;
  gap: 7px;
  font-weight: 900;
}

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

.management-grid label,
.management-inline-form label {
  display: grid;
  gap: 7px;
  color: #27496b;
  font-weight: 900;
}

.management-grid input,
.management-grid select,
.management-inline-form input,
.management-inline-form select,
#membershipTenantPicker select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(23, 50, 77, 0.22);
  border-radius: 10px;
  padding: 10px 12px;
  color: #17324d;
  background: #fff;
}

.management-grid .privacy-note {
  align-self: center;
  margin: 0;
}

.management-save {
  min-height: 48px;
  align-self: end;
  margin: 0;
}

.management-create-form {
  margin-bottom: 24px;
  padding: 18px;
  border-radius: 14px;
  background: #f0fdfa;
}

.management-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #dbe7ee;
  border-radius: 12px;
}

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

.management-table th,
.management-table td {
  padding: 12px;
  border-bottom: 1px solid #e5edf2;
  text-align: left;
  vertical-align: middle;
  white-space: pre-line;
}

.management-table th {
  color: #35516a;
  background: #f5fafc;
  font-size: 13px;
}

.management-table select {
  min-height: 40px;
  border: 1px solid rgba(23, 50, 77, 0.22);
  border-radius: 8px;
  padding: 6px 8px;
  background: #fff;
}

.table-button {
  min-height: 40px;
  margin: 0;
  padding: 0 14px;
}

.management-editor {
  margin-top: 20px;
  padding: 20px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 14px;
  background: #f8fbff;
}

.management-editor > p {
  color: #52677c;
  font-size: 14px;
  font-weight: 800;
}

.management-inline-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, auto);
  align-items: end;
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #dbe7ee;
}

.management-inline-form .compact-button {
  width: auto;
  min-height: 48px;
  margin: 0;
  padding: 0 18px;
}

@media (max-width: 820px) {
  .student-login-shell {
    width: min(100% - 24px, 500px);
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 16px 0 28px;
  }

  .student-login-visual {
    min-height: 190px;
    padding: 18px;
  }

  .student-login-panel {
    padding: 22px;
  }

  .auth-shell,
  .auth-shell-wide {
    width: min(100% - 24px, 620px);
    padding: 16px 0 28px;
  }

  .auth-card {
    padding: 22px;
  }

  .management-shell {
    width: min(100% - 20px, 700px);
    padding: 10px 0 32px;
  }

  .management-header {
    display: grid;
    padding: 22px;
  }

  .management-header .secondary-button {
    width: 100%;
  }

  .management-header > .notice-header-actions {
    width: 100%;
  }

  .management-guide,
  .management-grid {
    grid-template-columns: 1fr;
  }

  .management-guide li {
    min-height: auto;
  }

  .management-section-heading {
    display: grid;
  }

  .management-inline-form {
    grid-template-columns: 1fr;
  }

  .management-inline-form .compact-button {
    width: 100%;
  }

}
