/* Faithful rebuild of the PMAS dashboard (PMS/frontend/src/app/page.tsx) in
   its dark theme, rendered at 1600 x 1000 and scaled to fit the hero frame.
   Tokens copied from PMS/frontend/src/app/globals.css (@theme, dark) and the
   Tailwind 4 default status colours the app uses. */

.app {
  --g950: #0c1224; --g900: #111a33; --g800: #192444; --g700: #283759; --g600: #3d4d78;
  --g500: #64739e; --g400: #8fa0c4; --g300: #b9c4de; --g200: #d5dcee;
  --cyan400: #3fd0e8; --cyan500: #23b8d4; --cyan950: #0a2f42;
  --blue400: #7aa5ff; --blue600: #4573e8;
  --green400: #05df72; --green500: #00c950; --green900: #0d542b;
  --yellow400: #fac800; --yellow500: #edb200;
  --red400: #ff6467; --red900: #82181a;
  --slate300: #cad5e2; --slate400: #90a1b9; --slate700: #314158;
  --sticky: #151f3c;
  --shadow-soft: rgba(4, 9, 30, 0.9);

  position: absolute; top: 0; left: 0; width: 1600px; height: 1000px;
  transform-origin: 0 0;
  display: flex; background: var(--g900); color: var(--g200);
  font-family: "Manrope", "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "tnum"; font-size: 16px; line-height: 1.5; text-align: left;
  -webkit-font-smoothing: antialiased;
}
.app * { box-sizing: border-box; }
.app .bi { line-height: 1; }

