/* LaraOffice dashboard in the "Codecyon AI Pulse" slot (custom/laraoffice-dash.js).
   .lo-app is drawn at a fixed design size and scaled into .lo-stage by the script. */

/* hide the template's Rive animation and its poster underneath */
.lo-host > :not(.lo-stage) { visibility: hidden !important; }

.lo-stage {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(20, 30, 60, .08), 0 24px 60px -20px rgba(20, 30, 60, .35);
}
.lo-app {
  --lo-blue: #1a56c9;
  --lo-ink: #1d2b4f;
  --lo-mute: #4d6fa6;
  --lo-line: #e6e9ef;
  --lo-soft: #f4f6fa;
  position: absolute;
  left: 0; top: 0;
  transform-origin: 0 0;
  display: flex;
  background: #fff;
  color: var(--lo-ink);
  font: 400 13px/1.35 Roboto, "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  text-align: left;
  letter-spacing: 0;
  overflow: hidden;
}
.lo-app * { box-sizing: border-box; }
.lo-app b { font-weight: 500; }
.lo-app h1, .lo-app h2, .lo-app p { margin: 0; }
.lo-ic { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lo-app kbd {
  display: inline-block; padding: 1px 6px; border-radius: 4px;
  font: 500 10px/1.5 ui-monospace, Consolas, monospace;
  background: #0f1d4a; color: #fff;
}

/* ---------- left rail ---------- */
.lo-rail {
  width: 50px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 0; background: linear-gradient(#1c5bd0, #1647ad); color: #fff;
}
.lo-rail-logo { width: 30px; height: 30px; margin-bottom: 26px; padding: 3px; border-radius: 7px; background: #fff; }
.lo-rail-logo .lo-logo-mark { width: 100%; height: 100%; display: block; }
.lo-rail-item {
  position: relative; width: 44px; padding: 7px 0 6px; margin-bottom: 18px; border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 8.5px; font-weight: 500; line-height: 1.1; text-align: center;
  opacity: 0; translate: -8px 0; transition: opacity .45s, translate .5s; transition-delay: calc(var(--i) * 50ms);
}
.lo-rail-item .lo-ic { width: 17px; height: 17px; }
.lo-rail-item.is-on { background: rgba(255, 255, 255, .2); }
.lo-rail-item.is-on::after {
  content: ""; position: absolute; right: -6px; top: 50%; margin-top: -6px;
  border: 6px solid transparent; border-right-color: #fafbfc; border-left: 0;
}
.lo-avatar {
  width: 30px; height: 30px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #f6c79b, #b86a3c); color: #fff; font-weight: 700; font-size: 13px;
  box-shadow: 0 0 0 2px #fff;
}
.lo-rail-av { margin-top: auto; }

/* ---------- section menu ---------- */
.lo-sub { width: 160px; flex: none; padding: 12px 12px; background: #fafbfc; border-right: 1px solid #eef0f3; }
.lo-brand, .lo-mbrand { display: flex; align-items: center; gap: 6px; height: 30px; }
.lo-brand .lo-logo-mark, .lo-mbrand .lo-logo-mark { width: 28px; height: 28px; }
.lo-brand b, .lo-mbrand b { font-size: 19px; font-weight: 500; color: #1d3f8f; letter-spacing: -.02em; }
.lo-brand b span, .lo-mbrand b span { color: #2f7fe0; }
.lo-sub-h { margin: 32px 0 14px 4px; font-size: 12px; font-weight: 500; }
.lo-sub-i { display: flex; align-items: center; gap: 8px; margin: 0 0 16px 14px; font-size: 9px; font-weight: 500; color: #3a4a6e; }
.lo-sub-i .lo-ic { width: 10px; height: 10px; color: var(--lo-mute); }

/* ---------- main ---------- */
.lo-main { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lo-top { height: 50px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid #f0f2f5; }
.lo-top .lo-mbrand, .lo-top .lo-msearch { display: none; }
.lo-btn { position: relative; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--lo-soft); color: #33415f; }
.lo-search {
  display: flex; align-items: center; gap: 8px; width: 214px; height: 28px; padding: 0 6px 0 9px;
  border: 1px solid var(--lo-line); border-radius: 6px; font-size: 10.5px; color: var(--lo-mute);
}
.lo-search span { flex: 1; }
.lo-search .lo-ic { width: 12px; height: 12px; }
.lo-search kbd { background: none; color: #6a7896; border: 1px solid var(--lo-line); font-size: 8.5px; }
.lo-view { font-size: 9px; color: var(--lo-mute); }
.lo-select {
  display: flex; align-items: center; justify-content: space-between; width: 150px; height: 24px; padding: 0 8px;
  border: 1px solid var(--lo-line); border-radius: 4px; font-size: 9.5px; font-weight: 500;
}
.lo-select .lo-ic { width: 11px; height: 11px; }
.lo-sp { flex: 1; }
.lo-badge {
  position: absolute; top: -3px; right: -3px; min-width: 15px; height: 15px; border-radius: 8px;
  display: grid; place-items: center; background: #e5484d; color: #fff;
  font: 700 9px/1 Roboto, Arial, sans-serif; font-style: normal;
  scale: 0; transition: scale .35s cubic-bezier(.3, 1.6, .5, 1);
}
.lo-user { display: flex; align-items: center; gap: 8px; }
.lo-user small { display: block; font-size: 8.5px; color: var(--lo-blue); }
.lo-user b { display: flex; align-items: center; gap: 2px; font-size: 10.5px; }
.lo-user b .lo-ic { width: 10px; height: 10px; }

.lo-body { flex: 1; min-height: 0; display: flex; gap: 12px; padding: 14px 12px 0 16px; }
.lo-left { flex: 1; min-width: 0; }
.lo-right { width: 284px; flex: none; display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }

.lo-hello { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.lo-hello h1 { font-size: 17px; font-weight: 500; }
.lo-hello p { font-size: 11px; color: var(--lo-mute); margin-top: 3px; }
.lo-find {
  align-self: flex-end; margin-bottom: 3px;
  display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 7px 0 10px;
  border: 1px solid var(--lo-blue); border-radius: 4px; color: var(--lo-blue); font-size: 11px; background: #fff;
}
.lo-find .lo-ic { width: 12px; height: 12px; }
.lo-tip {
  display: flex; align-items: center; gap: 5px; padding: 12px 12px; margin-bottom: 18px;
  border: 1px solid #eef0f3; border-radius: 4px; background: #fafbfc; font-size: 10.5px; white-space: nowrap;
}
.lo-tip .lo-ic { width: 12px; height: 12px; }
.lo-tip-star { color: #f59e0b; }
.lo-areas-h { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; font-size: 11px; font-weight: 500; color: var(--lo-mute); letter-spacing: .02em; }
.lo-areas-h .lo-ic { width: 12px; height: 12px; }

.lo-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.lo-tile {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 80px; padding: 10px 26px 10px 14px;
  border: 1px solid var(--lo-line); border-radius: 6px; background: #fff;
}
.lo-tile b { display: block; font-size: 12.5px; margin-bottom: 2px; }
.lo-tile p { font-size: 10.5px; line-height: 1.4; color: var(--lo-mute); }
.lo-tile-ic { width: 36px; height: 36px; flex: none; border-radius: 6px; display: grid; place-items: center; background: #eef2f8; color: #2b5fb8; }
.lo-star { position: absolute; top: 7px; right: 7px; color: #9aa8c4; opacity: 0; scale: .6; transition: opacity .25s, scale .3s, color .2s; }
.lo-star .lo-ic { width: 14px; height: 14px; }

.lo-card { border: 1px solid #eef0f3; border-radius: 4px; background: #fff; overflow: hidden; }
.lo-card h2 { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid #eef0f3; font-size: 12px; font-weight: 500; }
.lo-card h2 .lo-ic { width: 13px; height: 13px; }
.lo-att-empty { display: flex; align-items: center; gap: 5px; padding: 11px 12px 14px; font-size: 9.5px; color: var(--lo-mute); }
.lo-att-empty .lo-ic { width: 11px; height: 11px; color: #1f9d55; }
.lo-att-new {
  display: flex; align-items: center; gap: 9px; max-height: 0; padding: 0 12px; opacity: 0; overflow: hidden;
  transition: max-height .5s, padding .5s, opacity .4s .15s;
}
.lo-att-new b { display: block; font-size: 10.5px; }
.lo-att-new small { font-size: 9px; color: var(--lo-mute); }
.lo-att-new div { flex: 1; }
.lo-att-new em { font-style: normal; font-size: 9.5px; font-weight: 500; color: #fff; background: var(--lo-blue); padding: 4px 9px; border-radius: 4px; }
.lo-dot { width: 7px; height: 7px; border-radius: 50%; background: #e5484d; box-shadow: 0 0 0 3px rgba(229, 72, 77, .18); }

.lo-recent { display: flex; flex-direction: column; padding-bottom: 4px; }
.lo-recent h2 { order: -2; }
.lo-rec { display: flex; align-items: center; gap: 10px; margin: 0 12px; padding: 9px 4px; border-bottom: 1px solid #eef0f3; }
.lo-rec .lo-ic { width: 13px; height: 13px; color: var(--lo-blue); }
.lo-rec b { display: block; font-size: 10.5px; }
.lo-rec small { font-size: 9px; color: var(--lo-mute); }

.lo-foot { height: 34px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 12px 0 16px; border-top: 1px solid #f0f2f5; font-size: 10.5px; color: var(--lo-mute); }
.lo-foot i { font-style: normal; color: #e5484d; }

/* ---------- Ctrl K palette ---------- */
.lo-pal { position: absolute; inset: 0; z-index: 5; background: rgba(15, 25, 55, .32); opacity: 0; transition: opacity .25s; }
.lo-pal-box {
  position: absolute; left: 50%; top: 70px; width: 470px; margin-left: -235px;
  border-radius: 10px; background: #fff; box-shadow: 0 20px 50px rgba(15, 25, 55, .3); overflow: hidden;
  translate: 0 -10px; scale: .98; transition: translate .3s, scale .3s;
}
.lo-pal-in { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 12px; border-bottom: 1px solid var(--lo-line); font-size: 14px; }
.lo-pal-in .lo-ic { color: var(--lo-mute); }
.lo-pal-in kbd { margin-left: auto; background: none; color: #6a7896; border: 1px solid var(--lo-line); }
.lo-caret { width: 1.5px; height: 18px; margin-left: -6px; background: var(--lo-blue); animation: lo-blink 1s steps(1) infinite; }
.lo-pal-h { padding: 8px 14px 4px; font-size: 9.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--lo-mute); }
.lo-pal-r {
  display: flex; align-items: center; gap: 10px; margin: 0 6px; padding: 0 8px; max-height: 0; opacity: 0; border-radius: 6px;
  transition: max-height .3s, padding .3s, opacity .3s, background .2s; transition-delay: calc(var(--i) * 60ms);
}
.lo-pal-r:last-child { margin-bottom: 6px; }
.lo-pal-r .lo-ic { color: var(--lo-blue); }
.lo-pal-r div { flex: 1; }
.lo-pal-r b { display: block; font-size: 12px; }
.lo-pal-r small { font-size: 9.5px; color: var(--lo-mute); }
.lo-pal-r kbd { opacity: 0; background: none; color: var(--lo-blue); border: 1px solid #c9d7f2; }

.lo-toast {
  position: absolute; z-index: 6; left: 50%; bottom: 48px; translate: -50% 16px; opacity: 0;
  display: flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px;
  background: #0f1d4a; color: #fff; font-size: 11px; font-weight: 500;
  transition: opacity .3s, translate .35s;
}
.lo-toast .lo-ic { width: 13px; height: 13px; color: #fbbf24; fill: #fbbf24; }

/* ---------- pointer ---------- */
.lo-cursor {
  position: absolute; left: 0; top: 0; z-index: 9; width: 20px; height: 20px; margin: -3px 0 0 -4px;
  fill: #111827; stroke: #fff; stroke-width: 1.4; stroke-linejoin: round;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .3));
  opacity: 0; transition: translate .85s cubic-bezier(.45, 0, .2, 1), opacity .3s;
}
.lo-click { position: absolute; left: 0; top: 0; z-index: 8; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; border: 2px solid var(--lo-blue); opacity: 0; pointer-events: none; }
.lo-click.is-on { animation: lo-ping .55s ease-out; }

/* ---------- states (set by the loop) ---------- */
.lo-rise { opacity: 0; translate: 0 10px; transition: opacity .5s, translate .6s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--i) * 70ms); }
.is-in .lo-rise, .is-in .lo-rail-item { opacity: 1; translate: 0 0; }
.is-out .lo-rise, .is-out .lo-rail-item { opacity: 0; transition-delay: 0s; }
.is-cursor .lo-cursor { opacity: 1; }

.is-hover [data-lo-pin] { border-color: #a9c1ec; box-shadow: 0 6px 18px -8px rgba(26, 86, 201, .45); }
.is-hover [data-lo-pin] .lo-star, .is-pinned [data-lo-pin] .lo-star { opacity: 1; scale: 1; }
.is-pinned [data-lo-pin] .lo-star { color: #f5a400; }
.is-pinned [data-lo-pin] .lo-star .lo-ic { fill: #fbbf24; animation: lo-pop .4s; }
.is-toast .lo-toast { opacity: 1; translate: -50% 0; }

.is-pal .lo-pal { opacity: 1; }
.is-pal .lo-pal-box { translate: 0 0; scale: 1; }
.is-found .lo-pal-r { max-height: 46px; padding: 7px 8px; opacity: 1; }
.lo-pal-r:nth-child(3) { background: var(--lo-soft); }
.is-pick .lo-pal-r:nth-child(3) { background: #e6eefc; }
.is-pick .lo-pal-r:nth-child(3) kbd { opacity: 1; }

.is-rec .lo-rec-hit { order: -1; animation: lo-flash 1.6s ease-out; }
.is-att .lo-badge { scale: 1; }
.is-att .lo-att-empty { display: none; }
.is-att .lo-att-new { max-height: 60px; padding: 11px 12px; opacity: 1; animation: lo-flash 1.8s ease-out .2s; }

@keyframes lo-blink { 50% { opacity: 0; } }
@keyframes lo-ping { from { opacity: .9; scale: .3; } to { opacity: 0; scale: 1.5; } }
@keyframes lo-pop { 50% { scale: 1.45; } }
@keyframes lo-flash { from { background: #e6eefc; } to { background: transparent; } }

/* ---------- phone layout (390 x 637) ---------- */
.is-phone .lo-rail, .is-phone .lo-sub, .is-phone .lo-menu, .is-phone .lo-search, .is-phone .lo-view,
.is-phone .lo-select, .is-phone .lo-user > div:not(.lo-avatar),.is-phone .lo-find, .is-phone .lo-tip, .is-phone .lo-recent { display: none; }
.is-phone .lo-mbrand, .is-phone .lo-msearch { display: flex; }
.is-phone .lo-msearch { display: grid; }
.is-phone .lo-top { height: 54px; padding: 0 12px; }
.is-phone .lo-body { flex-direction: column; gap: 0; padding: 14px 12px 0; overflow: hidden; }
.is-phone .lo-right { width: auto; padding-top: 12px; order: -1; margin-bottom: 14px; }
.is-phone .lo-left { display: contents; }
.is-phone .lo-hello { order: -2; margin-bottom: 0; }
.is-phone .lo-areas-h { margin-bottom: 8px; }
.is-phone .lo-tiles { grid-template-columns: minmax(0, 1fr); gap: 6px; }
.is-phone .lo-tile { min-height: 0; padding: 8px 30px 8px 10px; }
.is-phone .lo-tile > div:not(.lo-tile-ic) { min-width: 0; }
.is-phone .lo-tile p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.is-phone .lo-tile-ic { width: 32px; height: 32px; }
.is-phone .lo-pal-box { width: 350px; margin-left: -175px; top: 62px; }
.is-phone .lo-foot { font-size: 9.5px; }

@media (prefers-reduced-motion: reduce) {
  .lo-app *, .lo-app *::after { transition: none !important; animation: none !important; }
}
