/* DoorLoop-inspired tenant portal (light — Lato + brand pink/blue) */
@import url("https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700;900&display=swap");

:root {
  --tp-bg: #f7f8fa;
  --tp-panel: #ffffff;
  --tp-border: #e8ecf2;
  --tp-text: #162033;
  --tp-muted: #5c6b82;
  --tp-brand: #004fbd;
  --tp-gold: #c5a44d;
  --tp-gold-hover: #b89542;
  --tp-brand-soft: #e8f0ff;
  --tp-accent: #ff4998;
  --tp-accent-hover: #e63d86;
  --tp-lime: #dffe02;
  --tp-banner: #fff8e1;
  --tp-banner-text: #5d4e37;
  --tp-sidebar: #faf9fa;
  --tp-sidebar-w: 240px;
  --tp-radius: 12px;
  --tp-font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --tp-shadow: 0 1px 4px rgba(26, 21, 32, 0.06);
}

body.DoorLoop.tenant,
body.tenant.dl {
  margin: 0;
  font-family: "Lato", var(--tp-font);
  background: var(--tp-bg);
  color: var(--tp-text);
  min-height: 100vh;
}

.recaptcha-box {
  min-height: 78px;
  margin: 0.25rem 0 0.75rem;
}

.recaptcha-box.hidden {
  display: none;
}

body.tenant.dl .login-shell {
  max-width: 400px;
  margin: 4rem auto;
  padding: 2rem;
  background: var(--tp-panel);
  border-radius: var(--tp-radius);
  box-shadow: var(--tp-shadow);
  border: 1px solid var(--tp-border);
}

.tp-app {
  display: flex;
  min-height: 100vh;
}

.tp-sidebar {
  width: var(--tp-sidebar-w);
  flex-shrink: 0;
  background: var(--tp-sidebar);
  border-right: 1px solid var(--tp-border);
  padding: 1rem 0.75rem 2rem;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.tp-logo {
  font-weight: 900;
  font-size: 1.15rem;
  color: var(--tp-brand);
  padding: 0.5rem 0.75rem 1rem;
  letter-spacing: 0.04em;
}

.tp-logo span {
  color: var(--tp-accent);
}

.login-brand {
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--tp-brand);
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

.tp-nav-group {
  margin-bottom: 1rem;
}

.tp-nav-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--tp-muted);
  padding: 0.35rem 0.75rem;
  font-weight: 600;
}

.tp-nav button {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.9rem;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  color: var(--tp-text);
  cursor: pointer;
}

.tp-nav button:hover {
  background: rgba(233, 30, 99, 0.06);
}

.tp-nav button.active {
  background: var(--tp-brand-soft);
  color: var(--tp-brand);
  font-weight: 600;
}

.tp-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tp-topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--tp-border);
  background: var(--tp-panel);
}

.tp-topbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.tp-help-pill {
  font: inherit;
  border: 1px solid var(--tp-border);
  background: #fff;
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  color: var(--tp-text);
  font-size: 0.88rem;
  margin-right: auto;
}

.tp-bell {
  position: relative;
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.25rem;
}

.tp-bell-dot {
  position: absolute;
  top: 0;
  right: 0;
  width: 8px;
  height: 8px;
  background: var(--tp-accent);
  border-radius: 50%;
}

.tp-page-title {
  margin: 0 0 1rem;
  font-size: 1.35rem;
  font-weight: 700;
}

.tp-requests-panel {
  background: var(--tp-panel);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius);
  min-height: auto;
  padding: 1.25rem 1.5rem 1.5rem;
}

.tp-requests-panel:has(#requestsEmpty:not(.hidden)) {
  min-height: 420px;
}

.tp-requests-panel:has(#requestsListWrap:not(.hidden)) {
  padding-top: 1rem;
}

.tp-requests-empty {
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
  padding: 1rem 0 2rem;
}

.tp-requests-empty h2 {
  margin: 0.5rem 0;
  font-size: 1.25rem;
}

.tp-empty-sub {
  color: var(--tp-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 1.5rem;
}

.tp-empty-svg {
  width: min(280px, 90vw);
  height: auto;
  display: block;
  margin: 0 auto;
}

.tp-btn-lg {
  padding: 0.65rem 2rem;
  font-size: 0.95rem;
}

.tp-btn-block {
  width: 100%;
  margin-top: 0.5rem;
}

.tp-requests-list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  gap: 1rem;
}

