/**
 * Alpine Property Group - Premium Design System
 * Clean, minimal design inspired by Linear, Notion, and Stripe
 * Black, White, and Grey color palette
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* Black, White, Grey Color Palette */
  --black: #000000;
  --grey-900: #1A1A1A;
  --grey-800: #2D3748;
  --grey-700: #4A5568;
  --grey-600: #64748B;
  --grey-500: #94A3B8;
  --grey-400: #CBD5E1;
  --grey-300: #E2E8F0;
  --grey-200: #F1F3F5;
  --grey-100: #F7F8FA;
  --grey-50: #FAFAFA;
  --white: #FFFFFF;
  
  /* Accent Colors (minimal use) */
  --success-600: #047857;
  --success-500: #059669;
  --success-400: #10B981;
  
  --warning-500: #F59E0B;
  --warning-400: #FBBF24;
  
  --danger-600: #B91C1C;
  --danger-500: #DC2626;
  --danger-400: #EF4444;
  
  /* Shadows - Subtle and minimal */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  
  /* Transitions - Smooth and purposeful */
  --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);
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--white);
  min-height: 100vh;
  padding: 24px;
  color: var(--grey-800);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

/* Premium Header */
.header {
  background: var(--white);
  padding: 24px 32px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
  border: 1px solid var(--grey-300);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.header h1 {
  color: var(--grey-900);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.025em;
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Premium Buttons */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition-base);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  position: relative;
  overflow: hidden;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--grey-900);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: var(--black);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--white);
  color: var(--grey-700);
  border: 1px solid var(--grey-300);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--grey-50);
  border-color: var(--grey-400);
  box-shadow: var(--shadow-md);
}

.btn-success {
  background: var(--success-500);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-success:hover {
  background: var(--success-600);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.btn-danger {
  background: var(--danger-500);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-danger:hover {
  background: var(--danger-600);
  box-shadow: var(--shadow-lg);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Premium Cards */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--grey-300);
  transition: all var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn var(--transition-base);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-2xl);
  animation: slideUp var(--transition-slow);
}

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

.modal-header {
  font-size: 24px;
  font-weight: 700;
  color: var(--grey-900);
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

/* Premium Forms */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--grey-700);
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--grey-300);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: inherit;
  transition: all var(--transition-base);
  background: var(--white);
  color: var(--grey-900);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--black);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
  border-color: var(--grey-400);
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--grey-300);
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--grey-300);
  text-align: center;
  transition: all var(--transition-base);
}

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

.stat-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--grey-900);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 14px;
  color: var(--grey-600);
  font-weight: 500;
}

/* Variance Colors */
.variance {
  font-weight: 700;
}

.variance.positive {
  color: var(--success-500);
}

.variance.negative {
  color: var(--danger-500);
}

/* Loading State */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--grey-300);
  border-top-color: var(--grey-900);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--grey-500);
}

.empty-state-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

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

.empty-state p {
  font-size: 14px;
  color: var(--grey-500);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  padding: 12px 16px;
  background: var(--grey-50);
  border-bottom: 1px solid var(--grey-300);
  font-size: 13px;
  font-weight: 600;
  color: var(--grey-600);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--grey-300);
  color: var(--grey-800);
}

tr:hover {
  background: var(--grey-50);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-success {
  background: rgba(5, 150, 105, 0.1);
  color: var(--success-500);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning-500);
}

.badge-danger {
  background: rgba(220, 38, 38, 0.1);
  color: var(--danger-500);
}

.badge-grey {
  background: var(--grey-100);
  color: var(--grey-700);
}

/* Responsive */
@media (max-width: 768px) {
  body {
    padding: 16px;
  }

  .header {
    padding: 20px;
  }

  .header h1 {
    font-size: 24px;
  }

  .modal-content {
    padding: 24px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .stat-card {
    padding: 16px;
  }

  .stat-value {
    font-size: 24px;
  }
}

/* Micro-interactions */
@media (prefers-reduced-motion: no-preference) {
  .card,
  .btn,
  .stat-card {
    transition: all var(--transition-base);
  }
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid var(--black);
  outline-offset: 2px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--grey-900);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

p {
  color: var(--grey-700);
  line-height: 1.6;
}

a {
  color: var(--grey-900);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

/* Utility Classes */
.text-center {
  text-align: center;
}

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

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

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }
