/* 뷰별 작은 추가 스타일 */

/* 마일리지 정보 셀 */
.info-cell {
  background: var(--c-surface);
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-md);
  padding: 16px;
}
.info-cell.accent {
  background: var(--c-accent-soft);
  border-color: rgba(99, 102, 241, .25);
}
.info-cell .info-label {
  display: flex; align-items: center; gap: 8px;
  font-size: var(--fs-small); font-weight: 600;
  color: var(--c-text-muted);
  margin-bottom: 8px;
}
.info-cell.accent .info-label { color: var(--c-accent-text); }
.info-cell .info-label .icon { width: 16px; height: 16px; }
.info-cell .info-value {
  font-size: 22px; font-weight: 700;
  color: var(--c-text);
  font-variant-numeric: tabular-nums;
}
.info-cell.accent .info-value { color: var(--c-accent-text); }

/* ─────────── Sign-in page — 라이트 모드 프리미엄 + 움직이는 배경 */

.signin-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 32px 24px;
  background:
    linear-gradient(180deg, #FBFCFE 0%, #F5F7FB 50%, #EEF2F8 100%);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.signin-bg .grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(15,23,42,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,.022) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 70% 50% at center, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 50% at center, #000 30%, transparent 80%);
  pointer-events: none;
}
@media (max-width: 980px) {
  .signin-page { padding: 32px 20px 16px; }
}

/* 떠다니는 컬러 블롭들 — 라이트 톤에 어울리는 파스텔 */
.signin-bg {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}
.signin-bg .blob {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .55;
  will-change: transform;
}
.signin-bg .b1 {
  width: 480px; height: 480px;
  left: -120px; top: -140px;
  background: radial-gradient(circle, #93C5FD 0%, rgba(147,197,253,0) 70%);
  animation: blobFloat1 18s ease-in-out infinite;
}
.signin-bg .b2 {
  width: 540px; height: 540px;
  right: -160px; top: 20%;
  background: radial-gradient(circle, #C7D2FE 0%, rgba(199,210,254,0) 70%);
  animation: blobFloat2 22s ease-in-out infinite;
}
.signin-bg .b3 {
  width: 420px; height: 420px;
  left: 25%; bottom: -180px;
  background: radial-gradient(circle, #BAE6FD 0%, rgba(186,230,253,0) 70%);
  animation: blobFloat3 20s ease-in-out infinite;
}
.signin-bg .b4 {
  width: 360px; height: 360px;
  right: 20%; bottom: -100px;
  background: radial-gradient(circle, #FBCFE8 0%, rgba(251,207,232,0) 70%);
  opacity: .35;
  animation: blobFloat4 26s ease-in-out infinite;
}

@keyframes blobFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(60px, 40px) scale(1.08); }
  66%      { transform: translate(-40px, 60px) scale(.96); }
}
@keyframes blobFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-80px, 40px) scale(1.1); }
}
@keyframes blobFloat3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  40%      { transform: translate(40px, -50px) scale(1.05); }
  75%      { transform: translate(-30px, 20px) scale(.95); }
}
@keyframes blobFloat4 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(50px, -30px) scale(1.12); }
}
@media (prefers-reduced-motion: reduce) {
  .signin-bg .blob { animation: none; }
}

/* 두 컬럼 레이아웃 — 데스크톱은 브랜드 쇼케이스 + 폼, 모바일은 폼만 */
.signin-shell {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 460px);
  gap: 60px;
  width: min(1080px, 100%);
  align-items: stretch;
}
@media (max-width: 980px) {
  .signin-shell { grid-template-columns: 1fr; gap: 0; max-width: 460px; }
}

