/* ===== Base & Typography ===== */

html {
  scroll-behavior: smooth;
}

body, html {
  height: 100%;
}

body {
  font-family: 'Mulish', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.95rem;
  color: #2d3436;
  background-color: #f5f6fa;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Mulish', sans-serif;
  font-weight: 700;
  color: #464130;
}

.font-accent {
  font-family: 'Ovo', serif;
}

a {
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

/* ===== Navbar ===== */

.navbar-app {
  background: linear-gradient(135deg, #464130 0%, #70653A 50%, #9B8737 100%);
  box-shadow: 0 2px 16px rgba(0,0,0,0.15);
  padding: 0.5rem 0;
}

.navbar-app .navbar-brand {
  font-family: 'Mulish', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  color: #EFBF04 !important;
  letter-spacing: -0.5px;
}

.navbar-app .navbar-brand i {
  color: #EFBF04;
}

.navbar-app .nav-link {
  color: rgba(255,255,255,0.8) !important;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 0.85rem !important;
  border-radius: 8px;
  transition: all 0.2s ease;
}

/* Search box placeholder */
.navbar-app input[type="search"]::placeholder {
  color: rgba(255,255,255,0.5);
}
.navbar-app input[type="search"]:focus {
  border-color: rgba(255,255,255,0.8) !important;
  box-shadow: 0 0 0 0.15rem rgba(255,255,255,0.15);
}

.navbar-app .nav-link:hover,
.navbar-app .nav-link:focus {
  color: #fff !important;
  background-color: rgba(255,255,255,0.1);
}

.navbar-app .nav-link.active {
  color: #fff !important;
  background-color: rgba(255,255,255,0.15);
}

.navbar-app .user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #EFBF04;
  color: #464130;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  margin-right: 0.4rem;
}

.navbar-app .dropdown-menu {
  border: none;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
  border-radius: 10px;
  padding: 0.5rem;
  margin-top: 0.5rem;
}

.navbar-app .dropdown-item {
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
}

.navbar-app .dropdown-item:hover {
  background-color: #f5f6fa;
}

/* ===== Main Content ===== */

.main-content {
  flex: 1;
}

/* ===== Footer ===== */

.footer-app {
  background: #1a1a1a;
  color: rgba(255,255,255,0.75);
  font-size: 0.875rem;
}

.footer-app h5 {
  color: #EFBF04;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-app a {
  color: rgba(255,255,255,0.7);
  transition: color 0.2s ease;
}

.footer-app a:hover {
  color: #EFBF04;
}

.footer-app hr {
  border-color: rgba(255,255,255,0.15);
}

/* ===== Hero ===== */

.hero-image {
  background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("/static/img/alexandr-bormotin-jj3PpeBIlLA-unsplash.jpg");
  height: 50%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
}

.hero-text {
  text-align: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
}

.bg {
  background-image: url("/static/img/alexandr-bormotin-jj3PpeBIlLA-unsplash.jpg");
  height: 50%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* ===== Maps ===== */

#map {
  width: 100%;
  height: 400px;
  max-width: 100%;
  border: 1px solid #dee2e6;
  border-radius: 10px;
}

/* ===== Calculation Cards ===== */

.calc-card .card-header {
  font-weight: 700;
  font-size: 1.35rem;
  background-color: #f8f9fa;
}

.calc-card .input-group-text {
  font-size: 0.875rem;
  min-width: 60px;
}

.calc-result-highlight {
  background-color: #e8f5e9 !important;
  font-weight: 700;
}

/* ===== Stat Cards ===== */

.stat-card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.stat-card .stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  font-family: 'Mulish', sans-serif;
  line-height: 1.2;
}

.stat-card .stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6c757d;
}

/* ===== Property Cards ===== */

.prop-card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.prop-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.prop-card .card-img-top {
  height: 180px;
  object-fit: cover;
}

/* ===== List Cards ===== */

.list-card {
  border: none;
  border-radius: 12px;
  border-top: 4px solid #dee2e6;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.list-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.list-card.list-card-offer {
  border-top-color: #055AF0;
}

.list-card.list-card-inventory {
  border-top-color: #198754;
}

.list-card .list-card-count {
  font-size: 2rem;
  font-weight: 700;
  font-family: 'Mulish', sans-serif;
  color: #464130;
}

/* ===== Section Headings ===== */

.section-heading {
  font-family: 'Mulish', sans-serif;
  font-weight: 700;
  color: #464130;
}

/* ===== Empty State ===== */

.empty-state {
  padding: 3rem 1rem;
  text-align: center;
  color: #6c757d;
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.4;
}

/* ===== Type Selector ===== */

.type-selector .type-option {
  cursor: pointer;
  border: 2px solid #dee2e6;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.2s ease;
}

.type-selector .type-option:hover {
  border-color: #adb5bd;
  background-color: #f8f9fa;
}

