@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css");

@tailwind base;
@tailwind components;
@tailwind utilities;

/* ═══════════════════════════════════════════════════════════ */
/* Color Scheme & Variables                                    */
/* ═══════════════════════════════════════════════════════════ */
:root {
  --primary: linear-gradient(135deg, #21317a 0%, #42219c 100%);
  --primary-dark: #4c3a6d;
  --primary-light: #f3f0ff;
  --accent: #5714d1;
  --accent-light: #883ddd;

  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;

  --text: #1f2937;
  --text-muted: #6b7280;
  --bg: #ffffff;
  --bg-alt: #f9fafb;
  --bg-card: #f3f4f6;
  --border: #e5e7eb;
  --border-light: #f3f4f6;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, .05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, .1);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, .1);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, .1);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, .25);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Monaco', 'Courier New', monospace;
}

/* ═══════════════════════════════════════════════════════════ */
/* Reset & Base                                                */
/* ═══════════════════════════════════════════════════════════ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.75rem;
}

h4 {
  font-size: 1.5rem;
}

h5 {
  font-size: 1.25rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--primary-dark);
  text-decoration: none;
  transition: color .2s;
}

a:hover {
  color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════ */
/* Layout Helpers                                              */
/* ═══════════════════════════════════════════════════════════ */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-sm {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

/* ═══════════════════════════════════════════════════════════ */
/* Navbar                                                      */
/* ═══════════════════════════════════════════════════════════ */

/* ✅ FIX: The wrapper is sticky AND relative.
   The mobile panel is absolute inside this wrapper,
   so it drops down correctly and scrolls away with the page. */
.navbar-wrapper {
  position: sticky;
  top: 0;
  z-index: 1000;
  /* position: relative is implied by sticky — children can anchor to it */
}

.navbar {
  background: var(--primary);
  color: #fff;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-md);
  /* ✅ FIX: No position here — .navbar-wrapper handles stacking */
}

.navbar-brand {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.navbar-brand:hover {
  opacity: 0.9;
  color: #fff;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 1.5rem;
}

.nav-link {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 0.375rem;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0.75rem;
  right: 0.75rem;
  height: 3px;
  background: var(--accent);
  border-radius: 3px;
}

.navbar-end {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
  flex-shrink: 0;
}

/* Hamburger — hidden on desktop */
.navbar-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-left: auto;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: 0.5rem;
  transition: background 0.2s;
  flex-shrink: 0;
}

.navbar-menu-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ✅ FIX: Mobile panel — absolute inside .navbar-wrapper (which is sticky+relative).
   This means it drops below the navbar and stays attached while scrolling. */
.navbar-mobile-panel {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 64px;
  /* height of the desktop navbar */
  left: 0;
  right: 0;
  background: var(--primary-dark);
  box-shadow: var(--shadow-lg);
  z-index: 999;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-mobile-panel.open {
  display: flex;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.5rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  font-weight: 500;
  font-family: var(--font);
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background 0.2s;
}

.mobile-nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.mobile-nav-link.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.mobile-nav-link.accent {
  color: var(--accent);
  font-weight: 700;
}

.mobile-nav-link.danger {
  color: #fca5a5;
}

.mobile-nav-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0.25rem 0;
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--bg);
  border-radius: 0.5rem;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  min-width: 200px;
  display: none;
  overflow: hidden;
  z-index: 1001;
}

.dropdown-menu.open {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s;
  border: none;
  background: none;
  font-size: 0.92rem;
  font-family: var(--font);
  width: 100%;
  text-align: left;
  text-decoration: none;
}

.dropdown-item:hover {
  background: var(--bg-card);
}

.dropdown-item.danger {
  color: var(--danger);
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 0.25rem 0;
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .navbar {
    height: 56px;
    padding: 0 1rem;
  }

  .navbar-nav {
    display: none !important;
  }

  .navbar-end {
    display: none !important;
  }

  .navbar-menu-btn {
    display: flex;
  }

  /* ✅ FIX: Match panel top offset to the smaller mobile navbar height */
  .navbar-mobile-panel {
    top: 56px;
  }
}

/* ═══════════════════════════════════════════════════════════ */
/* Buttons                                                     */
/* ═══════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 1.5rem;
  border-radius: .5rem;
  font-weight: 600;
  font-size: .95rem;
  transition: all .3s;
  cursor: pointer;
  border: 2px solid transparent;
  white-space: nowrap;
  text-decoration: none;
  font-family: var(--font);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  color: #fff;
}

.btn-accent:hover {
  box-shadow: 0 0 20px rgba(249, 115, 22, .4);
  color: #fff;
}

.btn-outline {
  border-color: var(--text);
  color: var(--text);
  background: transparent;
}

.btn-outline:hover {
  background: var(--bg-card);
}

.btn-outline-light {
  border-color: rgba(255, 255, 255, .4);
  color: #fff;
  background: transparent;
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, .1);
  color: #fff;
}

.btn-ghost {
  color: var(--primary-dark);
  background: transparent;
}

.btn-ghost:hover {
  background: var(--bg-card);
}

.btn-sm {
  padding: .5rem 1rem;
  font-size: .85rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: .5rem;
  transition: background .2s;
}

.btn-icon:hover {
  background: var(--bg-card);
}

/* ═══════════════════════════════════════════════════════════ */
/* Forms                                                       */
/* ═══════════════════════════════════════════════════════════ */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: .5rem;
  font-weight: 600;
  color: var(--text);
}

