/* Liberal Construction — Design Comment Portal · v2 light brand theme
   Brand palette (from the LC logo stripes):
   blue #005A8C · red #C8102E · gold #C88F10 · teal #00786B          */
:root {
  --blue: #005a8c; --blue-soft: #e5f0f7; --blue-deep: #084a70;
  --red: #c8102e; --red-soft: #fbe9ec;
  --gold: #c88f10; --gold-soft: #faf3e0;
  --teal: #00786b; --teal-soft: #e2f3f1;
  --green: #1e7a34; --green-soft: #e6f5ea;
  --amber: #8a6d00; --amber-soft: #fdf5d7;
  --ink: #212b36; --mut: #677688; --line: #e4e9f0;
  --bg: #f5f7fa; --side: #ffffff; --card: #ffffff;
  --r: 14px;
  font-size: 15px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
html { scroll-behavior: smooth; }

/* brand stripes motif */
.stripes { display: inline-flex; gap: 4px; }
.stripes i { width: 9px; height: 22px; border-radius: 2px; transform: skewX(-18deg); display: block; }
.stripes i:nth-child(1) { background: var(--blue); }
.stripes i:nth-child(2) { background: var(--red); height: 26px; margin-top: -4px; }
.stripes i:nth-child(3) { background: var(--gold); height: 18px; margin-top: 4px; }
.stripes i:nth-child(4) { background: var(--teal); }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { background: var(--side); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: block; padding: 20px 18px 14px; text-decoration: none !important;
  border-bottom: 1px solid var(--line); }
.brand .brandlogo { width: 150px; display: block; }
.brand em { display: block; font-style: normal; font-size: 10.5px; letter-spacing: 1.8px;
  text-transform: uppercase; color: var(--gold); margin-top: 9px; font-weight: 700; }
.sidebar nav { padding: 14px 12px; flex: 1; overflow-y: auto; }
.sidebar nav a { display: flex; align-items: center; gap: 9px; color: #3d4b5c;
  padding: 9px 12px; border-radius: 10px; margin-bottom: 2px; font-size: 14px; font-weight: 500; }
.sidebar nav a:hover { background: var(--blue-soft); color: var(--blue-deep); text-decoration: none;
  transform: translateX(2px); }
.sidebar nav a.on { background: var(--blue); color: #fff; box-shadow: 0 4px 12px rgba(0,90,140,.25); }
.nav-sep { font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase; color: #9aa8b7;
  margin: 16px 12px 6px; font-weight: 700; }
.side-foot { border-top: 1px solid var(--line); padding: 12px 14px; }

/* online users widget */
.online-w { position: relative; }
.online-btn { display: flex; align-items: center; gap: 8px; width: 100%; border: 1px solid var(--line);
  background: #fff; border-radius: 10px; padding: 8px 12px; cursor: pointer; font: inherit;
  font-size: 13px; color: var(--ink); }
.online-btn:hover { border-color: var(--teal); background: var(--teal-soft); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #22a06b; flex: none;
  box-shadow: 0 0 0 0 rgba(34,160,107,.5); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34,160,107,.45); }
  70% { box-shadow: 0 0 0 7px rgba(34,160,107,0); } 100% { box-shadow: 0 0 0 0 rgba(34,160,107,0); } }
.online-pop { position: absolute; bottom: 110%; left: 0; right: 0; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(16,42,67,.16);
  padding: 10px; display: none; max-height: 280px; overflow-y: auto; z-index: 40; }
.online-pop.show { display: block; animation: rise .18s ease; }
.online-pop .ou { display: flex; gap: 9px; align-items: center; padding: 6px 6px; border-radius: 8px; }
.online-pop .ou:hover { background: var(--bg); }
.online-pop .ou b { font-size: 12.5px; display: block; }
.online-pop .ou small { color: var(--mut); font-size: 11px; }

/* ---------- topbar ---------- */
.main { padding: 0 28px 28px; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 14px 0 12px; position: sticky; top: 0; background: var(--bg); z-index: 30; }
.global-search { flex: 1; max-width: 430px; }
.global-search input { width: 100%; padding: 10px 16px; border: 1px solid var(--line);
  border-radius: 999px; background: #fff; font-size: 13.5px; }
.top-right { display: flex; align-items: center; gap: 14px; }
.page-chip { font-weight: 700; color: var(--blue-deep); font-size: 14px; }
.usermenu { position: relative; }
.usermenu > button { display: flex; align-items: center; gap: 9px; background: #fff;
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px 5px 5px; cursor: pointer;
  font: inherit; }
.usermenu > button:hover { border-color: var(--blue); }
.um-pop { position: absolute; right: 0; top: 115%; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 12px 32px rgba(16,42,67,.16); min-width: 230px; padding: 8px;
  display: none; z-index: 50; }
.um-pop.show { display: block; animation: rise .18s ease; }
.um-pop .who-line { padding: 8px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.um-pop .who-line b { display: block; }
.um-pop .who-line small { color: var(--mut); }
.um-pop a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--ink); font-size: 13.5px; }
.um-pop a:hover { background: var(--blue-soft); text-decoration: none; }
.um-pop a.danger { color: var(--red); }
.um-pop a.danger:hover { background: var(--red-soft); }

