/* HomieRoom — Tenant portal */
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap");

:root {
  --tp-bg: #f0f4f8;
  --tp-surface: #ffffff;
  --tp-border: #e2e8f0;
  --tp-text: #0f172a;
  --tp-muted: #64748b;
  --tp-primary: #0d9488;
  --tp-primary-dark: #0f766e;
  --tp-primary-soft: #ccfbf1;
  --tp-accent: #0369a1;
  --tp-danger: #dc2626;
  --tp-warning: #d97706;
  --tp-success: #059669;
  --tp-radius: 14px;
  --tp-radius-sm: 10px;
  --tp-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.06);
  --tp-shadow-lg: 0 4px 6px rgba(15, 23, 42, 0.04), 0 20px 40px rgba(15, 23, 42, 0.08);
  --tp-font: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --tp-header-h: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.tp-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--tp-font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--tp-text);
  background: var(--tp-bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(13, 148, 136, 0.12), transparent),
    linear-gradient(180deg, var(--tp-bg) 0%, #e8eef4 100%);
  -webkit-font-smoothing: antialiased;
}

body.tp-body.tp-login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.tp-main {
  padding-top: 8px;
}

.tp-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px 48px;
}

/* Header */
.tp-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--tp-border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.tp-header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
  height: var(--tp-header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tp-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--tp-text);
  min-width: 0;
}

.tp-brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--tp-primary) 0%, var(--tp-accent) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.35);
}

.tp-brand-text {
  min-width: 0;
}

.tp-brand-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tp-brand-sub {
  font-size: 12px;
  color: var(--tp-muted);
  font-weight: 500;
}

.tp-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.tp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  border-radius: var(--tp-radius-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.tp-btn:active {
  transform: scale(0.98);
}

.tp-btn-primary {
  background: linear-gradient(180deg, var(--tp-primary) 0%, var(--tp-primary-dark) 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.35);
}

.tp-btn-primary:hover,
.tp-btn-primary:focus {
  color: #fff;
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.4);
}

.tp-btn-ghost {
  background: transparent;
  color: var(--tp-muted);
  border: 1px solid var(--tp-border);
}

.tp-btn-ghost:hover,
.tp-btn-ghost:focus {
  background: var(--tp-surface);
  color: var(--tp-text);
  border-color: #cbd5e1;
}

.tp-btn-lg {
  padding: 14px 24px;
  font-size: 15px;
  border-radius: var(--tp-radius-sm);
  width: 100%;
}

.tp-btn-block {
  width: 100%;
}

/* Alerts (msg helper) */
.tp-login-card .alert,
.tp-main .alert {
  border: none;
  border-radius: var(--tp-radius-sm);
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 14px;
  box-shadow: var(--tp-shadow);
}

.tp-main .alert-success {
  background: #ecfdf5;
  color: #065f46;
}

.tp-main .alert-danger {
  background: #fef2f2;
  color: #991b1b;
}

/* Cards */
.tp-card {
  background: var(--tp-surface);
  border-radius: var(--tp-radius);
  border: 1px solid var(--tp-border);
  box-shadow: var(--tp-shadow);
  overflow: hidden;
  margin-bottom: 24px;
}

.tp-card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--tp-border);
}

.tp-card-header h1,
.tp-card-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tp-card-header p {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--tp-muted);
}

.tp-card-body {
  padding: 24px;
}

/* Welcome hero */
.tp-hero {
  margin-bottom: 24px;
  padding: 28px 24px;
  background: linear-gradient(135deg, #0f766e 0%, #0369a1 100%);
  border-radius: var(--tp-radius);
  color: #fff;
  box-shadow: var(--tp-shadow-lg);
  position: relative;
  overflow: hidden;
}

.tp-hero::after {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 280px;
  height: 280px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.tp-hero h1 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  position: relative;
}

.tp-hero p {
  margin: 0;
  font-size: 14px;
  opacity: 0.9;
  position: relative;
}

/* Info grid */
.tp-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 540px) {
  .tp-grid {
    grid-template-columns: 1fr;
  }
}

.tp-stat {
  background: var(--tp-surface);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-sm);
  padding: 16px 18px;
  box-shadow: var(--tp-shadow);
}

.tp-stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--tp-muted);
  margin-bottom: 6px;
}

.tp-stat-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--tp-text);
  word-break: break-word;
}

.tp-stat-value.tp-amount {
  font-size: 22px;
  font-weight: 700;
  color: var(--tp-primary-dark);
  letter-spacing: -0.02em;
}

