/* =====================================================================
   Sunice — Back-office (desktop) chrome
   ===================================================================== */

.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }

/* --- Sidebar -------------------------------------------------------- */
.side {
  background: linear-gradient(180deg, var(--sky-700) 0%, #0C5C84 100%);
  color: #EaF6Fd; padding: 1.1rem 1rem 1.4rem; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: .3rem;
}
.side .brand { display: flex; align-items: center; gap: .6rem; padding: .2rem .3rem 1.1rem; }
.side .brand img { width: 42px; height: 42px; border-radius: 11px; box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.side .brand .wm { font-family: var(--font-display); font-weight: 700; font-size: 1.28rem; color: #fff; letter-spacing: .01em; line-height: 1; }
.side .brand .wm small { display: block; font-family: var(--font-ui); font-weight: 600; font-size: .62rem; letter-spacing: .22em; text-transform: uppercase; color: #A9DcF4; margin-top: 3px; }

.nav { display: flex; flex-direction: column; gap: 2px; margin-top: .3rem; }
.nav a {
  display: flex; align-items: center; gap: .7rem; padding: .62rem .75rem; border-radius: 11px;
  color: #CDEaF8; font-weight: 600; font-size: .94rem; text-decoration: none; transition: background .14s, color .14s;
}
.nav a .ic { width: 20px; text-align: center; opacity: .92; }
.nav a:hover { background: rgba(255,255,255,.10); color: #fff; }
.nav a.active { background: #fff; color: var(--sky-700); box-shadow: var(--shadow-sm); }
.nav a .badge {
  margin-left: auto; background: var(--sun); color: #3a2606; font-size: .7rem; font-weight: 800;
  min-width: 20px; height: 20px; border-radius: 999px; display: grid; place-items: center; padding: 0 .35rem;
}
.nav .sep { font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: #87C6E8; margin: 1rem .75rem .35rem; }
.side .who { margin-top: auto; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.16); font-size: .82rem; color: #BfE3F6; }
.side .who b { color: #fff; display: block; font-size: .92rem; }
.side .who a { color: #BfE3F6; text-decoration: underline; font-size: .8rem; }

/* --- Main ----------------------------------------------------------- */
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.15rem 1.6rem;
}
.topbar h1 { font-size: 1.55rem; }
.topbar .sub { color: var(--muted); font-size: .9rem; margin-top: 2px; }
.content { padding: 0 1.6rem 2.4rem; }

/* --- Dashboard stat cards (temperature row) ------------------------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 1.05rem 1.15rem; position: relative; overflow: hidden;
}
.stat::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--tone, var(--sky)); }
.stat .n { font-family: var(--font-display); font-weight: 700; font-size: 2.1rem; line-height: 1; color: var(--ink); }
.stat .k { font-size: .82rem; color: var(--muted); font-weight: 600; margin-top: .35rem; }

/* --- Grid helpers --------------------------------------------------- */
.grid { display: grid; gap: 1.25rem; }
.grid--2 { grid-template-columns: 1.6fr 1fr; }
@media (max-width: 1080px) { .grid--2 { grid-template-columns: 1fr; } }

/* --- Order list extras ---------------------------------------------- */
.toolbar { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.toolbar .grow { flex: 1; }
.segmented { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.segmented a { padding: .42rem .85rem; border-radius: 999px; font-size: .84rem; font-weight: 700; color: var(--muted); text-decoration: none; }
.segmented a.active { background: var(--sky); color: #fff; }

/* --- Timeline ------------------------------------------------------- */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 1.1rem 1.6rem; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 5px; width: 11px; height: 11px; border-radius: 50%; background: var(--sky); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sky) 22%, #fff); }
.timeline li::after { content: ""; position: absolute; left: 9px; top: 16px; bottom: -2px; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline .t { font-size: .76rem; color: var(--muted); }
.timeline .e { font-weight: 600; }

/* --- Login (office) ------------------------------------------------- */
.authwrap { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.authcard { width: 100%; max-width: 410px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); overflow: hidden; }
.authcard .head { background: linear-gradient(135deg, var(--sky) 0%, var(--sky-700) 100%); padding: 1.8rem 1.6rem 2.1rem; text-align: center; color: #fff; }
.authcard .head img { width: 64px; height: 64px; border-radius: 16px; margin: 0 auto .8rem; box-shadow: 0 8px 20px rgba(0,0,0,.25); }
.authcard .head .wm { font-family: var(--font-display); font-weight: 700; font-size: 1.7rem; }
.authcard .head .wm small { display:block; font-size:.64rem; letter-spacing:.24em; text-transform:uppercase; color:#BfE6FA; font-family:var(--font-ui); font-weight:600; margin-top:4px; }
.authcard .body { padding: 1.6rem; }

@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .side .nav { flex-direction: row; flex-wrap: wrap; }
  .side .who { margin: 0 0 0 auto; padding: 0; border: 0; }
  .side .brand { padding: 0; }
  .nav .sep { display: none; }
}