.form-control {
  display: block;
  width: 100%;
  padding: .75rem 1rem;
  border: 1px solid var(--border);
  border-radius: .5rem;
  font-size: .95rem;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  transition: border-color .3s, box-shadow .3s;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, .1);
}

.form-error {
  color: var(--danger);
  font-size: .85rem;
  margin-top: .25rem;
  display: block;
}

.form-hint {
  font-size: .85rem;
  color: var(--text-muted);
  margin-top: .35rem;
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.input-error {
  color: var(--danger);
  font-size: .85rem;
  margin-top: .25rem;
}

.input-with-icon {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════ */
/* Cards                                                       */
/* ═══════════════════════════════════════════════════════════ */
.card {
  background: var(--bg);
  border-radius: .75rem;
  border: 1px solid var(--border);
  padding: 1.5rem;
  transition: all .3s;
  box-shadow: var(--shadow);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card-header {
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.card-header h3 {
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════ */
/* Property Cards                                              */
/* ═══════════════════════════════════════════════════════════ */
.property-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.property-card {
  background: var(--bg);
  border-radius: .75rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all .3s;
  border: 1px solid var(--border);
}

.property-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-8px);
}

.property-card-img {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-card);
}

.property-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}

.property-card:hover .property-card-img img {
  transform: scale(1.05);
}

.property-card-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: .5rem 1rem;
  border-radius: .5rem;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.badge-for-rent {
  background: rgba(16, 185, 129, .9);
  color: #fff;
}

.badge-for-sale {
  background: rgba(249, 115, 22, .9);
  color: #fff;
}

.property-card-save {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--danger);
  transition: all .3s;
}

.property-card-save:hover {
  transform: scale(1.1);
}

.property-card-body {
  padding: 1.25rem;
}

.property-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: .5rem;
}

.property-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: .75rem;
  line-height: 1.4;
}

.property-location {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--text-muted);
  font-size: .9rem;
  margin-bottom: 1rem;
}

.property-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.property-meta-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--text-muted);
  font-size: .85rem;
}

/* ═══════════════════════════════════════════════════════════ */
/* Hero / Search                                               */
/* ═══════════════════════════════════════════════════════════ */
.search-hero {
  background: var(--primary);
  color: #fff;
  padding: 5rem 1.5rem;
  text-align: center;
}

.search-hero h1 {
  color: #fff;
  font-size: clamp(2rem, 8vw, 3.5rem);
  margin-bottom: 1rem;
  font-weight: 800;
}

.search-hero p {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, .85);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.search-box {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  background: rgba(255, 255, 255, .95);
  padding: 1rem;
  border-radius: .75rem;
  max-width: 900px;
  margin: 0 auto;
  box-shadow: var(--shadow-xl);
}

@media (max-width: 768px) {
  .search-box {
    flex-direction: column;
  }

  .search-box .form-control,
  .search-box .btn {
    width: 100%;
  }
}

/* ═══════════════════════════════════════════════════════════ */
/* Sections                                                    */
/* ═══════════════════════════════════════════════════════════ */
.section {
  padding: 3rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-label {
  display: inline-block;
  color: var(--accent);
  font-weight: 700;
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: .75rem;
}

.section h2 {
  margin: 0;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
}

/* ═══════════════════════════════════════════════════════════ */
/* Avatar                                                      */
/* ═══════════════════════════════════════════════════════════ */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: .75rem;
}

