:root {
  --bg: #f6f8fc; --surface: #fff; --surface-alt: #f8faff; --surface-blue: #edf3ff;
  --text: #202b3e; --muted: #718099; --muted-2: #98a4b6; --line: #e7ebf3;
  --blue: #316cf4; --blue-dark: #2359d8; --blue-light: #eaf0ff;
  --green: #20976c; --green-light: #e7f7ef; --amber: #c58a2e; --amber-light: #fff4dc;
  --red: #cb4c5d; --red-light: #ffedf0; --shadow: 0 4px 26px rgba(44,65,105,.045);
  --radius: 17px; --radius-sm: 11px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-synthesis: none; color-scheme: light;
}
* { box-sizing: border-box; }
html,body { margin:0; min-height:100%; }
body { background:var(--bg); color:var(--text); font-size:14px; line-height:1.5; -webkit-font-smoothing: antialiased; }
button,input,textarea,select { font:inherit; }
button { cursor:pointer; }
button:disabled { opacity:.45; cursor:not-allowed; }
a { color:var(--blue); }
:focus-visible { outline:3px solid #9ab6ff; outline-offset:2px; }
svg { width:20px; height:20px; flex:0 0 auto; }
.app-shell { min-height:100vh; display:flex; }
.sidebar { background:#fff; border-right:1px solid var(--line); width:248px; flex:0 0 248px; display:flex; flex-direction:column; padding:28px 18px 19px; position:fixed; left:0; top:0; bottom:0; z-index:12; }
.brand { display:flex; align-items:center; gap:11px; margin:0 7px 43px; }
.brand-symbol { width:39px; height:39px; flex:0 0 39px; background:var(--blue); border-radius:12px; display:grid; place-items:center; color:white; box-shadow:0 6px 14px #316cf42a; }
.brand-symbol svg { width:26px; height:26px; }
.brand-name { font-size:19px; font-weight:780; letter-spacing:-.9px; line-height:1.1; }
.brand-sub { color:var(--muted-2); font-size:10px; letter-spacing:.11em; font-weight:700; margin-top:3px; }
.sidebar-label { color:var(--muted-2); font-size:10px; letter-spacing:.15em; font-weight:730; margin:0 14px 12px; }
.sidebar-nav { display:flex; flex-direction:column; gap:5px; }
.nav-link { border:0; width:100%; background:transparent; color:#697790; border-radius:12px; padding:12px 13px; display:flex; align-items:center; gap:13px; text-align:left; font-size:13px; font-weight:590; transition:background .15s ease,color .15s ease; }
.nav-link svg { width:18px; height:18px; }
.nav-link:hover { background:#f4f7fc; color:var(--text); }
.nav-link.active { background:var(--blue-light); color:var(--blue); font-weight:730; }
.nav-counter { margin-left:auto; font-size:11px; font-weight:650; color:var(--muted); }
.sidebar-bottom { margin-top:auto; display:flex; flex-direction:column; gap:12px; }
.workspace-card { padding:16px; background:#f6f8fd; border:1px solid #edf0f6; border-radius:14px; }
.workspace-card .eyebrow { font-size:10px; letter-spacing:.09em; color:var(--muted); font-weight:750; }
.workspace-card p { font-size:12px; color:var(--muted); margin:6px 0 12px; }
.workspace-card button { padding:0; background:transparent; border:0; color:var(--blue); font-size:12px; font-weight:700; }
.local-indicator { display:flex; align-items:center; gap:8px; font-size:11px; color:#8491a5; padding:3px 9px; }
.dot { display:inline-block; background:#e2a13a; width:7px; height:7px; border-radius:50%; }
.main { margin-left:248px; min-width:0; flex:1; }
.topbar { height:92px; max-width:1490px; padding:0 48px; margin:auto; display:flex; align-items:center; justify-content:space-between; gap:18px; }
.breadcrumb { display:flex; align-items:center; gap:10px; color:var(--muted); font-size:12px; font-weight:650; }
.breadcrumb .crumb-active { color:var(--text); }
.top-actions { display:flex; align-items:center; gap:13px; }
.search-trigger { min-width:230px; display:flex; align-items:center; justify-content:space-between; background:var(--surface); border:1px solid var(--line); color:#95a0b3; border-radius:12px; padding:10px 12px; box-shadow:var(--shadow); }
.search-trigger > span { display:flex; align-items:center; gap:9px; font-size:12px; }
.search-trigger svg { width:16px; height:16px; }
kbd { font-size:10px; border:1px solid #e6eaf2; border-radius:5px; background:#f7f8fb; color:#8e9aae; padding:2px 5px; }
.icon-btn { border:1px solid var(--line); background:#fff; border-radius:11px; width:40px; height:40px; display:inline-flex; align-items:center; justify-content:center; color:#6a7890; }
.icon-btn:hover { background:var(--surface-blue); color:var(--blue); }
.avatar { width:38px; height:38px; background:#dfeafe; border:3px solid white; border-radius:50%; color:var(--blue); font-weight:800; display:grid; place-items:center; box-shadow:var(--shadow); }
.content { max-width:1490px; margin:0 auto; padding:4px 48px 74px; }
.page-intro { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin:8px 0 25px; }
.eyebrow { font-size:11px; letter-spacing:.09em; font-weight:760; color:var(--blue); text-transform:uppercase; }
h1 { font-size:30px; line-height:1.15; margin:7px 0 7px; letter-spacing:-1.1px; font-weight:770; }
h2 { font-size:16px; margin:0; letter-spacing:-.35px; font-weight:750; }
h3 { font-size:14px; margin:0; font-weight:750; }
p { margin:0; }
.page-desc { font-size:13px; color:var(--muted); }
.btn { background:var(--blue); color:#fff; display:inline-flex; align-items:center; justify-content:center; gap:9px; border:1px solid var(--blue); padding:11px 16px; font-size:12.5px; font-weight:740; border-radius:11px; white-space:nowrap; transition: background .15s ease,transform .15s ease; }
.btn:hover:not(:disabled) { background:var(--blue-dark); border-color:var(--blue-dark); }
.btn.secondary { background:#fff; color:#50617d; border-color:var(--line); }
.btn.secondary:hover:not(:disabled) { background:var(--surface-blue); color:var(--blue); border-color:#dae6ff; }
.btn.ghost { color:var(--blue); border-color:transparent; background:transparent; padding:7px 3px; }
.btn.ghost:hover { background:transparent; color:var(--blue-dark); }
.btn.danger { background:var(--red); border-color:var(--red); }
.btn.danger:hover:not(:disabled) { background:#b9364a; border-color:#b9364a; }
.btn.sm { padding:8px 11px; border-radius:9px; font-size:12px; }
.btn svg { width:17px; height:17px; }
.panel { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); padding:23px; min-width:0; }
.panel-head { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:21px; }
.panel-sub { color:var(--muted); font-size:12px; margin-top:4px; }
.link-btn { border:0; background:none; color:var(--blue); font-size:12px; font-weight:700; display:inline-flex; align-items:center; gap:4px; padding:4px; }
.link-btn svg { width:14px; height:14px; }
.welcome-note { display:flex; justify-content:space-between; gap:15px; align-items:center; padding:13px 17px; background:#edf3ff; border:1px solid #dfe9ff; border-radius:12px; margin-bottom:18px; font-size:12px; color:#4c6590; }
.welcome-note strong { color:#315d9c; }
.stats { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:16px; margin-bottom:20px; }
.stat { display:flex; justify-content:space-between; align-items:flex-start; background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:20px 21px; min-height:123px; box-shadow:var(--shadow); }
.stat-label { color:#7a879b; font-weight:600; font-size:12px; }
.stat-value { font-size:29px; line-height:1.2; font-weight:760; letter-spacing:-.9px; margin:10px 0 3px; }
.stat-foot { color:var(--muted-2); font-size:11px; }
.stat-icon { width:41px; height:41px; display:grid; place-items:center; border-radius:12px; background:#edf3ff; color:#5584f3; }
.stat-icon.green { background:var(--green-light); color:var(--green); }
.stat-icon.amber { background:var(--amber-light); color:var(--amber); }
.stat-icon svg { width:20px; height:20px; }
.quick-add { background:linear-gradient(115deg,#f1f5ff,#f9fbff); border:1px solid #dde8ff; border-radius:var(--radius); display:flex; align-items:center; gap:15px; padding:19px 22px; margin-bottom:20px; }
.quick-icon { flex:0 0 44px; width:44px; height:44px; background:#e2eaff; color:var(--blue); display:grid; place-items:center; border-radius:13px; }
.quick-copy { min-width:155px; }
.quick-copy strong { display:block; font-size:13px; }
.quick-copy span { display:block; font-size:11px; color:#8394ae; }
.quick-form { flex:1; display:flex; gap:8px; min-width:0; }
.input, .select, .textarea { width:100%; min-width:0; background:#fff; border:1px solid #e1e7f0; color:var(--text); outline:none; padding:11px 13px; border-radius:10px; font-size:13px; }
.input::placeholder,.textarea::placeholder { color:#a0acbf; }
.input:focus,.select:focus,.textarea:focus { border-color:#8baaff; box-shadow:0 0 0 3px #316cf414; }
.textarea { resize:vertical; min-height:90px; line-height:1.6; }
.quick-form .input { flex:1; box-shadow:0 2px 10px rgba(53,74,113,.035); }
.dashboard-grid { display:grid; grid-template-columns:minmax(0,1.65fr) minmax(310px,1fr); gap:20px; }
.stack { display:flex; flex-direction:column; gap:20px; min-width:0; }
.section-title { margin:28px 0 15px; display:flex; align-items:center; justify-content:space-between; }
.task-list { display:flex; flex-direction:column; }
.task-row { display:flex; align-items:flex-start; gap:12px; padding:13px 0; border-bottom:1px solid #f0f2f6; min-width:0; }
.task-row:first-child { padding-top:2px; }
.task-row:last-child { border-bottom:0; padding-bottom:0; }
.task-row.depth-1 { padding-left:28px; }
.task-row.depth-2 { padding-left:54px; }
.task-check { width:21px; height:21px; flex:0 0 21px; display:flex; align-items:center; justify-content:center; background:white; border:1.7px solid #cdd6e5; border-radius:7px; color:white; margin-top:2px; padding:0; }
.task-check:hover { border-color:var(--blue); }
.task-check.checked { background:#d8e0ee; border-color:#d8e0ee; color:white; }
.task-check.checked svg { width:15px; height:15px; }
.task-main { flex:1; text-align:left; background:none; border:0; padding:0; min-width:0; color:var(--text); }
.task-title { display:block; font-size:13px; font-weight:630; white-space:normal; overflow-wrap:anywhere; }
.task-row.is-done .task-title { text-decoration:line-through; color:#a1acbd; }
.task-meta { margin-top:5px; display:flex; align-items:center; gap:8px; flex-wrap:wrap; color:#93a0b2; font-size:11px; }
.task-meta svg { width:13px; height:13px; vertical-align:-2px; margin-right:2px; }
.task-meta .pill { padding:3px 7px; border-radius:6px; background:#f0f4fa; font-size:10px; color:#71829a; }
.task-meta .pill.high { background:#fff0f1; color:#d46d7b; }
.task-meta .pill.low { background:#eef5ff; color:#7198cd; }
.task-meta .pill.complete { color:#a6afbf; background:#f4f6f9; }
.task-meta .pill.progress { color:#8a6eac; background:#f3edfd; }
.task-meta .overdue { color:var(--red); }
.row-actions { display:flex; align-items:center; gap:1px; }
.mini-action { border:0; background:none; color:#a1aec1; border-radius:7px; display:grid; place-items:center; width:26px; height:26px; opacity:.2; }
.mini-action:hover,.task-row:hover .mini-action { opacity:1; background:#f4f7fc; color:var(--blue); }
.mini-action svg { width:15px; height:15px; }
.empty { text-align:center; padding:30px 15px; color:var(--muted); font-size:12px; }
.empty-icon { display:grid; place-items:center; background:#f1f5fc; color:#9fb0cd; margin:0 auto 12px; width:48px; height:48px; border-radius:13px; }
.empty strong { color:var(--text); display:block; font-size:13px; margin-bottom:5px; }
.empty p { margin:0 auto 11px; max-width:330px; }
.upcoming { display:flex; flex-direction:column; gap:15px; }
.deadline { display:flex; align-items:center; gap:11px; }
.deadline-date { min-width:49px; height:49px; border-radius:11px; background:#f3f6fc; display:flex; flex-direction:column; align-items:center; justify-content:center; color:#7a8ca8; }
.deadline-date strong { font-size:16px; line-height:1; color:#34415b; }
.deadline-date span { font-size:9px; text-transform:uppercase; letter-spacing:.05em; margin-top:5px; }
.deadline-detail { flex:1; min-width:0; }
.deadline-detail strong { font-size:12px; font-weight:680; display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.deadline-detail span { color:var(--muted); font-size:11px; }
.note-form { display:flex; flex-direction:column; gap:9px; }
.note-form .textarea { background:#f8faff; min-height:76px; }
.note-form-foot { display:flex; align-items:center; justify-content:space-between; }
.note-form-foot span { color:var(--muted-2); font-size:10px; }
.recent-notes { display:flex; flex-direction:column; gap:10px; margin-top:12px; }
.small-note { width:100%; text-align:left; background:#f8faff; border:1px solid #f0f3f8; border-radius:10px; padding:11px 12px; }
.small-note:hover { border-color:#d9e5ff; }
.small-note strong { font-size:12px; display:block; }
.small-note span { display:block; color:var(--muted); font-size:11px; margin-top:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.project-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:15px; }
.project-card { text-align:left; width:100%; min-height:158px; background:#fff; border:1px solid var(--line); border-radius:15px; box-shadow:var(--shadow); padding:20px; transition:border-color .15s ease,transform .15s ease; }
.project-card:hover { border-color:#a9c0fa; transform:translateY(-2px); }
.project-icon { width:40px; height:40px; display:grid; place-items:center; border-radius:12px; margin-bottom:15px; background:#edf3ff; color:#4b7deb; }
.project-icon svg { width:19px; height:19px; }
.project-icon.green { background:#e9f8f1; color:#20a274; }
.project-icon.purple { background:#f2eeff; color:#8267da; }
.project-icon.amber { background:#fff4df; color:#bd8427; }
.project-title { font-size:13px; font-weight:770; display:block; margin-bottom:4px; }
.project-desc { color:var(--muted); font-size:11px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.project-progress { height:5px; width:100%; background:#edf0f6; border-radius:8px; overflow:hidden; margin-top:17px; }
.project-progress > span { background:var(--blue); display:block; height:100%; border-radius:8px; }
.project-meta { display:flex; justify-content:space-between; gap:8px; margin-top:9px; font-size:10px; color:#98a4b8; }
.filters { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-bottom:18px; }
.filter-chip { border:1px solid #e4e9f2; border-radius:9px; background:white; padding:8px 13px; color:#7b889f; font-size:12px; font-weight:670; }
.filter-chip.active { background:var(--blue-light); color:var(--blue); border-color:#d7e3ff; }
.filter-select { width:auto; min-width:145px; padding:8px 10px; font-size:12px; margin-left:0; }
.toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:20px; }
.toolbar .input { max-width:350px; }
.section-divider { font-size:11px; letter-spacing:.06em; text-transform:uppercase; color:#9aa6b8; font-weight:750; padding:18px 0 13px; }
.project-detail-header { display:flex; align-items:flex-start; gap:16px; }
.project-detail-header .project-icon { flex:0 0 54px; height:54px; width:54px; margin:0; }
.project-detail-header .project-icon svg { width:23px; height:23px; }
.detail-meta { color:var(--muted); font-size:12px; margin:8px 0 17px; }
.back-link { border:0; background:transparent; color:var(--muted); display:inline-flex; align-items:center; gap:5px; font-size:12px; padding:0; }
.back-link svg { width:16px; height:16px; }
.notes-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:15px; }
.note-card { text-align:left; background:#fff; border:1px solid var(--line); border-radius:15px; box-shadow:var(--shadow); min-height:169px; padding:19px; display:flex; flex-direction:column; gap:10px; }
.note-card:hover { border-color:#b6cafa; }
.note-card-top { display:flex; justify-content:space-between; gap:12px; }
.note-card-top svg { color:#859bd2; width:17px; height:17px; }
.note-title { font-weight:750; font-size:14px; overflow-wrap:anywhere; }
.note-excerpt { font-size:12px; color:var(--muted); line-height:1.7; display:-webkit-box; -webkit-line-clamp:3; line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; white-space:pre-wrap; overflow-wrap:anywhere; }
.note-footer { margin-top:auto; font-size:10.5px; color:#99a5b7; }
.search-main { max-width:790px; }
.search-main > .input { padding:15px 16px; font-size:15px; margin-bottom:19px; }
.search-group { margin-top:25px; }
.search-group h2 { margin-bottom:8px; }
.search-result { width:100%; display:flex; align-items:center; gap:14px; text-align:left; padding:13px 5px; background:none; border:0; border-bottom:1px solid #edf0f5; }
.search-result .res-icon { display:grid; place-items:center; width:37px; height:37px; border-radius:10px; background:#eef3ff; color:var(--blue); }
.search-result .res-body { flex:1; min-width:0; }
.search-result strong { display:block; font-size:13px; font-weight:680; white-space:nowrap; text-overflow:ellipsis; overflow:hidden; }
.search-result span { color:var(--muted); font-size:11px; }
.settings-content { max-width:860px; display:flex; flex-direction:column; gap:16px; }
.settings-row { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:15px 0; border-bottom:1px solid var(--line); }
.settings-row:last-child { border:0; }
.settings-row strong { display:block; font-size:13px; }
.settings-row p { font-size:12px; color:var(--muted); max-width:530px; margin-top:4px; }
.button-group { display:flex; flex-wrap:wrap; gap:8px; }
code { font:11px ui-monospace, SFMono-Regular, Consolas,monospace; padding:2px 5px; background:#f1f4f9; border-radius:5px; }
.mobile-topbar,.bottom-nav { display:none; }
.modal-backdrop { position:fixed; inset:0; background:rgba(22,33,54,.43); z-index:40; display:flex; align-items:center; justify-content:center; padding:20px; backdrop-filter:blur(3px); }
.modal { background:white; width:min(100%,630px); max-height:calc(100dvh - 32px); overflow:auto; border-radius:20px; box-shadow:0 24px 100px rgba(20,33,58,.25); }
.modal-head { display:flex; align-items:center; justify-content:space-between; padding:22px 26px; border-bottom:1px solid var(--line); }
.modal-head h2 { font-size:19px; }
.modal-close { border:0; background:#f5f7fc; color:#75849e; border-radius:9px; width:32px; height:32px; display:grid; place-items:center; }
.modal-body { padding:24px 26px; }
.field { display:flex; flex-direction:column; gap:6px; margin-bottom:17px; }
.field label { font-size:12px; font-weight:680; color:#4b5972; }
.field .input,.field .select { padding:12px; }
.field .textarea { min-height:108px; }
.field-grid { display:grid; grid-template-columns:1fr 1fr; gap:0 15px; }
.modal-footer { padding:17px 26px 23px; display:flex; justify-content:space-between; gap:10px; border-top:1px solid var(--line); flex-wrap:wrap; }
.modal-footer > div { display:flex; gap:8px; }
.helper { color:var(--muted); font-size:11px; }
.switch-line { display:flex; align-items:center; gap:8px; color:#596b85; font-size:13px; }
.toast { pointer-events:none; opacity:0; transform:translateY(10px); transition:opacity .2s ease,transform .2s ease; position:fixed; z-index:100; bottom:24px; right:25px; padding:12px 17px; background:#243149; color:#fff; border-radius:11px; box-shadow:0 15px 40px #18223835; font-size:12px; max-width:360px; }
.toast.show { opacity:1; transform:translateY(0); }
@media (max-width:1150px) {
  .sidebar { width:216px; flex-basis:216px; }
  .main { margin-left:216px; }
  .topbar { padding:0 28px; }
  .content { padding:4px 28px 65px; }
  .dashboard-grid { grid-template-columns: minmax(0,1.4fr) minmax(260px,1fr); gap:14px; }
  .quick-copy { display:none; }
  .project-grid,.notes-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:850px) {
  .sidebar,.topbar { display:none; }
  .main { margin-left:0; padding-bottom:73px; }
  .mobile-topbar { height:68px; padding:0 25px; display:flex; justify-content:space-between; align-items:center; background:#fff; border-bottom:1px solid var(--line); }
  .mobile-topbar .brand { margin:0; gap:9px; }
  .mobile-topbar .brand-symbol { width:33px; height:33px; flex-basis:33px; border-radius:10px; }
  .mobile-topbar .brand-symbol svg { width:22px; height:22px; }
  .mobile-topbar .brand-name { font-size:17px; }
  .content { padding:22px 25px 35px; }
  .bottom-nav { display:grid; position:fixed; grid-template-columns:repeat(4,1fr); left:0; right:0; bottom:0; padding:10px 13px max(10px,env(safe-area-inset-bottom)); border-top:1px solid var(--line); background:#fff; z-index:20; box-shadow:0 -4px 25px rgba(32,50,86,.03); }
  .bottom-link { border:0; background:none; display:flex; align-items:center; justify-content:center; gap:5px; flex-direction:column; font-size:10px; font-weight:640; color:#9aa5b7; padding:3px 0; }
  .bottom-link.active { color:var(--blue); }
  .bottom-link svg { width:21px; height:21px; }
  .dashboard-grid { grid-template-columns: minmax(0,1.4fr) minmax(260px,1fr); }
}
@media (max-width:650px) {
  .mobile-topbar { padding:0 18px; height:63px; }
  .content { padding:23px 16px 26px; }
  .page-intro { align-items:flex-start; gap:10px; margin:1px 0 21px; }
  .page-intro h1 { font-size:27px; }
  .page-desc { font-size:12px; }
  .page-intro .btn { padding:9px 10px; font-size:11px; }
  .page-intro .btn svg { width:15px; height:15px; }
  .welcome-note { align-items:flex-start; padding:11px 12px; }
  .stats { gap:8px; margin-bottom:14px; }
  .stat { padding:13px 11px; min-height:103px; }
  .stat-label { font-size:10.5px; }
  .stat-value { font-size:24px; margin:7px 0 3px; }
  .stat-foot { font-size:9px; }
  .stat-icon { display:none; }
  .quick-add { padding:13px; gap:10px; margin-bottom:14px; }
  .quick-icon { display:none; }
  .quick-form { gap:7px; }
  .quick-form .input { padding:10px 11px; }
  .quick-form .btn { padding:9px 10px; }
  .quick-form .btn .btn-text { display:none; }
  .dashboard-grid { grid-template-columns:minmax(0,1fr); gap:14px; }
  .stack { gap:14px; }
  .panel { padding:18px 16px; }
  .panel-head { margin-bottom:17px; }
  .section-title { margin:20px 0 12px; }
  .project-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .project-card { padding:13px; min-height:154px; }
  .project-icon { width:35px; height:35px; margin-bottom:10px; }
  .notes-grid { grid-template-columns:minmax(0,1fr); gap:11px; }
  .note-card { min-height:144px; }
  .toolbar { flex-direction:column; align-items:stretch; }
  .toolbar .input { max-width:none; }
  .filters { flex-wrap:nowrap; overflow-x:auto; padding-bottom:6px; }
  .filter-chip { white-space:nowrap; }
  .filter-select { min-width:126px; max-width:175px; }
  .field-grid { grid-template-columns:1fr; }
  .modal-backdrop { padding:9px; align-items:flex-end; }
  .modal { border-radius:19px 19px 11px 11px; max-height:calc(100dvh - 16px); }
  .modal-head { padding:17px 20px; }
  .modal-body { padding:18px 20px; }
  .modal-footer { padding:15px 20px 20px; }
  .settings-row { flex-direction:column; align-items:flex-start; }
  .toast { bottom:84px; right:15px; left:15px; max-width:none; }
}
@media (prefers-reduced-motion:reduce){ *,*::before,*::after { transition-duration:.01ms!important; animation-duration:.01ms!important; } }
/* Prevent long project descriptions from forcing horizontal scrolling on phones. */
.project-desc { display:block; max-width:100%; }
/* CENTRS 1.1 — PERSONĪGI UN FINANSES */
.feature-grid, .personal-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin:20px 0; }
.feature-card { border:1px solid var(--line); background:#fff; border-radius:15px; box-shadow:var(--shadow); display:flex; align-items:center; text-align:left; padding:17px 19px; gap:13px; color:var(--text); min-width:0; }
.feature-card:hover { border-color:#afc7fb; }
.feature-card>span:nth-child(2){ min-width:0; flex:1; }
.feature-card strong { display:block; font-size:13px; font-weight:750; }
.feature-card small { display:block; margin-top:3px; font-size:11px; color:var(--muted); overflow-wrap:anywhere; }
.feature-card>svg { width:17px; color:#96a3b6; }
.feature-ico { display:inline-grid; flex:0 0 42px; place-items:center; width:42px; height:42px; background:#edf3ff; color:var(--blue); border-radius:12px; }
.feature-ico.fin { color:#1e9975; background:#e5f7f0; }
.feature-ico svg { width:20px; height:20px; }
.mini-summary { display:flex; flex-direction:column; gap:2px; padding:7px 0 16px; }
.mini-summary strong { font-size:30px; letter-spacing:-.9px; font-weight:780; }
.mini-summary span { color:var(--muted); font-size:12px; }
.groceries-grid { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(280px,1fr); gap:18px; }
.grocery-quick { display:flex; gap:8px; margin-bottom:16px; }
.grocery-quick .input { flex:1; }
.grocery-row { display:flex; align-items:center; min-height:57px; gap:12px; border-bottom:1px solid #f0f2f6; }
.grocery-row:last-child { border-bottom:0; }
.grocery-row.checked .grocery-item strong { color:#9aa6b8; text-decoration:line-through; }
.grocery-item { text-align:left; min-width:0; flex:1; background:transparent; border:none; padding:9px 0; }
.grocery-item strong { display:block; font-size:13px; font-weight:690; overflow-wrap:anywhere; }
.grocery-item span { display:block; margin-top:3px; color:var(--muted); font-size:11px; }
.mini-action.visible-action { opacity:1; width:31px; height:31px; color:#9ba7b8; }
.mini-action.visible-action:hover { color:var(--red); background:#fff2f5; }
.product-catalog { margin-top:12px; }
.catalog-row { display:flex; gap:5px; border-bottom:1px solid #f1f3f7; align-items:center; }
.catalog-row:last-child {border:0;}
.catalog-pick { background:transparent; border:0; flex:1; min-width:0; padding:10px 2px; text-align:left; }
.catalog-pick strong { display:block; font-size:12.5px; font-weight:700; }
.catalog-pick span { display:block; color:var(--muted); margin-top:3px; font-size:10.5px; }
.catalog-plus { border:1px solid #d9e5ff; border-radius:8px; background:#f2f6ff; color:var(--blue); display:grid; place-items:center; width:31px; height:31px; }
.catalog-plus svg { width:16px; height:16px; }
.count-pill { display:inline-block; background:#edf3ff; color:var(--blue); padding:2px 8px; font-size:12px; border-radius:12px; margin-left:3px; }
.scope-toggle { display:flex; width:max-content; max-width:100%; border:1px solid var(--line); background:white; border-radius:12px; gap:3px; padding:4px; margin:0 0 15px; }
.scope-tab { display:flex; align-items:center; gap:8px; padding:11px 17px; border:0; border-radius:9px; color:#78859a; background:transparent; font-size:12.5px; font-weight:720; }
.scope-tab svg { width:16px; height:16px; }
.scope-tab.selected { background:#edf3ff; color:var(--blue); }
.finance-month { display:flex; align-items:center; gap:11px; padding:0 0 20px; }
.finance-month strong { min-width:130px; text-align:center; text-transform:capitalize; }
.fin-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin-bottom:20px; }
.stat-value.negative { color:var(--red); }
.fin-warning { background:#fffaf0; border:1px solid #f6e7c9; border-radius:12px; display:flex; gap:10px; align-items:flex-start; padding:14px 17px; margin-bottom:17px; color:#887149; font-size:12px; }
.fin-warning svg { flex:0 0 18px; color:#bd8b39; }
.fin-warning strong { color:#81632f; }
.fin-columns { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.1fr); gap:18px; }
.budget-row { padding:9px 0 11px; }
.budget-row-head { display:flex; justify-content:space-between; align-items:center; gap:9px; font-size:11.5px; }
.budget-row-head strong { font-weight:680; }
.budget-row-head span { color:var(--muted); white-space:nowrap; }
.budget-track { width:100%; height:7px; overflow:hidden; border-radius:10px; background:#edf1f7; margin-top:8px; }
.budget-track>span { display:block; height:100%; border-radius:10px; background:#4f88f7; transition:width .2s ease; }
.budget-track>span.over-budget { background:#d45b6b; }
.transaction-list { display:flex; flex-direction:column; }
.transaction-row { display:flex; align-items:center; gap:11px; background:none; border:0; text-align:left; padding:12px 0; border-bottom:1px solid #f0f2f6; color:var(--text); min-width:0; width:100%; }
.transaction-row:last-child { border-bottom:none; }
.transaction-icon { flex:0 0 36px; width:36px; height:36px; border-radius:11px; display:grid; place-items:center; background:#fff2ed; color:#c97a4c; }
.transaction-icon.income { background:#e7f7ef; color:#20976c; }
.transaction-icon svg { width:17px; height:17px; }
.transaction-info { min-width:0; flex:1; }
.transaction-info strong { display:block; overflow-wrap:anywhere; font-size:12px; }
.transaction-info small { display:block; font-size:10.5px; color:var(--muted); margin-top:3px; }
.transaction-amount { font-size:12px; white-space:nowrap; color:#47546c; }
.transaction-amount.positive { color:var(--green); }
.budget-input-row { display:grid; grid-template-columns:minmax(0,1fr) 160px; gap:10px; align-items:center; padding:7px 0; }
.budget-input-row>label { font-size:12px; font-weight:670; }
.money-field { display:flex; align-items:center; gap:8px; }
.money-field>span { color:var(--muted); font-weight:700; }
@media (max-width:1150px){ .groceries-grid,.fin-columns { grid-template-columns:minmax(0,1fr); } }
@media (max-width:850px) { .bottom-nav { grid-template-columns:repeat(5,1fr); } .fin-stats { gap:9px; } }
@media (max-width:650px) {
 .feature-grid, .personal-grid { grid-template-columns:minmax(0,1fr); gap:10px; margin:14px 0; }
 .feature-card { padding:13px 14px; }
 .fin-stats { gap:8px; }
 .fin-stats .stat { padding:12px 9px; min-height:98px; }
 .fin-stats .stat-value { font-size:clamp(15px,5vw,23px); overflow-wrap:anywhere; }
 .fin-stats .stat-foot { font-size:9px; }
 .fin-stats .stat-icon { display:none; }
 .scope-toggle {width:100%;}
 .scope-tab {flex:1;justify-content:center;padding:10px 6px;font-size:11px;}
 .scope-tab svg {width:15px;}
 .finance-month {gap:5px;}
 .finance-month strong { min-width:0; flex:1; }
 .finance-month .btn {font-size:10px;}
 .grocery-quick .btn {font-size:11px; padding:9px 11px;}
 .bottom-nav {padding-left:4px; padding-right:4px;}
 .bottom-link {font-size:9px;}
 .bottom-link svg {width:19px;height:19px;}
 .budget-input-row { grid-template-columns:minmax(0,1fr) 125px; }
}
/* CENTRS v1.2 OneDrive file center */
.od-notice {display:flex;align-items:flex-start;gap:12px;padding:15px 17px;border:1px solid #ccdbf6;background:#f0f5ff;border-radius:12px;color:#38567e;font-size:13px;line-height:1.5;margin:12px 0}
.od-notice svg{width:20px;height:20px;flex:0 0 20px}
.od-notice.error{background:#fff3f1;border-color:#ffd4ce;color:#924e45}
.od-steps{font-size:13px;line-height:1.7;color:#4a596f;max-width:810px}
.od-steps ol{padding-left:22px;margin:10px 0}.od-steps p{color:#7a8798}.od-steps a{color:#316cf4}.od-steps code{font-family:monospace;background:#edf3fa;padding:1px 4px;border-radius:4px}
.od-config{margin-top:20px;max-width:700px;display:grid;gap:9px}.od-config label{font-weight:700;font-size:13px}.od-formline{display:flex;gap:10px}.od-formline .input{flex:1;min-width:0}
.od-smallprint{font-size:12px;color:#8592a2;margin-top:14px;line-height:1.6}.od-code{display:grid;gap:9px;background:#f3f7fc;padding:22px;border-radius:12px;margin:10px 0}.od-code strong{font-size:29px;letter-spacing:.12em}.od-code a{color:#316cf4;font-weight:700}.od-code small{color:#7b899b}
.od-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:12px 0 16px}.od-summary-card{background:white;border:1px solid #e2eaf3;border-radius:12px;padding:17px;display:grid;gap:8px;min-width:0}.od-summary-card small{color:#8c97a9}.od-summary-card strong{font-size:17px;overflow-wrap:anywhere;color:#263b59}.od-toolbar{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:16px}.od-results{margin-top:15px}
.od-search-form{display:grid;grid-template-columns:minmax(200px,2fr) minmax(120px,1fr) minmax(100px,1fr) minmax(130px,1fr) auto;gap:9px;margin-bottom:20px}.od-search-form .input{min-width:0}.od-file-list{display:grid;gap:0}.od-file{display:grid;grid-template-columns:40px minmax(0,1fr) auto;align-items:center;gap:13px;border-bottom:1px solid #edf1f6;padding:14px 2px}.od-file-icon{background:#eaf1fb;width:40px;height:40px;border-radius:10px;display:flex;align-items:center;justify-content:center;color:#316cf4}.od-file-icon svg{width:21px;height:21px}.od-file-text{min-width:0;display:grid;gap:5px}.od-file-text strong{font-size:13px;color:#273751;overflow-wrap:anywhere}.od-file-text small{font-size:11px;color:#8793a5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.od-file-side{display:grid;gap:10px;justify-items:end;align-items:center}.od-file-side>small{color:#9aa6b6;font-size:11px}.od-file-actions{display:flex;gap:7px;align-items:center}.od-file-actions .btn svg{width:14px;height:14px}.od-file-actions .mini-note{font-size:11px;color:#8793a5}.od-pills{display:flex;gap:5px;flex-wrap:wrap}.od-pills span{font-size:10px;background:#f0f4fa;color:#5f6e87;padding:3px 7px;border-radius:7px}.od-empty{padding:32px 10px;display:flex;gap:10px;color:#9ba5b3;align-items:center}.od-empty svg{width:20px;height:20px}.od-pagination{display:flex;justify-content:space-between;gap:10px;align-items:center;font-size:12px;color:#8d9aac;margin-top:16px}.od-picker{margin-top:16px}.od-breadcrumb{font-size:13px;color:#5d6e82;margin:8px 0 12px;overflow-wrap:anywhere}.od-folder-list{margin:16px 0 0;display:grid;gap:5px;max-height:320px;overflow:auto}.od-folder-row{border:1px solid #e8eef6;padding:11px;display:flex;align-items:center;gap:12px;background:#fff;border-radius:9px;cursor:pointer;text-align:left;color:#384b68}.od-folder-row span{flex:1}.od-folder-row svg{width:18px;height:18px;color:#7a9acb}.od-folder-row:hover{background:#f5f8ff}.od-footnote{display:flex;gap:10px;align-items:flex-start;font-size:12px;color:#8792a4;margin:16px 0;line-height:1.6}.od-footnote svg{width:17px;height:17px;flex:0 0 17px}
@media(max-width:1150px){.od-search-form{grid-template-columns:repeat(2,minmax(0,1fr))}.od-search-form .btn{grid-column:span 2}}
@media(max-width:850px){.bottom-nav{grid-template-columns:repeat(6,minmax(0,1fr))}.od-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.od-summary-card:last-child{grid-column:span 2}}
@media(max-width:650px){.od-search-form{grid-template-columns:1fr}.od-search-form .btn{grid-column:auto}.od-file{grid-template-columns:36px minmax(0,1fr);gap:9px}.od-file-side{grid-column:2;justify-items:start;gap:8px}.od-file-actions{flex-wrap:wrap}.od-file-side>small{font-size:10px}.od-file-text strong{font-size:12px}.od-file-text small{max-width:100%}.od-file-icon{height:36px;width:36px}.od-formline{flex-direction:column}.od-pagination{align-items:start;flex-direction:column}.od-toolbar .button-group{flex-wrap:wrap}.od-summary-card strong{font-size:14px}}

/* CENTRS 1.3 — produktu cenu salīdzināšana: Clean Modern */
.price-notice {display:flex;gap:12px;align-items:flex-start;background:#f0f5ff;border:1px solid #dce8fd;color:#456078;border-radius:14px;padding:15px 17px;margin-bottom:16px;font-size:12px;line-height:1.55;}
.price-notice strong{color:#24466c;}
.price-info-symbol{flex-shrink:0;display:grid;place-items:center;width:22px;height:22px;color:#2f6dc5;background:#dfeaff;border-radius:50%;font-weight:800;font-size:13px;}
.price-toolbar{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-bottom:18px;}
.grocery-price{border:0;border-radius:11px;background:#f3f7fe;padding:8px 10px;min-width:132px;max-width:172px;min-height:48px;display:flex;flex-direction:column;justify-content:center;align-items:flex-end;text-align:right;color:#426084;cursor:pointer;gap:2px;transition:background .15s ease;}
.grocery-price:hover{background:#e8f0fd;}
.grocery-price .price-eur{color:#235b9e;font-size:14px;font-weight:750;}
.grocery-price .price-shop{color:#4f6886;font-size:11px;line-height:1.25;}
.grocery-price .price-empty{font-size:11px;color:#7c8da4;font-weight:650;}
.grocery-price .price-hint{font-size:9.5px;color:#8399b3;}
.grocery-row.checked .grocery-price{opacity:.55;}
.price-summary{padding:15px;background:#eff6ff;border:1px solid #dce9fc;border-radius:12px;margin-bottom:15px;}
.price-summary>div{display:flex;justify-content:space-between;gap:16px;align-items:center;}
.price-summary span{font-size:12px;color:#5b7595;}
.price-summary strong{color:#245d9f;font-size:20px;}
.offers-list{max-height:300px;overflow:auto;}
.offer-line{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:12px 0;border-bottom:1px solid #edf1f7;}
.offer-line>div:first-child{min-width:0;flex:1;}
.offer-line strong{font-size:13px;display:block;color:#26374b;}
.offer-line small{display:block;color:#8491a3;font-size:10.5px;line-height:1.4;margin-top:3px;overflow-wrap:anywhere;}
.offer-right{display:flex;flex-direction:column;align-items:flex-end;flex-shrink:0;gap:3px;}
.offer-right b{color:#1f5a9b;font-size:14px;}
.offer-right .offer-ok{color:#328372;}.offer-right .offer-off{color:#ae7340;}
.tiny-link{color:#6883a7;background:none;border:0;padding:2px 0;font-size:10px;text-decoration:underline;cursor:pointer;}
.check-label{display:flex;gap:9px;align-items:center;font-size:12px;margin:6px 0;}
.loyalty-row{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #edf1f7;padding:12px 2px;font-size:13px;}
.loyalty-row:last-child{border-bottom:0;}
@media(max-width:650px){.price-toolbar{display:grid;grid-template-columns:1fr 1fr;gap:8px}.price-toolbar .btn{min-width:0;justify-content:center;white-space:normal;line-height:1.25}.grocery-price{min-width:90px;max-width:120px;padding:6px}.grocery-price .price-eur{font-size:12px}.grocery-price .price-shop{font-size:10px}.grocery-price .price-empty{font-size:10px}.grocery-row{gap:6px}.grocery-item strong{font-size:12px}.grocery-item span{font-size:10px}.grocery-row .mini-action{width:25px}.price-summary>div{align-items:flex-start;flex-direction:column;gap:4px}}
@media(max-width:380px){.grocery-price{min-width:76px;max-width:100px}.grocery-row .grocery-item{padding:7px 0}.price-toolbar .btn{font-size:10px}}

/* CENTRS 1.4 — produkta EAN/GTIN skenēšana */
.barcode-toolbar{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:0 0 13px}
.barcode-toolbar .scan-call{background:#226bda;border-color:#226bda;box-shadow:0 5px 15px rgba(38,99,197,.15)}
.barcode-hint{font-size:12px;color:#71849e}
.barcode-body{padding-top:17px}
.scan-description{font-size:13px;color:#536781;line-height:1.65;margin:0 0 15px}
.scan-preview{background:#f1f5fc;border:1px solid #e2eaf5;border-radius:15px;padding:11px;margin-bottom:12px}
.scan-view{width:100%;height:205px;border-radius:10px;background:#182338;position:relative;overflow:hidden;display:grid;place-items:center}
.scan-view video{display:block;width:100%;height:100%;object-fit:cover}
.scan-reticle{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:min(75%,270px);height:105px;border:3px solid rgba(138,204,255,.88);border-radius:12px;box-shadow:0 0 0 300px rgba(13,22,35,.12);pointer-events:none}
.scan-status{padding:9px 2px 1px;font-size:12px;color:#54719b;min-height:20px}
.scan-status[data-kind="error"]{color:#b2414e}
.scan-controls{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:18px}
.scan-controls .btn{padding:10px 13px;font-size:12px}
.scan-file-label{cursor:pointer}
.barcode-input-row{display:flex;gap:8px;margin-top:7px}
.barcode-input-row .input{min-width:0;flex:1}
.barcode-input-row .btn{white-space:nowrap}
.scan-result-banner{display:flex;align-items:flex-start;gap:11px;background:#eff6ff;border:1px solid #dce8fa;border-radius:12px;padding:12px;margin-bottom:18px;color:#2b578e}
.scan-result-banner svg{width:22px;height:22px;flex:none}
.scan-result-banner strong{font-size:13px}
.scan-result-banner p{font-size:12px;color:#536f93;line-height:1.5;margin:4px 0 0}
.scan-view.scanner-library{display:block;height:auto;min-height:185px}
.scan-view.scanner-library video{max-height:280px}
@media(max-width:650px){.barcode-toolbar{align-items:stretch;flex-direction:column;gap:8px}.barcode-toolbar .scan-call{width:100%;justify-content:center}.barcode-input-row{flex-wrap:wrap}.barcode-input-row .btn{width:100%;justify-content:center}.scan-view{height:185px}.scan-controls .btn{flex:1}.scan-description{font-size:12px}}

/* CENTRS 1.5 publisko cenu novērojumu josla */
.live-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:10px 0 12px}.live-toolbar span{font-size:11px;line-height:1.45;color:#657b96}.live-toolbar strong{font-weight:650;color:#365d89}

/* CENTRS 1.6: simple and accessible public comparison fallback */
.comparison-fallback{background:#f7f9fe;border:1px solid #e2eaf7;border-radius:13px;padding:15px;margin:14px 0 17px;}
.comparison-title{font-weight:750;font-size:13px;color:#274d83;margin-bottom:6px;}
.comparison-fallback p{font-size:12px;color:#62758f;line-height:1.5;margin:0 0 12px;}
.comparison-fallback label{display:block;font-size:11px;color:#65738b;margin-bottom:5px;}
.comparison-copy{display:flex;gap:7px;align-items:center;}
.comparison-copy .input{min-width:0;flex:1;}
.comparison-sites{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px;}
@media(max-width:480px){.comparison-copy{flex-wrap:wrap}.comparison-copy .btn{width:100%;justify-content:center}.comparison-sites .btn{flex:1;min-width:128px;justify-content:center}}

/* CENTRS 1.8 — salīdzināmo produktu grupas */
.group-badge{display:inline-flex;vertical-align:middle;align-items:center;background:#edf4ff;color:#285ab2;border:1px solid #d6e6ff;font-size:10px;line-height:1.4;border-radius:7px;padding:1px 6px;font-weight:650;margin-left:4px;white-space:nowrap}
.group-picker{max-height:260px;overflow:auto;border:1px solid #e0e7f0;border-radius:12px;padding:6px;background:#fbfdff}
.group-option{display:flex;gap:12px;padding:9px 10px;align-items:center;cursor:pointer;border-radius:8px}
.group-option:hover{background:#f0f6ff}
.group-option input{width:17px;height:17px;accent-color:#2b64c9;flex:0 0 auto}
.group-option span{display:flex;flex-direction:column;gap:2px;min-width:0}
.group-option b{font-weight:600;font-size:13px}
.group-option small{font-size:11px;color:#6e7a91}
.offer-right small{display:block;font-size:11px;font-weight:400;color:#6e7a91;margin-top:3px}
.grocery-price .price-shop{overflow-wrap:anywhere}

/* CENTRS 1.9 — Čeku un bankas izdevumu kategoriju asistents */
.fin-smart-panel{margin:16px 0 22px;padding:23px;}
.fin-step-label{font-size:10px;background:#e9f2ff;border:1px solid #d1e2fa;color:#2c62a8;padding:7px 10px;border-radius:999px;white-space:nowrap;font-weight:800;letter-spacing:.02em;}
.fin-action-row{display:flex;gap:9px;flex-wrap:wrap;margin:12px 0;}
.fin-action-row .btn{min-height:44px;}
.fin-context-hint{border:1px solid #e1eaf5;background:#f6f9fd;border-radius:12px;padding:12px 14px;font-size:12px;color:#5e718b;line-height:1.55;margin:12px 0;}
.fin-context-hint strong{color:#284e79;}
.fin-template-link{border:0;background:transparent;color:#507db2;font-size:11px;cursor:pointer;text-decoration:underline;padding:0 2px;}
.fin-inbox-head{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid #e9eef5;margin:22px 0 8px;padding-top:18px;}
.fin-inbox-head strong{font-size:15px;color:#20364d;}
.fin-count{background:#eef4fd;color:#466f9c;padding:5px 10px;border-radius:20px;font-size:11px;font-weight:800;}
.fin-empty-inbox{background:#f3f9f7;border:1px solid #def0e8;color:#43826d;border-radius:12px;padding:15px;display:flex;align-items:center;gap:9px;font-size:12px;}
.fin-empty-inbox svg{width:17px;height:17px;}
.fin-inbox-entry{border:1px solid #e5edf8;padding:15px;border-radius:14px;background:#fbfdff;margin:12px 0;box-shadow:0 3px 11px rgba(50,80,120,.035);}
.fin-inbox-title{display:flex;gap:10px;align-items:center;justify-content:space-between;color:#22364d;font-size:13px;}
.fin-inbox-title>strong{font-size:14px;line-height:1.3;}
.fin-inbox-title>span{white-space:nowrap;color:#365e91;font-weight:700;}
.fin-receipt-inline{padding:8px 0 10px;border-bottom:1px dashed #e4edf6;}
.fin-receipt-inline>span{display:flex;justify-content:space-between;gap:10px;align-items:center;font-size:12px;color:#334f6b;margin-bottom:6px;}
.fin-receipt-inline>span b{color:#1f3656;white-space:nowrap;}
.fin-chip-row{display:flex;flex-wrap:wrap;gap:5px;margin-top:5px;}
.fin-chip{background:#fff;border:1px solid #dce6f3;color:#5b7190;border-radius:99px;padding:6px 9px;line-height:1.1;font-size:11px;cursor:pointer;transition:all .14s ease;}
.fin-chip:hover{border-color:#7aabd7;color:#225590;}
.fin-chip.active{background:#e5effe;color:#1e5d9e;border-color:#a4c9fa;font-weight:750;}
.fin-chip-row.tiny .fin-chip{padding:5px 8px;font-size:10px;}
.fin-inbox-tools{display:flex;gap:7px;flex-wrap:wrap;margin-top:11px;}
.fin-receipt-history{border-top:1px solid #e9eef5;margin:22px 0 0;padding-top:17px;}
.fin-receipt-history>strong{font-size:13px;color:#273e59;}
.fin-history-list{display:flex;flex-direction:column;gap:0;margin-top:10px;}
.fin-history-row{width:100%;background:transparent;border:0;border-bottom:1px solid #edf2f8;padding:11px 4px;text-align:left;cursor:pointer;display:flex;justify-content:space-between;gap:16px;color:#253f60;}
.fin-history-row:hover{background:#f6faff;}
.fin-history-row span{font-weight:700;font-size:12px;}
.fin-history-row small{font-size:11px;color:#7e8fa4;font-weight:400;display:block;margin-top:3px;}
.fin-history-row b{font-size:12px;white-space:nowrap;}
.fin-ocr-status{font-size:12px;color:#4377a6;border-radius:10px;background:#eff6ff;padding:10px 12px;line-height:1.5;}
.receipt-edit-row{padding:12px;margin:11px 0;border:1px solid #e3ebf6;border-radius:12px;background:#fbfdff;}
.receipt-edit-row>.field{margin:0 0 8px;}
.receipt-line-right{display:flex;gap:9px;align-items:flex-end;}
.receipt-line-right>.field:first-child{flex:0 0 110px;}
.receipt-line-right>.field:nth-child(2){flex:1;min-width:0;}
.receipt-line-right .mini-action{margin-bottom:5px;}
.fin-reconcile{background:#eef5ff;color:#375f8b;padding:12px;border-radius:9px;font-size:12px;font-weight:750;margin-top:15px;}
.fin-success{background:#f0faf6;color:#287452;border-radius:9px;padding:12px;font-size:12px;}
@media(max-width:700px){.fin-smart-panel{padding:15px;margin:14px 0 18px}.fin-action-row{display:grid;grid-template-columns:1fr 1fr}.fin-action-row .btn{min-width:0;font-size:11px;white-space:normal;line-height:1.25;padding:12px 10px}.fin-action-row .btn:first-child{grid-column:1/-1}.fin-inbox-title{align-items:flex-start}.fin-inbox-title>span{font-size:11px}.fin-chip-row.tiny{flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;padding:5px 0;scrollbar-width:thin}.fin-chip-row.tiny .fin-chip{flex-shrink:0}.fin-inbox-entry{padding:12px}.receipt-line-right>.field:first-child{flex:0 0 90px}.receipt-edit-row{padding:9px}.fin-step-label{font-size:9px;padding:6px}.fin-inbox-head strong{font-size:14px}}

/* CENTRS 1.9.1 — divas čeka foto izvēles mobilajām ierīcēm. */
.fin-photo-options { display:flex; flex-wrap:wrap; gap:9px; margin-top:4px; }
.fin-photo-picker { position:relative; overflow:hidden; min-height:44px; white-space:normal; text-align:center; cursor:pointer; flex:1 1 200px; }
.fin-photo-picker input[type="file"] { position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; font-size:100px; }
.fin-photo-selection { margin-top:10px; overflow-wrap:anywhere; }
@media (max-width:520px) { .fin-photo-options { flex-direction:column; } .fin-photo-picker { flex:0 0 auto; width:100%; } }
/* CENTRS 1.9.4 — group receipt expenses by category in ledger (not receipt detail). */
.fin-receipt-group-preview { margin: 16px 0 12px; padding: 15px 16px; border: 1px solid #dce6f9; background: #f5f9ff; border-radius: 13px; }
.fin-groups-caption { display:flex; flex-direction:column; gap:3px; margin-bottom:10px; }
.fin-groups-caption strong { color:var(--text); font-size:14px; }
.fin-groups-caption span { color:var(--muted); font-size:12px; }
.fin-groups-list { display:flex; flex-direction:column; gap:7px; }
.fin-group-item { display:flex; align-items:center; justify-content:space-between; gap:10px; background:#fff; border-radius:9px; padding:9px 11px; font-size:13px; }
.fin-group-item span { overflow-wrap:anywhere; }
.fin-group-item small { color:var(--muted); }
.fin-group-item b { white-space:nowrap; font-variant-numeric:tabular-nums; }

/* CENTRS 2.0 konta un sinhronizācijas UI */
.cloud-locked #app {visibility:hidden;pointer-events:none; height:0;overflow:hidden;}
#cloudGate:empty{display:none;}
.cloud-overlay{position:fixed;inset:0;z-index:10001;display:flex;justify-content:center;align-items:center;padding:16px;background:#f5f8fd;overflow:auto;}
.cloud-auth-card{width:100%;max-width:440px;background:#fff;border:1px solid #dfe7f3;box-shadow:0 18px 65px rgba(24,44,76,.08);border-radius:23px;padding:28px;display:grid;gap:16px;color:#172a42;}
.cloud-logo{display:flex;gap:10px;align-items:center;font-size:22px;font-weight:760;letter-spacing:-.7px;}
.cloud-logo-mark{border-radius:13px;background:#eaf2ff;color:#245bb7;padding:10px;font-size:20px;}
.cloud-auth-card h2{font-size:23px;margin:3px 0 0;}
.cloud-auth-card p{color:#61748e;line-height:1.5;margin:0;}
.cloud-auth-card label{display:grid;gap:7px;color:#304561;font-size:13px;font-weight:650;}
.cloud-auth-card input{border:1px solid #d8e2ee;border-radius:11px;font-size:15px;padding:12px 14px;width:100%;background:#fff;color:#192d43;}
.cloud-auth-card button{border:0;border-radius:11px;background:#245cb9;color:white;padding:13px 16px;cursor:pointer;font-weight:700;font-size:14px;}
.cloud-auth-card button.ghost{background:#eef4fb;color:#214b88;}
.cloud-auth-card button:disabled{opacity:.55;cursor:wait;}
.cloud-auth-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;}
.cloud-error{background:#fff1ef;border:1px solid #f6c8c2;color:#8c3025;border-radius:11px;padding:10px 12px;font-size:13px;}
.cloud-hint{font-size:12px;color:#71859b;}
#cloudStatus {position:fixed;bottom:72px;right:14px;z-index:9998;max-width:340px;border-radius:12px;background:#e7f0ff;border:1px solid #c7ddff;color:#1d4780;padding:9px 13px;box-shadow:0 6px 24px rgba(20,35,63,.1);font-size:12px;display:none;}
#cloudStatus.show{display:block;}
#cloudStatus.error{background:#fff0eb;border-color:#f3b5a3;color:#823a2e;}
#cloudStatus.warn{background:#fffae5;border-color:#ead28d;color:#6d5219;}
@media(max-width:720px){.cloud-auth-card{padding:23px 19px;}#cloudStatus{right:10px;left:10px;bottom:75px;max-width:none;}}
