/* PharmQ Git — Gitea 사용자 정의 스타일 (custom/public/assets/css/pharmq.css)
   업그레이드 안전: 템플릿을 덮어쓰지 않고 CSS 만 얹는다. 로그인 화면은 .page-content.user.signin 에만 적용. */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css");

:root {
  --pq-blue: #008AD1;
  --pq-blue-deep: #0A3D62;
  --pq-ink: #0F172A;
  --fonts-proportional: "Pretendard Variable", Pretendard, -apple-system, "Segoe UI", "Malgun Gothic", sans-serif;
}
body { font-family: var(--fonts-proportional); }

/* 상단 로고 조금 크게 */
#navbar-logo img { width: 26px; height: 26px; }

/* ── 로그인 화면 ─────────────────────────────── */
.page-content.user.signin {
  word-break: keep-all;
  position: relative;
  min-height: calc(100vh - 100px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 16px 48px calc(42vw + 16px);
  margin: 0;
  background: #F6F8FB;
}
/* 왼쪽 브랜드 패널(::before = 배경·로고·제목, ::after = 설명) */
.page-content.user.signin::before {
  content: "PharmQ Git";
  position: absolute;
  inset: 0 auto 0 0;
  width: 42vw;
  box-sizing: border-box;
  padding: 0 6vw;
  display: flex;
  align-items: center;
  color: #fff;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  background:
    url("../img/logo_white.svg") no-repeat 6vw calc(50% - 76px) / 56px 52px,
    radial-gradient(120% 80% at 0% 100%, rgba(0, 138, 209, .55) 0%, rgba(0, 138, 209, 0) 60%),
    linear-gradient(160deg, #0B2A44 0%, var(--pq-blue-deep) 55%, #075E8F 100%);
}
.page-content.user.signin::after {
  content: "팜큐웍스 · ANIPOS 소스와 빌드 배포 저장소\A 승인된 구성원만 접속할 수 있습니다.";
  white-space: pre-wrap;
  position: absolute;
  left: 6vw;
  top: calc(50% + 34px);
  width: calc(42vw - 12vw);
  color: rgba(255, 255, 255, .72);
  font-size: 15px;
  line-height: 1.7;
}
.page-content.user.signin > .ui.page.grid { width: 100%; max-width: 400px; margin: 0 !important; padding: 0 !important; }
.page-content.user.signin > .ui.page.grid > .column { max-width: none !important; width: 100% !important; padding: 0 !important; }
.page-content.user.signin h4.ui.top.attached.header {
  background: transparent;
  border: 0;
  text-align: left;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--pq-ink);
  padding: 0 0 6px;
}
.page-content.user.signin form.ui.form { padding: 0; }
.page-content.user.signin .ui.container:first-child > .ui.attached.segment {
  border: 0;
  background: transparent;
  padding: 18px 0 0;
  box-shadow: none;
}
.page-content.user.signin .ui.form input[type=text],
.page-content.user.signin .ui.form input[type=password] {
  height: 46px;
  border-radius: 10px;
  border: 1px solid #D5DCE6;
  background: #fff;
  font-size: 15px;
  transition: border-color .15s, box-shadow .15s;
}
.page-content.user.signin .ui.form input:focus {
  border-color: var(--pq-blue);
  box-shadow: 0 0 0 3px rgba(0, 138, 209, .15);
}
.page-content.user.signin .ui.form .field > label { font-weight: 600; color: #334155; }
.page-content.user.signin .ui.primary.button {
  height: 48px;
  border-radius: 10px;
  background: var(--pq-blue);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.page-content.user.signin .ui.primary.button:hover { background: #0076B4; }
/* 패스키 칸: 얇은 테두리 버튼 */
.page-content.user.signin .ui.container + .ui.container > .ui.attached.segment {
  border: 1px solid #D5DCE6;
  border-radius: 10px;
  background: #fff;
  padding: 0;
  box-shadow: none;
}
.page-content.user.signin a.signin-passkey {
  display: block;
  width: 100%;
  padding: 13px 0;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
}
.page-content.user.signin a { color: var(--pq-blue); }

/* 좁은 화면: 브랜드 패널을 위 띠로 */
@media (max-width: 860px) {
  .page-content.user.signin {
    padding: 196px 16px 40px;
    align-items: flex-start;
  }
  .page-content.user.signin::before {
    width: 100%;
    height: 168px;
    inset: 0 0 auto 0;
    padding: 0 20px 34px 92px;
    font-size: 24px;
    background:
      url("../img/logo_white.svg") no-repeat 24px calc(50% - 17px) / 48px 44px,
      linear-gradient(160deg, #0B2A44 0%, var(--pq-blue-deep) 60%, #075E8F 100%);
  }
  .page-content.user.signin::after {
    left: 92px;
    top: 92px;
    width: calc(100% - 112px);
    font-size: 12.5px;
    line-height: 1.55;
  }
}

/* 다크 모드 */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="gitea-light"]) .page-content.user.signin { background: #0E141B; }
  html:not([data-theme="gitea-light"]) .page-content.user.signin .ui.attached.header { color: #E5ECF3; }
  html:not([data-theme="gitea-light"]) .page-content.user.signin .ui.form input { background: #151D26; border-color: #2A3644; color: #E5ECF3; }
  html:not([data-theme="gitea-light"]) .page-content.user.signin .ui.form .field > label { color: #B8C4D1; }
  html:not([data-theme="gitea-light"]) .page-content.user.signin .ui.container + .ui.container > .ui.attached.segment { background: #151D26; border-color: #2A3644; }
}

/* ── 첫 화면(templates/home.tmpl 의 .pq-home) ─────────────────── */
.page-content.pq-home { padding: 0 !important; margin: 0 !important; word-break: keep-all; background: #F6F8FB; min-height: calc(100vh - 100px); }
.page-content.pq-home > .pq-hero { margin-top: 0 !important; }
.pq-hero {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 88px 16px 96px;
  color: #fff;
  background:
    radial-gradient(90% 120% at 0% 100%, rgba(0, 138, 209, .5) 0%, rgba(0, 138, 209, 0) 60%),
    linear-gradient(160deg, #0B2A44 0%, var(--pq-blue-deep) 55%, #075E8F 100%);
}
.pq-hero-logo { width: 72px; height: 67px; margin-bottom: 22px; }
.pq-hero-title { margin: 0; font-size: 44px; font-weight: 700; letter-spacing: -0.025em; color: #fff; }
.pq-hero-desc { margin: 12px 0 0; font-size: 17px; line-height: 1.6; color: rgba(255, 255, 255, .78); }
.pq-hero-btn {
  display: inline-block; margin-top: 30px; padding: 13px 40px; border-radius: 10px;
  background: #fff; color: var(--pq-blue-deep) !important; font-size: 15px; font-weight: 700;
  text-decoration: none !important; transition: transform .15s, box-shadow .15s;
}
.pq-hero-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.pq-cards {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px;
  max-width: 1040px; margin: -44px auto 0; padding: 0 16px 64px; box-sizing: border-box;
}
.pq-card {
  background: #fff; border: 1px solid #E3E8EF; border-radius: 14px; padding: 26px 24px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, .06);
}
.pq-card-icon {
  width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 138, 209, .1); color: var(--pq-blue); margin-bottom: 16px;
}
.pq-card h3 { margin: 0 0 6px; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; color: var(--pq-ink); }
.pq-card p { margin: 0; font-size: 14.5px; line-height: 1.6; color: #55657A; }
@media (max-width: 760px) {
  .pq-hero { padding: 56px 20px 76px; }
  .pq-hero-title { font-size: 32px; }
  .pq-hero-desc { font-size: 15px; }
  .pq-cards { grid-template-columns: 1fr; gap: 12px; }
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="gitea-light"]) .page-content.pq-home { background: #0E141B; }
  html:not([data-theme="gitea-light"]) .pq-card { background: #151D26; border-color: #2A3644; box-shadow: none; }
  html:not([data-theme="gitea-light"]) .pq-card h3 { color: #E5ECF3; }
  html:not([data-theme="gitea-light"]) .pq-card p { color: #9AA8B8; }
}
