* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-width: 320px;
  min-height: 100%;
}

body.pacs-lovable {
  margin: 0 !important;
  background: #f8fafc !important;
  color: #020617 !important;
  font-family: Inter, Pretendard, "Noto Sans KR", "Segoe UI", "Malgun Gothic", system-ui, sans-serif !important;
  font-size: 14px !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.pacs-lovable button,
body.pacs-lovable input {
  font: inherit;
}

body.pacs-lovable a {
  color: inherit;
}

body.pacs-lovable.signup-modal-open {
  overflow: hidden;
}

.jdkpo-auth-shell {
  min-height: 100vh;
  background: #f8fafc;
}

/* --------------------------------------------------------------------------
   Brand / operations panel
   -------------------------------------------------------------------------- */
.jdkpo-auth-brand {
  position: relative;
  overflow: hidden;
  padding: 24px;
  background: #040a14;
  color: #f1f5f9;
}

.jdkpo-brand-main,
.jdkpo-brand-footer {
  position: relative;
  z-index: 1;
}

.jdkpo-brand-mark {
  display: flex;
  min-height: 52px;
  align-items: center;
}

.jdkpo-brand-logo {
  display: block;
  width: 164px;
  height: auto;
  max-width: 72%;
}

.jdkpo-brand-intro {
  max-width: 576px;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, .10);
}

.jdkpo-brand-kicker,
.jdkpo-login-kicker,
.jdkpo-signup-kicker {
  margin: 0;
  color: #0074e3;
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
  text-transform: uppercase;
}

.jdkpo-brand-title {
  margin: 12px 0 0;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  line-height: 32px;
  letter-spacing: -.025em;
}

.jdkpo-brand-subtitle {
  margin: 12px 0 0;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

.jdkpo-system-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  max-width: 576px;
  margin-top: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .10);
}

.jdkpo-system-item {
  min-width: 0;
  padding: 12px;
  background: #0b1420;
}

.jdkpo-system-icon {
  display: block;
  width: 16px;
  height: 16px;
  color: #90a1b9;
}

.jdkpo-system-copy {
  min-width: 0;
  margin-top: 8px;
}

.jdkpo-system-label {
  display: block;
  overflow: hidden;
  margin: 0;
  color: #f1f5f9;
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jdkpo-system-detail {
  display: none;
  margin: 4px 0 0;
  color: #90a1b9;
  font-size: 12px;
  line-height: 16px;
}

.jdkpo-system-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: #90a1b9;
  font-size: 10px;
  font-weight: 500;
  line-height: 14px;
  white-space: nowrap;
}

.jdkpo-system-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 999px;
  background: #2aa654;
}

.jdkpo-brand-footer {
  display: none;
}

/* --------------------------------------------------------------------------
   Login panel
   -------------------------------------------------------------------------- */
.jdkpo-login-panel {
  display: flex;
  min-height: calc(100vh - 242px);
  align-items: flex-start;
  justify-content: center;
  padding: 40px 24px;
  background: #f8fafc;
}

.jdkpo-login-content {
  width: 100%;
  max-width: 420px;
}

.jdkpo-login-heading {
  margin-bottom: 32px;
}

.jdkpo-login-title {
  margin: 8px 0 0;
  color: #020617;
  font-size: 30px;
  font-weight: 700;
  line-height: 36px;
  letter-spacing: -.025em;
}

.jdkpo-login-description {
  margin: 12px 0 0;
  color: #475569;
  font-size: 14px;
  line-height: 24px;
}

.jdkpo-login-error {
  display: flex;
  gap: 12px;
  margin: 0 0 20px;
  padding: 12px 16px;
  border: 1px solid rgba(220, 38, 38, .40);
  border-radius: 4px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 14px;
  line-height: 20px;
}

.jdkpo-login-error svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin-top: 2px;
}

.jdkpo-form-group + .jdkpo-form-group {
  margin-top: 20px;
}

.jdkpo-field-label {
  display: block;
  color: #1e293b;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.jdkpo-input-wrap {
  position: relative;
  margin-top: 8px;
}

.jdkpo-field-input {
  display: block;
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  outline: 0;
  background: #fff;
  color: #0f172a;
  font-size: 15px;
  line-height: 44px;
  box-shadow: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}

.jdkpo-field-input::placeholder {
  color: #64748b;
  opacity: 1;
}

.jdkpo-field-input:focus {
  border-color: #0074e3;
  box-shadow: 0 0 0 2px rgba(0, 116, 227, .25);
}

.jdkpo-password-input {
  padding-right: 44px;
}

