/* ParkMatch Modern Light SaaS Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg-main: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-card-hover: #FFFFFF;
  --border-color: #E2E8F0;
  --border-accent: rgba(16, 185, 129, 0.3);
  
  --primary: #10B981;
  --primary-hover: #059669;
  --primary-glow: rgba(16, 185, 129, 0.2);
  
  --accent-blue: #2563EB;
  --accent-amber: #D97706;
  --accent-red: #DC2626;

  --text-main: #0F172A;
  --text-muted: #475569;
  --text-dim: #94A3B8;

  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-blur: blur(12px);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 16px -2px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 10px 30px -4px rgba(15, 23, 42, 0.08);
  
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(16, 185, 129, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(37, 99, 235, 0.05) 0%, transparent 40%);
  color: var(--text-main);
  min-height: 100vh;
  padding-bottom: 60px;
  line-height: 1.5;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 20px;
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #10B981, #3B82F6);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.logo-text h1 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.logo-text p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.user-status {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #F1F5F9;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  font-size: 0.88rem;
  color: var(--text-main);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

/* Quota Banner */
.quota-card {
  background: linear-gradient(135deg, #ECFDF5, #EFF6FF);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.quota-info h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #047857;
  display: flex;
  align-items: center;
  gap: 8px;
}

.quota-info p {
  font-size: 0.85rem;
  color: #475569;
  margin-top: 2px;
}

.quota-badge {
  font-size: 1.2rem;
  font-weight: 700;
  color: #047857;
  background: #FFFFFF;
  padding: 6px 16px;
  border-radius: 12px;
  border: 1px solid rgba(16, 185, 129, 0.3);
  box-shadow: var(--shadow-sm);
}

/* Sections */
.card-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.2s ease;
}

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

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.section-header h2 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-main);
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-control {
  background: #F8FAFC;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s ease;
}

.form-control:focus {
  background: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.full-width-group {
  grid-column: 1 / -1;
}

.price-range-inputs {
  display: flex;
  align-items: center;
  gap: 12px;
}

.price-range-inputs .form-control {
  flex: 1;
}

.price-dash {
  font-weight: 700;
  color: var(--text-dim);
  font-size: 1.1rem;
}

.two-col-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
}

.form-subgroup {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Option Buttons */
.option-cards {
  display: flex;
  gap: 10px;
}

.option-btn {
  flex: 1;
  padding: 10px;
  background: #F1F5F9;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-align: center;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  user-select: none;
}

.option-btn:hover {
  background: #E2E8F0;
}

.option-btn.active {
  background: #ECFDF5;
  border-color: var(--primary);
  color: #047857;
  font-weight: 600;
}

/* Privacy Consent Box */
/* Privacy Consent Box (iPad & Safari Cross-Browser Custom Checkbox) */
.privacy-box {
  background: #F8FAFC;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-top: 20px;
  transition: all 0.2s ease;
}

.privacy-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  width: 100%;
  user-select: none;
  -webkit-user-select: none;
}

.privacy-checkbox-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}

.custom-checkbox {
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  border: 2px solid #94A3B8;
  border-radius: 5px;
  background: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.privacy-checkbox-input:checked + .custom-checkbox {
  background: var(--primary);
  border-color: var(--primary);
}

.privacy-checkbox-input:checked + .custom-checkbox::after {
  content: "";
  width: 6px;
  height: 11px;
  border: solid #FFFFFF;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

.privacy-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.privacy-text strong {
  color: var(--text-main);
}

/* Buttons */
.btn-primary {
  width: 100%;
  margin-top: 20px;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--primary), #059669);
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 4px 14px var(--primary-glow);
  transition: all 0.2s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover {
  opacity: 0.94;
  transform: translateY(-1px);
}

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

.btn-secondary {
  padding: 8px 16px;
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: #F1F5F9;
}

.btn-agree {
  background: linear-gradient(135deg, #10B981, #059669);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-agree:hover {
  opacity: 0.9;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-close-req {
  background: #FEF2F2;
  border: 1px solid #FCA5A5;
  color: #DC2626;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-close-req:hover {
  background: #FEE2E2;
}

.btn-cancel-match {
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  color: #475569;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-cancel-match:hover {
  background: #E2E8F0;
  color: #0F172A;
}

/* Requirement Cards List */
.req-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.req-item {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}

.req-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.req-tags {
  display: flex;
  gap: 8px;
  align-items: center;
}

.badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
}

.badge-role-landlord {
  background: #EFF6FF;
  color: #2563EB;
  border: 1px solid #BFDBFE;
}

.badge-role-tenant {
  background: #FFFBEB;
  color: #D97706;
  border: 1px solid #FDE68A;
}

.badge-type {
  background: #F1F5F9;
  color: var(--text-muted);
}

.badge-status-active {
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
}

.badge-status-proposed {
  background: #FFFBEB;
  color: #B45309;
  border: 1px solid #FDE68A;
}

.badge-status-revealed {
  background: #ECFDF5;
  color: #047857;
  border: 1px solid #A7F3D0;
}

.badge-status-closed {
  background: #F1F5F9;
  color: #64748B;
  border: 1px solid #E2E8F0;
}

.req-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  font-size: 0.9rem;
}

.req-detail-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.req-detail-col label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 600;
}

.req-detail-col span {
  font-weight: 600;
  color: var(--text-main);
}

/* Match Detail Box inside Requirement Card */
.match-box {
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 6px;
}

.match-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.match-box-header h4 {
  font-size: 0.95rem;
  color: #047857;
  display: flex;
  align-items: center;
  gap: 6px;
}

.match-details-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.match-row-two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.match-row-full {
  width: 100%;
}

.match-contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  background: rgba(255, 255, 255, 0.7);
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px dashed #A7F3D0;
  margin-top: 4px;
}

.match-details-list strong {
  color: var(--text-main);
}

/* Modal Popup */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 30px;
  width: 90%;
  max-width: 440px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-card h2 {
  font-size: 1.25rem;
  margin-bottom: 6px;
  color: var(--text-main);
}

.modal-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

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

.empty-state p {
  margin-top: 8px;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 600px) {
  .app-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .user-status {
    width: 100%;
    justify-content: space-between;
  }
  .quota-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}