/* ── 좌측 브랜드 쇼케이스 */
.signin-showcase {
  display: flex; flex-direction: column;
  gap: 18px;
  padding: 8px 8px;
  animation: signinIn 700ms cubic-bezier(.2, .9, .3, 1.05) both;
  animation-delay: 60ms;
}
@media (max-width: 980px) {
  .signin-showcase { display: none; }
}
.signin-showcase .brand-mark {
  width: 64px; height: 64px;
  border-radius: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  color: #FFFFFF;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .15),
    0 8px 22px rgba(15, 23, 42, .25),
    0 1px 3px rgba(15, 23, 42, .12);
  margin-bottom: 4px;
}
.signin-showcase .brand-eyebrow {
  font-size: 12px;
  font-weight: 700;
  color: var(--c-accent-text);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.signin-showcase .brand-title {
  margin: 0;
  font-size: 36px; line-height: 1.18;
  font-weight: 800;
  letter-spacing: -.025em;
  color: var(--c-text);
}
.signin-showcase .brand-title .brand-accent {
  background: linear-gradient(135deg, #2563EB 0%, #6366F1 60%, #0EA5E9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.signin-showcase .brand-subtitle {
  margin: 0;
  font-size: 14px; line-height: 1.65;
  color: var(--c-text-secondary);
  letter-spacing: -.005em;
}

.brand-features {
  list-style: none; padding: 0; margin: 16px 0 0;
  display: flex; flex-direction: column; gap: 12px;
}
.brand-features li {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, .65);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(15, 23, 42, .06);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
  animation: featSlideIn 540ms cubic-bezier(.2, .9, .3, 1.05) both;
}
.brand-features li:nth-child(1) { animation-delay: 220ms; }
.brand-features li:nth-child(2) { animation-delay: 320ms; }
.brand-features li:nth-child(3) { animation-delay: 420ms; }
.brand-features li .feat-ic {
  flex: 0 0 22px;
  width: 22px; height: 22px;
  margin-top: 1px;
  border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
  color: #1E40AF;
  border: 1px solid rgba(37, 99, 235, .2);
}
.brand-features li > span:last-child {
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.brand-features li b {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--c-text);
  letter-spacing: -.005em;
}
.brand-features li i {
  font-style: normal;
  font-size: 12px;
  color: var(--c-text-muted);
  line-height: 1.5;
}
@keyframes featSlideIn {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: none; }
}

/* ── 우측 로그인 카드 */
.signin-card {
  width: 100%;
  background: rgba(255, 255, 255, .85);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 24px;
  padding: 40px 38px 30px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .9) inset,
    0 1px 3px rgba(15, 23, 42, .06),
    0 28px 56px -18px rgba(15, 23, 42, .18),
    0 14px 28px -10px rgba(15, 23, 42, .1);
  position: relative;
  z-index: 1;
  animation: signinIn 700ms cubic-bezier(.2, .9, .3, 1.05) both;
}
.signin-logo-mobile { display: none; }
@media (max-width: 980px) {
  .signin-card { padding: 36px 32px 26px; border-radius: 22px; }
  .signin-logo-mobile { display: flex; }
}

/* 환영 메시지 (폼 상단) */
.signin-welcome { margin: 8px 0 26px; }
.signin-welcome .welcome-eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: var(--c-accent-text);
  letter-spacing: .12em;
  margin-bottom: 8px;
}
.signin-welcome .welcome-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--c-text);
}
.signin-welcome .welcome-sub {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--c-text-muted);
}
@media (max-width: 980px) {
  .signin-welcome { display: none; }
}
@keyframes signinIn {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to   { opacity: 1; transform: none; }
}

.signin-logo {
  display: flex; align-items: center; gap: 14px;
  justify-content: flex-start;
  margin-bottom: 30px;
}
.signin-logo .logo-mark {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .15),
    0 4px 14px rgba(15, 23, 42, .25),
    0 1px 3px rgba(15, 23, 42, .15);
  flex: 0 0 56px;
}
.signin-logo .logo-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.signin-logo .logo-text .brand-eyebrow {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--c-text-muted);
  letter-spacing: .01em;
}
.signin-logo .logo-text .title {
  font-size: 22px; font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.025em;
  color: var(--c-text);
}

.signin-fields .field + .field { margin-top: 14px; }
.signin-fields .field-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--c-text-secondary);
  letter-spacing: -.005em;
  margin-bottom: 6px;
  display: block;
}

