/*
Theme Name: Kindred
Theme URI: https://example.com/kindred
Author: Kindred
Author URI: https://example.com
Description: A lightweight, mobile-first social community theme for adults seeking meaningful connections.
Version: 1.0.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kindred
Domain Path: /languages
Tags: blog, social, responsive, custom-logo, custom-menu, accessibility-ready, translation-ready
*/

:root {
  --kd-primary: #2563eb;
  --kd-primary-hover: #1d4ed8;
  --kd-bg: #ffffff;
  --kd-bg-hover: #f5f7fa;
  --kd-bg-page: #f0f2f5;
  --kd-text: #1a1a1a;
  --kd-text-muted: #6b7280;
  --kd-border: #e5e7eb;
  --kd-border-strong: #d0d5dd;
  --kd-neutral: #e5e7eb;
  --kd-success: #16a34a;
  --kd-warning: #f59e0b;
  --kd-error: #dc2626;
  --kd-accent: #0891b2;
  --kd-radius: 12px;
  --kd-radius-sm: 8px;
  --kd-shadow: 0 1px 3px rgba(0,0,0,.08);
  --kd-shadow-lg: 0 4px 12px rgba(0,0,0,.1);
  --kd-max-width: 640px;
  --kd-header-h: 56px;
  --kd-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

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

body {
  font-family: var(--kd-font);
  background: var(--kd-bg-page);
  color: var(--kd-text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--kd-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.3; font-weight: 700; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.1rem; }

img { max-width: 100%; height: auto; }

.kd-field {
  margin-bottom: 18px;
}

.kd-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--kd-text);
  font-size: 0.95rem;
}

.kd-input,
.kd-select,
.kd-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--kd-border);
  border-radius: var(--kd-radius-sm);
  background: #fff;
  color: var(--kd-text);
  font-size: 0.98rem;
  line-height: 1.5;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.kd-input:focus,
.kd-select:focus,
.kd-textarea:focus {
  outline: none;
  border-color: var(--kd-primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.kd-input-error,
.kd-select-error,
.kd-textarea-error {
  border-color: var(--kd-error);
}

.kd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--kd-radius-sm);
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.kd-btn:hover {
  transform: translateY(-1px);
}

.kd-btn-primary {
  background: var(--kd-primary);
  color: #fff;
}

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

.kd-btn-secondary {
  background: var(--kd-bg-hover);
  color: var(--kd-text);
}

.kd-btn-danger {
  background: var(--kd-error);
  color: #fff;
}

.kd-btn-danger:hover {
  background: #b91c1c;
}

.kd-btn-sm {
  padding: 8px 12px;
  font-size: 0.9rem;
}

.kd-btn-full {
  width: 100%;
}

.kd-btn-margin-top {
  margin-top: 16px;
}

.kd-auth-card-wide {
  width: 100%;
  max-width: 520px;
}

.kd-form-actions {
  margin: 20px 0;
}

.kd-page-title {
  margin-bottom: 16px;
}

.kd-note {
  font-size: 13px;
  color: var(--kd-text-muted);
}

.kd-note-danger {
  color: var(--kd-error);
}

.kd-text-center {
  text-align: center;
}

.kd-text-link {
  color: var(--kd-primary);
}

.kd-helper-text {
  font-size: 13px;
  margin-top: 4px;
  color: var(--kd-text-muted);
}

.kd-mt-6 { margin-top: 6px; }
.kd-mt-8 { margin-top: 8px; }
.kd-mt-12 { margin-top: 12px; }
.kd-mt-16 { margin-top: 16px; }

.kd-flex {
  display: flex;
}

.kd-flex-center {
  display: flex;
  align-items: center;
}

.kd-flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kd-flex-gap-8 {
  display: flex;
  gap: 8px;
}

.kd-pre {
  white-space: pre-wrap;
}

.kd-empty-404 {
  padding: 60px 20px;
}

.kd-404-title {
  font-size: 2rem;
  color: var(--kd-text-muted);
}

.kd-section-title {
  margin: 16px 0 8px;
}

.kd-text-link:hover {
  text-decoration: underline;
}

.kd-card-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.kd-card-body {
  flex: 1;
}

.kd-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.kd-icon-md {
  font-size: 16px;
  vertical-align: middle;
}

.kd-text-sm {
  font-size: 14px;
}

.kd-text-xs {
  font-size: 12px;
}

.kd-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
}

