:root {
  --ink: #18324a;
  --muted: #6e8194;
  --blue: #4f78ff;
  --blue-deep: #3157db;
  --cyan: #54c6d5;
  --green: #38b884;
  --orange: #f0a35c;
  --red: #ef6d75;
  --surface: rgba(250, 253, 255, 0.78);
  --line: rgba(103, 130, 160, 0.16);
  --shadow: 16px 20px 46px rgba(91, 124, 158, 0.18), -10px -10px 28px rgba(255, 255, 255, 0.82);
  --inset: inset 2px 2px 6px rgba(96, 125, 153, 0.1), inset -3px -3px 8px rgba(255,255,255,.9);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #edf4fb; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: linear-gradient(145deg, #eff6fc 0%, #e9f2fb 48%, #f5f7ff 100%); font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
.hidden { display: none !important; }
.ambient { position: fixed; border-radius: 50%; filter: blur(1px); pointer-events: none; opacity: .55; }
.ambient-a { width: 420px; height: 420px; left: -180px; top: -130px; background: radial-gradient(circle at 60% 60%, rgba(101,173,255,.4), transparent 68%); }
.ambient-b { width: 520px; height: 520px; right: -220px; bottom: -220px; background: radial-gradient(circle, rgba(176,144,255,.25), transparent 68%); }
.soft-card { background: var(--surface); border: 1px solid rgba(255,255,255,.78); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.eyebrow { margin: 0 0 7px; color: #6885a0; font-size: 11px; font-weight: 800; letter-spacing: .13em; }
h1,h2,h3,p { overflow-wrap: anywhere; }
h1 { margin: 0; font-size: clamp(25px, 3vw, 40px); letter-spacing: -.035em; }
h2,h3 { margin: 0; }
.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 28px; }
.auth-card { width: min(460px, 100%); padding: 42px; border-radius: 34px; text-align: center; }
.brand-mark { display: grid; place-items: center; width: 84px; height: 84px; margin: 0 auto 18px; border-radius: 29px; overflow: hidden; background: #f8fbff; box-shadow: 12px 16px 28px rgba(65,94,200,.3), inset 2px 2px 5px rgba(255,255,255,.35); }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.brand-mark.small { width: 50px; height: 50px; margin: 0; border-radius: 17px; font-size: 15px; }
.auth-card h1 { font-size: 30px; }
.auth-copy { margin: 14px auto 26px; max-width: 360px; color: var(--muted); line-height: 1.75; }
.auth-form { display: grid; gap: 15px; text-align: left; }
label { display: grid; gap: 7px; color: #536b82; font-size: 13px; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid rgba(109,137,164,.17); border-radius: 14px; padding: 12px 14px; color: var(--ink); background: rgba(244,248,252,.78); outline: none; box-shadow: var(--inset); transition: .2s ease; }
input:focus, select:focus, textarea:focus { border-color: rgba(79,120,255,.48); box-shadow: 0 0 0 4px rgba(79,120,255,.1), var(--inset); }
textarea { resize: vertical; line-height: 1.65; }
.notice-box { display: grid; gap: 4px; margin-bottom: 3px; padding: 14px; border-radius: 16px; color: #49677d; background: linear-gradient(135deg, #e8f7f5, #eef4ff); }
.notice-box span { font-size: 12px; font-weight: 500; }
.version-line { margin: 20px 0 0; color: #8ca0b1; font-size: 12px; }
.primary-btn,.ghost-btn,.text-btn,.nav-btn,.segmented button { border: 0; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.primary-btn { padding: 12px 18px; border-radius: 15px; color: white; font-weight: 800; background: linear-gradient(145deg, #658bff, #3b62de); box-shadow: 7px 10px 20px rgba(61,94,204,.25), inset 1px 1px 2px rgba(255,255,255,.35); }
.primary-btn:hover { transform: translateY(-1px); box-shadow: 9px 13px 24px rgba(61,94,204,.29); }
.primary-btn:disabled { cursor: wait; opacity: .62; }
.wide { width: 100%; }
.ghost-btn { padding: 10px 14px; border-radius: 13px; color: #557087; font-weight: 750; background: rgba(246,250,253,.7); box-shadow: 4px 5px 12px rgba(103,128,151,.12), inset 1px 1px 1px white; }
.ghost-btn:hover { background: white; transform: translateY(-1px); }
.text-btn { padding: 7px 0; color: var(--blue-deep); font-weight: 800; background: transparent; }
.app-shell { min-height: 100vh; padding: 18px; }
.sidebar { position: fixed; inset: 18px auto 18px 18px; width: 236px; padding: 22px 16px; border-radius: 28px; z-index: 10; display: flex; flex-direction: column; background: linear-gradient(155deg,rgba(218,231,244,.96),rgba(198,216,234,.92)); border-color: rgba(255,255,255,.56); box-shadow: 16px 20px 46px rgba(62,91,121,.24),-8px -8px 24px rgba(255,255,255,.72); }
.side-brand { display: flex; align-items: center; gap: 12px; padding: 3px 6px 25px; }
.side-brand div:last-child { display: grid; gap: 3px; }
.side-brand strong { font-size: 18px; }
.side-brand span { color: var(--muted); font-size: 11px; }
.side-nav { display: grid; gap: 8px; }
.nav-btn { width: 100%; display: flex; align-items: center; gap: 12px; padding: 13px 15px; border-radius: 15px; color: #6c8194; font-weight: 750; text-align: left; background: transparent; }
.nav-btn span { display: grid; place-items: center; width: 26px; font-size: 18px; }
.nav-btn.active { color: white; background: linear-gradient(135deg, #6388fb, #3f66de); box-shadow: 7px 9px 18px rgba(65,94,196,.24), inset 1px 1px 2px rgba(255,255,255,.34); }
.side-foot { margin-top: auto; padding: 15px 10px 4px; color: #6d8396; font-size: 12px; border-top: 1px solid var(--line); }
.side-foot small { display: block; margin: 8px 0 0 17px; color: #96a7b4; }
.live-dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: #3dc28b; box-shadow: 0 0 0 5px rgba(61,194,139,.12); }
.workspace { margin-left: 254px; padding: 3px 14px 90px; }
.topbar { min-height: 82px; display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 20px; }
.topbar h2 { font-size: 24px; }
.user-zone { display: flex; align-items: center; gap: 10px; }
.user-avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 15px; color: white; font-weight: 850; background: linear-gradient(145deg, #63c2cd, #4389b7); box-shadow: 5px 8px 16px rgba(60,136,166,.23); }
.user-copy { display: grid; gap: 2px; min-width: 90px; }
.user-copy span { color: var(--muted); font-size: 11px; }
.view { display: none; animation: rise .28s ease; }
.view.active { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.hero-card { min-height: 200px; display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 38px; border-radius: 30px; background: linear-gradient(125deg, rgba(251,253,255,.92), rgba(225,237,255,.83) 48%, rgba(233,246,245,.84)); overflow: hidden; position: relative; }
.hero-card::after { content: ""; position: absolute; width: 220px; height: 220px; right: -45px; top: -80px; border-radius: 50%; background: radial-gradient(circle at 30% 60%, rgba(87,130,255,.2), transparent 65%); }
.hero-card > * { position: relative; z-index: 1; }
.hero-card h1 { max-width: 680px; }
.hero-card p:last-child { max-width: 620px; margin: 14px 0 0; color: var(--muted); line-height: 1.7; }
.toolbar-card { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin: 20px 0; padding: 12px 14px; border-radius: 20px; box-shadow: 8px 10px 24px rgba(89,119,147,.12), -5px -5px 18px rgba(255,255,255,.75); }
.overdue-strip { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 16px; margin: -6px 0 18px; padding: 11px 14px; border-radius: 20px; overflow: hidden; }
.overdue-label { display: grid; gap: 4px; min-width: 180px; padding-right: 15px; border-right: 1px solid var(--line); }
.overdue-label strong { font-size: 13px; }
.overdue-label span { color: var(--muted); font-size: 11px; white-space: nowrap; }
.overdue-flow { min-width: 0; overflow: hidden; }
.overdue-track { --overdue-count: 1; --overdue-duration: 5s; display: flex; width: calc(var(--overdue-count) * 200%); min-width: 0; will-change: transform; }
.overdue-track.is-moving { animation: overdue-scroll var(--overdue-duration) linear infinite; }
.overdue-flow:hover .overdue-track,.overdue-flow:focus-within .overdue-track { animation-play-state: paused; }
.overdue-sequence { display: flex; flex: 0 0 50%; min-width: 0; }
.overdue-item { display: grid; grid-template-columns: auto auto minmax(130px,1fr) auto auto; align-items: center; gap: 8px; flex: 0 0 calc(100% / var(--overdue-count)); min-width: 0; min-height: 45px; padding: 7px 11px; border: 0; border-radius: 14px; color: #66494d; cursor: pointer; white-space: nowrap; background: #fff7d9; box-shadow: inset 1px 1px 2px rgba(255,255,255,.8), 3px 4px 9px rgba(131,93,71,.1); }
.overdue-item b { padding: 4px 7px; border-radius: 99px; color: #8a6a1f; background: #ffe9a7; font-size: 10px; }
.overdue-item strong { color: var(--ink); font-size: 12px; }
.overdue-item span { overflow: hidden; color: #667c8e; font-size: 11px; text-overflow: ellipsis; }
.overdue-item em { color: #a55a54; font-size: 10px; font-style: normal; }
.overdue-item i { color: #93a3af; font-size: 10px; font-style: normal; }
.overdue-item.level-20 { background: #ffede5; }
.overdue-item.level-20 b { color: #ad5b38; background: #ffd6c2; }
.overdue-item.level-30 { background: #fde8e9; }
.overdue-item.level-30 b { color: #b34851; background: #ffcfd2; }
.overdue-empty { display: block; padding: 11px 15px; color: #318063; font-size: 12px; }
@keyframes overdue-scroll { to { transform: translateX(-50%); } }
.segmented { display: flex; padding: 4px; border-radius: 14px; background: rgba(222,233,244,.68); box-shadow: var(--inset); }
.segmented button { padding: 9px 14px; border-radius: 11px; color: #688095; font-size: 13px; font-weight: 800; background: transparent; }
.segmented button.active { color: var(--blue-deep); background: white; box-shadow: 4px 5px 10px rgba(92,118,143,.15); }
.date-filters { display: flex; align-items: end; gap: 8px; }
.date-filters label { display: flex; align-items: center; gap: 6px; font-size: 11px; }
.date-filters input { width: 140px; padding: 9px 10px; }
.kpi-grid { display: grid; grid-template-columns: repeat(6,minmax(130px,1fr)); gap: 14px; }
.kpi-card { min-height: 125px; padding: 20px; border-radius: 22px; background: rgba(251,253,255,.76); border: 1px solid rgba(255,255,255,.8); box-shadow: 8px 12px 24px rgba(94,122,150,.12), -5px -5px 16px rgba(255,255,255,.75); }
.kpi-card span { color: var(--muted); font-size: 12px; font-weight: 700; }
.kpi-card strong { display: block; margin-top: 17px; font-size: clamp(24px,2.4vw,34px); letter-spacing: -.04em; }
.kpi-card em { display: inline-block; margin-top: 8px; color: #8ba0b1; font-size: 11px; font-style: normal; }
.kpi-card.alert strong { color: var(--red); }
.dashboard-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; margin-top: 18px; }
.panel { padding: 24px; border-radius: 25px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; }
.panel h3 { font-size: 18px; }
.bar-list { display: grid; gap: 13px; }
.bar-item { display: grid; grid-template-columns: minmax(90px,1fr) 2fr auto; align-items: center; gap: 12px; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 700; }
.bar-track { height: 9px; border-radius: 99px; overflow: hidden; background: #e4edf5; box-shadow: var(--inset); }
.bar-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #6b8eff, #56c1cf); }
.bar-value { min-width: 30px; color: var(--muted); font-size: 12px; text-align: right; }
.status-list { display: flex; flex-wrap: wrap; gap: 11px; }
.status-pill { display: flex; justify-content: space-between; gap: 14px; min-width: 135px; padding: 12px 14px; border-radius: 14px; color: #5a7286; background: rgba(237,244,250,.8); box-shadow: var(--inset); font-size: 12px; font-weight: 750; }
.status-pill strong { color: var(--ink); }
.status-pill.completed { color: #237759; background: #def5ea; }
.status-pill.completed strong { color: #18704f; }
.mini-chart { min-height: 205px; display: flex; align-items: end; gap: 9px; padding-top: 20px; }
.chart-col { flex: 1; min-width: 28px; text-align: center; }
.chart-bar-wrap { height: 150px; display: flex; align-items: end; justify-content: center; }
.chart-bar { width: min(34px,70%); min-height: 4px; border-radius: 10px 10px 5px 5px; background: linear-gradient(180deg, #6c8fff, #58c0cc); box-shadow: 4px 7px 14px rgba(72,116,206,.2); }
.chart-col span { display: block; margin-top: 8px; color: var(--muted); font-size: 9px; }
.chart-col strong { display: block; margin-bottom: 4px; font-size: 11px; }
.recent-panel { margin-top: 18px; }
.recent-list { display: grid; gap: 10px; }
.recent-row { display: grid; grid-template-columns: 64px 150px 1fr 110px 90px; align-items: center; gap: 14px; padding: 11px; border-radius: 16px; cursor: pointer; background: rgba(241,247,251,.64); transition: .18s ease; }
.recent-row:hover { transform: translateY(-1px); background: white; box-shadow: 5px 7px 15px rgba(91,117,141,.1); }
.recent-thumb,.issue-thumb { width: 64px; height: 54px; border-radius: 12px; object-fit: contain; background: white; box-shadow: var(--inset); }
.thumb-placeholder { display: grid; place-items: center; color: #9aadba; font-size: 10px; }
.recent-row strong,.recent-row p { margin: 0; }
.recent-row p { color: #506a80; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-badge,.source-badge { display: inline-flex; width: fit-content; padding: 6px 9px; border-radius: 99px; font-size: 10px; font-weight: 800; }
.status-badge { color: #557087; background: #e8f0f6; }
.status-badge.closed { color: #23815d; background: #ddf4ea; }
.status-badge.danger { color: #b24c54; background: #fde7e8; }
.source-badge.supplier { color: #315fc8; background: #e5edff; }
.source-badge.internal { color: #237b78; background: #dff4f1; }
.source-badge.pending { color: #956224; background: #fff0d9; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin: 8px 0 20px; }
.section-heading p:last-child { margin: 8px 0 0; color: var(--muted); }
.filter-card { display: grid; grid-template-columns: minmax(220px,1.5fr) repeat(3,minmax(130px,.7fr)) auto auto; gap: 10px; padding: 13px; border-radius: 20px; }
.issue-list { display: grid; gap: 12px; margin-top: 18px; }
.issue-card { display: grid; grid-template-columns: 76px minmax(140px,.65fr) minmax(240px,1.5fr) minmax(120px,.7fr) 110px; gap: 16px; align-items: center; padding: 15px; border: 1px solid rgba(255,255,255,.8); border-radius: 21px; cursor: pointer; background: rgba(251,253,255,.72); box-shadow: 7px 10px 21px rgba(88,118,147,.11), -4px -4px 15px rgba(255,255,255,.68); transition: .18s ease; }
.issue-card:hover { transform: translateY(-2px); box-shadow: 10px 14px 25px rgba(88,118,147,.15), -4px -4px 15px rgba(255,255,255,.72); }
.issue-card h4 { margin: 7px 0 0; font-size: 14px; }
.issue-card p { margin: 0; color: #566f84; font-size: 12px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.issue-meta { display: grid; gap: 7px; color: var(--muted); font-size: 11px; }
.issue-waiting { justify-items: start; }
.waiting-time { color: #61798d; font-size: 12px; }
.waiting-time.warning { color: #b17931; }
.waiting-time.danger { color: #c14f58; }
.waiting-time.completed { color: #23815d; }
.supplier-reply-badge.replied { color: #207a58; background: #dff6ea; }
.supplier-reply-badge.pending { color: #a06a28; background: #fff0c9; }
.pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin: 24px 0; color: var(--muted); font-size: 12px; }
.entry-form { display: grid; gap: 18px; }
.form-section { display: grid; grid-template-columns: 68px 1fr; gap: 20px; padding: 28px; border-radius: 27px; }
.section-index { display: grid; place-items: center; align-self: start; width: 55px; height: 55px; border-radius: 19px; color: var(--blue-deep); font-weight: 900; background: linear-gradient(145deg, #f6faff, #dfebfa); box-shadow: 7px 8px 16px rgba(91,121,150,.14), -4px -4px 10px white; }
.form-content > p { margin: 8px 0 22px; color: var(--muted); font-size: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.wide-fields label:nth-child(-n+3) { grid-column: span 1; }
.required::after { content: " *"; color: var(--red); }
.block-label { display: grid; }
.upload-zone { display: grid; place-items: center; gap: 7px; min-height: 120px; margin-top: 16px; border: 1px dashed rgba(79,120,255,.38); border-radius: 20px; cursor: pointer; color: var(--blue-deep); background: linear-gradient(145deg, rgba(241,247,255,.7), rgba(235,248,247,.72)); }
.upload-zone span { color: var(--muted); font-size: 11px; font-weight: 500; }
.upload-zone input { display: none; }
.field-hint { color: #8295a6; font-size: 11px; font-weight: 550; }
.upload-count { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; color: var(--muted); font-size: 12px; }
.upload-count strong { color: var(--blue-deep); }
.image-preview-grid,.detail-images { display: grid; grid-template-columns: repeat(auto-fill,minmax(130px,1fr)); gap: 12px; margin-top: 14px; }
.preview-item,.detail-image { position: relative; aspect-ratio: 1; border-radius: 16px; padding: 6px; background: rgba(255,255,255,.8); box-shadow: var(--inset); }
.preview-item img,.detail-image img { width: 100%; height: 100%; border-radius: 12px; object-fit: contain; }
.preview-item button { position: absolute; top: 7px; right: 7px; width: 29px; height: 29px; border: 0; border-radius: 50%; color: white; cursor: pointer; background: rgba(198,65,76,.88); box-shadow: 3px 4px 10px rgba(76,42,46,.25); }
.preview-item > span { position: absolute; left: 9px; bottom: 9px; padding: 4px 8px; border-radius: 99px; color: #24795a; background: rgba(222,247,236,.92); font-size: 10px; font-weight: 800; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 4px 0 30px; }
.users-layout { display: grid; grid-template-columns: 330px 1fr; gap: 18px; }
.account-forms { display: grid; align-self: start; gap: 18px; }
#user-form { display: grid; gap: 14px; align-self: start; }
#my-password-form,#reset-password-form { display: grid; gap: 14px; }
.user-list { display: grid; gap: 10px; }
.user-row { display: grid; grid-template-columns: 44px 1fr auto minmax(150px,auto); align-items: center; gap: 12px; padding: 12px; border-radius: 15px; background: rgba(239,246,251,.72); }
.user-row .user-avatar { width: 38px; height: 38px; border-radius: 13px; }
.user-row span { color: var(--muted); font-size: 11px; }
.password-dialog { width: min(460px,calc(100% - 28px)); padding: 0; border: 0; border-radius: 25px; background: transparent; }
.password-dialog::backdrop { background: rgba(23,39,57,.56); backdrop-filter: blur(7px); }
.mobile-nav { display: none; }
.detail-dialog { width: min(980px,calc(100% - 28px)); max-height: 90vh; padding: 0; border: 0; border-radius: 28px; background: #f0f6fb; box-shadow: 24px 30px 80px rgba(37,57,80,.35); overflow: auto; }
.detail-dialog::backdrop,.lightbox::backdrop { background: rgba(23,39,57,.56); backdrop-filter: blur(7px); }
.detail-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; gap: 20px; padding: 24px 28px; background: rgba(244,249,253,.92); backdrop-filter: blur(15px); border-bottom: 1px solid var(--line); }
.icon-btn { width: 38px; height: 38px; border: 0; border-radius: 13px; cursor: pointer; color: #6e8292; background: white; box-shadow: 4px 5px 12px rgba(82,108,132,.15); }
.detail-body { padding: 25px 28px 32px; }
.detail-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.detail-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.detail-field { min-height: 72px; padding: 13px; border-radius: 15px; background: rgba(249,252,254,.8); box-shadow: var(--inset); }
.detail-field span { display: block; color: var(--muted); font-size: 10px; }
.detail-field strong { display: block; margin-top: 7px; font-size: 12px; line-height: 1.55; }
.detail-block { margin-top: 18px; padding: 18px; border-radius: 19px; background: rgba(249,252,254,.78); box-shadow: var(--inset); }
.detail-block h4 { margin: 0 0 9px; }
.detail-block p { margin: 0; color: #506a7f; line-height: 1.75; white-space: pre-wrap; }
.supplier-reply-block time { display: block; margin-top: 9px; color: var(--muted); font-size: 12px; }
.supplier-reply-form { display: grid; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.supplier-reply-locked { margin-top: 16px; padding: 13px 15px; border-radius: 15px; color: #207a58; font-weight: 800; background: #dff6ea; }
.reply-success-dialog > .panel { display: grid; justify-items: center; gap: 14px; padding: 28px; text-align: center; }
.reply-success-dialog h3,.reply-success-dialog p { margin: 0; }
.reply-success-dialog p { color: var(--muted); line-height: 1.65; }
.reply-success-icon { display: grid; place-items: center; width: 66px; height: 66px; border-radius: 22px; color: white; font-size: 34px; font-weight: 900; background: linear-gradient(145deg,#55cda0,#23996d); box-shadow: 8px 11px 22px rgba(35,153,109,.25), inset 1px 1px 3px rgba(255,255,255,.45); }
.detail-image { cursor: zoom-in; }
.timeline { display: grid; gap: 10px; }
.timeline-item { position: relative; padding: 10px 12px 10px 24px; border-left: 2px solid #bfd2e6; }
.timeline-item::before { content: ""; position: absolute; width: 9px; height: 9px; left: -5.5px; top: 15px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px #e3ebff; }
.timeline-item strong { font-size: 12px; }
.timeline-item p { margin: 5px 0; font-size: 12px; }
.timeline-item time { color: var(--muted); font-size: 10px; }
.follow-form { display: grid; gap: 12px; }
.follow-form .form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.follow-title { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.complete-task-btn { padding: 10px 16px; border: 0; border-radius: 14px; color: white; cursor: pointer; font-weight: 850; background: linear-gradient(145deg,#4bc595,#269c70); box-shadow: 6px 8px 16px rgba(38,156,112,.23), inset 1px 1px 2px rgba(255,255,255,.35); }
.complete-task-btn:hover { transform: translateY(-1px); }
.task-complete-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; padding: 14px 17px; border-radius: 17px; color: #237759; background: linear-gradient(135deg,#ddf6ea,#eaf9f2); box-shadow: inset 2px 2px 5px rgba(74,151,120,.08), inset -2px -2px 6px white; }
.task-complete-banner span { font-size: 12px; }
.lightbox { width: 100vw; max-width: none; height: 100vh; max-height: none; margin: 0; padding: 36px 70px; border: 0; background: rgba(17,27,38,.94); overflow: hidden; }
.lightbox img { width: 100%; height: 100%; object-fit: contain; }
.lightbox button { position: fixed; z-index: 2; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; color: white; background: rgba(255,255,255,.14); font-size: 34px; cursor: pointer; }
#lightbox-close { right: 20px; top: 20px; }
#lightbox-prev { left: 18px; top: calc(50% - 24px); }
#lightbox-next { right: 18px; top: calc(50% - 24px); }
#lightbox-count { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); color: white; font-size: 12px; }
.toast { position: fixed; left: 50%; bottom: 30px; z-index: 100; transform: translate(-50%,20px); padding: 12px 18px; border-radius: 14px; color: white; background: #27455e; box-shadow: 0 12px 30px rgba(27,48,67,.28); opacity: 0; pointer-events: none; transition: .22s ease; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.single-page-lock { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; background: rgba(29,47,65,.72); backdrop-filter: blur(12px); }
.single-page-lock.hidden { display: none; }
.single-page-lock .auth-card { width: min(440px,100%); padding: 34px; text-align: center; }
.single-page-lock h2 { margin: 18px 0 10px; }
.single-page-lock p { margin: 0 0 22px; color: var(--muted); line-height: 1.7; }
.empty-state { padding: 36px 16px; color: var(--muted); text-align: center; }
.notification-btn { border: 0; border-radius: 14px; padding: 10px 13px; color: #42667e; font-weight: 800; background: #e4eef7; cursor: pointer; }
.notification-btn.has-unread { color: #b34d57; background: #ffe9eb; animation: notifyPulse 1.15s infinite; }
.notification-btn b,.notify-badge { display: inline-grid; place-items: center; min-width: 21px; height: 21px; margin-left: 5px; padding: 0 5px; border-radius: 99px; color: white; background: var(--red); font-size: 11px; }
@keyframes notifyPulse { 50% { box-shadow: 0 0 0 8px rgba(239,109,117,.12); transform: translateY(-1px); } }
.notification-dialog { width: min(620px,calc(100% - 28px)); }
.notification-dialog > .panel { max-height: 80vh; overflow: auto; }
.notification-tools { display: flex; gap: 9px; margin-bottom: 13px; }
.notification-list { display: grid; gap: 9px; }
.notification-item { display: grid; grid-template-columns: auto 1fr; gap: 5px 10px; width: 100%; padding: 13px; border: 0; border-radius: 16px; text-align: left; cursor: pointer; background: rgba(238,245,251,.84); box-shadow: var(--inset); }
.notification-item.unread { background: linear-gradient(145deg,#fff5ed,#f1f6ff); box-shadow: 4px 6px 14px rgba(97,113,137,.13),inset 1px 1px 2px white; }
.notification-item > span { grid-row: 1 / 3; align-self: start; padding: 5px 7px; border-radius: 99px; color: #4b6f86; background: #dfeaf3; font-size: 10px; font-weight: 850; }
.notification-item.unread > span { color: #aa5c35; background: #ffe1c9; }
.notification-item strong { font-size: 13px; }
.notification-item small { color: var(--muted); font-size: 11px; }
.receiver-badge { color: #315fc8 !important; background: #e1eaff; }
.edit-master-dialog { width: min(760px,calc(100% - 28px)); }
#supplier-edit-dialog { width: min(460px,calc(100% - 28px)); }
.edit-master-dialog form { display: grid; gap: 15px; }
.podium-panel { margin-top: 18px; background: linear-gradient(135deg,rgba(255,251,238,.88),rgba(244,248,255,.86)); }
.podium-panel .panel-head p:last-child { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.podium { display: flex; align-items: end; justify-content: center; gap: 14px; min-height: 190px; }
.podium-place { width: min(210px,30%); padding: 18px 12px; border-radius: 22px 22px 10px 10px; text-align: center; box-shadow: var(--shadow); }
.podium-place strong { display: block; margin: 8px 0 4px; font-size: 16px; }
.podium-place span { font-size: 12px; color: var(--muted); }
.podium-place.first { min-height: 174px; background: linear-gradient(150deg,#fff3b7,#ffd66f); }
.podium-place.second { min-height: 142px; background: linear-gradient(150deg,#f6f8fb,#cfd9e5); }
.podium-place.third { min-height: 116px; background: linear-gradient(150deg,#ffe2c5,#dca36e); }
.podium-rank { font-size: 28px; font-weight: 950; }
.supplier-own-rank { width: min(520px,100%); padding: 24px; border-radius: 24px; text-align: center; color: #765819; background: linear-gradient(145deg,#fff8d8,#ffe79a); box-shadow: var(--shadow); }
.supplier-own-rank span,.supplier-own-rank em { display: block; font-size: 12px; font-style: normal; }
.supplier-own-rank strong { display: block; margin: 8px 0; color: #9b661a; font-size: clamp(32px,6vw,52px); }
.supplier-own-rank p { margin: 0 0 8px; color: #7b6947; }
.master-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.product-panel { grid-column: 1 / -1; }
.inline-form,.import-row { display: flex; gap: 9px; margin: 15px 0; }
.inline-form input { flex: 1; }
.file-btn { display: inline-flex; cursor: pointer; }
.file-btn input { display: none; }
.master-list,.request-list { display: grid; gap: 9px; margin-top: 14px; }
.master-row,.request-row { display: grid; grid-template-columns: minmax(150px,1fr) auto auto; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 15px; background: rgba(240,246,251,.75); }
.master-row small,.request-row small { display: block; color: var(--muted); margin-top: 3px; }
.request-row { grid-template-columns: 1fr auto; }
.request-actions { display: flex; gap: 8px; }
.danger-btn { border: 0; border-radius: 13px; padding: 10px 14px; color: white; background: linear-gradient(145deg,#f28389,#cf4f59); font-weight: 800; cursor: pointer; }
.draft-badge { color: #8b6622; background: #fff0c8; }
.history-summary { margin-top: 18px; }
.history-list { display: grid; gap: 9px; margin-top: 14px; }

/* 1.0.5 readability and unified form layout */
body { font-size: 15px; }
label { font-size: 14px; }
input,select { height: 52px; min-height: 52px; padding: 0 15px; font-size: 15px; }
textarea { min-height: 120px; padding: 13px 15px; font-size: 15px; }
.nav-btn { min-height: 50px; font-size: 15px; }
.side-brand span,.user-copy span,.side-foot,.version-line { font-size: 12px; }
.section-heading p:last-child,.form-content > p,.panel p,.issue-card p,.recent-row p { font-size: 13px; }
.status-badge,.source-badge,.issue-meta,.pager { font-size: 12px; }
.toolbar-card { align-items: stretch; flex-wrap: wrap; }
.date-filter-wrap { flex: 1; min-width: min(100%,620px); display: grid; gap: 9px; }
.quick-ranges,.subnav-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.quick-ranges button,.subnav-tabs button { min-height: 40px; padding: 9px 16px; border: 0; border-radius: 13px; color: #60798f; background: rgba(239,245,251,.82); font-weight: 800; cursor: pointer; box-shadow: var(--inset); }
.quick-ranges button.active,.subnav-tabs button.active { color: white; background: linear-gradient(145deg,#688cff,#4268df); box-shadow: 5px 7px 14px rgba(61,94,204,.22); }
.date-filters { display: grid; grid-template-columns: repeat(3,minmax(175px,1fr)) auto; align-items: end; }
.date-filters label { display: grid; gap: 6px; }
.date-filters input { width: 100%; min-height: 50px; font-size: 15px; }
.filter-card { grid-template-columns: minmax(260px,1.5fr) repeat(4,minmax(145px,.75fr)) auto auto; overflow: hidden; }
.filter-card > * { min-width: 0; }
.subnav-tabs { margin: 0 0 16px; padding: 6px; width: fit-content; border-radius: 17px; background: rgba(225,235,245,.7); box-shadow: var(--inset); }
.subnav-tabs button { min-width: 150px; }
.ownership-grid { align-items: end; }
.ownership-grid label { min-width: 0; }
.select-add { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: end; }
.select-add select { min-width: 0; }
.mini-add-btn { height: 52px; min-width: 76px; padding: 0 14px; border: 0; border-radius: 14px; cursor: pointer; color: var(--blue-deep); background: linear-gradient(145deg,#f7faff,#e3ecfa); box-shadow: 4px 6px 12px rgba(82,112,142,.14), inset 1px 1px 2px white; font-weight: 850; }
.upload-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.upload-actions .upload-zone { margin-top: 16px; }
.camera-zone { color: #237b78; border-color: rgba(56,184,132,.4); }
.supplier-history-filter { display: grid; grid-template-columns: minmax(240px,1fr) auto; gap: 12px; padding: 16px; border-radius: 20px; }
.history-head { margin-top: 18px; padding: 22px; border-radius: 22px; }
.history-head span,.muted-copy { color: var(--muted); font-size: 13px; }
.history-kpis { grid-template-columns: repeat(4,1fr); margin-top: 16px; }
.master-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.master-toolbar .inline-form { flex: 1; min-width: min(100%,420px); }
.master-toolbar .import-row { flex-wrap: wrap; }
.master-toolbar input[type="search"] { min-width: 210px; }
.row-actions { display: flex; gap: 7px; align-items: center; }
.user-row .row-actions { flex-wrap: wrap; justify-content: flex-end; }
.master-row { grid-template-columns: minmax(150px,1fr) auto; min-height: 64px; }
.master-row.compact { min-height: 56px; }
.danger-btn { min-height: 40px; padding: 10px 13px; }
.pager button:disabled { opacity: .42; cursor: not-allowed; }
.master-tabs { max-width: 100%; overflow-x: auto; flex-wrap: nowrap; }
.master-tabs button { flex: 0 0 auto; }
.status-form { align-items: end; margin: 16px 0; }
.status-form .primary-btn { height: 52px; }
.detail-field { min-height: 86px; padding: 16px; }
.detail-field span { font-size: 13px; }
.detail-field strong { margin-top: 8px; font-size: 15px; }

@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(3,1fr); }
  .filter-card { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .filter-card input { grid-column: span 2; }
  .issue-card { grid-template-columns: 70px minmax(130px,.7fr) 1.6fr 100px; }
  .issue-card > :nth-child(4) { display: none; }
}
@media (max-width: 820px) {
  .app-shell { padding: 12px; }
  .sidebar { display: none; }
  .workspace { margin-left: 0; padding: 0 0 92px; }
  .topbar { min-height: 66px; margin: 0 3px 14px; }
  .topbar .eyebrow,.user-copy,.topbar .ghost-btn { display: none; }
  .topbar #change-password-btn,.topbar #logout-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 8px 12px; }
  .topbar #logout-btn { color: #a64f57; background: linear-gradient(145deg,rgba(255,247,247,.92),rgba(247,225,228,.86)); box-shadow: 4px 5px 12px rgba(143,87,94,.13),inset 1px 1px 1px white; }
  .hero-card { min-height: 230px; padding: 26px; align-items: flex-start; flex-direction: column; }
  .hero-card h1 { font-size: 29px; }
  .toolbar-card { align-items: stretch; flex-direction: column; }
  .overdue-strip { grid-template-columns: 1fr; gap: 9px; }
  .overdue-label { min-width: 0; padding: 0 0 9px; border-right: 0; border-bottom: 1px solid var(--line); }
  .segmented { width: 100%; }
  .segmented button { flex: 1; padding-inline: 6px; }
  .date-filters { display: grid; grid-template-columns: 1fr 1fr; }
  .date-filters .ghost-btn { grid-column: 1 / -1; }
  .date-filters label { display: grid; }
  .date-filters input { width: 100%; }
  .kpi-grid { grid-template-columns: repeat(2,1fr); gap: 10px; }
  .kpi-card { min-height: 112px; padding: 17px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .recent-row { grid-template-columns: 56px 1fr auto; }
  .recent-row > :nth-child(3),.recent-row > :nth-child(4) { display: none; }
  .section-heading { align-items: flex-start; }
  .filter-card { grid-template-columns: 1fr 1fr; }
  .filter-card input { grid-column: 1 / -1; }
  .issue-card { grid-template-columns: 64px 1fr auto; gap: 11px; }
  .issue-card > :nth-child(3),.issue-card > :nth-child(4) { display: none; }
  .form-section { grid-template-columns: 1fr; padding: 21px; }
  .section-index { width: 46px; height: 46px; border-radius: 16px; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .wide-fields label:nth-child(-n+3) { grid-column: 1 / -1; }
  .users-layout { grid-template-columns: 1fr; }
  .user-row { grid-template-columns: 44px 1fr auto; }
  .user-row .row-actions { grid-column: 2 / -1; justify-content: flex-end; }
  .master-grid { grid-template-columns: 1fr; }
  .product-panel { grid-column: auto; }
  .mobile-nav { position: fixed; display: flex; z-index: 20; left: 12px; right: 12px; bottom: max(12px,env(safe-area-inset-bottom)); padding: 7px; border-radius: 20px; background: linear-gradient(145deg,rgba(214,228,242,.96),rgba(194,213,232,.94)); }
  .mobile-nav button { flex: 1; min-height: 47px; border: 0; border-radius: 14px; color: #708498; background: transparent; font-weight: 800; }
  .mobile-nav button.active { color: white; background: linear-gradient(135deg,#6387f8,#4268df); box-shadow: 5px 7px 14px rgba(62,91,190,.25); }
  .detail-grid { grid-template-columns: repeat(2,1fr); }
  .follow-form .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .auth-screen { padding: 16px; }
  .auth-card { padding: 30px 21px; border-radius: 27px; }
  .topbar h2 { font-size: 20px; }
  .topbar { gap: 8px; }
  .user-zone { gap: 6px; }
  .user-avatar { width: 38px; height: 38px; }
  .section-heading h1 { font-size: 28px; }
  .section-heading .primary-btn { display: none; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-grid .panel,.recent-panel { padding: 20px; }
  .date-filters { grid-template-columns: 1fr 1fr; }
  .date-filters .ghost-btn { grid-column: 1 / -1; }
  .filter-card { grid-template-columns: 1fr; }
  .filter-card input { grid-column: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .select-add { grid-template-columns: minmax(0,1fr) 72px; }
  input,select,.mini-add-btn { height: 50px; min-height: 50px; }
  .quick-ranges { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 3px; }
  .quick-ranges button { flex: 0 0 auto; }
  .subnav-tabs { width: 100%; }
  .subnav-tabs button { flex: 1; min-width: 0; }
  .upload-actions { grid-template-columns: 1fr; gap: 0; }
  .supplier-history-filter { grid-template-columns: 1fr; }
  .history-kpis { grid-template-columns: 1fr 1fr; }
  .master-toolbar,.inline-form,.import-row { align-items: stretch; flex-direction: column; }
  .master-toolbar input[type="search"] { min-width: 0; }
  .master-row { align-items: start; }
  .row-actions { flex-wrap: wrap; justify-content: flex-end; }
  .form-actions { position: sticky; bottom: 77px; z-index: 4; padding: 10px; border-radius: 18px; background: rgba(238,245,251,.91); backdrop-filter: blur(15px); }
  .form-actions .primary-btn { flex: 1; }
  .detail-head,.detail-body { padding-left: 18px; padding-right: 18px; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .image-preview-grid,.detail-images { grid-template-columns: repeat(2,1fr); }
  .lightbox { padding: 64px 10px; }
}
