/* ─── HomeHQ App Styles ─── */
/* Matches landing page design: Space Grotesk + DM Sans, warm palette */

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

:root {
  --ink: #0a0f1a;
  --paper: #f8f6f1;
  --warm: #e8e4db;
  --accent: #c45d3e;
  --accent-hover: #b04e32;
  --accent-soft: #f0d5cc;
  --slate: #4a5568;
  --green: #2d6a4f;
  --green-soft: #d4edda;
  --yellow: #856404;
  --yellow-soft: #fff3cd;
  --red: #c0392b;
  --red-soft: #f8d7da;
  --white: #ffffff;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --shadow: 0 2px 20px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.06);
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', sans-serif;
}

/* ─── Nav ─── */
#app-nav {
  display: flex;
  align-items: center;
  padding: 16px 48px;
  max-width: 1200px;
  margin: 0 auto;
  gap: 32px;
  border-bottom: 1px solid var(--warm);
}

.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--ink);
  letter-spacing: -0.5px;
  text-decoration: none;
}

.logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 8px;
  flex: 1;
}

.nav-link {
  font-size: 0.9rem;
  color: var(--slate);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s;
}

.nav-link:hover, .nav-link.active {
  background: var(--warm);
  color: var(--ink);
}

.btn-ghost {
  background: none;
  border: none;
  color: var(--slate);
  font-size: 0.88rem;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.2s;
}

.btn-ghost:hover {
  background: var(--warm);
  color: var(--ink);
}

/* ─── Main ─── */
#main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 48px 64px;
  min-height: calc(100vh - 80px);
}

/* ─── Auth ─── */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 120px);
  padding: 24px;
}

.auth-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,0.05);
}

.auth-card .logo {
  font-size: 1.8rem;
  display: block;
  text-align: center;
  margin-bottom: 8px;
}

.auth-card h2 {
  text-align: center;
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 32px;
  color: var(--slate);
  letter-spacing: -0.3px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--warm);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: 'DM Sans', sans-serif;
  background: var(--white);
  color: var(--ink);
  transition: border-color 0.2s;
  outline: none;
}

.form-input:focus {
  border-color: var(--accent);
}

.form-input::placeholder {
  color: #a0aab4;
}

select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%234a5568'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

textarea.form-input {
  resize: vertical;
  min-height: 80px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--warm);
  color: var(--ink);
}

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

.btn-danger {
  background: var(--red-soft);
  color: var(--red);
}

.btn-danger:hover {
  background: #f1c0c0;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-full {
  width: 100%;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.auth-toggle {
  text-align: center;
  margin-top: 24px;
  font-size: 0.88rem;
  color: var(--slate);
}

.auth-toggle a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.auth-toggle a:hover {
  text-decoration: underline;
}

.error-msg {
  background: var(--red-soft);
  color: var(--red);
  padding: 10px 14px;
  border-radius: var(--radius-xs);
  font-size: 0.88rem;
  margin-bottom: 16px;
  display: none;
}

.error-msg.show { display: block; }

/* ─── Dashboard ─── */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.dashboard-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -1px;
}

.dashboard-header p {
  color: var(--slate);
  font-size: 0.95rem;
  margin-top: 4px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: var(--shadow);
}

.stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--slate);
}

.stat-card.accent .stat-value { color: var(--accent); }
.stat-card.green .stat-value { color: var(--green); }

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-header h2 {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.5px;
}

/* ─── Property Cards ─── */
.property-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.property-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,0.05);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

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

.prop-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.prop-card-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
}

.badge {
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 500;
  text-transform: capitalize;
}

.badge-green { background: var(--green-soft); color: var(--green); }
.badge-yellow { background: var(--yellow-soft); color: var(--yellow); }
.badge-accent { background: var(--accent-soft); color: var(--accent); }
.badge-blue { background: #dbeafe; color: #1d4ed8; }

.prop-card-address {
  font-size: 0.88rem;
  color: var(--slate);
  margin-bottom: 16px;
}

.prop-card-meta {
  display: flex;
  gap: 20px;
  font-size: 0.82rem;
  color: var(--slate);
}

.prop-card-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ─── Empty State ─── */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--slate);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.6;
}

