:root {
  --bg: #f6f8fb;
  --surface: #fff;
  --text: #111827;
  --muted: #6b7684;
  --line: #e6ebf1;
  --line-strong: #d4dbe5;
  --blue: #087cf7;
  --blue-2: #13a3ff;
  --blue-soft: #e8f2ff;
  --green: #00b76a;
  --green-soft: #e8fff5;
  --orange: #ff9500;
  --orange-soft: #fff3df;
  --red: #ff4d5e;
  --red-soft: #fff0f2;
  --shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
  --sidebar: 218px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
  letter-spacing: 0;
}

.hidden {
  display: none !important;
}

.login-screen {
  display: grid;
  grid-template-columns: minmax(520px, 0.94fr) minmax(520px, 1fr);
  min-height: 100vh;
  background: #fff;
}

.login-visual {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 92px 120px;
  background: linear-gradient(145deg, var(--blue-2), var(--blue));
  color: #fff;
}

.login-brand,
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-brand strong,
.brand strong {
  font-size: 25px;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--blue);
  font-size: 54px;
  font-weight: 1000;
  font-style: italic;
  box-shadow: 0 12px 28px rgba(0, 44, 120, 0.16);
}

.logo-mark.small {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 28px;
}

.login-visual h1 {
  margin-top: 92px;
  font-size: 74px;
  line-height: 1.05;
  font-weight: 1000;
}

.login-visual p {
  margin-top: 28px;
  font-size: 27px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.86);
}

.ghost-logo {
  position: absolute;
  right: 48px;
  bottom: 50px;
  color: rgba(255, 255, 255, 0.1);
  font-size: 360px;
  font-weight: 1000;
  font-style: italic;
  line-height: 1;
}

.login-content {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 72px;
}

.status-chip {
  position: absolute;
  top: 34px;
  right: 56px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 15px;
  color: #3f4a5a;
  font-weight: 800;
}

.status-chip span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #f59e0b;
}

.status-chip.online span {
  background: var(--green);
}

.status-chip.offline span {
  background: var(--red);
}

.status-chip.offline {
  color: var(--red);
}

.beta-note {
  border-radius: 10px;
  padding: 12px 14px;
  background: #eff6ff;
  color: #245ea8;
  font-size: 14px;
  font-weight: 800;
}

.login-card {
  display: grid;
  width: min(100%, 460px);
  gap: 20px;
}

.login-card h2 {
  font-size: 46px;
  line-height: 1.1;
}

.login-card p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 17px;
}

label {
  display: grid;
  gap: 10px;
  font-weight: 900;
}

input,
textarea,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 14px;
  background: #fff;
  color: var(--text);
  outline: none;
}

textarea {
  min-height: auto;
  padding: 14px;
  resize: vertical;
  line-height: 1.5;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(8, 124, 247, 0.12);
}

.field-with-icon {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 18px;
}

.field-with-icon span {
  flex: 0 0 auto;
  color: #7b8794;
  font-size: 22px;
}

.field-with-icon input {
  min-height: 60px;
  border: 0;
  padding: 0;
  box-shadow: none;
}

.check-row,
.toggle-line {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.check-row input,
.toggle-line input {
  width: 22px;
  min-height: 22px;
  accent-color: var(--blue);
}

.primary,
.secondary,
.text-button,
.social,
.icon-button,
.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 0;
  text-decoration: none;
  font-weight: 900;
}

.primary,
.primary-link {
  background: var(--blue);
  color: #fff;
}

.secondary {
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--text);
}

.compact {
  min-height: 40px;
  padding: 0 14px;
}

.tall {
  min-height: 64px;
  padding: 0 22px;
  font-size: 17px;
}

button:disabled {
  cursor: progress;
  opacity: 0.58;
}

.divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  color: #a0a8b3;
  font-weight: 700;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.social {
  position: relative;
  min-height: 56px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--text);
}

.social span {
  position: absolute;
  left: 22px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: 1000;
}

.social.kakao span {
  background: #fee500;
}

.social.kakao span::before {
  content: "";
  width: 15px;
  height: 12px;
  border-radius: 50%;
  background: #3b1f1f;
}

.social.naver span {
  background: #03c75a;
  color: #fff;
}

.social.google span {
  color: #4285f4;
  font-size: 22px;
}

.login-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 6px;
}

.login-links button {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 900;
}

.login-links i {
  width: 1px;
  height: 18px;
  background: var(--line);
}