/* Status badges */
.tp-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.tp-status-pending {
  background: #fffbeb;
  color: #b45309;
}

.tp-status-approved {
  background: var(--tp-primary-soft);
  color: var(--tp-primary-dark);
}

.tp-status-rejected {
  background: #fef2f2;
  color: var(--tp-danger);
}

.tp-status-paid {
  background: #ecfdf5;
  color: var(--tp-success);
}

.tp-notice {
  padding: 14px 16px;
  border-radius: var(--tp-radius-sm);
  font-size: 14px;
  margin-top: 16px;
}

.tp-notice-info {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0c4a6e;
}

.tp-notice-warn {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.tp-notice-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.tp-notice-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

/* Payment methods */
.tp-pay-amount {
  text-align: center;
  padding: 20px;
  margin-bottom: 24px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: var(--tp-radius-sm);
  border: 1px dashed var(--tp-border);
}

.tp-pay-amount-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--tp-muted);
  margin-bottom: 4px;
}

.tp-pay-amount-value {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--tp-text);
}

.tp-pay-amount-value small {
  font-size: 16px;
  font-weight: 600;
  color: var(--tp-muted);
  margin-right: 4px;
}

.tp-pay-options {
  display: grid;
  gap: 14px;
}

@media (min-width: 600px) {
  .tp-pay-options {
    grid-template-columns: 1fr 1fr;
  }
}

.tp-pay-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 20px;
  background: var(--tp-surface);
  border: 2px solid var(--tp-border);
  border-radius: var(--tp-radius);
  text-decoration: none;
  color: var(--tp-text);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.tp-pay-option:hover,
.tp-pay-option:focus {
  border-color: var(--tp-primary);
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.12);
  color: var(--tp-text);
  transform: translateY(-2px);
}

.tp-pay-option-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
}

.tp-pay-option-icon.slip {
  background: linear-gradient(135deg, #0284c7, #0369a1);
}

.tp-pay-option-icon.online {
  background: linear-gradient(135deg, #059669, #047857);
}

.tp-pay-option h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.tp-pay-option p {
  margin: 0;
  font-size: 13px;
  color: var(--tp-muted);
  line-height: 1.45;
}

.tp-pay-option-arrow {
  margin-top: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--tp-primary);
}

/* Forms */
.tp-form .form-group {
  margin-bottom: 20px;
}

.tp-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--tp-text);
  margin-bottom: 8px;
}

.tp-form .form-control {
  width: 100%;
  height: auto;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 15px;
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius-sm);
  background: #fff;
  color: var(--tp-text);
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: none;
}

.tp-form .form-control:focus {
  border-color: var(--tp-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.tp-form .form-control[readonly] {
  background: #f8fafc;
  color: var(--tp-muted);
}

.tp-form input[type="file"].form-control {
  padding: 10px 12px;
  font-size: 14px;
}

.tp-form-hint {
  font-size: 13px;
  color: var(--tp-muted);
  margin-top: 6px;
}

/* Login */
.tp-login-wrap {
  width: 100%;
  max-width: 420px;
}

.tp-login-card {
  background: var(--tp-surface);
  border-radius: var(--tp-radius);
  border: 1px solid var(--tp-border);
  box-shadow: var(--tp-shadow-lg);
  padding: 36px 32px;
  text-align: center;
}

.tp-login-logo {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--tp-primary), var(--tp-accent));
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(13, 148, 136, 0.3);
}

.tp-login-card h1 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.tp-login-card .tp-login-sub {
  margin: 0 0 28px;
  font-size: 14px;
  color: var(--tp-muted);
}

.tp-login-card .tp-form {
  text-align: left;
}

.tp-login-card .alert {
  text-align: left;
  margin-bottom: 20px;
}

.tp-empty {
  text-align: center;
  padding: 32px 20px;
  color: var(--tp-muted);
}

.tp-empty i {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.4;
  display: block;
}

.tp-cta-box {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--tp-border);
  text-align: center;
}

/* Hide legacy inspinia chrome on tenant pages */
body.tp-body .wrapper.wrapper-content,
body.tp-body .ibox {
  background: transparent;
  border: none;
  box-shadow: none;
}

body.tp-body .gray-bg {
  background: transparent;
}

body.tp-body .navbar.navbar-static-top,
body.tp-body .row.border-bottom {
  display: none !important;
}
