body { margin: 0; font-family: -apple-system, Segoe UI, Roboto, Arial, sans-serif; background: #eef1f3; color: #1f2937; }

header.top {
  background: #1c4d3a; color: #fff; display: flex; align-items: center; gap: 16px;
  padding: 14px 24px;
}
header.top .logo { display: flex; align-items: center; gap: 10px; font-size: 1.4rem; font-weight: 800; color: #fff; text-decoration: none; }
header.top .logo span.icon { font-size: 1.6rem; }
header.top .logo .logo-img { height: 76px; width: auto; border-radius: 8px; display: block; }
header.top .search { flex: 1; max-width: 560px; margin: 0 auto; }
header.top .search input {
  width: 100%; border: none; border-radius: 999px; padding: 10px 18px;
  font-size: 0.95rem; background: #fff; color: #1f2937;
}
header.top .actions { display: flex; align-items: center; gap: 14px; margin-left: auto; }
header.top .lang { background: #2f6b53; color: #fff; border: none; border-radius: 6px; padding: 8px 12px; font-size: 0.9rem; }
header.top a.icon-btn {
  color: #fff; text-decoration: none; font-size: 1.2rem; opacity: 0.9;
}
header.top a.icon-btn:hover { opacity: 1; }

header.top a.btn-add {
  display: inline-flex; align-items: center; gap: 8px;
  background: #e8a83c; color: #1c4d3a; text-decoration: none;
  font-weight: 700; font-size: 0.95rem; padding: 10px 18px;
  border-radius: 999px; box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  transition: transform 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
header.top a.btn-add:hover { background: #f4bb55; transform: translateY(-1px); }
header.top a.btn-add .icon { font-size: 1.05rem; }

.layout {
  display: grid; grid-template-columns: 270px 1fr 300px; gap: 20px;
  max-width: 1280px; margin: 20px auto; padding: 0 20px; align-items: start;
}
@media (max-width: 960px) { .layout { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid #e4e7ea; border-radius: 12px;
  padding: 18px; margin-bottom: 16px;
}
.card h2 { font-size: 1.05rem; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }

.profile-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; text-decoration: none; color: inherit; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; color: #fff; font-weight: 700; flex-shrink: 0;
}
.avatar.has-image { background-size: cover; background-position: center; color: transparent; }
.profile-row .name { font-weight: 600; font-size: 0.95rem; }
.profile-row .title { color: #6b7280; font-size: 0.82rem; }
.see-more { display: block; text-align: center; color: #2563eb; text-decoration: none; margin-top: 8px; font-size: 0.9rem; }

.post { display: flex; gap: 12px; scroll-margin-top: 20px; }
.post.highlight { outline: 2px solid #e8a83c; outline-offset: 2px; }
.post .avatar { width: 44px; height: 44px; }
.post .body { flex: 1; min-width: 0; }
.post .name { font-weight: 700; }
.post .meta { color: #6b7280; font-size: 0.85rem; margin-bottom: 8px; }
.post .quote { font-size: 1rem; line-height: 1.5; margin: 0 0 12px; white-space: pre-wrap; }
.post .stats { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; color: #6b7280; font-size: 0.9rem; border-top: 1px solid #eee; padding-top: 10px; }
.post .stats .stat-btn, .post .stats .stat-link {
  background: none; border: none; padding: 0; margin: 0; color: inherit; font: inherit;
  cursor: pointer; text-decoration: none;
}
.post .stats .stat-btn:hover, .post .stats .stat-link:hover { color: #1c4d3a; }
.post .stats .text-danger { color: #b3413a; }
.post .stats .text-danger:hover { color: #8f322c; }

.avatar-sm { width: 28px; height: 28px; font-size: 0.75rem; }

.comments { margin-top: 14px; border-top: 1px solid #eee; padding-top: 12px; }
.comments-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.comment-row { display: flex; gap: 8px; align-items: flex-start; }
.comment-body { flex: 1; background: #f5f6f7; border-radius: 10px; padding: 8px 12px; min-width: 0; }
.comment-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.comment-name { font-weight: 600; font-size: 0.85rem; }
.comment-head .text-danger { background: none; border: none; cursor: pointer; color: #b3413a; font-size: 0.85rem; }
.comment-head .text-danger:hover { color: #8f322c; }
.comment-text { font-size: 0.9rem; margin-top: 2px; white-space: pre-wrap; }
.comment-form { display: flex; flex-direction: column; gap: 8px; }
.comment-form select, .comment-form textarea { width: 100%; box-sizing: border-box; }
.comment-form button { align-self: flex-end; }
.show-all-comments { background: none; border: none; cursor: pointer; color: #2e7d5b; font-size: 0.85rem; font-weight: 600; padding: 0 0 10px; text-align: left; }
.show-all-comments:hover { color: #1c4d3a; }

.share-menu {
  position: absolute; z-index: 50; background: #fff; border: 1px solid #e4e7ea;
  border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.18); padding: 6px;
  display: flex; flex-direction: column; min-width: 180px;
}
.share-menu a, .share-menu button {
  display: block; width: 100%; box-sizing: border-box; padding: 8px 10px; border-radius: 6px;
  text-decoration: none; color: #1f2937; background: none; border: none; text-align: left;
  font-size: 0.9rem; font-family: inherit; cursor: pointer;
}
.share-menu a:hover, .share-menu button:hover { background: #eef1f3; }

.empty { text-align: center; color: #6b7280; padding: 24px 8px; }
.empty a { color: #2563eb; }

.day-item { border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
.day-item.day-blue { background: #e6eefc; }
.day-item.day-green { background: #e4f5e9; }
.day-item.day-purple { background: #f0e9fb; }
.day-item .date { font-weight: 700; font-size: 0.85rem; }
.day-item .desc { font-size: 0.85rem; color: #374151; }

.featured { text-align: center; }
.featured .avatar { width: 64px; height: 64px; font-size: 1.4rem; margin: 0 auto 10px; }
.featured .name { font-weight: 700; }
.featured .title { color: #6b7280; font-size: 0.85rem; margin-bottom: 8px; }
.featured .desc { font-size: 0.85rem; color: #374151; }

/* Shared page chrome (profile create/edit + overview) */
.page { max-width: 640px; margin: 24px auto; padding: 0 20px; }
.page h1 { font-size: 1.6rem; margin: 0 0 20px; }

.page-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 20px;
}
.page-header h1 { margin: 0; }
.page-header .btn-add {
  display: inline-flex; align-items: center; gap: 8px;
  background: #e8a83c; color: #1c4d3a; text-decoration: none;
  font-weight: 700; font-size: 0.95rem; padding: 10px 18px;
  border-radius: 999px; box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  transition: transform 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.page-header .btn-add:hover { background: #f4bb55; transform: translateY(-1px); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { color: #6b7280; font-size: 0.85rem; }
.field label .req { color: #b3413a; font-weight: 700; }
.required-note { color: #6b7280; font-size: 0.8rem; margin: -8px 0 16px; }
input, textarea {
  padding: 10px 14px; border-radius: 8px; border: 1px solid #d7dbde;
  background: #fff; color: #1f2937; font-size: 0.95rem; font-family: inherit;
}
input:focus, textarea:focus { outline: 2px solid #1c4d3a; outline-offset: 1px; }

.citater-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.citat-row { display: flex; gap: 8px; }
.citat-row input { flex: 1; }

.btn {
  display: inline-block; padding: 10px 20px; border-radius: 8px; border: none;
  cursor: pointer; font-size: 0.95rem; font-weight: 600; text-decoration: none;
  background: #1c4d3a; color: #fff;
}
.btn.secondary { background: #eef1f3; color: #1c4d3a; border: 1px solid #d7dbde; }
.btn.danger { background: #b3413a; color: #fff; }
.btn.full { width: 100%; }
#msg { margin-top: 12px; text-align: center; color: #1c4d3a; min-height: 1.2em; }

.profile-card .head { display: flex; align-items: center; gap: 12px; }
.profile-card .head h3 { margin: 0; }
.profile-card .avatar { width: 48px; height: 48px; font-size: 1.2rem; }
.profile-card .meta { color: #6b7280; font-size: 0.85rem; margin: 4px 0 8px; }
.profile-card ul { margin: 8px 0; padding-left: 20px; color: #374151; }
.profile-card .actions { display: flex; gap: 8px; margin-top: 12px; }

/* Spreadsheet-style profile entry grid */
.sheet-wrap { overflow-x: auto; background: #fff; border: 1px solid #e4e7ea; border-radius: 12px; }
table.sheet { border-collapse: collapse; width: 100%; min-width: 900px; }
table.sheet th, table.sheet td { border: 1px solid #e4e7ea; padding: 0; }
table.sheet th {
  background: #eef1f3; color: #374151; font-size: 0.8rem; font-weight: 700;
  padding: 8px 10px; text-align: left; white-space: nowrap; position: sticky; top: 0;
}
table.sheet td.rownum {
  background: #f5f6f7; color: #9aa1a9; text-align: center; font-size: 0.8rem;
  width: 36px; user-select: none;
}
table.sheet input {
  width: 100%; box-sizing: border-box; border: none; padding: 8px 10px;
  font-size: 0.9rem; font-family: inherit; background: transparent; color: #1f2937;
}
table.sheet input:focus { outline: 2px solid #1c4d3a; outline-offset: -2px; position: relative; z-index: 1; background: #fff; }
table.sheet tbody tr:nth-child(even) td:not(.rownum) { background: #fafbfc; }
