/* =====================================================================
   Portal design ("C – business"): calm, dense, flat. Loaded after style.css and overrides it. Dark full-height side menu with
   the logo, white work area, small radii, no gradients or decorations.
   ===================================================================== */
:root {
  --r: 0; --shadow: none; --bg: #f7f7f8; --soft: #f4f4f5; --line: #e4e4e7; --text: #18181b; --muted: #71717a;
  --tint: color-mix(in srgb, var(--c1) 8%, white);
  --side: color-mix(in srgb, var(--c1) 22%, #0c0f17);
}
body { font-family: "IBM Plex Sans", "Segoe UI", Arial, sans-serif; }
h1 { font-size: 1.55rem; font-weight: 600; letter-spacing: -.015em; }
h2 { font-size: 1.02rem; font-weight: 600; }
.demo { background: var(--side); color: #d4d4d8; }
.card { border-radius: 0; box-shadow: none; padding: 18px 20px; }
.card-h > a { color: var(--muted); font-weight: 500; }
.btn { border-radius: 0; box-shadow: none; padding: .5em 1em; font-weight: 500; }
.btn:hover { box-shadow: none; }
.chip { border-radius: 0; }
.pill { border-radius: 0; }
.badge-sample { border-radius: 0; background: #f4f4f5; color: #52525b; border: 1px solid #e4e4e7; }
.tag { border-radius: 0; }
.seg { border-radius: 0; }
.seg-btn { border-radius: 0; padding: .4em 1em; font-weight: 500; }
input, textarea, select { border-radius: 0; box-shadow: none; border-color: #d4d4d8; }
.pill-select { border-radius: 0; }
.comment-form input { border-radius: 0; }
.icon-btn { border-radius: 0; width: 36px; height: 36px; font-size: 1.2rem; }
.note { border-radius: 0; background: #fafafa; border-color: var(--line); color: var(--text); border-left: 3px solid var(--c1); }
.hero { background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: 0; padding: 24px 26px; }
.hero::after { display: none; }
.hero h1 { font-size: 1.7rem; }
.hero-k { color: var(--c1); opacity: 1; font-size: .75rem; }
.hero-meta { color: var(--muted); }
.hero-next { background: var(--soft); border-color: var(--line); backdrop-filter: none; border-radius: 0; color: var(--text); }
.hero-next:hover { background: var(--tint); }
.hero .datebox { background: var(--c1); color: var(--on1); }
.stat { border-radius: 0; box-shadow: none; padding: 14px 16px; }
.stat:hover { transform: none; box-shadow: none; border-color: #a1a1aa; }
.stat-ic { border-radius: 0; width: 40px; height: 40px; }
.stat b { font-weight: 600; }
.datebox { border-radius: 0; background: var(--soft); color: var(--text); border: 1px solid var(--line); }
.mcard { border-radius: 0; box-shadow: none; padding: 18px 12px 14px; }
.mcard:hover { transform: none; box-shadow: none; border-color: var(--c1); }
.mcard .av { box-shadow: none; }
.mrole { color: var(--muted); font-weight: 500; }
.profile-cover { background: var(--side); height: 110px; }
.av-empty { background: var(--soft); color: var(--c1); border: 1px solid var(--line); }
.logo-empty { background: var(--c1); }
.pos { border-radius: 0; }
.pos-big { background: #fff; }
.cal-cell { border-radius: 0; background: #fff; border: 1px solid var(--line); }
.cal-cell.empty { border: 0; background: transparent; }
.cal-ev { border-radius: 0; background: var(--tint); color: var(--c1); font-weight: 600; }
.ev-detail { border-top: 1px solid var(--line); }
.bar span { background: var(--c1); }
.bar-row.mine .bar span { background: var(--c2); }
label.radio { border-radius: 0; }
.mitem { border-radius: 0; box-shadow: none; }
.comment { border-radius: 0; }
.flash { border-radius: 0; }
.bday-hl, .bd-today { background: #fff; border-color: var(--c2); }
.auth { background: var(--side); }
.auth-card { border-radius: 0; }

@media (min-width: 861px) {
  /* full-height dark side menu holding the logo */
  .in-app .demo, .in-app .top, .in-app .layout { margin-left: 232px; }
  .layout { grid-template-columns: 1fr; max-width: none; }
  .top { background: #fff; backdrop-filter: none; padding: 10px 28px; min-height: 58px; }
  .brand { display: none; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 232px; height: auto; z-index: 25;
    background: var(--side); padding: 14px 12px; gap: 1px; align-self: stretch; }
  .side-brand { display: flex !important; flex-direction: column; align-items: flex-start !important; gap: 10px !important;
    padding: 6px 8px 18px !important; margin-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,.08); border-radius: 0 !important; }
  .side-brand .logo { background: #fff; border-radius: 0; padding: 6px 8px; height: 52px; }
  .side-brand span { color: #fafafa; font-weight: 600; font-size: .92rem; line-height: 1.3; }
  .side-brand:hover { background: transparent !important; }
  .side a { color: #a1a1aa; font-size: .9rem; padding: .55em .8em; border-radius: 0; }
  .side a .ic { color: #71717a; }
  .side a:hover { background: rgba(255,255,255,.06); color: #fafafa; text-decoration: none; }
  .side a.on { background: rgba(255,255,255,.1); color: #fff; box-shadow: none; font-weight: 500; }
  .side a.on .ic { color: var(--c2); }
  main { padding: 24px 28px 80px; }
}

/* ---------- "My clubs" screen (after login) ---------- */
.top.plain { position: static; background: #fff; padding: 12px 28px; }
.brand-plain { display: flex; gap: .5em; align-items: center; font-weight: 600; }
.top.plain .top-tools { width: auto; margin-left: auto; }
.clubs-main { max-width: 1200px; margin: 0 auto; padding: 32px 28px 80px; }
.club-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.club-card { display: flex; flex-direction: column; gap: 6px; border-top: 4px solid var(--kc); margin: 0; }
.club-card h2 { margin: 6px 0 0; }
.club-card .btn { margin-top: auto; }
.club-card-top { height: 90px; display: flex; align-items: center; }
.join-list { display: flex; flex-direction: column; }
.join-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.btn-sm { padding: .4em .8em; font-size: .88rem; }

/* ---------- assemblies, votes, trips ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 18px; align-items: start; }
.row-link.sel { background: var(--tint); }
.agenda { margin: 0 0 .5em; padding-left: 1.3em; }
.agenda li { padding: .15em 0; }
.pre { white-space: pre-wrap; }
.mt-s { margin-top: .4em; }
.vote-in { border: 1px solid var(--line); border-radius: 0; padding: 12px 14px; margin: 0 0 10px; background: #fcfcfd; }
.vote-q { margin: .2em 0 .4em; font-size: 1rem; }
.vote-result { margin: .6em 0 .3em; }
.res-yes { color: #067647; } .res-no { color: #b42318; }
.add-vote { margin: 6px 0 4px; }
.add-vote > summary { list-style: none; cursor: pointer; }
.add-vote > summary::-webkit-details-marker { display: none; }
.add-vote[open] > summary { margin-bottom: 4px; }
.sel-wrap { position: relative; }
.close-x { position: absolute; right: 12px; top: 12px; z-index: 2; }
.sel-wrap .card-h { padding-right: 48px; }
.table-wrap { overflow-x: auto; }
.register { width: 100%; border-collapse: collapse; font-size: .92rem; }
.register th { text-align: left; font-weight: 600; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em;
  padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.register td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.register tbody tr { cursor: pointer; }
.register tbody tr:hover { background: var(--soft); }
.register tr.sel { background: var(--tint); }
.register .origin { display: flex; gap: .4em; align-items: center; }
.register .origin + .muted { display: block; }
.nowrap { white-space: nowrap; }
.trip { display: block; color: var(--text); text-decoration: none !important; }
.trip:hover { border-color: #a1a1aa; }
.trip.sel { border-color: var(--c1); box-shadow: 0 0 0 1px var(--c1); }
.trip.past { opacity: .6; }
.trip-top { display: flex; gap: 12px; align-items: flex-start; margin-bottom: .6em; }
.trip h2 { font-size: 1rem; }
.pill-trip { background: var(--tint2); color: color-mix(in srgb, var(--c2) 45%, black); }

@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .top.plain { padding: 10px 16px; }
  .top.plain .top-tools { width: auto; }
  .clubs-main { padding: 20px 16px 60px; }
  .register th:nth-child(2), .register td:nth-child(2) { display: none; }
}

/* ---------- photo albums ---------- */
.album-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin: 4px 0 8px; }
.album-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 0 0 10px; border: 1px solid var(--line); border-radius: 0;
  background: #fff; font: inherit; cursor: pointer; text-align: left; overflow: hidden; }
.album-tile:hover { border-color: var(--c1); }
.album-tile img, .album-empty { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: grid; place-items: center; background: var(--soft); color: var(--muted); margin-bottom: 6px; }
.album-empty .ic { width: 2em; height: 2em; }
.album-name { font-weight: 600; padding: 0 10px; }
.album-tile .muted { padding: 0 10px; }
.media-tree .tree-btn .ic { color: var(--c1); }

/* ---------- pop-up window ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 100; background: rgba(9, 12, 20, .55); display: flex; align-items: flex-start; justify-content: center;
  padding: 6vh 16px; overflow-y: auto; }
.modal { position: relative; width: 100%; max-width: 620px; background: #fff; border-radius: 0; padding: 24px; box-shadow: 0 24px 64px rgba(0, 0, 0, .3); }
.modal h2 { padding-right: 44px; margin-bottom: 1em; font-size: 1.15rem; }
.modal .close-x { position: absolute; right: 14px; top: 14px; }
.modal-btns { margin-top: 1.2em; }

/* ---------- news: one column, social-feed style ---------- */
.feed { display: block; max-width: 640px; margin: 0 auto; }
.composer { display: flex; gap: 12px; align-items: center; padding: 14px 16px; }
.composer-btn { flex: 1; text-align: left; background: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: .7em 1.1em;
  font: inherit; color: var(--muted); cursor: pointer; }
.composer-btn:hover { background: #ececef; }
.post { padding: 0; overflow: hidden; }
.post-h { display: flex; gap: 12px; align-items: center; padding: 16px 18px 8px; margin: 0; }
.post-body { padding: 4px 18px 12px; }
.post-body h2 { font-size: 1.05rem; margin: 0 0 .35em; }
.post-body p { margin: 0 0 .5em; }
.post .post-img { width: 100%; max-height: 520px; object-fit: cover; display: block; border-radius: 0; margin: 0; }
.post-stats { display: flex; justify-content: space-between; align-items: center; padding: 10px 18px 6px; color: var(--muted); font-size: .88rem; }
.like-dot { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--c1); color: #fff; vertical-align: middle; }
.like-dot .ic { width: 12px; height: 12px; fill: currentColor; }
.link-btn { background: none; border: 0; font: inherit; color: var(--muted); cursor: pointer; padding: 0; }
.link-btn:hover { text-decoration: underline; }
.post-bar { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); margin: 0 12px; padding: 4px 0; }
.post-btn { display: flex; gap: .5em; align-items: center; justify-content: center; background: none; border: 0; font: inherit; font-weight: 600;
  color: var(--muted); padding: .6em; border-radius: 0; cursor: pointer; }
.post-btn:hover { background: var(--soft); }
.post-btn.on { color: var(--c1); }
.post-btn.on .ic { fill: currentColor; }
.post-comments { border-top: 1px solid var(--line); padding: 12px 18px 14px; }
.cmt { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 10px; }
.cmt-bubble { background: var(--soft); border-radius: 0; padding: 8px 12px; font-size: .93rem; }
.post-comments .comment-form { align-items: center; }
.icon-btn.sm { width: 32px; height: 32px; font-size: 1.1rem; }

/* ---------- members: big square photos ---------- */
.mgrid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.mcard { padding: 0 0 14px; overflow: hidden; gap: 2px; }
.mphoto { display: block; width: 100%; aspect-ratio: 1 / 1; background: var(--soft); margin-bottom: 10px; overflow: hidden; }
.mphoto img, .profile-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; display: block; transition: transform .3s; }
.mcard:hover .mphoto img { transform: scale(1.03); }
.mphoto-empty { display: grid; place-items: center; width: 100%; height: 100%; font-size: 2.4rem; font-weight: 600; color: var(--c1); }
.mcard .mname, .mcard .mrole, .mcard > .muted, .mcard .tags { padding: 0 10px; }
.profile2 { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: 28px; align-items: start; }
.profile-photo { display: block; aspect-ratio: 1 / 1; border-radius: 0; overflow: hidden; background: var(--soft); }
@media (max-width: 860px) {
  .profile2 { grid-template-columns: 1fr; }
  .mgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal { padding: 18px; }
}

/* ---------- home: 3 tiles ---------- */
.stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 600px) { .stats { grid-template-columns: 1fr; } }

/* ---------- news: list on the left, whole post on the right ---------- */
.news-wrap { display: grid; grid-template-columns: minmax(0, 480px) minmax(0, 1fr); gap: 24px; align-items: start; }
.news-wrap .feed { grid-column: 1; grid-row: 1; max-width: none; margin: 0; }
.news-detail { grid-column: 2; grid-row: 1; position: sticky; top: 74px; max-height: calc(100vh - 90px); overflow-y: auto; margin: 0; }
.post-body h2 { font-size: 1.3rem; line-height: 1.3; }
.post-body p { font-size: 1.07rem; line-height: 1.6; }
.post.list { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.post.list:hover { border-color: #a1a1aa; }
.post.list.sel { border-color: var(--c1); box-shadow: 0 0 0 2px var(--c1); }
.post.list .post-body p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post.list .post-img { max-height: 260px; }
.post.list .post-stats { padding-bottom: 12px; }
.news-detail .post-body h1 { font-size: 1.75rem; line-height: 1.25; margin: .2em 0 .5em; }
.news-detail .post-body p { font-size: 1.15rem; line-height: 1.7; white-space: pre-wrap; }
.news-detail .post-img { max-height: none; }
.news-detail .detail-close { position: absolute; right: 14px; top: 14px; z-index: 2; }
.news-detail .post-h { padding-right: 60px; }
@media (max-width: 1100px) {
  .news-wrap { grid-template-columns: 1fr; }
  .news-wrap .feed, .news-detail { grid-column: 1; grid-row: auto; }
  .news-detail { position: relative; top: 0; max-height: none; margin-bottom: 18px; }
  .news-detail.auto { display: none; }
}

/* ---------- labels: real / made-up ---------- */
.badge-real { display: inline-block; margin-left: .45em; padding: .05em .55em; border-radius: 999px; font-size: .68rem; font-weight: 600;
  background: #ecfdf3; color: #067647; vertical-align: .15em; letter-spacing: .02em; white-space: nowrap; }
.tags .badge-real { margin: 0; }

/* ---------- messages, loading, busy ---------- */
.flash-err { background: #fef3f2; border-color: #fecdca; color: #b42318; }
.loading { padding: 80px 16px; text-align: center; color: var(--muted); }
body.busy, body.busy * { cursor: progress !important; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.danger { color: #b42318 !important; }
.pill-warn { background: #fef3f2; color: #b42318; }
.seed { border-left: 4px solid var(--c2); }
.consent { align-items: flex-start; margin-top: .2em; }
.consent input { margin-top: .25em; }
.privacy h3 { margin-top: 1.4em; }
.privacy ul { padding-left: 1.2em; }
.brand-plain { color: var(--text); text-decoration: none !important; }
.brand-plain.big { font-size: 1.1rem; }

/* ---------- header: search + bell ---------- */
.top-search input { width: 200px; margin: 0; padding: .45em .8em .45em 2.2em; font-size: .88rem;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E") no-repeat .7em center / 1em; }
.bell-wrap { position: relative; }
.bell { position: relative; }
.bell-n { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: #d92d20; color: #fff;
  font-size: .68rem; font-weight: 700; display: grid; place-items: center; }
.bell-panel { position: absolute; right: 0; top: calc(100% + 8px); width: min(360px, 90vw); max-height: 70vh; overflow-y: auto; background: #fff;
  border: 1px solid var(--line); box-shadow: 0 16px 40px rgba(0, 0, 0, .15); z-index: 60; padding: 12px; }
.bell-panel h3 { margin: 0 0 8px; }
.bell-item { display: flex; flex-direction: column; gap: 2px; padding: 8px; color: var(--text); text-decoration: none !important; border-top: 1px solid var(--line); font-size: .9rem; }
.bell-item:hover { background: var(--soft); }
.bell-item.unread { background: var(--tint); font-weight: 600; }

/* ---------- calendar: three kinds of things ---------- */
.cal-ev.k-asm { background: var(--c3); }
.cal-ev.k-trip { background: var(--c2); color: var(--on2); }
.cal-legend { display: flex; gap: 6px 14px; align-items: center; flex-wrap: wrap; font-size: .85rem; color: var(--muted); margin: -.6em 0 1em; }
.cal-legend .lg { display: inline-block; width: 12px; height: 12px; margin-right: -8px; }
.lg.k-event { background: var(--c1); } .lg.k-asm { background: var(--c3); } .lg.k-trip { background: var(--c2); }

/* ---------- photo viewer ---------- */
.modal.modal-photo { max-width: min(1200px, 96vw); background: #0c0f17; color: #fff; padding: 16px; }
.modal-photo .close-x { background: rgba(255, 255, 255, .9); }
.lightbox { position: relative; text-align: center; }
.lightbox img { max-width: 100%; max-height: 78vh; display: block; margin: 0 auto; }
.lightbox .muted { color: #a1a1aa; margin: 10px 0 0; }
.lb-nav { position: absolute; top: 45%; background: rgba(255, 255, 255, .9); }
.lb-prev { left: 8px; } .lb-next { right: 8px; }
.mthumb { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; overflow: hidden; }

/* ---------- members ---------- */
.mcard.is-me { border-color: var(--c2); box-shadow: 0 0 0 1px var(--c2); }
.profile-photo.small-photo { width: 140px; flex: none; }
.people td.btns { flex-wrap: wrap; }

@media (max-width: 860px) {
  .top-search { order: 5; width: 100%; }
  .top-search input { width: 100%; }
}

/* made-up ("Netikra") items in the calendar: dashed outline */
.cal-ev.fake { outline: 1px dashed rgba(255, 255, 255, .9); outline-offset: -3px; opacity: .85; }
.cal-ev.fake b { font-weight: 700; }

/* "Administratorius" label next to the person's picture (top right) */
.pill-admin { background: var(--c2); color: var(--on2); font-weight: 700; }
@media (max-width: 860px) { .top-tools .pill-admin { font-size: .7rem; padding: .15em .5em; } }

/* Klumora name + tagline on the login page */
.brand-plain.big { flex-direction: column; align-items: flex-start; gap: 0; font-size: 1.4rem; font-weight: 700; line-height: 1.2; }
.brand-plain.big .ic { display: none; }
.brand-plain .tagline { display: block; font-size: .8rem; font-weight: 400; color: var(--muted); }
.auth-top { margin-bottom: 1.4em; }

/* ---------- video meeting (full screen, above everything) ---------- */
#video-layer { position: fixed; inset: 0; z-index: 200; background: #0c0f17; display: flex; flex-direction: column; }
#video-layer .video-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 16px; color: #fff; }
#video-layer .video-top .btn-light { background: #fff; color: #18181b; }
#video-box { flex: 1; min-height: 0; }
#video-box iframe { border: 0; }
.note.note-warn { background: #fffaeb; border-left-color: var(--c2); color: #7a5b00; display: flex; gap: .5em; align-items: center; }
