/* ============================================
   RENT TRACKER — CUSTOM STYLES
   ============================================ */

:root {
  --brand:        #4f46e5;
  --brand-dark:   #3730a3;
  --emerald:      #10b981;
  --emerald-dark: #059669;
  --amber:        #f59e0b;
  --sky:          #0ea5e9;
  --sky-dark:     #0284c7;
  --shadow-sm:    0 1px 2px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.08);
  --shadow:       0 2px 4px rgba(0,0,0,.06), 0 4px 6px rgba(0,0,0,.05);
  --shadow-lg:    0 10px 15px rgba(0,0,0,.07), 0 4px 6px rgba(0,0,0,.05);
  --radius:       .75rem;
}

/* ---- Base ---- */
html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  position: relative;
  min-height: 100%;
}
@media (min-width: 768px) { html { font-size: 16px; } }

body {
  background: #f3f4f6;
  color: #111827;
  margin-bottom: 60px;
}

/* ---- Navbar ---- */
.navbar {
  background: var(--brand) !important;
  padding-top: .65rem;
  padding-bottom: .65rem;
  box-shadow: 0 2px 10px rgba(79,70,229,.4);
}
.navbar-brand {
  color: #fff !important;
  font-size: 1.1rem;
  letter-spacing: -.01em;
}
.nav-link {
  color: rgba(255,255,255,.85) !important;
  padding: .4rem .7rem !important;
  border-radius: .4rem;
  transition: background .15s;
}
.nav-link:hover {
  background: rgba(255,255,255,.15) !important;
  color: #fff !important;
}
.nav-link-danger { color: #fca5a5 !important; }
.nav-link-danger:hover { background: rgba(252,165,165,.15) !important; }
.navbar-toggler {
  border: 1px solid rgba(255,255,255,.4);
  padding: .3rem .55rem;
}
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255%2C255%2C255%2C.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.nav-user-divider {
  border-color: rgba(255,255,255,.2) !important;
  margin: .4rem 0 !important;
}
.nav-username { color: rgba(255,255,255,.9); font-size: .875rem; }

/* ---- Cards (global) ---- */
.card {
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-header {
  background: transparent;
  border-bottom: 1px solid rgba(0,0,0,.07);
  font-weight: 600;
  padding: .9rem 1.25rem;
}

/* ---- Stat cards ---- */
.stat-card {
  transition: transform .2s ease, box-shadow .2s ease;
  cursor: default;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.stat-card .stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}
.stat-card .stat-label {
  font-size: .75rem;
  opacity: .8;
  margin-top: .15rem;
}

/* ---- Table card wrapper ---- */
.table-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.table { margin-bottom: 0; }
.table > thead > tr > th {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 700;
  padding: .85rem 1rem;
  border-bottom-width: 1px;
  white-space: nowrap;
}
.table > tbody > tr > td {
  padding: .8rem 1rem;
  vertical-align: middle;
}
.table > tbody > tr:last-child > td { border-bottom: none; }
.row-paid { background: rgba(16,185,129,.07) !important; }

/* ---- Payment mobile cards ---- */
.payment-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid #e5e7eb;
  transition: box-shadow .15s;
  overflow: hidden;
}
.payment-card.paid {
  border-left: 4px solid var(--emerald);
}

/* ---- Badges ---- */
.badge { font-weight: 500; border-radius: .375rem; }

/* ---- Buttons ---- */
.btn { border-radius: .5rem; font-weight: 500; transition: all .15s ease; }
.btn-pay {
  background: var(--emerald);
  border-color: var(--emerald);
  color: #fff;
  white-space: nowrap;
}
.btn-pay:hover { background: var(--emerald-dark); border-color: var(--emerald-dark); color: #fff; }
.btn-outline-light { border-color: rgba(255,255,255,.55); color: rgba(255,255,255,.9); }
.btn-outline-light:hover { background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.8); }
.btn:focus, .btn:active:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(79,70,229,.2);
  outline: none;
}
.form-control:focus { border-color: rgba(79,70,229,.4); }

/* ---- Login page ---- */
.login-bg {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--brand) 0%, #7c3aed 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.login-card {
  width: 100%;
  max-width: 380px;
  border-radius: 1rem !important;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,.25) !important;
}
.login-top {
  background: linear-gradient(135deg, var(--brand) 0%, #7c3aed 100%);
  padding: 2rem 1.5rem 1.5rem;
  text-align: center;
}

/* ---- Forms ---- */
.form-control, .form-select { border-radius: .5rem; }
.form-label { font-weight: 500; font-size: .9rem; color: #374151; }

/* ---- Page header ---- */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.page-header h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0;
  color: #111827;
}

/* ---- Footer ---- */
.footer {
  font-size: .8rem;
  padding: .75rem 0;
  background: transparent;
}

/* ---- Page fade-in ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0);   }
}
main { animation: fadeUp .2s ease; }

/* ---- Clickable date text ---- */
.date-trigger {
  cursor: pointer;
  border-bottom: 1px dashed var(--emerald);
  transition: opacity .15s;
}
.date-trigger:hover { opacity: .7; }

/* ---- Misc ---- */
.text-emerald { color: var(--emerald) !important; }
.gap-icon { gap: .5rem; }
