/* ─────────────────────────────────────────────────────────────────────────────
   LeaseSentry — assets/css/app.css
   Bootstrap 5.3 overrides + sidebar layout
   ───────────────────────────────────────────────────────────────────────────── */

:root {
  --ls-primary:    #1a3a5c;
  --ls-primary-dk: #112640;
  --ls-accent:     #2980b9;
  --ls-sidebar-w:  230px;
  --ls-topbar-h:   56px;
}

/* ── Layout ─────────────────────────────────────────────────────────────────── */

body { background: #f0f4f8; font-size: 14px; }

.ls-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--ls-sidebar-w);
  background: var(--ls-primary);
  display: flex; flex-direction: column;
  z-index: 1040;
  transition: transform .25s ease;
}

.ls-main {
  margin-left: var(--ls-sidebar-w);
  min-height: 100vh;
  display: flex; flex-direction: column;
}

.ls-topbar {
  height: var(--ls-topbar-h);
  background: #fff;
  border-bottom: 1px solid #dee2e6;
  padding: 0 1.5rem;
  position: sticky; top: 0; z-index: 100;
}

.ls-content { padding: 1.5rem; flex: 1; }

/* ── Sidebar logo + nav ──────────────────────────────────────────────────────── */

.ls-logo {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.ls-logo-text {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .5px;
}

.ls-nav { flex: 1; overflow-y: auto; padding: .5rem 0; }

.ls-nav-item {
  display: flex; align-items: center; gap: .65rem;
  padding: .55rem 1.25rem;
  color: rgba(255,255,255,.78);
  text-decoration: none;
  font-size: 13.5px;
  transition: background .15s, color .15s;
  border-left: 3px solid transparent;
}

.ls-nav-item:hover  { background: rgba(255,255,255,.08); color: #fff; }
.ls-nav-item.active { background: rgba(255,255,255,.12); color: #fff; border-left-color: #5dade2; }
.ls-nav-item .bi    { font-size: 15px; opacity: .85; }

.ls-sidebar-footer {
  padding: .75rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,.12);
  display: flex; align-items: center; gap: .5rem;
  font-size: 12px; color: rgba(255,255,255,.6);
}

/* ── Cards ──────────────────────────────────────────────────────────────────── */

.ls-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

.ls-stat-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  display: flex; align-items: flex-start; gap: 1rem;
}

.ls-stat-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}

.ls-stat-value { font-size: 28px; font-weight: 700; line-height: 1; color: #1e293b; }
.ls-stat-label { font-size: 12px; color: #64748b; margin-top: 3px; }

/* ── Vacancy board ──────────────────────────────────────────────────────────── */

.ls-unit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .75rem; }

.ls-unit-tile {
  border-radius: 8px; padding: .85rem;
  border: 1px solid #e2e8f0;
  cursor: pointer; transition: transform .15s, box-shadow .15s;
  text-decoration: none; color: inherit;
}
.ls-unit-tile:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.1); }

.ls-unit-tile.vacant     { background: #f0fdf4; border-color: #86efac; }
.ls-unit-tile.occupied   { background: #eff6ff; border-color: #93c5fd; }
.ls-unit-tile.maintenance{ background: #fffbeb; border-color: #fcd34d; }
.ls-unit-tile.unavailable{ background: #f8fafc; border-color: #cbd5e1; }

.ls-unit-number { font-size: 17px; font-weight: 700; }
.ls-unit-meta   { font-size: 11px; color: #64748b; margin-top: 2px; }
.ls-unit-rent   { font-size: 13px; font-weight: 600; margin-top: 4px; }

/* ── Tables ──────────────────────────────────────────────────────────────────── */

.ls-table { width: 100%; font-size: 13.5px; }
.ls-table th { background: #f8fafc; font-weight: 600; color: #475569; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; white-space: nowrap; }
.ls-table td { vertical-align: middle; }
.ls-table tbody tr:hover { background: #f8fafc; }

/* ── Renewal timeline ────────────────────────────────────────────────────────── */

.renewal-bar { height: 6px; border-radius: 3px; background: #e2e8f0; overflow: hidden; }
.renewal-bar-fill { height: 100%; border-radius: 3px; }

/* ── Portal (renter-facing) ──────────────────────────────────────────────────── */

.portal-wrap { max-width: 520px; margin: 0 auto; padding: 1.5rem; }
.portal-header { background: var(--ls-primary); color: #fff; padding: 1.25rem 1.5rem; border-radius: 12px 12px 0 0; }
.portal-card { background: #fff; border-radius: 0 0 12px 12px; border: 1px solid #e2e8f0; border-top: none; padding: 1.5rem; }
.portal-section { border-top: 1px solid #f1f5f9; padding-top: 1.25rem; margin-top: 1.25rem; }

/* ── Responsive: collapse sidebar on mobile ──────────────────────────────────── */

@media (max-width: 991px) {
  .ls-sidebar { transform: translateX(-100%); }
  .ls-sidebar.open { transform: translateX(0); }
  .ls-main { margin-left: 0; }
  .ls-topbar { position: sticky; top: 0; }
}

/* ── Utilities ──────────────────────────────────────────────────────────────── */

.btn-primary    { background: var(--ls-primary);    border-color: var(--ls-primary); }
.btn-primary:hover { background: var(--ls-primary-dk); border-color: var(--ls-primary-dk); }
.text-primary   { color: var(--ls-primary) !important; }
.bg-ls-primary  { background: var(--ls-primary) !important; }

.badge-vacant      { background: #dcfce7; color: #166534; }
.badge-occupied    { background: #dbeafe; color: #1e40af; }
.badge-maintenance { background: #fef9c3; color: #854d0e; }

.cursor-pointer { cursor: pointer; }
.fs-13 { font-size: 13px; }
.fs-12 { font-size: 12px; }