.input-wrap { position: relative; }
.input-wrap .input {
  height: 46px;
  font-size: 14px;
  background: rgba(255, 255, 255, .6);
  border-color: rgba(15, 23, 42, .1);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.input-wrap .input:hover {
  background: rgba(255, 255, 255, .8);
  border-color: rgba(15, 23, 42, .18);
}
.input-wrap .input:focus {
  background: #FFFFFF;
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
}
.input-wrap .input-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--c-text-muted);
  pointer-events: none;
  display: inline-flex;
  transition: color var(--t-fast);
}
.input-wrap .input:focus ~ .input-trailing,
.input-wrap .input:focus + .input-icon { color: var(--c-text); }
.input-wrap:focus-within .input-icon { color: #2563EB; }
.input-wrap .input.with-icon { padding-left: 40px; }
.input-wrap .input.with-trailing { padding-right: 42px; }
.input-wrap .input-trailing {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm);
  color: var(--c-text-muted);
  cursor: pointer;
  background: transparent;
  border: none;
  transition: background var(--t-fast), color var(--t-fast);
}
.input-wrap .input-trailing:hover { background: var(--c-surface); color: var(--c-text); }

.signin-actions {
  margin-top: 24px;
}
.signin-actions .signin-submit {
  width: 100%;
  height: 48px;
  font-size: 14.5px;
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: -.005em;
}

.signin-meta {
  display: flex; flex-direction: column; gap: 8px;
  align-items: flex-start;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px dashed rgba(15, 23, 42, .12);
}
.signin-meta .text-small { font-size: 12px; }
.signin-meta b.text-secondary {
  background: rgba(15, 23, 42, .05);
  padding: 1px 7px; border-radius: 5px;
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: 11.5px;
}
.signin-reset {
  align-self: flex-end;
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--c-text-muted);
  cursor: pointer;
  text-decoration: none;
  transition: color var(--t-fast);
}
.signin-reset:hover { color: var(--c-danger-text); text-decoration: underline; }

.signin-footer {
  margin-top: 28px;
  text-align: center;
  position: relative; z-index: 1;
  padding: 0 16px;
  font-size: 11.5px;
  color: var(--c-text-muted);
}

#signin-error {
  background: rgba(254, 242, 242, .7);
  border: 1px solid rgba(220, 38, 38, .25);
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 12px;
  font-size: 12.5px;
  display: flex; align-items: center; gap: 6px;
}
#signin-error::before {
  content: '!';
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px;
  background: var(--c-danger);
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  flex: 0 0 16px;
}

@media (max-width: 480px) {
  .signin-card { padding: 32px 24px 24px; border-radius: 18px; }
  .signin-logo .logo-mark { width: 50px; height: 50px; flex: 0 0 50px; }
  .signin-logo .logo-text .title { font-size: 19px; }
  .signin-bg .blob { filter: blur(50px); }
}

/* ─────────── 매출 관리 — 월별 추이 막대 */