.inline-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.auth-note {
  grid-column: 1 / -1;
  border: 1px solid #d8e6f8;
  border-radius: 8px;
  padding: 12px 14px;
  background: #f7fbff;
  color: #42526b;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}

.result-box {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  border-radius: 8px;
  padding: 12px 14px;
  background: #f6f8fb;
  color: #263242;
  font-size: 14px;
  line-height: 1.55;
}

.result-box b {
  color: var(--blue);
}

.message {
  min-height: 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.api-inline {
  position: fixed;
  right: 28px;
  bottom: 24px;
  display: grid;
  grid-template-columns: auto minmax(250px, 360px) auto;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.api-inline input {
  min-height: 38px;
}

.shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  gap: 28px;
  padding: 28px 14px 24px;
  background: linear-gradient(180deg, var(--blue-2), var(--blue));
  color: #fff;
}

.brand {
  padding: 0 14px;
}

.brand .logo-mark {
  background: rgba(255, 255, 255, 0.96);
  color: var(--blue);
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  text-align: left;
  font-weight: 900;
}

.nav-item span {
  display: inline-flex;
  width: 20px;
  justify-content: center;
  font-size: 19px;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(0, 60, 160, 0.28);
  color: #fff;
}

.sidebar-bottom {
  display: grid;
  gap: 14px;
  margin-top: auto;
}

.tip-card,
.store-card {
  display: grid;
  gap: 8px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  text-align: left;
}

.tip-card span,
.store-card small {
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.45;
}

.store-card {
  grid-template-columns: 36px 1fr;
  align-items: center;
}

.store-icon,
.round-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  color: var(--blue);
  font-weight: 1000;
}

.workspace {
  min-width: 0;
  background: var(--bg);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.topbar h1 {
  font-size: 25px;
}

.load-warning {
  margin: 16px 30px 0;
  border: 1px solid #f59e0b;
  border-radius: 10px;
  padding: 12px 14px;
  background: #fffbeb;
  color: #92400e;
  font-size: 14px;
  font-weight: 850;
}

.eyebrow {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button {
  position: relative;
  width: 42px;
  height: 42px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 20px;
}

.icon-button em {
  position: absolute;
  top: -7px;
  right: -4px;
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-style: normal;
}

#appPanel {
  padding: 28px 30px 42px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.page-head,
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.page-head {
  margin-bottom: 18px;
}

.page-head h2 {
  font-size: 28px;
}

.page-head p {
  margin-top: 8px;
  color: var(--muted);
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--blue);
  padding: 0;
}

.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.04);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.compact-grid {
  margin-bottom: 18px;
}

.metric {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  min-height: 120px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: #fff;
}

.metric-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 28px;
  font-weight: 900;
}

.metric.green .metric-icon {
  background: var(--green-soft);
  color: var(--green);
}

.metric.orange .metric-icon {
  background: var(--orange-soft);
  color: var(--orange);
}

.metric.purple .metric-icon {
  background: #eef0ff;
  color: #3947d5;
}

.metric span {
  color: var(--muted);
  font-weight: 800;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 29px;
  line-height: 1;
}

.metric small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 800;
}

.metric small b {
  color: var(--blue);
}

.compact-grid .metric {
  grid-template-columns: 48px 1fr;
  gap: 12px;
  min-height: 112px;
  padding: 16px;
}

.compact-grid .metric-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  font-size: 24px;
}

.compact-grid .metric strong {
  font-size: 24px;
  line-height: 1.12;
  word-break: keep-all;
}

.compact-grid .metric span,
.compact-grid .metric small {
  font-size: 13px;
  word-break: keep-all;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.72fr 1fr;
  gap: 16px;
}

.dashboard-grid .card {
  padding: 20px;
}

.sales-card {
  grid-column: span 2;
  min-height: 360px;
}

.sales-card strong {
  display: block;
  margin-top: 16px;
  font-size: 38px;
}

.sales-card p {
  margin-top: 8px;
  color: var(--muted);
  font-weight: 800;
}

.sales-card p b {
  color: var(--blue);
}

.chart-line {
  display: grid;
  place-items: center;
  height: 190px;
  margin-top: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: #fafcff;
}

.chart-line svg {
  width: 100%;
  height: 100%;
}

.chart-line .grid {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
}

.chart-line .today,
.chart-line .yesterday {
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
}

.chart-line .today {
  stroke: var(--blue);
}

