/* JJH UI Refresh 2026-05-28
   목적:
   1) 로그인 화면 레이아웃 안정화
   2) 관리자/사용자 화면 카드/테이블/폼 가독성 개선
   3) 모바일/태블릿 반응형 보정
*/

:root {
  --jjh-bg: #f4f7fc;
  --jjh-surface: rgba(255,255,255,.92);
  --jjh-surface-strong: #ffffff;
  --jjh-border: rgba(79,124,255,.12);
  --jjh-border-strong: rgba(79,124,255,.18);
  --jjh-shadow: 0 18px 40px rgba(36, 71, 135, .10);
  --jjh-shadow-soft: 0 10px 24px rgba(36, 71, 135, .08);
  --jjh-text: #162236;
  --jjh-muted: #64748b;
  --jjh-primary: #4f7cff;
  --jjh-primary-2: #7b61ff;
  --jjh-radius: 20px;
  --jjh-radius-lg: 28px;
}

html, body {
  color: var(--jjh-text);
  background: var(--jjh-bg);
}

::selection {
  background: rgba(79,124,255,.18);
  color: #0f172a;
}

/* ----------------------
   로그인/인증 화면
----------------------- */
body.auth-shell {
  min-height: 100vh;
  display: block !important;
  padding: 24px !important;
}

body.auth-shell .auth-shell-wrap {
  width: min(1220px, 100%);
  margin: 0 auto;
  display: grid !important;
  grid-template-columns: minmax(320px, 1fr) minmax(360px, 460px);
  gap: 28px;
  align-items: stretch;
}

body.auth-shell .auth-side-panel,
body.auth-shell .auth-container {
  opacity: 1 !important;
  transform: none !important;
}

body.auth-shell .auth-side-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 680px;
  padding: 34px;
  border-radius: 32px;
  background:
    radial-gradient(circle at top left, rgba(79,124,255,.14), transparent 28%),
    radial-gradient(circle at bottom right, rgba(123,97,255,.10), transparent 26%),
    rgba(255,255,255,.74);
  border: 1px solid rgba(255,255,255,.84);
  box-shadow: var(--jjh-shadow);
  backdrop-filter: blur(18px);
}

body.auth-shell .auth-side-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(100,120,160,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100,120,160,0.05) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at center, black 38%, transparent 92%);
  pointer-events: none;
}

body.auth-shell .auth-side-panel > * {
  position: relative;
  z-index: 1;
}

body.auth-shell .auth-side-panel h2 {
  margin: 10px 0 14px;
  text-align: left;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.14;
  letter-spacing: -0.03em;
  color: #142033;
}

body.auth-shell .auth-side-panel p,
body.auth-shell .auth-feature span,
body.auth-shell .auth-brand-footnote,
body.auth-shell .auth-mini-stat span {
  color: var(--jjh-muted);
}

body.auth-shell .auth-feature,
body.auth-shell .auth-mini-stat {
  background: rgba(255,255,255,.84);
  border: 1px solid var(--jjh-border);
  box-shadow: var(--jjh-shadow-soft);
}

body.auth-shell .auth-feature {
  border-radius: 18px;
}

body.auth-shell .auth-container {
  width: 100%;
  max-width: none !important;
  min-width: 0;
  min-height: 680px;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 38px;
  border-radius: 32px !important;
  background: rgba(255,255,255,.9) !important;
  border: 1px solid rgba(255,255,255,.88);
  box-shadow: 0 24px 56px rgba(30, 60, 114, .12) !important;
  backdrop-filter: blur(18px);
}

body.auth-shell .brand {
  margin-bottom: 28px;
}

body.auth-shell .brand h1 {
  font-size: clamp(28px, 2.6vw, 34px);
  font-weight: 900;
  letter-spacing: -0.03em;
}

body.auth-shell .headline-chip {
  border: 1px solid rgba(79,124,255,.10);
}

body.auth-shell h2 {
  font-size: 24px;
  letter-spacing: -0.02em;
}

body.auth-shell .form-group {
  margin-bottom: 16px;
}

body.auth-shell .form-group label {
  font-size: 13px;
  font-weight: 800;
  color: #516179;
}

body.auth-shell .form-group input {
  height: 52px;
  border-radius: 16px;
  background: #fbfcff;
  border: 1px solid rgba(100,120,160,.20);
}

body.auth-shell .form-group input:focus {
  border-color: rgba(79,124,255,.55);
  box-shadow: 0 0 0 4px rgba(79,124,255,.12);
}

body.auth-shell .btn-group {
  margin-top: 20px;
}

body.auth-shell .btn-submit,
body.auth-shell .btn-install {
  height: 52px;
  border-radius: 16px;
}

body.auth-shell .btn-submit {
  background: linear-gradient(135deg, var(--jjh-primary), var(--jjh-primary-2));
  box-shadow: 0 14px 30px rgba(79,124,255,.24);
}

