/* ============================================
   SHADCN-INSPIRED ENHANCEMENTS
   Modern design with beautiful effects
   ============================================ */

/* Enhanced Color Variables with Better Contrast */
:root {
  --primary: #16A34A;
  --primary-dark: #15803D;
  --primary-light: #22C55E;
  --primary-foreground: #ffffff;
  
  --background: #FFFFFF;
  --foreground: #09090B;
  
  --card: #FFFFFF;
  --card-foreground: #09090B;
  
  --popover: #FFFFFF;
  --popover-foreground: #09090B;
  
  --muted: #F4F4F5;
  --muted-foreground: #71717A;
  
  --accent: #F4F4F5;
  --accent-foreground: #18181B;
  
  --border: #E4E4E7;
  --input: #E4E4E7;
  --ring: #16A34A;
  
  --destructive: #EF4444;
  --destructive-foreground: #FFFFFF;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced Body & Base */
body {
  background: #F9FAFB;
  color: var(--foreground);
  font-feature-settings: "rlig" 1, "calt" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Enhanced Sidebar with Subtle Shadow */
.sidebar {
  background: var(--background);
  border-right: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}

/* Modern Sidebar Links */
.sidebar-link {
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
  font-weight: 500;
}

.sidebar-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: var(--primary);
  transform: scaleY(0);
  transition: transform var(--transition-base);
}

.sidebar-link:hover {
  background: var(--muted);
  color: var(--foreground);
  transform: translateX(2px);
}

.sidebar-link.active {
  background: linear-gradient(to right, rgba(22, 163, 74, 0.1) 0%, rgba(22, 163, 74, 0.05) 100%);
  color: var(--primary-dark);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.sidebar-link.active::before {
  transform: scaleY(1);
}

/* Enhanced Cards with Shadcn Style */
.stat-card-modern,
.activity-card,
[style*="background: white"] {
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.stat-card-modern:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--border);
}

/* Enhanced Stats Cards with Better Contrast */
.stat-card-header {
  margin-bottom: 16px;
}

.stat-card-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted-foreground);
}

.stat-card-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--foreground);
  letter-spacing: -0.5px;
  line-height: 1;
  margin-bottom: 12px;
}

