/* ── Hane Yönetimi ────────────────────────────────────────────────────────── */

.households-page {
  max-width: 720px;
}

.page-desc {
  color: var(--text-3);
  font-size: 14px;
  margin: 4px 0 24px;
  line-height: 1.5;
}

.households-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

/* ── Hane Kartı ─────────────────────────────────────────────────────────── */

.household-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.household-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.household-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.household-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-1);
  margin: 0;
}

.household-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Rol Badge ───────────────────────────────────────────────────────────── */

.role-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

.badge-owner  { background: #fef9c3; color: #854d0e; border: 1px solid #fde68a; }
.badge-admin  { background: #ede9fe; color: #5b21b6; border: 1px solid #ddd6fe; }
.badge-member { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }

/* ── Davet Kodu ──────────────────────────────────────────────────────────── */

.invite-code-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.invite-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.invite-code {
  font-family: monospace;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--primary);
  background: none;
}

/* ── Üye Listesi ─────────────────────────────────────────────────────────── */

.household-members {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.members-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 10px;
}

.members-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: #fafafa;
  flex-wrap: wrap;
}

.member-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.member-info {
  flex: 1;
  min-width: 0;
}

.member-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
  display: block;
}

.member-username {
  font-size: 12px;
  color: var(--text-3);
}

.member-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.role-select {
  font-size: 12px;
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text-1);
  cursor: pointer;
}

/* ── Empty State ─────────────────────────────────────────────────────────── */

.empty-state-box {
  text-align: center;
  padding: 48px 24px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-2);
}

.empty-state-box h3 {
  font-size: 18px;
  margin: 0 0 8px;
  color: var(--text-1);
}

.empty-state-box p {
  font-size: 14px;
  color: var(--text-3);
  line-height: 1.6;
  margin: 0;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
  .household-card-header {
    flex-direction: column;
  }
  .household-actions {
    width: 100%;
  }
  .households-toolbar {
    flex-direction: column;
  }
}


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

/* macros.css align-items:flex-end override'ını sıfırla */
.modal-overlay.active {
  align-items: center;
}

.modal-box {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
}

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

.modal-header h3 { margin: 0; font-size: 16px; }

.modal-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-3);
}

.modal-body { margin-bottom: 16px; }