.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.avatar.dor { background: var(--teal); }
.avatar.gold { background: var(--gold); color: #fff; }
.foot { margin-top: 36px; color: #9aa8b7; font-size: 11.5px; text-align: center; }

/* ---------- shared ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 18px; box-shadow: 0 1px 3px rgba(16,42,67,.05);
  transition: box-shadow .22s ease, transform .22s ease; }
.grid { display: grid; gap: 14px; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 16px; }
a.kpi { text-decoration: none !important; color: inherit; display: block; }
.kpi { position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; inset: auto 0 0 0; height: 3px; opacity: .9; }
.kpi.blue::after { background: var(--blue); } .kpi.red::after { background: var(--red); }
.kpi.gold::after { background: var(--gold); } .kpi.teal::after { background: var(--teal); }
.kpi.green::after { background: var(--green); }
.kpi:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(16,42,67,.12); }
.kpi .n { font-size: 27px; font-weight: 800; color: var(--blue-deep); }
.kpi.red .n { color: var(--red); } .kpi.gold .n { color: var(--gold); }
.kpi.teal .n { color: var(--teal); } .kpi.green .n { color: var(--green); }
.kpi .l { color: var(--mut); font-size: 12px; margin-top: 3px; }
.kpi .go { position: absolute; top: 12px; right: 14px; color: var(--mut); font-size: 13px;
  opacity: 0; transition: opacity .2s ease; }
.kpi:hover .go { opacity: 1; }

.chip { display: inline-block; padding: 2.5px 10px; border-radius: 999px; font-size: 11.5px;
  font-weight: 600; white-space: nowrap; transition: transform .15s ease; }
.chip.red { background: var(--red-soft); color: var(--red); }
.chip.amber { background: var(--amber-soft); color: var(--amber); }
.chip.blue { background: var(--blue-soft); color: var(--blue); }
.chip.teal { background: var(--teal-soft); color: var(--teal); }
.chip.green { background: var(--green-soft); color: var(--green); }
.chip.grey { background: #eef1f5; color: var(--mut); }
.chip.navyc { background: var(--blue); color: #fff; }
.chip.goldc { background: var(--gold-soft); color: #8a6207; }
a.chip:hover { text-decoration: none; transform: scale(1.05); }
.crit { color: var(--red); font-weight: 700; }

.btn { display: inline-block; border: 0; border-radius: 10px; padding: 9px 16px; cursor: pointer;
  font-size: 13.5px; font-weight: 600; background: var(--blue); color: #fff;
  transition: all .18s ease; }
.btn:hover { background: var(--blue-deep); text-decoration: none; transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0,90,140,.28); }
.btn:active { transform: none; box-shadow: none; }
.btn.gold { background: var(--gold); }
.btn.gold:hover { background: #a97a0c; box-shadow: 0 6px 14px rgba(200,143,16,.3); }
.btn.teal { background: var(--teal); }
.btn.ghost { background: #fff; color: var(--blue-deep); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--blue); box-shadow: 0 4px 10px rgba(16,42,67,.1); }
.btn.sm { padding: 6px 12px; font-size: 12.5px; }
.btn.danger { background: var(--red); }

.flash { padding: 11px 16px; border-radius: 12px; margin: 8px 0 14px; font-size: 13.5px;
  animation: rise .25s ease; }
.flash.ok { background: var(--green-soft); color: var(--green); }
.flash.error { background: var(--red-soft); color: var(--red); }
.flash.floating { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 90; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 11px; letter-spacing: .6px; text-transform: uppercase;
  color: var(--mut); padding: 9px 10px; border-bottom: 2px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top;
  transition: background .12s ease; }
.tbl tr:hover td { background: #f6f9fc; }
.tbl .num { color: var(--mut); white-space: nowrap; }

input, select, textarea { font: inherit; padding: 9px 12px; border: 1px solid #ccd6e0;
  border-radius: 10px; background: #fff; width: 100%; transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,90,140,.14); }
label { font-size: 12px; font-weight: 600; color: var(--mut); display: block; margin: 10px 0 4px; }
.formrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 14px; }

h1.page { font-size: 22px; color: var(--blue-deep); margin: 8px 0 4px; }
.sub { color: var(--mut); font-size: 13px; margin-bottom: 16px; }
.crumbs { font-size: 12.5px; color: var(--mut); margin-bottom: 4px; }
.crumbs a { color: var(--mut); }

/* ---------- dashboard ---------- */
.quick { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 16px; }
.quick a { display: inline-flex; align-items: center; gap: 8px; background: #fff;
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: 13px;
  font-weight: 600; color: var(--blue-deep); transition: all .18s ease; }
.quick a:hover { text-decoration: none; transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(16,42,67,.12); border-color: var(--blue); }
.quick a.hot { background: var(--gold); border-color: var(--gold); color: #fff; }
.quick a.hot:hover { box-shadow: 0 6px 16px rgba(200,143,16,.35); }

.proj-grid { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.proj-card h3 { margin: 0 0 2px; font-size: 16px; }
.proj-card h3 a { color: var(--blue-deep); }
.proj-card .loc { color: var(--mut); font-size: 12px; margin-bottom: 10px; }
.proj-card .donut-row { display: flex; gap: 16px; align-items: center; margin: 8px 0 10px; }
.donut { width: 88px; height: 88px; flex: none; }
.donut circle.arc { transition: stroke-dasharray 1s ease; }
.dstats { font-size: 12.5px; line-height: 2; }
.stage-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.stage-chips a { text-decoration: none; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 1000px) { .split { grid-template-columns: 1fr; } }
.bar { background: #eef1f5; border-radius: 6px; height: 14px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--blue); border-radius: 6px;
  transition: width .9s ease; }
.bar > i.red { background: var(--red); }
.bar > i.teal { background: var(--teal); }

/* ---------- stages ---------- */
.stage-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.stage-card .pct { font-size: 30px; font-weight: 800; color: var(--blue-deep); }
.stage-card .pct small { color: var(--gold); font-size: 14px; vertical-align: super; }
.stage-card h4 { margin: 2px 0 8px; font-size: 14px; }
.stage-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(16,42,67,.1); }
.reg-line { display: flex; justify-content: space-between; font-size: 12.5px; padding: 6px 0;
  border-top: 1px dashed var(--line); }
.gate { border-left: 5px solid var(--red); background: var(--red-soft); padding: 12px 16px;
  border-radius: 10px; margin-bottom: 14px; font-size: 13.5px; color: #8c1d2f; }
.gate.ok { border-color: var(--green); background: var(--green-soft); color: var(--green); }

/* ---------- register ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.filters input, .filters select { width: auto; }
.regtabs { display: flex; gap: 8px; margin: 14px 0 4px; }
.regtabs a { padding: 8px 18px; border-radius: 10px 10px 0 0; background: #e9eef4; color: var(--mut);
  font-weight: 600; font-size: 13px; transition: all .15s ease; }
.regtabs a:hover { text-decoration: none; background: #dfe7ef; }
.regtabs a.on { background: var(--blue); color: #fff; }
.count-strip { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }

/* ---------- comment thread ---------- */
.cmeta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px;
  margin: 12px 0; }
.cmeta .m b { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--mut); }
.cmeta .m span { font-size: 13.5px; }
.thread { margin-top: 14px; }
.bubble { display: flex; gap: 12px; margin-bottom: 14px; animation: rise .25s ease; }
.bubble .avatar { margin-top: 2px; }
.bubble .body { background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 10px 14px; flex: 1; }
.bubble.dor .body { background: var(--teal-soft); border-color: #bfe3df; }
.bubble.navy .body { background: var(--gold-soft); border-color: #eadfba; }
.bubble .meta { font-size: 11.5px; color: var(--mut); margin-bottom: 4px; }
.bubble .meta b { color: var(--ink); font-size: 12.5px; }
.bubble .txt { font-size: 13.5px; white-space: pre-wrap; }
.origin { border-left: 4px solid var(--gold); border-radius: 6px; }
.attlist { margin-top: 6px; }
.attlist a { font-size: 12px; margin-right: 12px; }
.replybox { margin-top: 16px; }
.statusbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- login / auth ---------- */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.login-hero { background: linear-gradient(150deg, #ffffff 0%, #eef4f9 55%, #e3edf5 100%);
  display: flex; flex-direction: column; justify-content: center; padding: 60px;
  border-right: 1px solid var(--line); }
.login-hero .herologo { width: 270px; margin-bottom: 8px; }
.login-hero .tagline { color: var(--gold); font-size: 15px; font-style: italic; margin: 0 0 24px;
  font-weight: 600; }
.login-hero p { color: #45566a; max-width: 500px; line-height: 1.7; font-size: 14.5px; }
.login-hero ul { color: #45566a; line-height: 2.05; font-size: 13.5px; padding-left: 18px; }
.login-panel { display: flex; align-items: center; justify-content: center; background: var(--bg); }
.login-card { width: 390px; animation: rise .35s ease; }
.login-card h2 { color: var(--blue-deep); margin: 0 0 4px; }
.login-card .hint { color: var(--mut); font-size: 13px; margin-bottom: 14px; }
@media (max-width: 900px) { .login-wrap { grid-template-columns: 1fr; } .login-hero { display: none; } }

.mut { color: var(--mut); } .small { font-size: 12px; }
.mt16 { margin-top: 16px; } .right { text-align: right; }
.pill-link { font-size: 12px; }
details.adv summary { cursor: pointer; color: var(--mut); font-size: 12.5px; margin: 6px 0; }

/* ---------- motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.card, .kpi { animation: rise .3s ease backwards; }
.grid > *:nth-child(2) { animation-delay: .04s; } .grid > *:nth-child(3) { animation-delay: .08s; }
.grid > *:nth-child(4) { animation-delay: .12s; } .grid > *:nth-child(5) { animation-delay: .16s; }
.grid > *:nth-child(6) { animation-delay: .2s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
