/* Shared mockup chrome — mirrors dashboard cards */

.mock {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow), 0 12px 32px rgba(17, 24, 39, 0.06);
  font-size: 12px;
  color: var(--text);
  overflow: hidden;
  user-select: none;
}

.mock-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.mock-bar strong {
  font-size: 13px;
}

.mock-tabs {
  display: inline-flex;
  background: var(--subtle);
  border-radius: 7px;
  padding: 2px;
  font-size: 11px;
}

.mock-tabs span {
  padding: 3px 9px;
  border-radius: 5px;
  color: var(--muted);
}

.mock-tabs span.on {
  background: var(--card);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--subtle);
  color: var(--navy);
  font-size: 10px;
  font-weight: 650;
  flex-shrink: 0;
}

/* Planning timeline (DayView look) */

.plan {
  --label: 108px;
}

.plan-scale,
.plan-row {
  display: grid;
  grid-template-columns: var(--label) minmax(0, 1fr);
}

.plan-scale {
  background: #f2f4f7;
  border-bottom: 1px solid var(--border);
}

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

.plan-hours span {
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
  padding: 6px 4px;
  border-left: 1px solid rgba(229, 231, 235, 0.7);
}

.plan-row {
  border-bottom: 1px solid rgba(229, 231, 235, 0.6);
  min-height: 54px;
}

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

.plan-who {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px 0 14px;
  border-right: 1px solid var(--border);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
}

.plan-track {
  position: relative;
  background-image: linear-gradient(
    to right,
    rgba(229, 231, 235, 0.5) 1px,
    transparent 1px
  );
  background-size: 10% 100%;
}

.job {
  position: absolute;
  top: 7px;
  bottom: 7px;
  border-left: 3px solid var(--c);
  background: color-mix(in srgb, var(--c) 13%, white);
  border-radius: 3px;
  padding: 4px 7px;
  overflow: hidden;
  white-space: nowrap;
  line-height: 1.25;
}

.job b {
  display: block;
  font-weight: 600;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.job small {
  color: #4b5563;
  font-size: 10px;
}

.job.live {
  outline: 1px dashed var(--c);
  outline-offset: -1px;
}

.now {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0;
  border-left: 1.5px solid var(--danger);
}

.plan-foot {
  display: flex;
  justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
}

/* Badges (ui/badge.tsx) */

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-progress {
  background: #fef3c7;
  color: #b45309;
}

.badge-done {
  background: #dcfce7;
  color: #15803d;
}

.badge-new {
  background: #e0e7ff;
  color: #4338ca;
}

/* Approval table */

.appr table {
  width: 100%;
  border-collapse: collapse;
}

.appr th {
  text-align: left;
  font-weight: 500;
  color: var(--muted);
  font-size: 11px;
  background: #f2f4f7;
  padding: 8px 14px;
}

.appr td {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  white-space: nowrap;
}

.appr td.r,
.appr th.r {
  text-align: right;
}

.appr tr:nth-child(even) td {
  background: #f9fafb;
}

.appr .who {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.appr .ht {
  color: var(--muted);
}

.appr .sum td {
  font-weight: 650;
  background: var(--card);
}

.sign {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  padding: 14px 16px 16px;
  border-top: 1px solid var(--border);
}

.sign svg {
  display: block;
  width: 150px;
  height: 40px;
  color: var(--navy);
}

.sign .line {
  border-top: 1px solid #9ca3af;
  margin-top: 2px;
  padding-top: 4px;
  font-size: 10.5px;
  color: var(--muted);
}

.sign .stamp {
  font-size: 10.5px;
  color: var(--success);
  font-weight: 600;
}

/* Phone (mobile app) */

.phone-wrap {
  display: flex;
  justify-content: center;
}

.phone {
  width: 270px;
  max-width: 100%;
  border-radius: 38px;
  border: 9px solid #23253a;
  background: var(--bg);
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.14);
  overflow: hidden;
  font-size: 12px;
  user-select: none;
}

.phone-status {
  display: flex;
  justify-content: space-between;
  padding: 10px 20px 4px;
  font-size: 11px;
  font-weight: 600;
}

.phone-body {
  padding: 10px 14px 18px;
}

.phone-body h4 {
  margin: 4px 2px 12px;
  font-size: 18px;
}

.checkin {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}

.checkin .where {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--success);
  font-weight: 600;
}

.checkin .where::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(15, 157, 88, 0.15);
}

.checkin .addr {
  margin: 8px 0 2px;
  font-weight: 650;
  font-size: 13px;
}

.checkin .case {
  color: var(--muted);
}

.checkin .clock {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 600;
  color: var(--navy);
  margin: 14px 0 2px;
}

.checkin .since {
  color: var(--muted);
  font-size: 11px;
}

.checkin .out {
  margin-top: 14px;
  text-align: center;
  padding: 9px;
  border-radius: 9px;
  border: 1px solid #f2c4d1;
  color: var(--danger);
  font-weight: 600;
}

.phone-list {
  margin-top: 14px;
}

.phone-list p {
  margin: 0 2px 6px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.phone-row {
  display: flex;
  justify-content: space-between;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 11px;
  margin-bottom: 6px;
}

.phone-row span:last-child {
  font-family: var(--mono);
  color: var(--muted);
}

@media (max-width: 640px) {
  .plan {
    --label: 74px;
  }

  .plan-who .avatar {
    display: none;
  }

  .plan-hours span:nth-child(even) {
    color: transparent;
  }

  .job small {
    display: none;
  }

  .appr .hide-sm {
    display: none;
  }
}
