:root {
  color-scheme: light;
  --ink: #24243a;
  --muted: #818196;
  --line: #ecebf3;
  --paper: #ffffff;
  --canvas: #f8f7fb;
  --blue: #526df3;
  --blue-soft: #edf0ff;
  --violet: #8870cb;
  --rose: #d87582;
  --green: #368b70;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); min-width: 280px; }
button, input { font: inherit; }
button { color: inherit; }
.hidden { display: none !important; }

.member-login { position: relative; isolation: isolate; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 440px); grid-template-rows: 1fr auto; align-items: center; gap: 5vw; padding: 6vh clamp(28px, 7vw, 112px); overflow: hidden; background: #100f10; color: #f7f2e9; }
.member-login::before, .member-login::after { position: absolute; z-index: -1; inset: 0; content: ""; }
.member-login::before { background: url('/static/iyou-login-hero.png') 47% center / cover no-repeat; filter: saturate(.45); }
.member-login::after { background: linear-gradient(90deg, #0a090a66 0%, #0b0a0bd1 44%, #0d0c0df2 100%), linear-gradient(0deg, #0a090a80, transparent 35%); }
.login-brand, .wordmark { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); font-size: 22px; font-weight: 750; text-decoration: none; }
.login-brand { grid-column: 1; grid-row: 1; align-self: start; }
.login-brand img { display: block; width: min(310px, 32vw); height: auto; mix-blend-mode: screen; }
.login-brand small, .wordmark small { display: block; margin-top: 2px; color: #9090a7; font-size: 9px; font-weight: 650; letter-spacing: 2px; }
.brand-mark { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 12px; background: var(--blue); color: white; font-size: 14px; font-weight: 750; }
.login-content { grid-column: 2; grid-row: 1; width: 100%; align-self: center; justify-self: end; padding: 39px 38px 30px; border: 1px solid #c4a66b52; border-radius: 12px; background: #121112e8; box-shadow: 0 24px 90px #0009, inset 0 1px #ffffff0c; backdrop-filter: blur(18px); }
.eyebrow { margin: 0 0 11px; color: var(--violet); font-size: 10px; font-weight: 750; letter-spacing: 1.6px; }
.login-content .eyebrow { color: #c8ad76; letter-spacing: 2.4px; }
.login-content h1 { margin: 0; color: #f8f3e9; font-size: 30px; line-height: 1.35; }
.login-copy { margin: 8px 0 29px; color: #b7a990; font-size: 13px; letter-spacing: 2px; }
.login-form { display: grid; gap: 18px; }
.login-form label { display: grid; gap: 9px; color: #d1c7b8; font-size: 12px; font-weight: 550; }
.login-form input { width: 100%; height: 50px; padding: 0 14px; border: 1px solid #ffffff1c; border-radius: 6px; outline: none; background: #ffffff08; color: #fffaf0; }
.login-form input::placeholder { color: #817a70; }
.login-form input:focus { border-color: #c3a36a; box-shadow: 0 0 0 3px #c3a36a20; }
.primary-button { height: 49px; display: flex; align-items: center; justify-content: space-between; margin-top: 5px; padding: 0 17px; border: 1px solid #dfc88e; border-radius: 6px; background: linear-gradient(110deg, #d2b779, #b3935b); color: #18140d; font-weight: 700; cursor: pointer; }
.primary-button:disabled { opacity: .65; cursor: wait; }
.login-error { min-height: 18px; margin: -9px 0 0; color: #f28f85; font-size: 12px; }
.login-membership { margin-top: 10px; color: #938878; font-size: 11px; }
.login-membership span { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: #c3a36a; vertical-align: 1px; }
.login-footer { grid-column: 1 / -1; grid-row: 2; display: flex; justify-content: space-between; margin: 0; color: #c4bba8; font-size: 10px; letter-spacing: 1.3px; }

.member-app { min-height: 100vh; }
.side-rail { position: fixed; inset: 0 auto 0 0; z-index: 3; width: 244px; display: flex; flex-direction: column; padding: 28px 17px 18px; border-right: 1px solid var(--line); background: var(--paper); }
.wordmark { padding: 0 10px; font-size: 20px; }
.wordmark .brand-mark { width: 36px; height: 36px; }
.rail-label { margin: 48px 11px 12px; color: #a1a0b1; font-size: 10px; font-weight: 700; }
.side-nav { display: grid; gap: 6px; }
.nav-link { min-height: 46px; display: flex; align-items: center; gap: 12px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: #68687c; text-align: left; font-size: 13px; cursor: pointer; }
.nav-link.active { background: #eef0ff; color: #405fe7; font-weight: 680; }
.nav-icon { width: 20px; color: #777caa; font-size: 16px; text-align: center; }
.nav-link.active .nav-icon { color: var(--blue); }
.rail-account { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 17px 4px 0; border-top: 1px solid var(--line); }
.avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #f0eafb; color: #735bb5; font-weight: 700; }
.rail-account > span:nth-child(2) { min-width: 0; flex: 1; display: grid; gap: 4px; }
.rail-account strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.rail-account small { color: var(--muted); font-size: 10px; }
.logout, .mobile-logout, .refresh-button { appearance: none; -webkit-appearance: none; flex: none; width: 36px; height: 36px; display: inline-grid; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #87734d; cursor: pointer; touch-action: manipulation; }
.action-icon { display: block; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.logout:focus-visible, .mobile-logout:focus-visible, .refresh-button:focus-visible { outline: 2px solid #af8a4b; outline-offset: 2px; }
.refresh-button:disabled { opacity: .4; cursor: wait; }
@media (hover: hover) {
  .logout:hover, .mobile-logout:hover, .refresh-button:hover:not(:disabled) { background: #f2ede3; border-color: #e3d6c1; }
}
.logout:active, .mobile-logout:active, .refresh-button:active:not(:disabled) { background: #eae1d1; }

.member-main { width: calc(100% - 244px); min-height: 100vh; margin-left: 244px; }
.topbar { height: 62px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(24px, 5vw, 72px); border-bottom: 1px solid var(--line); background: #fff; }
.topbar-brand { color: #89899d; font-size: 11px; }
.topbar-brand i { margin: 0 10px; color: #c5c4d0; font-style: normal; }
.topbar-brand b { color: #535369; font-weight: 600; }
.topbar-tools { display: flex; align-items: center; gap: 5px; }
.mobile-member-name, .mobile-logout { display: none; }
.page-wrap { width: min(100%, 1180px); margin: 0 auto; padding: 42px clamp(22px, 5vw, 72px) 56px; }
.welcome-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 29px; }
.welcome-row h1 { margin: 0; font-size: 28px; line-height: 1.3; }
.welcome-row > div > p:last-child { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.member-badge { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid #e4eee9; border-radius: 20px; background: #f4fbf8; color: #47816d; font-size: 10px; white-space: nowrap; }
.member-badge span { width: 6px; height: 6px; border-radius: 50%; background: #55a986; }
.page-section { display: grid; gap: 19px; }
.content-panel { border: 1px solid var(--line); border-radius: 10px; background: white; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 13px; }
.panel-heading h2 { margin: 0; font-size: 15px; }
.panel-heading p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.record-count { color: #9292a5; font-size: 10px; }
.transactions { padding: 0 22px; }
.transaction-row { min-height: 78px; display: flex; align-items: center; gap: 12px; border-top: 1px solid #f0eff5; }
.transaction-icon { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; font-size: 17px; }
.transaction-icon.credit { background: #e9f6f1; color: var(--green); }
.transaction-icon.debit { background: #fff0f1; color: var(--rose); }
.transaction-info { min-width: 0; flex: 1; display: grid; gap: 4px; }
.transaction-info strong { font-size: 12px; }
.transaction-info small { overflow: hidden; color: #8b8b9e; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.transaction-info time { color: #a3a2b2; font-size: 9px; }
.transaction-value { min-width: 100px; text-align: right; font-size: 13px; font-weight: 700; }
.transaction-value.credit { color: var(--green); }
.transaction-value.debit { color: #be6573; }
.transaction-value small { display: block; margin-top: 5px; color: #9292a4; font-size: 9px; font-weight: 450; }
.more-button { width: calc(100% - 44px); height: 38px; margin: 4px 22px 17px; border: 1px solid var(--line); border-radius: 7px; background: white; color: #6a6a83; font-size: 11px; cursor: pointer; }
.empty-state { min-height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 26px; color: #77778e; text-align: center; }
.empty-mark { width: 36px; height: 36px; display: grid; place-items: center; margin-bottom: 11px; border-radius: 50%; background: #f1effa; color: #8c7abe; font-size: 11px; font-weight: 750; }
.empty-state strong { color: #515167; font-size: 12px; }
.empty-state p { margin: 7px 0 0; color: #9999aa; font-size: 10px; }

.section-intro { display: flex; align-items: center; gap: 15px; padding: 4px 0 7px; }
.intro-symbol { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: #f2effb; color: #826bc2; font-size: 21px; }
.warning-symbol { background: #fff4e9; color: #c38749; }
.notice-symbol { background: #eaf5f3; color: #458f80; }
.section-intro .eyebrow { margin-bottom: 4px; }
.section-intro h2 { margin: 0; font-size: 20px; }
.section-intro p:last-child { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.ranking-list { padding: 4px 22px; }
.ranking-row { min-height: 64px; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid #f0eff5; }
.ranking-row:last-child { border-bottom: 0; }
.rank-number { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; background: #f4f3f8; color: #77768c; font-size: 11px; font-weight: 700; }
.rank-number.rank-1 { background: #fff1d9; color: #b27b22; }
.rank-number.rank-2 { background: #eef0f5; color: #737e95; }
.rank-number.rank-3 { background: #f8ece5; color: #ac7657; }
.ranking-name { flex: 1; font-size: 13px; font-weight: 650; }
.ranking-note { color: #9695a7; font-size: 10px; }
.notice-list { display: grid; gap: 12px; }
.notice-card { padding: 20px 22px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.notice-meta { display: flex; justify-content: space-between; gap: 12px; color: #9291a5; font-size: 10px; }
.notice-meta span { color: #6872bd; font-weight: 650; }
.punishment-card .notice-meta span { color: #b67a3b; }
.notice-card h3 { margin: 13px 0 8px; font-size: 15px; }
.notice-card > p { margin: 0; color: #6f6f82; font-size: 12px; line-height: 1.8; white-space: normal; }
.punishment-facts { display: flex; flex-wrap: wrap; gap: 8px 17px; margin: 12px 0; color: #9998a8; font-size: 10px; }
.punishment-facts strong { margin-left: 4px; color: #56566b; font-weight: 600; }
.member-footer { display: flex; justify-content: space-between; width: min(100%, 1180px); margin: 0 auto; padding: 0 clamp(22px, 5vw, 72px) 22px; color: #a0a0af; font-size: 10px; }
.member-footer span { color: #b2b1be; }
.mobile-nav { display: none; }
.toast { position: fixed; z-index: 8; right: 20px; bottom: 20px; padding: 12px 16px; border-radius: 8px; background: #29283c; color: white; font-size: 12px; }

@media (max-width: 900px) {
  .side-rail { width: 208px; }
  .member-main { width: calc(100% - 208px); margin-left: 208px; }
  .page-wrap { padding-top: 34px; }
}

@media (max-width: 680px) {
  body { background: #fbfaff; }
  .member-login { min-height: 100svh; grid-template-columns: 1fr; grid-template-rows: minmax(120px, 1fr) auto minmax(68px, .7fr) auto; gap: 0; padding: max(24px, env(safe-area-inset-top)) 20px max(18px, env(safe-area-inset-bottom)); }
  .member-login::before { background-position: 57% center; }
  .member-login::after { background: linear-gradient(180deg, #0b0a0a42, #0b0a0a85 28%, #0b0a0af0 57%, #0b0a0af5); }
  .login-brand { grid-column: 1; grid-row: 1; align-self: center; justify-self: center; }
  .login-brand img { width: min(260px, 72vw); }
  .login-content { grid-column: 1; grid-row: 2; justify-self: center; padding: 27px 22px 23px; border-radius: 9px; }
  .login-content h1 { font-size: 26px; }
  .login-copy { margin-bottom: 23px; font-size: 12px; }
  .login-footer { grid-column: 1; grid-row: 4; align-self: end; font-size: 9px; letter-spacing: .7px; }
  .side-rail { display: none; }
  .member-main { width: 100%; min-height: 100svh; margin: 0; padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .topbar { height: 52px; padding: 0 17px; }
  .mobile-member-name { display: inline; max-width: 90px; overflow: hidden; color: #737388; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-logout { display: inline-grid; }
  .page-wrap { padding: 25px 17px 38px; }
  .welcome-row { align-items: start; margin-bottom: 20px; }
  .welcome-row h1 { font-size: 23px; }
  .welcome-row > div > p:last-child { font-size: 11px; }
  .member-badge { padding: 7px 9px; font-size: 9px; }
  .content-panel { border-radius: 9px; }
  .panel-heading { padding: 17px 16px 11px; }
  .transactions { padding: 0 15px; }
  .transaction-row { gap: 9px; min-height: 75px; }
  .transaction-icon { width: 30px; height: 30px; }
  .transaction-value { min-width: 83px; font-size: 12px; }
  .transaction-info strong { font-size: 13px; }
  .transaction-info small { max-width: 185px; font-size: 12px; white-space: normal; overflow-wrap: anywhere; line-height: 1.5; }
  .transaction-info time, .transaction-value small { font-size: 11px; }
  .transaction-row { padding: 12px 0; }
  .login-form input { font-size: 16px; }
  .more-button { width: calc(100% - 30px); margin-right: 15px; margin-left: 15px; }
  .section-intro { gap: 11px; }
  .intro-symbol { width: 42px; height: 42px; }
  .section-intro h2 { font-size: 18px; }
  .ranking-list { padding: 3px 15px; }
  .ranking-row { gap: 10px; }
  .ranking-note { max-width: 100px; text-align: right; }
  .notice-card { padding: 17px 16px; }
  .notice-card h3 { font-size: 14px; }
  .notice-card > p { font-size: 14px; }
  .member-footer { padding: 0 17px 7px; font-size: 9px; }
  .mobile-nav { position: fixed; z-index: 5; inset: auto 0 0; display: grid; grid-template-columns: repeat(4, 1fr); padding: 7px 6px calc(7px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fffffff2; backdrop-filter: blur(16px); }
  .mobile-nav button { min-width: 0; display: grid; justify-items: center; gap: 4px; padding: 4px 1px; border: 0; background: transparent; color: #89889c; font-size: 11px; white-space: nowrap; }
  .mobile-nav button span { font-size: 17px; line-height: 1; }
  .mobile-nav button.active { color: var(--blue); font-weight: 700; }
  .toast { right: 12px; bottom: calc(77px + env(safe-area-inset-bottom)); left: 12px; text-align: center; }
}