.jdkpo-password-toggle {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 4px;
  outline: 0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}

.jdkpo-password-toggle:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.jdkpo-password-toggle:focus-visible {
  box-shadow: 0 0 0 2px #0074e3;
}

.jdkpo-password-toggle svg {
  width: 16px;
  height: 16px;
}

.jdkpo-submit {
  display: inline-flex;
  width: 100%;
  height: 44px;
  align-items: center;
  justify-content: center;
  margin-top: 28px;
  padding: 0 16px;
  border: 1px solid #0074e3;
  border-radius: 4px;
  outline: 0;
  background: #0074e3;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  box-shadow: none;
  cursor: pointer;
  transition: background-color .12s ease, border-color .12s ease;
}

.jdkpo-submit:hover {
  border-color: #0067ca;
  background: #0067ca;
}

.jdkpo-submit:focus-visible {
  box-shadow: 0 0 0 2px #f8fafc, 0 0 0 4px #0074e3;
}

.jdkpo-login-links {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
  text-align: center;
}

.jdkpo-signup-line {
  margin: 0;
  color: #475569;
  font-size: 14px;
  line-height: 20px;
}

.jdkpo-signup-link {
  color: #0074e3 !important;
  font-weight: 600;
  text-decoration: none !important;
  text-underline-offset: 4px;
}

.jdkpo-signup-link:hover,
.jdkpo-signup-link:focus-visible {
  text-decoration: underline !important;
}

.jdkpo-approval-note {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 20px;
}

.jdkpo-login-footer {
  margin: 40px 0 0;
  color: #94a3b8;
  font-size: 11px;
  line-height: 16px;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Signup modal
   -------------------------------------------------------------------------- */
.jdkpo-signup-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 6, 23, .58);
  opacity: 0;
  visibility: hidden;
  transition: opacity .14s ease, visibility .14s ease;
}

.jdkpo-signup-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.jdkpo-signup-dialog {
  width: min(560px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  outline: 0;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 24px 72px rgba(2, 6, 23, .24);
  transform: translateY(6px) scale(.992);
  transition: transform .14s ease;
}

.jdkpo-signup-modal.is-open .jdkpo-signup-dialog {
  transform: translateY(0) scale(1);
}

.jdkpo-signup-header {
  position: relative;
  padding: 22px 28px 20px;
  border-bottom: 1px solid #e2e8f0;
}

.jdkpo-signup-title {
  margin: 8px 0 0;
  color: #020617;
  font-size: 28px;
  font-weight: 700;
  line-height: 34px;
  letter-spacing: -.03em;
}

.jdkpo-signup-description {
  max-width: 480px;
  margin: 16px 40px 0 0;
  color: #475569;
  font-size: 14px;
  line-height: 24px;
}

.jdkpo-signup-close {
  position: absolute;
  top: 15px;
  right: 15px;
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #475569;
  cursor: pointer;
}

.jdkpo-signup-close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.jdkpo-signup-close:focus-visible {
  outline: 2px solid #0074e3;
  outline-offset: 1px;
}

.jdkpo-signup-close svg {
  width: 18px;
  height: 18px;
}

.jdkpo-signup-form {
  padding: 27px 28px 24px;
}

.jdkpo-signup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 16px;
}

.jdkpo-signup-field {
  display: block;
  min-width: 0;
}

.jdkpo-signup-field > span:first-child {
  display: block;
  margin-bottom: 8px;
  color: #1e293b;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.jdkpo-signup-field input {
  display: block;
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  outline: 0;
  background: #fff;
  color: #0f172a;
  font-size: 15px;
  line-height: 44px;
  box-shadow: none;
}

.jdkpo-signup-field input:focus {
  border-color: #0074e3;
  box-shadow: 0 0 0 2px rgba(0, 116, 227, .22);
}

.jdkpo-signup-field small {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 12px;
  line-height: 18px;
}

.jdkpo-signup-password-wrap {
  position: relative;
  display: block;
}

.jdkpo-signup-password-wrap input {
  padding-right: 44px;
}

.jdkpo-signup-feedback {
  margin-top: 20px;
  padding: 11px 13px;
  border: 1px solid #fecaca;
  border-radius: 4px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 13px;
  line-height: 20px;
}

.jdkpo-signup-policy {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
  color: #475569;
  font-size: 12px;
  line-height: 18px;
}

.jdkpo-signup-policy svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: #22a35a;
}

.jdkpo-signup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 26px;
}