.kd-modal-overlay.kd-active {
  display: flex;
}

.kd-modal-inner {
  width: min(100%, 420px);
}

.kd-hidden {
  display: none !important;
}

.kd-flex-fill {
  flex: 1;
}

.kd-mb-8 {
  margin-bottom: 8px;
}

.kd-mb-16 {
  margin-bottom: 16px;
}

.kd-blocked-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.kd-link-reset {
  text-decoration: none;
  color: inherit;
}

.kd-delete-link {
  margin-left: 8px;
  font-size: 12px;
  color: inherit;
}

.kd-muted-sm {
  color: var(--kd-text-muted);
  font-size: 13px;
}

.kd-muted-info {
  margin: 6px 0;
  font-size: 14px;
  color: var(--kd-text-muted);
}

.kd-notif-item-text {
  font-size: 14px;
}

.kd-avatar-color-0 { background: #2563eb; }
.kd-avatar-color-1 { background: #059669; }
.kd-avatar-color-2 { background: #d97706; }
.kd-avatar-color-3 { background: #dc2626; }
.kd-avatar-color-4 { background: #7c3aed; }
.kd-avatar-color-5 { background: #0891b2; }

.kd-textarea-lg {
  min-height: 120px;
}

.kd-profile-link {
  display: flex;
  gap: 8px;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.kd-card-danger {
  border-color: var(--kd-error);
}

.kd-card-danger-title {
  color: var(--kd-error);
}

.kd-check-field {
  margin-bottom: 8px;
}

.kd-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
}

.kd-modal-overlay.active {
  display: flex;
}

.kd-modal-inner {
  width: min(100%, 400px);
}

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

.kd-card {
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(229,231,235,0.85);
  border-radius: var(--kd-radius);
  padding: 24px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  margin-bottom: 18px;
  backdrop-filter: blur(12px);
}

.kd-card-highlight {
  background: rgba(248, 251, 255, 0.9);
  border-color: rgba(219, 234, 254, 0.9);
}

.kd-page-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 28px 24px;
  border-radius: var(--kd-radius);
  background: linear-gradient(180deg, rgba(255,255,255,.92) 0%, rgba(255,255,255,.7) 100%), url('../assets/images/background-image.png') no-repeat center/cover;
  box-shadow: var(--kd-shadow);
}

.kd-page-subtitle {
  margin-top: 8px;
  color: var(--kd-text-muted);
  max-width: 720px;
}

.kd-post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.kd-post-actions a,
.kd-post-actions button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--kd-radius-sm);
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.15s ease;
  border: 1px solid rgba(37, 99, 235, 0.18);
  background: rgba(255, 255, 255, 0.92);
  color: var(--kd-primary);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
}

.kd-page-header h1,
.kd-page-header p {
  color: #111827;
}

.kd-post-actions a:hover,
.kd-post-actions button:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
}

.kd-post-actions button {
  cursor: pointer;
}

.kd-post-actions a .material-icons-outlined,
.kd-post-actions button .material-icons-outlined {
  font-size: 18px;
}

.kd-comment {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.kd-empty {
  background: var(--kd-bg);
  border: 1px solid var(--kd-border);
  border-radius: var(--kd-radius);
  color: var(--kd-text-muted);
  padding: 24px;
  text-align: center;
}

.kd-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--kd-bg-hover);
  color: var(--kd-text);
}

.kd-badge-info {
  background: #eff6ff;
  color: #1d4ed8;
}

.kd-badge-success {
  background: #dcfce7;
  color: #166534;
}

.kd-badge-warning {
  background: #fef9c3;
  color: #92400e;
}

.kd-badge-danger {
  background: #fee2e2;
  color: #991b1b;
}

.kd-grid {
  display: grid;
  gap: 16px;
}

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

.kd-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kd-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--kd-neutral);
  color: #fff;
  font-weight: 700;
  font-size: 18px;
}