.chart-line .yesterday {
  stroke: #b9d9ff;
  stroke-dasharray: 8 10;
}

.summary-card {
  min-height: 360px;
}

.summary-card h3,
.schedule-card h3,
.quick-card h3,
.notice-card h3,
.table-card h3 {
  font-size: 20px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  color: var(--muted);
  font-weight: 800;
}

.summary-row strong {
  color: var(--text);
}

.summary-plus {
  margin-top: 24px;
  color: var(--blue);
  font-weight: 1000;
  text-align: center;
}

.date-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #475569;
  font-size: 14px;
  font-weight: 900;
}

.date-nav button {
  border: 0;
  background: transparent;
  color: #475569;
  font-size: 22px;
}

.mini-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin: 18px 0;
  text-align: center;
}

.calendar-day {
  display: grid;
  gap: 6px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.calendar-day b {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin: 0 auto;
  border-radius: 50%;
  color: var(--text);
  font-size: 15px;
}

.calendar-day.active b {
  background: var(--blue);
  color: #fff;
}

.schedule-list {
  display: grid;
  gap: 13px;
}

.schedule-item {
  display: grid;
  grid-template-columns: 48px 10px 1fr auto;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
}

.schedule-item i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
}

.schedule-item strong {
  display: block;
  color: var(--text);
  font-size: 15px;
}

.table-card {
  grid-column: span 2;
}

.quick-card,
.notice-card {
  min-height: 160px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 22px;
}

.quick-grid button {
  display: grid;
  gap: 10px;
  justify-items: center;
  min-height: 86px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-weight: 900;
}

.quick-grid span {
  color: var(--blue);
  font-size: 30px;
}

.notice-card ul {
  display: grid;
  gap: 14px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.notice-card li {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  gap: 10px;
  align-items: center;
  color: #394150;
}

.notice-card li span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
}

.notice-card small {
  color: var(--muted);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 345px;
  gap: 0;
  min-height: calc(100vh - 126px);
}

.main-pane {
  min-width: 0;
  padding-right: 22px;
}

.detail-pane {
  position: sticky;
  top: 88px;
  align-self: start;
  min-height: calc(100vh - 112px);
  border-left: 1px solid var(--line);
  padding-left: 22px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(135px, 180px));
  gap: 10px;
  margin-bottom: 18px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 14px;
  background: #fff;
}

.search-box span {
  color: var(--muted);
}

.search-box input {
  min-height: 44px;
  border: 0;
  padding: 0;
  box-shadow: none;
}