/* ═══════════════════════════════════════════════════════════ */
/* Toasts                                                      */
/* ═══════════════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.toast {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-radius: .5rem;
  box-shadow: var(--shadow-lg);
  background: var(--bg);
  color: var(--text);
  animation: slideIn .3s ease-out;
  font-weight: 500;
  min-width: 260px;
}

.toast.success {
  border-left: 4px solid var(--success);
}

.toast.danger {
  border-left: 4px solid var(--danger);
}

.toast.info {
  border-left: 4px solid var(--info);
}

.toast svg {
  flex-shrink: 0;
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ═══════════════════════════════════════════════════════════ */
/* Filters                                                     */
/* ═══════════════════════════════════════════════════════════ */
.listing-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
}

.owner-listing-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
}

.owner-listing-main {
  min-width: 0;
}

.owner-listing-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.owner-listing-sidebar .card {
  width: 100%;
}

.owner-listing-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.owner-listing-payment .payment-breakdown,
.owner-listing-payment .payment-row {
  width: 100%;
}

.owner-listing-payment .payment-breakdown {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.owner-listing-payment .payment-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.95rem;
}

.owner-listing-payment .payment-row.total {
  font-weight: 700;
}

.property-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 9px 1.25rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.property-detail-row span:last-child {
  font-weight: 500;
  min-width: 120px;
  max-width: 180px;
  text-align: right;
}

@media (max-width: 1024px) {
  .listing-layout {
    grid-template-columns: 1fr;
  }
  .owner-listing-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .owner-listing-payment .payment-row {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
  }

  .property-detail-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    padding: 0.85rem 1rem;
  }

  .property-detail-row span:last-child {
    max-width: 100%;
    text-align: left;
  }
}

.filters-panel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: .75rem;
  padding: 1.5rem;
  height: fit-content;
}

.filter-group {
  margin-bottom: 1.75rem;
}

.filter-group h5 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.filter-chip {
  padding: .5rem 1rem;
  border: 1px solid var(--border);
  border-radius: .5rem;
  cursor: pointer;
  transition: all .2s;
  font-size: .85rem;
  font-weight: 500;
  background: var(--bg);
  font-family: var(--font);
}

.filter-chip:hover {
  border-color: var(--accent);
}

.filter-chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════ */
/* Dashboard Layout                                            */
/* ═══════════════════════════════════════════════════════════ */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: #0f2540;
  color: white;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  overflow-y: auto;
  z-index: 999;
  transition: transform .3s ease;
}

.sidebar-logo {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  flex-shrink: 0;
}

.sidebar-logo a {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: white;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
}

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

.sidebar-section {
  padding: 1rem 1.5rem .5rem;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .5);
  margin-top: 1rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1.5rem;
  color: rgba(255, 255, 255, .7);
  text-decoration: none;
  transition: all .2s;
  font-size: .9rem;
  border-left: 3px solid transparent;
}

.sidebar-link:hover,
.sidebar-link.active {
  background: rgba(255, 255, 255, .1);
  color: white;
  border-left-color: var(--accent);
}

.sidebar-link svg {
  width: 18px;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, .1);
  flex-shrink: 0;
}