/* sidebar (sidebar-full variant, w-56) */
.app-side { width: 224px; flex: none; background: var(--g900); border-right: 1px solid var(--g800); display: flex; flex-direction: column; }
.app-brand { padding: 16px; border-bottom: 1px solid var(--g800); display: flex; align-items: center; gap: 10px; }
.app-brand img { width: 36px; height: 36px; flex: none; }
.app-brand p { margin: 0; font-size: 12px; line-height: 1.35; color: var(--g500); }
.app-nav { flex: 1; padding: 12px; display: grid; align-content: start; gap: 4px; }
.app-nav a { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px; font-size: 14px; color: var(--g300); text-decoration: none; }
.app-nav a .bi { font-size: 16px; }
.app-nav a.on { background: rgba(69, 115, 232, .2); color: var(--blue400); }
.app-sub { list-style: none; margin: 4px 0 0 12px; padding: 0 0 0 8px; border-left: 1px solid var(--g800); display: grid; gap: 2px; }
.app-sub li { display: flex; align-items: center; gap: 8px; padding: 6px 12px; font-size: 14px; color: var(--g400); border-radius: 8px; white-space: nowrap; }
.app-sub li .bi { font-size: 12px; }
.app-nav a.ai .bi { color: var(--cyan400); }
.app-user { padding: 12px; border-top: 1px solid var(--g800); }
.app-who { padding: 8px 12px; margin-bottom: 4px; }
.app-who p { margin: 0; font-size: 12px; color: #fff; }
.app-who span { display: inline-block; margin-top: 4px; padding: 2px 6px; font-size: 10px; font-weight: 500; background: rgba(69, 115, 232, .2); color: var(--blue400); border-radius: 4px; }
.app-user a { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px; font-size: 14px; color: var(--g400); }

/* main */
.app-main { flex: 1; min-width: 0; padding: 24px; overflow: hidden; }
.app-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.app-head h2 { margin: 0; font-size: 20px; line-height: 28px; font-weight: 700; color: #fff; letter-spacing: 0; }
.app-clock { background: var(--g700); color: var(--g300); font-size: 12px; padding: 6px 12px; border-radius: 999px; white-space: nowrap; }
.app-clock .bi { margin-right: 4px; }

/* shift + output progress */
.app-prog { margin-bottom: 24px; background: rgba(25, 36, 68, .5); border: 1px solid var(--g700); border-radius: 8px; padding: 12px 20px; display: grid; gap: 8px; }
.app-prow { display: grid; grid-template-columns: 6rem 1fr; column-gap: 12px; row-gap: 4px; align-items: center; }
.app-prow > .lbl { font-size: 12px; color: var(--g400); }
.app-prow.crew { margin-bottom: 12px; }
.app-crew { display: inline-flex; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: rgba(10, 47, 66, .5); color: var(--cyan400); }
.app-bar { height: 6px; background: var(--g700); border-radius: 999px; overflow: hidden; }
.app-bar i { display: block; height: 100%; border-radius: 999px; transition: width 1s; }
.app-prow p { grid-column: 2; margin: 0; font-size: 12px; color: var(--g500); }
.app-prow p b { color: #fff; font-weight: 500; }
.app-prow p .sep { margin: 0 6px; color: var(--g600); }

/* summary tiles */
.app-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.app-tile { background: rgba(25, 36, 68, .6); border-radius: 16px; padding: 16px 20px; display: flex; flex-direction: column; gap: 4px; box-shadow: 0 14px 30px -18px var(--shadow-soft); }
.app-tile .lbl { font-size: 12px; font-weight: 500; color: var(--g400); }
.app-tile .val { font-size: 24px; line-height: 32px; font-weight: 700; display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.app-tile .val .pipe { color: var(--g500); font-weight: 400; }
.app-tile .val .bi { font-size: 18px; }
.app-tile .sub { font-size: 12px; color: var(--g500); }

/* cell table */
.app-cell { background: rgba(25, 36, 68, .5); border: 1px solid var(--g700); border-radius: 8px; overflow: hidden; margin-bottom: 16px; }
.app-cell table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 14px; }
.app-cell td, .app-cell th { padding: 12px 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.app-sum { background: var(--g800); border-bottom: 1px solid var(--g700); }
.app-sum td { padding-top: 12px; padding-bottom: 12px; }
.app-sum .k { font-size: 14px; font-weight: 600; display: block; }
.app-sum .d { font-size: 12px; color: var(--g500); display: block; }
.app-sum .u { font-size: 12px; font-weight: 400; opacity: .6; }
.app-cellname { display: flex; align-items: center; gap: 8px; }
.app-cellname .bi { color: var(--cyan400); }
.app-cellname b { color: #fff; font-size: 16px; }
.app-floor { display: inline-flex; align-items: center; gap: 4px; border-radius: 6px; background: rgba(40, 55, 89, .7); padding: 2px 6px; font-size: 11px; font-weight: 500; color: var(--g300); }
.app-cols { background: rgba(25, 36, 68, .7); border-bottom: 1px solid rgba(40, 55, 89, .5); }
.app-cols th { padding-top: 8px; padding-bottom: 8px; text-align: left; font-size: 12px; font-weight: 500; color: var(--g500); }
.app-cols th.on { color: #fff; }
.app-cols th .bi { font-size: 11px; margin-left: 4px; opacity: .7; }
.app-rows tr { border-top: 1px solid rgba(40, 55, 89, .5); transition: background .4s; }
.app-rows tr.flash { background: rgba(255, 255, 255, .05); }
.app .chg { animation: chg 1.4s ease-out; }
@keyframes chg {
  0%   { background-color: rgba(63, 208, 232, .16); text-shadow: 0 0 10px currentColor; }
  100% { background-color: transparent; text-shadow: none; }
}
.app-rows td:first-child { background: var(--sticky); }
.app-mname { font-weight: 700; color: var(--cyan400); line-height: 1.25; }
.app-mfmt { font-size: 12px; color: var(--g500); line-height: 1.25; }
.app-rows .fig { font-weight: 500; color: #fff; }
.app-rows .fig .u { color: var(--g500); font-size: 12px; font-weight: 400; }
.app-rows .fig .pc { font-size: 12px; opacity: .7; }
.app-rows .dur { font-size: 12px; color: var(--g500); font-weight: 400; display: block; }
.app-rows .dur .bi { margin-left: 4px; font-size: 14px; }
.app-rows .sync { color: var(--g400); }
.app-pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.app-pill i { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.app-pill .since { opacity: .7; font-weight: 400; }
.app-pill.running { background: rgba(13, 84, 43, .3); color: var(--green400); }
.app-pill.running i { background: var(--green400); }
.app-pill.idle { background: rgba(49, 65, 88, .5); color: var(--slate300); }
.app-pill.idle i { background: var(--slate400); }
.app-pill.error { background: rgba(130, 24, 26, .3); color: var(--red400); }
.app-pill.error i { background: var(--red400); }

.t-green { color: var(--green400) !important; }
.t-yellow { color: var(--yellow400) !important; }
.t-red { color: var(--red400) !important; }
.t-gray { color: var(--g500) !important; }
.b-cyan { background: var(--cyan500); }
.b-green { background: var(--green500); }
.b-yellow { background: var(--yellow500); }
.b-red { background: #fb2c36; }
