# Signet UI Design System

## Overview
Signet is a party-based sequential document signing application with a lightweight, minimal interface. The UI prioritizes clarity and efficient document workflow management. Domain terms follow `CONTEXT.md`; current implementation gaps are in `HANDOFF.md` §4.

## Color Palette
All colors are defined in CSS custom properties (`:root`):

| Token | Value | Purpose |
| --- | --- | --- |
| `--ink` | `#1b2330` | Primary text, dark backgrounds |
| `--muted` | `#637083` | Secondary text, disabled states |
| `--line` | `#d9dfe7` | Borders, dividers |
| `--bg` | `#f3f5f8` | Page background |
| `--card` | `#fff` | Card/panel background |
| `--accent` | `#1f5f8b` | Primary actions, links |
| `--danger` | `#a8322d` | Error, destructive actions |
| `--ok` | `#2c7a4b` | Success, released status |
| `--warn` | `#9a6a00` | Warning, pending states |

Imprint box colors use RGB variables:
- `--sig: 214, 48, 49` (signature zones, reddish)
- `--img: 9, 102, 204` (image boxes, blue)
- `--txt: 34, 139, 84` (text boxes, green)

## Typography
- **Font**: System UI stack: `system-ui, -apple-system, "Segoe UI", sans-serif`
- **Base size**: 14px
- **Line height**: 1.5
- **Headings**: 
  - H1: 1.25rem (20px)
  - H2: 0.8rem uppercase with 0.07em letter-spacing

## Layout Components

### Header Bar (`.bar`)
- Dark background (`--ink`)
- Flexbox layout with navigation and user info
- Padding: 0.6rem 1.2rem
- Gap: 1.5rem
- White text with lighter secondary text (#cfd8e3)

### Main Container
- Max-width: 1500px
- Centered with padding: 1.2rem
- Responsive layout at 900px breakpoint

### Document Workspace (`.workspace`)
- CSS Grid: 1fr + 340px sidebar
- Sticky sidebar with max-height scrolling
- Stacks to single column on mobile

### Cards (`.card`)
- White background
- Border: 1px solid `--line`
- Border-radius: 6px
- Padding: 1rem

## Form Elements
- Input, select, textarea: inherit font, 0.38rem vertical/0.5rem horizontal padding
- Border: 1px solid #b9c3cf
- Border-radius: 4px
- Full width
- Buttons: 0.4rem vertical / 0.85rem horizontal padding, 4px radius
- Primary buttons: `--accent` background, white text
- Disabled buttons: 50% opacity

## Status Badges (`.status`)
- Inline-block display
- Font-size: 11px, font-weight: 600
- Padding: 0.1rem 0.45rem
- Border-radius: 3px
- States:
  - Default: #e6eaef background, #3c4858 text
  - `PENDING`: #fff1cf background, `--warn` text color
  - `CORRECTION_REQUIRED`: #ffe1d2 background, #a2461a text
  - `RELEASED`: #d9f2e3 background, `--ok` text color
  - `DISAPPROVED`: #f8d9d8 background, `--danger` text color

## Document Page Display
- Max-width: 1000px
- White background with shadow: `0 1px 4px rgba(20, 30, 45, 0.25)`
- Images: responsive width, user-select: none

### Imprint Boxes (`.box`)
- Absolute positioned over page
- Border: 1.5px solid with CSS color variable
- Background: 10% opacity color
- Resize grip (9x9px) in bottom-right
- Circle variant: 50% border-radius

## Editor Mode (`.edit`)
- Boxes are draggable (`cursor: move`)
- Selected boxes show 2px outline with 1px offset
- Drag-over state: 3px dashed accent outline

## Preview Mode (`.preview`)
- Overlay boxes are translucent with dashed borders
- Pointer-events: none (allows native area tooltips)
- Hide overlays toggle class: `.hide-overlays`

## Tabs
- Flexbox layout with 0.25rem gap
- Selected tab: dark background with white text
- Wrapping enabled

## Tables
- Full width, border-collapse
- Padding: 0.5rem 0.6rem
- Bottom border: 1px solid `--line`
- Clickable rows: `.click` class with hover state #f6f9fc

## Toast Notifications (`.toast`)
- Fixed bottom-center
- Background: `--ink` (error variant: `--danger`)
- Padding: 0.6rem 1rem
- Border-radius: 4px
- z-index: 10
- Max-width: 90vw

## Spacing
- Base unit: 0.4rem (approximately 6.4px at 16px base)
- Gaps: 0.5rem, 0.8rem, 1.2rem, 1.5rem
- Padding: 0.4rem, 0.5rem, 0.6rem, 1rem, 1.2rem

## Breakpoints
- Mobile/Tablet: max-width 900px
- Workspace switches to single column layout

## Interaction States
- Focus: Not explicitly defined (browser default or custom focus states should be added)
- Hover: Defined for buttons and table rows
- Active: Tab selected state
- Disabled: 50% opacity
