:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-soft: #eef0fb;
  --text: #17182c;
  --muted: #626782;
  --line: #d9dced;
  --brand: #0000b8;
  --brand-dark: #00008c;
  --brand-soft: #eef0ff;
  --accent: #6060a8;
  --danger: #a93232;
  --success: #1f7a51;
  --shadow: 0 14px 40px rgba(0, 0, 184, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

button,
input,
textarea,
.mail-button {
  font: inherit;
}

button,
.mail-button {
  border: 0;
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  min-height: 44px;
  padding: 0 18px;
  text-decoration: none;
}

button:hover,
.mail-button:hover {
  background: var(--brand-dark);
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: #fff;
  padding: 11px 12px;
}

textarea {
  resize: vertical;
}

label {
  color: var(--muted);
  display: grid;
  gap: 7px;
  font-size: 0.88rem;
  font-weight: 650;
}

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 88px;
  padding: 18px clamp(18px, 4vw, 46px);
}

.brand-lockup {
  align-items: center;
  display: flex;
  gap: 16px;
  min-width: 0;
}

.gotec-logo {
  display: block;
  height: 48px;
  object-fit: contain;
  width: 134px;
}

.topbar h1,
.panel-heading h2,
.login-panel h2 {
  margin: 0;
}

.topbar h1 {
  font-size: clamp(1.55rem, 2vw, 2.15rem);
}

.eyebrow {
  color: var(--brand);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 4px;
  text-transform: uppercase;
}

.tracking-number {
  color: var(--muted);
  font-weight: 750;
}

.session-actions {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.logout-button {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
  min-height: 34px;
  padding: 0 12px;
}

.logout-button:hover {
  background: var(--surface-soft);
}

.topbar-meta {
  align-items: flex-end;
  display: grid;
  gap: 7px;
  justify-items: end;
}

.manufacturer-lockup {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  min-height: 38px;
}

.manufacturer-lockup img {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: block;
  height: 38px;
  object-fit: contain;
  padding: 5px;
  width: 72px;
}

.manufacturer-lockup span {
  color: var(--text);
  font-weight: 800;
  max-width: 180px;
  overflow-wrap: anywhere;
  text-align: right;
}

.login-view {
  display: grid;
  flex: 1;
  min-height: 420px;
  place-items: center;
  padding: 24px;
}

.login-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
  max-width: 430px;
  padding: 26px;
  width: min(100%, 430px);
}

.login-heading {
  align-items: center;
  display: flex;
  gap: 14px;
}

.login-icon {
  align-items: center;
  background: var(--brand-soft);
  border: 1px solid rgba(0, 0, 184, 0.18);
  border-radius: 999px;
  color: var(--brand);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 1rem;
  font-weight: 900;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.dashboard {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(260px, 340px) minmax(360px, 1fr) minmax(250px, 320px);
  padding: 20px clamp(16px, 3vw, 34px) 34px;
}

.side-panel,
.timeline-panel,
.help-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--brand-soft);
  border-radius: 8px;
  min-width: 0;
  padding: 20px;
}

.side-panel,
.help-panel {
  align-self: start;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
  opacity: 0.9;
}

.panel-heading {
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
  padding-bottom: 14px;
}

.panel-heading h2 {
  font-size: 1.15rem;
}

.device-list {
  display: grid;
  gap: 13px;
  margin: 0 0 22px;
}

.device-list div {
  border-bottom: 1px solid var(--line);
  padding-bottom: 11px;
}

.device-list dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.device-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.support-mail {
  background: rgba(238, 240, 251, 0.62);
  border-radius: 8px;
  display: grid;
  gap: 13px;
  padding: 16px;
}

.support-mail h3 {
  font-size: 1rem;
  margin: 0;
}

.support-mail p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0;
}