.empty-state h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--ink);
}

.empty-state p {
  font-size: 0.95rem;
  max-width: 400px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

/* ─── Property Detail ─── */
.breadcrumb {
  font-size: 0.88rem;
  color: var(--slate);
  margin-bottom: 24px;
}

.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}

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

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
  gap: 24px;
}

.detail-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 4px;
}

.detail-header p {
  color: var(--slate);
  font-size: 0.95rem;
}

.detail-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--warm);
  margin-bottom: 24px;
}

.tab {
  padding: 12px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--slate);
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.tab:hover { color: var(--ink); }

.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ─── Asset Cards ─── */
.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.asset-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 24px;
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: var(--shadow);
}

.asset-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.asset-card-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
}

.condition-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.condition-good { background: var(--green); }
.condition-fair { background: var(--yellow); }
.condition-poor { background: var(--red); }

.asset-card-detail {
  font-size: 0.85rem;
  color: var(--slate);
  margin-bottom: 4px;
}

.asset-card-detail.asset-cost {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  color: var(--green);
  font-size: 0.92rem;
}

.asset-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--warm);
}

/* ─── Document List ─── */
.doc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.doc-item {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  border: 1px solid rgba(0,0,0,0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.doc-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.doc-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #dce8f5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.doc-name {
  font-weight: 500;
  font-size: 0.92rem;
}

.doc-type {
  font-size: 0.8rem;
  color: var(--slate);
}

/* ─── Forms (inline) ─── */
.inline-form {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 32px;
  border: 2px dashed var(--warm);
  margin-bottom: 24px;
}

.inline-form h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: -0.3px;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

/* ─── Chat ─── */
.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 140px);
  max-height: 800px;
  background: var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.chat-header h2 {
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.chat-header select {
  background: rgba(255,255,255,0.1);
  color: #a0aec0;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  cursor: pointer;
}

.chat-header select option {
  background: var(--ink);
  color: #e2e8f0;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 3px;
}

.chat-msg {
  display: flex;
  flex-direction: column;
}

.chat-label {
  font-size: 0.7rem;
  color: #718096;
  margin-bottom: 4px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.chat-bubble-user {
  align-self: flex-end;
  background: var(--accent);
  color: var(--white);
  padding: 12px 18px;
  border-radius: 16px 16px 4px 16px;
  font-size: 0.9rem;
  max-width: 80%;
  line-height: 1.5;
}

.chat-bubble-ai {
  align-self: flex-start;
  background: rgba(255,255,255,0.08);
  color: #e2e8f0;
  padding: 14px 18px;
  border-radius: 16px 16px 16px 4px;
  font-size: 0.9rem;
  max-width: 85%;
  line-height: 1.6;
}

.chat-bubble-ai strong { color: var(--white); }

.chat-bubble-ai p { margin-bottom: 8px; }
.chat-bubble-ai p:last-child { margin-bottom: 0; }
.chat-bubble-ai ol, .chat-bubble-ai ul {
  padding-left: 20px;
  margin-bottom: 8px;
}
.chat-bubble-ai li { margin-bottom: 4px; }
.chat-bubble-ai em { color: #a0aec0; font-style: italic; }

.chat-suggestions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 16px;
  padding: 40px;
}

.chat-suggestions h3 {
  color: #a0aec0;
  font-size: 1.1rem;
  font-weight: 500;
}

.suggestion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.suggestion-chip {
  background: rgba(255,255,255,0.08);
  color: #a0aec0;
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.1);
  transition: all 0.2s;
  font-family: 'DM Sans', sans-serif;
}

.suggestion-chip:hover {
  background: rgba(255,255,255,0.14);
  color: var(--white);
  border-color: rgba(255,255,255,0.2);
}

.chat-input-area {
  padding: 20px 28px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  gap: 12px;
}

.chat-input {
  flex: 1;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 14px 18px;
  color: var(--white);
  font-size: 0.95rem;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}

.chat-input:focus {
  border-color: var(--accent);
}

.chat-input::placeholder {
  color: #718096;
}

.chat-send {
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: 12px;
  padding: 14px 24px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.2s;
}

.chat-send:hover {
  background: var(--accent-hover);
}

.chat-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.typing-indicator {
  align-self: flex-start;
  background: rgba(255,255,255,0.08);
  padding: 14px 20px;
  border-radius: 16px 16px 16px 4px;
  display: flex;
  gap: 6px;
}

.typing-dot {
  width: 8px;
  height: 8px;
  background: #718096;
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-4px); }
}

