/* LiteOS first-run wizard */
.oobe { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; user-select: none; }
.oobe-bg { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(18px) saturate(1.15); transform: scale(1.04); }
.oobe::before { content: ""; position: absolute; inset: 0; background: rgba(10, 30, 70, .22); z-index: 0; }
.oobe-power { position: absolute; right: 24px; top: 24px; width: 40px; height: 40px; border-radius: var(--radius-full); color: #fff; background: rgba(255,255,255,.18); z-index: 2; }
.oobe-power:hover { background: rgba(255,255,255,.3); }
.oobe-panel {
  position: relative; z-index: 1; width: min(940px, 100%); height: min(600px, calc(100vh - 120px)); display: grid; grid-template-columns: 280px minmax(0, 1fr);
  background: var(--surface); border-radius: var(--radius-l); overflow: hidden; box-shadow: 0 30px 80px rgba(10,30,70,.35), 0 0 0 1px rgba(255,255,255,.12);
  animation: popIn .25s ease-out;
}
.oobe-rail {
  background: linear-gradient(165deg, color-mix(in srgb, var(--accent) 80%, #fff) 0%, var(--accent) 45%, color-mix(in srgb, var(--accent) 70%, #0A1A3A) 100%);
  color: #fff; padding: 28px 24px; display: flex; flex-direction: column; gap: 28px;
}
.oobe-brand { display: flex; align-items: center; gap: 12px; font-size: 18px; }
.oobe-logo { width: 40px; height: 40px; border-radius: var(--radius-l); background: rgba(255,255,255,.18); display: inline-flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); flex-shrink: 0; }
.oobe-logo img { width: 24px; height: 24px; }
.oobe-logo.big { width: 76px; height: 76px; border-radius: 22px; background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 75%, #fff), var(--accent)); box-shadow: 0 12px 30px color-mix(in srgb, var(--accent) 40%, transparent); }
.oobe-logo.big img { width: 44px; height: 44px; }
.oobe-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.oobe-steps li { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 10px; border-radius: var(--radius-l); font-size: 14px; font-weight: 500; color: rgba(255,255,255,.75); }
.oobe-steps li.on { background: rgba(255,255,255,.16); color: #fff; font-weight: 600; }
.oobe-steps li.done { color: rgba(255,255,255,.92); }
.oobe-steps .n { width: 24px; height: 24px; border-radius: var(--radius-full); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.55); flex-shrink: 0; }
.oobe-steps li.on .n { background: #fff; color: var(--accent); box-shadow: none; }
.oobe-steps li.done .n { background: rgba(255,255,255,.25); box-shadow: none; }
.oobe-count { margin-top: auto; font-size: 12px; color: rgba(255,255,255,.8); }

/* moving between steps (os.js renderSetup goTo): the page leaves toward the side we're going from and the next one
   comes in from the other side; the rail's highlight and the dots follow. Only on a step change, never on a re-draw. */
.oobe-body.leave-fwd { animation: oobeLeaveFwd .15s ease-in both; }
.oobe-body.leave-back { animation: oobeLeaveBack .15s ease-in both; }
.oobe-body.enter-fwd { animation: oobeEnterFwd .32s cubic-bezier(.2, .8, .25, 1) both; }
.oobe-body.enter-back { animation: oobeEnterBack .32s cubic-bezier(.2, .8, .25, 1) both; }
/* the page's parts arrive one after another */
.oobe-body.enter-fwd > *, .oobe-body.enter-back > * { animation: oobeRise .36s cubic-bezier(.2, .8, .25, 1) both; }
.oobe-body.enter-fwd > :nth-child(2), .oobe-body.enter-back > :nth-child(2) { animation-delay: .04s; }
.oobe-body.enter-fwd > :nth-child(3), .oobe-body.enter-back > :nth-child(3) { animation-delay: .08s; }
.oobe-body.enter-fwd > :nth-child(n+4), .oobe-body.enter-back > :nth-child(n+4) { animation-delay: .12s; }
@keyframes oobeLeaveFwd { to { opacity: 0; transform: translateX(-18px); } }
@keyframes oobeLeaveBack { to { opacity: 0; transform: translateX(18px); } }
@keyframes oobeEnterFwd { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes oobeEnterBack { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }
@keyframes oobeRise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.oobe-steps.moved li.on { animation: oobeStepOn .3s ease-out both; }
.oobe-steps.moved li.on .n { animation: oobeDotPop .3s cubic-bezier(.3, 1.4, .5, 1) both; }
.oobe-steps.moved li.done.was .n { animation: oobeDotPop .3s cubic-bezier(.3, 1.4, .5, 1) both; }
@keyframes oobeStepOn { from { background: rgba(255,255,255,0); } to { background: rgba(255,255,255,.16); } }
@keyframes oobeDotPop { from { transform: scale(.6); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .oobe-body[class*="enter-"], .oobe-body[class*="enter-"] > *, .oobe-body[class*="leave-"], .oobe-steps.moved li, .oobe-steps.moved .n { animation: none !important; }
}

.oobe-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; color: var(--text); user-select: text; }
.oobe-body { flex: 1; overflow-y: auto; padding: 44px 52px 12px; display: flex; flex-direction: column; gap: 16px; }
.oobe-body h1 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.oobe-body .lead { margin: -6px 0 6px; color: var(--muted); line-height: 1.55; font-size: 14px; max-width: 520px; }
.oobe-body .hint { font-size: 12px; color: var(--muted); }
.oobe-hero { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 16px; }
.oobe-hero h1 { font-size: 32px; }
.oobe-hero p { margin: 0; max-width: 420px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.oobe-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.oobe-grid .full { grid-column: 1 / -1; }
.oobe-strength { display: flex; align-items: center; gap: 12px; }
.oobe-strength .meter { flex: 1; height: 6px; }
.oobe-strength .meter i { transition: width .2s, background .2s; }
.oobe-label { font-size: 13px; font-weight: 600; color: var(--text-2); margin-top: 4px; }
.oobe-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.oobe-choices.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.oobe-choice { border: 2px solid var(--line); background: var(--surface); border-radius: var(--radius-l); padding: 8px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; text-align: left; color: var(--text); }
.oobe-choice b { font-size: 13px; font-weight: 600; padding: 0 4px; }
.oobe-choice small { font-size: 12px; color: var(--muted); padding: 0 4px 2px; margin-top: -4px; }
.oobe-choice:hover { border-color: var(--line-strong); }
.oobe-choice.on { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.oobe-theme { display: block; height: 46px; border-radius: var(--radius-l); position: relative; overflow: hidden; }
.oobe-theme.light { background: #E9ECF1; }
.oobe-theme.dark { background: #1B1F27; }
.oobe-theme.auto { background: linear-gradient(90deg, #E9ECF1 50%, #1B1F27 50%); }
.oobe-theme i { position: absolute; left: 10px; top: 10px; right: 14px; bottom: 0; border-radius: var(--radius-l) var(--radius-l) 0 0; }
.oobe-theme.light i { background: #fff; }
.oobe-theme.dark i { background: #2A303B; }
.oobe-theme.auto i { background: linear-gradient(90deg, #fff 50%, #2A303B 50%); }
.oobe-theme i::after { content: ""; position: absolute; left: 8px; top: 8px; width: 34px; height: 9px; border-radius: var(--radius); background: var(--accent); }
.oobe-swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.oobe-sw { width: 32px; height: 32px; border-radius: var(--radius-full); border: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.oobe-sw.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px currentColor; }
.oobe-mini { display: block; height: 66px; border-radius: var(--radius-l); position: relative; overflow: hidden; background-size: cover; background-position: center; }
.oobe-mini i { position: absolute; display: block; }
.oobe-mini .tb { left: 0; right: 0; top: 0; height: 8px; background: rgba(255,255,255,.8); }
.oobe-mini .w { left: 30%; right: 30%; top: 16px; bottom: 26px; background: #fff; border-radius: var(--radius); box-shadow: 0 4px 10px rgba(10,30,70,.2); }
.oobe-mini.classic .w { top: 10px; bottom: 22px; }
.oobe-mini .dk { left: 50%; bottom: 6px; transform: translateX(-50%); width: 46%; height: 13px; border-radius: var(--radius-l); background: rgba(255,255,255,.88); }
.oobe-mini .bar { left: 0; right: 0; bottom: 0; height: 13px; background: rgba(255,255,255,.9); }
/* the last step: each choice as a row (picture, the value with what it is underneath, Change) */
.oobe-review { margin-top: 4px; border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; background: var(--surface); }
.oobe-row { display: flex; align-items: center; gap: 16px; padding: 14px 12px 14px 18px; min-height: 72px; }
.oobe-row + .oobe-row { border-top: 1px solid var(--line); }
.oobe-row .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.oobe-row .txt b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oobe-row .txt small { font-size: 12px; color: var(--muted); }
.oobe-row .btn-ghost { border-color: transparent; background: transparent; color: var(--accent-ink, var(--accent)); }
.oobe-row .btn-ghost:hover { background: var(--hover); }
.oobe-row .avatar { flex-shrink: 0; }
.oobe-row .oobe-mini { width: 64px; height: 40px; flex-shrink: 0; border-radius: var(--radius-l); }
.oobe-row .oobe-mini .tb { height: 5px; }
.oobe-row .oobe-mini .w { top: 9px; bottom: 14px; border-radius: var(--radius-s); }
.oobe-row .oobe-mini .dk { height: 7px; bottom: 3px; border-radius: var(--radius-full); }
.oobe-row .oobe-mini .bar { height: 7px; }
.oobe-ico { width: 40px; height: 40px; flex-shrink: 0; border-radius: var(--radius-l); display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft, var(--surface-2)); color: var(--accent); }
.oobe-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 52px 28px; }
.oobe-foot .btn { height: 40px; padding: 0 18px; }
.oobe-foot .btn-ghost { border-color: transparent; background: transparent; }
.oobe-foot .btn-ghost:hover { background: var(--hover); }
.oobe-dots { display: flex; gap: 6px; }
.oobe-dots i { width: 7px; height: 7px; border-radius: var(--radius-full); background: var(--line-strong); transition: width .3s cubic-bezier(.2, .8, .25, 1), background-color .3s; }
.oobe-dots i.on { width: 20px; background: var(--accent); }

@media (max-width: 760px) {
  .oobe { padding: 0; align-items: stretch; }
  .oobe-panel { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); height: 100%; border-radius: 0; }
  .oobe-rail { flex-direction: row; align-items: center; justify-content: space-between; padding: 16px 72px 16px 20px; gap: 12px; }
  .oobe-steps { display: none; }
  .oobe-count { margin: 0; }
  .oobe-power { right: 16px; top: 14px; width: 36px; height: 36px; }
  .oobe-body { padding: 24px 20px 8px; }
  .oobe-foot { padding: 12px 20px 20px; }
  .oobe-grid, .oobe-choices.three { grid-template-columns: minmax(0, 1fr); }
  .oobe-dots { display: none; }
}

/* the wizard as one server form (resources/views/auth/setup.blade.php): one step shown at a time */
.oobe-body[hidden] { display: none; }
.oobe-err { padding: 0 52px; }
.oobe-err:empty { min-height: 0; }
.oobe-choice, .oobe-sw { cursor: pointer; }
.oobe-sw .chk { display: flex; color: #fff; }
.oobe-sw:not(.on) .chk { display: none; }
.oobe-sw:has(input:focus-visible), .oobe-choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 720px) { .oobe-err { padding: 0 20px; } }