.tp-requests-list-head h2 {
  margin: 0;
  font-size: 1.1rem;
}

.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tp-request-card h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.tp-request-card-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.tp-chat-fab {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: none;
  background: var(--tp-brand);
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 79, 189, 0.35);
  z-index: 20;
}

.tp-modal {
  border: none;
  border-radius: 12px;
  padding: 0;
  max-width: 560px;
  width: calc(100% - 2rem);
  max-height: min(92vh, 920px);
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(22, 32, 51, 0.18);
}

.tp-modal::backdrop {
  background: rgba(22, 32, 51, 0.45);
}

.tp-modal-form {
  display: flex;
  flex-direction: column;
  max-height: min(92vh, 920px);
  min-height: 0;
  overflow: hidden;
}

.tp-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--tp-border);
}

.tp-modal-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.tp-modal-close {
  border: none;
  background: transparent;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  color: var(--tp-muted);
}

.tp-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 1.15rem 1.5rem 1.25rem;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.tp-modal-section-title {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.tp-modal-rule {
  border: none;
  border-top: 1px solid var(--tp-border);
  margin: 1.25rem 0;
}

.tp-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--tp-text);
}

.tp-field input,
.tp-field select,
.tp-field textarea {
  font-weight: 400;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--tp-border);
  border-radius: 8px;
  font: inherit;
}

.tp-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 520px) {
  .tp-field-grid {
    grid-template-columns: 1fr;
  }
}

.tp-field-caption {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  white-space: nowrap;
  line-height: 1.3;
}

.tp-field .req {
  color: #c62828;
  font-weight: 700;
}

.tp-toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-weight: 400;
  font-size: 0.88rem;
  color: var(--tp-muted);
}

.tp-toggle-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.tp-toggle-ui {
  flex-shrink: 0;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #d0d5de;
  position: relative;
  margin-top: 2px;
}

.tp-toggle-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s ease;
}

.tp-toggle-input:checked + .tp-toggle-ui {
  background: var(--tp-brand);
}

.tp-toggle-input:checked + .tp-toggle-ui::after {
  transform: translateX(20px);
}

.tp-info-banner {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  background: #eef4fc;
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  font-size: 0.85rem;
  color: var(--tp-brand);
  margin-bottom: 0.75rem;
}

.tp-upload-zone {
  border: 2px dashed #c5d0e0;
  border-radius: 10px;
  padding: 1.25rem;
  text-align: center;
  color: var(--tp-muted);
  font-size: 0.88rem;
}

.tp-upload-zone p {
  margin: 0.35rem 0;
}

.tp-upload-meta {
  font-size: 0.75rem !important;
}

.tp-upload-interactive {
  cursor: pointer;
}

.tp-upload-interactive.tp-upload-drag {
  border-color: var(--tp-brand);
  background: var(--tp-brand-soft);
}

.tp-upload-disabled {
  opacity: 0.55;
  pointer-events: none;
  cursor: not-allowed;
}

.tp-file-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  border: 1px solid var(--tp-border);
  border-radius: 8px;
  overflow: hidden;
}

.tp-file-list.hidden {
  display: none;
}

.tp-file-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--tp-border);
}

.tp-file-item:last-child {
  border-bottom: none;
}

.tp-file-item a {
  color: var(--tp-brand);
  font-weight: 600;
  text-decoration: none;
}

.tp-file-item a:hover {
  text-decoration: underline;
}

.tp-upload-error {
  margin: 0.65rem 0 0;
  font-size: 0.85rem;
  line-height: 1.4;
}

.tp-upload-error[hidden] {
  display: none;
}

.tp-upload-success {
  margin: 0.65rem 0 0;
  font-size: 0.85rem;
  line-height: 1.4;
  color: #0d7a3e;
  font-weight: 600;
}

.tp-upload-success[hidden] {
  display: none;
}

.tp-upload-interactive.tp-upload-busy {
  opacity: 0.65;
  pointer-events: none;
}

.tp-file-item-main {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.tp-file-item-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tp-file-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--tp-border);
  flex-shrink: 0;
}

