:root {
  font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  color: #1d2935;
  background: #edf1f3;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { min-width: 320px; min-height: 100vh; margin: 0; overflow-x: hidden; background: #edf1f3; letter-spacing: 0; }
button, input { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.customer-shell { width: 100%; max-width: 760px; margin: 0 auto; padding: 28px 18px 48px; }
.brand-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.brand-identity { display: flex; align-items: center; gap: 12px; }
.brand-identity strong { display: block; margin-top: 2px; font-size: 17px; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 8px; background: #18343a; color: #fff; }
.brand-mark svg { width: 22px; height: 22px; }
.eyebrow, .section-label { display: block; color: #71808d; font-size: 10px; font-weight: 750; line-height: 1.2; }
.service-state { display: flex; align-items: center; gap: 7px; color: #52616e; font-size: 12px; white-space: nowrap; }
.service-state i { width: 8px; height: 8px; border-radius: 50%; background: #17835f; box-shadow: 0 0 0 3px #d9eee7; }

.announcement { margin-bottom: 14px; padding: 13px 15px; border: 1px solid #bad0e4; border-left: 4px solid #2e6f9e; border-radius: 6px; background: #f7fbff; color: #294b64; font-size: 13px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.auth-panel, .workspace { overflow: hidden; border: 1px solid #d6dde1; border-radius: 8px; background: #fff; box-shadow: 0 12px 34px rgba(24, 52, 58, .08); }
.auth-panel { width: 100%; max-width: 520px; margin: 54px auto 0; padding: 30px; }
.auth-heading { margin-bottom: 24px; }
h1, h2, p { margin: 0; }
h1 { margin-top: 5px; font-size: 24px; line-height: 1.3; }
h2 { margin-top: 4px; font-size: 16px; line-height: 1.3; }
.auth-heading p { margin-top: 7px; color: #6c7a86; font-size: 13px; }
.field-label { display: block; margin-bottom: 7px; color: #3c4b57; font-size: 12px; font-weight: 700; }
.auth-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }
input { width: 100%; min-width: 0; height: 44px; padding: 0 13px; border: 1px solid #bdc8cf; border-radius: 6px; outline: none; color: #1d2935; background: #fff; }
input::placeholder { color: #93a0a9; }
input:focus { border-color: #267163; box-shadow: 0 0 0 3px rgba(38, 113, 99, .13); }
button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 8px; padding: 8px 15px; border: 1px solid #176b5a; border-radius: 6px; background: #176b5a; color: #fff; font-weight: 700; }
button:hover:not(:disabled) { background: #105a4b; border-color: #105a4b; }
button.secondary { border-color: #c6d0d6; background: #fff; color: #354552; }
button.secondary:hover:not(:disabled) { border-color: #8fa0aa; background: #f5f7f8; }
.error { min-height: 19px; margin-top: 10px; color: #b42318; font-size: 12px; }

.workspace { padding: 0 26px; }
.customer-header { display: flex; min-height: 112px; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid #e5e9ec; }
.customer-header h1 { font-size: 22px; }
#cardSummary { margin-top: 7px; color: #687783; font-size: 12px; line-height: 1.5; }
.icon-command { flex: 0 0 auto; }
.primary-action { width: 100%; margin: 22px 0; min-height: 46px; }

.task-area { padding: 22px 0 24px; border-top: 3px solid #d7e8e3; border-bottom: 1px solid #e5e9ec; }
.task-heading, .sms-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.status { margin-top: 4px; color: #8f5a0b; font-size: 14px; font-weight: 750; }
.status.success { color: #157653; }
.switch-countdown { min-height: 18px; color: #8f5a0b; font-size: 12px; text-align: right; }
.number-row { display: flex; min-height: 62px; align-items: center; justify-content: space-between; gap: 16px; margin: 13px 0 12px; }
.number { min-width: 0; overflow-wrap: anywhere; color: #132f35; font: 750 30px/1.2 Consolas, "Courier New", monospace; }
button.compact { min-height: 34px; padding: 6px 10px; font-size: 12px; }
.lease-countdown { display: grid; min-height: 54px; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 10px 13px; border: 1px solid #ead8b7; border-radius: 6px; background: #fffaf0; }
.lease-countdown span { color: #775727; font-size: 12px; font-weight: 650; }
.lease-countdown strong { min-width: 92px; color: #9b5e05; font-size: 23px; font-variant-numeric: tabular-nums; text-align: right; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 13px; }

.sms-panel, .history-panel { padding: 23px 0; }
.sms-panel { border-bottom: 1px solid #e5e9ec; }
.sms { min-height: 88px; margin: 13px 0 0; padding: 14px 15px; border: 1px solid #d5e5de; border-left: 4px solid #23805f; border-radius: 6px; background: #f7fbf9; color: #263d35; font: 13px/1.65 Consolas, "Courier New", monospace; white-space: pre-wrap; word-break: break-word; }
.section-heading { margin-bottom: 6px; }
.history { max-height: 320px; overflow-y: auto; }
.history-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 13px 2px; border-bottom: 1px solid #edf0f2; font-size: 12px; }
.history-item:last-child { border-bottom: 0; }
.history-item strong { min-width: 0; overflow-wrap: anywhere; color: #2b3a45; font-family: Consolas, "Courier New", monospace; }
.history-item span { grid-column: 1 / -1; color: #65747f; line-height: 1.5; overflow-wrap: anywhere; }
.history-empty { padding: 28px 0; color: #8a969e; font-size: 12px; text-align: center; }

@media (max-width: 640px) {
  html, body { width: 100%; max-width: 100%; }
  .customer-shell { width: auto; max-width: none; margin: 0 10px; padding: 16px 0 32px; }
  .announcement, .auth-panel, .workspace { width: 100%; max-width: 100%; }
  .brand-bar { padding: 0 4px; }
  .service-state { display: none; }
  .auth-panel { margin-top: 34px; padding: 22px 18px; }
  .auth-control { grid-template-columns: 1fr; }
  .auth-control button { width: 100%; }
  .workspace { padding: 0 16px; }
  .customer-header { min-height: 0; align-items: flex-start; flex-direction: column; padding: 21px 0 17px; }
  .icon-command { align-self: stretch; }
  .number-row { align-items: stretch; flex-direction: column; gap: 10px; }
  .number { font-size: 25px; text-align: center; }
  .number-row button { width: 100%; }
  .task-heading { align-items: flex-start; }
  .switch-countdown { max-width: 150px; }
  .lease-countdown strong { min-width: 78px; font-size: 20px; }
}
