:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  --background: #ffffff;
  --text: #111111;
  --muted: #6b6f76;
  --border: #dedfe2;
  --approve: #087a3b;
  --approve-hover: #056b33;
  --reject: #c91f2a;
  --reject-hover: #b71924;
  --focus: #155eef;
  --gutter: clamp(1.5rem, 6vw, 3rem);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--background);
}

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

button,
input {
  font: inherit;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.app-shell {
  width: min(100%, 43rem);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: env(safe-area-inset-top) var(--gutter) env(safe-area-inset-bottom);
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: 6.7rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
}

.brand,
.connection {
  margin: 0;
}

.brand {
  font-size: 1.05rem;
  font-weight: 760;
  letter-spacing: -0.025em;
}

.connection {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 520;
}

.connection-dot {
  width: 0.72rem;
  height: 0.72rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #9a9da3;
}

.connection[data-state="online"] {
  color: var(--text);
}

.connection[data-state="online"] .connection-dot {
  background: #07882e;
}

.approval-view,
.auth-view {
  flex: 1;
}

.approval-view {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.heading-block {
  padding: clamp(3rem, 8vh, 5.6rem) 0 clamp(2.3rem, 6vh, 4rem);
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(2.65rem, 12vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.065em;
  font-weight: 760;
}

.request-details {
  margin: 0;
}

.detail-row {
  min-height: 4.9rem;
  display: grid;
  grid-template-columns: minmax(6.5rem, 0.9fr) minmax(0, 1.65fr);
  align-items: center;
  gap: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.detail-row dt,
.detail-row dd {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
}

.detail-row dt {
  color: var(--muted);
  font-weight: 470;
}

.detail-row dd {
  font-weight: 620;
}

.detail-row-operation {
  min-height: 5.4rem;
}

.decision-status {
  margin: 2.35rem 0 0;
  font-size: clamp(1.35rem, 5vw, 1.8rem);
  font-weight: 680;
  letter-spacing: -0.025em;
}

.action-region {
  margin-top: auto;
  padding-top: 3.2rem;
}

.decision-button,
.primary-button {
  width: 100%;
  min-height: 4.75rem;
  border: 0;
  border-radius: 0.7rem;
  cursor: pointer;
  color: #ffffff;
  font-weight: 680;
  transition: background-color 140ms ease, opacity 140ms ease, transform 140ms ease;
}

.decision-button {
  font-size: 1.35rem;
}

.decision-button + .decision-button {
  margin-top: 0.9rem;
}

.approve-button,
.primary-button {
  background: var(--approve);
}

.approve-button:hover,
.primary-button:hover {
  background: var(--approve-hover);
}

.reject-button {
  background: var(--reject);
}

.reject-button:hover {
  background: var(--reject-hover);
}

.decision-button:active,
.primary-button:active {
  transform: translateY(1px);
}

.decision-button:disabled,
.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

#request-time {
  min-height: 4.6rem;
  display: flex;
  align-items: center;
  margin-top: 1.6rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.95rem;
}

.empty-state {
  margin: auto 0;
  padding: 3rem 0;
}

.empty-state h2 {
  margin: 0 0 0.65rem;
  font-size: 1.7rem;
  letter-spacing: -0.035em;
}

.empty-state p,
.supporting-copy {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.auth-view {
  padding: clamp(3rem, 8vh, 5.6rem) 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 3rem;
}

.auth-view h1 {
  margin-bottom: 1.2rem;
}

.auth-form {
  display: grid;
  gap: 0.8rem;
}

.auth-form label {
  font-size: 0.9rem;
  font-weight: 650;
}

.auth-form input {
  width: 100%;
  min-height: 3.4rem;
  padding: 0 0.9rem;
  border: 1px solid #b9bbc0;
  border-radius: 0.55rem;
  color: var(--text);
  background: var(--background);
  font-size: 1rem;
}

.primary-button {
  min-height: 3.7rem;
  margin-top: 0.35rem;
  font-size: 1rem;
}

.form-error {
  min-height: 1.4rem;
  margin: 0;
  color: var(--reject);
  font-size: 0.9rem;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(1.5rem, env(safe-area-inset-bottom));
  z-index: 10;
  width: min(calc(100% - 3rem), 34rem);
  padding: 0.8rem 1rem;
  border-radius: 0.55rem;
  background: #202124;
  color: #ffffff;
  text-align: center;
  font-size: 0.92rem;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 0.5rem);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast[data-visible="true"] {
  opacity: 1;
  transform: translate(-50%, 0);
}

[hidden] {
  display: none !important;
}

@media (min-width: 48rem) {
  body {
    background: #f3f4f5;
  }

  .app-shell {
    min-height: calc(100dvh - 4rem);
    margin-top: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
    background: var(--background);
  }
}

@media (max-height: 60rem) {
  .topbar {
    min-height: 4.8rem;
  }

  .heading-block {
    padding: 2rem 0 1.8rem;
  }

  .detail-row {
    min-height: 3.8rem;
  }

  .decision-status {
    margin-top: 1.5rem;
  }

  .action-region {
    padding-top: 2rem;
  }

  .decision-button {
    min-height: 3.8rem;
  }

  #request-time {
    min-height: 3.4rem;
    margin-top: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