.timeline {
  counter-reset: step;
  display: grid;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline li {
  display: grid;
  gap: 10px;
  grid-template-columns: 28px minmax(0, 1fr);
  padding: 0 0 20px;
  position: relative;
}

.timeline li::before {
  background: var(--line);
  content: "";
  height: 100%;
  left: 13px;
  position: absolute;
  top: 24px;
  width: 2px;
}

.timeline li:last-child::before {
  display: none;
}

.timeline-marker {
  align-items: center;
  background: #fff;
  border: 2px solid var(--accent);
  border-radius: 999px;
  color: var(--brand);
  display: flex;
  font-size: 0.78rem;
  font-weight: 800;
  height: 28px;
  justify-content: center;
  position: relative;
  width: 28px;
  z-index: 1;
}

.timeline li.current .timeline-marker {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.timeline-content {
  border-bottom: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  padding: 0 0 16px;
}

.timeline li.appointment .timeline-content {
  background: linear-gradient(90deg, rgba(0, 0, 184, 0.11), rgba(96, 96, 168, 0.05));
  border: 1px solid rgba(0, 0, 184, 0.18);
  box-shadow: 0 10px 26px rgba(0, 0, 184, 0.08);
  padding: 14px 16px;
}

.timeline li.appointment .timeline-marker {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.timeline li.appointment .timeline-title {
  color: var(--brand-dark);
  font-size: 1.14rem;
}

.timeline-time {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  margin: 0 0 5px;
}

.timeline-title {
  font-size: 1.03rem;
  font-weight: 800;
  margin: 0 0 5px;
}

.timeline-description {
  color: var(--muted);
  margin: 0;
}

.help-intro {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 0;
}

.faq {
  display: grid;
  gap: 14px;
}

.faq-item {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.faq-item h3 {
  font-size: 0.98rem;
  margin: 0 0 6px;
}

.faq-item p {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0;
}

.form-message {
  color: var(--muted);
  margin: 0;
  min-height: 22px;
}

.form-message.error {
  color: var(--danger);
}

.form-message.success {
  color: var(--success);
}

.hidden {
  display: none !important;
}

.legal-footer {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.84rem;
  gap: 9px;
  justify-content: center;
  margin-top: auto;
  padding: 18px clamp(16px, 3vw, 34px) 24px;
}

.legal-footer a {
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}

.legal-footer a:hover {
  color: var(--brand);
  text-decoration: underline;
}

@media (max-width: 1080px) {
  .dashboard {
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  }

  .help-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .brand-lockup {
    align-items: flex-start;
  }

  .gotec-logo {
    height: 42px;
    width: 116px;
  }

  .topbar-meta {
    align-items: flex-start;
    justify-items: start;
    width: 100%;
  }

  .session-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .manufacturer-lockup {
    justify-content: flex-start;
  }

  .manufacturer-lockup span {
    text-align: left;
  }

  .dashboard {
    grid-template-columns: 1fr;
  }

  .side-panel,
  .timeline-panel,
  .help-panel {
    padding: 16px;
  }
}

@media (max-width: 760px) {
  body {
    background: #fff;
  }

  .topbar {
    gap: 12px;
    min-height: 0;
    padding: 12px 14px;
    position: sticky;
    top: 0;
    z-index: 5;
  }

  .brand-lockup {
    gap: 11px;
    width: 100%;
  }

  .topbar h1 {
    font-size: 1.22rem;
  }

  .topbar-meta {
    gap: 8px;
  }

  .manufacturer-lockup {
    min-height: 30px;
  }

  .manufacturer-lockup img {
    height: 30px;
    padding: 4px;
    width: 58px;
  }

  .manufacturer-lockup span,
  .tracking-number {
    font-size: 0.88rem;
  }

  .session-actions {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
  }

  .logout-button {
    min-height: 32px;
  }

  .login-view {
    min-height: 360px;
    padding: 14px;
  }

  .login-panel {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 20px 14px;
    width: 100%;
  }

  .dashboard {
    gap: 10px;
    padding: 10px 10px 24px;
  }

  .timeline-panel {
    order: 1;
  }

  .side-panel {
    order: 2;
  }

  .help-panel {
    order: 3;
  }

  .side-panel,
  .timeline-panel,
  .help-panel {
    border-left: 0;
    border-radius: 0;
    border-right: 0;
    padding: 14px 12px;
  }

  .panel-heading {
    margin-bottom: 13px;
    padding-bottom: 10px;
  }

  .panel-heading h2 {
    font-size: 1.04rem;
  }

  .timeline li {
    grid-template-columns: 24px minmax(0, 1fr);
    padding-bottom: 14px;
  }

  .timeline li::before {
    left: 11px;
    top: 22px;
  }

  .timeline-marker {
    font-size: 0.72rem;
    height: 24px;
    width: 24px;
  }

  .timeline-time {
    font-size: 0.78rem;
  }

  .timeline-title {
    font-size: 0.98rem;
  }

  .timeline-description {
    font-size: 0.9rem;
    line-height: 1.45;
  }

  .timeline li.appointment .timeline-content {
    padding: 13px;
  }

  .timeline li.appointment .timeline-title {
    font-size: 1.05rem;
  }

  .device-list {
    gap: 9px;
  }

  .device-list dt {
    font-size: 0.72rem;
  }

  .device-list dd,
  label,
  input,
  textarea,
  button {
    font-size: 0.94rem;
  }

  .support-mail {
    padding: 13px;
  }
}

body.force-mobile {
  background: #fff;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  box-shadow: 0 18px 48px rgba(23, 24, 44, 0.12);
  margin: 0 auto;
  max-width: 430px;
  min-height: 100vh;
  width: min(100%, 430px);
}

body.force-mobile .topbar {
  align-items: flex-start;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  padding: 12px 14px;
  position: sticky;
  top: 0;
  z-index: 5;
}

body.force-mobile .brand-lockup {
  align-items: flex-start;
  gap: 11px;
  width: 100%;
}

body.force-mobile .gotec-logo {
  height: 42px;
  width: 116px;
}

body.force-mobile .topbar h1 {
  font-size: 1.22rem;
}

body.force-mobile .topbar-meta {
  align-items: flex-start;
  gap: 8px;
  justify-items: start;
  width: 100%;
}

body.force-mobile .manufacturer-lockup {
  justify-content: flex-start;
  min-height: 30px;
}

body.force-mobile .manufacturer-lockup img {
  height: 30px;
  padding: 4px;
  width: 58px;
}

body.force-mobile .manufacturer-lockup span,
body.force-mobile .tracking-number {
  font-size: 0.88rem;
  text-align: left;
}

body.force-mobile .session-actions {
  align-items: center;
  flex-direction: row;
  gap: 8px;
  justify-content: space-between;
  width: 100%;
}

body.force-mobile .logout-button {
  min-height: 32px;
}

body.force-mobile .login-view {
  min-height: 360px;
  padding: 14px;
}

body.force-mobile .login-panel {
  border-left: 0;
  border-right: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 20px 14px;
  width: 100%;
}

body.force-mobile .login-heading {
  align-items: flex-start;
  gap: 12px;
}

body.force-mobile .login-icon {
  height: 38px;
  width: 38px;
}

body.force-mobile .dashboard {
  gap: 10px;
  grid-template-columns: 1fr;
  padding: 10px 10px 24px;
}

body.force-mobile .timeline-panel {
  order: 1;
}

body.force-mobile .side-panel {
  order: 2;
}

body.force-mobile .help-panel {
  order: 3;
}

body.force-mobile .side-panel,
body.force-mobile .timeline-panel,
body.force-mobile .help-panel {
  border-left: 0;
  border-radius: 0;
  border-right: 0;
  padding: 14px 12px;
}

body.force-mobile .panel-heading {
  margin-bottom: 13px;
  padding-bottom: 10px;
}

body.force-mobile .panel-heading h2 {
  font-size: 1.04rem;
}

body.force-mobile .timeline li {
  grid-template-columns: 24px minmax(0, 1fr);
  padding-bottom: 14px;
}

body.force-mobile .timeline li::before {
  left: 11px;
  top: 22px;
}

body.force-mobile .timeline-marker {
  font-size: 0.72rem;
  height: 24px;
  width: 24px;
}

body.force-mobile .timeline-time {
  font-size: 0.78rem;
}

body.force-mobile .timeline-title {
  font-size: 0.98rem;
}

body.force-mobile .timeline-description {
  font-size: 0.9rem;
  line-height: 1.45;
}

body.force-mobile .timeline li.appointment .timeline-content {
  padding: 13px;
}

body.force-mobile .timeline li.appointment .timeline-title {
  font-size: 1.05rem;
}

body.force-mobile .device-list {
  gap: 9px;
}

body.force-mobile .device-list dt {
  font-size: 0.72rem;
}

body.force-mobile .device-list dd,
body.force-mobile label,
body.force-mobile input,
body.force-mobile textarea,
body.force-mobile button {
  font-size: 0.94rem;
}

body.force-mobile .support-mail {
  padding: 13px;
}

body.force-mobile .legal-footer {
  font-size: 0.78rem;
  padding: 14px 12px 18px;
}
