/* Zenorix Home. Builds on base.css (shared with the other Zenorix apps). */
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.avatar.sm { width: 34px; height: 34px; font-size: 12px; flex-shrink: 0; }
img.avatar { object-fit: cover; }
.icon-btn.sm { width: 32px; height: 32px; }
.icon-btn.sm svg { width: 15px; height: 15px; }
.ck { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.link.small { display: inline-block; margin-top: 10px; font-size: 13px; }
.card.empty.small { padding: 28px; }
.user-chip { color: var(--text); }

/* Sign in */
.signin { max-width: 520px; margin: 8vh auto 0; text-align: center; padding: 40px 32px; }
.signin .lock-ic { margin: 0 auto 20px; background: rgba(47, 210, 122, .12); color: var(--good); border-color: rgba(47, 210, 122, .3); }
.signin h1 { font-size: 30px; margin-bottom: 10px; }
.signin p { color: var(--text-2); margin-bottom: 24px; line-height: 1.6; }

/* Greeting */
.hello { margin-bottom: 22px; }
.hello h1 { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.1; margin: 10px 0 8px; }
.hello h1 em { font-style: normal; background: linear-gradient(90deg, var(--blue-2), var(--blue-3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hello p { color: var(--text-2); font-size: 15px; }

/* Quick stats */
.qs-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: 24px; }
.qs { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; color: var(--text); transition: border-color .2s var(--ease), transform .2s var(--ease); }
.qs:hover { border-color: rgba(77, 109, 255, .5); transform: translateY(-2px); }
.qs.attn { border-color: rgba(246, 185, 59, .45); }
.qs .k { display: flex; gap: 7px; align-items: center; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.qs .k svg { width: 15px; height: 15px; }
.qs small { color: var(--muted); font-size: 12px; }
.qs-big { font-family: var(--font-display); font-size: 32px; font-weight: 700; line-height: 1; }
.qs-big small { font-size: 16px; color: var(--muted); }
.qs-bal { display: flex; gap: 14px; flex-wrap: wrap; }
.qs-bal span { display: flex; flex-direction: column; font-size: 11px; color: var(--muted); font-weight: 700; border-left: 3px solid var(--c); padding-left: 8px; }
.qs-bal b { font-family: var(--font-display); font-size: 24px; color: var(--text); line-height: 1.1; }
.qs .bar { height: 6px; border-radius: 6px; background: var(--panel-3); overflow: hidden; }
.qs .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--blue-2)); }

/* Layout: celebrations and today on the right on wide screens, first on phones */
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.home-grid .col-side { grid-column: 2; grid-row: 1; display: grid; gap: 14px; }
.home-grid .col-main { grid-column: 1; grid-row: 1; display: grid; gap: 14px; }
@media (max-width: 980px) {
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .home-grid .col-side, .home-grid .col-main { grid-column: 1; grid-row: auto; }
}
.sec-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sec-h h2 { display: flex; gap: 8px; align-items: center; font-size: 20px; }
.sec-h h2 svg { width: 20px; height: 20px; color: var(--blue-3); }
.sec-actions { display: flex; gap: 8px; }

/* Announcements */
.ann { padding: 22px 24px; }
.ann.pinned { border-color: rgba(77, 109, 255, .45); }
.ann-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.ann-h:empty { display: none; }
.ann-h .badge svg { width: 12px; height: 12px; }
.ann-until { font-size: 12px; }
.ann h3 { font-size: 19px; line-height: 1.3; margin-bottom: 8px; }
.ann p { color: var(--text-2); font-size: 15px; line-height: 1.65; margin-bottom: 12px; overflow-wrap: anywhere; }
.ann-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 6px; }
.ann-foot span { display: flex; gap: 4px; }
.ann-form h3 { font-size: 18px; margin-bottom: 14px; }
.ann-form .field { margin-bottom: 12px; }
.ann-form textarea { resize: vertical; min-height: 110px; }
.ann-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .ann-dates { grid-template-columns: 1fr; } }

