:root {
  --bg: #f3f5f8;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --text: #142033;
  --muted: #6b7280;
  --line: #e4e8ee;
  --accent: #1f4f8f;
  --accent-soft: #eaf2fb;
  --sidebar: #0f1724;
  --sidebar-muted: #9aa6b2;
  --sidebar-active: #1b2a3d;
  --danger: #b42318;
  --warning-bg: #fff7ed;
  --warning-line: #fed7aa;
  --shadow: 0 12px 34px rgba(15, 23, 36, .09);
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Inter, Pretendard, "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}
body.modal-open { overflow: hidden; }
button, input, textarea, select, a { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 272px minmax(0, 1fr); }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px 18px;
  background: var(--sidebar);
  color: #fff;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 24px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  background: #fff; color: var(--sidebar);
  font-weight: 800; letter-spacing: -.03em;
}
.brand-title { font-size: 14px; font-weight: 800; letter-spacing: .04em; }
.brand-subtitle { margin-top: 3px; color: var(--sidebar-muted); font-size: 11px; }

.nav-list { display: grid; gap: 7px; margin-top: 6px; }
.nav-button {
  width: 100%; border: 0; background: transparent; color: #dfe7ef;
  display: flex; align-items: center; gap: 10px;
  padding: 12px; border-radius: 11px; text-align: left;
}
.nav-button:hover, .nav-button.active { background: var(--sidebar-active); color: #fff; }
.nav-icon { width: 22px; text-align: center; opacity: .9; }
.nav-label { flex: 1; }
.nav-count { color: var(--sidebar-muted); font-size: 12px; }
.sidebar-footer { margin-top: auto; padding-top: 18px; }
.ghost-button {
  width: 100%; border: 1px solid #304155; background: transparent; color: #dce5ee;
  border-radius: 11px; padding: 10px 12px;
}
.ghost-button.active { background: #fff; color: var(--sidebar); border-color: #fff; }

.main-content { min-width: 0; padding: 34px 38px 52px; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.eyebrow, .section-kicker { margin: 0 0 8px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .13em; }
h1 { margin: 0; font-size: clamp(28px, 3vw, 42px); line-height: 1.08; letter-spacing: -.04em; }
.page-subtitle { margin: 10px 0 0; color: var(--muted); }
.top-actions { width: min(620px, 48vw); display: grid; gap: 10px; }
.home-presence-card {
  min-height: 48px; padding: 9px 12px; border: 1px solid #dfe6ed; border-radius: 14px; background: rgba(255,255,255,.92);
  box-shadow: 0 2px 10px rgba(15,23,36,.03);
}
.home-presence-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.home-online-count { color: #187657; font-size: 10.5px; font-weight: 900; white-space: nowrap; }
.home-online-users { margin-top: 6px; display: flex; align-items: center; justify-content: flex-end; gap: 5px; flex-wrap: wrap; }
.home-online-user {
  min-height: 24px; display: inline-flex; align-items: center; padding: 0 8px; border: 1px solid #dce4ec; border-radius: 999px;
  background: #f8fafc; color: #536579; font-size: 9.5px; font-weight: 800;
}
.home-online-user.own { border-color: #bed5e8; background: #eef6fc; color: #1f5d8f; }
.home-online-empty { color: #98a3b0; font-size: 9.5px; font-weight: 700; }
.search-box {
  height: 50px; display: flex; align-items: center; gap: 10px;
  padding: 0 15px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 2px 10px rgba(15, 23, 36, .03);
}
.search-box span { color: var(--muted); font-size: 20px; }
.search-box input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--text); }

.category-overview-section { margin-top: 30px; }
.section-head.compact { margin-bottom: 13px; }
.category-overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.category-tile {
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
  min-height: 98px; border-radius: 16px; padding: 16px;
  display: flex; align-items: center; gap: 13px; text-align: left;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.category-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #d6dee7; }
.category-tile-icon {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 18px;
}
.category-tile-copy { min-width: 0; flex: 1; display: grid; gap: 5px; }
.category-tile-copy strong { font-size: 15px; }
.category-tile-copy small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.category-tile-count { color: #8a97a6; font-size: 12px; }

.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 25px 0 34px; }
.summary-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.summary-label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; }
.summary-card strong { font-size: 24px; letter-spacing: -.03em; }
#currentCategoryLabel { font-size: 18px; }

.content-section { margin-top: 4px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.section-head h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.result-meta { color: var(--muted); font-size: 13px; }
.resource-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.resource-card {
  min-height: 328px; display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: 0 1px 1px rgba(15,23,36,.02);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.resource-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #d9e1e9; }
.card-topline { display: flex; justify-content: space-between; align-items: center; }
.resource-icon {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-size: 18px; font-weight: 800;
}
.favorite-button { width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: #9aa4b0; font-size: 21px; }
.favorite-button:hover { background: var(--panel-2); color: var(--text); }
.favorite-button.active { color: #b7791f; }
.resource-body { padding-top: 18px; }
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.category-badge, .type-badge {
  display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px;
  border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .04em;
}
.category-badge { background: var(--accent-soft); color: var(--accent); }
.type-badge { background: #f1f3f5; color: #6b7280; }
.resource-name { margin: 12px 0 8px; font-size: 19px; letter-spacing: -.025em; }
.resource-description { min-height: 42px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.access-note {
  margin-top: 12px; padding: 9px 10px; border-radius: 10px;
  background: #f8fafc; border: 1px solid #edf0f4; color: #536273; font-size: 11px; line-height: 1.45;
}
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tag { padding: 5px 8px; border-radius: 8px; background: #f2f4f7; color: #667085; font-size: 10px; }
.resource-actions { margin-top: auto; padding-top: 18px; display: grid; grid-template-columns: 1fr; gap: 8px; }
.resource-actions:has(.credential-button:not([hidden])) { grid-template-columns: 1fr 1fr; }
.open-button, .primary-button, .secondary-button {
  min-height: 42px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 11px; font-weight: 700; font-size: 13px; padding: 0 14px;
}
.open-button, .primary-button { background: var(--text); color: #fff; border: 1px solid var(--text); }
.open-button:hover, .primary-button:hover { opacity: .92; }
.secondary-button { background: #fff; color: var(--text); border: 1px solid var(--line); }
.secondary-button:hover { background: var(--panel-2); }
.open-button.disabled { background: #e9edf2; color: #8a95a2; border-color: #e9edf2; cursor: default; pointer-events: none; }

.empty-state {
  min-height: 300px; display: grid; place-items: center; align-content: center; gap: 8px;
  border: 1px dashed #ccd4dd; border-radius: var(--radius); color: var(--muted); background: rgba(255,255,255,.45); text-align: center;
}
.empty-icon { font-size: 34px; }
.empty-state strong { color: var(--text); }

.notice-section { margin-top: 30px; }
.notice-head { align-items: flex-start; }
.notice-help { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.notice-list { columns: 2 430px; column-gap: 16px; }
.notice-card {
  width: 100%; display: inline-block; break-inside: avoid; margin: 0 0 16px; vertical-align: top;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px;
  box-shadow: 0 1px 1px rgba(15,23,36,.02);
}
.notice-card.important { border-color: #f0c36b; box-shadow: inset 4px 0 0 #d89a18; }
.notice-card-top { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.notice-level { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.notice-level.normal { background: #eef2f6; color: #5d6875; }
.notice-level.important { background: #fff3d6; color: #9a6700; }
.notice-meta { color: var(--muted); font-size: 11px; }
.notice-card h3 { margin: 12px 0 8px; font-size: 18px; }
.notice-body { margin: 0; color: #465466; line-height: 1.72; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.notice-actions { display: flex; gap: 10px; margin-top: 16px; }
.text-button { border: 0; background: transparent; padding: 4px 0; color: var(--accent); font-size: 12px; font-weight: 700; }
.text-button.danger { color: var(--danger); }

.modal-backdrop {
  position: fixed; inset: 0; z-index: 1000; padding: 22px;
  display: grid; place-items: center; background: rgba(9, 17, 29, .56); backdrop-filter: blur(4px);
}
.modal-card {
  width: min(620px, 100%); max-height: calc(100vh - 44px); overflow: auto;
  background: #fff; border-radius: 20px; box-shadow: 0 28px 70px rgba(0,0,0,.24); padding: 22px;
}
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.modal-head h2 { margin: 0; font-size: 22px; }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); background: #fff; border-radius: 10px; font-size: 24px; line-height: 1; color: var(--muted); }
.modal-note { margin: 10px 0 16px; color: var(--muted); font-size: 13px; }
.credential-rows { display: grid; gap: 9px; }
.credential-row {
  display: grid; grid-template-columns: 145px minmax(0, 1fr); gap: 12px; align-items: center;
  border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px;
}
.credential-label { color: var(--muted); font-size: 12px; font-weight: 700; }
.credential-value-wrap { min-width: 0; display: flex; align-items: center; gap: 7px; }
.credential-value { min-width: 0; flex: 1; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; color: var(--text); }
.mini-button { flex: 0 0 auto; border: 1px solid var(--line); background: #fff; color: #4e5e70; border-radius: 8px; padding: 6px 8px; font-size: 10px; font-weight: 700; }
.security-warning { margin-top: 16px; padding: 11px 12px; border-radius: 11px; background: var(--warning-bg); border: 1px solid var(--warning-line); color: #8a4b08; font-size: 11px; line-height: 1.55; }

.notice-form { display: grid; gap: 14px; margin-top: 17px; }
.notice-form label { display: grid; gap: 7px; }
.notice-form label > span { color: #536273; font-size: 12px; font-weight: 700; }
.notice-form input, .notice-form textarea, .notice-form select {
  width: 100%; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--text); padding: 11px 12px; outline: none;
}
.notice-form textarea { resize: vertical; min-height: 250px; line-height: 1.68; padding: 14px 15px; }
.notice-form input:focus, .notice-form textarea:focus, .notice-form select:focus { border-color: #9ab7d8; box-shadow: 0 0 0 3px rgba(31,79,143,.09); }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 3px; }

.toast {
  position: fixed; right: 24px; bottom: 24px; z-index: 1200;
  background: #101827; color: #fff; border-radius: 11px; padding: 11px 14px;
  box-shadow: 0 14px 34px rgba(0,0,0,.2); font-size: 12px; font-weight: 700;
}

@media (max-width: 1040px) {
  .category-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .nav-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar-footer { margin-top: 12px; }
  .main-content { padding: 24px 18px 40px; }
  .topbar { align-items: stretch; flex-direction: column; }
  .top-actions { width: 100%; }
  .home-online-users { justify-content: flex-start; }
}

@media (max-width: 620px) {
  .summary-grid { grid-template-columns: 1fr; }
  .category-overview { grid-template-columns: 1fr; }
  .nav-list { grid-template-columns: 1fr; }
  .resource-grid { grid-template-columns: 1fr; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .credential-row { grid-template-columns: 1fr; }
  .credential-value-wrap { flex-wrap: wrap; }
  .resource-actions:has(.credential-button:not([hidden])) { grid-template-columns: 1fr; }
  .modal-backdrop { padding: 10px; }
  .modal-card { max-height: calc(100vh - 20px); padding: 17px; }
}


.setup-group-bar {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 10px;
  border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.62);
}
.setup-group-button {
  min-height: 38px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: #536273;
  display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; font-size: 12px; font-weight: 750;
}
.setup-group-button:hover { background: var(--panel-2); color: var(--text); }
.setup-group-button.active { background: var(--text); border-color: var(--text); color: #fff; }
.setup-group-button small {
  min-width: 19px; height: 19px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center;
  background: rgba(128,138,150,.12); color: inherit; font-size: 10px;
}
.setup-group-button.active small { background: rgba(255,255,255,.16); }

/* V4.2.19 - grouped resource libraries */
.collection-modal-card { width: min(820px, calc(100vw - 32px)); }
.collection-items { display: grid; gap: 12px; margin-top: 18px; }
.collection-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel);
}
.collection-item-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #eaf2fb;
  color: #174b87;
  font-weight: 800;
  font-size: 17px;
}
.collection-item-copy { min-width: 0; }
.collection-item-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.collection-item-head h3 { margin: 0; font-size: 16px; color: var(--text); }
.collection-item-copy p { margin: 6px 0 9px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.collection-open-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 11px;
  background: var(--text);
  color: #fff;
  text-decoration: none;
  font-weight: 750;
  font-size: 13px;
}
.collection-open-button:hover { opacity: .88; }
.collection-open-button.disabled { background: #e8edf3; color: #8d98a5; pointer-events: none; }
.collection-empty {
  padding: 32px 20px;
  border: 1px dashed var(--border);
  border-radius: 16px;
  color: var(--muted);
  text-align: center;
  background: var(--panel-2);
}
@media (max-width: 640px) {
  .collection-item { grid-template-columns: 42px minmax(0, 1fr); }
  .collection-item-icon { width: 42px; height: 42px; }
  .collection-open-button { grid-column: 1 / -1; width: 100%; }
}

/* V4.2.19 - reduced navigation + grouped admin actions */
.collection-section-title {
  margin: 10px 2px 0;
  padding: 10px 4px 5px;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: -.01em;
  border-bottom: 1px solid var(--border);
}
.collection-section-title:first-child { margin-top: 0; }
.collection-item-note {
  margin: -2px 0 9px;
  color: #52657a;
  font-size: 11px;
  font-weight: 650;
}
.collection-item-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.collection-credential-button {
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}
.collection-credential-button:hover { background: var(--panel-2); }
@media (max-width: 640px) {
  .collection-item-actions { grid-column: 1 / -1; width: 100%; }
  .collection-item-actions > * { flex: 1 1 0; min-width: 0; }
  .collection-open-button { width: auto; }
}

/* V4.2.19 - HOME two-lane layout */
.home-group-heading {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 3px 2px 0;
  padding: 4px 2px 2px;
}
.home-group-heading:not(:first-child) { margin-top: 22px; }
.home-group-heading-copy { min-width: 0; }
.home-group-kicker {
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .13em;
}
.home-group-heading h3 {
  margin: 0;
  color: var(--text);
  font-size: 21px;
  letter-spacing: -.025em;
}
.home-group-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}



/* V4.2.19 shared notice sync status */
.notice-sync-status {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
}
.notice-sync-status[data-state="online"] { color: #047857; }
.notice-sync-status[data-state="offline"] { color: #b45309; }
.notice-sync-status[data-state="loading"] { color: #475569; }


/* V4.2.19 - notice masonry board + multi-promotion calculator */
.notice-dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}
.notice-dashboard article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}
.notice-dashboard span { display: block; color: var(--muted); font-size: 11px; font-weight: 700; margin-bottom: 6px; }
.notice-dashboard strong { display: block; color: var(--text); font-size: 18px; letter-spacing: -.02em; }
.notice-editor-hint { color: var(--muted); font-size: 11px; line-height: 1.5; }
.notice-modal-card { width: min(760px, 94vw); }

.calculator-section { margin-top: 26px; }
.calculator-head { align-items: flex-start; gap: 18px; }
.calculator-help { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.calculator-policy-badges { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 7px; max-width: 620px; }
.calculator-policy-badges span {
  display: inline-flex; align-items: center; min-height: 30px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: #52657a;
  font-size: 11px; font-weight: 750;
}
.calculator-panel-v33 { display: grid; grid-template-columns: minmax(330px, 390px) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.calculator-input-card, .calculator-result-area {
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 1px 1px rgba(15,23,36,.02);
}
.calculator-input-card { padding: 20px; display: flex; flex-direction: column; gap: 15px; }
.calculator-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.calculator-card-heading strong { display: block; margin-top: 4px; font-size: 18px; letter-spacing: -.025em; }
.calculator-card-kicker { color: var(--accent); font-size: 10px; font-weight: 850; letter-spacing: .12em; }
.calculator-local-badge { display: inline-flex; align-items: center; min-height: 26px; padding: 0 9px; border-radius: 999px; background: #eef6ff; color: #245b95; font-size: 10px; font-weight: 800; white-space: nowrap; }
.calculator-field { display: grid; gap: 7px; }
.calculator-field label { color: #536273; font-size: 12px; font-weight: 750; }
.calculator-field input, .calculator-field select {
  width: 100%; height: 44px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--text); padding: 0 12px; outline: none;
}
.calculator-field input:focus, .calculator-field select:focus { border-color: #9ab7d8; box-shadow: 0 0 0 3px rgba(31,79,143,.09); }
.calculator-two-fields { display: grid; grid-template-columns: 116px minmax(0,1fr); gap: 10px; }
.calculator-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.calculator-toggle-btn { min-height: 42px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel-2); color: #52657a; font-weight: 800; }
.calculator-toggle-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 6px 14px rgba(31,79,143,.12); }
.calculator-amount-wrap { position: relative; }
.calculator-amount-wrap input { padding-right: 66px; font-size: 17px; font-weight: 800; }
.calculator-amount-wrap span { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 11px; font-weight: 850; }
.calculator-current-policy { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; padding: 10px; border: 1px solid #e4ebf2; border-radius: 13px; background: #f8fafc; }
.calculator-current-policy div { min-width: 0; padding: 3px 5px; }
.calculator-current-policy span { display: block; color: #8491a0; font-size: 10px; font-weight: 700; margin-bottom: 3px; }
.calculator-current-policy strong { display: block; overflow: hidden; text-overflow: ellipsis; color: #26384d; font-size: 12px; white-space: nowrap; }
.calculator-reset { margin-top: auto; min-height: 40px; }
.calculator-result-area-v33 { padding: 16px; display: flex; flex-direction: column; gap: 11px; }
.calculator-result-hero { min-height: 112px; display: grid; grid-template-columns: minmax(0,1.35fr) minmax(210px,.65fr); border-radius: 16px; overflow: hidden; background: linear-gradient(135deg, #10213a, #173b67); color: #fff; }
.calculator-hero-primary, .calculator-hero-total { display: flex; flex-direction: column; justify-content: center; padding: 17px 20px; min-width: 0; }
.calculator-hero-total { border-left: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.045); }
.calculator-result-hero span { color: #c8d8eb; font-size: 11px; font-weight: 800; }
.calculator-hero-primary strong { margin: 5px 0 2px; font-size: clamp(32px, 3.6vw, 48px); line-height: 1; letter-spacing: -.045em; overflow-wrap: anywhere; }
.calculator-hero-total strong { margin: 7px 0 3px; font-size: clamp(20px, 2.1vw, 29px); line-height: 1.1; letter-spacing: -.035em; overflow-wrap: anywhere; }
.calculator-result-hero small { color: #c8d8eb; font-size: 11px; }
.calculator-welcome-card { border: 1px solid #dbe7d6; border-radius: 14px; padding: 12px 13px; background: linear-gradient(135deg,#fbfef9,#f4faf2); }
.calculator-welcome-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 9px; }
.calculator-welcome-head > div { display: grid; gap: 2px; }
.calculator-welcome-kicker { color: #38805b; font-size: 8.5px; font-weight: 900; letter-spacing: .13em; }
.calculator-welcome-head strong { color: #223b2d; font-size: 13px; }
.calculator-welcome-head small { color: #789080; font-size: 9px; line-height: 1.35; text-align: right; }
.calculator-welcome-list { display: flex; flex-wrap: wrap; gap: 7px; }
.calculator-welcome-item { min-width: 145px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border: 1px solid #dbe9d8; border-radius: 10px; background: rgba(255,255,255,.88); }
.calculator-welcome-item span { min-width: 0; color: #687d6e; font-size: 9.5px; font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calculator-welcome-item strong { color: #22613a; font-size: 11px; white-space: nowrap; }
.calculator-welcome-empty { width: 100%; padding: 8px 10px; border-radius: 9px; background: rgba(255,255,255,.7); color: #809084; font-size: 9.5px; }
.calculator-breakdown-card { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.calculator-breakdown-head, .calculator-breakdown-row { display: grid; grid-template-columns: minmax(120px,1.3fr) minmax(100px,1fr) 72px minmax(100px,1fr); gap: 10px; align-items: center; padding: 10px 13px; }
.calculator-breakdown-head { background: #f7f9fc; color: #8a97a7; font-size: 10px; font-weight: 800; border-bottom: 1px solid var(--line); }
.calculator-breakdown-row { min-height: 48px; color: #3d4f63; font-size: 12px; }
.calculator-breakdown-row + .calculator-breakdown-row { border-top: 1px solid #edf1f5; }
.calculator-breakdown-row strong { color: var(--text); font-size: 12px; }
.calculator-breakdown-row b { color: #174f8d; font-size: 14px; text-align: right; }
.calculator-breakdown-row.muted { opacity: .42; }
.calculator-policy-strip { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.calculator-policy-strip article { min-width: 0; border: 1px solid var(--line); border-radius: 13px; background: var(--panel-2); padding: 11px 12px; }
.calculator-policy-strip span { display: block; color: var(--muted); font-size: 10px; font-weight: 750; }
.calculator-policy-strip strong { display: block; margin: 4px 0 2px; color: var(--text); font-size: 17px; letter-spacing: -.025em; overflow-wrap: anywhere; }
.calculator-policy-strip small { display: block; color: #7d8997; font-size: 9.5px; line-height: 1.35; }
.calculator-detail-v33 { margin: 0; padding: 10px 12px; border-radius: 11px; background: #eef5fc; color: #315474; font-size: 11px; line-height: 1.55; font-weight: 650; }

@media (max-width: 1050px) {
  .notice-list { columns: 1; }
  .calculator-panel-v33 { grid-template-columns: 1fr; }
  .calculator-policy-badges { justify-content: flex-start; max-width: none; }
}
@media (max-width: 620px) {
  .notice-dashboard { grid-template-columns: 1fr; }
  .calculator-result-hero { grid-template-columns: 1fr; }
  .calculator-hero-total { border-left: 0; border-top: 1px solid rgba(255,255,255,.14); }
  .calculator-policy-strip { grid-template-columns: 1fr; }
  .calculator-breakdown-head { display: none; }
  .calculator-breakdown-row { grid-template-columns: 1fr 1fr; }
  .calculator-breakdown-row b { text-align: left; }
  .calculator-two-fields { grid-template-columns: 1fr; }
}


/* V4.2.19 - shared calculator configuration admin */
.calculator-head-tools { display: grid; justify-items: end; gap: 9px; min-width: min(620px, 46vw); }
.calculator-admin-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.calculator-sync-status { font-size: 11px; font-weight: 750; color: #64748b; }
.calculator-sync-status[data-state="online"] { color: #047857; }
.calculator-sync-status[data-state="offline"] { color: #b45309; }
.calculator-sync-status[data-state="loading"] { color: #475569; }
.calculator-manage-button { min-height: 34px; padding: 0 11px; font-size: 11px; }
.calculator-manage-button[data-admin="false"] { color: #738091; background: #f8fafc; }

.calculator-admin-modal-card { width: min(1180px, calc(100vw - 34px)); padding: 0; overflow: hidden; }
.calculator-admin-head { padding: 22px 24px 16px; border-bottom: 1px solid var(--line); }
.calculator-admin-head .modal-note { margin-bottom: 0; }
.calculator-admin-head .modal-note[data-warning="true"] { color: #9a6700; }
.calculator-admin-tabs { display: flex; gap: 8px; padding: 12px 24px; border-bottom: 1px solid var(--line); background: #f8fafc; }
.calculator-admin-tab { min-height: 36px; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: #536273; font-size: 12px; font-weight: 800; }
.calculator-admin-tab.active { background: var(--text); color: #fff; border-color: var(--text); }
.calculator-admin-panel { padding: 18px 24px 24px; overflow: auto; max-height: calc(100vh - 190px); }
.calculator-admin-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.calculator-admin-panel-head > div { display: grid; gap: 3px; }
.calculator-admin-panel-head strong { font-size: 16px; }
.calculator-admin-panel-head span { color: var(--muted); font-size: 11px; }
.calculator-admin-grid, .calculator-welcome-layout { display: grid; grid-template-columns: minmax(330px, .86fr) minmax(470px, 1.14fr); gap: 14px; align-items: start; }
.calculator-admin-list { display: grid; gap: 9px; min-width: 0; }
.calculator-admin-list-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.calculator-admin-list-main { min-width: 0; display: grid; gap: 3px; }
.calculator-admin-list-main strong { font-size: 13px; color: var(--text); overflow-wrap: anywhere; }
.calculator-admin-list-main span { font-size: 10.5px; color: #66768a; line-height: 1.45; }
.calculator-admin-list-main small { font-size: 9.5px; color: #99a3af; overflow-wrap: anywhere; }
.calculator-admin-list-actions { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }
.calculator-admin-action { min-height: 28px; padding: 4px 7px; }
.calculator-admin-action:disabled { opacity: .32; cursor: default; }
.calculator-admin-action.danger { color: var(--danger); border-color: #f0d3d3; }
.calculator-admin-empty { padding: 24px 18px; border: 1px dashed #cfd7e1; border-radius: 13px; color: var(--muted); text-align: center; font-size: 12px; background: #fafbfc; }

.calculator-admin-editor { border: 1px solid var(--line); border-radius: 15px; background: #fbfcfe; padding: 16px; box-shadow: 0 1px 1px rgba(15,23,36,.02); }
.calculator-admin-editor-title { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.calculator-admin-editor-title > div { display: grid; gap: 3px; }
.calculator-admin-editor-title span { color: var(--accent); font-size: 9px; font-weight: 850; letter-spacing: .12em; }
.calculator-admin-editor-title strong { font-size: 17px; letter-spacing: -.02em; }
.calculator-admin-fields { display: grid; gap: 10px; }
.calculator-admin-fields.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.calculator-admin-fields label { display: grid; gap: 6px; }
.calculator-admin-fields label > span { color: #536273; font-size: 10.5px; font-weight: 750; }
.calculator-admin-fields input, .calculator-admin-fields select,
.calculator-currency-row input { width: 100%; min-width: 0; height: 39px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--text); padding: 0 10px; outline: none; }
.calculator-admin-fields input:focus, .calculator-currency-row input:focus { border-color: #9ab7d8; box-shadow: 0 0 0 3px rgba(31,79,143,.08); }
.calculator-currency-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 9px; }
.calculator-currency-editor-head > div { display: grid; gap: 2px; }
.calculator-currency-editor-head strong { font-size: 12px; }
.calculator-currency-editor-head span { color: var(--muted); font-size: 9.5px; }
.compact-button { min-height: 32px; padding: 0 10px; font-size: 10.5px; }
.calculator-currency-table-head, .calculator-currency-row { display: grid; grid-template-columns: 82px minmax(110px,1fr) minmax(110px,1fr) 68px 38px; gap: 7px; align-items: center; }
.calculator-currency-table-head { padding: 0 4px 6px; color: #8c98a7; font-size: 9px; font-weight: 800; }
.calculator-currency-rows { display: grid; gap: 7px; }
.calculator-currency-row { padding: 8px; background: #fff; border: 1px solid #e7ebf0; border-radius: 11px; }
.calculator-currency-row .icon-button { width: 32px; height: 32px; border-radius: 8px; font-size: 18px; }
.calculator-admin-editor-actions { margin-top: 15px; padding-top: 12px; border-top: 1px solid #e8edf2; }
.welcome-editor { max-width: 560px; }

@media (max-width: 1050px) {
  .calculator-head-tools { justify-items: start; min-width: 0; width: 100%; }
  .calculator-admin-toolbar { justify-content: flex-start; }
  .calculator-admin-grid, .calculator-welcome-layout { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .calculator-admin-modal-card { width: calc(100vw - 20px); }
  .calculator-admin-head { padding: 18px 16px 13px; }
  .calculator-admin-tabs { padding: 10px 16px; }
  .calculator-admin-panel { padding: 14px 16px 18px; }
  .calculator-admin-panel-head { align-items: flex-start; flex-direction: column; }
  .calculator-admin-fields.two-col { grid-template-columns: 1fr; }
  .calculator-currency-table-head { display: none; }
  .calculator-currency-row { grid-template-columns: 1fr 1fr; }
  .calculator-currency-row .currency-digits { grid-column: 1; }
  .calculator-currency-row .currency-remove { grid-column: 2; justify-self: end; }
  .calculator-admin-list-item { grid-template-columns: 1fr; }
  .calculator-admin-list-actions { justify-content: flex-start; }
}

/* ================= V4.2.19 ACCOUNT SYSTEM ================= */
.auth-gate {
  position: fixed; inset: 0; z-index: 5000; display: grid; place-items: center;
  padding: 28px; background:
    radial-gradient(circle at 15% 20%, rgba(32, 94, 166, .15), transparent 35%),
    radial-gradient(circle at 85% 80%, rgba(15, 42, 74, .12), transparent 38%),
    #eef3f8;
}
.auth-gate[hidden] { display: none !important; }
.auth-card {
  width: min(470px, 100%); background: #fff; border: 1px solid #dfe6ee; border-radius: 24px;
  box-shadow: 0 28px 80px rgba(17, 35, 58, .18); padding: 30px;
}
.auth-brand-row { display: flex; gap: 13px; align-items: center; margin-bottom: 28px; }
.auth-brand-mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: #102238; color: #fff; font-weight: 900; letter-spacing: -.04em; }
.auth-brand-row strong { display: block; font-size: 15px; letter-spacing: .06em; }
.auth-brand-row span { display: block; margin-top: 4px; color: #8190a1; font-size: 11px; }
.auth-loading { padding: 28px 0; color: #607084; text-align: center; }
.auth-form { display: grid; gap: 15px; }
.auth-form h1 { font-size: 29px; }
.auth-form p { color: #718095; font-size: 13px; line-height: 1.6; }
.auth-form label { display: grid; gap: 7px; }
.auth-form label > span { color: #526174; font-size: 12px; font-weight: 800; }
.auth-field-help { color: #7b8798; font-size: 11px; line-height: 1.45; }
.auth-form input, .auth-form select,
.user-create-card input, .user-create-card select,
.user-admin-controls select {
  width: 100%; border: 1px solid #d9e1e9; border-radius: 11px; padding: 12px 13px; background: #fff; color: #162235; outline: none;
}
.auth-form input:focus, .user-create-card input:focus, .user-create-card select:focus { border-color: #8eadd0; box-shadow: 0 0 0 3px rgba(36, 87, 147, .09); }
.remember-login-row {
  display: flex !important; align-items: center; gap: 10px !important; cursor: pointer; user-select: none;
  width: fit-content; margin-top: -2px;
}
.auth-form .remember-login-row > input {
  width: 18px; height: 18px; margin: 0; padding: 0; flex: 0 0 auto; accent-color: #245793; cursor: pointer;
  box-shadow: none; border-radius: 4px;
}
.remember-login-copy { display: flex; align-items: baseline; gap: 8px; color: #32445a; }
.remember-login-copy b { font-size: 12px; }
.remember-login-copy small { color: #8996a5; font-size: 10px; font-weight: 600; }
.auth-submit { min-height: 48px; margin-top: 3px; }
.auth-text-button { justify-self: center; border: 0; background: transparent; color: #315f98; font-size: 12px; font-weight: 800; padding: 4px 8px; }
.auth-text-button:hover { color: #163f72; text-decoration: underline; }
.auth-success { border: 1px solid #b9dfc8; background: #f0fbf4; color: #237044; border-radius: 10px; padding: 10px 12px; font-size: 12px; line-height: 1.5; }
.auth-error { border: 1px solid #f1c4c0; background: #fff3f2; color: #a63b34; border-radius: 10px; padding: 10px 12px; font-size: 12px; line-height: 1.5; }
.auth-error.visible { display: block; }
.auth-locked .app-shell { filter: blur(3px); pointer-events: none; user-select: none; }

.sidebar-footer { display: grid; gap: 12px; }
.account-panel { border-top: 1px solid #2c3d51; padding-top: 14px; display: grid; grid-template-columns: 38px minmax(0,1fr) 38px; gap: 10px; align-items: center; }
.account-panel[hidden] { display: none !important; }
.account-avatar { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: #eaf2fb; color: #1f5797; font-weight: 900; }
.account-copy { min-width: 0; display: grid; gap: 2px; }
.account-copy strong { color: #f4f7fb; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-copy small { color: #9eacbb; font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-copy span { width: fit-content; margin-top: 3px; padding: 2px 6px; border-radius: 999px; background: #24384f; color: #c9d8e8; font-size: 8px; font-weight: 800; }
.account-message-button { position: relative; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #3a5069; border-radius: 11px; background: #162539; color: #dbe8f5; cursor: pointer; transition: background .15s ease, border-color .15s ease, transform .15s ease; }
.account-message-button:hover, .account-message-button.active { background: #23466d; border-color: #557aa2; color: #fff; }
.account-message-button:active { transform: translateY(1px); }
.account-message-icon { font-size: 16px; line-height: 1; }
.account-message-unread { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; border: 2px solid var(--sidebar); border-radius: 999px; background: #e04f4f; color: #fff; font-size: 9px; font-weight: 900; box-shadow: 0 2px 7px rgba(0,0,0,.25); }
.account-message-unread[hidden] { display: none !important; }
.account-actions { grid-column: 1 / -1; display: grid; gap: 6px; }
.ghost-button.compact { padding: 7px 9px; font-size: 10px; }
.danger-ghost { color: #f0b6b0; border-color: #563b3b; }

.auth-modal-card { width: min(560px, 100%); }
.user-admin-modal-card { width: min(1080px, 100%); }
.user-admin-layout { margin-top: 18px; display: grid; grid-template-columns: minmax(260px, .75fr) minmax(0, 1.6fr); gap: 18px; align-items: start; }
.user-create-card { border: 1px solid var(--line); background: #f8fafc; border-radius: 15px; padding: 16px; display: grid; gap: 12px; }
.user-create-card > strong { font-size: 15px; }
.user-create-card label { display: grid; gap: 6px; }
.user-create-card label > span { color: #607084; font-size: 11px; font-weight: 800; }
.user-create-result { border: 1px solid #cbdced; background: #eef6ff; border-radius: 12px; padding: 12px; display: grid; gap: 8px; }
.user-create-result[hidden] { display: none !important; }
.user-create-result > div { display: grid; gap: 4px; }
.user-create-result span, .user-create-result small { color: #607084; font-size: 10px; }
.user-create-result code { font-size: 14px; color: #0f355f; word-break: break-all; }
.user-list-wrap { min-width: 0; }
.user-list-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 10px; }
.user-list-head span { color: #718095; font-size: 10px; }
.user-list { display: grid; gap: 9px; max-height: 570px; overflow: auto; padding-right: 3px; }
.user-admin-row { border: 1px solid var(--line); border-radius: 13px; padding: 12px; display: grid; grid-template-columns: minmax(180px,1fr) auto; gap: 14px; align-items: center; }
.user-admin-identity { min-width: 0; display: grid; gap: 3px; }
.user-admin-identity strong { font-size: 13px; }
.user-admin-identity span { color: #536273; font-size: 11px; }
.user-admin-identity small { color: #8793a1; font-size: 9px; }
.user-admin-controls { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.user-admin-controls select { width: 92px; padding: 7px 8px; font-size: 10px; }
.user-active-toggle { display: inline-flex; align-items: center; gap: 4px; color: #5d6b7a; font-size: 10px; }
.user-active-toggle input { width: auto; }
.credential-loading { padding: 18px; color: #728093; text-align: center; font-size: 12px; }

@media (max-width: 850px) {
  .user-admin-layout { grid-template-columns: 1fr; }
  .user-admin-row { grid-template-columns: 1fr; }
  .user-admin-controls { justify-content: flex-start; }
}

/* ================= V4.2.19 REALTIME CHAT ================= */
.chat-section, .postit-section { margin-top: 26px; }
.chat-head, .postit-head { align-items: flex-start; gap: 18px; }
.chat-help, .postit-help { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; max-width: 760px; }
.chat-connection-status, .postit-sync-status { margin: 7px 0 0; font-size: 11px; font-weight: 800; color: #64748b; }
.chat-connection-status[data-state="online"], .postit-sync-status[data-state="online"] { color: #047857; }
.chat-connection-status[data-state="loading"], .postit-sync-status[data-state="loading"] { color: #475569; }
.chat-connection-status[data-state="offline"], .postit-sync-status[data-state="offline"] { color: #b45309; }
.chat-head-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.chat-online-pill { display: inline-flex; align-items: center; min-height: 34px; padding: 0 11px; border-radius: 999px; border: 1px solid #cfe5da; background: #f0faf5; color: #18724d; font-size: 11px; font-weight: 850; }
.danger-button { color: #a43c36; border-color: #edc9c6; background: #fff8f7; }
.chat-shell { height: min(700px, calc(100vh - 235px)); min-height: 520px; display: grid; grid-template-rows: auto minmax(0,1fr) auto auto; border: 1px solid var(--line); border-radius: 20px; background: #f7f9fc; overflow: hidden; box-shadow: 0 8px 30px rgba(15, 34, 56, .055); }
.chat-room-bar { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 18px; background: #fff; border-bottom: 1px solid var(--line); }
.chat-room-bar > div { display: grid; gap: 2px; }
.chat-room-bar strong { color: #15263b; font-size: 14px; }
.chat-room-bar span { color: #8290a1; font-size: 10px; }
.chat-message-count { white-space: nowrap; }
.chat-messages { min-height: 0; overflow-y: auto; padding: 22px 20px 16px; display: flex; flex-direction: column; gap: 14px; scroll-behavior: smooth; }
.chat-empty { align-self: center; margin: auto; color: #8b98a7; font-size: 12px; text-align: center; }
.chat-empty[hidden] { display: none !important; }
.chat-message-row { display: flex; align-items: flex-end; gap: 9px; max-width: min(76%, 760px); }
.chat-message-row.own { align-self: flex-end; justify-content: flex-end; }
.chat-message-avatar { flex: 0 0 34px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: #dfe9f5; color: #24557f; font-size: 12px; font-weight: 900; box-shadow: inset 0 0 0 1px rgba(27,74,121,.05); }
.chat-message-row.own .chat-message-avatar { background: #183a61; color: #fff; }
.chat-message-body { min-width: 0; display: grid; gap: 5px; }
.chat-message-meta { display: flex; align-items: center; gap: 8px; padding: 0 3px; }
.chat-message-meta strong { color: #34495f; font-size: 10.5px; }
.chat-message-meta span { color: #9aa5b1; font-size: 9px; }
.chat-delete-button { margin-left: auto; border: 0; background: transparent; color: #a97774; font-size: 9px; font-weight: 800; cursor: pointer; padding: 2px 3px; opacity: .35; }
.chat-message-row:hover .chat-delete-button { opacity: 1; }
.chat-bubble { padding: 10px 13px; border: 1px solid #e0e6ed; border-radius: 6px 15px 15px 15px; background: #fff; color: #213247; font-size: 13px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: 0 2px 7px rgba(15,34,56,.035); }
.chat-message-row.own .chat-bubble { border-color: #214d7e; border-radius: 15px 6px 15px 15px; background: linear-gradient(145deg, #214d7e, #183b62); color: #fff; }
.chat-emoji-picker { display: grid; grid-template-columns: repeat(12, 32px); gap: 3px; padding: 10px 14px; border-top: 1px solid var(--line); background: #fff; max-height: 132px; overflow-y: auto; }
.chat-emoji-picker[hidden] { display: none !important; }
.chat-emoji-item { width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; font-size: 19px; cursor: pointer; }
.chat-emoji-item:hover { background: #eef3f8; transform: scale(1.08); }
.chat-composer { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: 9px; align-items: end; padding: 12px 14px; border-top: 1px solid var(--line); background: #fff; }
.chat-emoji-button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 12px; background: #f7f9fc; color: #43566d; font-size: 21px; cursor: pointer; }
.chat-composer textarea { min-height: 42px; max-height: 126px; width: 100%; resize: none; border: 1px solid #d8e0e9; border-radius: 13px; padding: 10px 12px; background: #fff; color: #17283c; font: inherit; font-size: 13px; line-height: 1.55; outline: none; overflow-y: auto; }
.chat-composer textarea:focus { border-color: #8eaed1; box-shadow: 0 0 0 3px rgba(36,87,147,.08); }
.chat-send-button { min-height: 42px; padding: 0 18px; }

/* ================= V4.2.19 POST-IT BOARD ================= */
.postit-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; padding-bottom: 13px; border-bottom: 1px solid #e6ebf0; }
.postit-tabs { display: inline-flex; gap: 6px; padding: 4px; border-radius: 13px; background: #edf2f7; }
.postit-tab { min-height: 36px; padding: 0 13px; border: 0; border-radius: 10px; background: transparent; color: #627286; font-size: 11px; font-weight: 850; cursor: pointer; }
.postit-tab span { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 5px; padding: 0 5px; border-radius: 999px; background: rgba(0,0,0,.055); font-size: 9px; }
.postit-tab.active { background: #fff; color: #183b62; box-shadow: 0 2px 8px rgba(21,49,80,.08); }
.postit-legend { display: flex; gap: 12px; align-items: center; color: #8190a0; font-size: 10px; }
.postit-legend .legend-important { color: #b74c44; font-weight: 850; }
.postit-board { display: grid; grid-template-columns: repeat(4, minmax(210px,1fr)); gap: 20px 18px; align-items: start; padding: 6px 4px 24px; }
.postit-card { --postit-bg: #fff3a8; --postit-line: #e4d57f; position: relative; min-height: 220px; display: flex; flex-direction: column; padding: 19px 18px 15px; border: 1px solid var(--postit-line); border-radius: 4px 4px 14px 4px; background: var(--postit-bg); color: #3f432a; box-shadow: 0 12px 20px rgba(65,68,47,.10), 0 2px 4px rgba(65,68,47,.06); transform: rotate(var(--postit-tilt, 0deg)); transform-origin: 50% 12%; transition: transform .15s ease, box-shadow .15s ease; overflow: hidden; }
.postit-card:hover { transform: rotate(0deg) translateY(-2px); box-shadow: 0 16px 28px rgba(65,68,47,.14), 0 3px 6px rgba(65,68,47,.08); z-index: 2; }
.postit-card::before { content: ""; position: absolute; width: 62px; height: 17px; top: -4px; left: 50%; transform: translateX(-50%) rotate(-1deg); background: rgba(255,255,255,.48); border: 1px solid rgba(120,110,70,.08); box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.postit-card::after { content: ""; position: absolute; right: 0; bottom: 0; width: 28px; height: 28px; background: linear-gradient(135deg, rgba(255,255,255,0) 0 49%, rgba(255,255,255,.6) 50% 100%); }
.postit-card.color-pink { --postit-bg: #ffdce5; --postit-line: #ebbdc9; color: #4c3038; }
.postit-card.color-blue { --postit-bg: #dceeff; --postit-line: #bed8ee; color: #29445c; }
.postit-card.color-green { --postit-bg: #dff3dc; --postit-line: #c3dfbf; color: #314b30; }
.postit-card.color-purple { --postit-bg: #eadff8; --postit-line: #d2c0e8; color: #47395b; }
.postit-card.important { box-shadow: 0 12px 22px rgba(151,77,69,.14), 0 0 0 2px rgba(189,74,64,.18); }
.postit-card-top { min-height: 25px; display: flex; justify-content: space-between; gap: 9px; align-items: flex-start; margin-bottom: 8px; }
.postit-card-badges { display: flex; gap: 5px; flex-wrap: wrap; }
.postit-card-badges span, .postit-card-badges b { display: inline-flex; align-items: center; min-height: 22px; padding: 0 7px; border-radius: 999px; background: rgba(255,255,255,.45); color: inherit; font-size: 8.5px; font-weight: 850; }
.postit-card-badges b { background: #b94d45; color: #fff; }
.postit-card-actions { display: flex; gap: 4px; }
.postit-card-actions button { border: 0; background: transparent; color: rgba(47,58,48,.64); font-size: 8.5px; font-weight: 850; cursor: pointer; padding: 3px 4px; }
.postit-card-actions .danger-text { color: #a5403a; }
.postit-card h3 { margin: 3px 0 9px; font-size: 17px; line-height: 1.25; letter-spacing: -.025em; overflow-wrap: anywhere; }
.postit-card-body { flex: 1; min-height: 92px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12.5px; line-height: 1.65; }
.postit-card footer { display: grid; gap: 2px; margin-top: 15px; padding-top: 10px; border-top: 1px dashed rgba(63,67,42,.19); }
.postit-card footer span { font-size: 9.5px; font-weight: 850; }
.postit-card footer time { font-size: 8.5px; opacity: .62; }
.postit-modal-card { width: min(720px, 94vw); }
.postit-form { display: grid; gap: 13px; }
.postit-form label { display: grid; gap: 6px; }
.postit-form label > span, .postit-color-fieldset legend { color: #536273; font-size: 11px; font-weight: 800; }
.postit-form input[type="text"], .postit-form select, .postit-form textarea { width: 100%; border: 1px solid #d9e1e9; border-radius: 11px; padding: 11px 12px; background: #fff; color: #162235; font: inherit; outline: none; }
.postit-form textarea { resize: vertical; min-height: 160px; line-height: 1.6; }
.postit-form-grid { display: grid; grid-template-columns: 170px minmax(0,1fr); gap: 12px; }
.postit-important-control { grid-template-columns: auto auto 1fr !important; align-items: center; align-content: end; padding: 10px 12px; border: 1px solid #e3e8ee; border-radius: 11px; background: #fafbfc; }
.postit-important-control > span { grid-column: 1 / -1; }
.postit-important-control input { width: 17px; height: 17px; }
.postit-important-control b { color: #5b6573; font-size: 10.5px; }
.postit-color-fieldset { border: 0; margin: 0; padding: 0; }
.postit-color-picker { display: flex; gap: 9px; margin-top: 7px; }
.postit-color-picker label { display: block; cursor: pointer; }
.postit-color-picker input { position: absolute; opacity: 0; pointer-events: none; }
.postit-color-picker span { width: 32px; height: 32px; display: block; border-radius: 9px; border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.postit-color-picker span[data-color="yellow"] { background: #fff3a8; }
.postit-color-picker span[data-color="pink"] { background: #ffdce5; }
.postit-color-picker span[data-color="blue"] { background: #dceeff; }
.postit-color-picker span[data-color="green"] { background: #dff3dc; }
.postit-color-picker span[data-color="purple"] { background: #eadff8; }
.postit-color-picker input:checked + span { border-color: #183b62; box-shadow: 0 0 0 3px rgba(24,59,98,.11); }

@media (max-width: 1150px) {
  .postit-board { grid-template-columns: repeat(3, minmax(210px,1fr)); }
  .chat-message-row { max-width: 86%; }
}
@media (max-width: 850px) {
  .postit-board { grid-template-columns: repeat(2, minmax(190px,1fr)); }
  .postit-toolbar { align-items: flex-start; flex-direction: column; }
  .chat-head-actions { justify-content: flex-start; }
  .chat-emoji-picker { grid-template-columns: repeat(10, 32px); }
}
@media (max-width: 600px) {
  .postit-board { grid-template-columns: 1fr; gap: 14px; }
  .postit-card { min-height: 190px; transform: none; }
  .postit-form-grid { grid-template-columns: 1fr; }
  .chat-shell { min-height: 500px; height: calc(100vh - 205px); border-radius: 15px; }
  .chat-messages { padding: 16px 11px 12px; }
  .chat-message-row { max-width: 94%; }
  .chat-emoji-picker { grid-template-columns: repeat(8, 32px); }
  .chat-composer { grid-template-columns: 38px minmax(0,1fr) auto; padding: 10px; gap: 7px; }
  .chat-emoji-button { width: 38px; height: 40px; }
  .chat-send-button { padding: 0 12px; }
}


/* ================= V4.2.19 NOTICE + PRESENCE + FAVORITES ================= */
.resource-head-tools { display: flex; align-items: center; justify-content: flex-end; gap: 12px; min-width: 0; }
.home-favorite-quick {
  margin: 16px 0 4px; width: 100%; display: grid; gap: 13px; padding: 16px 18px;
  border: 1px solid #dbe4ee; border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(246,249,253,.94));
  box-shadow: 0 7px 24px rgba(15,23,36,.045);
}
.home-favorite-quick-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-width: 0; }
.home-favorite-title-block { min-width: 0; display: grid; gap: 3px; }
.home-favorite-eyebrow { color: #2c64a2; font-size: 9px; font-weight: 900; letter-spacing: .14em; }
.home-favorite-title-row { display: flex; align-items: baseline; gap: 10px; min-width: 0; flex-wrap: wrap; }
.home-favorite-quick-label { color: #1c2f46; font-size: 15px; font-weight: 900; white-space: nowrap; }
.home-favorite-hint { color: #8b98a8; font-size: 10px; font-weight: 650; }
.home-favorite-widget-actions { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; }
.home-mini-favorites-button {
  min-height: 32px; display: inline-flex; align-items: center; justify-content: center; padding: 0 11px; border: 1px solid #cbd9e6;
  border-radius: 10px; background: #f6f9fc; color: #315b82; font-size: 9.5px; font-weight: 850; cursor: pointer; white-space: nowrap; text-decoration: none;
}
.home-mini-download-button { background: #edf8f0; border-color: #b8dbc4; color: #20603a; }
.home-mini-download-button:hover { background: #e2f3e7; border-color: #95c8a6; color: #174c2c; }
.home-mini-favorites-button:hover, .home-mini-favorites-button.active { background: #eaf3fb; border-color: #a8c5e1; color: #174f7d; }
.home-favorite-quick-list { min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.home-favorite-quick-link {
  position: relative; min-width: 0; min-height: 56px; display: flex; align-items: center; justify-content: flex-start; gap: 9px;
  padding: 8px 34px 8px 46px; border: 1px solid #d7e1eb; border-radius: 12px; background: #fff; color: #20364f;
  font-size: 11.5px; font-weight: 850; overflow: hidden; cursor: grab; text-decoration: none;
  box-shadow: 0 2px 7px rgba(15,23,36,.035); transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, background .14s ease;
}
.home-favorite-quick-link::before {
  content: attr(data-icon); position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px;
  display: grid; place-items: center; border-radius: 8px; background: linear-gradient(135deg,#eaf3ff,#f3f7fc); color: #2762a1;
  border: 1px solid #d9e6f4; font-size: 11px; font-weight: 900;
}
.home-favorite-quick-link::after { content: "↗"; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: #8e9baa; font-size: 11px; }
.home-favorite-quick-name { min-width: 0; width: 100%; line-height: 1.28; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
.home-favorite-quick-link:active { cursor: grabbing; }
.home-favorite-quick-link.favorite-dragging { opacity: .42; transform: scale(.985); }
.home-favorite-quick-link.favorite-drag-over { border-color: #6f9cc8; background: #edf5fc; }
.home-favorite-quick-link:hover { background: #fbfdff; border-color: #afc6de; transform: translateY(-2px); box-shadow: 0 8px 18px rgba(34,78,122,.08); }
.home-favorite-quick-link.disabled { opacity: .45; pointer-events: none; }
.home-favorite-empty { grid-column: 1/-1; min-height: 52px; display: grid; place-items: center; color: #98a3b0; font-size: 10.5px; font-weight: 700; border: 1px dashed #d7e0e9; border-radius: 12px; background: rgba(248,250,252,.8); }
.collection-favorite-button { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: #99a3af; font-size: 19px; line-height: 1; cursor: pointer; }
.collection-favorite-button:hover { background: #f8fafc; color: #52657a; }
.collection-favorite-button.active { color: #b7791f; background: #fffaf0; border-color: #efd7a4; }

@media (max-width: 900px) {
  .home-favorite-quick-head { align-items: flex-start; flex-direction: column; }
  .home-favorite-widget-actions { width: 100%; }
  .home-favorite-quick-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 560px) {
  .home-favorite-quick { padding: 14px; }
  .home-favorite-quick-list { grid-template-columns: 1fr; }
}

.notice-section { margin-top: 28px; }
.notice-head { margin-bottom: 18px; }
.notice-dashboard { margin-bottom: 18px; }
.notice-dashboard article { min-height: 78px; display: flex; flex-direction: column; justify-content: center; }
.notice-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; columns: initial; }
.notice-card {
  width: 100%; height: 356px; min-width: 0; display: flex; flex-direction: column; margin: 0;
  background: #fff; border: 1px solid #e0e6ed; border-radius: 18px; padding: 19px 20px 16px;
  box-shadow: 0 3px 14px rgba(15,23,36,.035); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.notice-card:hover { transform: translateY(-2px); border-color: #d3dde8; box-shadow: 0 10px 28px rgba(15,23,36,.07); }
.notice-card.important { border-color: #ead8a6; box-shadow: inset 3px 0 0 #d5a12d, 0 3px 14px rgba(15,23,36,.035); }
.notice-card.important:hover { box-shadow: inset 3px 0 0 #d5a12d, 0 10px 28px rgba(15,23,36,.07); }
.notice-card-top { min-height: 27px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: nowrap; }
.notice-card-meta-group { min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.notice-meta { color: #8793a1; font-size: 10.5px; white-space: nowrap; }
.notice-card h3 { margin: 15px 0 9px; color: #15263b; font-size: 18px; line-height: 1.35; letter-spacing: -.025em; }
.notice-body {
  min-height: 0; flex: 1; margin: 0; padding: 1px 9px 1px 0; color: #47586b; font-size: 12.5px; line-height: 1.72;
  white-space: pre-wrap; overflow-wrap: anywhere; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #cbd6e1 transparent;
}
.notice-body::-webkit-scrollbar { width: 7px; }
.notice-body::-webkit-scrollbar-thumb { background: #cbd6e1; border-radius: 999px; }
.notice-body::-webkit-scrollbar-track { background: transparent; }
.notice-drag-handle {
  width: 24px; height: 24px; display: inline-grid; place-items: center; border: 1px solid #dce4ec; border-radius: 7px;
  background: #f8fafc; color: #7a8998; font-size: 14px; line-height: 1; cursor: grab; user-select: none;
}
.notice-drag-handle:active { cursor: grabbing; }
.notice-drag-handle.disabled { opacity: .35; cursor: not-allowed; }
.notice-card.notice-dragging { opacity: .48; transform: scale(.985); }
.notice-card.notice-drag-over { border-color: #7fa7ce; box-shadow: inset 0 0 0 2px rgba(75,125,175,.14), 0 10px 28px rgba(15,23,36,.07); }
.notice-status {
  flex: 0 0 auto; min-height: 25px; display: inline-flex; align-items: center; gap: 6px; padding: 0 9px;
  border: 1px solid currentColor; border-radius: 999px; background: #fff; font-size: 9.5px; font-weight: 850; white-space: nowrap;
}
.notice-status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 14%, transparent); }
.notice-status.status-ongoing { color: #16815c; background: #f4fbf7; border-color: #b9dfce; }
.notice-status.status-ended { color: #b7473f; background: #fff7f6; border-color: #ecc6c2; }
.notice-status.status-upcoming { color: #a36b0a; background: #fffaf0; border-color: #ecd69c; }
.notice-status.status-always { color: #3f68a0; background: #f5f8fd; border-color: #c8d6ea; }
.notice-actions {
  min-height: 35px; margin-top: 14px; padding-top: 11px; border-top: 1px solid #edf1f5;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.notice-view-button { border: 0; padding: 4px 0; background: transparent; color: #365f8d; font-size: 10.5px; font-weight: 850; cursor: pointer; }
.notice-view-button:hover { color: #173f6a; }
.notice-admin-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.notice-actions .text-button { font-size: 10.5px; }
.notice-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.notice-view-modal-card { width: min(820px, 94vw); padding: 25px 26px 28px; }
.notice-view-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.notice-view-badges { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.notice-view-title { margin: 18px 0 8px; color: #122238; font-size: 25px; line-height: 1.3; letter-spacing: -.035em; }
.notice-view-meta { margin: 0 0 20px; padding-bottom: 15px; border-bottom: 1px solid #e8edf2; color: #7f8c9a; font-size: 11px; }
.notice-view-body { color: #34475d; font-size: 13.5px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }

.chat-presence-card { max-width: min(640px, 48vw); display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.chat-online-pill { white-space: nowrap; }
.chat-online-users { display: flex; align-items: center; justify-content: flex-end; gap: 5px; flex-wrap: wrap; }
.chat-online-user {
  min-height: 26px; display: inline-flex; align-items: center; padding: 0 8px; border: 1px solid #dce4ec; border-radius: 999px;
  background: #fff; color: #536579; font-size: 9.5px; font-weight: 800;
}
.chat-online-user.own { border-color: #bed5e8; background: #eef6fc; color: #1f5d8f; }
.chat-online-empty { color: #9aa5b1; font-size: 9.5px; font-weight: 700; }

@media (max-width: 1120px) {
  .notice-list { grid-template-columns: 1fr; }
  .chat-presence-card { max-width: 100%; justify-content: flex-start; }
  .chat-online-users { justify-content: flex-start; }
}
@media (max-width: 760px) {
  .resource-head-tools { width: 100%; align-items: stretch; flex-direction: column; }
  .notice-card { height: 342px; }
  .notice-form-row { grid-template-columns: 1fr; }
  .chat-head-actions { width: 100%; }
  .chat-presence-card { width: 100%; }
}

.auth-turnstile{margin:4px 0 2px;min-height:65px;display:flex;justify-content:center;align-items:center}.auth-turnstile[hidden]{display:none!important}

/* V4.2.26 user deletion */
.mini-button.danger { border-color: #f0b7b7; color: #b42318; background: #fff7f6; }
.mini-button.danger:hover:not(:disabled) { background: #feeceb; border-color: #e88982; }
.mini-button.danger:disabled { opacity: .42; cursor: not-allowed; }


/* V4.2.36 login popup notice */
.popup-notice-state{display:inline-flex;align-items:center;border-radius:999px;padding:4px 9px;font-size:12px;font-weight:700;margin-left:8px}
.popup-notice-state.active{background:#dcfce7;color:#166534;border:1px solid #86efac}
.popup-notice-state.inactive{background:#f1f5f9;color:#64748b;border:1px solid #cbd5e1}
.login-popup-notice-backdrop{z-index:1200}
.login-popup-notice-card{max-width:620px;width:min(620px,calc(100vw - 32px));border-top:5px solid #2563eb}
.login-popup-notice-card .notice-view-title{margin-top:8px;font-size:28px;line-height:1.25}
.login-popup-notice-body{white-space:pre-wrap;max-height:48vh;overflow:auto;font-size:15px;line-height:1.7}
.popup-notice-admin-section .notice-card{position:relative}
.popup-active-field>.user-active-toggle{margin-top:8px}

/* V4.2.36 direct messages */
.message-section,.popup-notice-admin-section{margin-top:30px}
.message-help,.popup-notice-admin-help{margin:7px 0 0;color:var(--muted);font-size:12px;line-height:1.6}
.message-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:18px 0 14px;padding:10px 12px;border:1px solid var(--line);border-radius:14px;background:#fff}
.message-tabs{display:flex;align-items:center;gap:8px}
.message-tab{border:1px solid #dbe3eb;background:#f8fafc;color:#526273;border-radius:10px;padding:9px 12px;font-size:12px;font-weight:800}
.message-tab.active{border-color:#9bb7d4;background:#edf5fc;color:#214f80}
.message-tab span{display:inline-flex;min-width:19px;height:19px;align-items:center;justify-content:center;margin-left:5px;padding:0 5px;border-radius:999px;background:#dbeafe;color:#1d4f91;font-size:10px}
.message-sync-status{color:#7a8795;font-size:11px;font-weight:700}
.message-list{display:grid;gap:10px}
.message-row{display:grid;grid-template-columns:42px minmax(0,1fr);gap:12px;align-items:start;padding:15px 16px;border:1px solid #e2e7ec;border-radius:14px;background:#fff;box-shadow:0 2px 8px rgba(15,23,36,.025);cursor:pointer;transition:border-color .14s ease,box-shadow .14s ease,transform .14s ease}
.message-row:hover{border-color:#c8d5e2;box-shadow:0 7px 20px rgba(15,23,36,.06);transform:translateY(-1px)}
.message-row.unread{border-left:4px solid #2f6da9;background:#fbfdff}
.message-row.admin-sender{background:linear-gradient(90deg,#fffaf0 0,#fff 32%)}
.message-row-avatar{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:#edf2f7;color:#40546a;font-size:14px;font-weight:900}
.message-row-avatar.admin{background:#fff1cc;color:#8a5b00;border:1px solid #efcf75}
.message-row-content{min-width:0}
.message-row-head{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.message-row-head strong{font-size:12px;color:#2d4055}
.message-row-content h3{margin:6px 0 5px;font-size:14px;color:#16283d}
.message-row-content p{margin:0 0 7px;color:#647386;font-size:12px;line-height:1.55;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.message-row-content small{color:#98a2ad;font-size:10px}
.message-admin-badge,.message-unread-dot{display:inline-flex;align-items:center;min-height:20px;padding:0 7px;border-radius:999px;font-size:9px;font-weight:900;letter-spacing:.04em}
.message-admin-badge{background:#fff0c2;color:#855400;border:1px solid #edca67}
.message-unread-dot{background:#e7f1fb;color:#225d93;border:1px solid #bed5ea}
.message-compose-modal-card,.message-view-modal-card{width:min(720px,94vw)}
.message-view-head{display:flex;justify-content:space-between;align-items:center;gap:12px}
.message-sender-badge{display:inline-flex;min-height:26px;align-items:center;padding:0 10px;border-radius:999px;font-size:10px;font-weight:900;letter-spacing:.06em}
.message-sender-badge.admin{background:#fff0c2;color:#7a4d00;border:1px solid #e6be52}
.message-sender-badge.user{background:#edf2f7;color:#526273;border:1px solid #d8e0e8}
.message-view-title{margin:18px 0 8px;font-size:24px;color:#14263a;letter-spacing:-.03em}
.message-view-meta{margin:0 0 18px;padding-bottom:14px;border-bottom:1px solid #e7ecf1;color:#778596;font-size:11px}
.message-view-body{min-height:120px;max-height:50vh;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;color:#34475d;font-size:13.5px;line-height:1.8}
.message-view-actions{justify-content:flex-end}

@media (max-width:760px){
  .message-toolbar{align-items:stretch;flex-direction:column}
  .message-tabs{width:100%}.message-tab{flex:1}
  .message-row{grid-template-columns:34px minmax(0,1fr);padding:13px 12px}.message-row-avatar{width:32px;height:32px;border-radius:10px}
}

/* V4.2.40 HOME popup notice ticker + V4.2.39 multi login popup notices */
.login-popup-notice-card{touch-action:pan-y}
.login-popup-notice-footer{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:18px}
.login-popup-notice-footer>.primary-button{min-width:110px}
.login-popup-notice-pager{margin-left:auto;display:flex;align-items:center;gap:8px;padding:5px 6px;border:1px solid #dbe3eb;border-radius:12px;background:#f8fafc}
.login-popup-pager-button{width:34px;height:32px;border:1px solid #d4dee8;border-radius:9px;background:#fff;color:#17395f;font-size:22px;font-weight:800;line-height:1;display:grid;place-items:center;cursor:pointer}
.login-popup-pager-button:hover:not(:disabled){background:#edf5fc;border-color:#9bb7d4}
.login-popup-pager-button:disabled{opacity:.32;cursor:default}
.login-popup-page-indicator{min-width:54px;text-align:center;color:#42566b;font-size:12px;font-weight:900;letter-spacing:.03em}
@media (max-width:560px){.login-popup-notice-footer{align-items:stretch}.login-popup-notice-footer>.primary-button{flex:1}.login-popup-notice-pager{margin-left:0}}

/* V4.2.40 - HOME popup notice ticker */
.home-popup-ticker {
  flex: 1 1 360px; min-width: 220px; max-width: 720px; height: 44px; align-self: flex-start;
  display: flex; align-items: center; gap: 0; margin: 0; padding: 0; overflow: hidden;
  border: 1px solid #d9e3ec; border-radius: 13px; background: rgba(255,255,255,.92); color: #26384b;
  box-shadow: 0 2px 10px rgba(15,23,36,.035); cursor: pointer; text-align: left;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.home-popup-ticker:hover { border-color: #aac1d8; background: #fff; box-shadow: 0 7px 20px rgba(31,79,143,.08); }
.home-popup-ticker:focus-visible { outline: 3px solid rgba(31,79,143,.14); outline-offset: 2px; }
.home-popup-ticker-mark {
  flex: 0 0 40px; height: 100%; display: grid; place-items: center; position: relative; z-index: 2;
  border-right: 1px solid #e3e9ef; background: #f8fbfd; color: #1f5b92; font-size: 15px; font-weight: 900;
}
.home-popup-ticker-viewport {
  flex: 1; min-width: 0; overflow: hidden; height: 100%; display: flex; align-items: center;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
}
.home-popup-ticker-track {
  --popup-ticker-duration: 36s; display: inline-flex; align-items: center; width: max-content; min-width: max-content;
  will-change: transform; animation: homePopupTickerMove var(--popup-ticker-duration) linear infinite;
}
.home-popup-ticker:hover .home-popup-ticker-track { animation-play-state: paused; }
.home-popup-ticker-copy {
  flex: 0 0 auto; white-space: nowrap; padding: 0 54px 0 18px; color: #3d4e61; font-size: 12px; font-weight: 750; letter-spacing: -.01em;
}
.home-popup-ticker-copy .ticker-important { color: #b45309; font-weight: 900; }
.home-popup-ticker-copy .ticker-normal { color: #1f5b92; font-weight: 900; }
.home-popup-ticker-copy .ticker-separator { display: inline-block; padding: 0 18px; color: #a3afbb; }
@keyframes homePopupTickerMove { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .home-popup-ticker-track { animation: none; }
  .home-popup-ticker-viewport { -webkit-mask-image: none; mask-image: none; overflow-x: auto; }
}
@media (max-width: 1320px) and (min-width: 901px) {
  .topbar { flex-wrap: wrap; }
  .home-popup-ticker { order: 3; flex: 1 0 100%; max-width: none; width: 100%; }
}
@media (max-width: 900px) {
  .home-popup-ticker { width: 100%; max-width: none; min-width: 0; order: 2; }
  .top-actions { order: 3; }
}


/* V4.2.41 message center modal + unread attention */
.message-center-backdrop{z-index:1180;align-items:center;justify-content:center;padding:26px}
.message-center-card{width:min(980px,94vw);height:min(760px,88vh);overflow:hidden;display:flex;flex-direction:column}
.message-center-card .message-head{flex:0 0 auto;margin-bottom:4px}
.message-center-card .message-toolbar{flex:0 0 auto}
.message-center-card .message-list{overflow:auto;padding-right:4px;min-height:0}
.message-center-head-actions{display:flex;align-items:center;gap:8px}
.account-message-button.has-unread{border-color:#f3b25f;background:#5f3d1d;color:#fff7e8;box-shadow:0 0 0 3px rgba(244,173,74,.16),0 0 18px rgba(244,173,74,.34);animation:messageGlow 1.8s ease-in-out infinite}
.account-message-button.message-arrived{animation:messageShake .48s ease-in-out 0s 2,messageGlow 1.8s ease-in-out .96s infinite}
@keyframes messageGlow{0%,100%{box-shadow:0 0 0 2px rgba(244,173,74,.10),0 0 10px rgba(244,173,74,.20)}50%{box-shadow:0 0 0 4px rgba(244,173,74,.18),0 0 24px rgba(244,173,74,.50)}}
@keyframes messageShake{0%,100%{transform:translateX(0)}20%{transform:translateX(-3px) rotate(-4deg)}40%{transform:translateX(3px) rotate(4deg)}60%{transform:translateX(-2px) rotate(-3deg)}80%{transform:translateX(2px) rotate(3deg)}}
.popup-order-controls{display:inline-flex;gap:4px;margin-right:auto}
.popup-order-button{min-width:30px;height:28px;border:1px solid #d7e0e8;border-radius:8px;background:#f8fafc;color:#36506a;font-weight:900;cursor:pointer}
.popup-order-button:disabled{opacity:.3;cursor:default}
@media (prefers-reduced-motion:reduce){.account-message-button.has-unread,.account-message-button.message-arrived{animation:none}}

/* V4.2.42 update recovery: UI unchanged from V4.2.41. */