.sales-monthly { display: flex; flex-direction: column; gap: 8px; padding: 4px 0; }
.sm-row {
  display: grid;
  grid-template-columns: 64px 1fr 140px 70px;
  align-items: center;
  gap: 12px;
  padding: 6px 4px;
}
.sm-label {
  font-size: 12px; font-weight: 700;
  color: var(--c-text-secondary);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.005em;
}
.sm-bar {
  height: 10px;
  background: rgba(15, 23, 42, .05);
  border-radius: 999px;
  overflow: hidden;
}
.sm-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3B82F6 0%, #2563EB 60%, #1D4ED8 100%);
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, .2) inset;
  transition: width var(--t-base);
}
.sm-amount {
  font-weight: 700;
  font-size: 13px;
  color: var(--c-text);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.sm-count {
  font-size: 11.5px;
  color: var(--c-text-muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 640px) {
  .sm-row { grid-template-columns: 56px 1fr 110px; }
  .sm-count { display: none; }
}

/* ─────────── 대시보드 — 다가오는 캠페인 */

.upcoming-list { display: flex; flex-direction: column; gap: 10px; }
.upcoming-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  background: #FFFFFF;
  border: 1px solid var(--c-border);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
}
.upcoming-d {
  flex: 0 0 64px;
  text-align: center;
  font-weight: 800;
  font-size: 13px;
  color: var(--c-accent-text);
  background: var(--c-accent-soft);
  border: 1px solid rgba(99, 102, 241, .2);
  padding: 8px 0;
  border-radius: 10px;
  letter-spacing: -.01em;
}
.upcoming-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.upcoming-name {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--c-text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.upcoming-meta {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px;
  color: var(--c-text-muted);
  flex-wrap: wrap;
}

/* ─────────── 공지사항 리스트 — 핀/팝업 칩 인라인 */

.tbl-notices tbody tr.notice-row-pinned td {
  background: rgba(99, 102, 241, .035);
}

.notice-cell {
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.notice-title {
  font-weight: 600;
  color: var(--c-text);
  cursor: pointer;
  text-decoration: none;
  transition: color var(--t-fast);
}
.notice-title:hover { color: var(--c-accent-text); text-decoration: underline; }

.notice-chip {
  display: inline-flex; align-items: center; gap: 3px;
  height: 20px; padding: 0 8px;
  border-radius: 999px;
  font-size: 11px; font-weight: 700;
  letter-spacing: -.005em;
  flex: 0 0 auto;
}
.notice-chip-pin {
  background: var(--c-accent-soft);
  color: var(--c-accent-text);
  border: 1px solid rgba(99, 102, 241, .22);
}
.notice-chip-popup {
  background: rgba(217, 119, 6, .12);
  color: var(--c-warning);
  border: 1px solid rgba(217, 119, 6, .25);
}

/* ─────────── Review form modal — 섹션형 폼 */

.fs { display: flex; flex-direction: column; gap: 22px; }
.fs-section { border-top: 1px solid var(--c-border-soft); padding-top: 18px; }
.fs-section:first-child { border-top: none; padding-top: 0; }
.fs-section-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.fs-section-head .num {
  width: 22px; height: 22px;
  border-radius: var(--r-pill);
  background: var(--c-accent-soft);
  color: var(--c-accent-text);
  font-size: 11.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 22px;
}
.fs-section-head .title {
  font-size: var(--fs-h3);
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: -.01em;
}
.fs-section-head .hint {
  font-size: var(--fs-small);
  color: var(--c-text-muted);
}

.fs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.fs-grid .full { grid-column: 1 / -1; }
.fs-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px 16px; }
.fs-grid-3 .full { grid-column: 1 / -1; }

.fs-help {
  font-size: var(--fs-small);
  color: var(--c-text-muted);
  margin-top: 6px;
  line-height: 1.5;
}

/* 입력 라벨 옆 필수 표시 */
.fs-req::after {
  content: '*';
  color: var(--c-danger);
  margin-left: 4px;
  font-weight: 700;
}

/* 기간 미리보기 핀 */
.fs-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: var(--c-accent-soft);
  color: var(--c-accent-text);
  border-radius: var(--r-md);
  font-size: var(--fs-small);
  font-weight: 600;
  margin-top: 8px;
}
.fs-pill .icon { width: 14px; height: 14px; }
.fs-pill .num { font-variant-numeric: tabular-nums; }
.fs-pill.muted {
  background: var(--c-surface);
  color: var(--c-text-muted);
  border: 1px dashed var(--c-border);
}

/* 옵션 카드 토글: 칩보다 큰 카드 형태 */
.opt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.opt-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: #fff;
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast);
  user-select: none;
}
.opt-card:hover { border-color: var(--c-border-strong); }
.opt-card input { display: none; }
.opt-card .knob-wrap {
  width: 32px; height: 18px;
  background: var(--c-border);
  border-radius: var(--r-pill);
  position: relative;
  transition: background var(--t-base);
  flex: 0 0 32px;
}
.opt-card .knob {
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: left var(--t-base);
}
.opt-card input:checked ~ .knob-wrap { background: var(--c-accent); }
.opt-card input:checked ~ .knob-wrap .knob { left: 16px; }
.opt-card.checked {
  border-color: var(--c-accent);
  background: var(--c-accent-soft);
}
.opt-card .text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.opt-card .text .label { font-size: var(--fs-body); font-weight: 600; color: var(--c-text); }
.opt-card .text .desc { font-size: 11.5px; color: var(--c-text-muted); }

/* 인라인 에러 라인 (입력 바로 아래) */
.fs-error {
  color: var(--c-danger-text);
  font-size: var(--fs-small);
  margin-top: 6px;
  display: flex; align-items: center; gap: 4px;
}
.fs-error::before {
  content: '!';
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--c-danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  flex: 0 0 14px;
}
.fs-error[hidden] { display: none !important; }

@media (max-width: 640px) {
  .fs-grid, .fs-grid-3, .opt-grid { grid-template-columns: 1fr; }
}