.tp-file-status {
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--tp-muted);
}

.tp-file-status--queued {
  color: var(--tp-muted);
}

.tp-file-status--uploading {
  color: var(--tp-brand);
}

.tp-file-status--uploaded {
  color: #0d7a3e;
}

.tp-file-status--uploaded::before {
  content: "✓ ";
}

.tp-file-status--failed {
  color: #c0392b;
}

.tp-modal-foot {
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem 1.15rem;
  border-top: 1px solid var(--tp-border);
  background: var(--tp-panel);
}

.tp-btn-outline {
  background: #fff;
  border: 2px solid var(--tp-brand);
  color: var(--tp-brand);
  border-radius: 999px;
  padding: 0.55rem 1.25rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.tp-success-modal {
  padding: 2rem 1.5rem 1.5rem;
  text-align: center;
  max-width: 440px;
  max-height: none;
  overflow: visible;
  position: relative;
}

.tp-success-modal > .tp-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
}

.tp-success-title {
  margin: 0.5rem 0 0.75rem;
  font-size: 1.2rem;
}

.tp-success-sub {
  color: var(--tp-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 1.25rem;
}

.tp-success-svg {
  width: 200px;
  height: auto;
  margin: 0 auto;
  display: block;
}

.tp-pay-promo {
  text-align: left;
  border: 1px solid var(--tp-border);
  border-radius: 12px;
  padding: 1.15rem 1.25rem;
  background: #fafbfc;
}

.tp-pay-promo h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.tp-pay-promo p {
  margin: 0 0 0.75rem;
  color: var(--tp-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.tp-content {
  padding: 1.5rem 1.75rem 3rem;
  flex: 1;
}

.tp-banner {
  background: var(--tp-banner);
  color: var(--tp-banner-text);
  font-size: 0.85rem;
  padding: 0.5rem 1.5rem;
  text-align: center;
  border-bottom: 1px solid #f0e6c8;
}

.tp-hero {
  margin-bottom: 1.5rem;
}

.tp-hero h1 {
  margin: 0 0 0.25rem;
  font-size: 1.75rem;
  font-weight: 700;
}

.tp-hero .addr {
  color: var(--tp-muted);
  font-size: 0.95rem;
}

.tp-grid-home {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 320px);
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 900px) {
  .tp-grid-home {
    grid-template-columns: 1fr;
  }
  .tp-sidebar {
    display: none;
  }
}

.tp-card {
  background: var(--tp-panel);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius);
  box-shadow: var(--tp-shadow);
  padding: 1.25rem 1.5rem;
}

.tp-card h2,
.tp-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}

.tp-balance {
  text-align: center;
  padding: 2rem 1.5rem 1.5rem;
}

.tp-balance .amount {
  font-size: 2.75rem;
  font-weight: 300;
  margin: 0.5rem 0;
}

.tp-balance .label {
  color: var(--tp-muted);
  font-size: 0.95rem;
}

.tp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.25rem;
}

.tp-btn {
  font: inherit;
  padding: 0.55rem 1.25rem;
  border-radius: 999px;
  border: 2px solid var(--tp-accent);
  background: transparent;
  color: var(--tp-accent);
  font-weight: 600;
  cursor: pointer;
}

.tp-btn.primary:not(:disabled) {
  background: var(--tp-gold);
  color: var(--tp-ink, #1e2a12);
  border-color: var(--tp-gold);
}

.tp-btn.primary:not(:disabled):hover {
  background: var(--tp-gold-hover);
  border-color: var(--tp-gold-hover);
}

.tp-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.tp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.tp-table th {
  text-align: left;
  color: var(--tp-muted);
  font-weight: 600;
  padding: 0.5rem 0.35rem;
  border-bottom: 1px solid var(--tp-border);
}

.tp-table td {
  padding: 0.65rem 0.35rem;
  border-bottom: 1px solid var(--tp-border);
}

.tp-table tr:last-child td {
  border-bottom: none;
}

.tp-link {
  color: var(--tp-accent);
  font-size: 0.88rem;
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}

.tp-promo {
  background: linear-gradient(135deg, #fff5f8 0%, #fff 60%);
  text-align: center;
}

.tp-promo .icon {
  font-size: 2.5rem;
  margin: 0.5rem 0;
}

.tp-page {
  display: none;
}

.tp-page.active {
  display: block;
}

.tp-stack label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
  font-size: 0.9rem;
}

.tp-stack input,
.tp-stack textarea,
.tp-stack select {
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--tp-border);
  border-radius: 8px;
  font: inherit;
}