.kd-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kd-avatar-lg {
  width: 84px;
  height: 84px;
  font-size: 28px;
}

.kd-post {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px;
  border-radius: var(--kd-radius);
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(229,231,235,0.9);
}

.kd-post-body {
  flex: 1;
}

.kd-post-meta {
  font-size: 13px;
  color: var(--kd-text-muted);
  margin-bottom: 10px;
}

.kd-post-content,
.kd-comment-content {
  line-height: 1.75;
  color: var(--kd-text);
}

.kd-post-actions a,
.kd-post-actions button {
  color: var(--kd-primary);
  font-size: 13px;
}

.kd-comment {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.kd-comment-body {
  flex: 1;
}

.kd-conversation-input {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.kd-conversation-input .kd-textarea {
  flex: 1;
  min-height: 56px;
}

.kd-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0,0,0,0.08);
  border-top-color: rgba(37,99,235,0.9);
  border-radius: 50%;
  animation: kd-spin 1s linear infinite;
  vertical-align: text-bottom;
}

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

@media (max-width: 767px) {
  .kd-grid-2,
  .kd-grid-3 {
    grid-template-columns: 1fr;
  }
}

.kd-errors ul {
  margin: 0;
  padding-left: 1.25rem;
}

.kd-errors li {
  margin-bottom: 6px;
}

/* Header */
.kd-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--kd-bg);
  border-bottom: 1px solid var(--kd-border);
  height: var(--kd-header-h);
  display: flex; align-items: center;
  padding: 0 16px;
}
.kd-header-inner {
  max-width: var(--kd-max-width); margin: 0 auto;
  width: 100%; display: flex; align-items: center; justify-content: space-between;
}
.kd-logo { font-size: 1.25rem; font-weight: 800; color: var(--kd-primary); letter-spacing: -.02em; }
.kd-logo:hover { text-decoration: none; }
.kd-header-nav { display: flex; align-items: center; gap: 4px; }
.kd-header-nav a {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: var(--kd-radius-sm);
  color: var(--kd-text); font-weight: 600; font-size: 14px;
  position: relative;
}
.kd-header-nav a:hover { background: var(--kd-bg-hover); text-decoration: none; }
.kd-nav-badge {
  position: absolute; top: 2px; right: 2px;
  background: var(--kd-error); color: #fff;
  font-size: 10px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}
.kd-nav-icon { width: 20px; height: 20px; }

/* Layout */
.kd-container {
  max-width: var(--kd-max-width);
  margin: 0 auto;
  padding: 16px;
}
.kd-main { padding-bottom: 72px; }

/* Bottom mobile nav */
.kd-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: var(--kd-bg);
  border-top: 1px solid var(--kd-border);
  display: flex; justify-content: space-around;
  padding: 6px 0 env(safe-area-inset-bottom, 0);
}
.kd-bottom-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 10px; font-size: 10px; font-weight: 600;
  color: var(--kd-text-muted); position: relative;
}
.kd-bottom-nav a:hover { text-decoration: none; color: var(--kd-primary); }
.kd-bottom-nav a.active { color: var(--kd-primary); }
.kd-bottom-nav .kd-nav-badge { top: -2px; right: 50%; transform: translateX(20px); }