.stat-card-footer {
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.stat-card-label {
  font-size: 13px;
  color: var(--muted-foreground);
  font-weight: 500;
}

/* Enhanced Icon Backgrounds with Gradient */
.stat-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.stat-card-icon.blue {
  background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
  color: #1E40AF;
}

.stat-card-icon.green {
  background: linear-gradient(135deg, #DCFCE7 0%, #BBF7D0 100%);
  color: #15803D;
}

.stat-card-icon.yellow {
  background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
  color: #B45309;
}

.stat-card-icon.purple {
  background: linear-gradient(135deg, #E9D5FF 0%, #D8B4FE 100%);
  color: #7C3AED;
}

.stat-card-modern:hover .stat-card-icon {
  transform: scale(1.05) rotate(5deg);
}

/* Enhanced Buttons with Shadcn Style */
.btn-modern-primary,
.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  border: 1px solid transparent;
  box-shadow: var(--shadow-sm);
  font-weight: 600;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn-modern-primary::before,
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.1) 0%, transparent 100%);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.btn-modern-primary:hover,
.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-modern-primary:hover::before,
.btn-primary:hover::before {
  opacity: 1;
}

.btn-modern-primary:active,
.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn-modern-secondary,
.btn-secondary {
  background: var(--muted);
  color: var(--accent-foreground);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
  transition: all var(--transition-base);
}

.btn-modern-secondary:hover,
.btn-secondary:hover {
  background: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

/* Enhanced Form Inputs */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
textarea,
select {
  background: var(--background);
  border: 1px solid var(--input);
  color: var(--foreground);
  transition: all var(--transition-base);
  font-weight: 500;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

input:hover,
textarea:hover,
select:hover {
  border-color: var(--muted-foreground);
}

/* Enhanced Tables */
.data-table {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.data-table table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

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

.data-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted-foreground);
}

.data-table td {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  color: var(--foreground);
  font-weight: 500;
  font-size: 14px;
}

.data-table tbody tr {
  transition: all var(--transition-fast);
}

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

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

/* Enhanced Badges */
.badge-status {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.badge-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.badge-vacant::before {
  background: #F59E0B;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

.badge-occupied::before {
  background: #16A34A;
  box-shadow: 0 0 8px rgba(22, 163, 74, 0.5);
}

.badge-active::before {
  background: #16A34A;
  box-shadow: 0 0 8px rgba(22, 163, 74, 0.5);
}

.badge-pending::before {
  background: #F59E0B;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

.badge-paid::before {
  background: #16A34A;
  box-shadow: 0 0 8px rgba(22, 163, 74, 0.5);
}

/* Enhanced Premium Badge with Glass Effect */
.premium-badge {
  background: linear-gradient(135deg, rgba(220, 252, 231, 0.9) 0%, rgba(187, 247, 208, 0.9) 100%);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(22, 163, 74, 0.2);
  box-shadow: var(--shadow-md);
}

/* Enhanced User Avatar */
.user-avatar {
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  border: 2px solid var(--border);
}

.user-avatar:hover {
  box-shadow: var(--shadow-md);
  transform: scale(1.05);
}

/* Enhanced Action Buttons Grid */
.action-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.action-buttons a {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 10px;
  font-weight: 600;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.action-buttons a:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

/* Enhanced Section Headers */
.section-header-modern {
  margin-bottom: 24px;
}

.section-header-modern h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--foreground);
  margin-bottom: 4px;
  letter-spacing: -0.5px;
}

.section-header-modern p {
  color: var(--muted-foreground);
  font-size: 14px;
  font-weight: 500;
}

/* Enhanced Alerts with Better Contrast */
.alert {
  border: 1px solid;
  box-shadow: var(--shadow-sm);
  font-weight: 500;
}

.alert-success {
  background: #DCFCE7;
  border-color: #22C55E;
  color: #15803D;
}

.alert-error {
  background: #FEE2E2;
  border-color: #EF4444;
  color: #991B1B;
}

/* Focus Visible for Accessibility */
*:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

/* Smooth Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--muted);
}

::-webkit-scrollbar-thumb {
  background: var(--muted-foreground);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--foreground);
}

/* Enhanced Top Bar */
.top-bar {
  background: var(--background);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}

/* Enhanced Notification Badge */
.notification-badge {
  background: var(--destructive);
  color: var(--destructive-foreground);
  box-shadow: 0 0 0 2px var(--background), var(--shadow-sm);
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

/* Enhanced Dropdown Menus */
.dropdown-menu {
  background: var(--popover);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(8px);
}

.dropdown-item {
  transition: all var(--transition-fast);
}

.dropdown-item:hover {
  background: var(--muted);
  color: var(--foreground);
}

/* Glass Morphism Effect for Special Cards */
.glass-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow-xl);
}

/* Enhanced Loading States */
.btn-loading {
  position: relative;
  pointer-events: none;
}

.btn-loading::after {
  animation: spin 0.6s linear infinite;
}

/* Subtle Animation for Page Load */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.content-area > * {
  animation: fadeIn 0.3s ease-out;
}

/* Enhanced Image Thumbnails */
.property-image-thumb {
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.property-image-thumb:hover {
  box-shadow: var(--shadow-md);
  transform: scale(1.05);
}

/* Better Form Grid Spacing */
.form-grid {
  gap: 20px;
}

/* Enhanced Table Actions */
.table-actions {
  display: flex;
  gap: 8px;
}

.table-actions .btn {
  font-size: 13px;
  padding: 6px 12px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.table-actions .btn:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

/* Improved Empty States */
.empty-state {
  padding: 60px 40px;
  text-align: center;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.7;
  filter: grayscale(20%);
}

.empty-state h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--muted-foreground);
  font-size: 14px;
  margin-bottom: 20px;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
  .stat-card-modern:hover {
    transform: none;
  }
  
  .action-buttons a:hover {
    transform: translateY(-2px);
  }
}


