:host {
  --ink: #1c2a38;
  --ink-soft: #50647c;
  --line: rgba(23, 65, 99, 0.1);
  --card-bg: #ffffff;
  --ok: #0c8d42;
  --bad: #d8443c;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(16, 38, 58, 0.04), 0 12px 32px -16px rgba(16, 38, 58, 0.22);
  display: block;
}

/* ---------- Page shell ---------- */
.off {
  padding: 28px clamp(16px, 3vw, 36px) 48px;
  color: var(--ink);
  background:
    radial-gradient(120% 80% at 100% -10%, rgba(2, 121, 207, 0.08), transparent 55%),
    radial-gradient(90% 70% at -10% 0%, rgba(22, 212, 203, 0.07), transparent 50%),
    #f2f4f7;
  min-height: 100%;
}

/* ---------- Card ---------- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 18px 16px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
}

.card__head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}

.card__title { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
.card__zh { font-size: 12px; color: var(--ink-soft); }

/* The two-column workspace cards sit in a CSS grid wrapper — drop their own margin. */
.grid > .card { margin-bottom: 0; }

/* ---------- Start card ---------- */
.start {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 18px;
}

.start__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
}

.start__action { display: flex; align-items: flex-end; }

.start__exists { display: flex; flex-direction: column; gap: 8px; }

.start__note {
  font-size: 12.5px;
  font-weight: 600;
  color: #92400e;
  background: #fef3c7;
  padding: 6px 12px;
  border-radius: 999px;
}

/* ---------- Session bar ---------- */
.bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 12px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  backdrop-filter: blur(6px);
}

.bar__date { font-weight: 700; letter-spacing: -0.01em; }
.bar__spacer { flex: 1; }

/* ---------- Status pills ---------- */
.pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 11px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.pill--draft { background: #fef3c7; color: #92400e; }
.pill--submitted { background: #d9fce8; color: var(--ok); }
.pill--reconciled { background: #e2e8f0; color: #334155; }

/* ---------- View summary tiles ---------- */
.stats {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 18px;
}

.stat {
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat__label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.stat__value {
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* ---------- Reconcile bar ---------- */
.reconcile-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 16px;
  font-variant-numeric: tabular-nums;
}

.ok { color: var(--ok); font-weight: 700; }
.bad { color: var(--bad); font-weight: 700; }

/* ---------- Footers / misc ---------- */
.lines-footer { margin-top: 10px; color: var(--ink-soft); font-weight: 600; font-variant-numeric: tabular-nums; }
.anon-chip { padding: 0.25rem 0.6rem; background: var(--kendo-color-base-subtle, #e6eaef); border-radius: 999px; font-size: 12px; font-weight: 600; }
.notes-text { margin: 0; color: var(--ink); line-height: 1.5; white-space: pre-wrap; }

/* ---- Paper proof ---- */
.proof-hint { margin: 0 0 12px; font-size: 13px; line-height: 1.5; color: var(--ink-soft); span { color: #9aa7b6; } }
.proof-input { display: block; font-size: 14px; }
.proof-list {
  list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px;
  li {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 4px 10px; background: var(--kendo-color-base-subtle, #f1f4f8);
    border: 1px solid var(--line); border-radius: 8px; font-size: 13px;
  }
}
.proof-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proof-warn { margin: 10px 0 0; font-size: 12px; line-height: 1.5; color: #b45309; span { color: #d97706; } }
.proof-none { font-size: 14px; color: var(--ink-soft); }
.proof-busy { font-size: 13px; color: var(--ink-soft); }
.dialog-text { margin: 0; line-height: 1.55; span { color: var(--ink-soft); font-size: 13px; } }

.empty {
  padding: 28px 0;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);

  span { font-weight: 400; font-size: 12px; }
}

/* ---------- Borderless grid (mirrors the dashboard `.detail` look) ---------- */
.lined {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
}

:host ::ng-deep .lined {
  .k-grid-header, .k-grid-header-wrap { border: none; background: transparent; }
  .k-table-th {
    border: none;
    background: transparent;
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding-block: 8px;
  }
  .k-grid-content { background: transparent; }
  td.k-table-td {
    border: none;
    border-top: 1px solid var(--line);
    padding-block: 9px;
    vertical-align: middle;
  }
  .k-table-row:hover td.k-table-td { background: var(--kendo-color-primary-subtle, #daecfb); }
}

/* ---------- Responsive ---------- */
@media (min-width: 760px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Entrance ---------- */
.rise {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--d, 0ms);
}

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .rise { animation: none; opacity: 1; transform: none; }
}

.clickable-rows {
  .k-grid-table tr { cursor: pointer; }
}

.att-total {
  margin-top: 0.75rem;
  font-weight: 600;
  text-align: right;
}
