/* Marketing and BD additions to the FLG Comp styles (app.css). */
main { min-width: 0; }   /* wide tables scroll inside their panel instead of widening the page */
.rail .brand span { font-size: 17px; }
.navcount { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 999px; background: #f2c14e; color: #172033; font-size: 12px; font-weight: 700; text-align: center; }
.navcount:empty { display: none; }
.crumb { margin: 0 0 4px; font-size: 13px; }
.req { color: var(--err); }
.form-err { color: var(--err); background: var(--err-bg); padding: 8px 10px; border-radius: 6px; margin: 10px 0 0; white-space: pre-line; }
.pre { white-space: pre-wrap; }
.small { font-size: 12px; } .gap { margin: 10px 0; }
.quote { font-style: italic; color: var(--ink-2); margin: 4px 0; }

/* record page facts */
dl.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 22px; margin: 0; }
dl.facts div.wide { grid-column: 1 / -1; }
dl.facts dt { font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em; }
dl.facts dd { margin: 2px 0 0; overflow-wrap: anywhere; }

/* editor dialog */
dialog.editor-dialog { max-height: calc(100vh - 40px); overflow: auto; }
details.fgroup { margin-top: 14px; border-top: 1px solid var(--rule-2); padding-top: 10px; }
details.fgroup summary { cursor: pointer; font-weight: 600; color: var(--ink-2); margin-bottom: 10px; }
label.f .hint { font-size: 12px; }
.ms { position: relative; }
.ms-btn { width: 100%; text-align: left; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-pop { position: absolute; z-index: 70; left: 0; right: 0; top: calc(100% + 4px); min-width: 240px; background: var(--panel); border: 1px solid var(--grid); border-radius: 8px; box-shadow: 0 8px 28px rgba(28,36,48,.18); padding: 8px; display: grid; gap: 6px; }
.ms-pop[hidden] { display: none; }
.ms-list { max-height: 220px; overflow: auto; display: grid; gap: 2px; }
.ms-list label { display: flex; gap: 8px; align-items: center; padding: 3px 4px; border-radius: 4px; cursor: pointer; color: var(--ink); font-size: 14px; }
.ms-list label:hover { background: var(--rule-2); } .ms-list label[hidden] { display: none; }
.ms-foot { display: flex; justify-content: space-between; }

/* dashboard */
.ask-bar.capture textarea { flex: 1; min-width: 0; resize: vertical; font: inherit; }
.next-list { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; }
.kind { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 1px 6px; border-radius: 4px; color: #fff; }
.k-event { background: #2a78d6; } .k-session { background: #4a3aa7; } .k-deadline { background: #eb6834; } .k-publication { background: #008300; } .k-task { background: #8a94a6; }

/* calendar */
.cal-title { padding: 0 6px; }
.cal-legend { display: flex; gap: 8px; margin-bottom: 8px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-left: 1px solid var(--grid); border-top: 1px solid var(--grid); background: var(--panel); }
.cal-h { font-size: 12px; font-weight: 700; color: var(--ink-2); padding: 6px; background: #eef1f5; border-right: 1px solid var(--grid); border-bottom: 1px solid var(--grid); }
.cal-d { min-height: 96px; padding: 4px; border-right: 1px solid var(--grid); border-bottom: 1px solid var(--grid); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-d.other { background: #fafbfc; } .cal-d.other .cal-n { color: var(--ink-3); }
.cal-d.today { box-shadow: inset 0 0 0 2px #f2c14e; }
.cal-n { font-size: 12px; font-weight: 600; }
.cal-i { display: block; font-size: 12px; color: #fff; padding: 1px 5px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-i:hover { text-decoration: none; filter: brightness(1.1); }

/* pipeline board */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.lane { background: #eef1f5; border: 1px solid var(--grid); border-radius: 8px; padding: 8px; min-height: 200px; display: flex; flex-direction: column; gap: 8px; }
.lane.drop { outline: 2px dashed var(--accent); }
.lane-h { display: flex; flex-direction: column; font-size: 13px; }
.card { background: #fff; border: 1px solid var(--rule); border-radius: 6px; padding: 8px 10px; font-size: 13px; cursor: grab; display: grid; gap: 2px; }
.card:active { cursor: grabbing; }
.stage-move { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-2); }

/* review */
.panel.review { margin-bottom: 14px; }

/* chat button and drawer, on every screen */
.chat-fab { position: fixed; right: 22px; bottom: 22px; z-index: 40; background: var(--accent); color: #fff; border: none; border-radius: 999px; padding: 12px 18px; box-shadow: 0 6px 18px rgba(31,78,156,.35); }
.chat-fab:hover { background: #17407f; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); z-index: 45; background: var(--paper); border-left: 1px solid var(--grid); box-shadow: -8px 0 28px rgba(28,36,48,.15); display: flex; }
.drawer[hidden] { display: none; }
.drawer .chat-main { flex: 1; min-height: 0; border: none; border-radius: 0; }
.drawer .chat-log { max-height: none; }
body.drawer-open .chat-fab { display: none; }
.chat-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--rule); }
.chat-head .hint { flex: 1 1 100%; order: 3; margin: 0; }
.chat-head [data-new] { margin-left: auto; }
.chat-page { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.chat-page .chat-main { min-height: 70vh; }
.chat-card.proposal .actions { margin-top: 6px; }
.chat-suggest[hidden] { display: none; }

/* sign-in */
.signin { max-width: 440px; margin: 12vh auto; text-align: center; padding: 30px; }
body.signed-out .chat-fab, body.signed-out .rail a:not(.brand) { display: none; }

@media (max-width: 760px) {
  .rail { flex-direction: row; flex-wrap: wrap; padding: 8px; gap: 2px; }
  .rail .brand { width: 100%; margin-bottom: 4px; padding-bottom: 6px; font-size: 18px; }
  .rail a { padding: 6px 10px; border-left: none; border-bottom: 2px solid transparent; }
  .rail a.active { border-bottom-color: #f2c14e; }
  .rail-foot { display: none; }
  .chat-page { grid-template-columns: 1fr; }
  .cal-d { min-height: 64px; } .cal-i { font-size: 10px; padding: 0 3px; }
  .board { grid-auto-columns: minmax(200px, 85vw); }
  dl.facts { grid-template-columns: 1fr 1fr; }
  .tabletools input[type=search] { width: 100%; }
  .fields .wide { grid-column: auto; }
}
@media print { .chat-fab, .drawer, .ask-bar { display: none !important; } }