/* Auth pages */
.kd-auth-wrap {
  min-height: calc(100vh - var(--kd-header-h));
  display: flex; align-items: center; justify-content: center;
  padding: 32px;
  background: linear-gradient(180deg, rgba(15,23,42,0.02) 0%, rgba(248,250,252,0.98) 100%);
}
.kd-auth-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 28px;
  width: min(100%, 1040px);
  align-items: start;
}
.kd-auth-card {
  background: rgba(255,255,255,0.98);
  border: 1px solid rgba(148,163,184,0.18);
  border-radius: calc(var(--kd-radius) * 1.15);
  padding: 42px;
  box-shadow: 0 32px 80px rgba(15,23,42,0.08);
  width: 100%;
  backdrop-filter: blur(12px);
}
.kd-auth-card-wide {
  width: 100%;
  max-width: 560px;
}
.kd-auth-panel {
  background: linear-gradient(180deg, rgba(37,99,235,0.07), rgba(255,255,255,0.96));
  border: none;
  border-radius: calc(var(--kd-radius) * 1.25);
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-shadow: 0 26px 66px rgba(15,23,42,0.08);
}
.kd-auth-panel-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  margin-bottom: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #1d4ed8;
  background: rgba(59,130,246,0.14);
  border-radius: 9999px;
}
.kd-auth-panel-title h2 {
  margin-bottom: 12px;
  font-size: 1.35rem;
}
.kd-auth-panel-title p {
  color: #475569;
  line-height: 1.8;
  margin-bottom: 20px;
}
.kd-auth-panel-card {
  background: #fff;
  border: 1px solid rgba(148,163,184,0.2);
  border-radius: 20px;
  padding: 20px 22px;
  margin-bottom: 16px;
}
.kd-auth-panel-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1rem;
  color: #0f172a;
}
.kd-auth-panel-card p {
  margin: 0;
  color: #475569;
  line-height: 1.7;
}
.kd-auth-title { text-align: left; margin-bottom: 24px; }
.kd-auth-title h1 { color: var(--kd-primary); margin-bottom: 10px; font-size: 2.2rem; line-height: 1.05; }
.kd-auth-title p { color: #475569; font-size: 1rem; }
.kd-auth-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  padding: 10px 16px;
  background: rgba(59,130,246,0.12);
  color: #1d4ed8;
  font-weight: 700;
  border-radius: 999px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 0.82rem;
}
.kd-form-section {
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(148,163,184,0.18);
  margin-bottom: 24px;
}
.kd-form-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.kd-form-section-heading {
  margin-bottom: 18px;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 700;
}
.kd-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.kd-form-note {
  margin-top: 18px;
  font-size: 0.95rem;
  color: #64748b;
}
.kd-auth-card .kd-field {
  margin-bottom: 18px;
}
.kd-label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}
.kd-input,
.kd-select,
.kd-textarea {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  background: rgba(248,250,252,0.95);
  border: 1px solid rgba(148,163,184,0.3);
  color: #0f172a;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.kd-input:focus,
.kd-select:focus,
.kd-textarea:focus {
  border-color: rgba(37,99,235,0.6);
  box-shadow: 0 0 0 4px rgba(59,130,246,0.12);
  background: #fff;
  outline: none;
}
.kd-auth-card .kd-form-actions {
  margin-top: 28px;
}
.kd-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 18px;
  font-size: 1rem;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  border: none;
  color: #fff;
  box-shadow: 0 18px 25px rgba(37,99,235,0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.kd-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 30px rgba(37,99,235,0.22);
}
.kd-btn-primary:disabled {
  opacity: 0.68;
  cursor: not-allowed;
}
.kd-errors {
  border-radius: 18px;
  background: rgba(254,226,226,0.95);
  border: 1px solid rgba(220,38,38,0.2);
  padding: 18px 20px;
  margin-bottom: 24px;
}
.kd-errors ul {
  list-style: disc inside;
}
.kd-errors li {
  color: #b91c1c;
  margin-bottom: 8px;
}
.kd-helper-text {
  font-size: 13px;
  margin-top: 8px;
  color: #64748b;
}
.kd-btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 8px;
  border: 2px solid rgba(255,255,255,0.8);
  border-top-color: rgba(255,255,255,1);
  border-radius: 50%;
  animation: kd-spin 0.8s linear infinite;
}
@keyframes kd-spin {
  to { transform: rotate(360deg); }
}
@media (max-width: 900px) {
  .kd-auth-grid {
    grid-template-columns: 1fr;
  }
  .kd-auth-wrap { padding: 20px; }
  .kd-auth-card, .kd-auth-panel { padding: 28px; }
  .kd-field-grid {
    grid-template-columns: 1fr;
  }
}
.kd-errors {
  border-radius: 18px;
  background: rgba(254,226,226,0.95);
  border: 1px solid rgba(220,38,38,0.2);
  padding: 18px 20px;
  margin-bottom: 24px;
}
.kd-errors ul {
  list-style: disc inside;
}
.kd-errors li {
  color: #b91c1c;
  margin-bottom: 8px;
}
.kd-helper-text {
  font-size: 13px;
  margin-top: 8px;
  color: #64748b;
}
.kd-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 18px;
  font-size: 1rem;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  border: none;
  color: #fff;
  box-shadow: 0 18px 25px rgba(37,99,235,0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.kd-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 28px rgba(37,99,235,0.22);
}
.kd-btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.kd-btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 8px;
  border: 2px solid rgba(255,255,255,0.8);
  border-top-color: rgba(255,255,255,1);
  border-radius: 50%;
  animation: kd-spin 0.8s linear infinite;
}
@keyframes kd-spin {
  to { transform: rotate(360deg); }
}
@media (max-width: 900px) {
  .kd-auth-grid {
    grid-template-columns: 1fr;
  }
  .kd-auth-wrap { padding: 20px; }
  .kd-auth-card, .kd-auth-panel { padding: 28px; }
}
.kd-errors {
  border-radius: 16px;
  background: rgba(254, 226, 226, 0.9);
  border: 1px solid rgba(220, 38, 38, 0.15);
  padding: 16px 18px;
  margin-bottom: 20px;
}
.kd-errors ul {
  list-style: disc inside;
}
.kd-errors li {
  color: #b91c1c;
  margin-bottom: 8px;
}
.kd-helper-text {
  font-size: 13px;
  margin-top: 6px;
  color: var(--kd-text-muted);
}
.kd-btn-primary {
  padding: 14px 18px;
  font-size: 1rem;
}
.kd-btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.8);
  border-top-color: rgba(255,255,255,1);
  border-radius: 50%;
  animation: kd-spin 0.8s linear infinite;
}
@keyframes kd-spin {
  to { transform: rotate(360deg); }
}
@media (max-width: 900px) {
  .kd-auth-grid {
    grid-template-columns: 1fr;
  }
}

