/* IOP V2.1-derived UX principles: larger body/card text and denser left nav. */
:root {
  font-family: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", system-ui, sans-serif;
  color: #17233a;
  background: #f5f7fb;
  font-synthesis: none;
  line-height: 1.48;
  --blue: #2757b9;
  --nav-dark: #14223e;
  --border: #dde3ed;
  --muted: #546179;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button { font: inherit; cursor: pointer; }
button:focus-visible { outline: 3px solid #62a9ff; outline-offset: 2px; }
.layout { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--nav-dark); color: #edf3ff; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 12px; padding: 25px 18px 25px 20px; border-bottom: 1px solid #2c3c58; }
.brand-mark { display: grid; place-items: center; height: 37px; width: 37px; border-radius: 10px; background: #4c83e4; color: white; font-size: 22px; font-weight: 800; }
.brand strong { display: block; font-size: 17px; letter-spacing: .3px; }
.brand small { display: block; color: #b7c5da; font-size: 12px; margin-top: 1px; }
.navigation { padding: 9px 10px; display: flex; flex-direction: column; gap: 1px; overflow: auto; }
.nav-section { font-size: 12px; letter-spacing: 1px; color: #a3b4d0; padding: 17px 12px 6px; }
.nav-link { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; border-radius: 8px; background: none; color: #dce5f5; text-align: left; font-weight: 600; font-size: 16px; line-height: 21px; padding: 9px 11px; min-height: 39px; }
.nav-link > span { width: 19px; text-align: center; font-size: 18px; color: #aebfda; }
.nav-link:hover { background: #273a5c; }
.nav-link.is-active { background: #315a9a; color: #fff; }
.sidebar-footer { margin-top: auto; padding: 20px 18px; border-top: 1px solid #2c3c58; font-size: 13px; color: #aebed8; }
.status-dot { display: inline-block; width: 7px; height: 7px; background: #ffc36b; border-radius: 50%; margin-right: 6px; }
.main { min-width: 0; }
.topbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 14px; background: #fff; border-bottom: 1px solid var(--border); padding: 0 35px; }
.breadcrumb { color: var(--muted); font-size: 15px; display: flex; align-items: center; gap: 11px; }
.breadcrumb strong { color: #273957; }
.top-actions { display: flex; align-items: center; gap: 15px; font-size: 14px; }
.connection-tag { background: #fff3e1; color: #815412; border: 1px solid #f1d59f; padding: 6px 10px; border-radius: 6px; font-weight: 600; }
.user-chip { border-radius: 18px; border: 1px solid var(--border); padding: 6px 12px; color: var(--muted); }
.auth-login-trigger { border: 1px solid var(--border); background: #fff; border-radius: 7px; padding: 6px 11px; color: #204c72; font: inherit; font-weight: 600; white-space: nowrap; cursor: pointer; }
.auth-login-trigger:disabled { color: var(--muted); background: #f1f3f6; cursor: not-allowed; }
.auth-login-trigger:focus-visible { outline: 3px solid #306ca0; outline-offset: 2px; }
.content { max-width: 1350px; margin: 0 auto; padding: 28px 35px 56px; }
.warning { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 13px; padding: 15px 18px; background: #fffaf0; color: #624b25; border: 1px solid #ead8ae; border-radius: 10px; font-size: 15px; margin-bottom: 30px; }
.warning strong { font-size: 16px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 26px; }
h1 { margin: 0 0 5px; font-size: 30px; letter-spacing: -.5px; }
.page-heading p { font-size: 16px; line-height: 1.7; margin: 0; color: var(--muted); }
.phase-pill { border-radius: 18px; background: #eaf1ff; color: #315ca1; padding: 7px 13px; white-space: nowrap; font-weight: 700; font-size: 13px; }
.metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-bottom: 21px; }
.metric, .panel-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 2px 7px #26385808; }
.metric { display: flex; flex-direction: column; padding: 22px; min-height: 174px; }
.metric > span { color: var(--muted); font-size: 16px; font-weight: 700; }
.metric strong { margin: 5px 0; font-size: 39px; line-height: 1.3; }
.metric small { color: #69768c; font-size: 14px; }
.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: stretch; }
.panel-card { padding: 24px; }
.panel-card h2 { margin: 0 0 7px; font-size: 21px; }
.panel-card p { margin: 0 0 17px; line-height: 1.7; color: var(--muted); font-size: 16px; }
.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-actions button { border-radius: 8px; border: 1px solid #dbe4f4; background: #f8fbff; padding: 14px 15px; color: #2a477c; text-align: left; font-size: 15px; font-weight: 700; display: flex; justify-content: space-between; }
.quick-actions button:hover { background: #e8f0fe; }
.milestone-list { padding-left: 21px; margin: 10px 0 0; }
.milestone-list li { padding: 5px 0 11px 5px; color: var(--muted); }
.milestone-list strong { display: block; font-size: 16px; color: #273957; }
.milestone-list span { display: block; font-size: 15px; line-height: 1.7; }
.disabled-action { background: #eef1f5; color: #6f7a8e; border: 1px solid #cdd4df; padding: 11px 18px; border-radius: 8px; opacity: 1; cursor: not-allowed; }
section[hidden] { display: none !important; }
@media (max-width: 1080px) { .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); } .columns { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .layout { display: block; }
  .sidebar { height: auto; position: relative; }
  .brand { padding: 14px 18px; }
  .navigation { display: flex; flex-direction: row; overflow-x: auto; padding: 10px; }
  .nav-section, .sidebar-footer { display: none; }
  .nav-link { flex: 0 0 auto; width: auto; font-size: 15px; padding: 10px 12px; white-space: nowrap; }
  .topbar { min-height: 64px; padding: 10px 17px; flex-wrap: wrap; }
  .content { padding: 21px 17px; }
  .metrics { gap: 10px; }
  .metric { padding: 16px; min-height: 135px; }
  .metric strong { font-size: 32px; }
  h1 { font-size: 27px; }
  .page-heading { align-items: flex-start; }
  .phase-pill { display: none; }
}
@media (max-width: 420px) { .metrics { grid-template-columns: 1fr; } .quick-actions { grid-template-columns: 1fr; } }