.segmented {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.segment {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 20px;
  background: #fff;
  color: #596575;
  font-weight: 900;
}

.segment.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.data-table {
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.empty-row {
  padding: 26px;
  color: var(--muted);
  font-weight: 800;
}

.table-row,
.table-head {
  display: grid;
  align-items: center;
  gap: 14px;
  min-height: 66px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
}

.table-row:last-child {
  border-bottom: 0;
}

.table-head {
  min-height: 52px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  background: #fbfcfd;
}

.intake-table .table-row,
.intake-table .table-head {
  grid-template-columns: 128px 142px 170px minmax(160px, 1fr) 92px 96px 118px;
}

.ticket-table .table-row,
.ticket-table .table-head {
  grid-template-columns: 136px 130px minmax(180px, 1fr) 116px 112px 118px 112px 264px;
  min-width: 1200px;
}

.payment-table .table-row,
.payment-table .table-head {
  grid-template-columns: 122px 98px 104px 122px 106px 128px 20px;
  min-width: 790px;
}

.parcel-table .table-row,
.parcel-table .table-head {
  grid-template-columns: 150px 120px 110px minmax(140px, 1fr) 100px 110px 100px 28px;
  min-width: 900px;
}

.table-row {
  cursor: pointer;
  width: 100%;
  border-top: 0;
  border-right: 0;
  border-left: 0;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.table-row:hover,
.table-row.selected {
  background: #f3f8ff;
  box-shadow: inset 3px 0 0 var(--blue);
}

.cell-main strong {
  display: block;
}

.cell-main small,
.muted {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.ticket-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ticket-actions button {
  min-height: 32px;
  border: 1px solid #d8e6f8;
  border-radius: 8px;
  padding: 0 9px;
  background: #f6fbff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.ticket-actions button:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.evidence-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.evidence-cell .pill {
  min-height: 28px;
  padding: 0 8px;
  font-size: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border-radius: 8px;
  padding: 0 10px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.pill.green {
  background: var(--green-soft);
  color: #008a51;
}

.pill.orange {
  background: var(--orange-soft);
  color: #b46000;
}

.pill.red {
  background: var(--red-soft);
  color: #d72b3e;
}

.pill.gray {
  background: #eef2f6;
  color: var(--muted);
}

.detail-card {
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: #fff;
}

.detail-card h3 {
  font-size: 18px;
}

.detail-section {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.detail-section:first-child {
  border-top: 0;
  padding-top: 0;
}

.photo-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.photo-thumb {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 8px;
  background: linear-gradient(145deg, #e9eef5, #f8fafc);
  color: #64748b;
  font-weight: 900;
  overflow: hidden;
  text-decoration: none;
}

.photo-thumb.image-thumb {
  position: relative;
  background: #eef2f7;
}

.photo-thumb.image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-thumb.image-thumb span {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  padding: 4px 6px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 11px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-actions {
  display: grid;
  gap: 10px;
}

.action-panel {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 80;
  width: min(560px, calc(100vw - 32px));
}

.action-card {
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
}

.action-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.action-form label {
  display: grid;
  gap: 7px;
  color: #42526b;
  font-size: 13px;
  font-weight: 900;
}

.action-form .wide {
  grid-column: 1 / -1;
}

.action-form .message {
  grid-column: 1 / -1;
  margin: 0;
}

.evidence-panel {
  display: grid;
  gap: 20px;
}

.evidence-panel section {
  display: grid;
  gap: 12px;
}

.evidence-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.evidence-photo {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: 8px;
  background: #eef2f7;
  color: #fff;
  text-decoration: none;
}

.evidence-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.evidence-photo span {
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 7px;
  border-radius: 6px;
  padding: 5px 7px;
  background: rgba(15, 23, 42, 0.74);
  font-size: 11px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-list {
  display: grid;
  gap: 8px;
}

.attachment-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  gap: 10px;
  align-items: center;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--text);
  text-decoration: none;
}

.attachment-row:hover {
  border-color: #b9d7fb;
  background: #f7fbff;
}

.attachment-row strong,
.attachment-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.detail-actions .danger {
  border: 1px solid var(--red);
  background: #fff;
  color: var(--red);
}

.section-title {
  margin: 4px 0 16px;
  font-size: 21px;
}

.payment-note {
  margin: -6px 0 16px;
  border: 1px solid #d8e6f8;
  border-radius: 8px;
  padding: 14px 16px;
  background: #f7fbff;
  color: #42526b;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.55;
}

.parcel-metrics {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.parcel-metric {
  display: grid;
  grid-template-columns: 1fr 42px;
  gap: 10px;
  align-items: center;
  min-height: 104px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fff;
}

.parcel-metric span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.parcel-metric strong {
  display: block;
  margin-top: 8px;
  font-size: 27px;
}

.parcel-metric i {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  font-style: normal;
  font-weight: 900;
}

.collapse-note {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 14px;
  align-items: center;
  width: 100%;
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: #fff;
  text-align: left;
}

.collapse-note span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
}

.link-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
  gap: 24px;
}

.settings-panel {
  display: grid;
  gap: 20px;
  padding: 22px;
}

.copy-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.toggle-line {
  justify-content: space-between;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}

.toggle-line small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.link-side {
  display: grid;
  gap: 16px;
}

.qr-card,
.preview-card {
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: 22px;
  text-align: center;
}

.qr-card p,
.preview-card p {
  color: var(--muted);
}

.qr {
  width: 172px;
  height: 172px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.qr.large {
  width: 190px;
  height: 190px;
}

.phone-preview {
  overflow: hidden;
  width: 260px;
  height: 520px;
  border: 10px solid #1f2937;
  border-radius: 36px;
  background: #fff;
  box-shadow: var(--shadow);
}

.phone-blue {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 38px 20px 28px;
  background: linear-gradient(145deg, var(--blue-2), var(--blue));
  color: #fff;
}

.phone-blue .logo-mark {
  margin-bottom: 4px;
}

.phone-blue h4 {
  margin-top: 12px;
  font-size: 24px;
  line-height: 1.2;
}

.phone-sheet {
  display: grid;
  gap: 12px;
  margin: -12px 14px 0;
  border-radius: 20px 20px 0 0;
  padding: 22px 16px;
  background: #fff;
  text-align: left;
}

.phone-sheet span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--muted);
}

.settings-groups {
  display: grid;
  gap: 22px;
}

.settings-groups section {
  display: grid;
  gap: 10px;
}

.settings-groups h3 {
  color: #394150;
  font-size: 15px;
}

.wide-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 18px;
  width: 100%;
  min-height: 80px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 20px;
  background: #fff;
  color: var(--text);
  text-align: left;
  text-decoration: none;
}

.wide-row small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 700;
}

.wide-row i {
  color: var(--muted);
  font-style: normal;
  font-size: 22px;
}

.line-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--text);
  font-size: 26px;
  font-weight: 900;
}

.usage-bar {
  width: 260px;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.usage-bar em {
  display: block;
  width: 46%;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.plan-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.plan-card.active {
  border-color: var(--blue);
  background: #f7fbff;
  box-shadow: inset 0 0 0 1px rgba(8, 124, 247, 0.14);
}

.plan-card strong {
  font-size: 17px;
}

.plan-card small {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
}

.billing-readiness {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  background: #fff;
  color: #475467;
  font-size: 14px;
  font-weight: 800;
}

.billing-readiness span {
  display: inline-flex;
  width: max-content;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 1000;
}

.settlement-preview,
.cost-usage-panel {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.settlement-preview span,
.cost-usage-panel span {
  width: max-content;
  border-radius: 999px;
  padding: 5px 10px;
  background: #eef2f6;
  color: #596575;
  font-size: 12px;
  font-weight: 1000;
}

.settlement-preview strong,
.cost-usage-panel strong {
  font-size: 18px;
}

.cost-usage-panel small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.settlement-lines {
  display: grid;
  gap: 8px;
}

.settlement-lines p {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.settlement-lines b {
  color: var(--text);
}

.toggle {
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: #dfe5ec;
  padding: 3px;
}

.toggle::after {
  content: "";
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.16);
}

.toggle.on {
  background: var(--blue);
}

.toggle.on::after {
  margin-left: 20px;
}

.connect-chip {
  border-radius: 8px;
  padding: 8px 11px;
  background: var(--green-soft);
  color: #008a51;
  font-size: 13px;
  font-weight: 900;
}

.connect-chip.off {
  background: var(--orange-soft);
  color: #b46000;
}

.slot-form {
  display: grid;
  gap: 12px;
}

.slot-management-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.slot-management-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.slot-management-item strong {
  display: block;
  color: var(--ink);
}

.slot-management-item small {
  color: var(--muted);
}

.webhook-panel,
.notification-panel {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.webhook-list,
.notification-list {
  display: grid;
  gap: 8px;
}

.webhook-row,
.notification-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto 132px auto;
  gap: 12px;
  align-items: center;
  min-height: 62px;
  border: 1px solid #edf1f5;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbfcfd;
}

.webhook-row strong,
.webhook-row small,
.notification-row strong,
.notification-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.webhook-row small,
.notification-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.webhook-row time,
.notification-row time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: right;
}

.notification-row {
  grid-template-columns: 38px minmax(0, 1fr) auto 132px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  max-width: 360px;
  border-radius: 8px;
  padding: 14px 16px;
  background: #111827;
  color: #fff;
  font-weight: 900;
  opacity: 0;
  transform: translateY(12px);
  transition: 160ms ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .dashboard-grid,
  .link-layout,
  .split-layout {
    grid-template-columns: 1fr;
  }

  .detail-pane {
    position: static;
    min-height: auto;
    border-left: 0;
    padding-left: 0;
    margin-top: 20px;
  }

  .main-pane {
    padding-right: 0;
  }
}

@media (max-width: 920px) {
  .login-screen,
  .shell {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 420px;
    padding: 54px 30px;
  }

  .login-visual h1 {
    margin-top: 40px;
    font-size: 52px;
  }

  .login-content {
    min-height: auto;
    padding: 40px 24px 100px;
  }

  .api-inline {
    left: 24px;
    right: 24px;
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-grid,
  .parcel-metrics,
  .plan-grid,
  .filter-bar {
    grid-template-columns: 1fr;
  }

  .sales-card,
  .table-card {
    grid-column: span 1;
  }

  .wide-row {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 14px;
  }

  .wide-row > span:nth-child(2) {
    min-width: 0;
  }

  .wide-row i {
    display: none;
  }

  .usage-bar {
    grid-column: 2 / -1;
    width: 100%;
  }

  .connect-chip {
    grid-column: 2 / -1;
    justify-self: start;
  }
}