/* Profile */
.kd-profile-header {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 24px; background: var(--kd-bg);
  border: 1px solid var(--kd-border); border-radius: var(--kd-radius);
  margin-bottom: 16px;
}
.kd-profile-name { font-size: 1.25rem; font-weight: 700; }
.kd-profile-meta { color: var(--kd-text-muted); font-size: 14px; }
.kd-profile-info { text-align: center; }
.kd-profile-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.kd-profile-section { margin-top: 16px; }
.kd-profile-section h3 { margin-bottom: 8px; }
.kd-hobby-tag {
  display: inline-block; padding: 4px 12px; margin: 2px;
  background: var(--kd-neutral); border-radius: 20px; font-size: 13px;
}

/* Messages */
.kd-messages-header {
  margin-bottom: 18px;
}
.kd-messages-header .kd-page-title {
  margin-bottom: 8px;
}
.kd-messages-header .kd-text-muted {
  font-size: 0.95rem;
}
.kd-inbox-list {
  background: #fff;
  border: 1px solid rgba(148,163,184,0.16);
  border-radius: calc(var(--kd-radius) * 1.1);
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(15,23,42,0.05);
}
.kd-inbox-item {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(148,163,184,0.14);
  cursor: pointer;
  align-items: center;
  transition: background 0.2s ease;
}
.kd-inbox-item:last-child { border-bottom: none; }
.kd-inbox-item:hover { background: rgba(59,130,246,0.06); }
.kd-inbox-item.unread { background: rgba(37,99,235,0.08); }
.kd-inbox-item-info { flex: 1; min-width: 0; }
.kd-inbox-item-info > div:first-child { font-weight: 700; margin-bottom: 4px; }
.kd-inbox-item-preview { font-size: 0.95rem; color: var(--kd-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kd-inbox-item-time { margin-top: 6px; font-size: 12px; color: var(--kd-text-muted); }
.kd-unread-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--kd-primary); flex-shrink: 0; margin-left: 12px; }