/* Celebrations */
.celebrate { background: linear-gradient(135deg, rgba(236, 72, 153, .14), rgba(77, 109, 255, .12)); border-color: rgba(236, 72, 153, .35); display: grid; gap: 14px; }
.cel { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.cel .avatar { width: 46px; height: 46px; font-size: 16px; }
.cel b { display: block; font-size: 16px; }
.cel small { color: var(--text-2); font-size: 12px; }
.cel-k { display: flex; gap: 6px; align-items: center; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #f9a8d4; }
.cel-k svg { width: 13px; height: 13px; }

/* Side cards */
.side h3 { display: flex; gap: 8px; align-items: center; font-size: 15px; margin-bottom: 12px; }
.side h3 svg { width: 17px; height: 17px; color: var(--blue-3); }
.side h3 .count { margin-left: auto; font-size: 12px; font-weight: 800; padding: 2px 9px; border-radius: 999px; background: var(--panel-3); color: var(--text-2); }
.pl { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.pl:first-of-type { border-top: 0; padding-top: 0; }
.pl-t b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-t small { color: var(--muted); font-size: 12px; }
.when { display: flex; gap: 5px; align-items: center; font-size: 12px; font-weight: 700; color: var(--text-2); white-space: nowrap; }
.when svg { width: 13px; height: 13px; }
.out { display: flex; flex-wrap: wrap; gap: 6px; }
.out span { font-size: 13px; font-weight: 600; padding: 5px 11px; border-radius: 999px; background: var(--panel-3); }
.out small { color: var(--muted); font-weight: 500; }
.hol { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.hol:first-of-type { border-top: 0; padding-top: 0; }
.hol-d { display: flex; flex-direction: column; align-items: center; padding: 5px 0; border-radius: 10px; background: var(--panel-3); font-size: 10px; font-weight: 800; text-transform: uppercase; color: var(--muted); }
.hol-d b { font-family: var(--font-display); font-size: 18px; color: var(--text); line-height: 1.1; }
.hol > div b { display: block; font-size: 14px; }
.hol > div small { color: var(--muted); font-size: 12px; }

@media (max-width: 760px) {
  .qs-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qs { padding: 14px 16px; }
  .qs-big { font-size: 26px; }
  .qs-bal { gap: 10px; }
  .qs-bal b { font-size: 20px; }
  .ann { padding: 18px; }
  .cel { grid-template-columns: auto minmax(0, 1fr); }
  .cel > .btn, .cel > .badge { grid-column: 2; justify-self: start; }
}
@media (max-width: 760px) { .qs-row > .qs:first-child { grid-column: 1 / -1; } }
@media (max-width: 330px) { .qs-row { grid-template-columns: 1fr; } }
/* Wide content (e.g. an image preview) must not stretch the columns. */
.home-grid .col-main, .home-grid .col-side { min-width: 0; grid-template-columns: minmax(0, 1fr); }
.ann-pick.has img { max-width: 100%; }

/* Announcement images */
.ann-img { display: block; width: calc(100% + 48px); max-width: none; margin: -22px -24px 18px; max-height: 520px; object-fit: contain; background: #090b12; border-radius: var(--radius) var(--radius) 0 0; border-bottom: 1px solid var(--line); }
.ann-pick { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 20px; border: 1.5px dashed var(--line-2); border-radius: var(--radius-sm); cursor: pointer; text-align: center; color: var(--text-2); }
.ann-pick:hover { border-color: var(--blue-2); }
.ann-pick > svg { width: 24px; height: 24px; color: var(--blue-3); }
.ann-pick span { font-weight: 700; font-size: 14px; }
.ann-pick small { color: var(--muted); font-size: 12px; }
.ann-pick.has { padding: 10px; cursor: default; border-style: solid; }
.ann-pick.has img { width: 100%; max-height: 260px; object-fit: contain; border-radius: 10px; background: #090b12; }
.ann-pick-actions { display: flex; gap: 8px; margin-top: 8px; }
.ann-pick-actions label { cursor: pointer; }
@media (max-width: 760px) { .ann-img { width: calc(100% + 36px); margin: -18px -18px 14px; } }

/* Compact announcements: a short banner (click for the full picture) and long messages shortened. */
.ann-img-btn { position: relative; display: block; width: calc(100% + 48px); margin: -22px -24px 18px; padding: 0; border: 0; background: #090b12; cursor: zoom-in; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.ann-img-btn .ann-img { width: 100%; margin: 0; height: clamp(150px, 24vw, 260px); max-height: none; object-fit: cover; border-radius: 0; }
.ann-img-btn span { position: absolute; right: 10px; bottom: 10px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: rgba(5, 6, 10, .7); color: #fff; opacity: 0; transition: opacity .2s; }
.ann-img-btn span svg { width: 15px; height: 15px; }
.ann-img-btn:hover span, .ann-img-btn:focus-visible span { opacity: 1; }
.ann-body.clamp { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.ann-body b { color: var(--text); }
.ann-more { margin: -6px 0 12px; font-size: 13px; font-weight: 700; }
.ann-pick.has img { max-height: 170px; }
.zoom { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px; background: rgba(0, 0, 0, .88); cursor: zoom-out; animation: fade .2s; }
.zoom img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 12px; box-shadow: 0 30px 80px -20px #000; }
.zoom .icon-btn { position: absolute; top: 16px; right: 16px; background: rgba(255, 255, 255, .1); color: #fff; }
@media (max-width: 760px) {
  .ann-img-btn { width: calc(100% + 36px); margin: -18px -18px 14px; }
  .ann-img-btn .ann-img { height: clamp(140px, 46vw, 200px); }
  .ann-img-btn span { opacity: 1; }
}
@keyframes fade { from { opacity: 0; } }