.type-selector .type-option.active {
  border-color: #055AF0;
  background-color: #e7f1ff;
}

.type-selector .type-option.active.type-inventory {
  border-color: #198754;
  background-color: #d1e7dd;
}

.type-selector .type-option i {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

/* ===== Nav Pills ===== */

.nav-pills-custom .nav-link {
  color: #495057;
  border-radius: 20px;
  padding: 0.4rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-pills-custom .nav-link.active {
  background-color: #373C9B;
  color: #fff;
}

/* ===== Django Messages / Toasts ===== */

.toast-container {
  z-index: 1090;
}

/* ===== Cards General ===== */

.card {
  border-radius: 10px;
}

/* ===== Deactivated / Delisted Properties ===== */

.prop-card-deactivated {
  opacity: 0.6;
  filter: grayscale(40%);
}

.prop-card-deactivated:hover {
  opacity: 0.85;
  filter: grayscale(0%);
}

.prop-card-deactivated .card-title {
  text-decoration: line-through;
  color: #6c757d;
}

/* ===== Responsive ===== */

@media (max-width: 767.98px) {
  .navbar-app .navbar-brand {
    font-size: 1.15rem;
  }

  .stat-card .stat-value {
    font-size: 1.35rem;
  }

  .prop-card .card-img-top {
    height: 150px;
  }
}

/* ===== Wizard Steps ===== */

.wiz-step {
  flex: 1;
  text-align: center;
  padding: 0.6rem 0.25rem;
  font-size: 0.8rem;
  color: #adb5bd;
  border-bottom: 3px solid #dee2e6;
  transition: all 0.2s;
}
.wiz-step.active {
  color: #464130;
  font-weight: 600;
  border-bottom-color: #EFBF04;
}
.wiz-step.done {
  color: #198754;
  border-bottom-color: #198754;
}
.wiz-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #dee2e6;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  margin-right: 0.3rem;
}
.wiz-step.active .wiz-num { background: #EFBF04; color: #464130; }
.wiz-step.done .wiz-num { background: #198754; }

/* ===== Error Pages (404, 500, 403, 400) ===== */

.error-page {
  padding: 3rem 1rem;
}
.error-page .error-icon {
  font-size: 4rem;
  line-height: 1;
}
.error-page .error-code {
  font-size: 5rem;
  font-weight: 800;
  line-height: 1;
  font-family: 'Ovo', serif;
  letter-spacing: -0.03em;
}
@media (max-width: 576px) {
  .error-page .error-code { font-size: 3.5rem; }
  .error-page .error-icon { font-size: 3rem; }
}

/* Allow <form> to wrap table cells without breaking the layout */
.d-contents { display: contents; }

/* ===== Social Login Buttons ===== */

.social-divider {
  position: relative;
  text-align: center;
  color: #adb5bd;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.social-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #dee2e6;
  z-index: 0;
}
.social-divider span {
  position: relative;
  background: #fff;
  padding: 0 14px;
  z-index: 1;
}

.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  font-weight: 500;
  font-size: 0.95rem;
  background: #fff;
  color: #3c4043;
  border: 1px solid #dadce0;
  border-radius: 8px;
  transition: all 0.15s ease;
  text-decoration: none;
}
.btn-social i {
  font-size: 1.15rem;
  width: 20px;
  text-align: center;
}
.btn-social:hover {
  background: #f8f9fa;
  color: #3c4043;
  border-color: #c1c4c9;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}
.btn-social:active {
  transform: translateY(0);
}

/* Brand-colored icons on neutral buttons */
.icon-google {
  background: linear-gradient(45deg, #4285F4 0%, #4285F4 25%, #34A853 25%, #34A853 50%, #FBBC04 50%, #FBBC04 75%, #EA4335 75%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.icon-facebook  { color: #1877F2; }
.icon-linkedin  { color: #0A66C2; }
.icon-microsoft { color: #2F2F2F; }
.icon-apple     { color: #000000; }

/* Strip bullets from any stray Django form errorlists */
ul.errorlist {
  list-style: none;
  padding-left: 0;
  margin: 0.25rem 0 0;
}
ul.errorlist li {
  color: #dc3545;
  font-size: 0.85rem;
}
ul.errorlist li::before {
  content: "\f06a";
  font-family: "Font Awesome 6 Free", "Font Awesome 5 Free";
  font-weight: 900;
  margin-right: 0.4rem;
  font-size: 0.8rem;
}

/* Alert inside login/2FA cards — tighter look */
.card .alert {
  border-radius: 8px;
  border: none;
  background: #fef0f0;
}
.card .alert.alert-danger { color: #c92a2a; }
.card .alert.alert-warning { background: #fff8e1; color: #8a6d1a; }
.card .alert.alert-info { background: #e7f5ff; color: #0b6ca8; }