.kd-conversation {
  display: flex;
  flex-direction: column;
  min-height: 65vh;
  background: #fff;
  border: 1px solid rgba(148,163,184,0.16);
  border-radius: calc(var(--kd-radius) * 1.1);
  padding: 24px;
  box-shadow: 0 20px 40px rgba(15,23,42,0.06);
}
.kd-conversation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.kd-conversation-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}
.kd-profile-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.kd-conversation-user strong {
  display: block;
  font-size: 1rem;
}
.kd-conversation-user .kd-text-muted {
  margin-top: 2px;
  font-size: 0.9rem;
}
.kd-conversation-messages {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 4px;
  margin-bottom: 18px;
  overflow-y: auto;
}
.kd-conversation-messages .kd-empty {
  padding: 26px 0;
  text-align: center;
  color: var(--kd-text-muted);
}
.kd-msg-bubble {
  max-width: 75%;
  padding: 14px 18px;
  border-radius: 22px;
  position: relative;
  line-height: 1.6;
  font-size: 0.97rem;
}
.kd-msg-mine {
  align-self: flex-end;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.kd-msg-theirs {
  align-self: flex-start;
  background: #f8fafc;
  color: #0f172a;
  border-bottom-left-radius: 4px;
}
.kd-msg-time {
  font-size: 12px;
  color: var(--kd-text-muted);
  margin-top: 4px;
}
.kd-conversation-input {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.kd-conversation-input .kd-textarea {
  flex: 1;
  min-height: 56px;
  max-height: 140px;
  border-radius: 18px;
}
.kd-conversation-input .kd-btn {
  flex-shrink: 0;
  min-width: 120px;
}
.kd-msg-waiting {
  padding: 14px 18px;
  text-align: center;
  background: #f1f5f9;
  border: 1px solid rgba(148,163,184,0.2);
  border-radius: 16px;
  color: #334155;
  font-size: 0.95rem;
  margin-bottom: 18px;
}

/* Notifications */
.kd-notif-item { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--kd-border); align-items: center; }
.kd-notif-item:last-child { border-bottom: none; }
.kd-notif-item.unread { background: #eff6ff; }
.kd-notif-item-info { flex: 1; }
.kd-notif-item-time { font-size: 11px; color: var(--kd-text-muted); }

/* Find People */
.kd-search-filters { background: var(--kd-bg); border: 1px solid var(--kd-border); border-radius: var(--kd-radius); padding: 20px; margin-bottom: 16px; }
.kd-search-results { display: grid; gap: 12px; }

/* Pagination */
.kd-pagination { display: flex; gap: 8px; justify-content: center; margin-top: 20px; }

/* Footer */
.kd-footer { text-align: center; padding: 24px 16px; color: var(--kd-text-muted); font-size: 13px; }
.kd-footer a { color: var(--kd-text-muted); }

/* Responsive */
@media (min-width: 768px) {
  :root { --kd-max-width: 720px; }
  .kd-bottom-nav { display: none; }
}
@media (min-width: 1024px) {
  :root { --kd-max-width: 800px; }
  .kd-header-nav a span.kd-nav-label { display: inline; }
}
@media (max-width: 767px) {
  .kd-header-nav a span.kd-nav-label { display: none; }
  .kd-header-nav a { padding: 8px 10px; }
}
