.flk-page-wrap, .flk-navbar, .flk-auth-box {
  --flk-blue: #1877f2;
  --flk-blue-dark: #166fe5;
  --flk-bg: #f0f2f5;
  --flk-card: #ffffff;
  --flk-text: #050505;
  --flk-muted: #65676b;
  --flk-border: #ced0d4;
}

.flk-page-wrap * , .flk-navbar *, .flk-auth-box * { box-sizing: border-box; }

.flk-page-wrap a, .flk-navbar a, .flk-auth-box a { text-decoration: none; color: inherit; }

.flk-icon { width: 20px; height: 20px; flex-shrink: 0; vertical-align: middle; }
.flk-icon-like { width: 18px; height: 18px; }

.flk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s;
}
.flk-btn .flk-icon { width: 16px; height: 16px; }
.flk-btn-primary { background: var(--flk-blue); color: #fff; }
.flk-btn-primary:hover { background: var(--flk-blue-dark); color: #fff; }
.flk-btn-secondary { background: #e4e6eb; color: var(--flk-text); }
.flk-btn-secondary:hover { background: #d8dadf; }
.flk-btn-block { display: block; width: 100%; }

.flk-card {
  background: var(--flk-card);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  padding: 16px;
  margin-bottom: 16px;
}

/* Navbar */
.flk-navbar {
  background: var(--flk-card);
  border-bottom: 1px solid var(--flk-border);
  margin: -8px -8px 20px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.flk-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  flex-wrap: wrap;
  gap: 8px;
}
.flk-nav-left { display: flex; align-items: center; gap: 12px; }
.flk-logo { font-size: 26px; font-weight: 800; color: var(--flk-blue); letter-spacing: -0.5px; }
.flk-logo span { color: var(--flk-text); }
.flk-search-form { position: relative; display: flex; align-items: center; }
.flk-search-form .flk-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--flk-muted);
  pointer-events: none;
}
.flk-search-form input {
  background: var(--flk-bg);
  border: none;
  border-radius: 20px;
  padding: 9px 14px 9px 36px;
  width: 220px;
  font-size: 14px;
  transition: background 0.15s;
}
.flk-search-form input:focus { background: #e4e6eb; outline: none; }
.flk-nav-right { display: flex; align-items: center; gap: 8px; }
.flk-nav-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--flk-bg);
  color: var(--flk-text);
  transition: background 0.15s;
}
.flk-nav-icon-btn:hover { background: #e4e6eb; }
.flk-nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  padding: 4px 10px 4px 4px;
  border-radius: 20px;
  transition: background 0.15s;
}
.flk-nav-user:hover { background: var(--flk-bg); }
.flk-nav-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.flk-logout-form { margin: 0; }
.flk-btn-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--flk-bg);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  color: var(--flk-text);
  transition: background 0.15s;
}
.flk-btn-logout:hover { background: #e4e6eb; }

/* Layout */
.flk-page-wrap { max-width: 1100px; margin: 0 auto; }
.flk-feed-layout {
  display: grid;
  grid-template-columns: 220px 1fr 260px;
  gap: 16px;
  align-items: start;
}
.flk-profile-feed { grid-template-columns: 1fr; }
.flk-profile-feed .flk-main-col { max-width: 680px; margin: 0 auto; }
.flk-main-col { min-width: 0; }
.flk-side-col { position: sticky; top: 12px; }
.flk-side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}
.flk-side-link:hover { background: var(--flk-bg); }
.flk-side-title { font-weight: 700; color: var(--flk-muted); font-size: 13px; text-transform: uppercase; margin-bottom: 8px; }
.flk-side-note { color: var(--flk-muted); font-size: 13px; line-height: 1.5; }

