:root {
  color-scheme: dark;
  --bg: #111211;
  --rail: #151615;
  --card: #1b1d1b;
  --hover: #242724;
  --line: #2c302b;
  --text: #f5f5ee;
  --muted: #a1a39a;
  --dim: #777c73;
  --lime: #dafe70;
  --green: #b7ee85;
  --red: #ff9a94;
  font: 16px/1.45 "Inter", "Arial", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 310px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; }
::selection { background: var(--lime); color: #141810; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, strong, .num { letter-spacing: -.035em; }
svg { flex-shrink: 0; display: inline-block; vertical-align: middle; }
.skip { position: fixed; top: -100px; left: 16px; z-index: 20; background: var(--lime); color: #101210; padding: 10px 14px; border-radius: 12px; }
.skip:focus { top: 16px; }
.loading { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--muted); }
.layout { display: grid; grid-template-columns: 234px minmax(0, 1fr); min-height: 100dvh; }
.sidebar { position: sticky; top: 0; min-height: 100vh; height: 100dvh; display: flex; flex-direction: column; padding: 35px 20px 20px; background: var(--rail); border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 850; letter-spacing: -.065em; width: max-content; padding-left: 9px; }
.brand img { width: 36px; height: 36px; }
.nav { display: grid; gap: 6px; margin-top: 57px; }
.nav button, .profile-button { display: flex; align-items: center; gap: 12px; padding: 12px 13px; border-radius: 13px; background: transparent; border: 1px solid transparent; color: var(--muted); text-align: left; min-height: 46px; }
.nav button:hover, .profile-button:hover { background: var(--hover); color: var(--text); }
.nav button.active { background: #282d20; border-color: #363e29; color: var(--lime); font-weight: 700; }
.nav button svg { width: 19px; height: 19px; }
.sidebar-footer { margin-top: auto; }
.sidebar-footer .profile-button { width: 100%; padding: 11px 6px; }
.profile-button .profile-label { display: grid; gap: 2px; min-width: 0; }
.profile-button strong, .profile-button small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.profile-button strong { color: var(--text); font-size: 14px; }
.profile-button small { color: var(--muted); font-size: 12px; }
.sidebar-footer .profile-button > svg { margin-left: auto; }
.avatar { --avatar: #dadabe; --ink: #3b3d2c; display: inline-grid; place-items: center; flex: 0 0 auto; border-radius: 50%; width: 36px; height: 36px; font-weight: 800; font-size: 13px; color: var(--ink); background: var(--avatar); letter-spacing: -.025em; }
.avatar.c0 { --avatar: #dbd3fa; --ink: #44337a; }
.avatar.c1 { --avatar: #f1cbbd; --ink: #793f2d; }
.avatar.c2 { --avatar: #c9dcf1; --ink: #2f4d75; }
.avatar.c3 { --avatar: #dfe7b2; --ink: #445220; }
.avatar.c4 { --avatar: #e8c9dd; --ink: #73355c; }
.avatar.c5 { --avatar: #f1dea9; --ink: #644915; }
.avatars { display: flex; padding-left: 2px; }
.avatars .avatar { border: 2px solid var(--card); margin-left: -2px; width: 27px; height: 27px; font-size: 10px; }
.avatars .avatar + .avatar { margin-left: -6px; }
.content { max-width: 1370px; width: 100%; margin: 0 auto; padding: 40px clamp(25px, 4vw, 63px) 50px; }
.topbar, .page-top, .section-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar { margin-bottom: 36px; color: var(--muted); min-height: 38px; }
.mobile-brand, .mobile-bar { display: none; }
.crumb { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; font-size: 14px; }
.crumb button { border: none; background: none; color: var(--muted); padding: 0; }
.crumb button:hover { color: var(--text); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.badge { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 30px; background: #1a1c18; padding: 5px 10px; color: #b4b8aa; font-size: 12px; white-space: nowrap; }
.btn { min-height: 43px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 11px; border: 1px solid #363a34; background: #242723; color: var(--text); font-weight: 700; font-size: 14px; text-align: center; }
.btn:hover { background: #30362c; }
.btn.primary { background: var(--lime); color: #192010; border-color: var(--lime); }
.btn.primary:hover { background: #e7ffab; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--hover); color: var(--text); }
.btn.compact { min-height: 35px; padding: 5px 10px; font-size: 13px; border-radius: 9px; }
.btn:disabled { opacity: .55; cursor: wait; }
.page-top { align-items: end; margin-bottom: 26px; }
.page-top h1 { font-size: clamp(36px, 4.65vw, 67px); line-height: .99; font-weight: 850; letter-spacing: -.075em; overflow-wrap: anywhere; }
.page-top p { color: var(--muted); margin-top: 12px; }
.page-top .btn { flex: 0 0 auto; }
.block { margin-top: 32px; }
.section-top { margin-bottom: 14px; }
.section-top h2 { font-size: 24px; line-height: 1.15; font-weight: 800; }
.section-top .link { color: var(--lime); }
.link { font-size: 14px; font-weight: 700; border: none; background: none; padding: 5px 0; }
.link:hover { text-decoration: underline; }
.hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 1.15fr 1fr; min-height: 231px; border: 1px solid #313a23; border-radius: 24px; background: radial-gradient(ellipse at 87% 35%, #3b4a25, transparent 56%), linear-gradient(110deg, #242c1c, #1d2419 70%); }
.hero-copy { padding: 26px 28px 22px; position: relative; z-index: 1; }
.hero-label { display: flex; align-items: center; gap: 8px; color: #d3dec1; font-size: 14px; }
.hero-label svg { color: var(--lime); }
.hero-net { font-weight: 850; font-size: clamp(39px, 5.3vw, 69px); line-height: 1.05; letter-spacing: -.073em; margin: 9px 0 20px; white-space: nowrap; }
.hero-net.neutral { color: var(--lime); }
.hero-meta { display: flex; gap: clamp(15px, 3.2vw, 42px); }
.hero-meta div { display: grid; gap: 1px; }
.hero-meta span { color: #b3bfa8; font-size: 13px; white-space: nowrap; }
.hero-meta b { font-size: 17px; }
.pos { color: var(--green); }
.neg { color: var(--red); }
.neutral { color: var(--muted); }
.hero-art { position: absolute; width: 366px; height: 240px; right: 12px; bottom: -7px; color: #253118; pointer-events: none; }
.orbit { position: absolute; inset: 17px 30px 16px 31px; border: 1px dashed #7e9a4169; border-radius: 50%; transform: rotate(-24deg); }
.orbit.two { inset: 35px 9px 35px 11px; transform: rotate(23deg); }
.paper { position: absolute; width: 111px; height: 145px; left: 125px; top: 37px; padding: 19px 15px 13px; border-radius: 9px 9px 2px 2px; color: #34372d; background: #f6f0dc; transform: rotate(12deg); box-shadow: 0 10px 25px #0e150b70; }
.paper::after { position: absolute; content: ""; height: 7px; left: 0; right: 0; bottom: -6px; background: linear-gradient(135deg,#f6f0dc 50%,transparent 50%),linear-gradient(225deg,#f6f0dc 50%,transparent 50%); background-size: 12px 8px; }
.paper.back { background: #8c9a70; left: 110px; top: 46px; transform: rotate(-9deg); }
.paper.back::after { display: none; }
.paper b { display: block; font-size: 11px; border-bottom: 1px dashed #777a6d; padding-bottom: 7px; }
.paper i { display: block; margin-top: 8px; height: 3px; border-radius: 4px; background: #aaa894; }
.paper i:nth-of-type(even) { width: 63%; }
.paper strong { display: block; font-size: 17px; margin-top: 10px; }
.coin { position: absolute; display: grid; place-items: center; width: 62px; height: 62px; border: 2px solid #f2ffa9; border-radius: 50%; background: #d6f46e; color: #34451c; box-shadow: 4px 6px #95a947, 4px 7px 12px #11180b94; font: 800 29px/1 Arial, sans-serif; }
.coin.first { left: 47px; bottom: 38px; transform: rotate(-17deg); }
.coin.second { width: 50px; height: 50px; font-size: 24px; right: 63px; top: 33px; transform: rotate(14deg); }
.spark { position: absolute; color: #cfef70; font-size: 24px; }
.spark.a { top: 28px; left: 80px; }
.spark.b { bottom: 45px; right: 76px; font-size: 19px; }
.group-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.group-card { display: block; overflow: hidden; text-align: left; min-width: 0; padding: 0; border-radius: 18px; border: 1px solid var(--line); background: var(--card); color: var(--text); }
.group-card:hover { border-color: #5a6950; background: #222622; }
.cover { display: block; position: relative; height: 94px; background: #342d24; overflow: hidden; }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #0b0d0a6b, transparent 70%); }
.cover img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 54%; }
.cover.cinema { background: #34243b; }
.cover.trip { background: #233528; }
.cover-icon, .event-icon { display: grid; place-items: center; border-radius: 13px; background: #332823; color: #f7bd94; width: 40px; height: 40px; flex-shrink: 0; }
.cover-icon { position: absolute; z-index: 1; left: 13px; bottom: 11px; background: #141510b0; border: 1px solid #ffffff3b; color: white; backdrop-filter: blur(7px); }
.event-icon.cinema { background: #2e273a; color: #d5bdff; }
.event-icon.trip { background: #25342a; color: #c7e59f; }
.card-body { padding: 13px 15px 14px; }
.card-body h3 { font-size: 19px; line-height: 1.2; overflow-wrap: anywhere; }
.card-body p { font-size: 13px; color: var(--muted); margin-top: 3px; }
.card-bottom { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.card-bottom strong { white-space: nowrap; font-size: 15px; }
.panel, .empty { border: 1px solid var(--line); border-radius: 17px; background: var(--card); padding: 16px 18px; }
.empty { padding: 26px; color: var(--muted); }
.empty p { margin-bottom: 14px; }
.rows { padding: 0 15px; }
.row { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row-btn { text-align: left; width: 100%; color: var(--text); border: none; border-bottom: 1px solid var(--line); background: transparent; }
.row-btn:hover .row-title { color: var(--lime); }
.row-copy { display: grid; gap: 2px; min-width: 0; flex: 1; }
.row-title { font-weight: 750; overflow-wrap: anywhere; }
.row-detail { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.row-value { white-space: nowrap; }
.row-arrow { margin-left: 4px; color: var(--dim); }
.group-header { min-height: 177px; display: flex; flex-wrap: wrap; align-content: end; justify-content: space-between; gap: 16px; padding: 25px; border: 1px solid var(--line); border-radius: 23px; background-color: var(--card); background-image: linear-gradient(90deg,#141613f0,#14161344), var(--cover); background-position: center; background-size: cover; }
.group-header h1 { font-size: clamp(34px, 5vw, 62px); line-height: 1; letter-spacing: -.07em; overflow-wrap: anywhere; }
.group-header p, .group-header .header-actions { margin-top: 13px; }
.group-header p { color: #dddcd2; display: flex; align-items: center; gap: 9px; }
.header-actions, .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 20px; }
.event-place { display: inline-flex; align-items: center; gap: 6px; }
.receipt { margin-bottom: 13px; }
.receipt-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.receipt-head h3 { font-size: 20px; }
.receipt-head p { font-size: 14px; color: var(--muted); }
.receipt-line { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
.receipt-line:last-child { padding-bottom: 1px; border-bottom: 0; }
.receipt-line .line-top { display: flex; gap: 10px; justify-content: space-between; }
.receipt-line .actions { margin-top: 7px; }
.receipt-line .row-detail { margin-top: 3px; }
.receipt-line .label-attention { color: var(--lime); }
.settle { margin-top: 13px; width: 100%; }
.intro { max-width: 760px; min-height: 59vh; display: grid; align-content: center; }
.intro h1 { font-size: clamp(48px, 8vw, 97px); line-height: .95; letter-spacing: -.08em; }
.intro p { margin: 18px 0 25px; color: var(--muted); max-width: 450px; font-size: 18px; }
dialog { width: min(94vw, 544px); max-height: 90dvh; padding: 23px; border: 1px solid #3b4237; border-radius: 23px; background: var(--card); color: var(--text); overflow: auto; }
dialog::backdrop { background: #0a0c09b9; backdrop-filter: blur(5px); }
.modal-top { display: flex; justify-content: space-between; align-items: start; gap: 10px; margin-bottom: 18px; }
.modal-top h2 { font-size: 27px; line-height: 1.1; padding-top: 3px; }
.close { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 50%; width: 34px; height: 34px; padding: 6px; flex: 0 0 34px; }
.close:hover { background: var(--hover); color: var(--text); }
.form { display: grid; gap: 13px; }
.form label:not(.check) { display: grid; gap: 5px; font-size: 14px; color: #d5d9d0; }
.form input:not([type="checkbox"]), .form select { width: 100%; min-width: 0; padding: 10px; color: var(--text); background: #141614; border: 1px solid #41463f; border-radius: 10px; }
.form input::placeholder { color: #858a80; }
.form .form-footer { display: flex; flex-wrap: wrap; justify-content: end; align-items: center; gap: 8px; padding-top: 5px; }
.form .help, .modal-note { color: var(--muted); font-size: 14px; }
.form-error { color: var(--red); font-size: 14px; }
.form-error:empty { display: none; }
.form .check { display: flex; align-items: center; gap: 8px; min-height: 30px; }
.form input[type="checkbox"] { accent-color: var(--lime); width: 17px; height: 17px; }
.form .form-line { display: grid; grid-template-columns: minmax(0, 1fr) 108px 35px; gap: 7px; align-items: end; margin-top: 8px; }
.form .form-line .btn { min-height: 43px; }
.form .form-lines { max-height: 260px; overflow: auto; padding: 0 3px 4px; }
.form .scan { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.form pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; max-height: 120px; overflow: auto; color: var(--muted); }
.form details summary { cursor: pointer; }
.toast { z-index: 10; position: fixed; right: 22px; bottom: 22px; max-width: calc(100vw - 44px); padding: 12px 16px; border: 1px solid #4d5943; border-radius: 12px; background: #252d20; color: var(--text); box-shadow: 0 6px 26px #0005; }
.toast.error { border-color: #764e4b; background: #392624; }
@media (min-width: 1500px) { .layout { grid-template-columns: 255px minmax(0,1fr); } .hero-art { right: 42px; } }
@media (max-width: 1040px) {
  .layout { grid-template-columns: 184px minmax(0,1fr); }
  .sidebar { padding-inline: 13px; }
  .hero-art { right: -42px; transform: scale(.88); }
  .content { padding-inline: 25px; }
}
@media (max-width: 765px) {
  .layout { display: block; }
  .sidebar { display: none; }
  .mobile-brand { display: flex; padding: 0; font-size: 21px; }
  .mobile-brand img { width: 32px; height: 32px; }
  .topbar { flex-wrap: wrap; margin-bottom: 26px; }
  .topbar .crumb { order: 4; flex-basis: 100%; }
  .topbar.is-home .crumb { display: none; }
  .content { padding: 20px 18px 109px; }
  .mobile-bar { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); position: fixed; z-index: 5; bottom: max(10px, env(safe-area-inset-bottom)); left: 10px; right: 10px; padding: 5px; border: 1px solid #3a3f37; border-radius: 17px; background: #1c201cf5; backdrop-filter: blur(14px); }
  .mobile-bar .nav-item { display: grid; justify-items: center; gap: 2px; padding: 5px 2px; border: 0; border-radius: 12px; background: none; color: var(--muted); font-size: 11px; }
  .mobile-bar .nav-item.active { background: #303727; color: var(--lime); }
  .mobile-bar svg { width: 18px; height: 18px; }
  .two-col { grid-template-columns: 1fr; gap: 0; }
  .toast { bottom: 79px; }
}
@media (max-width: 540px) {
  .hero { display: block; min-height: 198px; }
  .hero-copy { padding: 19px 16px; }
  .hero-art { right: -142px; bottom: -48px; transform: scale(.58); }
  .hero-meta { gap: 19px; }
  .hero-net { margin-bottom: 15px; max-width: 100%; width: fit-content; }
  .page-top { align-items: start; flex-wrap: wrap; margin-bottom: 19px; }
  .page-top h1 { font-size: clamp(37px, 11vw, 52px); }
  .page-top p { margin-top: 7px; }
  .block { margin-top: 25px; }
  .group-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
  .cover { height: 79px; }
  .cover-icon { width: 32px; height: 32px; }
  .card-body { padding: 10px 9px; }
  .card-body h3 { font-size: 17px; }
  .card-bottom strong { font-size: 13px; }
  .card-bottom .avatar { width: 23px; height: 23px; font-size: 9px; }
  .row-arrow { display: none; }
  .row-value { font-size: 14px; }
  .section-top h2 { font-size: 21px; }
  .rows { padding-inline: 11px; }
}
@media (prefers-reduced-motion: no-preference) { .btn, .group-card, .nav-item { transition: background-color .17s, border-color .17s, color .17s; } }
