:root {
  --ink: #17213a;
  --muted: #6e7890;
  --line: #e6e9f0;
  --soft: #f5f7fb;
  --surface: #ffffff;
  --navy: #17213a;
  --blue: #3568e8;
  --blue-soft: #eaf0ff;
  --green: #1d9a6c;
  --green-soft: #e7f7f1;
  --orange: #d9822b;
  --orange-soft: #fff1df;
  --red: #c9485b;
  --red-soft: #fdecef;
  --shadow: 0 10px 35px rgba(30, 42, 70, 0.08);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--soft);
  font-size: 14px;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.login-view {
  min-height: 100vh; display: grid; place-items: center; padding: 32px;
  background:
    linear-gradient(90deg, rgba(23,33,58,.06) 0 1px, transparent 1px 100%) 0 0 / 44px 44px,
    linear-gradient(180deg, rgba(23,33,58,.06) 0 1px, transparent 1px 100%) 0 0 / 44px 44px,
    linear-gradient(135deg, #f4f7ff, #edf2f8 48%, #f7f9fc);
}
.login-home {
  width: min(1120px, 100%);
  min-height: min(720px, calc(100vh - 64px));
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(360px, .82fr);
  grid-template-rows: 1fr auto;
  overflow: hidden;
  border: 1px solid rgba(214, 222, 238, .9);
  border-radius: 28px;
  background: white;
  box-shadow: 0 28px 90px rgba(30,42,70,.15);
}
.login-showcase {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 26px;
  min-height: 100%;
  padding: 44px;
  color: white;
  background: linear-gradient(145deg, #17213a, #224175 54%, #315ec4);
}
.login-showcase::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.2));
  pointer-events: none;
}
.login-showcase > * {
  position: relative;
  z-index: 1;
}
.login-copy {
  max-width: 560px;
  margin-top: 4px;
  text-align: center;
}
.login-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 2.65vw, 36px);
  line-height: 1.18;
  letter-spacing: 0;
  white-space: nowrap;
}
.login-slogan {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .33em;
  width: 100%;
  margin: 0 0 18px;
  color: #ffd88a;
  font-size: clamp(18px, 1.55vw, 24px);
  line-height: 1.35;
}
.login-slogan::before {
  content: "";
  display: inline-block;
  width: 42px;
  height: 2px;
  border-radius: 999px;
  background: #ffd88a;
}
.login-copy p {
  margin: 0;
  max-width: 560px;
  color: rgba(255,255,255,.82);
  font-size: 17px;
  line-height: 1.8;
}
.login-feature-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.login-feature-row span {
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 8px;
  color: rgba(255,255,255,.88);
  background: rgba(255,255,255,.09);
}
.login-image-card {
  position: relative;
  margin: auto 0 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 18px;
  background: rgba(255,255,255,.12);
  box-shadow: 0 22px 45px rgba(0,0,0,.25);
}
.login-image-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.login-card {
  align-self: center;
  width: min(430px, calc(100% - 56px));
  justify-self: center;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: white;
  box-shadow: 0 20px 70px rgba(30,42,70,.1);
}
.login-card h2 { margin: 4px 0 8px; font-size: 30px; letter-spacing: 0; }
.login-card p { margin: 0 0 24px; color: var(--muted); line-height: 1.6; }
.login-card label { display: grid; gap: 8px; margin-bottom: 16px; color: #4f5b76; font-weight: 700; }
.login-card input {
  width: 100%; padding: 13px 14px; border: 1px solid #d8deea; border-radius: 10px;
  outline: 0; background: #fbfcff;
}
.login-card input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(53,104,232,.1); }
.login-card button { width: 100%; margin-top: 4px; }
.password-field {
  position: relative;
}
.password-field input {
  padding-right: 46px;
}
.login-card .password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: #6b7690;
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
}
.login-card .password-toggle:hover,
.login-card .password-toggle.is-visible {
  color: var(--blue);
  background: var(--blue-soft);
}
.login-card .password-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.login-card small { display: block; margin-top: 18px; color: var(--muted); line-height: 1.6; }
.login-error { margin: -4px 0 14px; padding: 10px 12px; border-radius: 8px; color: var(--red); background: var(--red-soft); }
.login-footer {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 28px;
  border-top: 1px solid var(--line);
  color: #7c879d;
  background: #fbfcff;
  font-size: 12px;
}
.user-menu { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.user-menu span { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; background: white; }
.service-expiry-value { font-weight: 700; }
.service-expiry-danger { color: var(--red); }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 238px 1fr; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 238px; z-index: 20;
  display: flex; flex-direction: column; padding: 28px 18px 20px;
  color: #dfe6fb; background: var(--navy);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 30px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  color: white; font-weight: 800; letter-spacing: -1px;
  background: linear-gradient(135deg, #527ff2, #2d55ba);
}
.brand strong, .brand span { display: block; }
.brand strong { color: white; font-size: 18px; }
.brand span { margin-top: 2px; color: #8994b1; font-size: 12px; }
nav { display: grid; gap: 6px; }
.nav-business-stack { display: grid; gap: 6px; }
.nav-section {
  display: grid;
  gap: 4px;
  padding: 4px 0;
  border-radius: 10px;
  background: transparent;
}
.nav-section-row {
  display: block;
}
.nav-submenu {
  display: grid;
  gap: 2px;
  margin: 0 0 0 22px;
  padding: 0;
}
.nav-item {
  width: 100%; display: flex; align-items: center; gap: 13px;
  padding: 12px 14px; border: 0; border-radius: 9px; color: #9ea9c5;
  text-align: left; background: transparent; transition: .2s;
}
.nav-item span { width: 20px; color: #7f8bab; font-size: 18px; text-align: center; }
.nav-item:hover, .nav-item.active { color: white; background: rgba(255,255,255,.09); }
.nav-item.active span { color: #72a0ff; }
.nav-parent {
  font-size: 15px;
  font-weight: 800;
}
.nav-parent.active {
  background: transparent;
}
.nav-parent:hover {
  background: rgba(255, 255, 255, .055);
}
.nav-section-label {
  cursor: default;
}
.nav-section-label.active {
  color: white;
}
.nav-parent span {
  width: 28px;
  flex: 0 0 28px;
  font-size: 24px;
}
.nav-child {
  padding: 8px 10px;
  font-size: 13px;
  border-radius: 8px;
  color: #95a1bf;
}
.nav-child span {
  transform: scale(.9);
}
.nav-item[data-page="newInquiry"] span {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  color: transparent;
  font-size: 0;
  background-color: #7f8bab;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2072%2072'%3E%3Cpath%20d='M10%2014h52L49%2031H23L10%2014zM24%2035h24L40%2049h-8L24%2035zM32%2053h8l-4%2010-4-10z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2072%2072'%3E%3Cpath%20d='M10%2014h52L49%2031H23L10%2014zM24%2035h24L40%2049h-8L24%2035zM32%2053h8l-4%2010-4-10z'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: translateY(1px);
  transition: transform .2s ease, filter .2s ease, background-color .2s ease;
}
.nav-item[data-page="newInquiry"]:hover span {
  background-color: #dfe6fb;
  transform: translateY(0) scale(1.05);
}
.nav-item[data-page="newInquiry"].active span {
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2072%2072'%3E%3Cpath%20d='M10%2014h52L49%2031H23L10%2014z'%20fill='%23ffd65a'%20stroke='%23070707'%20stroke-width='3.6'%20stroke-linejoin='round'/%3E%3Cpath%20d='M24%2035h24L40%2049h-8L24%2035z'%20fill='%23f5b72d'%20stroke='%23070707'%20stroke-width='3.4'%20stroke-linejoin='round'/%3E%3Cpath%20d='M32%2053h8l-4%2010-4-10z'%20fill='%23e79a13'%20stroke='%23070707'%20stroke-width='3.2'%20stroke-linejoin='round'/%3E%3Cpath%20d='M18%2020h36M29%2040h14'%20stroke='%23fff1a8'%20stroke-width='3'%20stroke-linecap='round'/%3E%3Cpath%20d='M36%2062v4'%20stroke='%23e79a13'%20stroke-width='3'%20stroke-linecap='round'/%3E%3Ccircle%20cx='36'%20cy='68'%20r='2.2'%20fill='%23e79a13'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  -webkit-mask: none;
  mask: none;
  filter: saturate(1.2) brightness(1.08) drop-shadow(0 0 8px rgba(247, 198, 76, .46));
  transform: translateY(0) scale(1.12);
}
.nav-item[data-page="customers"] > span:first-child {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  color: transparent;
  font-size: 0;
  border: 0;
  background-color: #7f8bab;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2058'%3E%3Cpath%20d='M32%2054S5%2038%205%2019C5%208%2018%202%2032%2016%2046%202%2059%208%2059%2019c0%2019-27%2035-27%2035z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2058'%3E%3Cpath%20d='M32%2054S5%2038%205%2019C5%208%2018%202%2032%2016%2046%202%2059%208%2059%2019c0%2019-27%2035-27%2035z'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: translateY(1px);
  transition: transform .2s ease, filter .2s ease, background-color .2s ease;
}
.nav-item[data-page="customers"]:hover > span:first-child {
  background-color: #dfe6fb;
  transform: translateY(0) scale(1.05);
}
.nav-item[data-page="customers"].active > span:first-child {
  background-color: #ef4444;
  filter: drop-shadow(0 0 8px rgba(239, 68, 68, .55));
  transform: translateY(0) scale(1.12);
}
.nav-item[data-page="sampleStage"] > span:first-child {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  color: transparent;
  font-size: 0;
  background-color: #7f8bab;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2072%2072'%3E%3Cg%20fill='none'%20stroke='black'%20stroke-width='5'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M12%2023l24-13%2024%2013-24%2013-24-13z'/%3E%3Cpath%20d='M12%2023v26l24%2013%2024-13V23'/%3E%3Cpath%20d='M36%2036v26M24%2017l24%2026'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2072%2072'%3E%3Cg%20fill='none'%20stroke='black'%20stroke-width='5'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M12%2023l24-13%2024%2013-24%2013-24-13z'/%3E%3Cpath%20d='M12%2023v26l24%2013%2024-13V23'/%3E%3Cpath%20d='M36%2036v26M24%2017l24%2026'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  transform: translateY(1px);
  transition: transform .2s ease, filter .2s ease, background-color .2s ease;
}
.nav-item[data-page="sampleStage"]:hover > span:first-child {
  background-color: #dfe6fb;
  transform: translateY(0) scale(1.05);
}
.nav-item[data-page="sampleStage"].active > span:first-child {
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2072%2072'%3E%3Cpath%20d='M12%2023l24-13%2024%2013-24%2013-24-13z'%20fill='%23ffd65a'%20stroke='%23070707'%20stroke-width='4'%20stroke-linejoin='round'/%3E%3Cpath%20d='M12%2023v26l24%2013V36z'%20fill='%23f5b72d'%20stroke='%23070707'%20stroke-width='4'%20stroke-linejoin='round'/%3E%3Cpath%20d='M60%2023v26L36%2062V36z'%20fill='%23e7a51a'%20stroke='%23070707'%20stroke-width='4'%20stroke-linejoin='round'/%3E%3Cpath%20d='M27%2015l24%2013-10%205-24-13z'%20fill='%23fff1a8'%20stroke='%23070707'%20stroke-width='3'%20stroke-linejoin='round'/%3E%3Cpath%20d='M36%2036v26M20%2029l17%209M52%2028l-16%208'%20fill='none'%20stroke='%2387672a'%20stroke-width='3'%20stroke-linecap='round'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  -webkit-mask: none;
  mask: none;
  filter: saturate(1.18) brightness(1.12) drop-shadow(0 0 8px rgba(255, 202, 25, .48));
  transform: translateY(0) scale(1.12);
}
.nav-item[data-page="cooperation"] span {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  color: transparent;
  font-size: 0;
  background-color: #7f8bab;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2072%2072'%3E%3Cpath%20d='M23%2016c-5-4-7-8-5-11l14-3c2%203%206%203%208%200l14%203c2%203%200%207-5%2011zM25%2018h22l-5%208H30zM24%2023c-8%209-11%2023-8%2038%202%207%2010%208%2020%208s18-1%2020-8c3-15%200-29-8-38-6-4-18-4-24%200z'/%3E%3Ctext%20x='36'%20y='50'%20text-anchor='middle'%20font-family='Arial,%20Helvetica,%20sans-serif'%20font-size='31'%20font-weight='900'%3E%24%3C/text%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2072%2072'%3E%3Cpath%20d='M23%2016c-5-4-7-8-5-11l14-3c2%203%206%203%208%200l14%203c2%203%200%207-5%2011zM25%2018h22l-5%208H30zM24%2023c-8%209-11%2023-8%2038%202%207%2010%208%2020%208s18-1%2020-8c3-15%200-29-8-38-6-4-18-4-24%200z'/%3E%3Ctext%20x='36'%20y='50'%20text-anchor='middle'%20font-family='Arial,%20Helvetica,%20sans-serif'%20font-size='31'%20font-weight='900'%3E%24%3C/text%3E%3C/svg%3E") center / contain no-repeat;
  filter: none;
  transform: translateY(1px) scaleY(.7);
  transform-origin: center center;
  transition: transform .2s ease, filter .2s ease, background-color .2s ease;
}
.nav-item[data-page="cooperation"]:hover span {
  background-color: #dfe6fb;
  filter: none;
  transform: translateY(0) scaleY(.7) scale(1.05);
}
.nav-item[data-page="cooperation"].active span {
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2072%2072'%3E%3Cpath%20d='M23%2016c-5-4-7-8-5-11l14-3c2%203%206%203%208%200l14%203c2%203%200%207-5%2011z'%20fill='%23ffcf27'%20stroke='%23070707'%20stroke-width='4'%20stroke-linejoin='round'/%3E%3Cpath%20d='M25%2018h22l-5%208H30z'%20fill='%23b98522'%20stroke='%23070707'%20stroke-width='4'%20stroke-linejoin='round'/%3E%3Cpath%20d='M24%2023c-8%209-11%2023-8%2038%202%207%2010%208%2020%208s18-1%2020-8c3-15%200-29-8-38-6-4-18-4-24%200z'%20fill='%23ffca19'%20stroke='%23070707'%20stroke-width='4.5'%20stroke-linejoin='round'/%3E%3Cpath%20d='M29%2023c-6%209-9%2017-10%2027M43%2023c6%209%209%2017%2010%2027'%20fill='none'%20stroke='%2387672a'%20stroke-width='3.8'%20stroke-linecap='round'/%3E%3Cpath%20d='M28%2020c3-7%2013-7%2016%200M28%2020c4%204%2012%204%2016%200'%20fill='none'%20stroke='%2387672a'%20stroke-width='4'%20stroke-linecap='round'/%3E%3Ctext%20x='36'%20y='50'%20text-anchor='middle'%20font-family='Arial,%20Helvetica,%20sans-serif'%20font-size='31'%20font-weight='900'%20fill='%23000000'%3E%24%3C/text%3E%3Ctext%20x='22'%20y='59'%20text-anchor='middle'%20font-family='Arial,%20Helvetica,%20sans-serif'%20font-size='18'%20font-weight='900'%20fill='%2387672a'%3E%23%3C/text%3E%3Ctext%20x='54'%20y='45'%20text-anchor='middle'%20font-family='Arial,%20Helvetica,%20sans-serif'%20font-size='18'%20font-weight='900'%20fill='%2387672a'%3E%23%3C/text%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  -webkit-mask: none;
  mask: none;
  filter: saturate(1.18) brightness(1.12) drop-shadow(0 0 9px rgba(255, 202, 25, .55));
  transform: translateY(0) scaleY(.7) scale(1.12);
}
.nav-count {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  margin-left: auto;
  padding: 0 6px;
  border-radius: 20px;
  color: white;
  background: var(--red);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
}
.sidebar-foot {
  display: flex; gap: 10px; align-items: center; margin-top: auto; padding: 14px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar-foot strong, .sidebar-foot small { display: block; }
.sidebar-foot strong { color: #dfe6fb; font-size: 12px; }
.sidebar-foot small { margin-top: 3px; color: #7884a2; font-size: 11px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #48c995; box-shadow: 0 0 0 4px rgba(72,201,149,.12); }

.main { grid-column: 2; min-width: 0; }
.topbar {
  min-height: 91px; display: flex; align-items: center; gap: 16px; padding: 20px 34px;
  border-bottom: 1px solid var(--line); background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 10;
}
.topbar h1 { margin: 0; font-size: 23px; letter-spacing: -.4px; }
.topbar p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.search-box {
  width: 230px; display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft);
}
.search-box input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; }
.primary-button, .secondary-button, .danger-button {
  border: 0; border-radius: 8px; padding: 10px 16px; font-weight: 600;
}
.primary-button { color: white; background: var(--blue); box-shadow: 0 5px 14px rgba(53,104,232,.22); }
.secondary-button { color: var(--ink); border: 1px solid var(--line); background: white; }
.danger-button { color: var(--red); background: var(--red-soft); }
.compact { padding: 7px 10px; font-size: 11px; box-shadow: none; }
.icon-button { width: 36px; height: 36px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: 20px; }
.icon-button:hover { background: var(--soft); }
.menu-button { display: none; }

.content { padding: 28px 34px 50px; }
.metrics { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 15px; }
.metric-card, .panel {
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow);
}
.new-inquiry-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
  padding: 26px;
  border-color: #d6e0ff;
  background: linear-gradient(135deg, #ffffff, #f3f6ff);
}
.new-inquiry-panel h2 { margin: 4px 0 8px; font-size: 24px; }
.new-inquiry-panel p { margin: 0; color: var(--muted); line-height: 1.7; }
.new-inquiry-panel .primary-button { min-width: 136px; }
.metric-card {
  position: relative; min-width: 0; padding: 20px; color: var(--ink);
  text-align: left; cursor: pointer; transition: transform .2s, border-color .2s, box-shadow .2s;
}
.metric-card:hover { transform: translateY(-4px); border-color: #9db5f3; box-shadow: 0 15px 36px rgba(53,104,232,.16); }
.metric-card:focus-visible { outline: 3px solid rgba(53,104,232,.25); outline-offset: 3px; border-color: var(--blue); }
.metric-card:hover .metric-icon { color: white; background: var(--blue); }
.metric-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 12px; }
.metric-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: var(--blue); background: var(--blue-soft); font-size: 16px; transition: .2s; }
.metric-icon-newInquiry,
.metric-icon-customers,
.metric-icon-sampleStage,
.metric-icon-cooperation {
  color: transparent;
  font-size: 0;
  background-color: var(--blue-soft);
}
.metric-icon-newInquiry::before,
.metric-icon-customers::before,
.metric-icon-sampleStage::before,
.metric-icon-cooperation::before {
  content: "";
  width: 22px;
  height: 22px;
  display: block;
  background-color: var(--blue);
  transition: background-color .2s, transform .2s;
}
.metric-icon-newInquiry::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2072%2072'%3E%3Cpath%20d='M10%2014h52L49%2031H23L10%2014zM24%2035h24L40%2049h-8L24%2035zM32%2053h8l-4%2010-4-10z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2072%2072'%3E%3Cpath%20d='M10%2014h52L49%2031H23L10%2014zM24%2035h24L40%2049h-8L24%2035zM32%2053h8l-4%2010-4-10z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.metric-icon-customers::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2058'%3E%3Cpath%20d='M32%2054S5%2038%205%2019C5%208%2018%202%2032%2016%2046%202%2059%208%2059%2019c0%2019-27%2035-27%2035z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2058'%3E%3Cpath%20d='M32%2054S5%2038%205%2019C5%208%2018%202%2032%2016%2046%202%2059%208%2059%2019c0%2019-27%2035-27%2035z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.metric-icon-sampleStage::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2072%2072'%3E%3Cg%20fill='none'%20stroke='black'%20stroke-width='5'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M12%2023l24-13%2024%2013-24%2013-24-13z'/%3E%3Cpath%20d='M12%2023v26l24%2013%2024-13V23'/%3E%3Cpath%20d='M36%2036v26M24%2017l24%2026'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2072%2072'%3E%3Cg%20fill='none'%20stroke='black'%20stroke-width='5'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M12%2023l24-13%2024%2013-24%2013-24-13z'/%3E%3Cpath%20d='M12%2023v26l24%2013%2024-13V23'/%3E%3Cpath%20d='M36%2036v26M24%2017l24%2026'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}
.metric-icon-cooperation::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2072%2072'%3E%3Cpath%20d='M23%2016c-5-4-7-8-5-11l14-3c2%203%206%203%208%200l14%203c2%203%200%207-5%2011zM25%2018h22l-5%208H30zM24%2023c-8%209-11%2023-8%2038%202%207%2010%208%2020%208s18-1%2020-8c3-15%200-29-8-38-6-4-18-4-24%200z'/%3E%3Ctext%20x='36'%20y='50'%20text-anchor='middle'%20font-family='Arial,%20Helvetica,%20sans-serif'%20font-size='31'%20font-weight='900'%3E%24%3C/text%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2072%2072'%3E%3Cpath%20d='M23%2016c-5-4-7-8-5-11l14-3c2%203%206%203%208%200l14%203c2%203%200%207-5%2011zM25%2018h22l-5%208H30zM24%2023c-8%209-11%2023-8%2038%202%207%2010%208%2020%208s18-1%2020-8c3-15%200-29-8-38-6-4-18-4-24%200z'/%3E%3Ctext%20x='36'%20y='50'%20text-anchor='middle'%20font-family='Arial,%20Helvetica,%20sans-serif'%20font-size='31'%20font-weight='900'%3E%24%3C/text%3E%3C/svg%3E") center / contain no-repeat;
  transform: scaleY(.72);
}
.metric-card:hover .metric-icon-newInquiry::before,
.metric-card:hover .metric-icon-customers::before,
.metric-card:hover .metric-icon-sampleStage::before,
.metric-card:hover .metric-icon-cooperation::before {
  background-color: white;
  transform: scale(1.06);
}
.metric-card:hover .metric-icon-cooperation::before {
  transform: scale(1.06) scaleY(.72);
}
.metric-card strong { display: block; margin-top: 16px; font-size: 27px; letter-spacing: -.6px; }
.metric-card small { display: block; margin-top: 6px; color: var(--muted); }
.metric-open { display: flex; align-items: center; justify-content: space-between; margin-top: 15px; padding-top: 11px; border-top: 1px solid var(--line); color: var(--blue); font-size: 10px; font-weight: 700; opacity: .65; }
.metric-open b { font-size: 14px; transition: transform .2s; }
.metric-card:hover .metric-open { opacity: 1; }
.metric-card:hover .metric-open b { transform: translateX(4px); }
.dashboard-amount-panel { margin-top: 18px; }
.dashboard-amount-header { align-items: flex-start; gap: 16px; }
.dashboard-amount-filters { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.dashboard-amount-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 12px; padding: 16px; border-top: 1px solid var(--line); }
.dashboard-amount-total-row { display: flex; justify-content: flex-end; padding: 0 16px 16px; }
.amount-stat-card { padding: 16px; border: 1px solid #dfe6f5; border-radius: 10px; background: #f8fbff; }
.amount-stat-commission-card, .amount-stat-total-card { background: #fffaf0; border-color: #f3d38a; }
.amount-stat-total-card { width: calc((100% - 36px) / 4); }
.amount-stat-card span { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.amount-stat-card strong { display: block; margin-top: 10px; color: var(--ink); font-size: 21px; line-height: 1.25; letter-spacing: 0; }
.amount-stat-card small { display: block; margin-top: 6px; color: var(--muted); line-height: 1.5; }
.order-profit-detail, .order-profit-edit {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #dfe6f5;
  border-radius: 10px;
  background: #f8fbff;
}
.order-profit-edit.full { grid-column: 1 / -1; }
.order-profit-detail > strong,
.order-profit-inline-title strong { display: block; font-size: 14px; }
.order-profit-detail > small,
.order-profit-inline-title small { display: block; margin-top: 4px; color: var(--muted); }
.order-profit-grid { margin-top: 12px; }
.order-profit-inline-form { display: grid; gap: 12px; }
.order-profit-inline-actions { display: flex; justify-content: flex-end; }

.dashboard-conversion-panel { margin-top: 18px; }
.dashboard-conversion-content { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 16px; border-top: 1px solid var(--line); }
.dashboard-conversion-block { min-width: 0; overflow: hidden; border: 1px solid #dfe6f5; border-radius: 10px; background: #f8fbff; }
.dashboard-subheader { padding: 15px 16px; border-bottom: 1px solid #dfe6f5; background: white; }
.dashboard-subheader h3 { margin: 0; font-size: 14px; }
.dashboard-subheader p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 12px; }
.panel { min-width: 0; }
.panel-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.panel-header h2 { margin: 0; font-size: 15px; }
.panel-header p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.panel-body { padding: 20px; }

.pipeline { display: grid; gap: 17px; }
.pipeline-row { display: grid; grid-template-columns: 82px 1fr 28px; gap: 12px; align-items: center; }
.pipeline-row span { color: var(--muted); font-size: 12px; }
.pipeline-track { height: 8px; overflow: hidden; border-radius: 20px; background: #edf0f5; }
.pipeline-fill { height: 100%; min-width: 4px; border-radius: 20px; background: linear-gradient(90deg, #4a76e8, #7d9cf1); }
.pipeline-row strong { text-align: right; }

.conversion-rate-list { display: grid; gap: 12px; padding: 18px 20px; }
.conversion-rate-item { padding: 15px 16px; border: 1px solid #dbe5ff; border-radius: 8px; background: #f8fbff; }
.conversion-rate-item span { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.conversion-rate-item strong { display: block; margin-top: 8px; color: var(--blue); font-size: 24px; line-height: 1; }
.conversion-rate-item small { display: block; margin-top: 8px; color: var(--muted); line-height: 1.5; }
.dashboard-sales-panel { margin-top: 18px; }
.dashboard-sales-table strong { color: var(--ink); font-size: 13px; }

.followup-list, .activity-list { display: grid; gap: 1px; background: var(--line); }
.followup-item, .activity-item { display: flex; align-items: center; gap: 12px; padding: 14px 20px; background: white; }
.date-box { min-width: 48px; padding: 7px 5px; border-radius: 8px; color: var(--blue); text-align: center; background: var(--blue-soft); font-weight: 700; }
.followup-info, .activity-info { min-width: 0; flex: 1; }
.followup-info strong, .activity-info strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.followup-info small, .activity-info small { display: block; margin-top: 4px; color: var(--muted); }

.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.filter-select { min-width: 145px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: white; outline: none; }
.customer-list-toolbar { flex-wrap: wrap; }
.manager-inquiry-toolbar { gap: 12px 10px; margin-bottom: 18px; }
.manager-inquiry-toolbar .customer-pagination,
.manager-inquiry-toolbar .result-count,
.manager-inquiry-toolbar .trash-entry-button { order: 1; }
.manager-inquiry-toolbar .customer-pagination { margin-left: auto; }
.manager-inquiry-toolbar::after {
  content: "";
  order: 1;
  flex: 0 0 100%;
  height: 0;
}
.manager-inquiry-toolbar .inline-filter,
.manager-inquiry-toolbar [data-clear-location-filter] { order: 2; }
.manager-inquiry-toolbar .manager-stage-filter { margin-left: auto; }
.manager-inquiry-toolbar .manager-stage-filter select,
.manager-inquiry-toolbar .manager-owner-filter select { min-width: 150px; }
.company-list-toolbar {
  display: grid;
  grid-template-columns: 26% 23% 10% 16% 12% 13%;
  align-items: center;
  gap: 10px;
}
.company-list-toolbar .funnel-legend { grid-column: 1; }
.company-admin-filter { grid-column: 2; margin-left: 0; justify-self: start; }
.company-admin-filter select { min-width: 170px; }
.company-list-toolbar .result-count { grid-column: 6; justify-self: end; margin-left: 0; }
.company-list-table-panel table { table-layout: fixed; }
.company-list-table-panel th:nth-child(1),
.company-list-table-panel td:nth-child(1) { width: 26%; }
.company-list-table-panel th:nth-child(2),
.company-list-table-panel td:nth-child(2) { width: 23%; }
.company-list-table-panel th:nth-child(3),
.company-list-table-panel td:nth-child(3) { width: 10%; }
.company-list-table-panel th:nth-child(4),
.company-list-table-panel td:nth-child(4) { width: 16%; }
.company-list-table-panel th:nth-child(5),
.company-list-table-panel td:nth-child(5) { width: 12%; }
.company-list-table-panel th:nth-child(6),
.company-list-table-panel td:nth-child(6) { width: 13%; }
.inline-filter { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; font-weight: 700; }
.inline-filter select, .inline-filter input { min-width: 150px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: white; outline: none; }
.inline-filter select:focus, .inline-filter input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(53,104,232,.09); }
.inline-filter select:disabled { color: var(--muted); background: #edf1f7; }
.is-hidden { display: none !important; }
.result-count { margin-left: auto; color: var(--muted); font-size: 12px; }
.customer-pagination {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.customer-pagination + .result-count {
  margin-left: 0;
}
.customer-pagination label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.customer-pagination select {
  min-width: 74px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: white;
  outline: none;
}
.pagination-button {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #4f5b74;
  background: white;
  font-size: 12px;
  font-weight: 700;
}
.pagination-button:disabled {
  color: #a0a9bb;
  background: #f1f4f9;
  cursor: not-allowed;
}
.trash-entry-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid #d8deea;
  border-radius: 9px;
  color: #4f5b74;
  background: #f8faff;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(30, 42, 70, 0.04);
}
.trash-entry-button .trash-icon {
  position: relative;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #edf2ff;
}
.trash-entry-button .trash-icon::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 7px;
  width: 8px;
  height: 8px;
  border: 2px solid #5f74a5;
  border-top: 0;
  border-radius: 0 0 2px 2px;
}
.trash-entry-button .trash-icon::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 10px;
  height: 2px;
  border-radius: 2px;
  background: #5f74a5;
  box-shadow: 3px -3px 0 -1px #5f74a5;
}
.trash-entry-button:hover {
  border-color: #bcc9e5;
  background: white;
}
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  padding: 15px 16px;
  border-top: 1px solid #d9e2f4;
  border-bottom: 1px solid #d5def0;
  color: #42506a;
  background: #f1f5ff;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
}
td { padding: 15px 16px; border-top: 1px solid var(--line); vertical-align: middle; }
tbody tr:hover { background: #fbfcff; }
.cell-main { font-weight: 600; }
.cell-sub { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.customer-country-cell { color: #42506a; font-weight: 700; white-space: nowrap; }
.business-count { display: inline-flex; margin: 2px 3px 2px 0; padding: 4px 6px; border-radius: 6px; color: #536078; background: var(--soft); font-size: 10px; white-space: nowrap; }
.business-total-pill {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  gap: 4px 6px;
  margin: 2px 6px 2px 0;
  padding: 7px 9px;
  border: 1px solid #dbe5ff;
  border-radius: 8px;
  background: #f8fbff;
  white-space: nowrap;
}
.business-total-pill strong {
  color: var(--blue);
  font-size: 15px;
  line-height: 1;
}
.business-total-pill small {
  color: #4d5b78;
  font-size: 11px;
  font-weight: 700;
}
.business-total-pill em {
  grid-column: 1 / -1;
  color: #687188;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}
.order-count-cell {
  min-width: 190px;
}
.order-count-pill {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  gap: 5px;
  margin: 2px 6px 2px 0;
  padding: 7px 9px;
  border: 1px solid #dbe5ff;
  border-radius: 8px;
  background: #f8fbff;
  white-space: nowrap;
}
.order-count-pill strong {
  color: var(--blue);
  font-size: 16px;
  line-height: 1;
}
.order-count-pill small {
  color: #4d5b78;
  font-size: 11px;
  font-weight: 700;
}
.order-count-done {
  border-color: #d7eadf;
  background: #f3fbf6;
}
.order-count-done strong {
  color: var(--green);
}
.customer-row-priority-followup {
  background: #fff8e8;
}
.customer-row-priority-followup:hover,
.customer-row-reminder-due.customer-row-priority-followup {
  background: #fff3d2;
}
.priority-followup-pill {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 3px 7px;
  border: 1px solid #f1d28b;
  border-radius: 999px;
  color: #925f00;
  background: #fff0bf;
  font-size: 10px;
  font-weight: 800;
  vertical-align: middle;
  white-space: nowrap;
}
.upcoming-reminder-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: start;
}
.upcoming-reminder-pill {
  display: inline-grid;
  gap: 4px;
  min-width: 138px;
  padding: 8px 10px;
  border: 1px solid #dbe5ff;
  border-radius: 8px;
  background: #f8fbff;
}
.upcoming-reminder-pill strong {
  color: var(--blue);
  font-size: 12px;
  line-height: 1.2;
}
.upcoming-reminder-pill small {
  color: #5d6b86;
  font-size: 10px;
  font-weight: 700;
}
.reminder-cell-empty {
  color: #97a1b5;
  font-size: 12px;
}
.manager-inquiry-table-panel {
  overflow: hidden;
  border: 1px solid #dbe5ff;
  border-radius: 12px;
  background: white;
  box-shadow: 0 16px 36px rgba(30, 42, 70, 0.06);
}
.manager-inquiry-table-panel .table-wrap {
  overflow-x: hidden;
}
.manager-inquiry-table-panel table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}
.manager-inquiry-table-panel th:nth-child(1),
.manager-inquiry-table-panel td:nth-child(1) {
  width: 170px;
}
.manager-inquiry-table-panel th:nth-child(2),
.manager-inquiry-table-panel td:nth-child(2) {
  width: 90px;
}
.manager-inquiry-table-panel th:nth-child(3),
.manager-inquiry-table-panel td:nth-child(3) {
  width: 118px;
}
.manager-inquiry-table-panel th:nth-child(4),
.manager-inquiry-table-panel td:nth-child(4),
.manager-inquiry-table-panel th:nth-child(5),
.manager-inquiry-table-panel td:nth-child(5) {
  width: 235px;
}
.manager-inquiry-table-panel th:nth-child(6),
.manager-inquiry-table-panel td:nth-child(6) {
  width: 110px;
}
.manager-inquiry-table-panel th {
  padding: 16px 18px;
  border-top: 0;
  border-bottom: 1px solid #cfdaf0;
  color: #34425d;
  background: #eef4ff;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 900;
}
.manager-inquiry-table-panel td {
  padding: 18px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.manager-inquiry-table-panel tbody tr {
  background: #fff;
}
.manager-inquiry-table-panel tbody tr:nth-child(even) {
  background: #fbfdff;
}
.manager-inquiry-table-panel tbody tr:hover {
  background: #f7faff;
}
.manager-inquiry-table-panel .link-button {
  display: block;
  max-width: 138px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}
.manager-inquiry-table-panel .cell-sub {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.35;
}
.manager-inquiry-table-panel .customer-country-cell {
  color: #34425d;
  font-size: 14px;
  font-weight: 800;
}
.manager-inquiry-table-panel .badge {
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}
.manager-inquiry-table-panel .business-total-cell {
  min-width: 0;
}
.manager-inquiry-table-panel .business-total-pill {
  gap: 4px 7px;
  min-width: 98px;
  margin: 3px 6px 3px 0;
  padding: 8px 10px;
  border-color: #d3def8;
  background: #f8fbff;
}
.manager-inquiry-table-panel .business-total-done {
  border-color: #d7eadf;
  background: #f3fbf6;
}
.manager-inquiry-table-panel .business-total-done strong {
  color: var(--green);
}
.manager-inquiry-table-panel .business-total-pill strong {
  font-size: 16px;
}
.manager-inquiry-table-panel .business-total-pill small,
.manager-inquiry-table-panel .business-total-pill em {
  font-size: 12px;
  line-height: 1.25;
}
.link-button { padding: 0; border: 0; color: var(--blue); background: none; font-weight: 600; }
.danger-link { color: var(--red); }
.badge { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge-blue { color: #315ec4; background: var(--blue-soft); }
.badge-green { color: #16805a; background: var(--green-soft); }
.badge-orange { color: #b36b1f; background: var(--orange-soft); }
.badge-red { color: #b33b50; background: var(--red-soft); }
.badge-gray { color: #687188; background: #eff1f5; }
.customer-row-reminder-due { background: #fff7f1; }
.customer-list-reminder {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 7px;
  padding: 4px 8px;
  border-radius: 7px;
  color: #5f6f91;
  background: #edf3ff;
  font-size: 10px;
  font-weight: 800;
}
.customer-list-reminder.is-due {
  color: #b33b50;
  background: var(--red-soft);
}
.progress { width: 110px; }
.progress-track { height: 6px; border-radius: 10px; background: #e9ecf2; overflow: hidden; }
.progress-fill { height: 100%; background: var(--green); }
.progress-label { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.empty { padding: 55px 20px; color: var(--muted); text-align: center; }
.empty strong { display: block; margin-bottom: 8px; color: var(--ink); font-size: 15px; }

.funnel-legend { display: grid; gap: 3px; }
.funnel-legend span { font-weight: 700; }
.funnel-legend small { color: var(--muted); }
.customer-filter-banner { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 14px; padding: 13px 16px; border: 1px solid #cfdcff; border-radius: 10px; background: var(--blue-soft); }
.customer-filter-banner small, .customer-filter-banner strong { display: block; }
.customer-filter-banner small { color: var(--muted); font-size: 9px; }
.customer-filter-banner strong { margin-top: 3px; color: var(--blue); }
.stage-filter-banner { border-color: #cfe7de; background: var(--green-soft); }
.stage-filter-banner strong { color: var(--green); }

.reminder-settings-form { display: grid; gap: 16px; }
.form-hint { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.reminder-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr)); gap: 12px; }
.reminder-settings-grid label { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: center; padding: 11px; border-radius: 9px; background: var(--soft); }
.reminder-settings-grid label span { grid-column: 1 / -1; color: #4d5870; font-size: 11px; font-weight: 700; }
.reminder-settings-grid input { width: 100%; min-width: 0; padding: 8px 9px; border: 1px solid #dce0e9; border-radius: 8px; color: var(--ink); background: white; outline: none; }
.reminder-settings-grid input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(53,104,232,.09); }
.reminder-settings-grid small { color: var(--muted); font-size: 11px; }
.reminder-summary { display: grid; grid-template-columns: repeat(2, minmax(220px, 1fr)); gap: 14px; margin-bottom: 18px; }
.reminder-summary > div { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: var(--shadow); }
.reminder-summary small, .reminder-summary strong, .reminder-summary span { display: block; }
.reminder-summary small { color: var(--muted); font-weight: 700; }
.reminder-summary strong { margin-top: 8px; font-size: 24px; }
.reminder-summary span { margin-top: 6px; color: var(--muted); font-size: 11px; }
.reminder-grid { display: grid; grid-template-columns: repeat(2, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.reminder-section { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: var(--shadow); }
.reminder-section > header { display: flex; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); background: #fafbfc; }
.reminder-section h2 { margin: 0; font-size: 14px; }
.reminder-section p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.reminder-section > header > span { min-width: 28px; height: 28px; display: grid; place-items: center; border-radius: 20px; color: var(--blue); background: var(--blue-soft); font-size: 12px; font-weight: 800; }
.reminder-list { display: grid; gap: 1px; background: var(--line); }
.reminder-item { display: flex; justify-content: space-between; gap: 14px; padding: 15px 18px; background: white; border-left: 4px solid var(--orange); }
.reminder-red { border-left-color: var(--red); }
.reminder-main { min-width: 0; flex: 1; }
.reminder-item-head { display: flex; align-items: center; gap: 8px; }
.reminder-item-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reminder-item p { margin: 8px 0 0; color: var(--ink); line-height: 1.45; }
.reminder-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 8px; color: var(--muted); font-size: 11px; }
.reminder-actions { display: grid; gap: 8px; align-content: center; justify-items: end; flex: 0 0 auto; }
.reminder-empty { padding: 30px 18px; color: var(--muted); text-align: center; background: white; }

.funnel-board {
  display: grid; grid-template-columns: repeat(4, minmax(245px, 1fr)); gap: 14px;
  overflow-x: auto; align-items: start; padding-bottom: 8px;
}
.funnel-column { min-width: 245px; border: 1px solid var(--line); border-radius: 12px; background: #eef1f6; overflow: hidden; }
.funnel-column > header { display: flex; align-items: center; justify-content: space-between; padding: 15px 16px; border-bottom: 1px solid #dde2eb; background: #f8f9fc; }
.funnel-column > header h2 { margin: 0; font-size: 14px; }
.funnel-column > header p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.funnel-column > header > span { min-width: 25px; height: 25px; display: grid; place-items: center; border-radius: 20px; color: var(--blue); background: var(--blue-soft); font-size: 11px; font-weight: 700; }
.funnel-column-body { display: grid; gap: 10px; padding: 10px; }
.funnel-card { padding: 14px; border: 1px solid #e2e6ee; border-radius: 10px; background: white; box-shadow: 0 4px 14px rgba(30,42,70,.05); }
.funnel-card-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; padding-bottom: 11px; border-bottom: 1px solid var(--line); }
.funnel-card-head strong, .funnel-card-head span { display: block; }
.funnel-card-head strong { font-size: 13px; }
.funnel-card-head span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.contact-line { display: grid; grid-template-columns: 62px 1fr; gap: 8px; margin-top: 8px; font-size: 10px; }
.contact-line span { color: var(--muted); }
.contact-line strong { overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.inquiry-block, .requirement-block { margin-top: 11px; padding: 10px; border-radius: 8px; background: var(--soft); }
.requirement-block { color: #8c551b; background: var(--orange-soft); }
.inquiry-block small, .requirement-block small, .sample-requirements small { color: var(--muted); font-weight: 700; }
.inquiry-block p, .requirement-block p, .sample-requirements p { margin: 5px 0 0; line-height: 1.55; font-size: 11px; }
.funnel-card-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 11px; color: var(--muted); font-size: 10px; }
.funnel-card-actions { display: grid; gap: 9px; margin-top: 13px; }
.funnel-card-actions > .link-button { justify-self: start; }
.card-action-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.card-action-group button { width: 100%; min-width: 0; }
.funnel-empty { padding: 35px 10px; color: #9aa3b5; text-align: center; font-size: 11px; }
.stage-detail { margin-top: 11px; padding: 11px; border: 1px solid #dce6ff; border-radius: 8px; background: #f5f8ff; }
.stage-detail-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--blue); font-size: 10px; font-weight: 700; }
.sample-title-actions { display: inline-flex; align-items: center; gap: 8px; }
.secondary-button.mini,
.danger-button.mini { min-height: 28px; padding: 6px 10px; font-size: 12px; }
.stage-detail > p { margin: 8px 0 0; line-height: 1.5; font-size: 11px; }
.stage-mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 9px; }
.stage-mini-grid div { padding: 8px; border-radius: 6px; background: white; }
.stage-mini-grid small, .stage-mini-grid strong { display: block; }
.stage-mini-grid small { color: var(--muted); font-size: 8px; }
.stage-mini-grid strong { margin-top: 4px; font-size: 10px; }
.communication-detail { border-color: #e7e9ee; background: #fafbfc; }
.communication-detail small, .communication-detail time { color: var(--muted); font-size: 9px; }
.communication-detail time { display: block; margin-top: 6px; }
.communication-detail .attachment-list { display: none; }
.sample-stage-detail { border-color: #cfdcff; background: #f4f7ff; }
.sample-stage-detail > p { font-weight: 600; }
.sample-stage-pending { border-style: dashed; background: #f8faff; }
.sample-stage-pending > p { color: #2f63e7; }
.sample-products-display { white-space: pre-line; }
.sample-detail-toggle { min-width: 86px; }
.sample-detail-collapsible { display: grid; gap: 0; }
.sample-stage-collapsed .sample-detail-collapsible { display: none; }
.order-detail-collapsible { gap: 10px; margin-top: 10px; }
.order-stage-detail .sample-products-display {
  max-width: 360px;
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.55;
}
.order-card-number {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .2px;
  color: #235ee8;
}
.order-card-progress {
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid #dbe5ff;
  border-radius: 8px;
  background: white;
}
.order-card-progress > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
}
.order-card-progress small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
}
.order-detail-panel {
  overflow: hidden;
  border: 1px solid #dce6ff;
  border-radius: 10px;
  background: white;
}
.order-detail-panel-head {
  display: flex;
  align-items: stretch;
  background: #f8fbff;
}
.order-detail-panel-toggle {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 0;
  background: #f8fbff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.order-detail-panel-toggle strong {
  display: block;
  font-size: 12px;
}
.order-detail-panel-toggle small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}
.order-detail-panel-toggle b {
  min-width: 28px;
  height: 28px;
  border: 1px solid #cbd8f6;
  border-radius: 8px;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.order-panel-edit-button {
  display: none;
  align-self: center;
  margin-right: 10px;
  min-width: 56px;
}
.order-detail-panel:not(.order-detail-panel-collapsed) .order-panel-edit-button {
  display: inline-flex;
}
.order-detail-panel-body {
  padding: 0 12px 12px;
}
.order-detail-panel-collapsed .order-detail-panel-body { display: none; }
.order-section-edit-card {
  grid-column: 1 / -1;
}
.order-delivery-notice {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.45;
}
.order-delivery-notice.danger {
  color: #c2273d;
  background: #fff0f2;
  border: 1px solid rgba(194, 39, 61, .22);
}
.order-delivery-notice.success {
  color: #137a45;
  background: #ecfdf3;
  border: 1px solid rgba(19, 122, 69, .22);
}
.sample-stage-summary { border-color: #cfdcff; background: #f4f7ff; padding: 12px; }
.sample-stage-summary > small { display: block; margin-bottom: 6px; color: var(--muted); font-size: 9px; font-weight: 700; }
.sample-stage-summary .stage-detail-title { margin-bottom: 0; }
.sample-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sample-detail-grid div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.sample-detail-note { margin-top: 9px; padding: 9px; border-radius: 7px; background: white; }
.sample-detail-note small { color: var(--muted); font-size: 9px; font-weight: 700; }
.sample-detail-note p { margin: 5px 0 0; line-height: 1.5; font-size: 10px; }
.order-detail { border-color: #d8eee6; background: #f2faf7; }

.sample-grid { display: grid; grid-template-columns: repeat(2, minmax(300px, 1fr)); gap: 16px; }
.sample-card { padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: var(--shadow); }
.sample-card > header { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.sample-card > header small { color: var(--blue); font-weight: 700; }
.sample-card > header h3 { margin: 5px 0 0; font-size: 15px; }
.sample-product { margin-top: 15px; font-weight: 700; }
.sample-requirements { margin-top: 12px; padding: 12px; border-radius: 8px; background: var(--soft); }
.sample-schedule { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 13px; }
.sample-schedule div { padding: 10px; border-radius: 8px; background: #fafbfc; }
.sample-schedule small, .sample-schedule strong { display: block; }
.sample-schedule small { color: var(--muted); font-size: 9px; }
.sample-schedule strong { margin-top: 5px; font-size: 11px; }
.sample-progress { margin-top: 14px; }
.sample-progress > div:first-child { display: flex; justify-content: space-between; margin-bottom: 7px; font-size: 11px; }
.production-note { margin: 12px 0 0; padding-left: 10px; border-left: 3px solid var(--blue); color: var(--muted); font-size: 11px; line-height: 1.5; }
.sample-card > footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.move-summary { margin-bottom: 20px; padding: 15px; border-radius: 10px; background: var(--blue-soft); }
.move-summary strong, .move-summary span { display: block; }
.move-summary span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.move-summary p { margin: 10px 0 0; line-height: 1.5; }

.modal[hidden], .toast[hidden], .attachment-preview[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(13,21,39,.52); backdrop-filter: blur(3px); }
.modal-card { position: relative; width: min(680px, 100%); max-height: calc(100vh - 40px); overflow: auto; border-radius: 14px; background: white; box-shadow: 0 30px 80px rgba(12,20,40,.25); }
.modal-card.wide { width: min(860px, 100%); }
.modal-card.order-narrow { width: min(430px, 100%); }
.modal-card.order-section-narrow { width: min(516px, 100%); }
.readonly-order-status div { border: 1px solid #d9e1f2; border-radius: 12px; background: #fff; padding: 12px 14px; }
.readonly-order-status strong { display: block; color: var(--ink); font-size: 15px; }
.readonly-order-status small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.modal-header { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--line); background: white; }
.modal-header h2 { margin: 2px 0 0; font-size: 19px; }
.eyebrow { margin: 0; color: var(--blue); font-size: 9px; font-weight: 800; letter-spacing: 1.4px; }
.modal-body { padding: 24px; }
.attachment-preview {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: grid;
  place-items: center;
  padding: 22px;
}
.attachment-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 12, 24, .72);
  backdrop-filter: blur(4px);
}
.attachment-preview-card {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1120px, 96vw);
  max-height: 94vh;
  overflow: hidden;
  border-radius: 16px;
  background: white;
  box-shadow: 0 34px 90px rgba(4, 10, 24, .38);
}
.attachment-preview-card > header,
.attachment-preview-card > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.attachment-preview-card > footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}
.attachment-preview-card h2 {
  max-width: min(760px, 70vw);
  overflow: hidden;
  margin: 2px 0 0;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attachment-preview-body {
  display: grid;
  place-items: center;
  min-height: 360px;
  padding: 18px;
  overflow: auto;
  background: #0b1221;
}
.attachment-preview-body img,
.attachment-preview-body video {
  display: block;
  max-width: 100%;
  max-height: calc(94vh - 150px);
  border-radius: 10px;
  background: #111827;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.attachment-preview-body img {
  width: auto;
  height: auto;
  object-fit: contain;
}
.attachment-preview-body video {
  width: min(100%, 980px);
}
.attachment-preview-body iframe {
  width: min(100%, 980px);
  height: calc(94vh - 170px);
  min-height: 520px;
  border: 0;
  border-radius: 10px;
  background: white;
}
.attachment-document-preview {
  display: grid;
  gap: 12px;
  place-items: center;
  min-width: min(420px, 90vw);
  padding: 28px;
  border-radius: 14px;
  color: var(--ink);
  background: white;
  text-align: center;
}
.attachment-document-preview strong { font-size: 16px; }
.attachment-document-preview span { color: var(--muted); font-size: 12px; }
.attachment-file {
  border: 1px solid var(--line);
  cursor: pointer;
  text-align: left;
}
.attachment-file-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 34px;
  border-radius: 7px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 11px;
  font-weight: 800;
}
.attachment-file strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-section-title { display: flex; justify-content: space-between; align-items: baseline; padding: 2px 0 9px; border-bottom: 1px solid var(--line); }
.form-section-title span { color: var(--muted); font-size: 10px; }
.sample-inline-section-title { margin-top: 4px; }
.intake-card { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #f8faff; }
.intake-card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { color: #4d5870; font-size: 12px; font-weight: 600; }
.field label em { color: var(--red); font-style: normal; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 11px; border: 1px solid #dce0e9; border-radius: 8px; color: var(--ink); background: white; outline: none;
}
.field textarea { min-height: 84px; resize: vertical; }
.field textarea.large-textarea { min-height: 150px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #7d9df0; box-shadow: 0 0 0 3px rgba(53,104,232,.09); }
.profile-password-note {
  padding: 12px;
  border: 1px dashed #cbd6f4;
  border-radius: 10px;
  background: #f6f8ff;
}
.profile-password-note strong { font-size: 14px; }
.profile-password-note span { color: var(--muted); font-size: 12px; }
.intake-save-button { min-width: 112px; }
.form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 10px; padding-top: 7px; }
.communication-help { align-content: end; }
.communication-help p { margin: 0; color: var(--muted); font-size: 11px; }
.communication-entries { grid-column: 1 / -1; display: grid; gap: 14px; }
.communication-entry { padding: 16px; border: 1px solid #dce3f2; border-radius: 11px; background: #f9faff; }
.communication-entry > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding-bottom: 11px; border-bottom: 1px solid #e2e7f1; }
.communication-entry > header span, .communication-entry > header small { display: block; }
.communication-entry > header span { color: var(--ink); font-weight: 700; }
.communication-entry > header small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.communication-entry-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.attachment-field {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px dashed #c9d6f4;
  border-radius: 9px;
  background: white;
}
.attachment-field.full { grid-column: 1 / -1; }
.attachment-field label {
  color: #4d5870;
  font-size: 12px;
  font-weight: 700;
}
.attachment-field input {
  width: 100%;
  color: var(--muted);
}
.attachment-field small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}
.attachment-upload-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px;
}
.attachment-empty { margin: 0; color: var(--muted); font-size: 10px; }
.attachment-upload-item {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 9px;
  border: 1px solid #e1e7f4;
  border-radius: 9px;
  background: #f8faff;
}
.attachment-upload-info { min-width: 0; flex: 1; }
.attachment-upload-info strong,
.attachment-upload-info small { display: block; }
.attachment-upload-info strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attachment-upload-info small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}
.attachment-progress {
  height: 5px;
  margin-top: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6ebf5;
}
.attachment-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width .18s ease;
}
.attachment-upload-item.attachment-uploaded .attachment-progress span { background: #22a06b; }
.attachment-upload-item.attachment-error {
  border-color: #f2b8c0;
  background: #fff7f8;
}
.attachment-upload-item.attachment-error .attachment-progress span { background: var(--red); }
.attachment-upload-thumb {
  position: relative;
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 7px;
  border: 1px solid #e1e7f4;
  border-radius: 9px;
  background: #f8faff;
}
.attachment-thumb-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: var(--soft);
  cursor: zoom-in;
}
.attachment-thumb-media img,
.attachment-thumb-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .18s ease, filter .18s ease;
}
.attachment-thumb-video { cursor: pointer; }
.attachment-thumb-document {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #eef3ff, #f9fbff);
  cursor: pointer;
}
.attachment-document-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 38px;
  border: 2px solid #40506a;
  border-radius: 7px;
  color: #40506a;
  background: rgba(255,255,255,.75);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .05em;
}
.attachment-thumb-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: white;
  background: rgba(8, 14, 28, .34);
  font-size: 28px;
  font-weight: 800;
  opacity: 0;
  transition: opacity .18s ease;
  pointer-events: none;
}
.attachment-thumb-media:hover img,
.attachment-thumb-media:hover video {
  filter: brightness(.82);
  transform: scale(1.04);
}
.attachment-thumb-media:hover .attachment-thumb-overlay,
.attachment-thumb-media:focus-visible .attachment-thumb-overlay {
  opacity: 1;
}
.attachment-thumb-media:focus-visible {
  outline: 3px solid rgba(53,104,232,.25);
  outline-offset: 2px;
}
.attachment-upload-thumb strong {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
}
.attachment-upload-thumb .attachment-remove-button {
  justify-self: start;
  padding: 0;
}
.attachment-remove-button {
  flex: 0 0 auto;
  border: 0;
  color: var(--red);
  background: transparent;
  font-size: 10px;
  font-weight: 700;
}
.remove-entry-button { border: 0; color: var(--red); background: transparent; font-size: 11px; }
.add-entry-button { grid-column: 1 / -1; padding: 11px; border: 1px dashed #9eb5ee; border-radius: 9px; color: var(--blue); background: var(--blue-soft); font-weight: 700; }
.add-entry-button:hover { border-color: var(--blue); background: #e1e9ff; }
.toast {
  position: fixed; right: 24px; bottom: 24px; z-index: 200; padding: 12px 17px;
  border-radius: 9px; color: white; background: var(--navy); box-shadow: var(--shadow);
}
.toast.error { background: var(--red); }

.detail-head {
  position: relative;
  display: flex;
  gap: 18px;
  align-items: center;
  margin-bottom: 20px;
  padding: 20px 22px;
  border: 1px solid #d8e2ff;
  border-left: 5px solid var(--blue);
  border-radius: 18px;
  background:
    radial-gradient(circle at 10% 15%, rgba(53, 104, 232, .12), transparent 28%),
    linear-gradient(135deg, #f4f7ff 0%, #ffffff 62%, #eef4ff 100%);
  box-shadow: 0 18px 40px rgba(45, 73, 148, .12);
}
.detail-head::after {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: 0;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 14px;
  pointer-events: none;
}
.detail-head > * { position: relative; z-index: 1; }
.avatar {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 18px;
  color: white;
  background: linear-gradient(135deg,#4f7cf0,#223a82);
  box-shadow: 0 12px 26px rgba(38, 69, 152, .22);
  font-size: 19px;
  font-weight: 800;
}
.detail-head h3 { margin: 0; }
.detail-head p { margin: 5px 0 0; color: var(--muted); }
.detail-head-copy { min-width: 0; flex: 1; }
.detail-title-row { display: grid; grid-template-columns: minmax(180px, 1fr) auto minmax(96px, 1fr); align-items: center; gap: 18px; }
.detail-title-row > div { min-width: 0; }
.detail-title-row > .secondary-button { justify-self: end; white-space: nowrap; }
.stage-arrow {
  display: flex;
  flex-wrap: nowrap;
  gap: 26px;
  margin-top: 0;
  padding: 10px 20px 9px;
  min-height: 64px;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid rgba(121, 143, 198, .22);
  border-radius: 16px;
  background: rgba(255, 255, 255, .72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .92), 0 8px 22px rgba(64, 92, 160, .08);
}
.stage-arrow-item {
  position: relative;
  min-width: 72px;
  min-height: 58px;
  margin-right: 0;
  padding: 42px 0 0;
  border: 0;
  color: #2d3443;
  background: transparent;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  letter-spacing: .02em;
  text-transform: none;
}
.stage-arrow-item[data-stage="inquiry"],
.stage-arrow-item[data-stage="followup"],
.stage-arrow-item[data-stage="sample"],
.stage-arrow-item[data-stage="order"] { transform: translateY(0); }
.stage-arrow-item::before {
  content: "»";
  position: absolute;
  left: calc(100% + 10px);
  top: 0;
  z-index: 1;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  color: #2d3443;
  background: transparent;
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  transform: rotate(0);
  transform-origin: left center;
}
.stage-arrow-item::after {
  display: none;
}
.stage-arrow-item:last-child::before,
.stage-arrow-item:last-child::after { display: none; }
.stage-arrow-single {
  justify-content: flex-start;
  gap: 18px;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 12px 22px;
}
.stage-arrow-single .stage-arrow-item::before { display: none; }
.stage-arrow-single .stage-arrow-item {
  flex: 0 0 auto;
}
.stage-encourage {
  display: block;
  max-width: 390px;
  color: #394760;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.55;
  text-align: left;
}
.stage-arrow-item.done {
  color: #3f4d66;
}
.stage-arrow-item.active {
  color: #d9363e;
}
.stage-label {
  position: relative;
  z-index: 3;
}
.stage-doodle {
  position: absolute;
  left: 50%;
  top: 3px;
  z-index: 2;
  width: 58px;
  height: 32px;
  transform: translateX(-50%) rotate(-5deg);
  color: inherit;
  background-color: currentColor;
  -webkit-mask: var(--stage-doodle-image) center / contain no-repeat;
  mask: var(--stage-doodle-image) center / contain no-repeat;
  pointer-events: none;
}
.stage-doodle::before {
  content: "";
}
.stage-arrow-item[data-stage="inquiry"] .stage-doodle::before {
  content: "";
}
.stage-arrow-item[data-stage="inquiry"] .stage-doodle {
  --stage-doodle-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2042'%3E%3Cg%20fill='none'%20stroke='black'%20stroke-width='3'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M13%205h35l5%206v26H12z'/%3E%3Cpath%20d='M48%205v9h9'/%3E%3Cpath%20d='M21%2018h25M21%2026h19M21%2034h25'/%3E%3C/g%3E%3C/svg%3E");
}
.stage-arrow-item[data-stage="followup"] .stage-doodle {
  --stage-doodle-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2042'%3E%3Cg%20fill='none'%20stroke='black'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M41%2031c9-7%2012-13%209-18-2-4-8-5-12%200-4-5-10-4-12%200-2%204%200%209%206%2015'%20stroke-width='1.7'%20opacity='.55'/%3E%3Cpath%20d='M27%2035C15%2025%2011%2018%2014%2011c3-6%2010-6%2015%200%205-6%2012-6%2015%200%203%207-1%2014-17%2024z'%20stroke-width='2.2'/%3E%3C/g%3E%3C/svg%3E");
}
.stage-arrow-item[data-stage="sample"] .stage-doodle {
  --stage-doodle-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2042'%3E%3Cg%20fill='none'%20stroke='black'%20stroke-width='2.6'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M14%2022h9v15h-9z'/%3E%3Cpath%20d='M23%2034c5%203%2018%204%2026%201%203-1%204-5%202-7%203-2%202-7-2-8%202-3-1-7-5-6h-8c1-6%200-10-3-11-3%200-4%206-7%2012l-4%207'/%3E%3Cpath%20d='M36%2014h9M37%2021h13M36%2028h12'/%3E%3C/g%3E%3C/svg%3E");
}
.stage-arrow-item[data-stage="order"] .stage-doodle {
  --stage-doodle-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2042'%3E%3Cg%20fill='none'%20stroke='black'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cellipse%20cx='32'%20cy='21'%20rx='22'%20ry='16'%20stroke-width='2.8'/%3E%3Cpath%20d='M32%207v28M41%2014c-3-4-15-4-16%202-2%208%2017%204%2015%2012-1%207-14%207-18%202'%20stroke-width='3'/%3E%3C/g%3E%3C/svg%3E");
}
.stage-arrow-item.active .stage-doodle {
  color: inherit;
  transform: translateX(-50%) rotate(-7deg) scale(1.08);
}
.stage-arrow-item.active .stage-doodle::after {
  display: none;
}
.stage-arrow-item.active[data-stage="inquiry"] .stage-doodle {
  width: 64px;
  height: 46px;
  top: -3px;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2072%2072'%3E%3Cpath%20d='M10%2014h52L49%2031H23L10%2014z'%20fill='%23ffd65a'%20stroke='%23070707'%20stroke-width='3.6'%20stroke-linejoin='round'/%3E%3Cpath%20d='M24%2035h24L40%2049h-8L24%2035z'%20fill='%23f5b72d'%20stroke='%23070707'%20stroke-width='3.4'%20stroke-linejoin='round'/%3E%3Cpath%20d='M32%2053h8l-4%2010-4-10z'%20fill='%23e79a13'%20stroke='%23070707'%20stroke-width='3.2'%20stroke-linejoin='round'/%3E%3Cpath%20d='M18%2020h36M29%2040h14'%20stroke='%23fff1a8'%20stroke-width='3'%20stroke-linecap='round'/%3E%3Cpath%20d='M36%2062v4'%20stroke='%23e79a13'%20stroke-width='3'%20stroke-linecap='round'/%3E%3Ccircle%20cx='36'%20cy='68'%20r='2.2'%20fill='%23e79a13'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  -webkit-mask: none;
  mask: none;
  filter: saturate(1.2) brightness(1.08) drop-shadow(0 0 8px rgba(247, 198, 76, .42));
  transform: translateX(-50%) scale(1.08);
}
.stage-arrow-item.active[data-stage="sample"] .stage-doodle {
  width: 64px;
  height: 48px;
  top: -3px;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2072%2072'%3E%3Cpath%20d='M12%2023l24-13%2024%2013-24%2013-24-13z'%20fill='%23ffd65a'%20stroke='%23070707'%20stroke-width='4'%20stroke-linejoin='round'/%3E%3Cpath%20d='M12%2023v26l24%2013V36z'%20fill='%23f5b72d'%20stroke='%23070707'%20stroke-width='4'%20stroke-linejoin='round'/%3E%3Cpath%20d='M60%2023v26L36%2062V36z'%20fill='%23e7a51a'%20stroke='%23070707'%20stroke-width='4'%20stroke-linejoin='round'/%3E%3Cpath%20d='M27%2015l24%2013-10%205-24-13z'%20fill='%23fff1a8'%20stroke='%23070707'%20stroke-width='3'%20stroke-linejoin='round'/%3E%3Cpath%20d='M36%2036v26M20%2029l17%209M52%2028l-16%208'%20fill='none'%20stroke='%2387672a'%20stroke-width='3'%20stroke-linecap='round'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  -webkit-mask: none;
  mask: none;
  filter: saturate(1.18) brightness(1.1) drop-shadow(0 0 8px rgba(255, 202, 25, .42));
  transform: translateX(-50%) scale(1.08);
}
.stage-arrow-item[data-stage="order"] .stage-doodle {
  width: 64px;
  height: 46px;
  top: -1px;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2072%2072'%3E%3Cpath%20d='M23%2016c-5-4-7-8-5-11l14-3c2%203%206%203%208%200l14%203c2%203%200%207-5%2011z'%20fill='%23ffcf27'%20stroke='%23070707'%20stroke-width='4'%20stroke-linejoin='round'/%3E%3Cpath%20d='M25%2018h22l-5%208H30z'%20fill='%23b98522'%20stroke='%23070707'%20stroke-width='4'%20stroke-linejoin='round'/%3E%3Cpath%20d='M24%2023c-8%209-11%2023-8%2038%202%207%2010%208%2020%208s18-1%2020-8c3-15%200-29-8-38-6-4-18-4-24%200z'%20fill='%23ffca19'%20stroke='%23070707'%20stroke-width='4.5'%20stroke-linejoin='round'/%3E%3Cpath%20d='M29%2023c-6%209-9%2017-10%2027M43%2023c6%209%209%2017%2010%2027'%20fill='none'%20stroke='%2387672a'%20stroke-width='3.8'%20stroke-linecap='round'/%3E%3Cpath%20d='M28%2020c3-7%2013-7%2016%200M28%2020c4%204%2012%204%2016%200'%20fill='none'%20stroke='%2387672a'%20stroke-width='4'%20stroke-linecap='round'/%3E%3Ctext%20x='36'%20y='50'%20text-anchor='middle'%20font-family='Arial,%20Helvetica,%20sans-serif'%20font-size='31'%20font-weight='900'%20fill='%23000000'%3E%24%3C/text%3E%3Ctext%20x='22'%20y='59'%20text-anchor='middle'%20font-family='Arial,%20Helvetica,%20sans-serif'%20font-size='18'%20font-weight='900'%20fill='%2387672a'%3E%23%3C/text%3E%3Ctext%20x='54'%20y='45'%20text-anchor='middle'%20font-family='Arial,%20Helvetica,%20sans-serif'%20font-size='18'%20font-weight='900'%20fill='%2387672a'%3E%23%3C/text%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  -webkit-mask: none;
  mask: none;
}
.stage-arrow-item.active[data-stage="order"] .stage-doodle {
  transform: translateX(-50%) scale(1.04) scaleY(.7);
  transform-origin: center top;
}
.detail-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 18px 0; }
.detail-meta div { padding: 12px; border-radius: 9px; background: var(--soft); }
.detail-meta .service-expiry-card {
  border: 1px solid #f4b7bf;
  background: #fff1f3;
}
.detail-meta small, .detail-meta strong { display: block; }
.detail-meta small { margin-bottom: 5px; color: var(--muted); }
.detail-meta strong { overflow-wrap: anywhere; }
.detail-meta .service-expiry-card small { color: #a93a4b; }
.detail-meta .service-expiry-card strong { color: #c2263f; }
.detail-meta a { color: var(--blue); text-decoration: none; }
.detail-meta a:hover { text-decoration: underline; }
.company-name-button {
  display: block;
  padding: 0;
  color: var(--blue);
  font-weight: 800;
  text-align: left;
}
.company-detail-panel {
  display: grid;
  gap: 18px;
}
.company-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid #dbe6ff;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbff, #ffffff);
}
.company-detail-head h3 {
  margin: 6px 0 4px;
  font-size: 22px;
}
.company-detail-head span,
.company-account-section > header p {
  color: var(--muted);
  font-size: 12px;
}
.company-detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}
.company-account-section {
  display: grid;
  gap: 10px;
}
.company-account-section > header h3 {
  margin: 0 0 4px;
  font-size: 16px;
}
.company-account-section > header p {
  margin: 0;
}
.detail-note { grid-column: 1 / -1; }
.detail-note-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 5px; }
.detail-note-head small { margin-bottom: 0; }
.detail-select {
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid #dce0e9;
  border-radius: 8px;
  color: var(--ink);
  background: white;
  font-weight: 700;
  outline: none;
}
.detail-select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(53,104,232,.09); }
.detail-select:disabled { color: var(--muted); background: #edf1f7; }
.customer-progress-summary { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 10px; align-items: stretch; margin-bottom: 22px; }
.customer-progress-summary > div { padding: 11px; border-radius: 8px; background: var(--soft); }
.customer-progress-summary small, .customer-progress-summary strong { display: block; }
.customer-progress-summary small { color: var(--muted); font-size: 9px; }
.customer-progress-summary strong { margin-top: 4px; font-size: 16px; }
.archive-action-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 4px 0 20px;
  padding: 18px 20px;
  border: 1px solid #bfd0ff;
  border-left: 5px solid var(--blue);
  border-radius: 14px;
  background: linear-gradient(135deg, #f5f8ff 0%, #ffffff 72%);
  box-shadow: 0 12px 28px rgba(52, 88, 170, .08);
}
.archive-action-bar strong,
.archive-action-bar span { display: block; }
.archive-action-bar strong { color: #16357f; font-size: 18px; letter-spacing: .02em; }
.archive-action-bar span { margin-top: 5px; color: #66769a; font-size: 12px; }
.archive-action-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}
.archive-action-buttons .compact {
  max-width: 110px;
  min-height: 36px;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
}
.priority-followup-toggle {
  border-color: #f0cf84;
  color: #8f5d00;
  background: #fff8e6;
}
.priority-followup-toggle.is-active {
  border-color: #e4b44a;
  color: #734900;
  background: #ffe7a8;
}
.customer-reminder-form {
  display: grid;
  grid-template-columns: auto minmax(190px, 240px) auto minmax(140px, 1fr);
  gap: 8px 12px;
  align-items: center;
  order: 2;
  flex: 1 1 100%;
  min-width: 0;
  margin: 0;
  padding: 12px 0 0;
  border-top: 1px dashed #ccd7f6;
}
.customer-reminder-form label {
  color: #4f5f82;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.customer-reminder-form input {
  width: 100%;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid #cbd7f5;
  border-radius: 8px;
  color: var(--ink);
  background: white;
  outline: none;
}
.customer-reminder-form input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(53,104,232,.09);
}
.customer-reminder-status {
  color: #5f6f91;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.customer-reminder-status.is-due {
  color: #b33b50;
}
.customer-reminder-readonly {
  order: 2;
  flex: 1 1 100%;
  min-width: 180px;
  margin: 0;
  padding: 10px 12px;
  border: 1px dashed #ccd7f6;
  border-radius: 8px;
  background: white;
}
.customer-reminder-readonly small,
.customer-reminder-readonly strong { display: block; }
.customer-reminder-readonly small { color: #4f5f82; font-size: 11px; font-weight: 800; }
.customer-reminder-readonly strong { margin-top: 3px; color: var(--ink); font-size: 12px; }
.customer-reminder-readonly.is-due {
  border-color: #ffc4ce;
  background: #fff7f8;
}
.customer-reminder-readonly.is-due strong { color: #b33b50; }
.archive-sample-section { margin: 0 0 22px; padding: 16px; border: 1px solid #dce6ff; border-radius: 12px; background: #f8faff; }
.archive-sample-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.archive-sample-title h3 { margin: 0; }
.archive-sample-title p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.archive-sample-list { display: grid; gap: 12px; }
.archive-sample-list .stage-detail { margin-top: 0; }
.archive-sample-list .sample-stage-detail { padding: 15px; }
.archive-sample-list .stage-detail-title { font-size: 12px; }
.archive-sample-list .stage-detail > p { font-size: 13px; }
.archive-sample-list .stage-mini-grid div { padding: 10px; }
.archive-sample-list .stage-mini-grid small,
.archive-sample-list .sample-detail-note small { font-size: 10px; }
.archive-sample-list .stage-mini-grid strong,
.archive-sample-list .sample-detail-note p { font-size: 12px; }
.archive-sample-list .sample-progress > div:first-child { font-size: 12px; }
.sample-products-field small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.sample-product-list-editor {
  display: grid;
  gap: 8px;
}
.sample-product-row {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}
.sample-product-field {
  display: grid;
  gap: 6px;
}
.sample-product-field label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.sample-product-price-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(82px, .72fr);
  gap: 8px;
}
.sample-price-input {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  align-items: stretch;
  overflow: hidden;
  border: 1px solid #dce0e9;
  border-radius: 8px;
  background: white;
}
.sample-price-input select {
  width: 70px;
  min-width: 70px;
  padding: 0 5px;
  border: 0;
  border-right: 1px solid #dce0e9;
  border-radius: 0;
  background: #f6f8ff;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
}
.sample-price-input input {
  min-width: 0;
  border: 0;
  border-radius: 0;
}
.sample-product-quantity-field input { min-width: 0; }
.sample-product-row input,
.sample-product-row textarea,
.sample-product-row button {
  width: 100%;
}
.sample-time-progress {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}
.sample-time-progress > div:first-child {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
}
.sample-time-progress small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
}
.sample-product-row textarea {
  min-height: 72px;
  resize: vertical;
}
.sample-product-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.sample-product-actions button {
  max-width: 140px;
}
.sample-product-subtotal {
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}
.sample-product-total {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #eef4ff;
  color: var(--blue);
  font-weight: 800;
}
.sample-order-form {
  align-items: start;
}
.order-form-main-only {
  grid-template-columns: minmax(0, 1fr);
}
.order-form-main-only .sample-product-info-panel {
  grid-column: 1 / -1;
}
.order-side-panels {
  display: grid;
  gap: 14px;
}
.order-finance-panel {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid #d6e0f5;
  border-radius: 14px;
  background: #f6f8fd;
}
.order-finance-panel-grid {
  grid-template-columns: 1fr;
}
.sample-product-info-panel .intake-card-grid {
  grid-template-columns: 1fr;
}
.sample-production-panel {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid #cfdbf2;
  border-radius: 14px;
  background: #edf2fb;
}
.sample-production-panel-title {
  color: #34435f;
  font-size: 13px;
  font-weight: 900;
}
.sample-production-panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.sample-order-attachment-box {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px dashed #c9d6f4;
  border-radius: 12px;
  background: white;
}
.sample-order-attachment-box small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.sample-attachment-list {
  display: grid;
  gap: 8px;
}
.sample-attachment-list .attachment-upload-item {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
}
.sample-add-product {
  margin-top: 9px;
  min-height: 42px;
}
.sample-product-requirements {
  margin-top: 9px;
  padding: 10px;
  border-radius: 9px;
  background: white;
}
.sample-product-requirements > small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  margin-bottom: 8px;
}
.sample-product-requirement-item {
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.sample-product-requirement-item:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.sample-product-requirement-item strong {
  display: block;
  font-size: 12px;
  margin-bottom: 5px;
}
.sample-product-line-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.sample-product-requirement-item p {
  margin: 0;
  color: var(--text);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-line;
}
.timeline { position: relative; display: grid; gap: 0; margin-top: 8px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 7px; bottom: 7px; width: 1px; background: var(--line); }
.timeline-item { position: relative; padding: 0 0 20px 31px; }
.timeline-dot { position: absolute; left: 3px; top: 4px; width: 11px; height: 11px; border: 3px solid white; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 1px #a9bdf2; }
.timeline-dot.has-reminder {
  left: -1px;
  top: 0;
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border: 1px solid white;
  background: #fff;
  box-shadow: 0 0 0 1px #d7dfef;
  font-size: 13px;
  line-height: 1;
}
.timeline-dot.has-reminder svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.timeline-dot.has-reminder.is-pending { color: #d9364a; }
.timeline-dot.has-reminder.is-overdue { color: #97a0b3; filter: grayscale(1); }
.timeline-item h4 { margin: 0; font-size: 13px; }
.timeline-item p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.timeline-item time { color: #9aa2b4; font-size: 10px; }
.timeline-reminder { margin-top: 6px; color: #d9364a; font-size: 11px; font-weight: 800; }
.timeline-dot.has-reminder.is-overdue ~ .timeline-reminder { color: #97a0b3; }
.timeline-attachments { margin-top: 10px; }
.timeline-attachments > small { display: block; color: var(--muted); font-size: 10px; font-weight: 700; }
.attachment-list { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 10px; }
.attachment-media, .attachment-file {
  display: grid;
  gap: 6px;
  max-width: 180px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: white;
  text-decoration: none;
}
.attachment-media {
  border: 1px solid var(--line);
  cursor: zoom-in;
  text-align: left;
}
.attachment-media img, .attachment-media video {
  width: 160px;
  max-width: 100%;
  height: 96px;
  object-fit: cover;
  border-radius: 7px;
  background: var(--soft);
}
.attachment-media span, .attachment-media small, .attachment-media a, .attachment-file small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
}
.attachment-media small { color: var(--blue); font-weight: 700; }
.attachment-media a:hover, .attachment-file:hover { color: var(--blue); }

@media (max-width: 1180px) {
  .login-home { grid-template-columns: 1fr; }
  .login-showcase { min-height: auto; }
  .login-card { width: min(520px, calc(100% - 40px)); margin: 34px 0; }
  .metrics { grid-template-columns: repeat(3, 1fr); }
  .dashboard-amount-grid { grid-template-columns: repeat(2, 1fr); }
  .amount-stat-total-card { width: calc((100% - 12px) / 2); }
  .sample-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .login-view { padding: 18px; }
  .login-home {
    min-height: auto;
    border-radius: 22px;
  }
  .login-showcase {
    padding: 28px;
  }
  .login-copy h1 {
    font-size: 28px;
    white-space: normal;
  }
  .login-card {
    width: calc(100% - 32px);
    margin: 22px 0 28px;
  }
  .login-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    padding: 14px 20px;
  }
  .app-shell { display: block; }
  .sidebar { transform: translateX(-100%); transition: transform .25s; }
  .sidebar.open { transform: translateX(0); box-shadow: 20px 0 50px rgba(10,20,40,.2); }
  .main { width: 100%; }
  .menu-button { display: block; }
  .topbar { padding: 16px 18px; }
  .topbar p { display: none; }
  .content { padding: 20px 18px 40px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-conversion-content { grid-template-columns: 1fr; }
  .dashboard-amount-header { display: grid; }
  .dashboard-amount-filters { justify-content: flex-start; }
  .search-box { display: none; }
  .reminder-settings-grid { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
  .reminder-grid { grid-template-columns: 1fr; }
  .funnel-board { grid-template-columns: repeat(4, 270px); }
  .detail-title-row { grid-template-columns: 1fr; align-items: start; }
  .detail-title-row > .secondary-button { justify-self: start; }
  .stage-arrow { justify-content: flex-start; overflow-x: auto; max-width: 100%; }
}
@media (max-width: 590px) {
  .metrics { grid-template-columns: 1fr 1fr; }
  .dashboard-amount-grid { grid-template-columns: 1fr; }
  .amount-stat-total-card { width: 100%; }
  .metric-card { padding: 16px; }
  .topbar h1 { font-size: 19px; }
  .primary-button { padding: 9px 11px; font-size: 12px; }
  .form-grid, .detail-meta, .intake-card-grid { grid-template-columns: 1fr; }
  .sample-production-panel-grid { grid-template-columns: 1fr; }
  .reminder-settings-grid, .reminder-summary { grid-template-columns: 1fr; }
  .reminder-item { display: grid; }
  .reminder-actions { justify-items: start; }
  .communication-entry-grid { grid-template-columns: 1fr; }
  .detail-head { flex-wrap: wrap; }
  .detail-head-copy { flex-basis: calc(100% - 76px); }
  .detail-title-row > .secondary-button { width: 100%; }
  .customer-progress-summary { grid-template-columns: 1fr 1fr; }
  .archive-action-bar { align-items: stretch; flex-direction: column; }
  .customer-reminder-form { grid-template-columns: 1fr; min-width: 0; margin-left: 0; }
  .customer-reminder-readonly { margin-left: 0; }
  .sample-schedule { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .form-actions { grid-column: auto; }
}