/* Auth pages */
.flk-auth-box {
  display: flex;
  align-items: center;
  gap: 60px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 24px 0;
}
.flk-auth-brand h1 { color: var(--flk-blue); font-size: 48px; margin-bottom: 8px; }
.flk-auth-brand h1 span { color: var(--flk-text); }
.flk-auth-brand p { font-size: 20px; max-width: 400px; }
.flk-auth-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  padding: 20px 24px;
  width: 340px;
}
.flk-auth-card h2 { text-align: center; margin-top: 0; }
.flk-auth-form { display: flex; flex-direction: column; gap: 12px; }
.flk-auth-form input {
  padding: 12px;
  border: 1px solid var(--flk-border);
  border-radius: 6px;
  font-size: 15px;
  width: 100%;
}
.flk-alert { padding: 10px 12px; border-radius: 6px; margin-bottom: 12px; font-size: 14px; }
.flk-alert-error { background: #fde2e1; color: #b3261e; }
.flk-auth-card hr { border: none; border-top: 1px solid var(--flk-border); margin: 16px 0; }

/* Avatars */
.flk-avatar { border-radius: 50%; object-fit: cover; display: block; }
.flk-avatar-sm { width: 32px; height: 32px; }
.flk-avatar-md { width: 40px; height: 40px; }
.flk-avatar-lg { width: 80px; height: 80px; }
.flk-avatar-xl { width: 120px; height: 120px; border: 4px solid #fff; box-shadow: 0 0 0 1px var(--flk-border); }

/* Composer */
.flk-composer-row { display: flex; align-items: center; gap: 10px; }
.flk-composer-row textarea {
  flex: 1;
  border: none;
  background: var(--flk-bg);
  border-radius: 20px;
  padding: 10px 16px;
  resize: none;
  font-size: 15px;
  font-family: inherit;
}
.flk-composer-preview-wrap img { max-width: 100%; border-radius: 8px; margin-top: 10px; }
.flk-composer-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  border-top: 1px solid var(--flk-border);
  padding-top: 10px;
}
.flk-btn-file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  color: var(--flk-muted);
  padding: 8px 10px;
  border-radius: 6px;
}
.flk-btn-file:hover { background: var(--flk-bg); }
.flk-btn-file input { display: none; }
.flk-btn-file .flk-icon { color: #45bd62; }

/* Post card */
.flk-post-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.flk-post-author { font-weight: 600; font-size: 15px; }
.flk-post-time { font-size: 12px; color: var(--flk-muted); }
.flk-post-content { font-size: 15px; line-height: 1.4; margin-bottom: 10px; white-space: pre-wrap; }
.flk-post-image { width: 100%; border-radius: 8px; margin-bottom: 10px; max-height: 500px; object-fit: cover; }
.flk-post-stats {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--flk-muted);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--flk-border);
}
.flk-post-actions {
  display: flex;
  gap: 4px;
  padding: 6px 0;
  border-bottom: 1px solid var(--flk-border);
}
.flk-like-form { flex: 1; margin: 0; }
.flk-like-btn, .flk-btn-comment-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: none;
  border: none;
  padding: 9px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  color: var(--flk-muted);
  cursor: pointer;
  transition: background 0.15s;
}
.flk-like-btn:hover, .flk-btn-comment-toggle:hover { background: var(--flk-bg); }
.flk-like-btn.liked { color: var(--flk-blue); }
.flk-like-btn.liked .flk-icon-like { fill: var(--flk-blue); }

/* Comments */
.flk-comments-list { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.flk-comment { display: flex; gap: 8px; align-items: flex-start; }
.flk-comment-bubble {
  background: var(--flk-bg);
  border-radius: 14px;
  padding: 8px 12px;
}
.flk-comment-author { font-weight: 600; font-size: 13px; display: block; }
.flk-comment-text { font-size: 14px; }
.flk-comment-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.flk-comment-form input[type=text] {
  flex: 1;
  border: none;
  background: var(--flk-bg);
  border-radius: 18px;
  padding: 8px 14px;
  font-size: 14px;
}
.flk-btn-send {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--flk-blue);
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  cursor: pointer;
}
.flk-btn-send:hover { color: var(--flk-blue-dark); }
.flk-btn-send .flk-icon { width: 18px; height: 18px; }

/* Profile */
.flk-profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.flk-profile-info { flex: 1; min-width: 200px; }
.flk-profile-info h2 { margin: 0 0 4px; }
.flk-profile-bio { margin: 4px 0; color: var(--flk-text); }
.flk-profile-meta { color: var(--flk-muted); font-size: 13px; margin: 4px 0 0; }

.flk-edit-profile-card { max-width: 500px; margin: 0 auto; }
.flk-edit-avatar-row { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.flk-edit-form { display: flex; flex-direction: column; gap: 6px; }
.flk-edit-form label { font-weight: 600; font-size: 13px; margin-top: 8px; }
.flk-edit-form input[type=text], .flk-edit-form textarea {
  padding: 10px;
  border: 1px solid var(--flk-border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  width: 100%;
}
.flk-edit-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* Search */
.flk-search-results { max-width: 500px; margin: 0 auto; }
.flk-search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 6px;
  font-weight: 600;
}
.flk-search-result-item:hover { background: var(--flk-bg); }

.flk-empty-state { text-align: center; color: var(--flk-muted); padding: 40px 16px; }

@media (max-width: 900px) {
  .flk-feed-layout { grid-template-columns: 1fr; }
  .flk-side-col { display: none; }
  .flk-search-form input { width: 140px; }
}