.dashboard-main {
  margin-left: 260px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dashboard-topbar {
  height: 64px;
  background: white;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.5rem;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
}

.topbar-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.dashboard-content {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
}

/* ═══════════════════════════════════════════════════════════ */
/* Grid Utilities                                              */
/* ═══════════════════════════════════════════════════════════ */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

/* ═══════════════════════════════════════════════════════════ */
/* Tables                                                      */
/* ═══════════════════════════════════════════════════════════ */
.table-wrapper {
  overflow-x: auto;
  border-radius: .75rem;
  border: 1px solid var(--border);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.data-table thead {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.data-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  font-size: .85rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: .05em;
}

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

.data-table tbody tr {
  transition: background .2s;
}

.data-table tbody tr:hover {
  background: var(--bg-alt);
}

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

/* ═══════════════════════════════════════════════════════════ */
/* Badges                                                      */
/* ═══════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: .35rem .75rem;
  border-radius: .375rem;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.badge-success {
  background: var(--success);
  color: white;
}

.badge-danger {
  background: var(--danger);
  color: white;
}

.badge-warning {
  background: var(--warning);
  color: white;
}

.badge-info {
  background: var(--info);
  color: white;
}

.badge-accent {
  background: var(--accent);
  color: white;
}

.badge-gray {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}

.badge-pending {
  background: rgba(245, 158, 11, .1);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, .3);
}

.badge-completed {
  background: rgba(16, 185, 129, .1);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, .3);
}

.badge-failed {
  background: rgba(239, 68, 68, .1);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, .3);
}

.badge-refunded {
  background: rgba(107, 114, 128, .1);
  color: var(--text-muted);
  border: 1px solid rgba(107, 114, 128, .3);
}

/* ═══════════════════════════════════════════════════════════ */
/* Pagination                                                  */
/* ═══════════════════════════════════════════════════════════ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.page-link {
  padding: .5rem .75rem;
  border: 1px solid var(--border);
  border-radius: .375rem;
  color: var(--text);
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  font-size: .9rem;
}

.page-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.page-link.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.page-link.disabled {
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: .5;
}

/* ═══════════════════════════════════════════════════════════ */
/* Empty state                                                 */
/* ═══════════════════════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}

.empty-state svg {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  opacity: .5;
}

.empty-state h3 {
  color: var(--text);
  margin-bottom: .5rem;
}

.empty-state p {
  margin-bottom: 1.5rem;
}

/* ═══════════════════════════════════════════════════════════ */
/* File upload                                                 */
/* ═══════════════════════════════════════════════════════════ */
.file-upload-area {
  border: 2px dashed var(--border);
  border-radius: .75rem;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all .3s;
  background: var(--bg-alt);
}

.file-upload-area:hover,
.file-upload-area.drag-over {
  border-color: var(--accent);
  background: rgba(249, 115, 22, .05);
}

.file-upload-area p {
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════ */
/* Breadcrumb                                                  */
/* ═══════════════════════════════════════════════════════════ */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.5rem;
  font-size: .9rem;
}

.breadcrumb a {
  color: var(--primary-dark);
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb span {
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════ */
/* Image gallery                                               */
/* ═══════════════════════════════════════════════════════════ */
.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: .5rem;
}

.image-gallery img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: .5rem;
  cursor: pointer;
  transition: transform .2s;
}

.image-gallery img:hover {
  transform: scale(1.05);
}

/* ═══════════════════════════════════════════════════════════ */
/* Animations                                                  */
/* ═══════════════════════════════════════════════════════════ */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn .3s ease-out;
}

.slide-up {
  animation: slideUp .3s ease-out;
}

/* ═══════════════════════════════════════════════════════════ */
/* Utility classes                                             */
/* ═══════════════════════════════════════════════════════════ */
.mt-1 {
  margin-top: .5rem;
}

.mt-2 {
  margin-top: 1rem;
}

.mt-3 {
  margin-top: 1.5rem;
}

.mt-4 {
  margin-top: 2rem;
}

.mb-1 {
  margin-bottom: .5rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.mb-3 {
  margin-bottom: 1.5rem;
}

.mb-4 {
  margin-bottom: 2rem;
}

.p-1 {
  padding: .5rem;
}

.p-2 {
  padding: 1rem;
}

.p-3 {
  padding: 1.5rem;
}

.p-4 {
  padding: 2rem;
}

.text-center {
  text-align: center;
}

.text-muted {
  color: var(--text-muted);
}

.text-sm {
  font-size: .85rem;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: 1rem;
}

.gap-4 {
  gap: 2rem;
}

.hidden {
  display: none !important;
}

.block {
  display: block;
}

/* ═══════════════════════════════════════════════════════════ */
/* Responsive overrides                                        */
/* ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  .container {
    padding: 0 1rem;
  }

  .section {
    padding: 2rem 0;
  }

  .section-header {
    margin-bottom: 1.5rem;
  }

  .card {
    padding: 1rem;
  }

  .property-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Dashboard sidebar */
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }

  .dashboard-main {
    margin-left: 0;
  }

  .dashboard-content {
    padding: 1rem;
  }

  .data-table th,
  .data-table td {
    padding: .75rem .5rem;
    font-size: .85rem;
  }

  .toast-container {
    top: 1rem;
    right: 1rem;
    left: 1rem;
  }

  .toast {
    min-width: 0;
  }

  .hidden-mobile {
    display: none !important;
  }

  .block-mobile {
    display: block !important;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.4rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  .btn {
    padding: .6rem 1.1rem;
    font-size: .85rem;
  }

  .btn-sm {
    padding: .45rem .9rem;
    font-size: .8rem;
  }

  .dashboard-topbar {
    padding: 0 1rem;
  }
}