:root {
  color-scheme: light;
  --page: #f8f8fb;
  --surface: #ffffff;
  --ink: #211a2c;
  --muted: #665e73;
  --line: #eae6ef;
  --violet: #6336ad;
  --violet-deep: #4b257f;
  --violet-soft: #f2ebfb;
  --green: #167453;
  --shadow: 0 1px 3px #25183508, 0 3px 11px #25183504;
  --sidebar-width: 234px;
  --topbar-height: 69px;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font: 100%/1.45 var(--font);
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: wait; opacity: .62; }
[hidden] { display: none !important; }
a { color: inherit; }
button:focus-visible, a:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 2px solid #8e5dce; outline-offset: 3px; }
img { max-width: 100%; }
svg { flex: 0 0 auto; vertical-align: middle; }
h1, h2, h3, p { margin: 0; }
input, select, textarea { min-width: 0; }
::selection { background: #e8d8f9; color: #3f2069; }

.btn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 41px; border: 1px solid transparent; padding: 8px 15px; border-radius: 9px; white-space: nowrap; font-size: .875rem; font-weight: 650; text-decoration: none; line-height: 1.2; transition: background .15s ease, border-color .15s ease, box-shadow .15s ease; }
.btn-primary { background: var(--violet); border-color: var(--violet); color: #fff; box-shadow: 0 2px 4px #512c9726; }
.btn-primary:hover:not(:disabled) { background: var(--violet-deep); border-color: var(--violet-deep); }
.btn-secondary { background: #fff; color: var(--ink); border-color: #e5dfec; }
.btn-secondary:hover:not(:disabled) { border-color: #ccbadf; background: #faf7fe; }
.btn-danger { color: #a43249; border-color: #f2d7dd; background: #fff3f5; }
.btn-danger:hover:not(:disabled) { background: #ffe5ea; }
.icon-button { display: inline-grid; place-items: center; width: 37px; height: 37px; flex: 0 0 auto; padding: 0; border: 1px solid transparent; color: var(--muted); background: transparent; border-radius: 8px; }
.icon-button:hover { color: var(--violet-deep); background: var(--violet-soft); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow); }
.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; flex: 0 0 auto; border-radius: 50%; background: #efe4fb; color: #552991; font-size: .78rem; font-weight: 750; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; background: var(--violet-soft); color: var(--violet-deep); border-radius: 999px; font-size: .75rem; font-weight: 650; line-height: 1.3; }
.empty-state { padding: 34px 16px; text-align: center; color: var(--muted); }
.empty-state > :first-child:is(svg) { color: var(--violet); margin-bottom: 9px; }
.empty-state strong, .empty-state h3 { color: var(--ink); }
.field { display: grid; align-content: start; gap: 7px; font-size: .875rem; font-weight: 650; color: var(--ink); }
.field small { font-weight: 500; color: var(--muted); }
.field :is(input:not([type=checkbox]):not([type=radio]), select, textarea), select { width: 100%; border: 1px solid #e2dce9; border-radius: 9px; background-color: #fff; color: var(--ink); min-height: 43px; padding: 9px 12px; font-size: .9375rem; font-weight: 450; }
.field textarea { min-height: 82px; resize: vertical; }
select, .field select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%23665e73' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-size: 16px; background-repeat: no-repeat; background-position: right 10px center; }
input:focus, select:focus, textarea:focus, .input-wrap:focus-within { outline: none; border-color: #a376d5 !important; box-shadow: 0 0 0 3px #ae83dd26; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field-grid > .full { grid-column: 1 / -1; }
.language-picker { position: relative; display: inline-flex; flex: 0 0 auto; color: var(--muted); }
.language-picker > svg { position: absolute; z-index: 1; top: 50%; left: 9px; transform: translateY(-50%); pointer-events: none; }
.language-picker select { width: 8.65rem; min-height: 36px; padding: 5px 23px 5px 30px; font-size: .86rem; font-weight: 600; background-position: right 6px center; }
.inline-error { border: 1px solid #f2d7df; background: #fff3f5; color: #922f47; padding: 10px 12px; border-radius: 9px; font-size: .875rem; }
.view-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.view-header h1 { font-size: clamp(1.8rem, 3vw, 2.45rem); letter-spacing: -.058em; line-height: 1.1; margin: 0; font-weight: 730; }
.view-header p { margin: 8px 0 0; color: var(--muted); }
.view-kicker { letter-spacing: .09em; text-transform: uppercase; font-weight: 730; font-size: .75rem; color: var(--violet-deep); }

.brand { display: inline-flex; width: fit-content; align-items: center; gap: 9px; color: #221731; font-weight: 800; font-size: 1.375rem; letter-spacing: -.05em; line-height: 1; }
.brand img { flex: 0 0 auto; }
.brand-accent { color: var(--violet); }
.boot { min-height: 100vh; display: grid; align-content: center; justify-items: center; padding: 25px; text-align: center; gap: 13px; color: var(--muted); }
.boot h1 { font-size: 1.65rem; color: var(--ink); }

.workspace { min-height: 100dvh; }
.sidebar { width: var(--sidebar-width); position: fixed; z-index: 15; top: 0; bottom: 0; left: 0; display: flex; flex-direction: column; overflow: auto; background: #fff; border-right: 1px solid var(--line); }
.sidebar-top { min-height: var(--topbar-height); display: flex; align-items: center; justify-content: space-between; padding: 15px 23px; }
.side-nav { padding: 28px 13px 12px; display: grid; gap: 31px; }
.nav-section { display: grid; gap: 4px; }
.nav-heading { color: #756b83; font-size: .69rem; font-weight: 750; letter-spacing: .10em; text-transform: uppercase; padding: 0 11px 8px; }
.side-link { display: flex; align-items: center; text-align: left; width: 100%; min-height: 43px; gap: 11px; padding: 9px 11px; border: 0; border-radius: 8px; background: transparent; color: #625970; font-size: .875rem; font-weight: 600; text-decoration: none; }
.side-link:hover { background: #f7f3fb; color: var(--violet-deep); }
.side-link.is-active { color: #542a8f; background: #f0e8fb; font-weight: 720; }
.side-link.is-active svg { stroke-width: 2; }
.sidebar-bottom { margin-top: auto; padding: 12px 13px max(12px, env(safe-area-inset-bottom)); }
.sidebar-account { display: flex; align-items: center; gap: 9px; padding: 14px 2px 0 4px; margin-top: 12px; border-top: 1px solid var(--line); }
.account-copy { flex: 1; overflow: hidden; }
.account-copy strong, .account-copy small { display: block; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.account-copy strong { font-size: .83rem; }
.account-copy small { color: var(--muted); font-size: .75rem; margin-top: 2px; }
.signout { width: 32px; height: 34px; }
.workspace-body { margin-left: var(--sidebar-width); min-width: 0; }
.topbar { min-height: var(--topbar-height); position: sticky; top: 0; z-index: 12; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 31px; background: #fff; border-bottom: 1px solid var(--line); }
.topbar-left, .topbar-right, .desktop-crumb { display: flex; align-items: center; gap: 12px; }
.desktop-crumb { color: #5e536c; font-size: .875rem; font-weight: 600; }
.topbar-right { gap: 13px; }
.workspace-demo { background: #fff4dc; border: 1px solid #f3e7cb; color: #704d1a; border-radius: 6px; font-size: .72rem; font-weight: 650; padding: 3px 7px; }
.topbar-install { min-height: 34px; padding: 6px 10px; font-size: .8rem; }
.profile-menu { position: relative; }
.profile-menu summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 3px 5px; border-radius: 8px; cursor: pointer; color: var(--muted); }
.profile-menu summary:hover { background: #f7f3fb; }
.profile-menu summary::-webkit-details-marker { display: none; }
.profile-menu .avatar { width: 31px; height: 31px; }
.profile-name { color: var(--ink); font-size: .84rem; font-weight: 650; }
.profile-popover { position: absolute; top: calc(100% + 10px); right: 0; border: 1px solid var(--line); border-radius: 11px; background: #fff; width: max-content; min-width: 205px; max-width: 320px; padding: 6px; box-shadow: 0 9px 27px #2416301c; }
.profile-card { padding: 8px 9px 10px; border-bottom: 1px solid var(--line); margin-bottom: 5px; display: grid; gap: 3px; overflow-wrap: anywhere; }
.profile-card small { color: var(--muted); }
.profile-popover button { border: 0; background: transparent; display: flex; align-items: center; gap: 8px; text-align: left; width: 100%; border-radius: 6px; padding: 9px; color: var(--ink); }
.profile-popover button:hover { background: var(--violet-soft); }
.workspace-content { width: min(100%, 1450px); margin: 0 auto; padding: 29px 31px 42px; }
.workspace-content:focus { outline: none; }
.skip-link { position: fixed; z-index: 40; top: 6px; left: 8px; padding: 10px; background: var(--violet); border-radius: 8px; color: white; transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.mobile-nav, .mobile-menu-toggle, .sidebar-dismiss, .menu-overlay, .mobile-brand { display: none; }

.auth-layout { min-height: 100dvh; background: #fff; display: grid; grid-template-columns: minmax(395px, 45%) minmax(0, 55%); }
.auth-main { display: flex; flex-direction: column; min-width: 0; padding: 31px clamp(24px, 4.3vw, 68px) 25px; }
.auth-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auth-header .brand img { width: 41px; height: 41px; }
.login-wrap { margin: auto; width: min(100%, 405px); padding: 62px 0; }
.login-copy { margin-bottom: 30px; }
.login-copy h1 { font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.1; font-weight: 760; letter-spacing: -.067em; }
.login-copy p { margin: 10px 0 0; color: var(--muted); font-size: 1rem; }
#login-form { display: grid; gap: 17px; }
.input-wrap { display: flex; align-items: center; gap: 8px; padding-inline: 12px 5px; min-height: 48px; color: #756884; border: 1px solid #e3ddea; border-radius: 9px; background: #fff; }
.field .input-wrap input { border: 0; border-radius: 0; padding-inline: 3px; min-height: 44px; flex: 1; background: transparent; box-shadow: none; }
.field .input-wrap input:focus { box-shadow: none; }
.field .input-wrap input::placeholder { color: #81768d; }
.login-submit { min-height: 47px; margin-top: 5px; font-size: .96rem; }
.demo-box { margin-top: 24px; padding: 14px; background: #faf7fd; border: 1px solid #eee5f6; border-radius: 11px; }
.demo-heading { color: #553879; display: flex; align-items: center; gap: 7px; font-size: .83rem; margin: 0 0 10px; }
.demo-dot { display: inline-block; width: 8px; height: 8px; background: #9361c8; border-radius: 50%; }
.demo-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.demo-actions .btn { padding: 6px 8px; min-height: 36px; color: #553879; }
.auth-footer { color: #756982; display: flex; align-items: center; gap: 7px; font-size: .82rem; }
.auth-art { padding: 16px 16px 16px 0; min-width: 0; display: flex; }
.art-inner { position: relative; isolation: isolate; width: 100%; min-height: 590px; overflow: hidden; display: grid; align-items: center; justify-items: center; border-radius: 24px; color: #fff; background: radial-gradient(ellipse at 72% 75%, #7c46bf 0, #502b8a 44%, #341b61 91%); }
.art-grid { z-index: -1; position: absolute; inset: 0; opacity: .42; background-image: linear-gradient(to right, #fff1 1px, transparent 1px), linear-gradient(to bottom, #fff1 1px, transparent 1px); background-size: 38px 38px; mask-image: radial-gradient(ellipse at 76% 80%, black 25%, transparent 73%); }
.art-orbit { position: absolute; z-index: -1; left: 53%; top: 52%; height: 80%; aspect-ratio: 1; border: 1px solid #f8eaff3b; border-radius: 50%; transform: rotate(-30deg) scaleY(.78); }
.orbit-two { height: 95%; left: 48%; top: 43%; opacity: .76; }
.orbit-three { height: 110%; left: 43%; top: 34%; opacity: .58; }
.art-content { width: min(78%, 520px); padding: 38px 0 54px; position: relative; }
.art-icon { display: grid; place-items: center; width: 55px; height: 55px; border-radius: 14px; background: #fff2; border: 1px solid #fff3; color: #f1e6ff; margin-bottom: 19px; }
.art-content h2 { font-size: clamp(2.7rem, 5vw, 5.4rem); line-height: .99; font-weight: 730; letter-spacing: -.07em; }
.art-content > p { margin: 17px 0 32px; color: #f3e5ff; font-size: clamp(.92rem, 1.4vw, 1.06rem); }
.art-window { width: min(100%, 392px); padding: 18px; border-radius: 14px; background: #fff; color: #291b3a; transform: rotate(-3deg); box-shadow: 0 25px 70px #1d123d69; }
.art-window-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.art-overline { color: #776289; font-size: .61rem; font-weight: 750; letter-spacing: .08em; margin-bottom: 2px; }
.art-date { display: grid; place-items: center; color: #643a99; background: #f3e9fc; width: 31px; height: 31px; border-radius: 7px; }
.art-week { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; color: #736482; font-size: .68rem; font-weight: 620; margin-top: 15px; border-top: 1px solid #eae4f1; border-bottom: 1px solid #eae4f1; padding: 6px 0; }
.art-shifts { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); grid-template-rows: 18px 18px; padding-top: 8px; gap: 5px; background: linear-gradient(to right, #f0ebf5 1px, transparent 1px); background-size: calc(100% / 7) 100%; }
.art-shifts i { background: #dbc4fc; border-left: 3px solid #a372dd; border-radius: 4px; grid-column: span 2; }
.art-shifts i:nth-child(2), .art-shifts i:nth-child(5) { background: #c9ebe2; border-color: #67b6a0; }
.art-shifts i:nth-child(4) { grid-column: 2 / span 2; }
.art-check { display: flex; align-items: center; gap: 10px; position: absolute; bottom: 29px; right: 0; transform: rotate(4deg); background: #fff; border-radius: 12px; padding: 10px 13px 10px 9px; color: #291b3a; box-shadow: 0 13px 35px #1c0d3f45; }
.art-check > span { background: #dbf3e9; color: #19815c; display: grid; place-items: center; border-radius: 8px; width: 37px; height: 37px; }
.art-check strong, .art-check small { display: block; font-size: .82rem; }
.art-check small { color: #71667d; font-size: .69rem; margin-top: 1px; }
.art-check > svg { color: #219673; margin-left: 8px; }

dialog { border: 1px solid #e1d9eb; border-radius: 17px; padding: 0; width: min(calc(100vw - 28px), 535px); max-height: calc(100dvh - 30px); color: var(--ink); background: #fff; box-shadow: 0 15px 75px #23163240; }
dialog::backdrop { background: #20152c77; backdrop-filter: blur(2px); }
.dialog-form { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; max-height: calc(100dvh - 32px); }
.dialog-header { display: flex; justify-content: space-between; gap: 12px; padding: 18px 20px 15px; border-bottom: 1px solid var(--line); }
.dialog-header h2 { color: var(--ink); font-size: 1.35rem; font-weight: 720; letter-spacing: -.035em; }
.dialog-header p { color: var(--muted); margin-top: 4px; font-size: .9rem; }
.dialog-close { margin: -2px -5px 0 0; }
.dialog-body { display: grid; gap: 14px; padding: 19px 20px; overflow: auto; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 20px; border-top: 1px solid var(--line); }
.install-guide { display: grid; gap: 10px; }
.install-guide > div { background: #f7f2fc; border-radius: 10px; color: #462c61; padding: 10px; display: flex; align-items: flex-start; gap: 10px; }
.install-guide p { font-size: .875rem; }
.notifications { position: fixed; z-index: 45; bottom: 19px; right: 19px; max-width: min(420px, calc(100vw - 38px)); display: grid; gap: 7px; }
.toast { display: flex; gap: 9px; align-items: center; border: 1px solid #d5e9df; background: #fff; color: #204d3c; font-size: .9rem; border-radius: 10px; padding: 7px 7px 7px 12px; box-shadow: 0 6px 35px #28173920; }
.toast-error { color: #992b46; border-color: #f1d4de; }
.toast > .icon-button { width: 29px; height: 29px; margin-left: auto; }

:root:lang(ne) { --font: 'Nirmala UI', 'Noto Sans Devanagari', system-ui, sans-serif; }
:lang(ne) :is(h1, h2, .nav-heading, .art-overline) { letter-spacing: normal; }

@media (max-width: 1100px) {
  :root { --sidebar-width: 207px; }
  .sidebar-top { padding-inline: 16px; }
  .workspace-content { padding-inline: 23px; }
  .topbar { padding-inline: 23px; }
  .art-content { width: 81%; }
}

@media (max-width: 780px) {
  :root { --topbar-height: 60px; --sidebar-width: 246px; }
  .sidebar { transform: translateX(-100%); visibility: hidden; transition: transform .2s ease, visibility .2s ease; }
  .sidebar-open { transform: none; visibility: visible; }
  .sidebar-dismiss, .mobile-menu-toggle { display: inline-grid; }
  .side-nav { padding-top: 18px; }
  .menu-overlay { display: block; position: fixed; inset: 0; z-index: 14; padding: 0; border: 0; background: #21192e70; }
  .workspace-body { margin-left: 0; }
  .topbar { padding-inline: 13px; }
  .desktop-crumb, .topbar-install, .profile-name, .profile-menu summary > svg { display: none; }
  .topbar-right { gap: 2px; }
  .topbar .language-picker select { font-size: .91rem; }
  .mobile-brand { display: inline-flex; }
  .mobile-brand .brand { font-size: 1.25rem; }
  .mobile-brand .brand img { width: 32px; height: 32px; }
  .workspace-content { padding: 22px 15px calc(82px + env(safe-area-inset-bottom)); }
  .mobile-nav { display: flex; position: fixed; z-index: 11; bottom: 0; left: 0; right: 0; min-height: 58px; padding: 4px 4px max(4px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; }
  .mobile-link { flex: 1 1 0; min-width: 0; display: grid; padding: 4px 1px; justify-items: center; align-content: center; gap: 2px; color: var(--muted); border: 0; background: #fff; border-radius: 8px; font-size: .69rem; font-weight: 650; text-decoration: none; }
  .mobile-link.is-active { background: #f3ebfc; color: var(--violet-deep); }
  .notifications { bottom: calc(70px + env(safe-area-inset-bottom)); }
  .auth-layout { display: block; min-height: 100dvh; }
  .auth-main { min-height: 100dvh; }
  .auth-art { display: none; }
  .login-wrap { padding: 45px 0; }
}

@media (max-width: 440px) {
  .topbar .workspace-demo { display: none; }
  .topbar .language-picker > svg { display: none; }
  .topbar .language-picker select { width: 6.9rem; padding-left: 7px; }
}

@media (max-width: 360px) {
  .topbar .profile-menu { display: none; }
  .auth-main { padding-inline: 17px; }
  .auth-header .brand { font-size: 1.2rem; }
  .auth-header .brand img { width: 35px; height: 35px; }
}

@media (max-width: 490px) {
  .view-header { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 19px; }
  .view-header p { margin-top: 6px; font-size: .92rem; }
  .field :is(input:not([type=checkbox]):not([type=radio]), select, textarea), select { font-size: 1rem; }
  .dialog-body, .dialog-header, .dialog-actions { padding-inline: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
