:root {
  --text-light: #ffffff;
  --text-dark: #111827;
  --footer: #dddddd;
  --button-bg: #000000;
  --button-text: #ffffff;
  --modal-backdrop: rgba(0, 0, 0, 0.5);
  --modal-surface: #ffffff;
  --toast-error: #dc2626;
  --toast-success: #16a34a;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body.page-home {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  color: var(--text-dark);
  background: radial-gradient(
    circle at top,
    #eef6ff 0%,
    #e0edf9 35%,
    #cadff2 100%
  );
}

.home-logo {
  width: min(30vh, 280px);
  height: min(30vh, 280px);
}

.home-title {
  margin: 16px 0 8px;
  font-size: clamp(1.5rem, 3vw, 2.6rem);
}

.home-subtitle {
  margin: 0;
  color: #4b5563;
  font-size: 1rem;
}

.page-tenant {
  min-height: 100vh;
  width: 100%;
  margin: 0;
  color: var(--text-light);
}

.tenant-wrap {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px 12px;
}

.tenant-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.branding-image {
  object-fit: contain;
}

.branding-card {
  padding: 16px;
  border-radius: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  background: #ffffff;
  height: 16rem;
  width: 16rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.branding-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.app-row {
  display: flex;
  align-items: center;
  gap: 24px;
}

.app-logo {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
}

.app-title {
  margin: 0;
  font-size: clamp(2rem, 7vw, 3.5rem);
  line-height: 1;
}

.install-btn {
  border: none;
  border-radius: 10px;
  background: var(--button-bg);
  color: var(--button-text);
  height: 5rem;
  min-width: 16rem;
  padding: 0 24px;
  cursor: pointer;
}

.install-btn-content {
  display: flex;
  align-items: center;
  gap: 24px;
}

.apple-logo {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
}

.install-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.install-os {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.install-updated {
  margin: 0;
  font-size: 0.8rem;
}

.footer {
  color: var(--footer);
  margin: 8px 0;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--modal-backdrop);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 10;
}

.modal-backdrop.is-open {
  display: flex;
}

.modal {
  width: min(420px, 100%);
  background: var(--modal-surface);
  border-radius: 12px;
  padding: 16px;
  color: var(--text-dark);
}

.modal h2 {
  margin: 0 0 12px;
}

.modal input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px;
  font-size: 1rem;
}

.modal-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.modal-actions button {
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
}

.modal-cancel {
  background: #e5e7eb;
}

.modal-send {
  background: #2563eb;
  color: #ffffff;
}

.toast {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 14px;
  border-radius: 8px;
  color: #ffffff;
  font-weight: 600;
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.toast.show {
  opacity: 1;
}

.toast.error {
  background: var(--toast-error);
}

.toast.success {
  background: var(--toast-success);
}

@media (max-width: 640px) {
  .tenant-main {
    gap: 20px;
  }

  .app-row {
    gap: 14px;
  }

  .install-btn {
    min-width: 14rem;
    height: 4.5rem;
    padding: 0 16px;
  }

  .apple-logo {
    width: 3rem;
    height: 3rem;
  }
}