.jdkpo-signup-cancel,
.jdkpo-signup-submit,
.jdkpo-signup-completed button {
  min-width: 68px;
  height: 40px;
  padding: 0 18px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  line-height: 38px;
  cursor: pointer;
}

.jdkpo-signup-cancel {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
}

.jdkpo-signup-cancel:hover {
  background: #f8fafc;
}

.jdkpo-signup-submit,
.jdkpo-signup-completed button {
  border: 1px solid #0074e3;
  background: #0074e3;
  color: #fff;
}

.jdkpo-signup-submit:hover,
.jdkpo-signup-completed button:hover {
  border-color: #0067ca;
  background: #0067ca;
}

.jdkpo-signup-submit:disabled {
  cursor: wait;
  opacity: .72;
}

.jdkpo-signup-completed {
  padding: 48px 28px;
  text-align: center;
}

.jdkpo-signup-completed-icon {
  display: grid;
  width: 44px;
  height: 44px;
  margin: 0 auto 18px;
  place-items: center;
  border-radius: 999px;
  background: #ecfdf3;
  color: #16a34a;
  font-size: 22px;
  font-weight: 700;
}

.jdkpo-signup-completed h3 {
  margin: 0;
  color: #0f172a;
  font-size: 20px;
  line-height: 28px;
}

.jdkpo-signup-completed p {
  margin: 8px 0 24px;
  color: #64748b;
  font-size: 14px;
  line-height: 22px;
}

/* --------------------------------------------------------------------------
   Responsive parity with the Lovable reference
   -------------------------------------------------------------------------- */
@media (min-width: 640px) {
  .jdkpo-auth-brand {
    padding-right: 40px;
    padding-left: 40px;
  }

  .jdkpo-brand-title {
    font-size: 30px;
    line-height: 36px;
  }

  .jdkpo-brand-subtitle {
    font-size: 16px;
    line-height: 24px;
  }

  .jdkpo-system-label {
    font-size: 12px;
  }

  .jdkpo-login-panel {
    padding-right: 40px;
    padding-left: 40px;
  }
}

@media (min-width: 1024px) {
  .jdkpo-auth-shell {
    display: grid;
    grid-template-columns: minmax(420px, 46%) minmax(0, 54%);
  }

  .jdkpo-auth-brand {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 64px;
  }

  .jdkpo-brand-logo {
    width: 176px;
  }

  .jdkpo-brand-intro {
    margin-top: 112px;
    padding-top: 40px;
  }

  .jdkpo-brand-title {
    font-size: 36px;
    line-height: 40px;
  }

  .jdkpo-system-list {
    display: block;
    margin-top: 48px;
    border-bottom: 0;
  }

  .jdkpo-system-item {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .10);
  }

  .jdkpo-system-icon {
    width: 20px;
    height: 20px;
  }

  .jdkpo-system-copy {
    margin-top: 0;
  }

  .jdkpo-system-label {
    font-size: 14px;
    line-height: 20px;
  }

  .jdkpo-system-detail {
    display: block;
  }

  .jdkpo-system-status {
    margin-top: 0;
    font-size: 12px;
    line-height: 16px;
  }

  .jdkpo-brand-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 56px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, .10);
    color: #64748b;
    font-size: 12px;
    line-height: 16px;
  }

  .jdkpo-login-panel {
    min-height: 100vh;
    align-items: center;
    padding-right: 64px;
    padding-left: 64px;
  }
}

@media (min-width: 1280px) {
  .jdkpo-auth-brand {
    padding: 64px 96px;
  }
}

@media (max-width: 639px) {
  .jdkpo-signup-modal {
    align-items: flex-start;
    padding: 12px;
    overflow-y: auto;
  }

  .jdkpo-signup-dialog {
    max-height: none;
    margin: 12px 0;
  }

  .jdkpo-signup-header,
  .jdkpo-signup-form {
    padding-right: 20px;
    padding-left: 20px;
  }

  .jdkpo-signup-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .jdkpo-signup-description {
    margin-right: 24px;
  }
}

/* Shared PACS Operations identity, enlarged for the sign-in screen. */
.jdkpo-brand-mark { gap:14px; }
.jdkpo-auth-logo-icon { display:block; width:42px; height:42px; flex:0 0 42px; }
.jdkpo-auth-wordmark { color:#f4f6fa; font-size:28px; font-weight:650; line-height:1.3; letter-spacing:-.5px; }
@media(max-width:600px) { .jdkpo-brand-mark { gap:12px; } .jdkpo-auth-logo-icon { width:34px; height:34px; flex-basis:34px; } .jdkpo-auth-wordmark { font-size:24px; } }
