/* Byabsayik Khata design tokens. Base: Practical UI (Adham Dannaway).
   Values decoded from research/design-system/Practical-UI-design-system.fig. See tokens.md.
   Light is the default. Set <html data-theme="dark"> for dark mode.
   Brand colour: green #007F3D, chosen by Naeem 2026-11-22 (ACI type green, darkened to pass 4.5:1). */

:root {
  /* Backgrounds */
  --bg-base: #FFFFFF;
  --bg-sunken: #F5F6FA;
  --bg-raised: #FFFFFF;
  --bg-overlay: #FFFFFF;
  --bg-alternate: #F5F6FA;
  --bg-inverse: #12131A;
  --bg-brand: #007F3D;
  /* R1-11: page is light grey, every card is white with a 1px border */
  --bg-screen: #F2F4F8;
  --surface-card: #FFFFFF;
  --stroke-card: rgba(0, 17, 102, 0.14);

  /* Text */
  --text-strong: rgba(0, 6, 38, 0.90);
  --text-weak: rgba(0, 9, 51, 0.65);
  --text-brand: #007F3D;
  --text-error: #C73A3A;
  --text-success: #067A57;
  --text-warning: #8F6C1A;
  --text-info: #1A74A8;
  --text-disabled: rgba(0, 17, 102, 0.10);
  --text-inverse: #FFFFFF;
  --text-on-action: #FFFFFF;

  /* Icons */
  --icon-neutral: rgba(0, 13, 77, 0.45);
  --icon-brand: rgba(0, 127, 61, 0.80);
  --icon-error: rgba(199, 58, 58, 0.80);
  --icon-success: rgba(6, 122, 87, 0.80);
  --icon-warning: rgba(143, 108, 26, 0.80);
  --icon-info: rgba(26, 116, 168, 0.80);
  --icon-disabled: rgba(0, 17, 102, 0.10);

  /* Fills */
  --fill-action: #007F3D;
  --fill-action-hover: #006B34;
  --fill-action-press: #00612F;
  --fill-brand-weak: rgba(0, 184, 90, 0.05);
  --fill-hover: rgba(0, 21, 128, 0.04);
  --fill-press: rgba(0, 17, 102, 0.10);
  --fill-weak: rgba(0, 21, 128, 0.04);
  --fill-disabled: rgba(0, 17, 102, 0.10);
  --fill-selected: #007F3D;
  --fill-error-strong: #C73A3A;
  --fill-success-strong: #067A57;
  --fill-warning-strong: #8F6C1A;
  --fill-info-strong: #1A74A8;
  --fill-error-weak: rgba(255, 74, 74, 0.05);
  --fill-success-weak: rgba(10, 204, 146, 0.05);
  --fill-warning-weak: rgba(255, 192, 46, 0.05);
  --fill-info-weak: rgba(38, 176, 255, 0.05);
  --fill-scrim: rgba(0, 13, 77, 0.45);

  /* Strokes */
  --stroke-strong: rgba(0, 13, 77, 0.45);
  --stroke-weak: rgba(0, 17, 102, 0.10);
  --stroke-focus: #007F3D;
  --stroke-brand: rgba(0, 127, 61, 0.20);
  --stroke-error: rgba(199, 58, 58, 0.80);

  /* Typography (Practical UI mobile mode) */
  --font-ui: "Hind Siliguri", system-ui, sans-serif; /* Naeem 2026-11-22: one family for Bangla and English. OFL, Indian Type Foundry */
  --weight-regular: 400;
  --weight-medium: 500;  /* buttons, chips, labels */
  --weight-strong: 600;  /* headings only */
  --type-h2: 28px;      --lh-h2: 36px;
  --type-h3: 24px;      --lh-h3: 32px;
  --type-h4: 20px;      --lh-h4: 28px;
  --type-small: 16px;   --lh-small: 24px;
  --type-tiny: 14px;    --lh-tiny: 20px;

  /* Spacing (Practical UI scale) */
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-24: 24px;
  --space-32: 32px;
  --screen-margin: 16px; /* ours (F-R5), Practical UI mobile grid uses 32px */
  --grid-margin: 16px;   /* R1-12: one grid. Side margin */
  --grid-gutter: 12px;   /* R1-12: fixed gutter between columns and side by side controls */
  --card-gap: 12px;      /* R1-21: space between separate cards in a list */

  /* Radius */
  --radius-control: 8px;
  --radius-segment: 12px;
  --radius-card: 16px;
  --radius-sheet: 16px;
  --radius-full: 9999px;

  /* Control sizes */
  --size-control: 48px;
  --size-control-lg: 56px;
  --size-control-sm: 32px;
  --size-tag: 32px;
  --size-focus-ring: 4px;
  --size-fab: 56px; /* Material 3 standard FAB, Naeem 2026-11-22 */
  --radius-fab: 999px; /* R1-10: fully round, replaces the 16px corner (Addendum 74) */
  --size-icon-fab: 24px;
  --inset-field-arrow: 12px; /* R1-09: select arrow distance from the right edge */

  /* Motion (ours, Practical UI has none) */
  --duration-fast: 120ms;
  --duration-default: 200ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
}