.ticket-list article {
  margin-bottom: 0.75rem;
}

.status-pill {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: var(--tp-brand-soft);
  color: var(--tp-brand);
  font-weight: 600;
}

.hint {
  color: var(--tp-muted);
  font-size: 0.9rem;
}

.error {
  color: #c62828;
  font-size: 0.9rem;
}

.hidden {
  display: none !important;
}

.btn.primary {
  background: var(--tp-gold);
  color: var(--tp-ink, #1e2a12);
  border: none;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
}

.btn.primary:hover {
  background: var(--tp-gold-hover);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.lease-dl {
  display: grid;
  gap: 0.65rem;
  font-size: 0.95rem;
}

.lease-dl div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--tp-border);
}

.lease-dl dt {
  color: var(--tp-muted);
  margin: 0;
}

.lease-dl dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.tp-requests-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.tp-requests-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  flex: 1;
  min-width: 200px;
}

.tp-search-wrap input {
  min-width: min(280px, 100%);
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--tp-border);
  border-radius: 8px;
  font: inherit;
}

.tp-filter-btn,
.tp-period-pill {
  font: inherit;
  font-size: 0.85rem;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--tp-border);
  background: #fff;
  color: var(--tp-text);
}

.tp-period-pill {
  color: var(--tp-muted);
}

.tp-requests-table-wrap {
  overflow: visible;
}

.tp-requests-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.tp-requests-table th {
  text-align: left;
  color: var(--tp-muted);
  font-weight: 600;
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid var(--tp-border);
  white-space: nowrap;
}

.tp-requests-table td {
  padding: 0.85rem 0.5rem;
  border-bottom: 1px solid var(--tp-border);
  vertical-align: middle;
}

.tp-req-row {
  cursor: pointer;
}

.tp-req-row:hover {
  background: #f8f9fc;
}

.tp-req-name .hint {
  font-size: 0.8rem;
  font-weight: 400;
}

.tp-th-actions,
.tp-td-actions {
  width: 3rem;
  text-align: right;
  position: relative;
}

.dl-kebab {
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--tp-muted);
}

.dl-kebab:hover {
  background: #f0f4fa;
  color: var(--tp-text);
}

.dl-prop-actions {
  position: relative;
  display: inline-flex;
}

.dl-prop-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 180px;
  background: var(--tp-panel);
  border: 1px solid var(--tp-border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(24, 41, 66, 0.12);
  padding: 0.35rem;
  z-index: 30;
}

.dl-prop-menu button {
  display: flex;
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}

.dl-prop-menu button:hover {
  background: #f0f4fa;
}

.dl-prop-menu button.danger {
  color: #c62828;
}

.tp-modal-wide {
  max-width: min(900px, 96vw);
  width: min(900px, 96vw);
}

.tp-modal-head {
  flex-shrink: 0;
  background: var(--tp-panel);
}

.tp-access-instructions-wrap {
  margin-top: 0.75rem;
}

.tp-char-count {
  margin: -0.5rem 0 0;
  text-align: right;
  font-size: 0.78rem;
  color: var(--tp-muted);
}

.tp-activity-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tp-comment-row {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--tp-border);
}

.tp-comment-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0;
  font-weight: 600;
  font-size: 0.88rem;
}

.tp-comment-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.tp-comment-field textarea {
  font-weight: 400;
  width: 100%;
  box-sizing: border-box;
  min-height: 4.5rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--tp-border);
  border-radius: 8px;
  font: inherit;
  resize: vertical;
}

.tp-comment-send {
  flex-shrink: 0;
  margin-bottom: 0.2rem;
  min-width: 6.5rem;
}

.tp-feed-item {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--tp-border);
}

.tp-feed-item:last-child {
  border-bottom: none;
}

.tp-feed-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.tp-feed-item p {
  margin: 0;
  font-size: 0.88rem;
}