--- title: "Overview" status: accepted source: "design/HANDOVER.md; docs/plans/design-system-site.md" updated: "21.11.2026." url: https://design.mojakirija.rs/ --- # Overview Accepted · design/HANDOVER.md; docs/plans/design-system-site.md What the mojakirija design system is, which file wins, and how to read a status. This is the design system of **moja kirija**: the tokens, components, patterns and words the product is built from, for the people and the agents who build it. It is served from the product's own Next app, and every example on it is the component the app ships, not a look-alike. ## Which source wins 1. `design/HANDOVER.md` is the authority. Where this site and HANDOVER disagree, HANDOVER wins and this site is the bug. 2. `design/tokens.css` is HANDOVER's transcription into custom properties. The token pages here are read from it at build time, so they cannot drift from it. 3. `apps/web/components/ui` is the implementation. A component page renders that code. ## Status Every page, token and rule carries a status, drawn as a word and a shape, never as a colour alone. A proposal inside an accepted page sits in a dashed block marked **Predlog · nije pravilo** and is never mixed into the rule text. | Status | Meaning | | --- | --- | | Accepted | In `design/HANDOVER.md`, or a board the owner approved. This is the rule. | | Proposed | Drawn on the canvas, waiting for the owner's vote. Not a rule; do not implement. | | Provisional | A gap filled by a reasonable reading, marked so in the token file. Use it, expect it to move. | | Rejected | Voted down. Kept so nobody draws it again. | | Superseded | Replaced by a later decision, which the entry links to. | ## Principles - **Calm.** One filled button per step; the alarm colour belongs to four exceptions and to late status. - **State is a shape before it is a colour.** Every state survives greyscale. - **An amount never moves.** No counting up, no transition on a figure. - **Static things never look raised.** Cards, rows, tags and statuses carry a 1px line and stay flat; only buttons and inputs carry small layered shadows, and pressed goes down (accepted 21.11.2026). - **One hand on a phone.** Nothing below 16px, nothing smaller than a 44px target. ## For agents Every page has a Markdown twin at its URL plus `.md`, and `/llms.txt` lists them. See [Agents](https://design.mojakirija.rs/agents). --- --- title: "Colour" status: accepted source: "design/HANDOVER.md · Colour; design/tokens.css" updated: "21.11.2026." url: https://design.mojakirija.rs/foundations/colour --- # Colour Accepted · design/HANDOVER.md · Colour; design/tokens.css Paper, surface, ink, accent, alarm, danger and the façade tones, read from design/tokens.css. The palette is warm paper and ink with one green accent. Every swatch below is read from `design/tokens.css` when the site is built; the value printed is the value the app draws. ## Rules - **Alarm (oxide amber) has two uses and no third:** the four exceptions (standing order missed, bill not seen, tenant overdue, portal session dead), at most once per screen; and late status on the owner's screens, always beside the status mark and the word. - **Red is destructive only** (`--mk-danger-*`), and even a delete never shows the full alarm colour. - **Form errors are not red.** Weight, an outline and a sentence that says why. - **A minus is a sign, not a colour.** A negative figure stays ink. - **The façade tones are data categories only** (heating, repairs, water, electricity), never state. ## One theme **Accepted 21.11.2026** (canvas "Jedna tema · Sidekick model"): a near-black frame and navigation with light work cards. Dark mode is switched off first (`color-scheme: light`) and its tokens are removed about a month later; e-mail keeps light and dark. The app does not draw this yet, and the dark values below are still in `design/tokens.css` until that removal. This site already follows the direction and renders light only. See [D-2026-11-21-17](https://design.mojakirija.rs/decisions#D-2026-11-21-17). ## Every colour token | Token | Light | Dark | Status | | --- | --- | --- | --- | | `--mk-paper` | #FBF8F2 | #171614 | Accepted | | `--mk-surface` | #FFFFFF | #1F1D1A | Accepted | | `--mk-sunk` | #EFE9DD | #262320 | Provisional | | `--mk-line` | #E2DCD1 | #35322D | Accepted | | `--mk-ink` | #1C1A17 | #F2EDE4 | Accepted | | `--mk-ink-meta` | #55504A | #A9A29A | Accepted | | `--mk-line-strong` | #CFC7B8 | #4A463F | Provisional | | `--mk-accent` | #1F5C4A | #7FBFA0 | Accepted | | `--mk-accent-strong` | #143B2F | #A5D4BC | Provisional | | `--mk-accent-soft` | #E6EEE9 | #22332B | Accepted | | `--mk-accent-line` | #C9DBD1 | #2F4A3D | Accepted | | `--mk-alarm` | #A84F00 | #F0A04B | Accepted | | `--mk-danger-wash` | #F6E7E2 | #3B211B | Accepted | | `--mk-danger-line` | #B8705C | #A8604D | Accepted | | `--mk-danger-ink` | #7A2715 | #F3BFB1 | Accepted | | `--mk-cat-heating` | #B8863B | — | Accepted | | `--mk-cat-repairs` | #B27E7A | — | Accepted | | `--mk-cat-water` | #9FB89A | — | Accepted | | `--mk-cat-electricity` | #7E93A3 | — | Accepted | | `--mk-canvas` | #EDE6D7 | #100F0E | Accepted | | `--mk-canvas-line` | #D6CDBC | #2E2A26 | Accepted | | `--mk-band` | #F6F1E7 | #1F1D1A | Accepted | | `--mk-row-hover` | #F8F4EC | #211F1C | Accepted | | `--mk-chart-hot` | #EFE9DD | #262320 | Accepted | | `--mk-cat-utilities-in` | #8DB3A2 | — | Accepted | | `--mk-cat-other` | #A69C8C | — | Accepted | | `--mk-provider-informatika` | #1B2F5B | — | Accepted | | `--mk-control-line` | #8A837B | #7A746C | Accepted | | `--mk-cta-0-ink` | var(--mk-ink-meta) (#55504A) | — | Accepted | | `--mk-cta-0-line` | transparent | — | Accepted | | `--mk-cta-1-ink` | var(--mk-ink) (#1C1A17) | — | Accepted | | `--mk-cta-1-line` | var(--mk-control-line) (#8A837B) | — | Accepted | | `--mk-cta-2-ink` | var(--mk-ink) (#1C1A17) | — | Accepted | | `--mk-cta-2-line` | var(--mk-ink) (#1C1A17) | — | Accepted | | `--mk-cta-2-wash` | var(--mk-surface) (#FFFFFF) | — | Accepted | | `--mk-cta-2-quiet-wash` | var(--mk-sunk) (#EFE9DD) | — | Accepted | | `--mk-scrim` | rgba(28, 26, 23, 0.42) | — | Accepted | --- --- title: "Type" status: accepted source: "design/HANDOVER.md · Type, Scale" updated: "21.11.2026." url: https://design.mojakirija.rs/foundations/type --- # Type Accepted · design/HANDOVER.md · Type, Scale Source Sans 3 for words and every number, one scale, nothing below 16px. **Source Sans 3 for words and for every number**, set with tabular lining figures (`.mk-num`): dinars, dates, references, kWh, percentages. **No mono, anywhere** (locked 20.11.2026, it replaced Source Code Pro). ## Why this family Source Sans 3 and Source Serif 4 are the only two families checked that pass `locl` SRB. PT Sans, PT Serif, Fira Sans, Inter and Golos Text render Serbian italic Cyrillic as Russian. Nothing in the product renders italic, so no italic face is loaded. ## The scale 48 / 28 / 24 / 20 / 18 / 17 / 16, nothing between and nothing below 16px. Sizes are in `rem`, so a reader who raised their phone's text size gets it. Display steps sit at line height 1,25 and stay on one line; everything that wraps is 1,5 or more. | Token | Value | Dark | Status | | --- | --- | --- | --- | | `--mk-size-display` | 3rem | — | Accepted | | `--mk-size-title` | 1.75rem | — | Accepted | | `--mk-size-heading` | 1.5rem | — | Accepted | | `--mk-size-subheading` | 1.25rem | — | Accepted | | `--mk-size-body-lg` | 1.125rem | — | Accepted | | `--mk-size-body` | 1.0625rem | — | Accepted | | `--mk-size-meta` | 1rem | — | Accepted | ## The desk measure **Accepted 21.11.2026** ([D-2026-11-21-15](https://design.mojakirija.rs/decisions#D-2026-11-21-15)): with a mouse the page title is 24px and a sheet title 20px; with touch the sizes above stand. Chosen by pointer type, not by width. The 16px floor is unchanged. Not yet drawn by the app or written into `design/tokens.css`. ## Figures - Amounts keep weight 600. - Groups of a reference or account number are separated with `word-spacing: 0.2em`, not with typed spaces. - A token with a digit is an identifier and is never transliterated to Cyrillic. --- --- title: "Spacing" status: accepted source: "design/HANDOVER.md · Spacing; design/tokens.css" updated: "21.11.2026." url: https://design.mojakirija.rs/foundations/spacing --- # Spacing Accepted · design/HANDOVER.md · Spacing; design/tokens.css A 4px base, the 20px screen gutter and the 44px touch floor. A 4px base: 4 · 8 · 10 · 12 · 16 · 20 · 24 · 32, with 56 and 64 for desk section padding. 20px is the screen gutter on a phone. 44px is the floor for anything pressed; a row in a sheet is 52px. | Token | Value | Dark | Status | | --- | --- | --- | --- | | `--mk-space-1` | 4px | — | Accepted | | `--mk-space-2` | 8px | — | Accepted | | `--mk-space-3` | 10px | — | Accepted | | `--mk-space-4` | 12px | — | Accepted | | `--mk-space-5` | 16px | — | Accepted | | `--mk-space-6` | 20px | — | Accepted | | `--mk-space-7` | 24px | — | Accepted | | `--mk-space-8` | 32px | — | Accepted | | `--mk-space-9` | 56px | — | Accepted | | `--mk-space-10` | 64px | — | Accepted | | `--mk-touch` | 44px | — | Accepted | | `--mk-touch-sheet` | 52px | — | Accepted | ## Measure and radius - **Measure, accepted 21.11.2026** ([D-2026-11-21-15](https://design.mojakirija.rs/decisions#D-2026-11-21-15)): with a mouse, controls are 36px and table rows 48px; with touch, controls stay 44px (48 for a sheet's primary). Chosen by pointer type. - **Radius ladder, accepted 21.11.2026**, replacing "one radius 3px": 4 tags · 8 controls and inner cards · 12 menus and popovers · 16 shell cards · full for floating and round objects. - Both are rules now and neither is in `design/tokens.css` yet: the token values above are what the app draws today. --- --- title: "Button" status: accepted source: "apps/web/components/ui/button.tsx" updated: "21.11.2026." url: https://design.mojakirija.rs/components/button --- # Button Accepted · apps/web/components/ui/button.tsx The one thing on a screen that looks pressable, in six variants. Import from `@/components/ui/button.tsx`. One component replaced six copies of the same button, and each copy had drifted: a UA font on a marketing CTA, the wrong weight, two different hovers. ## Variants ```tsx ``` | Variant | When | | --- | --- | | `primary` | Accent fill. The one filled action of a step. | | `secondary` | Hairline, ink text. The quieter half of a pair. | | `ink` | Ink fill, for a form's submit on paper. | | `quiet` | No chrome, accent text. | | `alarm` | One of the four exceptions. Once per screen. | | `wash` | A section's call to action in three levels; never a step's primary. | ## States and forms ```tsx ``` ## Usage - **One filled button per step.** A second action is `secondary` or `quiet`. - **A GET that changes state is never a link.** Recording, sending, paying and deleting are a form and a ` ``` --- --- title: "Amount" status: accepted source: "apps/web/components/ui/amount.tsx" updated: "21.11.2026." url: https://design.mojakirija.rs/components/amount --- # Amount Accepted · apps/web/components/ui/amount.tsx A figure at one of the sizes the product draws figures at, with its currency beside it. Import from `@/components/ui/amount.tsx`. The role names what the figure is on the screen; the size is the consequence. Formatting is not this component's job: `formatMoney` writes `52.830,00` and Amount takes that string. ## Roles ```tsx 12.345,00 8.120,50 4.200,00 -1.500,00 {null} ``` ## Rules - A leading hyphen becomes U+2212, the minus sign, which has the tabular advance. - A negative stays ink: money going the other way is not an exception. - No figure yet is an em dash in the figure's face, with no currency after it. - An amount never animates. ## Props | Prop | Type | Default | Description | | --- | --- | --- | --- | | `children` | string \| null | — | The figure as `formatMoney` wrote it (`52.830,00`). `null` or `""` draws an em dash and no currency. | | `currency` | string | — | `RSD`, `EUR`, `kWh`, `m²`, set beside the figure, never inside it. | | `role` | "page" \| "card" \| "row" \| "bill" \| "inline" | "inline" | What the figure is on the screen; the size follows. `page` is the one number a screen exists for. | --- --- title: "Feedback that does not move the page" status: accepted source: "design/HANDOVER.md · Feedback that must not move the page" updated: "21.11.2026." url: https://design.mojakirija.rs/patterns/feedback --- # Feedback that does not move the page Accepted · design/HANDOVER.md · Feedback that must not move the page Success is a toast; an error that needs an action stays in place. - Success is a toast: bottom-left on desk, bottom-centre above the dock on a phone. `role="status"`, a 1px line, no shadow, gone after about 4s; a new one replaces the old. - An error that needs an action stays in place and never toasts. It swaps the text of a slot that is already there. A new line never pushes content down. - Deleting morphs the row in place: the bin grows into "Obrišite", "Odustanite" fades in beside it, the row height does not change. --- --- title: "Templates" status: accepted source: "docs/plans/design-system-site.md §5" updated: "21.11.2026." url: https://design.mojakirija.rs/templates --- # Templates Accepted · docs/plans/design-system-site.md §5 Whole screens built from the shared parts with invented data. A template shows a whole screen at full size, built from `components/ui` with invented data, with accepted and proposed side by side where both exist. _No templates yet._ The next lane adds the index page, the detail page, settings, the tenant statement and onboarding. --- --- title: "Numbers, dates and money" status: accepted source: "design/HANDOVER.md · Type, Locales; docs/brief.md §11" updated: "21.11.2026." url: https://design.mojakirija.rs/content/numbers --- # Numbers, dates and money Accepted · design/HANDOVER.md · Type, Locales; docs/brief.md §11 How a figure, a date and a reference are written, in every locale. - Money is written `52.830,00`: a full stop for thousands, a comma for decimals, then the currency. - Dates take a trailing full stop in every locale: `21.11.2026.` - Copy is stored once as sr-Latn and transliterated to Cyrillic at render. A token that contains a digit is an identifier and comes back byte for byte. - Budget every box against Russian, the longest locale: +43,2% against sr-Latn; sr-Cyrl is +13,9%. - **The owner pays every bill; the tenant reimburses.** The statement verb is **vraćate**, never **platite**. --- --- title: "Decision log" status: accepted source: "design/onboarding-v2/README.md" updated: "21.11.2026." url: https://design.mojakirija.rs/decisions --- # Decision log Accepted · design/onboarding-v2/README.md Every design decision, newest first, with its status and the board it came from. Seeded with the owner's votes of 21.11.2026. Each entry names the board in the repo it came from. A rejected entry stays so nobody draws it again. | Id | Date | Status | Decision | Board | | --- | --- | --- | --- | --- | | D-2026-11-21-17 | 21.11.2026. | Accepted | **One theme.** A near-black frame and navigation with light work cards. Dark mode is switched off first (color-scheme: light) and its tokens removed about a month later. E-mail keeps light and dark. | `docs/design-system/decisions.md · canvas "Jedna tema · Sidekick model"` | | D-2026-11-21-16 | 21.11.2026. | Accepted | **CRUD model M1: one slot.** Every create, edit and detail opens in the right column on desk (with "Proširite" for wide content) and in the bottom sheet on a phone, the same component. No centred dialogs; destructive actions confirm in the row. The dirty-form guard is required before the column becomes non-modal. | `docs/design-system/decisions.md · canvas "Shopify · dubinski", board ODLUKA · CRUD` | | D-2026-11-21-15 | 21.11.2026. | Accepted | **Desk measure, radius ladder and small depth.** With a mouse: 36px controls, 48px table rows, a 24px page title and a 20px sheet title; with touch, controls stay 44px (48 for a sheet's primary), by pointer type. Radius ladder 4 · 8 · 12 · 16 · full replaces one radius. Buttons and inputs carry small layered shadows; cards, rows, tags and statuses stay flat. The 16px text floor stands. | `docs/design-system/decisions.md · canvas "Shopify · dubinski", boards Veličine and Mala dubina` | | D-2026-11-21-01 | 21.11.2026. | Accepted | **O10 B: an expired ID card is one row on the statement.** The statement carries one row, "Lična karta · Isteklo … · pošaljite novu", which opens its own sheet "Nova lična karta" with the same upload as Fajlovi. | `design/onboarding-v2/project/Plan-O10-B.dc.html` | | D-2026-11-21-02 | 21.11.2026. | Rejected (instead: D-2026-11-21-01) | **O10 A: a drop zone inside the statement.** Rejected: it mixes two concepts on the tenant's statement. | `design/onboarding-v2/project/Plan-O10-B.dc.html` | | D-2026-11-21-03 | 21.11.2026. | Accepted | **The owner confirms a new ID document.** From the tenant's sheet the owner confirms the new document and records its expiry date. | `design/onboarding-v2/project/Plan-O10-vlasnik.dc.html` | | D-2026-11-21-04 | 21.11.2026. | Accepted | **D12 C: the final settlement is by agreement.** Deposit status on top; every post-move-out bill and deduction settled per row as "Iz depozita", "Stanar vraća" or "Vlasnik snosi"; "Dodajte odbitak"; a free "Dogovor" note; a sum that always balances; "Sačuvajte bez slanja". A and B survive as states of C. | `design/onboarding-v2/project/Plan-D12-C.dc.html` | | D-2026-11-21-05 | 21.11.2026. | Rejected (instead: D-2026-11-21-04) | **D12 A and B as separate settlement screens.** Not chosen; both remain only as states of C. | `design/onboarding-v2/project/Plan-D12-C.dc.html` | | D-2026-11-21-06 | 21.11.2026. | Accepted | **Owner reminders live in Nalog.** A "Podsetnici" row states the setting in one line and opens a sheet: channel (e-mail on, SMS tagged "Uskoro"), frequency (three choices, one tagged "Preporučeno"), what for, and a weekly-summary switch. Tenant reminders stay on the tenancy. | `design/onboarding-v2/project/Plan-Podsetnici.dc.html` | | D-2026-11-21-07 | 21.11.2026. | Accepted | **A bill from a photo with no payment code.** The photo full width at a fixed 220px; an uncertain amount marks the whole field with "Potvrdite iznos" and a required "Iznos je isti kao na računu" check; crops of the photo under amount and due date. The OCR choice is still open. | `design/onboarding-v2/project/Plan-Foto-bez-koda.dc.html` | | D-2026-11-21-08 | 21.11.2026. | Accepted | **Agencija B: agents see only their clients' flats.** An agent is tied to clients; the selected role expands into "Vidi" / "Ne vidi"; an Izveštaji page with every client for the month; sending is a setting row, not a switch on the page; icons only from components/ui/icons. | `design/onboarding-v2/project/Plan-Agencija-B.dc.html` | | D-2026-11-21-09 | 21.11.2026. | Rejected (instead: D-2026-11-21-08) | **Agencija A.** Not chosen. | `design/onboarding-v2/project/Plan-Agencija-B.dc.html` | | D-2026-11-21-10 | 21.11.2026. | Accepted | **Legal pages: layout only.** Uslovi korišćenja and Privatnost as two tabs under one header; a contents column that follows reading and a text column up to 680px at 17px, line height 1,5; on a phone the contents is the Picker. Section titles are a proposal; a lawyer writes the text. | `design/onboarding-v2/project/Plan-Naplata-pravne.dc.html` | | D-2026-11-21-11 | 21.11.2026. | Accepted | **Cene A: the public pricing page.** "Cene", one sentence, three hairline columns, each higher plan opening "Sve iz plana …, i:", one filled button, a comparison in four groups with a sticky header, five questions, one CTA. "Pišite nam" opens a contact dialog. | `design/onboarding-v2/project/Plan-Cene-A.dc.html` | | D-2026-11-21-12 | 21.11.2026. | Accepted | **Naplata B: the in-app plan page.** The same three columns as Cene A, the account's own sum, "Preporučeno" only when known; no wall: adding flats and people always works, unpaid pauses the automation only, the tenant's link always works. Plan names are still open. | `design/onboarding-v2/project/Plan-Naplata-B.dc.html` | | D-2026-11-21-13 | 21.11.2026. | Accepted | **D13 B: withdrawing a notice.** "Povucite otkaz" opens a one-step sheet and leaves a trace in the tenancy. B over A. | `design/onboarding-v2/project/Plan-D13-B.dc.html` | | D-2026-11-21-14 | 21.11.2026. | Accepted | **D19: inspections, keys and viewings.** A recurring inspection reminder as one row on Stanje stana, keys and who holds them, and the viewing log of a vacant flat. Row text wraps, never an ellipsis. | `design/onboarding-v2/project/Plan-D19-kontrole.dc.html` | --- --- title: "llms.txt and Markdown pages" status: accepted source: "docs/plans/design-system-site.md §7" updated: "21.11.2026." url: https://design.mojakirija.rs/agents --- # llms.txt and Markdown pages Accepted · docs/plans/design-system-site.md §7 The files an agent loads instead of the HTML, and what they leave out. Every page on this site is also served as Markdown at the same URL plus `.md`, generated from the same content as the page. `/llms.txt` lists them; `/llms-full.txt` inlines every accepted page. | URL | What it holds | | --- | --- | | `/llms.txt` | Index: one line and one `.md` link per accepted page. | | `/llms-full.txt` | Every accepted page inlined, in sidebar order. Proposal blocks are left out. | | `/.md` | The Markdown twin of any page: the page URL plus `.md`. | | `/tokens.json` | Every `--mk-*` custom property: name → value, dark value, kind, group and status. | | `/search.json` | The index the ⌘K search reads: pages, headings and tokens. | ## Rules for agents - **Never implement a Proposed item.** Proposal blocks are left out of `llms-full.txt`, and a page whose whole subject is proposed is left out of both files. - Use only tokens whose status is `accepted` or `provisional`. - Cite the decision id in the commit when a change follows one. - When a rule is missing, stop and ask, or draw a board; do not invent one.