﻿/* ============================================================================================
   tokens.css - the one place where the colours, sizes and radius of the portal are named.
   Values below are the CURRENT Chandigarh look (purple), copied from the existing css, so loading this file changes nothing by itself.
   New css must use these tokens (var(--ui-...)) and not write hex colours. The old variable sets (--sv-*, --sal-*, --mis-*, form.css / admin.css)
   are moved onto these tokens one module at a time; each of those keeps its own current value until then.
   Another state (Goa = green) only needs a different set of values for the same names, e.g. :root[data-theme="goa"] { ... },
   later read from the database (Default State) and written into a <style> block of the layout.
   ============================================================================================ */
:root {
    /* brand */
    --ui-primary:          #2b1a63;   /* buttons, links, active items (form.css --blue-600, survey --sv-accent) */
    --ui-primary-dark:     #1d1042;   /* hover / pressed (survey --sv-accent-dark) */
    --ui-primary-deep:     var(--ui-primary);   /* headers, table head (MIS --mis-primary) */
    --ui-primary-light:    #5b3fb0;   /* start of the button gradient */
    --ui-primary-end:      #33206f;   /* end stop of the button gradient */
    --ui-primary-soft:     #ede9f9;   /* light tint: selected row, chips (MIS --mis-primary-light) */
    --ui-primary-mid:      #c5bde0;   /* borders of tinted blocks (MIS --mis-primary-mid) */
    --ui-primary-ring:     color-mix(in srgb, var(--ui-primary, #2b1a63) 18%, transparent);   /* focus ring */
    --ui-accent:           #4a3490;   /* secondary accent (form.css --blue-500) */
    --ui-gold:             #f8b940;   /* highlight (form.css --gold-500) */
    --ui-icon-soft:        #8f77d8;   /* light icon colour (login field icons) */

    /* page and cards */
    --ui-bg:               #f7f6fc;   /* page / field background */
    --ui-surface:          #ffffff;   /* cards, tables, modals */
    --ui-surface-alt:      #f7f5fd;   /* zebra row (survey --sv-row-alt) */
    --ui-surface-hover:    #eee9fb;   /* row hover (survey --sv-row-hover) */
    --ui-head-bg:          var(--ui-primary-soft);   /* card / section heading: same tint as selected rows (was #e8e4f5 in form.css) */
    --ui-head-ink:         var(--ui-primary);   /* card title, table head text: same colour as buttons and the selected menu item */   /* text on that heading */
    --ui-head-line:        #cbc2e8;

    /* menu (sidebar / top menu): one rule for every item */
    --ui-menu-ink:         #1f1a3d;
    --ui-menu-icon:        #6f6a8f;
    --ui-menu-active-ink:  var(--ui-primary);   /* text and icon of the open / current item */
    --ui-menu-active-bg:   #ede9f9;
    --ui-menu-idle:        #3c2c6f;   /* idle item: icon AND text in this one colour, lighter than the selected item */
    --ui-menu-idle:        color-mix(in srgb, var(--ui-primary) 92%, #ffffff);   /* same, follows the theme colour where supported */

    /* text */
    --ui-ink:              #1f1a3d;
    --ui-ink-2:            #443f66;
    --ui-muted:            #6f6a8f;
    --ui-ink-on-primary:   #ffffff;

    /* lines */
    --ui-line:             #ddd8ee;
    --ui-line-soft:        #ece9f6;

    /* status */
    --ui-success:          #12a05c;
    --ui-success-ink:      #166534;
    --ui-success-bg:       #dcfce7;
    --ui-danger:           #d4343f;
    --ui-danger-ink:       #991b1b;
    --ui-danger-bg:        #fee2e2;
    --ui-warning:          #b7791f;
    --ui-warning-ink:      #92400e;
    --ui-warning-bg:       #fef3c7;
    --ui-info-ink:         #1e3a8a;
    --ui-info-bg:          #dbeafe;

    /* controls (inputs, selects, buttons share these so they line up in a row) */
    --ui-control-h:        36px;
    --ui-control-h-sm:     30px;
    --ui-control-h-touch:  44px;      /* on phones (form.css already uses 44px) */
    --ui-radius:           8px;       /* controls (form.css --r) */
    --ui-radius-card:      14px;      /* cards (form.css --radius) */
    --ui-font-size:        13.5px;
    --ui-shadow-1:         0 1px 2px color-mix(in srgb, var(--ui-primary, #2b1a63) 6%, transparent), 0 6px 18px color-mix(in srgb, var(--ui-primary, #2b1a63) 6%, transparent);
    --ui-shadow-2:         0 2px 4px color-mix(in srgb, var(--ui-primary, #2b1a63) 6%, transparent), 0 18px 44px color-mix(in srgb, var(--ui-primary, #2b1a63) 12%, transparent);

    /* buttons: one set for the whole portal (buttons.css will read only these) */
    --ui-btn-bg:           var(--ui-primary);
    --ui-btn-bg-hover:     var(--ui-primary-dark);
    --ui-btn-ink:          var(--ui-ink-on-primary);
    --ui-btn-gradient:     linear-gradient(135deg, var(--ui-primary-light) 0%, var(--ui-primary) 55%, var(--ui-primary-end) 100%);   /* the look of the form "Next" button, in the theme colour */
    --ui-btn-shadow:       0 6px 14px color-mix(in srgb, var(--ui-primary, #2b1a63) 32%, transparent);
    --ui-btn-shadow-hover: 0 9px 20px color-mix(in srgb, var(--ui-primary, #2b1a63) 42%, transparent);
    --ui-btn-danger-gradient:  linear-gradient(135deg, #e5545d 0%, #d4343f 55%, #b42d37 100%);
    --ui-btn-danger-shadow:    0 6px 14px rgba(212, 52, 63, .30);
    --ui-btn-success-gradient: linear-gradient(135deg, #2fbf7e 0%, #12a05c 55%, #0e864d 100%);
    --ui-btn-success-shadow:   0 6px 14px rgba(18, 160, 92, .30);
    --ui-btn-danger-shadow-hover:  0 9px 20px rgba(212, 52, 63, .40);
    --ui-btn-success-shadow-hover: 0 9px 20px rgba(18, 160, 92, .40);
    --ui-btn-secondary-bg: #ffffff;
    --ui-btn-secondary-bg-hover: color-mix(in srgb, var(--ui-primary, #2b1a63) 16%, #ffffff);   /* hover of every white / outline button: a deeper tint of the theme colour (follows the state theme) */
    --ui-btn-secondary-ink: var(--ui-primary);
    --ui-btn-secondary-line: var(--ui-primary-mid);
    --ui-btn-danger-bg:    var(--ui-danger);
    --ui-btn-danger-bg-hover: #b42d37;
    --ui-btn-success-bg:   var(--ui-success);
    --ui-btn-success-bg-hover: #0e864d;
    --ui-btn-h:            var(--ui-control-h);
    --ui-btn-h-sm:         var(--ui-control-h-sm);
    --ui-btn-pad:          0 18px;
    --ui-btn-pad-sm:       0 12px;

    /* tables */
    --ui-th-bg:            var(--ui-head-bg);     /* every table head: same tint + ink as the card heading */
    --ui-th-ink:           var(--ui-head-ink);
    --ui-th-line:          var(--ui-primary-mid);
    --ui-table-line:       #eeecf2;
    --ui-table-section-line: #c5bde0;   /* 3px divider between column groups (MIS) */

    /* MIS total / sub-total rows: APPROVED, do not change (docs/Theme/Chandigarh_MIS_TotalRows_LOCKED.md) */
    --ui-total-ps-bg:      #f3f1f9;  --ui-total-ps-ink:    #555;     --ui-total-ps-line:    #d5d0e4;
    --ui-total-div-bg:     #ebe6f2;  --ui-total-div-ink:   #3a3a4a;  --ui-total-div-line:   #c5bde0;
    --ui-total-cat-bg:     #e3deec;  --ui-total-cat-ink:   #222;     --ui-total-cat-line:   #9b8fc4;
    --ui-total-grand-bg:   #dad3e8;  --ui-total-grand-ink: #111;     --ui-total-grand-line: #7c6faa;
    --ui-subrow-bg:        #f7f4ff;
    --ui-subrow-mark:      #7c3aed;

    /* shell (top bar, logo area) and sidebar */
    --ui-shell-bg:         var(--ui-primary);   /* top bar and logo area: the same primary colour */
    --ui-shell-ink:        #ffffff;
    --ui-shell-sub:        #d9d2f1;
    --ui-side-bg:          #f3f0fb;
    --ui-side-line:        #cbc2e8;

    /* brand: logo and name of the state in use (logo as url(), names as css strings; "\A" = line break) */
    --ui-logo:             url("../images/Chandigarh_Police_Logo_New.png");
    --ui-brand-title:      "Chandigarh Police\A We care for you";
    --ui-brand-name:       "Chandigarh Police";
    --ui-login-bg:         url("../images/background-imagess.jpg");   /* photo behind the login / register pages */
    --ui-login-slides:     none;   /* list of photos to cross-fade instead (see theme-goa.css); none = the single photo above */
    --ui-brand-title-size: 11px;      /* text next to the logo in the top-left block */
    --ui-brand-line:       "Chandigarh Police  \00B7  Integrated Citizen & Police Management System";

    /* type scale (use these, not loose px values) */
    --ui-fs-label:         11px;      /* table heads, small captions (uppercase) */
    --ui-fs-body:          13.5px;
    --ui-fs-title:         15px;      /* card / section heading */
    --ui-fs-page:          20px;      /* page title */}