/* ─── Loading ─── */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  color: var(--slate);
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--warm);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 12px;
}

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

/* ─── Utilities ─── */
.text-slate { color: var(--slate); }
.text-accent { color: var(--accent); }
.text-sm { font-size: 0.85rem; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.gap-8 { gap: 8px; }
.flex { display: flex; }
.items-center { align-items: center; }

/* ─── Responsive ─── */
@media (max-width: 768px) {
  #app-nav {
    padding: 14px 20px;
    gap: 16px;
  }

  .nav-links { gap: 4px; }

  .nav-link {
    padding: 6px 10px;
    font-size: 0.82rem;
  }

  #main { padding: 20px 20px 48px; }

  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .dashboard-header h1 { font-size: 1.4rem; }

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

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

  .detail-header {
    flex-direction: column;
  }

  .detail-actions {
    width: 100%;
  }

  .asset-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .auth-card {
    padding: 32px 24px;
  }

  .chat-container {
    height: calc(100vh - 120px);
    border-radius: 12px;
  }

  .chat-suggestions {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .stat-card { padding: 16px; }
  .stat-value { font-size: 1.5rem; }
}

/* ─── Floating Chat ─── */
.chat-float-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 56px;
  height: 56px;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(196, 93, 62, 0.45);
  z-index: 9998;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chat-float-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 32px rgba(196, 93, 62, 0.6);
}

.chat-float-panel {
  position: fixed;
  bottom: 96px;
  right: 28px;
  width: 380px;
  height: 540px;
  background: var(--ink);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.45);
  z-index: 9999;
  transform: translateY(16px) scale(0.97);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
}

.chat-float-panel.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}

.chat-float-avatar {
  width: 36px;
  height: 36px;
  background: rgba(196, 93, 62, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.chat-float-select {
  background: rgba(255, 255, 255, 0.1);
  color: #a0aec0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 0.8rem;
  font-family: inherit;
  max-width: 120px;
}

.chat-float-close {
  background: none;
  border: none;
  color: #718096;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  line-height: 1;
  transition: color 0.15s;
  flex-shrink: 0;
}

.chat-float-close:hover {
  color: var(--white);
}

.chat-float-panel .chat-messages {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.12) transparent;
}

.chat-float-panel .chat-messages::-webkit-scrollbar {
  width: 4px;
}

.chat-float-panel .chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.12);
  border-radius: 2px;
}

@media (max-width: 480px) {
  .chat-float-btn {
    bottom: 20px;
    right: 20px;
    width: 52px;
    height: 52px;
  }

  .chat-float-panel {
    bottom: 0;
    right: 0;
    width: 100%;
    height: 82vh;
    border-radius: 20px 20px 0 0;
  }
}

/* ─── Member List ─── */
.member-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.member-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  border: 1px solid var(--warm);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.member-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.member-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--warm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--ink);
  flex-shrink: 0;
}

.member-name {
  font-weight: 500;
  font-size: 0.92rem;
}

.member-email {
  font-size: 0.82rem;
  color: var(--slate);
}

/* ─── Modal ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.modal-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal-header h3 {
  font-size: 1.15rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--slate);
  line-height: 1;
  padding: 4px;
  border-radius: 4px;
}

.modal-close:hover { color: var(--ink); }

.invite-result-box {
  background: var(--green-soft);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 16px;
}

.invite-link-box {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.invite-link-box .form-input {
  flex: 1;
  font-size: 0.82rem;
  font-family: monospace;
}

.mb-16 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 8px; }
.mt-4 { margin-top: 4px; }