body.auth-shell .btn-submit:hover,
body.auth-shell .btn-install:hover,
body.auth-shell .brand-logo-wrap:hover {
  transform: translateY(-1px);
}

body.auth-shell .error-msg {
  text-align: left;
  line-height: 1.6;
}

body.auth-shell .auth-links {
  margin-top: 18px;
  justify-content: flex-end;
}

body.auth-shell .auth-links span {
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(79,124,255,.06);
}

body.auth-shell .install-guide {
  margin-top: 16px;
}

@media (max-width: 980px) {
  body.auth-shell {
    padding: 16px !important;
  }

  body.auth-shell .auth-shell-wrap {
    grid-template-columns: 1fr;
  }

  body.auth-shell .auth-container,
  body.auth-shell .auth-side-panel {
    min-height: auto;
  }

  body.auth-shell .auth-container {
    order: 1;
    padding: 28px;
  }

  body.auth-shell .auth-side-panel {
    order: 2;
    padding: 28px;
  }
}

@media (max-width: 640px) {
  body.auth-shell .auth-container,
  body.auth-shell .auth-side-panel {
    border-radius: 24px !important;
    padding: 22px;
  }

  body.auth-shell .btn-group {
    flex-direction: column;
  }

  body.auth-shell .btn-install,
  body.auth-shell .btn-submit {
    width: 100%;
  }

  body.auth-shell .auth-mini-stats {
    grid-template-columns: 1fr;
  }
}

/* ----------------------
   공통 앱 UI 개선
----------------------- */
body.app-shell {
  background:
    radial-gradient(circle at top left, rgba(79,124,255,.08), transparent 22%),
    linear-gradient(180deg, #f6f8fc 0%, #f2f6fb 100%);
  color: var(--jjh-text);
}

body.app-shell .sidebar,
body.app-shell .panel,
body.app-shell .card,
body.app-shell .dashboard-card,
body.app-shell .stats-card,
body.app-shell .widget,
body.app-shell .table-wrap,
body.app-shell .custom-modal-content,
body.app-shell .modal-content {
  background: rgba(255,255,255,.92) !important;
  border: 1px solid var(--jjh-border) !important;
  box-shadow: var(--jjh-shadow-soft) !important;
  border-radius: 18px !important;
}

body.app-shell .stats-card,
body.app-shell .dashboard-card,
body.app-shell .widget,
body.app-shell .card {
  overflow: hidden;
}

body.app-shell .card h1,
body.app-shell .card h2,
body.app-shell .card h3,
body.app-shell .panel h1,
body.app-shell .panel h2,
body.app-shell .panel h3,
body.app-shell .dashboard-card h3,
body.app-shell .stats-card h3 {
  color: #142033 !important;
  letter-spacing: -0.02em;
}

body.app-shell .btn,
body.app-shell button,
body.app-shell .button,
body.app-shell input[type="button"],
body.app-shell input[type="submit"] {
  border-radius: 12px;
}

body.app-shell input[type="text"],
body.app-shell input[type="password"],
body.app-shell input[type="email"],
body.app-shell input[type="number"],
body.app-shell input[type="date"],
body.app-shell input[type="search"],
body.app-shell textarea,
body.app-shell select {
  border-radius: 12px !important;
  border: 1px solid rgba(100,120,160,.20) !important;
  background: #fff !important;
  color: #142033 !important;
}

body.app-shell input:focus,
body.app-shell textarea:focus,
body.app-shell select:focus {
  outline: none;
  border-color: rgba(79,124,255,.55) !important;
  box-shadow: 0 0 0 4px rgba(79,124,255,.10) !important;
}

body.app-shell table {
  border-collapse: separate;
  border-spacing: 0;
}

body.app-shell th {
  background: #f6f8fe;
  color: #243248;
  font-weight: 800;
}

body.app-shell th,
body.app-shell td {
  border-color: rgba(100,120,160,.10) !important;
}

body.app-shell tr:hover td {
  background: rgba(79,124,255,.03);
}

body.app-shell .badge,
body.app-shell .chip,
body.app-shell .status-badge {
  border-radius: 999px !important;
}

body.app-shell .sidebar a,
body.app-shell .sidebar button,
body.app-shell .nav-link {
  border-radius: 12px;
}

body.app-shell .sidebar a:hover,
body.app-shell .sidebar button:hover,
body.app-shell .nav-link:hover {
  background: rgba(79,124,255,.08);
}

body.app-shell .page-header,
body.app-shell .section-header {
  margin-bottom: 16px;
}

body.app-shell .empty-state,
body.app-shell .notice,
body.app-shell .alert,
body.app-shell .info-box {
  border-radius: 16px;
}

@media (max-width: 860px) {
  body.app-shell .main-content,
  body.app-shell .content-area {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
}