[data-theme="dark"] {
  --bg-base: #12131A;
  --bg-sunken: #000000;
  --bg-raised: #1D1E26;
  --bg-overlay: #292B33;
  --bg-alternate: #1D1E26;
  --bg-inverse: #FFFFFF;
  --bg-brand: #34D77F;
  --bg-screen: #0B0C10;
  --surface-card: #1D1E26;
  --stroke-card: rgba(255, 255, 255, 0.14);

  --text-strong: #FFFFFF;
  --text-weak: rgba(255, 255, 255, 0.78);
  --text-brand: #34D77F;
  --text-error: #FF9C9C;
  --text-success: #77C7AF;
  --text-warning: #E0BE70;
  --text-info: #7EC0E5;
  --text-disabled: rgba(255, 255, 255, 0.12);
  --text-inverse: rgba(0, 6, 38, 0.90);
  --text-on-action: rgba(0, 6, 38, 0.90);

  --icon-neutral: rgba(255, 255, 255, 0.60);
  --icon-brand: rgba(52, 215, 127, 0.80);
  --icon-error: rgba(255, 156, 156, 0.80);
  --icon-success: rgba(119, 199, 175, 0.80);
  --icon-warning: rgba(224, 190, 112, 0.80);
  --icon-info: rgba(126, 192, 229, 0.80);
  --icon-disabled: rgba(255, 255, 255, 0.12);

  --fill-action: #34D77F;
  --fill-action-hover: #52DD92;
  --fill-action-press: #2CB76C;
  --fill-brand-weak: rgba(52, 215, 127, 0.06);
  --fill-hover: rgba(255, 255, 255, 0.06);
  --fill-press: rgba(255, 255, 255, 0.12);
  --fill-weak: rgba(255, 255, 255, 0.06);
  --fill-disabled: rgba(255, 255, 255, 0.12);
  --fill-selected: #34D77F;
  --fill-error-strong: #FF9C9C;
  --fill-success-strong: #77C7AF;
  --fill-warning-strong: #E0BE70;
  --fill-info-strong: #7EC0E5;
  --fill-error-weak: rgba(255, 156, 156, 0.08);
  --fill-success-weak: rgba(119, 199, 175, 0.08);
  --fill-warning-weak: rgba(224, 190, 112, 0.08);
  --fill-info-weak: rgba(126, 192, 229, 0.08);
  --fill-scrim: rgba(0, 6, 38, 0.90);

  --stroke-strong: rgba(255, 255, 255, 0.60);
  --stroke-weak: rgba(255, 255, 255, 0.12);
  --stroke-focus: #34D77F;
  --stroke-brand: rgba(52, 215, 127, 0.20);
  --stroke-error: rgba(255, 156, 156, 0.80);
}
