:root {
  --blue: #0087eb;
  --blue-deep: #006fc9;
  --cream: #ffe0ae;
  --sky: #b1e3ff;
  --ink: #111827;
  --white: #ffffff;
  --muted: #667085;
  --success: #17a673;
  --warning: #e89b24;
  --danger: #e34f5f;
  --info: #0087eb;
  --surface: rgba(255, 255, 255, 0.58);
  --surface-strong: rgba(255, 255, 255, 0.78);
  --surface-soft: rgba(255, 255, 255, 0.42);
  --stroke: rgba(255, 255, 255, 0.72);
  --stroke-dark: rgba(17, 24, 39, 0.08);
  --shadow: 0 22px 60px rgba(31, 80, 120, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.78);
  --shadow-small: 0 10px 30px rgba(37, 77, 110, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.75);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --sidebar-width: 258px;
  --ease: 220ms cubic-bezier(.22,.8,.3,1);
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(177, 227, 255, .72), transparent 30%),
    radial-gradient(circle at 88% 2%, rgba(255, 224, 174, .55), transparent 27%),
    linear-gradient(145deg, #f6fbff 0%, #eef8ff 44%, #fff9ef 100%);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", "Noto Sans TC", sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

[hidden] { display: none !important; }
.login-screen { min-height: 100dvh; display: grid; place-items: center; padding: 24px; position: relative; z-index: 10; }
.login-card { width: min(440px, 100%); border-radius: 30px; padding: 34px; box-shadow: 0 30px 80px rgba(0,111,201,.16); }
.login-brand { display: flex; align-items: center; gap: 12px; }
.login-brand > div { display: flex; flex-direction: column; }
.login-brand strong { font-size: 15px; }
.login-brand small { color: var(--muted); margin-top: 3px; }
.login-heading { margin: 34px 0 24px; }
.login-kicker { color: var(--primary, #087ad1); font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.login-heading h1 { margin: 8px 0; font-size: clamp(27px, 7vw, 36px); letter-spacing: -.04em; }
.login-heading p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.login-form { display: grid; gap: 16px; }
.login-form label { display: grid; gap: 7px; color: #334155; font-size: 13px; font-weight: 700; }
.login-form input { width: 100%; min-height: 50px; border: 1px solid rgba(97,163,205,.28); border-radius: 15px; background: rgba(255,255,255,.78); padding: 0 15px; color: #14213d; font: inherit; outline: none; }
.login-form input:focus { border-color: #1687d9; box-shadow: 0 0 0 4px rgba(22,135,217,.12); }
.login-submit { min-height: 50px; margin-top: 2px; }
.login-submit:disabled { opacity: .6; cursor: wait; }
.login-error { min-height: 18px; margin: -5px 0 -3px; color: #c62828; font-size: 12px; }
.login-footnote { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 24px 0 0; color: var(--muted); font-size: 11px; }
.user-admin-list { display: grid; gap: 8px; margin-top: 14px; }
.user-admin-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 14px; background: rgba(255,255,255,.52); }
.user-admin-row strong, .user-admin-row small { display: block; }
.user-admin-row small { color: var(--muted); margin-top: 3px; }
@media (max-width: 520px) { .login-screen { padding: 12px; } .login-card { padding: 25px 20px; border-radius: 26px; } }
button, input, select { font: inherit; }
button { color: inherit; }
a { color: inherit; }

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(12px);
  pointer-events: none;
  z-index: -1;
  opacity: .75;
}
.ambient-a { width: 360px; height: 360px; background: rgba(0,135,235,.13); top: -100px; left: 18%; }
.ambient-b { width: 460px; height: 460px; background: rgba(255,224,174,.35); right: -120px; top: 24%; }
.ambient-c { width: 300px; height: 300px; background: rgba(177,227,255,.52); left: 38%; bottom: -140px; }

.glass-panel,
.glass-bar {
  background: linear-gradient(140deg, rgba(255,255,255,.76), rgba(255,255,255,.42));
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  backdrop-filter: blur(28px) saturate(155%);
  -webkit-backdrop-filter: blur(28px) saturate(155%);
}
.glass-bar { box-shadow: var(--shadow-small); }

.app-shell { min-height: 100vh; padding: 14px; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); gap: 14px; }
.sidebar {
  height: calc(100vh - 28px);
  border-radius: var(--radius-xl);
  position: sticky;
  top: 14px;
  padding: 18px 14px 14px;
  display: flex;
  flex-direction: column;
  z-index: 20;
  transition: width var(--ease), transform var(--ease);
  overflow: hidden;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 6px 19px; }
.brand-mark {
  width: 46px; height: 46px; border-radius: 16px;
  display: grid; place-items: center;
  color: white; font-weight: 800; font-size: 22px;
  background: linear-gradient(145deg, #23a9ff, #0074d1);
  box-shadow: 0 12px 25px rgba(0,135,235,.25), inset 0 1px 1px rgba(255,255,255,.6);
  flex: 0 0 auto;
}
.brand-copy { display: flex; flex-direction: column; min-width: 0; }
.brand-copy strong { font-size: 16px; letter-spacing: -.2px; }
.brand-copy span { color: var(--muted); font-size: 11px; margin-top: 2px; letter-spacing: .7px; text-transform: uppercase; }
.side-nav { display: flex; flex-direction: column; gap: 6px; }
.nav-button {
  width: 100%; min-height: 48px; border: 0; background: transparent; border-radius: 16px;
  display: flex; align-items: center; gap: 13px; padding: 0 14px; cursor: pointer;
  color: #566174; font-weight: 650; position: relative; transition: var(--ease); text-align: left;
}
.nav-button:hover { background: rgba(255,255,255,.6); color: var(--ink); transform: translateY(-1px); }
.nav-button.active { color: var(--blue-deep); background: rgba(255,255,255,.76); box-shadow: 0 8px 20px rgba(36,90,130,.08), inset 0 0 0 1px rgba(255,255,255,.55); }
.nav-button.active::before { content: ""; position: absolute; left: 4px; width: 4px; height: 22px; border-radius: 99px; background: var(--blue); }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.nav-badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center; background: rgba(0,135,235,.12); color: var(--blue-deep); font-size: 11px; font-weight: 800; }
.sidebar-footer { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 12px 5px 0; border-top: 1px solid rgba(17,24,39,.06); }
.system-mini { display: flex; align-items: center; gap: 9px; padding: 9px; min-width: 0; flex: 1; }
.system-mini > div { display: flex; flex-direction: column; min-width: 0; }
.system-mini strong { font-size: 12px; white-space: nowrap; }
.system-mini small { font-size: 10px; color: var(--muted); margin-top: 2px; white-space: nowrap; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.status-dot.success { background: var(--success); box-shadow: 0 0 0 5px rgba(23,166,115,.10); }

.workspace { min-width: 0; }
.topbar {
  position: sticky; top: 14px; z-index: 15;
  border-radius: 24px; min-height: 76px; padding: 12px 16px 12px 22px;
  display: flex; justify-content: space-between; align-items: center; gap: 18px;
}
.topbar-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-title p { margin: 0 0 3px; color: var(--blue-deep); font-size: 11px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; }
.topbar-title h1 { margin: 0; font-size: clamp(20px, 2vw, 27px); letter-spacing: -.7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.live-indicator { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 13px; border-radius: 15px; background: rgba(255,255,255,.55); color: #4a596b; font-size: 12px; font-weight: 700; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 rgba(23,166,115,.25); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(23,166,115,0); } 100% { box-shadow: 0 0 0 0 rgba(23,166,115,0); } }
.icon-button {
  width: 44px; height: 44px; border-radius: 15px; border: 1px solid rgba(255,255,255,.65);
  background: rgba(255,255,255,.58); display: grid; place-items: center; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75); transition: var(--ease); position: relative;
}
.icon-button:hover { background: rgba(255,255,255,.85); transform: translateY(-1px); }
.notification-badge { position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; border-radius: 99px; padding: 0 5px; display: grid; place-items: center; background: var(--danger); color: white; font-size: 10px; font-weight: 800; border: 2px solid #f4fbff; }
.profile-button { height: 48px; border: 0; border-radius: 16px; background: rgba(255,255,255,.58); padding: 4px 10px 4px 5px; display: flex; align-items: center; gap: 9px; cursor: pointer; }
.avatar { width: 38px; height: 38px; border-radius: 13px; background: linear-gradient(145deg, var(--cream), #ffc76f); display: grid; place-items: center; font-size: 12px; font-weight: 900; color: #6e4707; }
.profile-copy { display: flex; flex-direction: column; text-align: left; line-height: 1.1; }
.profile-copy strong { font-size: 12px; }
.profile-copy small { color: var(--muted); font-size: 10px; margin-top: 3px; }
.mobile-menu-button { display: none; }

.main-content { padding: 18px 2px 110px; }
.page { display: none; animation: pageIn .35s ease both; }
.page.active { display: block; }
@keyframes pageIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin: 6px 2px 13px; }
.section-heading h2 { margin: 0; font-size: 18px; letter-spacing: -.35px; }
.section-heading p { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.text-button { border: 0; background: transparent; color: var(--blue-deep); min-height: 40px; padding: 0 10px; font-weight: 800; cursor: pointer; border-radius: 12px; }
.text-button:hover { background: rgba(0,135,235,.08); }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .85fr); gap: 14px; }
.hero-card { min-height: 224px; border-radius: var(--radius-xl); padding: clamp(22px, 3vw, 34px); position: relative; overflow: hidden; }
.hero-card::after { content: ""; position: absolute; width: 260px; height: 260px; right: -70px; top: -95px; border-radius: 50%; background: linear-gradient(145deg, rgba(177,227,255,.74), rgba(255,255,255,.15)); border: 1px solid rgba(255,255,255,.7); box-shadow: inset 0 0 40px rgba(255,255,255,.5); }
.hero-card::before { content: ""; position: absolute; width: 130px; height: 130px; right: 110px; bottom: -70px; border-radius: 50%; background: rgba(255,224,174,.45); filter: blur(2px); }
.eyebrow { margin: 0 0 8px; color: var(--blue-deep); font-size: 11px; font-weight: 850; letter-spacing: .9px; text-transform: uppercase; }
.hero-card h2 { margin: 0; max-width: 590px; font-size: clamp(26px, 3.1vw, 43px); line-height: 1.06; letter-spacing: -1.5px; position: relative; z-index: 2; }
.hero-card h2 span { color: var(--blue); }
.hero-card > p:not(.eyebrow) { max-width: 540px; margin: 14px 0 22px; color: #526073; line-height: 1.7; font-size: 13px; position: relative; z-index: 2; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 9px; position: relative; z-index: 2; }
.primary-button, .secondary-button, .danger-button {
  min-height: 46px; border-radius: 15px; padding: 0 17px; border: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; font-weight: 800; transition: var(--ease);
}
.primary-button { color: white; background: linear-gradient(145deg, #1ca0ff, var(--blue-deep)); box-shadow: 0 11px 24px rgba(0,135,235,.22), inset 0 1px 0 rgba(255,255,255,.28); }
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 15px 28px rgba(0,135,235,.28); }
.secondary-button { background: rgba(255,255,255,.64); border: 1px solid rgba(255,255,255,.78); color: var(--ink); }
.secondary-button:hover { background: rgba(255,255,255,.88); }
.danger-button { background: rgba(227,79,95,.1); color: #c93244; }

.focus-card { border-radius: var(--radius-xl); padding: 20px; min-height: 224px; }
.focus-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.focus-header h3 { margin: 0; font-size: 16px; }
.count-chip { min-width: 31px; height: 27px; padding: 0 9px; border-radius: 99px; display: grid; place-items: center; color: #a96400; background: rgba(255,224,174,.72); font-size: 11px; font-weight: 900; }
.focus-list { margin-top: 14px; display: flex; flex-direction: column; gap: 9px; }
.focus-item { display: grid; grid-template-columns: 36px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 10px; border-radius: 16px; background: rgba(255,255,255,.52); cursor: pointer; transition: var(--ease); }
.focus-item:hover { background: rgba(255,255,255,.78); transform: translateX(2px); }
.focus-icon { width: 36px; height: 36px; border-radius: 13px; display: grid; place-items: center; }
.focus-icon.danger { color: var(--danger); background: rgba(227,79,95,.11); }
.focus-icon.warning { color: #c77900; background: rgba(255,224,174,.58); }
.focus-icon.info { color: var(--blue); background: rgba(177,227,255,.48); }
.focus-copy { min-width: 0; }
.focus-copy strong { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.focus-copy small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chevron { color: #8a96a7; }

.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.metric-card { border-radius: 23px; padding: 17px 18px; min-height: 122px; position: relative; overflow: hidden; }
.metric-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.metric-icon { width: 39px; height: 39px; border-radius: 14px; display: grid; place-items: center; background: rgba(177,227,255,.38); color: var(--blue-deep); }
.metric-card.warning .metric-icon { background: rgba(255,224,174,.55); color: #b36d00; }
.metric-card.danger .metric-icon { background: rgba(227,79,95,.1); color: var(--danger); }
.metric-card.success .metric-icon { background: rgba(23,166,115,.1); color: var(--success); }
.trend { font-size: 10px; color: var(--muted); background: rgba(255,255,255,.5); border-radius: 99px; padding: 5px 8px; }
.metric-number { margin-top: 13px; display: flex; align-items: end; gap: 7px; }
.metric-number strong { font-size: 29px; line-height: 1; letter-spacing: -1px; }
.metric-number span { color: var(--muted); font-size: 11px; margin-bottom: 3px; }
.metric-label { margin-top: 7px; color: #536073; font-size: 11px; font-weight: 650; }

.dashboard-lower { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .72fr); gap: 14px; margin-top: 14px; }
.panel { border-radius: var(--radius-xl); padding: 18px; min-width: 0; }
.panel-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.panel-header h3 { margin: 0; font-size: 16px; }
.panel-header p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.segmented { display: inline-flex; gap: 3px; padding: 4px; background: rgba(255,255,255,.45); border-radius: 14px; }
.segmented button { border: 0; background: transparent; min-height: 34px; padding: 0 12px; border-radius: 11px; color: var(--muted); font-size: 11px; font-weight: 750; cursor: pointer; }
.segmented button.active { background: rgba(255,255,255,.86); color: var(--ink); box-shadow: 0 4px 13px rgba(35,71,105,.08); }

.compact-post-list { display: flex; flex-direction: column; gap: 7px; }
.compact-post { display: grid; grid-template-columns: 9px minmax(120px,.55fr) minmax(0,1.5fr) minmax(90px,.45fr) auto; gap: 12px; align-items: center; min-height: 59px; padding: 9px 11px; border-radius: 16px; background: rgba(255,255,255,.42); cursor: pointer; transition: var(--ease); }
.compact-post:hover { background: rgba(255,255,255,.72); }
.compact-post .account { font-weight: 800; font-size: 11px; }
.compact-post .post-title { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compact-post .time { text-align: right; font-size: 11px; font-variant-numeric: tabular-nums; }
.compact-post .time strong { display: block; }
.compact-post .time small { color: var(--muted); }
.status-line { width: 8px; height: 31px; border-radius: 99px; }
.status-line.normal { background: var(--success); }
.status-line.warning { background: var(--warning); }
.status-line.action { background: var(--blue); }
.status-line.error { background: var(--danger); }
.status-line.running { background: var(--blue); animation: softBlink 1.5s infinite; }
@keyframes softBlink { 50% { opacity: .35; } }
.status-pill { display: inline-flex; align-items: center; justify-content: center; min-height: 27px; border-radius: 99px; padding: 0 9px; font-size: 10px; font-weight: 850; white-space: nowrap; }
.status-pill.normal, .status-pill.success { background: rgba(23,166,115,.10); color: #0c8158; }
.status-pill.warning { background: rgba(255,224,174,.62); color: #a56100; }
.status-pill.action, .status-pill.running { background: rgba(0,135,235,.10); color: var(--blue-deep); }
.status-pill.error { background: rgba(227,79,95,.1); color: #c63243; }
.status-pill.paused { background: rgba(102,112,133,.12); color: #667085; }

.account-health-list { display: flex; flex-direction: column; gap: 10px; }
.account-health { display: grid; grid-template-columns: 39px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 10px; border-radius: 16px; background: rgba(255,255,255,.42); cursor: pointer; }
.account-avatar { width: 39px; height: 39px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(145deg, rgba(177,227,255,.75), rgba(255,255,255,.58)); color: var(--blue-deep); font-weight: 900; font-size: 12px; }
.account-health strong { display: block; font-size: 12px; }
.account-health small { display: block; color: var(--muted); font-size: 10px; margin-top: 4px; }
.health-ring { width: 29px; height: 29px; border-radius: 50%; display: grid; place-items: center; font-size: 9px; font-weight: 900; background: conic-gradient(var(--success) 94%, rgba(17,24,39,.08) 0); position: relative; }
.health-ring::after { content: ""; position: absolute; inset: 4px; background: rgba(255,255,255,.88); border-radius: 50%; }
.health-ring span { z-index: 1; }

.page-intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; margin: 7px 3px 15px; }
.page-intro h2 { margin: 0; font-size: clamp(23px,2.4vw,32px); letter-spacing: -.9px; }
.page-intro p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.page-intro-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.filter-bar { border-radius: 22px; padding: 10px; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.search-field { min-height: 46px; flex: 1 1 260px; min-width: 190px; position: relative; }
.search-field .icon { position: absolute; left: 14px; top: 13px; color: #8c98a9; }
.search-field input { width: 100%; height: 46px; border-radius: 15px; border: 1px solid rgba(255,255,255,.7); outline: 0; background: rgba(255,255,255,.56); padding: 0 14px 0 43px; color: var(--ink); }
.search-field input:focus { border-color: rgba(0,135,235,.42); box-shadow: 0 0 0 4px rgba(0,135,235,.08); }
.filter-select { height: 46px; border: 1px solid rgba(255,255,255,.72); border-radius: 15px; padding: 0 34px 0 13px; background: rgba(255,255,255,.56); color: #49576a; outline: 0; cursor: pointer; }

.monitor-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 12px; align-items: start; }
.account-rail { border-radius: 24px; padding: 13px; position: sticky; top: 104px; }
.rail-label { color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .7px; text-transform: uppercase; padding: 4px 8px 10px; }
.rail-account { width: 100%; border: 0; min-height: 49px; background: transparent; border-radius: 14px; padding: 7px 9px; display: flex; align-items: center; gap: 9px; cursor: pointer; text-align: left; transition: var(--ease); }
.rail-account:hover, .rail-account.active { background: rgba(255,255,255,.68); }
.rail-account.active { box-shadow: inset 0 0 0 1px rgba(255,255,255,.75); }
.rail-account .mini-avatar { width: 33px; height: 33px; border-radius: 11px; background: rgba(177,227,255,.4); color: var(--blue-deep); display: grid; place-items: center; font-size: 10px; font-weight: 850; flex: 0 0 auto; }
.rail-account > span:nth-child(2) { min-width: 0; flex: 1; }
.rail-account strong { display: block; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-account small { display: block; color: var(--muted); font-size: 9px; margin-top: 3px; }
.rail-count { font-size: 10px; color: var(--muted); }

.data-panel { border-radius: 25px; overflow: hidden; min-width: 0; }
.table-summary { padding: 14px 16px 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.table-summary p { margin: 0; color: var(--muted); font-size: 11px; }
.bulk-actions { display: flex; gap: 7px; }
.mini-button { min-height: 36px; border-radius: 12px; border: 1px solid rgba(255,255,255,.72); padding: 0 11px; background: rgba(255,255,255,.54); font-size: 10px; font-weight: 800; cursor: pointer; }
.mini-button:hover { background: rgba(255,255,255,.85); }
.table-wrap { overflow: auto; }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 920px; }
.data-table th { height: 43px; padding: 0 11px; text-align: left; color: #7a8798; font-size: 9px; font-weight: 850; letter-spacing: .4px; text-transform: uppercase; border-top: 1px solid rgba(17,24,39,.04); border-bottom: 1px solid rgba(17,24,39,.05); background: rgba(255,255,255,.30); position: sticky; top: 0; z-index: 2; }
.data-table td { padding: 11px; border-bottom: 1px solid rgba(17,24,39,.052); vertical-align: middle; font-size: 11px; background: rgba(255,255,255,.24); }
.data-table tr { cursor: pointer; transition: var(--ease); }
.data-table tbody tr:hover td { background: rgba(255,255,255,.58); }
.check { width: 17px; height: 17px; accent-color: var(--blue); }
.account-cell strong { display: block; font-size: 11px; }
.account-cell small, .post-cell small { display: block; color: var(--muted); font-size: 9px; margin-top: 4px; }
.post-cell { max-width: 310px; }
.post-cell strong { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; line-height: 1.45; }
.time-cell { font-variant-numeric: tabular-nums; white-space: nowrap; }
.time-cell strong { display: block; font-size: 11px; }
.last-success-date, .last-success-time { display: block; line-height: 1.35; }
.last-success-time { color: var(--ink); }
.time-cell small { display: block; color: var(--muted); margin-top: 4px; font-size: 9px; }
.countdown { color: var(--blue-deep); font-weight: 850; }
.countdown.urgent { color: var(--danger); }
.switch { position: relative; width: 43px; height: 25px; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; border-radius: 99px; background: rgba(102,112,133,.2); cursor: pointer; transition: var(--ease); }
.slider::before { content: ""; position: absolute; width: 19px; height: 19px; left: 3px; top: 3px; border-radius: 50%; background: white; box-shadow: 0 3px 8px rgba(17,24,39,.15); transition: var(--ease); }
.switch input:checked + .slider { background: var(--blue); }
.switch input:checked + .slider::before { transform: translateX(18px); }
.row-action { width: 35px; height: 35px; border-radius: 12px; border: 0; background: rgba(255,255,255,.58); cursor: pointer; display: grid; place-items: center; }
.mobile-post-list { display: none; }

.accounts-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.account-card { border-radius: 24px; padding: 16px; cursor: pointer; transition: var(--ease); }
.account-card:hover { transform: translateY(-2px); box-shadow: 0 25px 65px rgba(31,80,120,.15), inset 0 1px 0 rgba(255,255,255,.8); }
.account-card-head { display: flex; align-items: center; gap: 11px; }
.account-card-head .account-avatar { width: 45px; height: 45px; border-radius: 15px; }
.account-card-head > div:nth-child(2) { min-width: 0; flex: 1; }
.account-card-head h3 { margin: 0; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-card-head p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.health-badge { min-height: 26px; padding: 0 8px; border-radius: 99px; display: inline-flex; align-items: center; font-size: 9px; font-weight: 850; }
.health-badge.normal { color: #0c8158; background: rgba(23,166,115,.1); }
.health-badge.warning { color: #a56100; background: rgba(255,224,174,.62); }
.health-badge.error { color: #c63243; background: rgba(227,79,95,.1); }
.account-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; margin-top: 15px; }
.account-stat { border-radius: 14px; background: rgba(255,255,255,.45); padding: 10px; }
.account-stat span { display: block; color: var(--muted); font-size: 9px; }
.account-stat strong { display: block; margin-top: 5px; font-size: 11px; }
.account-card-footer { display: flex; justify-content: space-between; align-items: center; gap: 9px; margin-top: 13px; padding-top: 12px; border-top: 1px solid rgba(17,24,39,.06); }
.account-card-footer span { color: var(--muted); font-size: 10px; }

.renewal-board { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-bottom: 12px; }
.renewal-stage { border-radius: 20px; padding: 14px; }
.renewal-stage span { color: var(--muted); font-size: 10px; }
.renewal-stage strong { display: block; margin-top: 6px; font-size: 24px; }
.renewal-list { display: flex; flex-direction: column; gap: 8px; }
.renewal-row { display: grid; grid-template-columns: minmax(110px,.5fr) minmax(0,1.4fr) 120px 135px auto; gap: 11px; align-items: center; padding: 12px; border-radius: 17px; background: rgba(255,255,255,.43); }
.renewal-row strong { font-size: 11px; }
.renewal-row small { display: block; color: var(--muted); margin-top: 4px; font-size: 9px; }
.code-box { padding: 8px 10px; border-radius: 12px; background: rgba(177,227,255,.32); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 800; letter-spacing: .7px; font-size: 11px; }

.job-list { display: flex; flex-direction: column; gap: 7px; }
.job-row { display: grid; grid-template-columns: 110px 130px minmax(0,1fr) 110px 90px 100px; align-items: center; gap: 10px; padding: 12px; border-radius: 16px; background: rgba(255,255,255,.42); }
.job-row > div strong { display: block; font-size: 11px; }
.job-row > div small { display: block; color: var(--muted); font-size: 9px; margin-top: 4px; }

.notification-list { display: flex; flex-direction: column; gap: 9px; }
.notification-item { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 13px; border-radius: 18px; background: rgba(255,255,255,.44); }
.notification-item.unread { box-shadow: inset 3px 0 0 var(--blue); }
.notification-icon { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; }
.notification-icon.danger { color: var(--danger); background: rgba(227,79,95,.1); }
.notification-icon.warning { color: #a56100; background: rgba(255,224,174,.6); }
.notification-icon.info { color: var(--blue); background: rgba(177,227,255,.42); }
.notification-icon.success { color: var(--success); background: rgba(23,166,115,.1); }
.notification-item h4 { margin: 0; font-size: 12px; }
.notification-item p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.notification-item time { color: var(--muted); font-size: 9px; white-space: nowrap; }

.settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.setting-card { border-radius: 22px; padding: 16px; }
.setting-card h3 { margin: 0; font-size: 14px; }
.setting-card p { margin: 6px 0 15px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.setting-row { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-top: 1px solid rgba(17,24,39,.06); }
.setting-row span { font-size: 11px; font-weight: 700; }
.setting-value { color: var(--muted); font-size: 10px; }

.detail-drawer { position: fixed; z-index: 50; top: 12px; right: 12px; bottom: 12px; width: min(450px, calc(100vw - 24px)); border-radius: 30px; padding: 18px; transform: translateX(calc(100% + 30px)); transition: transform var(--ease); overflow: auto; }
.detail-drawer.open { transform: translateX(0); }
.drawer-backdrop, .mobile-sheet-backdrop { position: fixed; inset: 0; background: rgba(17,24,39,.18); backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: var(--ease); z-index: 45; }
.drawer-backdrop.open, .mobile-sheet-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.drawer-head h3 { margin: 0; font-size: 18px; }
.drawer-head p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.drawer-section { margin-top: 18px; padding: 15px; border-radius: 18px; background: rgba(255,255,255,.43); }
.drawer-section h4 { margin: 0 0 11px; font-size: 12px; }
.detail-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 9px; }
.detail-item { padding: 10px; border-radius: 13px; background: rgba(255,255,255,.48); }
.detail-item span { display: block; color: var(--muted); font-size: 9px; }
.detail-item strong { display: block; margin-top: 5px; font-size: 11px; }
.drawer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 15px; }
.account-danger-actions { grid-template-columns: 1fr; padding-top: 12px; border-top: 1px solid rgba(148,163,184,.2); }

.mobile-bottom-nav { display: none; }
.mobile-sheet { display: none; }
.toast-region { position: fixed; z-index: 80; right: 20px; bottom: 22px; display: flex; flex-direction: column; gap: 8px; }
.toast { min-width: 250px; max-width: 360px; padding: 13px 15px; border-radius: 17px; background: rgba(17,24,39,.88); color: white; box-shadow: 0 18px 45px rgba(17,24,39,.24); backdrop-filter: blur(16px); animation: toastIn .3s ease both; }
.toast strong { display: block; font-size: 12px; }
.toast span { display: block; margin-top: 4px; font-size: 10px; color: rgba(255,255,255,.72); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.98); } }

body.sidebar-collapsed { --sidebar-width: 82px; }
body.sidebar-collapsed .brand-copy,
body.sidebar-collapsed .nav-label,
body.sidebar-collapsed .nav-badge,
body.sidebar-collapsed .system-mini > div { display: none; }
body.sidebar-collapsed .nav-button { justify-content: center; padding: 0; }
body.sidebar-collapsed .nav-button.active::before { left: 2px; }
body.sidebar-collapsed .sidebar-footer { justify-content: center; }
body.sidebar-collapsed .system-mini { display: none; }

@media (max-width: 1180px) {
  .metrics-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .dashboard-lower { grid-template-columns: 1fr; }
  .accounts-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .monitor-layout { grid-template-columns: 1fr; }
  .account-rail { position: static; display: flex; overflow-x: auto; gap: 7px; padding: 8px; }
  .rail-label { display: none; }
  .rail-account { min-width: 170px; }
}

@media (max-width: 820px) {
  body { padding-bottom: env(safe-area-inset-bottom); }
  .app-shell { display: block; padding: 8px; }
  .sidebar { position: fixed; left: 8px; top: 8px; bottom: 8px; height: auto; width: min(286px, calc(100vw - 42px)); transform: translateX(calc(-100% - 18px)); z-index: 60; }
  .sidebar.open { transform: translateX(0); }
  body.sidebar-collapsed { --sidebar-width: 258px; }
  body.sidebar-collapsed .brand-copy,
  body.sidebar-collapsed .nav-label,
  body.sidebar-collapsed .nav-badge,
  body.sidebar-collapsed .system-mini > div { display: initial; }
  body.sidebar-collapsed .nav-button { justify-content: flex-start; padding: 0 14px; }
  body.sidebar-collapsed .system-mini { display: flex; }
  .collapse-button { display: none; }
  .workspace { width: 100%; }
  .topbar { top: 8px; min-height: 68px; padding: 10px 10px 10px 11px; border-radius: 21px; }
  .mobile-menu-button { display: grid; }
  .desktop-only { display: none !important; }
  .topbar-title h1 { font-size: 19px; }
  .topbar-title p { font-size: 9px; }
  .profile-button { width: 44px; padding: 3px; justify-content: center; }
  .avatar { width: 38px; height: 38px; }
  .main-content { padding: 12px 0 98px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-card { min-height: 265px; padding: 24px 20px; }
  .hero-card::after { width: 220px; height: 220px; right: -105px; top: -80px; }
  .hero-card h2 { max-width: 90%; font-size: 31px; }
  .hero-card > p:not(.eyebrow) { max-width: 83%; }
  .focus-card { min-height: 0; }
  .metrics-grid { gap: 9px; }
  .metric-card { min-height: 116px; padding: 14px; }
  .metric-number strong { font-size: 26px; }
  .compact-post { grid-template-columns: 8px minmax(86px,.5fr) minmax(0,1.4fr) auto; }
  .compact-post .time { display: none; }
  .page-intro { align-items: flex-start; flex-direction: column; }
  .page-intro-actions { width: 100%; }
  .page-intro-actions button { flex: 1; }
  .filter-bar { flex-wrap: wrap; }
  .search-field { flex-basis: 100%; }
  .filter-select { flex: 1; min-width: 130px; }
  .account-rail { margin-bottom: 10px; }
  .data-panel .table-wrap { display: none; }
  .data-panel { background: transparent; border: 0; box-shadow: none; backdrop-filter: none; overflow: visible; }
  .table-summary { padding: 0 2px 10px; }
  .bulk-actions { display: none; }
  .mobile-post-list { display: flex; flex-direction: column; gap: 9px; }
  .mobile-post-card { border-radius: 21px; padding: 14px; position: relative; }
  .mobile-post-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .mobile-post-account { display: flex; align-items: center; gap: 9px; min-width: 0; }
  .mobile-post-account .mini-avatar { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: rgba(177,227,255,.42); color: var(--blue-deep); font-size: 10px; font-weight: 850; }
  .mobile-post-account strong { display: block; font-size: 12px; }
  .mobile-post-account small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
  .mobile-post-title { margin: 12px 0; font-size: 12px; line-height: 1.52; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  .mobile-time-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
  .mobile-time { padding: 10px; border-radius: 14px; background: rgba(255,255,255,.43); }
  .mobile-time span { display: block; color: var(--muted); font-size: 9px; }
  .mobile-time strong { display: block; margin-top: 5px; font-size: 11px; font-variant-numeric: tabular-nums; }
  .mobile-post-actions { margin-top: 10px; display: grid; grid-template-columns: 1fr 1fr 44px; gap: 7px; }
  .mobile-post-actions button { min-height: 44px; }
  .accounts-grid { grid-template-columns: 1fr; }
  .renewal-board { grid-template-columns: repeat(2,1fr); }
  .renewal-row { grid-template-columns: 1fr auto; }
  .renewal-row .renewal-title { grid-column: 1 / -1; }
  .renewal-row .renewal-expiry { display: none; }
  .job-row { grid-template-columns: 1fr auto; }
  .job-row .job-target, .job-row .job-worker, .job-row .job-duration { display: none; }
  .settings-grid { grid-template-columns: 1fr; }
  .mobile-bottom-nav {
    display: grid; grid-template-columns: repeat(5,1fr); position: fixed; z-index: 35;
    left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); min-height: 68px;
    border-radius: 23px; padding: 6px 5px;
  }
  .mobile-nav-button { border: 0; background: transparent; border-radius: 17px; min-height: 56px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 3px; color: #7b8797; cursor: pointer; font-size: 9px; font-weight: 750; position: relative; }
  .mobile-nav-button.active { color: var(--blue-deep); background: rgba(255,255,255,.66); }
  .mobile-nav-button .icon { width: 20px; height: 20px; }
  .mobile-nav-button .nav-badge { position: absolute; top: 3px; right: calc(50% - 20px); min-width: 17px; height: 17px; font-size: 8px; }
  .mobile-sheet { display: block; position: fixed; z-index: 55; left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); border-radius: 28px; padding: 15px; transform: translateY(calc(100% + 25px)); transition: transform var(--ease); }
  .mobile-sheet.open { transform: translateY(0); }
  .sheet-handle { width: 42px; height: 5px; border-radius: 99px; background: rgba(17,24,39,.14); margin: 0 auto 13px; }
  .sheet-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
  .sheet-button { min-height: 82px; border: 0; border-radius: 18px; background: rgba(255,255,255,.55); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; font-size: 10px; font-weight: 800; cursor: pointer; }
  .detail-drawer { top: auto; left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); width: auto; max-height: 84vh; border-radius: 28px; transform: translateY(calc(100% + 25px)); }
  .detail-drawer.open { transform: translateY(0); }
  .toast-region { right: 10px; left: 10px; bottom: 88px; }
  .toast { min-width: 0; max-width: none; width: 100%; }
}

@media (max-width: 480px) {
  .topbar-actions { gap: 4px; }
  .topbar-title { gap: 7px; }
  .topbar-title h1 { font-size: 17px; }
  .notification-button, .profile-button, .mobile-menu-button { width: 42px; height: 42px; }
  .hero-card h2 { font-size: 28px; max-width: 96%; }
  .hero-card > p:not(.eyebrow) { max-width: 96%; }
  .hero-actions > * { flex: 1; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .metric-card { padding: 13px; }
  .metric-top .trend { display: none; }
  .compact-post { grid-template-columns: 8px 78px minmax(0,1fr); }
  .compact-post .status-pill { display: none; }
  .panel { padding: 14px; }
  .segmented { display: none; }
  .account-rail { display: none; }
  .renewal-board { gap: 8px; }
  .notification-item { grid-template-columns: 38px minmax(0,1fr); }
  .notification-icon { width: 38px; height: 38px; }
  .notification-item time { grid-column: 2; }
}

/* V2 dashboard: three equal monitoring columns with ten stable rows per page */
.dashboard-monitor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
  align-items: stretch;
}
.dashboard-monitor-card {
  min-width: 0;
  min-height: 780px;
  padding: 18px;
  border-radius: 26px;
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.dashboard-monitor-head { min-height: 76px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dashboard-monitor-head h3 { margin: 0; font-size: 19px; }
.dashboard-monitor-head p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.dashboard-post-list { display: grid; grid-template-rows: repeat(10, minmax(58px, 1fr)); gap: 7px; }
.dashboard-post-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 6px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border-radius: 15px;
  background: rgba(255,255,255,.46);
  cursor: pointer;
}
.dashboard-post-row:hover { background: rgba(255,255,255,.78); }
.dashboard-post-row.placeholder { cursor: default; opacity: .34; border: 1px dashed rgba(17,24,39,.08); background: rgba(255,255,255,.18); }
.dashboard-post-row .status-line { width: 6px; height: 34px; border-radius: 99px; }
.dashboard-post-copy { min-width: 0; }
.dashboard-post-copy strong { display: block; font-size: 14px; }
.dashboard-post-copy small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dashboard-post-time { min-width: 92px; text-align: right; }
.dashboard-post-time strong, .dashboard-post-time small { display: block; white-space: nowrap; }
.dashboard-post-time strong { font-size: 12px; }
.dashboard-post-time small { margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 750; }
.dashboard-post-time small.warning { color: #a56100; }
.dashboard-post-time small.danger { color: var(--danger); }
.dashboard-post-time small.info { color: var(--blue-deep); }
.dashboard-pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 9px; min-height: 54px; padding-top: 12px; }
.dashboard-pagination span { color: var(--muted); font-size: 12px; font-weight: 800; }
.dashboard-pagination .mini-button:last-child { justify-self: stretch; }
.dashboard-pagination .mini-button:disabled { opacity: .38; cursor: default; }

/* Task rows must wrap long timestamps and error messages inside their own cells. */
.job-row { grid-template-columns: minmax(150px,.9fr) minmax(130px,.7fr) minmax(240px,2fr) minmax(110px,.7fr) 72px auto; }
.job-row > div { min-width: 0; }
.job-row > div strong, .job-row > div small { line-height: 1.4; overflow-wrap: anywhere; word-break: break-word; }
.job-row { grid-template-columns: minmax(150px,.9fr) minmax(130px,.7fr) minmax(220px,2fr) minmax(100px,.7fr) 72px auto minmax(100px,auto); }
.job-actions { display:flex; gap:6px; justify-content:flex-end; }
.artifact-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:14px; }
.artifact-card { padding:12px; border:1px solid rgba(132,157,178,.22); border-radius:16px; background:rgba(255,255,255,.6); }
.artifact-card a { display:grid; gap:8px; color:inherit; text-decoration:none; }
.artifact-card img { width:100%; aspect-ratio:16/10; object-fit:cover; border-radius:10px; background:#e8f0f6; }
.artifact-card .mini-button { margin-top:10px; width:100%; }
.job-target strong { white-space: normal; }

/* Actual convenience-store brand assets. */
.store-option { grid-template-columns: 46px minmax(0,1fr) 22px; }
.store-logo { width: 46px; height: 46px; padding: 5px; overflow: hidden; border-radius: 12px; background: #fff; border: 1px solid rgba(17,24,39,.08); }
.store-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.notification-item[data-notification-account], .notification-item[data-notification-post], .notification-item[data-notification-payment] { cursor: pointer; }
.notification-item[data-notification-account]:hover, .notification-item[data-notification-post]:hover, .notification-item[data-notification-payment]:hover { background: rgba(255,255,255,.76); }
.countdown.syncing { color: var(--blue-deep); animation: syncingPulse 1.2s ease-in-out infinite; }
@keyframes syncingPulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.effective-order.notification-focus { animation: notificationFocus 1.8s ease both; }
@keyframes notificationFocus { 0%, 100% { box-shadow: 0 0 0 0 rgba(0,135,235,0); } 18%, 70% { box-shadow: 0 0 0 4px rgba(0,135,235,.28), 0 16px 34px rgba(0,135,235,.14); } }

@media (max-width: 1180px) {
  .dashboard-monitor-grid { grid-template-columns: 1fr; }
  .dashboard-monitor-card { min-height: 760px; }
  .job-row { grid-template-columns: minmax(140px,.8fr) minmax(120px,.7fr) minmax(220px,1.8fr) auto; }
  .job-row .job-worker, .job-row .job-duration { display: none; }
}
@media (max-width: 820px) {
  .dashboard-monitor-card { min-height: 750px; padding: 15px; }
  .dashboard-post-copy strong { font-size: 14px !important; }
  .dashboard-post-copy small { font-size: 12px !important; }
  .dashboard-post-time { min-width: 82px; }
  .job-row { grid-template-columns: minmax(0,1fr) auto; }
  .job-row .job-target { display: block; grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* =========================================================
   Core Helper UI V2 — readability + renewal workflow
   ========================================================= */
:root {
  --body-size: 15px;
  --small-size: 12.5px;
}
body { font-size: var(--body-size); }

/* Balanced type scale */
.page-intro { margin-bottom: 18px; }
.page-intro h2 { font-size: clamp(27px, 2.6vw, 36px); line-height: 1.12; }
.page-intro p { font-size: 14px; line-height: 1.6; max-width: 680px; }
.primary-button, .secondary-button, .danger-button {
  min-height: 44px;
  padding: 0 15px;
  border-radius: 14px;
  font-size: 13px;
}
.page-intro-actions .primary-button,
.page-intro-actions .secondary-button { min-width: 0; }

/* Dashboard focus and priority content */
.focus-card { padding: 24px; }
.focus-header h3 { font-size: 20px; letter-spacing: -.35px; }
.count-chip { min-width: 36px; height: 31px; font-size: 13px; }
.focus-list { margin-top: 17px; gap: 11px; }
.focus-item { grid-template-columns: 44px minmax(0,1fr) auto; gap: 13px; padding: 13px; min-height: 68px; }
.focus-icon { width: 44px; height: 44px; border-radius: 15px; }
.focus-copy strong { font-size: 14px; line-height: 1.35; }
.focus-copy small { margin-top: 5px; font-size: 12.5px; line-height: 1.4; }

/* Metric cards: icon and title are grouped in the upper-left */
.metric-card { min-height: 142px; padding: 19px; }
.metric-heading { display: flex; align-items: center; gap: 12px; }
.metric-heading > div { min-width: 0; }
.metric-icon { width: 44px; height: 44px; border-radius: 15px; flex: 0 0 auto; }
.metric-label { margin: 0; color: var(--ink); font-size: 14px; font-weight: 800; line-height: 1.3; }
.metric-trend { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.3; }
.metric-number { margin-top: 18px; }
.metric-number strong { font-size: 36px; }
.metric-number span { font-size: 14px; margin-bottom: 4px; }

.panel { padding: 22px; }
.panel-header { margin-bottom: 17px; }
.panel-header h3 { font-size: 20px; letter-spacing: -.3px; }
.panel-header p { margin-top: 6px; font-size: 13px; line-height: 1.5; }
.segmented button { min-height: 38px; padding: 0 14px; font-size: 12px; }
.compact-post-list { gap: 9px; }
.compact-post {
  grid-template-columns: 9px minmax(130px,.55fr) minmax(0,1.5fr) minmax(126px,.48fr) auto;
  min-height: 70px;
  padding: 12px 14px;
  gap: 14px;
}
.compact-post .account { font-size: 14px; }
.compact-post .post-title { font-size: 14px; line-height: 1.45; }
.compact-post .time { font-size: 13px; line-height: 1.45; }
.compact-post .time small { font-size: 12px; }
.status-pill { min-height: 30px; padding: 0 11px; font-size: 12px; }
.account-health { min-height: 65px; padding: 12px; }
.account-health strong { font-size: 14px; }
.account-health small { font-size: 12px; }

/* Monitor: reduce control dominance, increase data readability */
.filter-bar { padding: 9px; gap: 7px; }
.search-field { min-height: 44px; }
.search-field .icon { top: 12px; }
.search-field input,
.filter-select { height: 44px; font-size: 13px; }
.filter-bar > .icon-button { width: 44px; height: 44px; }
.account-rail { width: auto; }
.rail-label { font-size: 12px; }
.rail-account { min-height: 58px; }
.rail-account strong { font-size: 13px; }
.rail-account small { font-size: 11px; }
.rail-count { font-size: 12px; }
.table-summary { padding: 16px 18px 12px; }
.table-summary p { font-size: 13px; }
.mini-button { min-height: 38px; padding: 0 12px; font-size: 12px; }
.data-table { min-width: 1120px; }
.data-table th { height: 48px; padding: 0 13px; font-size: 11px; letter-spacing: .25px; }
.data-table td { padding: 14px 13px; font-size: 14px; }
.account-cell strong { font-size: 14px; }
.account-cell small, .post-cell small { font-size: 12px; margin-top: 5px; }
.post-cell { max-width: 390px; min-width: 285px; }
.post-cell strong { font-size: 14px; line-height: 1.52; }
.time-cell strong { font-size: 13.5px; }
.time-cell small { font-size: 12px; margin-top: 5px; }
.row-action { width: 40px; height: 40px; }

/* Renewals */
.renewal-board { gap: 12px; margin-bottom: 14px; }
.renewal-stage { min-height: 128px; padding: 18px; }
.renewal-stage span { font-size: 13px; font-weight: 750; }
.renewal-stage strong { margin-top: 8px; font-size: 32px; }
.renewal-stage small { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; }
.renewal-list { gap: 10px; }
.renewal-row {
  grid-template-columns: minmax(125px,.5fr) minmax(300px,1.45fr) 145px 165px auto;
  min-height: 82px;
  padding: 14px;
  gap: 14px;
}
.renewal-row strong { font-size: 14px; line-height: 1.45; }
.renewal-row small { margin-top: 5px; font-size: 12px; line-height: 1.35; }
.renewal-title strong { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.code-box { padding: 10px 12px; font-size: 13px; }
.renewal-action-button { min-width: 96px; }

/* Tasks */
.job-list { gap: 9px; }
.job-row {
  grid-template-columns: 125px 145px minmax(190px,1fr) 125px 100px 105px;
  min-height: 72px;
  padding: 14px;
  gap: 13px;
}
.job-row > div strong { font-size: 14px; }
.job-row > div small { margin-top: 5px; font-size: 12px; }

/* Notifications */
.notification-list { gap: 11px; }
.notification-item { grid-template-columns: 48px minmax(0,1fr) auto; gap: 14px; min-height: 82px; padding: 16px; }
.notification-icon { width: 48px; height: 48px; border-radius: 16px; }
.notification-item h4 { font-size: 15px; line-height: 1.4; }
.notification-item p { margin-top: 6px; font-size: 13px; line-height: 1.55; }
.notification-item time { font-size: 12px; }

/* Settings */
.settings-grid { gap: 14px; }
.setting-card { padding: 21px; }
.setting-card h3 { font-size: 18px; }
.setting-card p { margin: 8px 0 17px; font-size: 13px; line-height: 1.6; }
.setting-row { min-height: 62px; }
.setting-row span { font-size: 14px; }
.setting-value { font-size: 13px !important; }

/* Drawer readability */
.drawer-head h3 { font-size: 22px; }
.drawer-head p { font-size: 13px; }
.drawer-section { padding: 18px; }
.drawer-section h4 { font-size: 15px; }
.detail-item span { font-size: 12px; }
.detail-item strong { font-size: 14px; }

/* Renewal full workflow modal */
body.modal-open { overflow: hidden; }
.renewal-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(17,24,39,.25);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  opacity: 0;
  pointer-events: none;
  transition: var(--ease);
}
.renewal-modal-backdrop.open { opacity: 1; pointer-events: auto; }
.renewal-modal {
  position: fixed;
  z-index: 95;
  top: 16px;
  right: 16px;
  bottom: 16px;
  left: 16px;
  max-width: 1460px;
  margin: auto;
  border-radius: 34px;
  padding: 24px;
  overflow: auto;
  transform: translateY(20px) scale(.985);
  opacity: 0;
  pointer-events: none;
  transition: 260ms cubic-bezier(.2,.8,.2,1);
  background: linear-gradient(145deg, rgba(250,253,255,.93), rgba(255,255,255,.76));
}
.renewal-modal.open { transform: none; opacity: 1; pointer-events: auto; }
body.logout-confirm-open { overflow: hidden; }
.logout-confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(17,24,39,.24);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  opacity: 0;
  pointer-events: none;
  transition: var(--ease);
}
.logout-confirm-backdrop.open { opacity: 1; pointer-events: auto; }
.logout-confirm-dialog {
  width: min(430px, calc(100vw - 32px));
  padding: 28px;
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(250,253,255,.97), rgba(255,255,255,.88));
  box-shadow: 0 28px 80px rgba(31,80,120,.24);
  border: 1px solid rgba(255,255,255,.9);
  transform: translateY(12px) scale(.97);
  transition: 220ms cubic-bezier(.2,.8,.2,1);
}
.logout-confirm-backdrop.open .logout-confirm-dialog { transform: none; }
.logout-confirm-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 17px;
  color: white;
  background: linear-gradient(145deg, #23a9ff, #0074d1);
  box-shadow: 0 12px 25px rgba(0,135,235,.22);
  font-size: 27px;
  font-weight: 800;
}
.logout-confirm-copy h2 { margin: 7px 0 8px; font-size: 26px; letter-spacing: -.7px; }
.logout-confirm-copy p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.logout-confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 24px; }
.logout-confirm-actions button { min-height: 48px; }
.renewal-modal-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.renewal-modal-head h2 { margin: 5px 0 0; font-size: clamp(25px,3vw,38px); letter-spacing: -1.1px; }
.renewal-modal-head p { margin: 7px 0 0; color: var(--muted); font-size: 14px; }
.modal-eyebrow { color: var(--blue-deep); font-size: 11px; font-weight: 900; letter-spacing: 1px; }
.success-text { color: var(--success); }
.renewal-route { display: flex; align-items: center; margin: 22px 0; padding: 12px 15px; border-radius: 18px; background: rgba(255,255,255,.5); overflow-x: auto; }
.renewal-route span { white-space: nowrap; color: var(--muted); font-size: 12px; font-weight: 800; }
.renewal-route span.active { color: var(--blue-deep); }
.renewal-route i { width: 52px; min-width: 26px; height: 1px; margin: 0 10px; background: rgba(17,24,39,.12); }
.renewal-workspace { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 18px; align-items: start; }
.renewal-form-column { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.flow-section { padding: 20px; border-radius: 25px; background: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.72); box-shadow: inset 0 1px 0 rgba(255,255,255,.7); }
.flow-section-title { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.flow-section-title > span { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; flex: 0 0 auto; color: white; background: linear-gradient(145deg,#22a7ff,var(--blue-deep)); font-size: 11px; font-weight: 900; }
.flow-section-title h3 { margin: 0; font-size: 18px; }
.flow-section-title p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.renewal-post-select { width: 100%; height: 48px; border: 1px solid rgba(17,24,39,.09); border-radius: 15px; padding: 0 14px; background: rgba(255,255,255,.8); color: var(--ink); font-size: 14px; outline: none; }
.selected-post-card { margin-top: 12px; display: grid; grid-template-columns: 48px minmax(0,1fr); gap: 13px; padding: 15px; border-radius: 18px; background: rgba(177,227,255,.20); }
.selected-post-card .account-avatar { width: 48px; height: 48px; }
.selected-post-card strong { font-size: 15px; }
.selected-post-card p { margin: 5px 0; font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.selected-post-card small { color: var(--muted); font-size: 12px; }
.choice-grid { display: grid; gap: 10px; }
.choice-grid.two { grid-template-columns: repeat(2,minmax(0,1fr)); }
.choice-card { min-height: 82px; padding: 13px; border-radius: 18px; border: 1px solid rgba(17,24,39,.08); background: rgba(255,255,255,.62); display: grid; grid-template-columns: 42px minmax(0,1fr) 24px; align-items: center; gap: 11px; text-align: left; cursor: pointer; transition: var(--ease); }
.choice-card:hover { background: rgba(255,255,255,.9); transform: translateY(-1px); }
.choice-card.selected { border-color: rgba(0,135,235,.42); box-shadow: 0 0 0 3px rgba(0,135,235,.08); background: rgba(235,248,255,.85); }
.choice-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: rgba(177,227,255,.42); color: var(--blue-deep); }
.choice-card strong { display: block; font-size: 14px; }
.choice-card small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.choice-check { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: transparent; border: 1px solid rgba(17,24,39,.12); }
.choice-card.selected .choice-check, .store-option.selected .choice-check { color: white; border-color: transparent; background: var(--blue); }
.plan-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 14px; }
.plan-panel { padding: 15px; border-radius: 20px; background: rgba(255,255,255,.5); border: 1px solid rgba(17,24,39,.06); }
.plan-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.plan-head strong { font-size: 15px; }
.plan-head small { display: block; margin-top: 4px; color: var(--muted); font-size: 11.5px; }
.plan-head > span { min-height: 25px; padding: 0 8px; display: inline-flex; align-items: center; border-radius: 99px; background: rgba(255,224,174,.6); color: #9a5d00; font-size: 10px; font-weight: 900; }
.duration-options { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin-top: 13px; }
.duration-option { min-height: 69px; border: 1px solid rgba(17,24,39,.08); border-radius: 14px; background: rgba(255,255,255,.62); cursor: pointer; }
.duration-option strong, .duration-option span { display: block; }
.duration-option strong { font-size: 13px; }
.duration-option span { margin-top: 5px; color: var(--muted); font-size: 11.5px; }
.duration-option.selected { border-color: rgba(0,135,235,.5); background: rgba(177,227,255,.35); box-shadow: 0 0 0 3px rgba(0,135,235,.07); }
.color-picker { margin-top: 14px; padding-top: 13px; border-top: 1px solid rgba(17,24,39,.06); }
.color-picker > span { font-size: 12px; font-weight: 800; }
.color-picker > div { display: flex; gap: 12px; margin-top: 11px; }
.color-dot { border: 0; background: transparent; cursor: pointer; padding: 0; }
.color-dot i { width: 28px; height: 28px; display: block; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(17,24,39,.08); }
.color-dot small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.color-dot.selected i { box-shadow: 0 0 0 3px white, 0 0 0 5px rgba(0,135,235,.34); }
.color-dot.red i { background: #ed4456; }.color-dot.orange i { background: #f39a33; }.color-dot.purple i { background: #8e62da; }.color-dot.pink i { background: #e766aa; }
.existing-order-grid, .result-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 9px; }
.existing-order-grid > div, .result-grid > div { padding: 13px; border-radius: 15px; background: rgba(255,255,255,.55); }
.existing-order-grid span, .result-grid span { display: block; color: var(--muted); font-size: 11px; }
.existing-order-grid strong, .result-grid strong { display: block; margin-top: 6px; font-size: 14px; }
.payment-type-lock, .direct-code-note { display: flex; align-items: center; gap: 9px; padding: 12px 14px; border-radius: 15px; color: #39556c; background: rgba(177,227,255,.24); font-size: 13px; font-weight: 750; }
.store-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-top: 12px; }
.store-option { min-height: 72px; padding: 10px; border: 1px solid rgba(17,24,39,.08); border-radius: 16px; background: rgba(255,255,255,.62); display: grid; grid-template-columns: 38px minmax(0,1fr) 22px; gap: 8px; align-items: center; text-align: left; cursor: pointer; }
.store-option.selected { border-color: rgba(0,135,235,.42); background: rgba(235,248,255,.9); }
.store-logo { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--ink); color: white; font-size: 10px; font-weight: 900; }
.store-option strong { display: block; font-size: 12px; }.store-option small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.phone-panel { margin-top: 13px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: end; padding: 14px; border-radius: 17px; background: rgba(255,255,255,.45); }
.phone-panel label:first-child { color: var(--muted); font-size: 12px; font-weight: 750; }
.phone-panel input[type="tel"] { width: 100%; height: 45px; margin-top: 7px; border: 1px solid rgba(17,24,39,.1); border-radius: 13px; padding: 0 12px; background: rgba(255,255,255,.82); font-size: 14px; }
.confirm-check { min-height: 45px; display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 750; }
.confirm-check input { width: 19px; height: 19px; accent-color: var(--blue); }
.renewal-summary { min-width: 0; }
.summary-sticky { position: sticky; top: 0; padding: 20px; border-radius: 25px; background: linear-gradient(145deg,rgba(17,24,39,.94),rgba(26,44,67,.9)); color: white; box-shadow: 0 22px 50px rgba(17,24,39,.20); }
.summary-sticky .modal-eyebrow { color: var(--sky); }
.summary-sticky h3 { margin: 6px 0 16px; font-size: 20px; }
.summary-post { padding: 13px; border-radius: 15px; background: rgba(255,255,255,.08); }
.summary-post strong, .summary-post span { display: block; }.summary-post strong { font-size: 15px; }.summary-post span { margin-top: 4px; color: rgba(255,255,255,.6); font-size: 12px; }
.summary-lines { margin-top: 14px; }
.summary-lines > div { min-height: 48px; display: flex; justify-content: space-between; gap: 12px; align-items: center; border-bottom: 1px solid rgba(255,255,255,.09); }
.summary-lines span { color: rgba(255,255,255,.58); font-size: 12px; }.summary-lines strong { font-size: 12.5px; text-align: right; }
.summary-total { margin-top: 17px; padding-top: 16px; display: flex; justify-content: space-between; align-items: end; }
.summary-total span { color: rgba(255,255,255,.62); font-size: 12px; }.summary-total strong { font-size: 27px; }.summary-total small { font-size: 14px; }
.submit-renewal { width: 100%; min-height: 52px; margin-top: 18px; }
.submit-renewal:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.submit-help { margin: 10px 0 0; color: rgba(255,255,255,.55); font-size: 11px; line-height: 1.45; text-align: center; }
.automation-progress, .payment-result { max-width: 650px; margin: 42px auto; text-align: center; }
.progress-orb, .success-orb { width: 82px; height: 82px; margin: 0 auto; border-radius: 28px; display: grid; place-items: center; color: white; background: linear-gradient(145deg,#22a7ff,var(--blue-deep)); box-shadow: 0 20px 38px rgba(0,135,235,.22); }
.progress-orb .icon { animation: spin 1.1s linear infinite; }.success-orb { background: linear-gradient(145deg,#2fc48e,#11825f); }
@keyframes spin { to { transform: rotate(360deg); } }
.automation-progress h3, .payment-result h3 { margin: 20px 0 0; font-size: 25px; }.automation-progress > p, .payment-result > p { color: var(--muted); font-size: 14px; line-height: 1.6; }
.progress-steps { margin-top: 23px; text-align: left; display: flex; flex-direction: column; gap: 8px; }
.progress-steps div { min-height: 50px; padding: 0 15px; display: flex; align-items: center; gap: 11px; border-radius: 15px; color: var(--muted); background: rgba(255,255,255,.55); font-size: 13px; font-weight: 750; }
.progress-steps .done { color: var(--success); }.progress-steps .active { color: var(--blue-deep); background: rgba(177,227,255,.25); }
.payment-code-card { margin: 23px 0 13px; padding: 20px; border-radius: 23px; background: rgba(177,227,255,.26); }
.payment-code-card span { display: block; color: var(--muted); font-size: 12px; }.payment-code-card strong { display: block; margin: 9px 0 15px; font-family: ui-monospace,SFMono-Regular,Menlo,monospace; font-size: clamp(25px,4vw,38px); letter-spacing: 2px; }
.result-close { width: 100%; margin-top: 15px; }

@media (max-width: 1080px) {
  .renewal-workspace { grid-template-columns: 1fr; }
  .summary-sticky { position: static; }
  .store-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 820px) {
  .page-intro h2 { font-size: 28px; }
  .page-intro p { font-size: 13px; }
  .focus-card { padding: 18px; }
  .focus-header h3 { font-size: 19px; }
  .focus-item { min-height: 74px; }
  .focus-copy strong { white-space: normal; font-size: 14px; }
  .focus-copy small { white-space: normal; font-size: 12px; }
  .metric-card { min-height: 132px; padding: 16px; }
  .metric-heading { gap: 9px; }
  .metric-icon { width: 39px; height: 39px; }
  .metric-label { font-size: 13px; }
  .metric-trend { font-size: 11px; }
  .metric-number { margin-top: 15px; }
  .metric-number strong { font-size: 31px; }
  .panel { padding: 17px; }
  .panel-header h3 { font-size: 18px; }
  .compact-post { grid-template-columns: 8px minmax(100px,.55fr) minmax(0,1fr) auto; min-height: 72px; padding: 12px; }
  .compact-post .account, .compact-post .post-title { font-size: 13px; }
  .mobile-post-account strong { font-size: 14px; }
  .mobile-post-account small { font-size: 11px; }
  .mobile-post-title { font-size: 14px; line-height: 1.55; }
  .mobile-time span { font-size: 11px; }.mobile-time strong { font-size: 13px; }
  .renewal-stage { min-height: 112px; }.renewal-stage span { font-size: 12px; }.renewal-stage strong { font-size: 29px; }
  .renewal-row { grid-template-columns: minmax(0,1fr) auto; min-height: 0; }
  .renewal-row .renewal-title { grid-column: 1 / -1; }
  .renewal-row .renewal-expiry { display: block; }
  .renewal-row > div:nth-child(4) { grid-column: 1; }
  .renewal-action-button { align-self: end; }
  .job-row > div strong { font-size: 14px; }.job-row > div small { font-size: 12px; }
  .notification-item h4 { font-size: 14px; }.notification-item p { font-size: 12.5px; }
  .setting-card h3 { font-size: 17px; }.setting-card p, .setting-row span { font-size: 13px; }
  .renewal-modal { top: 8px; right: 8px; bottom: 8px; left: 8px; padding: 17px; border-radius: 28px; }
  .renewal-modal-head h2 { font-size: 27px; }
  .renewal-route { margin: 17px 0; }
  .flow-section { padding: 16px; }
  .flow-section-title h3 { font-size: 17px; }
  .choice-grid.two, .plan-columns { grid-template-columns: 1fr; }
  .store-grid { grid-template-columns: repeat(2,1fr); }
  .phone-panel { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .metric-card { min-height: 142px; }
  .metric-heading { align-items: flex-start; }
  .metric-label { font-size: 12.5px; }
  .metric-trend { display: block; font-size: 10.5px; }
  .metric-number strong { font-size: 30px; }
  .compact-post { grid-template-columns: 8px 83px minmax(0,1fr); }
  .compact-post .post-title { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  .renewal-board { grid-template-columns: 1fr 1fr; }
  .renewal-row .renewal-expiry { display: none; }
  .renewal-modal-head h2 { font-size: 24px; }
  .renewal-modal-head p { font-size: 12.5px; }
  .renewal-route span { font-size: 10.5px; }
  .flow-section-title { gap: 9px; }.flow-section-title > span { width: 31px; height: 31px; }.flow-section-title h3 { font-size: 16px; }.flow-section-title p { font-size: 12px; }
  .selected-post-card { grid-template-columns: 42px minmax(0,1fr); }.selected-post-card .account-avatar { width: 42px; height: 42px; }
  .choice-card { grid-template-columns: 38px minmax(0,1fr) 22px; min-height: 78px; }.choice-icon { width: 38px; height: 38px; }.choice-card strong { font-size: 13.5px; }
  .duration-options { grid-template-columns: 1fr; }
  .duration-option { min-height: 52px; display: flex; justify-content: space-between; align-items: center; padding: 0 12px; }.duration-option span { margin: 0; }
  .store-grid { grid-template-columns: 1fr; }
  .store-option { min-height: 64px; }
  .existing-order-grid, .result-grid { grid-template-columns: 1fr; }
  .summary-sticky { padding: 17px; }
  .payment-code-card strong { letter-spacing: 1px; }
}

/* =========================================================
   Core Helper UI V3 — 16px primary / 14px supporting type
   ========================================================= */
:root {
  --body-size: 16px;
  --small-size: 14px;
}

body,
button,
input,
select,
textarea {
  font-size: 16px;
}

/* Primary content: minimum 16px */
.brand-copy strong,
.nav-button,
.system-mini strong,
.profile-copy strong,
.hero-card > p:not(.eyebrow),
.focus-copy strong,
.metric-label,
.compact-post .account,
.compact-post .post-title,
.compact-post .time strong,
.account-health strong,
.rail-account strong,
.mini-button,
.data-table td,
.account-cell strong,
.post-cell strong,
.time-cell strong,
.account-card-head h3,
.account-stat strong,
.renewal-stage span,
.renewal-row strong,
.code-box,
.job-row > div strong,
.notification-item h4,
.setting-row span,
.setting-value,
.detail-item strong,
.renewal-modal-head p,
.renewal-post-select,
.selected-post-card strong,
.choice-card strong,
.plan-head strong,
.duration-option strong,
.payment-type-lock,
.direct-code-note,
.store-option strong,
.phone-panel input[type="tel"],
.confirm-check,
.summary-post strong,
.summary-lines strong,
.submit-help,
.automation-progress > p,
.payment-result > p,
.progress-steps div,
.existing-order-grid strong,
.result-grid strong {
  font-size: 16px !important;
}

/* Supporting information: minimum 14px */
.brand-copy span,
.nav-badge,
.system-mini small,
.topbar-title p,
.live-indicator,
.notification-badge,
.profile-copy small,
.section-heading p,
.eyebrow,
.count-chip,
.focus-copy small,
.metric-trend,
.metric-number span,
.panel-header p,
.status-pill,
.compact-post .time small,
.account-health small,
.page-intro p,
.rail-label,
.rail-account small,
.rail-count,
.table-summary p,
.data-table th,
.account-cell small,
.post-cell small,
.time-cell small,
.account-card-head p,
.health-badge,
.account-stat span,
.account-card-footer span,
.renewal-stage small,
.renewal-row small,
.job-row > div small,
.notification-item p,
.notification-item time,
.setting-card p,
.drawer-head p,
.detail-item span,
.modal-eyebrow,
.renewal-route span,
.flow-section-title p,
.selected-post-card p,
.selected-post-card small,
.choice-card small,
.plan-head small,
.plan-head > span,
.duration-option span,
.color-picker > span,
.color-dot small,
.existing-order-grid span,
.result-grid span,
.phone-panel label:first-child,
.summary-post span,
.summary-lines span,
.summary-total span,
.summary-total small,
.payment-code-card span,
.store-option small {
  font-size: 14px !important;
}

/* Controls retain generous touch targets without visually overpowering content */
.primary-button,
.secondary-button,
.danger-button,
.text-button,
.segmented button,
.filter-select,
.search-field input,
.renewal-action-button {
  font-size: 16px !important;
}

/* Headings remain above the 16px content baseline */
.section-heading h2 { font-size: 22px; }
.focus-header h3,
.panel-header h3 { font-size: 22px; }
.setting-card h3 { font-size: 20px; }
.drawer-section h4 { font-size: 18px; }
.flow-section-title h3 { font-size: 20px; }

/* Dashboard status cards: information left, quantity centered on the right */
.metric-card {
  min-height: 150px;
  padding: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(92px, .72fr);
  align-items: center;
  gap: 14px;
}
.metric-heading {
  min-width: 0;
  align-self: center;
}
.metric-heading > div {
  min-width: 0;
}
.metric-label {
  line-height: 1.35;
}
.metric-trend {
  margin-top: 7px;
  line-height: 1.4;
}
.metric-number {
  margin: 0;
  min-height: 88px;
  min-width: 92px;
  padding-left: 14px;
  border-left: 1px solid rgba(17,24,39,.07);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
}
.metric-number strong {
  font-size: 42px;
  line-height: 1;
  letter-spacing: -1.4px;
}
.metric-number span {
  margin: 10px 0 0;
  font-weight: 800;
}

/* Give larger typography enough breathing room */
.compact-post {
  min-height: 78px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.data-table th { height: 52px; }
.data-table td { padding-top: 16px; padding-bottom: 16px; }
.renewal-row,
.job-row,
.notification-item,
.setting-row { min-height: 86px; }

@media (max-width: 820px) {
  .focus-copy strong,
  .compact-post .account,
  .compact-post .post-title,
  .mobile-post-account strong,
  .mobile-post-title,
  .mobile-time strong,
  .job-row > div strong,
  .notification-item h4,
  .setting-row span {
    font-size: 16px !important;
  }

  .focus-copy small,
  .mobile-post-account small,
  .mobile-time span,
  .job-row > div small,
  .notification-item p,
  .notification-item time,
  .setting-card p {
    font-size: 14px !important;
  }

  .metric-card {
    min-height: 150px;
    padding: 16px;
    grid-template-columns: minmax(0, 1fr) minmax(66px, .55fr);
    gap: 9px;
  }
  .metric-heading {
    gap: 9px;
  }
  .metric-icon {
    width: 40px;
    height: 40px;
  }
  .metric-number {
    min-width: 66px;
    min-height: 84px;
    padding-left: 9px;
    gap: 4px;
  }
  .metric-number strong { font-size: 37px; }
}

@media (max-width: 480px) {
  .metric-card {
    min-height: 152px;
    padding: 14px;
    grid-template-columns: minmax(0, 1fr) 58px;
    gap: 7px;
  }
  .metric-heading {
    display: grid;
    grid-template-columns: 38px minmax(0,1fr);
    align-items: center;
    gap: 8px;
  }
  .metric-icon {
    width: 38px;
    height: 38px;
    border-radius: 13px;
  }
  .metric-label { font-size: 16px !important; }
  .metric-trend { font-size: 14px !important; }
  .metric-number {
    min-width: 58px;
    padding-left: 7px;
    flex-direction: column;
    gap: 2px;
  }
  .metric-number strong { font-size: 34px; }
  .metric-number span { margin: 0; font-size: 14px !important; }
}


/* ===== V4 targeted improvements ===== */
.account-rail { padding: 16px; }
.rail-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.rail-total { color: var(--muted); font-size: 14px; font-weight: 700; }
.rail-status-filters { display:grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap:8px; margin-bottom: 12px; }
.rail-status-chip { min-height: 40px; border-radius: 14px; border:1px solid rgba(255,255,255,.72); background: rgba(255,255,255,.5); color: #4f6074; font-weight: 700; cursor:pointer; padding:0 10px; }
.rail-status-chip.active { background: rgba(177,227,255,.34); color: var(--blue-deep); box-shadow: inset 0 0 0 1px rgba(0,135,235,.18); }
.rail-list { display:flex; flex-direction:column; gap:8px; max-height: calc(100vh - 260px); overflow:auto; padding-right:4px; }
.rail-account { gap:12px; padding: 10px 12px; min-height: 64px; }
.rail-copy { min-width:0; flex:1; }
.inline-status { display:inline-block; width:10px; height:10px; border-radius:99px; margin-right:8px; vertical-align:middle; background: var(--success); }
.inline-status.warning { background: var(--warning); }
.inline-status.error { background: var(--danger); }
.rail-account small { display:flex; align-items:center; }
.rail-count { flex:0 0 auto; min-width:60px; text-align:right; }
.mobile-post-account { gap:0; }
.mobile-post-account .mini-avatar { display:none; }

.custom-select { position: relative; min-width: 200px; }
.custom-select-trigger { width:100%; min-height:46px; border-radius:15px; border:1px solid rgba(255,255,255,.72); background: rgba(255,255,255,.56); color:#49576a; display:flex; align-items:center; justify-content:space-between; padding:0 14px; cursor:pointer; }
.custom-select-trigger .icon { transform: rotate(90deg); transition: transform var(--ease); }
.custom-select.open .custom-select-trigger .icon { transform: rotate(-90deg); }
.custom-select-menu { position:absolute; top: calc(100% + 10px); left:0; right:0; padding:8px; border-radius:18px; display:none; z-index:40; background: linear-gradient(140deg, rgba(255,255,255,.92), rgba(255,255,255,.78)); }
.custom-select.open .custom-select-menu { display:block; }
.custom-select-option { width:100%; min-height:42px; border:0; border-radius:12px; background: transparent; text-align:left; padding:0 12px; font-size:16px; cursor:pointer; }
.custom-select-option:hover, .custom-select-option.selected { background: rgba(177,227,255,.28); color: var(--blue-deep); }

.detail-drawer { width: min(600px, calc(100vw - 24px)); }
.copy-stack { display:grid; gap:12px; }
.copy-tile { width:100%; text-align:left; border:1px solid rgba(17,24,39,.06); background: rgba(255,255,255,.7); border-radius:18px; padding:16px; display:flex; flex-direction:column; gap:8px; cursor:pointer; }
.copy-tile span { color: var(--muted); font-size:14px; }
.copy-tile strong { font-size:18px !important; }
.copy-tile em { font-style:normal; color: var(--blue-deep); font-size:14px; display:flex; align-items:center; gap:6px; }
.copy-tile.muted { cursor:default; opacity:.86; }
.copy-tile:hover { background: rgba(235,248,255,.88); box-shadow: 0 10px 30px rgba(31,80,120,.08); }
.account-card-head.simple { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.account-card-head.simple p { max-width: 100%; }

.renewal-modal { overflow: hidden; padding: 0; }
.renewal-scroll { height: 100%; overflow: auto; padding: 26px; border-radius: inherit; }
.renewal-scroll::-webkit-scrollbar, .detail-drawer::-webkit-scrollbar, .rail-list::-webkit-scrollbar { width: 10px; }
.renewal-scroll::-webkit-scrollbar-track, .detail-drawer::-webkit-scrollbar-track, .rail-list::-webkit-scrollbar-track { background: rgba(177,227,255,.18); border-radius: 999px; margin: 10px; }
.renewal-scroll::-webkit-scrollbar-thumb, .detail-drawer::-webkit-scrollbar-thumb, .rail-list::-webkit-scrollbar-thumb { background: linear-gradient(180deg, rgba(0,135,235,.55), rgba(0,111,201,.85)); border-radius: 999px; border: 2px solid rgba(255,255,255,.55); }
.renewal-scroll, .detail-drawer, .rail-list { scrollbar-color: rgba(0,111,201,.9) rgba(177,227,255,.22); scrollbar-width: thin; }
.renewal-post-select { display:none; }

body.sidebar-collapsed .sidebar { overflow: visible; }
/* The base chevron points right: collapsed = >, expanded = <. */
body:not(.sidebar-collapsed) .collapse-button { transform: rotate(180deg); }
body.sidebar-collapsed .collapse-button { transform: rotate(0deg); }

@media (max-width: 980px) {
  .custom-select { min-width: 160px; }
  .detail-drawer { width: auto; }
}
@media (max-width: 820px) {
  .rail-status-filters { grid-template-columns: repeat(3,minmax(120px,1fr)); overflow-x:auto; }
  .rail-list { max-height: none; }
  .custom-select { min-width: 100%; }
  .filter-bar { align-items: stretch; }
  .filter-bar > .custom-select { flex: 1 1 180px; }
  .renewal-scroll { padding: 18px; }
}


/* =========================================================
   Core Helper UI V5
   ========================================================= */

/* Opaque custom dropdowns: retain glass styling without losing legibility */
.custom-select-menu {
  background: #f9fcff !important;
  border: 1px solid rgba(17,24,39,.12) !important;
  box-shadow: 0 22px 55px rgba(31,80,120,.24), 0 3px 12px rgba(17,24,39,.08) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  opacity: 1 !important;
  overflow: hidden;
}
.custom-select-option {
  background: #f9fcff;
  color: #253247;
}
.custom-select-option + .custom-select-option { margin-top: 3px; }
.custom-select-option:hover,
.custom-select-option.selected {
  background: #dff3ff;
  color: #006fc9;
}
.custom-select-trigger {
  background: rgba(255,255,255,.9);
  border-color: rgba(17,24,39,.1);
}

/* Monitor: account rail 1/3, post workspace 2/3 */
.monitor-layout {
  grid-template-columns: minmax(330px, 1fr) minmax(0, 2fr);
  gap: 16px;
}
.account-rail { min-width: 0; }
.rail-account strong { font-size: 16px !important; }
.rail-account small { font-size: 14px !important; }
.rail-count { font-size: 14px !important; }
.rail-status-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
.rail-status-chip { font-size: 14px; }

/* Fast, fluid auto-fold sidebar */
:root { --sidebar-width: 268px; }
.app-shell {
  transition: grid-template-columns 300ms cubic-bezier(.22,.72,.12,1);
}
.sidebar {
  transition: transform 300ms cubic-bezier(.22,.72,.12,1), border-radius 220ms ease, box-shadow 220ms ease;
}
.brand-copy,
.nav-label,
.nav-badge,
.system-mini > div {
  display: flex !important;
  max-width: 190px;
  opacity: 1;
  transform: translateX(0);
  overflow: hidden;
  white-space: nowrap;
  transition:
    max-width 240ms cubic-bezier(.22,.72,.12,1),
    opacity 150ms ease 70ms,
    transform 240ms cubic-bezier(.22,.72,.12,1);
}
.nav-label { display: inline-block !important; }
.nav-badge { display: grid !important; }
.system-mini {
  display: flex !important;
  opacity: 1;
  max-width: 210px;
  transition: max-width 240ms cubic-bezier(.22,.72,.12,1), opacity 140ms ease 60ms;
}
.nav-button,
.brand,
.sidebar-footer {
  transition: padding 280ms cubic-bezier(.22,.72,.12,1), gap 280ms cubic-bezier(.22,.72,.12,1), background var(--ease), color var(--ease);
}
body.sidebar-collapsed { --sidebar-width: 82px; }
body.sidebar-collapsed .brand-copy,
body.sidebar-collapsed .nav-label,
body.sidebar-collapsed .nav-badge,
body.sidebar-collapsed .system-mini > div {
  display: flex !important;
  max-width: 0;
  opacity: 0;
  transform: translateX(-14px);
  pointer-events: none;
  transition:
    max-width 220ms cubic-bezier(.22,.72,.12,1),
    opacity 120ms ease,
    transform 220ms cubic-bezier(.22,.72,.12,1);
}
body.sidebar-collapsed .nav-label { display: inline-block !important; }
body.sidebar-collapsed .nav-badge { display: grid !important; }
body.sidebar-collapsed .system-mini {
  display: flex !important;
  max-width: 0;
  opacity: 0;
  padding-left: 0;
  padding-right: 0;
  overflow: hidden;
}
body.sidebar-collapsed .nav-button {
  justify-content: flex-start;
  padding-left: 17px;
  padding-right: 17px;
  gap: 13px;
}
body.sidebar-collapsed .brand { padding-left: 4px; gap: 12px; }
body.sidebar-collapsed .sidebar-footer { justify-content: center; }
body.sidebar-collapsed .sidebar { overflow: hidden; }
.collapse-button { transition: transform 220ms cubic-bezier(.22,.72,.12,1), background var(--ease); }

/* Core-only customer management */
.core-only-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  margin-bottom: 8px;
  padding: 0 11px;
  border-radius: 999px;
  color: #73500d;
  background: rgba(255,224,174,.72);
  font-size: 14px;
  font-weight: 850;
  border: 1px solid rgba(255,255,255,.72);
}
.customer-summary-grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.customer-summary {
  min-height: 132px;
  border-radius: 22px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.customer-summary span { color: var(--muted); font-size: 14px; font-weight: 750; }
.customer-summary strong { margin-top: 8px; font-size: 34px; line-height: 1; }
.customer-summary small { margin-top: 9px; color: var(--muted); font-size: 14px; }
.customers-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 12px;
}
.customer-card {
  border-radius: 24px;
  padding: 18px;
  cursor: pointer;
  transition: transform var(--ease), box-shadow var(--ease);
}
.customer-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 28px 70px rgba(31,80,120,.16), inset 0 1px 0 rgba(255,255,255,.84);
}
.customer-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.customer-card-head > div { min-width: 0; }
.customer-card-head h3 { margin: 0; font-size: 19px; line-height: 1.3; }
.customer-card-head p { margin: 6px 0 0; color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.health-badge.success { color: #0c8158; background: rgba(23,166,115,.12); }
.customer-expiry {
  margin-top: 16px;
  padding: 14px;
  border-radius: 17px;
  background: rgba(255,255,255,.52);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 10px;
  align-items: center;
}
.customer-expiry span { color: var(--muted); font-size: 14px; }
.customer-expiry strong { font-size: 16px; }
.customer-expiry small { grid-column: 1 / -1; color: var(--muted); font-size: 14px; }
.customer-expiry.warning { background: rgba(255,224,174,.38); }
.customer-expiry.expired { background: rgba(227,79,95,.08); }
.usage-block { margin-top: 16px; }
.usage-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.usage-head span { color: var(--muted); font-size: 14px; }
.usage-head strong { font-size: 15px; }
.usage-track { height: 9px; margin-top: 9px; border-radius: 999px; background: rgba(17,24,39,.07); overflow: hidden; }
.usage-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#22a7ff,#006fc9); }
.customer-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 17px;
  padding-top: 14px;
  border-top: 1px solid rgba(17,24,39,.07);
  color: var(--muted);
  font-size: 14px;
}
.access-denied { max-width: 700px; margin: 50px auto; padding: 30px; border-radius: 28px; text-align: center; }
.access-denied h2 { font-size: 26px; }
.access-denied p { color: var(--muted); font-size: 16px; line-height: 1.7; }

.customer-form { margin-top: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid > label,
.full-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-grid label > span,
.full-field > span { color: var(--muted); font-size: 14px; font-weight: 750; }
.form-grid input,
.form-grid select,
.full-field textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(17,24,39,.1);
  border-radius: 15px;
  background: rgba(255,255,255,.86);
  color: var(--ink);
  padding: 0 14px;
  outline: none;
  font-size: 16px;
}
.full-field textarea { min-height: 104px; padding-top: 12px; resize: vertical; }
.form-grid input:focus,
.form-grid select:focus,
.full-field textarea:focus { border-color: rgba(0,135,235,.5); box-shadow: 0 0 0 4px rgba(0,135,235,.08); }
.setting-input { width: 120px; min-height: 38px; border: 1px solid rgba(17,24,39,.1); border-radius: 12px; background: rgba(255,255,255,.86); padding: 0 10px; text-align: right; }
.toggle-field { justify-content: space-between; }
.toggle-field > .switch { margin-top: 3px; }
.current-usage { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.current-usage > div { padding: 13px; border-radius: 15px; background: rgba(177,227,255,.2); }
.current-usage span { display: block; color: var(--muted); font-size: 14px; }
.current-usage strong { display: block; margin-top: 6px; font-size: 17px; }
.expiry-rule-note { margin-top: 14px; padding: 14px; border-radius: 16px; background: rgba(255,224,174,.34); color: #6e4b0f; display: flex; align-items: flex-start; gap: 9px; font-size: 14px; line-height: 1.6; }

@media (max-width: 1240px) {
  .customers-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 1180px) and (min-width: 821px) {
  .monitor-layout { grid-template-columns: minmax(300px,1fr) minmax(0,2fr); }
  .account-rail { position: sticky; display: block; overflow: visible; padding: 16px; }
  .rail-label { display: block; }
  .rail-account { min-width: 0; }
}
@media (max-width: 980px) {
  .monitor-layout { grid-template-columns: 1fr; }
  .account-rail { position: static; }
  .customer-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .customers-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .brand-copy,
  .nav-label,
  .nav-badge,
  .system-mini,
  .system-mini > div,
  body.sidebar-collapsed .brand-copy,
  body.sidebar-collapsed .nav-label,
  body.sidebar-collapsed .nav-badge,
  body.sidebar-collapsed .system-mini,
  body.sidebar-collapsed .system-mini > div {
    max-width: 210px;
    opacity: 1;
    transform: none;
  }
  body.sidebar-collapsed .nav-button { justify-content:flex-start; padding:0 14px; }
  .customer-summary-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .customer-summary { min-height: 120px; padding: 15px; }
  .customer-summary strong { font-size: 30px; }
  .customer-card { padding: 16px; }
  .customer-card-head { flex-direction: column; }
  .current-usage { grid-template-columns: 1fr; }
}

/* Keep custom dropdown menus above the following glass panels */
.filter-bar {
  position: relative;
  z-index: 35;
  overflow: visible;
}
.custom-select.open { z-index: 60; }
.custom-select.open .custom-select-menu { z-index: 80; }


/* =========================================================
   Core Helper UI V6 — modal interaction and scroll fixes
   ========================================================= */

/* Renewal modal: keep all scrolling inside the rounded surface */
.renewal-modal {
  overflow: hidden !important;
  padding: 0 !important;
}
.renewal-scroll {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 26px;
  border-radius: inherit;
  overscroll-behavior: contain;
  scroll-behavior: auto;
  scrollbar-gutter: stable;
}
.renewal-scroll::-webkit-scrollbar { width: 11px; }
.renewal-scroll::-webkit-scrollbar-track {
  background: rgba(177,227,255,.20);
  border-radius: 999px;
  margin-block: 18px;
}
.renewal-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(38,164,248,.88), rgba(0,111,201,.96));
  border-radius: 999px;
  border: 3px solid rgba(245,251,255,.84);
}
.renewal-scroll::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #159bf4, #006fc9);
}

/* The whole summary column follows the modal scroll on desktop */
.renewal-summary {
  min-width: 0;
  position: sticky;
  top: 12px;
  align-self: start;
  z-index: 3;
}
.summary-sticky {
  position: static !important;
}

/* Phone field now uses the same visual language as the rest of the backend */
.phone-panel {
  margin-top: 14px;
  display: block;
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255,255,255,.78), rgba(235,248,255,.62));
  border: 1px solid rgba(255,255,255,.86);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.88), 0 10px 28px rgba(31,80,120,.07);
}
.phone-field {
  display: block;
}
.phone-field > span {
  display: block;
  margin-bottom: 9px;
  color: #3d4b5e;
  font-size: 14px;
  font-weight: 850;
}
.phone-input-shell {
  min-height: 54px;
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  border-radius: 16px;
  border: 1px solid rgba(0,135,235,.18);
  background: rgba(255,255,255,.92);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.96), 0 8px 22px rgba(31,80,120,.07);
  transition: border-color var(--ease), box-shadow var(--ease), background var(--ease);
}
.phone-input-shell:focus-within {
  border-color: rgba(0,135,235,.56);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0,135,235,.10), 0 10px 28px rgba(31,80,120,.09);
}
.phone-input-shell > .icon { color: var(--blue-deep); }
.phone-input-shell input {
  width: 100%;
  min-width: 0;
  height: 50px;
  margin: 0;
  padding: 0;
  border: 0 !important;
  outline: 0;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none !important;
  background: transparent !important;
  color: var(--ink);
  font-size: 17px !important;
  font-weight: 760;
  letter-spacing: .25px;
}
.phone-input-shell input::placeholder { color: #98a2b3; font-weight: 600; }
.phone-valid {
  min-width: 42px;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(232,155,36,.13);
  color: #a56100;
  font-size: 13px;
  font-weight: 850;
}
.phone-valid.valid {
  min-width: 28px;
  padding: 0;
  color: white;
  background: var(--success);
}
.phone-field > small {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.confirm-check { display: none !important; }

/* Detail drawers: outer shell clips the corners, inner layer owns scrolling */
.detail-drawer {
  overflow: hidden !important;
  padding: 0 !important;
}
.detail-drawer.customer-modal {
  top: 50%;
  right: auto;
  bottom: auto;
  left: 50%;
  width: min(980px, calc(100vw - 48px));
  height: min(900px, calc(100vh - 48px));
  max-height: none;
  border-radius: 30px;
  transform: translate(-50%, -46%) scale(.97);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.detail-drawer.customer-modal.open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}
.detail-drawer.customer-modal .drawer-scroll { padding: 28px; }
.telegram-settings-section,
.telegram-settings-card { padding: 22px !important; }
.telegram-section-head,
.telegram-recipient-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.telegram-section-head h3 { margin: 6px 0 5px; font-size: 18px; }
.telegram-section-head p,
.telegram-recipient-head p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.telegram-connection-pill { flex: 0 0 auto; padding: 8px 12px; border-radius: 999px; color: var(--muted); background: rgba(148,163,184,.13); font-size: 11px; font-weight: 800; }
.telegram-connection-pill.enabled { color: #07845a; background: rgba(28,184,126,.13); }
.telegram-settings-grid { display: grid; grid-template-columns: minmax(220px,.85fr) minmax(0,1.15fr); gap: 12px; margin-top: 18px; }
.telegram-toggle-card,
.telegram-field { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 7px; padding: 14px; border-radius: 17px; background: rgba(255,255,255,.55); border: 1px solid rgba(17,24,39,.07); }
.telegram-toggle-card { grid-row: span 2; flex-direction: row; align-items: center; justify-content: space-between; gap: 14px; }
.telegram-toggle-card strong { display: block; font-size: 14px; }
.telegram-toggle-card small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.telegram-field > span { color: var(--muted); font-size: 12px; font-weight: 800; }
.telegram-field input { width: 100%; min-height: 44px; border: 1px solid rgba(17,24,39,.1); border-radius: 13px; background: rgba(255,255,255,.9); color: var(--ink); padding: 0 12px; outline: none; font-size: 14px; }
.telegram-field input:focus { border-color: rgba(0,135,235,.5); box-shadow: 0 0 0 4px rgba(0,135,235,.08); }
.telegram-field input[readonly] { background: rgba(226,232,240,.42); color: var(--muted); }
.telegram-toggle-card input:disabled + .slider { opacity: .55; cursor: not-allowed; }
.telegram-help-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; padding: 11px 13px; border-radius: 13px; background: rgba(177,227,255,.2); color: var(--muted); font-size: 11px; line-height: 1.5; }
.telegram-recipient-box { margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(17,24,39,.08); }
.telegram-recipient-head h4 { margin: 0 0 4px; font-size: 14px; }
.telegram-recipient-list { display: grid; gap: 8px; margin-top: 12px; }
.telegram-recipient-row { display: grid; grid-template-columns: 36px minmax(0,1fr) auto auto; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 14px; background: rgba(255,255,255,.54); border: 1px solid rgba(17,24,39,.06); }
.telegram-recipient-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: linear-gradient(145deg,#2ca8f5,#006fc9); font-size: 13px; font-weight: 900; }
.telegram-recipient-main { min-width: 0; }
.telegram-recipient-main strong,
.telegram-recipient-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.telegram-recipient-main strong { font-size: 13px; }
.telegram-recipient-main small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.telegram-action-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; margin-top: 18px; }
.telegram-empty-state { margin-top: 12px; padding: 18px; }
@media (max-width: 700px) {
  .detail-drawer.customer-modal { top: 8px; right: 8px; bottom: 8px; left: 8px; width: auto; height: auto; border-radius: 26px; transform: translateY(18px) scale(.98); }
  .detail-drawer.customer-modal.open { transform: translateY(0) scale(1); }
  .detail-drawer.customer-modal .drawer-scroll { padding: 18px; }
  .telegram-settings-section,
  .telegram-settings-card { padding: 17px !important; }
  .telegram-section-head { flex-direction: column; }
  .telegram-settings-grid { grid-template-columns: 1fr; }
  .telegram-toggle-card { grid-row: auto; }
  .telegram-recipient-row { grid-template-columns: 34px minmax(0,1fr) auto; }
  .telegram-recipient-row .mini-button { grid-column: 2 / -1; justify-self: start; }
  .telegram-action-row > button { flex: 1 1 100%; }
}
.drawer-scroll {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px;
  border-radius: inherit;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.drawer-scroll::-webkit-scrollbar { width: 10px; }
.drawer-scroll::-webkit-scrollbar-track {
  background: rgba(177,227,255,.18);
  border-radius: 999px;
  margin-block: 17px;
}
.drawer-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(38,164,248,.82), rgba(0,111,201,.94));
  border-radius: 999px;
  border: 3px solid rgba(247,252,255,.82);
}
.drawer-scroll::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #159bf4, #006fc9);
}

@media (max-width: 1080px) {
  .renewal-summary {
    position: static;
    top: auto;
  }
}

@media (max-width: 820px) {
  .renewal-scroll { padding: 18px; }
  .drawer-scroll {
    height: auto;
    max-height: 84vh;
    padding: 18px;
  }
  .phone-panel { padding: 14px; }
}


/* ===== V7 monitor layout refinement ===== */
@media (min-width: 981px) {
  .monitor-layout {
    grid-template-columns: minmax(360px, 2fr) minmax(0, 3fr);
    gap: 16px;
  }
}

.rail-head {
  justify-content: flex-start;
  margin-bottom: 11px;
}

.rail-status-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  overflow: visible;
  margin-bottom: 12px;
}

.rail-status-chip {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 0 4px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
}

@media (max-width: 1180px) and (min-width: 981px) {
  .monitor-layout {
    grid-template-columns: minmax(330px, 2fr) minmax(0, 3fr);
  }
  .rail-status-filters {
    gap: 4px;
  }
  .rail-status-chip {
    font-size: 13px;
    padding-inline: 2px;
  }
}

@media (max-width: 980px) {
  .rail-status-filters {
    grid-template-columns: repeat(5, minmax(92px, 1fr));
    overflow-x: auto;
    padding-bottom: 3px;
  }
}

/* Monitor desktop: give the post table a little more room while keeping the
   account rail readable.  This is roughly 10% narrower than the previous
   0.67fr / 1.83fr split. */
@media (min-width: 981px) {
  .monitor-layout {
    grid-template-columns: minmax(243px, .60fr) minmax(0, 1.90fr) !important;
  }
}

@media (max-width: 1180px) and (min-width: 981px) {
  .monitor-layout {
    grid-template-columns: minmax(225px, .60fr) minmax(0, 1.90fr) !important;
  }
}


/* =========================================================
   Core Helper UI V8 — renewal center and account/email rules
   ========================================================= */
@media (min-width: 981px) {
  .monitor-layout {
    grid-template-columns: minmax(270px, .67fr) minmax(0, 1.83fr) !important;
    gap: 16px;
  }
}
@media (max-width: 1180px) and (min-width: 981px) {
  .monitor-layout { grid-template-columns: minmax(250px, .67fr) minmax(0, 1.83fr) !important; }
}
.rail-account { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:10px; }
.rail-copy { min-width:0; }
.rail-copy strong, .rail-copy small { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rail-copy small { margin-top:5px; color:var(--muted); }
.rail-side { display:flex; align-items:center; justify-content:flex-end; gap:7px; }
.rail-account-status { min-height:27px; padding:0 8px; border-radius:99px; display:inline-flex; align-items:center; font-size:12px; font-weight:850; white-space:nowrap; background:rgba(23,166,115,.10); color:#0c8158; }
.rail-account-status.warning { background:rgba(255,224,174,.62); color:#965d00; }
.rail-account-status.error { background:rgba(227,79,95,.11); color:#c63243; }
.rail-count { min-width:auto; font-weight:850; color:#475467; }
.account-cell small { max-width:190px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

.renewal-overview-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:14px; }
.renewal-overview { min-height:124px; border-radius:22px; padding:18px; }
.renewal-overview span, .renewal-overview small { display:block; }
.renewal-overview span { font-weight:800; color:#405065; }
.renewal-overview strong { display:block; margin:9px 0 5px; font-size:34px; letter-spacing:-1px; }
.renewal-overview small { color:var(--muted); font-size:14px; }
.renewal-center-tabs { display:flex; gap:7px; padding:7px; border-radius:20px; margin-bottom:14px; }
.renewal-center-tabs button { min-height:45px; border:0; border-radius:14px; padding:0 17px; background:transparent; color:#58667a; font-weight:800; cursor:pointer; }
.renewal-center-tabs button.active { color:var(--blue-deep); background:rgba(255,255,255,.9); box-shadow:0 7px 20px rgba(31,80,120,.08); }
.renewal-center-tabs button span { margin-left:5px; padding:2px 7px; border-radius:99px; background:rgba(0,135,235,.1); }
.renewal-dual-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; align-items:start; }
.renewal-bucket { border-radius:26px; padding:17px; min-width:0; }
.renewal-bucket-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; padding:3px 2px 14px; }
.renewal-bucket-kicker { color:var(--blue-deep); font-size:14px; font-weight:900; letter-spacing:.5px; }
.renewal-bucket.error .renewal-bucket-kicker { color:var(--danger); }
.renewal-bucket-head h3 { margin:5px 0 3px; font-size:25px; }
.renewal-bucket-head p { margin:0; color:var(--muted); font-size:14px; }
.renewal-select-all { min-height:42px; padding:0 11px; border-radius:14px; background:rgba(255,255,255,.67); display:flex; align-items:center; gap:8px; cursor:pointer; white-space:nowrap; }
.renewal-select-all input, .candidate-check input { accent-color:var(--blue); width:18px; height:18px; }
.renewal-candidate-list { display:flex; flex-direction:column; gap:9px; }
.renewal-candidate { display:grid; grid-template-columns:auto minmax(0,1fr) 142px; gap:12px; align-items:start; padding:14px; border-radius:19px; background:rgba(255,255,255,.52); border:1px solid rgba(255,255,255,.7); cursor:pointer; transition:var(--ease); }
.renewal-candidate:hover, .renewal-candidate.selected { background:rgba(235,248,255,.9); border-color:rgba(0,135,235,.22); }
.candidate-check { padding-top:2px; cursor:pointer; }
.candidate-main { min-width:0; }
.candidate-account { display:flex; gap:8px 13px; align-items:baseline; flex-wrap:wrap; }
.candidate-account strong { font-size:16px; }
.candidate-account small { color:var(--muted); font-size:14px; max-width:260px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.candidate-main h4 { margin:8px 0; font-size:16px; line-height:1.5; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; }
.candidate-meta { display:flex; flex-wrap:wrap; gap:8px 14px; color:var(--muted); font-size:14px; }
.warning-text { color:#a56100; font-weight:800; }.danger-text { color:var(--danger); font-weight:800; }
.candidate-side { display:flex; flex-direction:column; align-items:flex-end; gap:7px; text-align:right; }
.candidate-side small { color:var(--muted); font-size:13px; }
.candidate-side .mini-button { margin-top:2px; }
.renewal-selection-bar { position:sticky; bottom:14px; z-index:12; margin-top:14px; border-radius:22px; padding:14px 16px; display:none; align-items:center; justify-content:space-between; gap:18px; background:linear-gradient(135deg,rgba(17,24,39,.92),rgba(26,50,76,.93)); color:white; }
.renewal-selection-bar.show { display:flex; }
.renewal-selection-bar > div:first-child { min-width:0; }
.renewal-selection-bar strong { display:block; font-size:18px; }
.renewal-selection-bar span { display:block; margin-top:5px; color:rgba(255,255,255,.68); font-size:14px; }
.renewal-selection-bar > div:last-child { display:flex; gap:8px; flex:0 0 auto; }
.batch-precheck { border-radius:27px; padding:20px; margin-bottom:14px; border:1px solid rgba(0,135,235,.2); background:linear-gradient(140deg,rgba(243,251,255,.96),rgba(255,255,255,.82)); }
.batch-precheck-head { display:flex; justify-content:space-between; gap:15px; }
.batch-precheck-head h3 { margin:4px 0; font-size:24px; }.batch-precheck-head p { margin:0; color:var(--muted); }
.precheck-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:9px; margin:17px 0; }
.precheck-stats > div { padding:14px; border-radius:17px; background:rgba(255,255,255,.76); }
.precheck-stats span,.precheck-stats small { display:block; color:var(--muted); font-size:14px; }.precheck-stats strong { display:block; margin:5px 0; font-size:27px; }
.precheck-list { display:flex; flex-direction:column; gap:7px; max-height:330px; overflow:auto; }
.precheck-list > div { display:grid; grid-template-columns:62px 150px minmax(0,1fr) 100px; gap:10px; align-items:center; min-height:58px; padding:9px 12px; border-radius:15px; background:rgba(255,255,255,.66); }
.precheck-list span strong,.precheck-list span small { display:block; }.precheck-list span small { color:var(--muted); font-size:13px; margin-top:3px; }.precheck-title { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.precheck-result { min-height:28px; border-radius:99px; display:grid; place-items:center; font-weight:850; font-size:13px; }.precheck-result.new { color:var(--blue-deep); background:rgba(0,135,235,.1); }.precheck-result.reuse { color:#a56100; background:rgba(255,224,174,.5); }
.batch-precheck-actions { display:flex; justify-content:flex-end; gap:9px; margin-top:16px; }
.payment-workspace { overflow:visible; }
.payment-summary-strip { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin:14px 0; }
.payment-summary-strip > div { padding:13px; border-radius:16px; background:rgba(177,227,255,.18); }.payment-summary-strip span { display:block; color:var(--muted); font-size:14px; }.payment-summary-strip strong { display:block; margin-top:6px; font-size:18px; }
.effective-order-list { display:flex; flex-direction:column; gap:8px; }
.effective-order { display:grid; grid-template-columns:170px 150px minmax(300px,1.6fr) minmax(200px,.95fr) 120px auto; gap:12px; align-items:center; padding:13px; border-radius:18px; background:rgba(255,255,255,.5); }
.order-source,.order-account,.order-post,.order-code,.order-amount { min-width:0; }.order-source { min-height:54px; overflow:hidden; border-radius:14px; padding:8px; display:flex; flex-direction:column; justify-content:center; background:rgba(177,227,255,.2); }.order-source.single { background:rgba(255,224,174,.35); }.order-source span { font-size:13px; color:var(--muted); }.order-source strong { margin-top:4px; font-size:14px; line-height:1.25; overflow-wrap:anywhere; word-break:break-word; }
.order-account strong,.order-account small,.order-post strong,.order-post small,.order-code strong,.order-code small,.order-amount span,.order-amount strong { display:block; }.order-account small,.order-post small,.order-code small,.order-amount span { margin-top:4px; color:var(--muted); font-size:13px; }.order-post strong { line-height:1.45; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }.order-code strong { margin-top:6px; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:18px; letter-spacing:1.3px; overflow-wrap:anywhere; }.order-code-copy { display:block; width:100%; margin:2px 0 0; padding:0; border:0; color:inherit; background:transparent; text-align:left; cursor:pointer; }.order-code-copy:hover strong,.live-payment-code:hover strong { color:var(--blue-deep); }.order-amount strong { margin-top:5px; font-size:17px; }.order-actions { display:flex; gap:7px; flex-wrap:wrap; align-items:center; justify-content:flex-end; }.complete-payment-button { white-space:nowrap; min-height:36px; }.complete-payment-button.loading { opacity:.65; pointer-events:none; }
.payment-batch-list { display:flex; flex-direction:column; gap:12px; }.payment-batch-card { border-radius:21px; padding:17px; background:rgba(255,255,255,.5); }.payment-batch-head { display:flex; justify-content:space-between; gap:14px; }.payment-batch-head h4 { margin:8px 0 2px; font-size:20px; }.payment-batch-head p { margin:0; color:var(--muted); font-size:14px; }.batch-total { text-align:right; }.batch-total span,.batch-total strong { display:block; }.batch-total span { color:var(--muted); font-size:14px; }.batch-total strong { margin-top:5px; font-size:25px; }
.batch-count-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin:14px 0; }.batch-count-grid > div { padding:12px; border-radius:15px; background:rgba(177,227,255,.17); }.batch-count-grid span,.batch-count-grid strong { display:block; }.batch-count-grid span { color:var(--muted); font-size:13px; }.batch-count-grid strong { margin-top:5px; font-size:20px; }
.batch-note { padding:12px; border-radius:15px; background:rgba(255,224,174,.34); color:#6e4b0f; display:flex; align-items:center; gap:8px; font-size:14px; }
.batch-order-preview { margin-top:12px; display:flex; flex-direction:column; gap:6px; }.batch-order-preview > div { display:grid; grid-template-columns:145px minmax(0,1fr) auto; gap:10px; align-items:center; padding:10px; border-radius:14px; background:rgba(255,255,255,.58); cursor:pointer; }.batch-order-preview span strong,.batch-order-preview span small { display:block; }.batch-order-preview span small { margin-top:3px; color:var(--muted); font-size:13px; }.batch-order-preview > div > span:nth-child(2) { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.renewal-history-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }.history-list { display:flex; flex-direction:column; gap:8px; }.history-row { display:grid; grid-template-columns:auto 160px minmax(0,1fr) auto; gap:10px; align-items:center; padding:12px; border-radius:16px; background:rgba(255,255,255,.5); }.history-row div strong,.history-row div small { display:block; }.history-row div small { margin-top:4px; color:var(--muted); font-size:13px; }.history-row div:nth-child(3) strong { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.live-renewal-status { max-width:720px; margin:28px auto 18px; padding:22px; text-align:center; border-radius:22px; background:rgba(255,255,255,.52); }.live-renewal-status h3 { margin:14px 0 6px; font-size:20px; }.live-renewal-status p { margin:0; color:var(--muted); line-height:1.6; }.error-text { color:var(--danger); }.error-orb { background:linear-gradient(145deg,#ef6a79,#b42336) !important; }.workflow-spinner { display:inline-flex; animation:spin 1.1s linear infinite; }.live-order-list { max-width:900px; margin:0 auto 16px; display:flex; flex-direction:column; gap:10px; }.live-order-card { padding:16px; border-radius:20px; background:rgba(255,255,255,.62); border:1px solid rgba(255,255,255,.82); }.live-order-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }.live-order-card-head div { min-width:0; }.live-order-card-head span:first-child,.live-order-card-head strong { display:block; }.live-order-card-head span:first-child { color:var(--muted); font-size:12px; }.live-order-card-head strong { margin-top:4px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.live-order-meta { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-top:14px; }.live-order-meta > div { min-width:0; padding:10px; border-radius:13px; background:rgba(177,227,255,.18); }.live-order-meta small,.live-order-meta strong { display:block; }.live-order-meta small { color:var(--muted); font-size:11px; }.live-order-meta strong { margin-top:4px; font-size:13px; overflow-wrap:anywhere; }.live-payment-code { display:block; width:100%; margin-top:12px; padding:14px; border:0; border-radius:16px; background:rgba(177,227,255,.38); text-align:left; cursor:pointer; }.live-payment-code span,.live-payment-code strong,.live-payment-code small { display:block; }.live-payment-code span { color:var(--muted); font-size:12px; }.live-payment-code strong { margin-top:6px; font:800 26px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:2px; }.live-payment-code small { margin-top:5px; color:var(--muted); }.live-payment-pending { display:flex; align-items:center; gap:8px; margin-top:12px; padding:12px; border-radius:14px; background:rgba(255,224,174,.35); color:#6e4b0f; font-size:13px; }.live-workflow-steps { display:flex; flex-wrap:wrap; gap:7px; margin-top:14px; }.live-workflow-step { display:flex; align-items:center; gap:6px; padding:7px 9px; border-radius:99px; color:var(--muted); background:rgba(17,24,39,.05); font-size:11px; }.live-workflow-step.done { color:var(--success); background:rgba(47,196,142,.12); }.live-workflow-step.active { color:var(--blue-deep); background:rgba(0,135,235,.12); }.live-workflow-step.failed { color:var(--danger); background:rgba(239,106,121,.12); }.live-refresh-note { max-width:720px; margin:12px auto; text-align:center; color:var(--muted); font-size:12px; }
.empty-state { padding:30px 15px; text-align:center; color:var(--muted); }
@media (max-width:1280px) {
  .renewal-dual-grid { grid-template-columns:1fr; }
  .effective-order { grid-template-columns:155px 130px minmax(220px,1fr) minmax(180px,.8fr) 110px; }
  .order-actions { grid-column:1/-1; justify-content:flex-end; }
}
@media (max-width:980px) {
  .renewal-overview-grid { grid-template-columns:1fr 1fr; }
  .renewal-history-grid { grid-template-columns:1fr; }
  .effective-order { grid-template-columns:110px minmax(0,1fr); }
  .order-post,.order-code,.order-amount { grid-column:1/-1; }
  .order-actions { grid-column:1/-1; }
  .live-order-meta { grid-template-columns:1fr; }
  .precheck-list > div { grid-template-columns:62px 130px minmax(0,1fr); }.precheck-list > div > strong { display:none; }
}
@media (max-width:700px) {
  .renewal-overview-grid { grid-template-columns:1fr 1fr; }
  .renewal-center-tabs { overflow-x:auto; }.renewal-center-tabs button { white-space:nowrap; }
  .renewal-bucket-head { flex-direction:column; }.renewal-select-all { width:100%; justify-content:center; }
  .renewal-candidate { grid-template-columns:auto minmax(0,1fr); }.candidate-side { grid-column:2; align-items:flex-start; text-align:left; }
  .renewal-selection-bar { position:sticky; bottom:calc(78px + env(safe-area-inset-bottom)); z-index:40; flex-direction:column; align-items:stretch; margin:14px 0 10px; box-shadow:0 16px 34px rgba(17,24,39,.26); }.renewal-selection-bar > div:last-child { display:grid; grid-template-columns:1fr 1fr; }
  .precheck-stats,.payment-summary-strip,.batch-count-grid { grid-template-columns:1fr 1fr; }
  .precheck-list > div { grid-template-columns:60px minmax(0,1fr); }.precheck-title { grid-column:1/-1; }
  .payment-batch-head { flex-direction:column; }.batch-total { text-align:left; }
  .batch-order-preview > div { grid-template-columns:1fr auto; }.batch-order-preview > div > span:nth-child(2) { grid-column:1/-1; }
  .history-row { grid-template-columns:auto minmax(0,1fr); }.history-row > div:nth-child(3),.history-row > button { grid-column:1/-1; }
}

/* =========================================================
   Core Helper UI V9 — Batch renewal modal workflow
   ========================================================= */
.batch-modal-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0 14px;
}
.batch-modal-stats > div {
  min-height: 118px;
  padding: 17px;
  border-radius: 20px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(255,255,255,.86);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
}
.batch-modal-stats span,
.batch-modal-stats small {
  display: block;
  color: var(--muted);
  font-size: 14px;
}
.batch-modal-stats strong {
  display: block;
  margin: 8px 0 5px;
  font-size: 34px;
  line-height: 1;
  letter-spacing: -1px;
}
.batch-precheck-notice {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 15px;
  border-radius: 17px;
  color: #245e7e;
  background: rgba(177,227,255,.28);
  border: 1px solid rgba(0,135,235,.12);
  font-weight: 750;
}
.batch-modal-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  max-height: 390px;
  overflow: auto;
  padding-right: 5px;
}
.batch-modal-list article {
  display: grid;
  grid-template-columns: 68px minmax(135px,.65fr) minmax(0,1.65fr) 105px;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 11px 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.66);
  border: 1px solid rgba(255,255,255,.82);
}
.batch-modal-account strong,
.batch-modal-account small,
.batch-modal-post strong,
.batch-modal-post small {
  display: block;
}
.batch-modal-account small,
.batch-modal-post small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}
.batch-modal-post strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.batch-modal-order { text-align: right; }
.batch-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  position: sticky;
  bottom: -26px;
  z-index: 5;
  margin: 18px -26px -26px;
  padding: 15px 26px 23px;
  background: linear-gradient(180deg,rgba(247,252,255,0),rgba(247,252,255,.96) 30%);
}
.batch-renewal-workspace { align-items: start; }
.batch-scope-grid,
.batch-summary-counts,
.batch-result-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 9px;
}
.batch-scope-grid > div {
  padding: 14px;
  border-radius: 17px;
  background: rgba(177,227,255,.18);
}
.batch-scope-grid span,
.batch-scope-grid strong { display: block; }
.batch-scope-grid span { color: var(--muted); font-size: 14px; }
.batch-scope-grid strong { margin-top: 6px; font-size: 20px; }
.batch-account-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.batch-account-chips > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 99px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(17,24,39,.06);
}
.batch-account-chips small { color: var(--muted); font-size: 13px; }
.batch-summary-counts { grid-template-columns: 1fr 1fr; margin-bottom: 13px; }
.batch-summary-counts > div {
  padding: 11px;
  border-radius: 15px;
  background: rgba(255,255,255,.08);
}
.batch-summary-counts span,
.batch-summary-counts strong { display: block; }
.batch-summary-counts span { color: rgba(255,255,255,.62); font-size: 13px; }
.batch-summary-counts strong { margin-top: 5px; font-size: 18px; }
.batch-summary-details {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid rgba(255,255,255,.11);
  max-height: 240px;
  overflow: auto;
  padding-right: 4px;
}
.batch-summary-detail-head {
  display: flex;
  justify-content: space-between;
  color: rgba(255,255,255,.65);
  margin-bottom: 7px;
}
.batch-summary-detail {
  display: grid;
  grid-template-columns: 52px minmax(0,1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.batch-summary-detail > span:nth-child(2) { min-width: 0; }
.batch-summary-detail > span:nth-child(2) strong,
.batch-summary-detail > span:nth-child(2) small { display: block; }
.batch-summary-detail > span:nth-child(2) small {
  margin-top: 3px;
  color: rgba(255,255,255,.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
}
.batch-summary-detail > strong { font-size: 13px; white-space: nowrap; }
.batch-summary .precheck-result { min-height: 24px; font-size: 11px; }
.batch-result { max-width: 760px; }
.batch-result h3 { margin: 18px 0 0; font-size: 26px; }
.batch-result-grid { margin-top: 22px; grid-template-columns: repeat(3,1fr); }
.batch-result-grid > div {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,.62);
  text-align: left;
}
.batch-result-grid span,
.batch-result-grid strong { display: block; }
.batch-result-grid span { color: var(--muted); font-size: 14px; }
.batch-result-grid strong { margin-top: 7px; font-size: 18px; }
.batch-modal-list::-webkit-scrollbar,
.batch-summary-details::-webkit-scrollbar { width: 8px; }
.batch-modal-list::-webkit-scrollbar-track,
.batch-summary-details::-webkit-scrollbar-track { background: rgba(177,227,255,.14); border-radius: 99px; }
.batch-modal-list::-webkit-scrollbar-thumb { background: rgba(0,111,201,.7); border-radius: 99px; }
.batch-summary-details::-webkit-scrollbar-thumb { background: rgba(177,227,255,.46); border-radius: 99px; }

@media (max-width: 1080px) {
  .batch-modal-list article { grid-template-columns: 68px minmax(125px,.7fr) minmax(0,1.4fr); }
  .batch-modal-order { display: none; }
}
@media (max-width: 820px) {
  .batch-modal-stats,
  .batch-scope-grid { grid-template-columns: 1fr 1fr; }
  .batch-modal-list { max-height: none; }
  .batch-modal-list article { grid-template-columns: 60px minmax(0,1fr); }
  .batch-modal-post { grid-column: 1 / -1; }
  .batch-modal-actions { bottom: -18px; margin: 15px -18px -18px; padding: 14px 18px 20px; }
  .batch-result-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .batch-modal-stats > div { min-height: 100px; padding: 14px; }
  .batch-modal-stats strong { font-size: 29px; }
  .batch-modal-actions { display: grid; grid-template-columns: 1fr; }
  .batch-modal-actions .primary-button { grid-row: 1; }
  .batch-scope-grid { grid-template-columns: 1fr 1fr; }
  .batch-result-grid { grid-template-columns: 1fr; }
}

/* Final precedence for dashboard, tasks and store logos. */
.job-row { grid-template-columns: minmax(150px,.9fr) minmax(130px,.7fr) minmax(240px,2fr) minmax(110px,.7fr) 72px auto; }
.job-row > div { min-width: 0; }
.job-row > div strong, .job-row > div small { line-height: 1.4; overflow-wrap: anywhere; word-break: break-word; }
.job-target strong { white-space: normal; }
.store-option { grid-template-columns: 46px minmax(0,1fr) 22px; }
.store-logo { width: 46px; height: 46px; padding: 5px; overflow: hidden; border-radius: 12px; background: #fff; border: 1px solid rgba(17,24,39,.08); }
.store-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 1180px) {
  .job-row { grid-template-columns: minmax(140px,.8fr) minmax(120px,.7fr) minmax(220px,1.8fr) auto; }
  .job-row .job-worker, .job-row .job-duration { display: none; }
}
@media (max-width: 820px) {
  .job-row { grid-template-columns: minmax(0,1fr) auto; }
  .job-row .job-target { display: block; grid-column: 1 / -1; }
}

.batch-detail-panel { padding: 24px; border-radius: 24px; background: rgba(255,255,255,.62); }
.batch-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.batch-detail-head h3 { margin: 8px 0 4px; font-size: 24px; }
.batch-detail-head p { margin: 0; color: var(--muted); }
.batch-code-list { display: grid; gap: 10px; }
.batch-code-row { display: grid; grid-template-columns: 1.1fr 1.25fr .8fr 1fr; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 16px; background: rgba(240,248,255,.72); }
.batch-code-row strong, .batch-code-row small { display: block; }
.batch-code-row small { margin-top: 4px; color: var(--muted); overflow-wrap: anywhere; }
.batch-code-row > div:nth-child(3) strong { margin-top: 8px; }
.empty-code { color: var(--muted); font-size: 13px; }
@media (max-width: 900px) {
  .batch-detail-head { flex-direction: column; }
  .batch-code-row { grid-template-columns: 1fr 1fr; }
}

.renewal-overview-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.redesigned-batch-card { padding: 22px; border: 1px solid rgba(0,135,235,.1); box-shadow: 0 14px 34px rgba(30,80,120,.06); }
.redesigned-batch-card .payment-batch-head { align-items: flex-start; }
.batch-summary-title { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin:22px 0 12px; }
.batch-summary-title strong { font-size:24px; }
.batch-summary-title span { color:var(--muted); font-size:13px; }
.batch-progress-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.batch-progress-grid > div { padding:14px; border-radius:15px; background:rgba(240,248,255,.8); }
.batch-progress-grid strong, .batch-progress-grid span { display:block; }
.batch-progress-grid strong { font-size:25px; }
.batch-progress-grid span { margin-top:5px; color:var(--muted); font-size:13px; }
.batch-detail-button { width:fit-content; }
.batch-choice-list { display:grid; gap:10px; margin-top:14px; }
.batch-choice-list-head { padding:14px 16px; border-radius:16px; background:rgba(231,246,255,.8); }
.batch-choice-list-head strong, .batch-choice-list-head small { display:block; }
.batch-choice-list-head small { margin-top:4px; color:var(--muted); }
.batch-choice-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:14px; padding:13px 15px; border-radius:15px; background:rgba(255,255,255,.58); }
.batch-choice-row strong, .batch-choice-row small { display:block; }
.batch-choice-row small { margin-top:4px; color:var(--muted); overflow-wrap:anywhere; }
.batch-choice-options { display:flex; align-items:center; gap:7px; flex-wrap:wrap; justify-content:flex-end; }
.batch-choice-options .mini-button.selected { color:var(--blue-deep); background:rgba(0,135,235,.12); border-color:rgba(0,135,235,.3); }
.batch-precheck-list { display:grid; gap:8px; max-height:44vh; overflow:auto; margin-top:16px; }
.batch-precheck-choice { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:13px 15px; border-radius:15px; background:rgba(247,251,255,.78); }
.batch-precheck-choice strong, .batch-precheck-choice small { display:block; }
.batch-precheck-choice small { margin-top:4px; color:var(--muted); overflow-wrap:anywhere; }
.batch-order-modal-backdrop { position:fixed; inset:0; z-index:80; display:grid; place-items:center; padding:24px; background:rgba(12,31,48,.48); backdrop-filter:blur(9px); }
.batch-order-modal { width:min(1480px,calc(100vw - 56px)); max-height:calc(100vh - 56px); overflow:auto; padding:25px; border-radius:26px; }
.batch-order-modal { background:linear-gradient(145deg,rgba(255,255,255,.98),rgba(236,247,253,.98)); box-shadow:0 30px 90px rgba(8,35,58,.3); border:1px solid rgba(255,255,255,.9); }
.batch-order-modal-head { display:flex; justify-content:space-between; align-items:flex-start; gap:18px; }
.batch-order-modal-head h3 { margin:8px 0 4px; font-size:26px; }
.batch-order-modal-head p { margin:0; color:var(--muted); }
.batch-detail-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:20px 0 12px; padding:12px 14px; border-radius:14px; background:rgba(235,247,255,.8); color:var(--muted); font-size:13px; }
.batch-detail-table { display:grid; gap:7px; }
.batch-detail-row { display:grid; grid-template-columns:1fr 1.45fr 1fr .7fr 1.15fr .8fr; gap:12px; align-items:center; padding:13px 14px; border-radius:14px; background:rgba(247,251,255,.78); }
.batch-detail-row:not(.batch-detail-header):hover { background:rgba(225,244,255,.95); }
.batch-row-reason { display:block; max-width:240px; margin-top:4px; color:var(--danger,#c0392b); font-size:12px; line-height:1.45; white-space:normal; }
.batch-detail-row > div { min-width:0; }
.batch-detail-row strong, .batch-detail-row small { display:block; overflow-wrap:anywhere; }
.batch-detail-row small { margin-top:4px; color:var(--muted); font-size:12px; }
.batch-detail-header { color:var(--muted); background:rgba(224,241,251,.75); font-size:12px; }
.reuse-mark { color:#11865e !important; font-weight:700; }
.order-history-list { display:grid; gap:8px; }
.order-history-row { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(150px,1fr) 150px auto; gap:14px; align-items:center; padding:14px 16px; border-radius:15px; background:rgba(247,251,255,.78); }
.order-history-row strong, .order-history-row small { display:block; overflow-wrap:anywhere; }
.order-history-row small { margin-top:4px; color:var(--muted); font-size:12px; }
@media (max-width: 900px) {
  .renewal-overview-grid-3 { grid-template-columns:1fr; }
  .batch-progress-grid { grid-template-columns:1fr 1fr; }
  .batch-detail-toolbar { align-items:flex-start; flex-direction:column; }
  .batch-detail-row { grid-template-columns:1fr 1fr; }
  .batch-detail-header { display:none; }
  .order-history-row { grid-template-columns:1fr 1fr; }
}
@media (max-width: 700px) {
  .batch-order-modal-backdrop { padding:8px; align-items:stretch; }
  .batch-order-modal {
    width:100%;
    max-height:calc(100dvh - 16px);
    padding:18px 14px;
    border-radius:24px;
    overflow-x:hidden;
    overflow-y:auto;
    scrollbar-width:none;
    overscroll-behavior:contain;
  }
  .batch-order-modal::-webkit-scrollbar { display:none; width:0; height:0; }
  .batch-order-modal-head { gap:10px; }
  .batch-order-modal-head h3 { max-width:calc(100vw - 105px); font-size:24px; line-height:1.18; overflow-wrap:anywhere; }
  .batch-order-modal-head p { font-size:13px; line-height:1.5; }
  .batch-detail-toolbar { margin:16px 0 10px; padding:12px; gap:10px; }
  .batch-detail-toolbar > span { line-height:1.5; }
  .batch-detail-toolbar button { width:100%; }
  .batch-detail-table { gap:10px; }
  .batch-detail-row:not(.batch-detail-header) { grid-template-columns:1fr; gap:7px; padding:12px; }
  .batch-detail-row:not(.batch-detail-header) > div { padding:8px 10px; border-radius:11px; background:rgba(235,247,255,.48); }
  .batch-detail-row:not(.batch-detail-header) > div::before { display:block; margin-bottom:4px; color:var(--muted); font-size:11px; font-weight:800; }
  .batch-detail-row:not(.batch-detail-header) > div:nth-child(1)::before { content:'帳號'; }
  .batch-detail-row:not(.batch-detail-header) > div:nth-child(2)::before { content:'貼文'; }
  .batch-detail-row:not(.batch-detail-header) > div:nth-child(3)::before { content:'訂單編號'; }
  .batch-detail-row:not(.batch-detail-header) > div:nth-child(4)::before { content:'金額'; }
  .batch-detail-row:not(.batch-detail-header) > div:nth-child(5)::before { content:'付款代碼'; }
  .batch-detail-row:not(.batch-detail-header) > div:nth-child(6)::before { content:'狀態／原因'; }
  .batch-detail-row strong { line-height:1.45; }
  .batch-detail-row small { line-height:1.4; }
}
