/*
 * 360Gyan UI v2: design tokens.
 *
 * Every colour, font, size, radius and shadow used by the new design lives here.
 * Change a value in this file and every page that uses the design picks it up.
 * Loaded on all pages (backend and login) before ui/components.css and theme.css.
 *
 * Naming: --v2-<group>-<name>. Pages and components only ever use these variables,
 * never raw colour codes.
 */

:root {
    /* ------------------------------------------------------------ Font */
    --v2-font: "Lexend", "Segoe UI", system-ui, -apple-system, sans-serif;
    --v2-text-xs: 11px;
    --v2-text-sm: 12.5px;
    --v2-text-md: 13.5px;
    --v2-text-base: 14px;
    --v2-text-lg: 15px;
    --v2-text-xl: 18px;
    --v2-text-2xl: 24px;
    --v2-weight-normal: 400;
    --v2-weight-medium: 500;
    --v2-weight-bold: 600;

    /* ------------------------------------------------------------ Surfaces and text */
    --v2-bg: #f6f6fb;              /* page background */
    --v2-card: #ffffff;            /* cards, panels, inputs */
    --v2-surface-hover: #f4f4fa;   /* hover on white controls */
    --v2-surface-hover-soft: #f7f7fc; /* hover on filter chips */
    --v2-surface-subtle: #fafafd;  /* table headings, quiet areas */
    --v2-surface-sunken: #fbfbfe;  /* empty states, open accordion body */
    --v2-surface-muted: #f0f0f5;   /* grey pills */
    --v2-ink: #1d1f33;             /* main text */
    --v2-ink-soft: #33364f;        /* navigation text */
    --v2-muted: #646882;           /* secondary text */
    --v2-pill-ink: #5d6178;        /* text on grey pills */
    --v2-faint: #8a8ea6;           /* zero counts, placeholders */
    --v2-line: #e6e6f0;            /* borders */
    --v2-line-strong: #c9cbdc;     /* border on hover */
    --v2-input-border: #d6d8e6;    /* login inputs */
    --v2-line-dashed: #cfd1e2;     /* empty-state outline */
    --v2-track: #ececf5;           /* empty part of progress bars */
    --v2-neutral: #9a9db5;         /* fallback subject dot */
    --v2-on-color: #ffffff;        /* text on solid colours */
    --v2-logo-filter: none;                /* logo image (brightened in dark mode) */

    /* ------------------------------------------------------------ Brand */
    --v2-primary: #3a46c9;
    --v2-primary-dark: #2d38a8;
    --v2-primary-darker: #232c88;
    --v2-primary-soft: #eceefd;
    --v2-primary-soft-hover: #dfe2fb;
    --v2-primary-fill: var(--v2-primary);              /* solid fills under white text (buttons, selected chips) */
    --v2-primary-fill-hover: var(--v2-primary-dark);
    --v2-primary-fill-active: var(--v2-primary-darker);
    --v2-brand-tint: #d9dcfb;      /* text on the primary panel (login) */
    --v2-brand-tint-2: #b8bdf0;

    /* ------------------------------------------------------------ Status */
    --v2-good: #167a41;
    --v2-good-solid: #1f8f4e;
    --v2-good-solid-hover: #187a42;
    --v2-good-soft: #e6f6ec;
    --v2-warn: #a4460a;
    --v2-warn-solid: #f5a524;
    --v2-warn-solid-hover: #e3941a;
    --v2-warn-ink: #3d2a00;        /* text on the amber button */
    --v2-warn-soft: #fff1e6;
    --v2-bad: #b42323;
    --v2-bad-solid: #d63a3a;
    --v2-bad-solid-hover: #b82e2e;
    --v2-bad-soft: #fdecec;
    --v2-info: #2453c4;
    --v2-info-solid: #2f6feb;
    --v2-info-solid-hover: #2259c9;
    --v2-info-soft: #e8f0fe;

    /* ------------------------------------------------------------ Score bands (insight pages) */
    --v2-band-low: #e5484d;        /* below 40% */
    --v2-band-mid: #f5a524;        /* 40 to 80% */
    --v2-band-high: #30a46c;       /* above 80% */
    --v2-band-low-soft: #fde3e3;
    --v2-band-mid-soft: #fff1d6;
    --v2-band-high-soft: #ddf3e6;
    --v2-marker: #1d1f33;          /* "whole class" marker on bars */
    --v2-mark-section: #0e8a8a;    /* "section average" marker and legend on performance charts and gauges */

    /* ------------------------------------------------------------ Subject colours (3-letter code on chips) */
    --v2-mat: #2f6feb;
    --v2-sci: #14935a;
    --v2-soc: #d9620f;
    --v2-eng: #8a4fe0;
    --v2-kan: #0e8a8a;
    --v2-hin: #cf3468;

    /* ------------------------------------------------------------ Accent palette (dashboard tiles, count chips) */
    --v2-accent-1: #3a46c9; --v2-accent-1-soft: #eceefd;
    --v2-accent-2: #d9620f; --v2-accent-2-soft: #fdf0e6;
    --v2-accent-3: #14935a; --v2-accent-3-soft: #e5f6ee;
    --v2-accent-4: #8a4fe0; --v2-accent-4-soft: #f2ebfd;
    --v2-accent-5: #0e8a8a; --v2-accent-5-soft: #e3f5f5;
    --v2-accent-6: #cf3468; --v2-accent-6-soft: #fceaf0;
    --v2-accent-7: #2f6feb; --v2-accent-7-soft: #eaf1fe;
    --v2-accent-8: #b7791f; --v2-accent-8-soft: #fdf5e3;

    /* Lesson plan count chips: background / text */
    --v2-count-assets-bg: #e8f0fe;       --v2-count-assets-fg: #1f56c6;
    --v2-count-activities-bg: #fff1e6;   --v2-count-activities-fg: #a4460a;
    --v2-count-assignments-bg: #f2ebfd;  --v2-count-assignments-fg: #6b35b8;
    --v2-count-questions-bg: #e6f6ec;    --v2-count-questions-fg: #167a41;
    --v2-count-interactions-bg: #fceaf0; --v2-count-interactions-fg: #b0234f;
    --v2-count-zero-bg: #f2f2f6;         --v2-count-zero-fg: #8a8ea6;

    /* ------------------------------------------------------------ Shape */
    --v2-radius-xs: 6px;
    --v2-radius-sm: 8px;
    --v2-radius: 14px;             /* cards */
    --v2-radius-md: 10px;          /* inputs, buttons */
    --v2-radius-lg: 12px;          /* tiles, menus */
    --v2-radius-xl: 16px;          /* modals */
    --v2-radius-pill: 999px;

    /* ------------------------------------------------------------ Elevation */
    --v2-shadow-sm: 0 1px 2px rgba(29, 31, 51, .06);
    --v2-shadow-menu: 0 10px 30px rgba(29, 31, 51, .12);
    --v2-shadow-drawer: 0 0 40px rgba(29, 31, 51, .2);
    --v2-overlay: rgba(29, 31, 51, .35);
    --v2-focus-ring: 0 0 0 3px var(--v2-primary-soft);
    --v2-focus-outline: 3px solid var(--v2-primary);

    /* ------------------------------------------------------------ Buttons */
    --v2-btn-radius: 10px;
    --v2-btn-font-size: 13.5px;
    --v2-btn-height: 40px;
    --v2-btn-padding: 0 16px;
    --v2-btn-height-sm: 32px;
    --v2-btn-padding-sm: 0 12px;
    --v2-btn-font-size-sm: 12.5px;
    --v2-btn-height-lg: 46px;
    --v2-btn-padding-lg: 0 22px;
    --v2-btn-font-size-lg: 14.5px;
    --v2-btn-gap: 8px;
    --v2-btn-shadow: 0 1px 2px rgba(29, 31, 51, .08);
    --v2-btn-shadow-solid: 0 1px 2px rgba(29, 31, 51, .12), inset 0 1px 0 rgba(255, 255, 255, .12);
    --v2-btn-transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .05s ease;

    /* ------------------------------------------------------------ Layout */
    --v2-side-w: 248px;
    --v2-top-h: 64px;

    /* ------------------------------------------------------------ Older page parts
     * Colours used by the older rules in ui/base.css (moved here from style.css / style2.css / custom.css).
     * Most of these are drawn over by components.css / bridge.css on the redesigned pages. */
    /* Shadows (black at low opacity, used inside box-shadow / filter) */
    --v2-shade-faintest: rgba(0, 0, 0, .04); /* sidebar, header, fly-out menus */
    --v2-shade-faint: rgba(0, 0, 0, .05);   /* cards, dropdown menus, search box */
    --v2-shade-light: rgba(0, 0, 0, .1);    /* stat icons, Select2 chips */
    --v2-shade-medium: rgba(0, 0, 0, .15);  /* ID cards, certificates, flash cards */
    --v2-shade-strong: rgba(0, 0, 0, .25);  /* ID card photo */
    --v2-shade-heavy: rgba(0, 0, 0, .45);   /* inline <code> */
    --v2-shade-soft: rgba(0, 0, 0, .08);    /* chat bubbles */
    --v2-shade-dark: rgba(0, 0, 0, .2);     /* copy / retry buttons, switch knob */
    --v2-shade-deep: rgba(0, 0, 0, .3);     /* tooltips, raised panels */
    --v2-shade-cool-faint: rgba(76, 87, 125, .02); /* search suggestions */
    /* Focus glow */
    --v2-focus-glow: rgba(10, 175, 255, .35); /* older inputs and textareas */
    --v2-focus-glow-soft: rgba(16, 108, 255, .12); /* table action dropdown button */
    /* Frosted (see-through white) surfaces */
    --v2-glass: rgba(255, 255, 255, .5);    /* sidebar, header when scrolled */
    --v2-glass-light: rgba(255, 255, 255, .35); /* footer */
    --v2-glass-header: rgb(218 214 238 / 82%); /* top header */
    --v2-glass-card: #fcfcffd1;             /* older cards (.ot-card) */
    --v2-glass-input: #ffffffbf;            /* older inputs (.ot-input) */
    --v2-glass-auth: #ffffff87;             /* login form panel */
    --v2-glass-picker: #ffffffb5;           /* class / subject / section buttons */
    --v2-glass-modal: rgba(255, 255, 255, .4); /* modal backdrop */
    --v2-modal-tint: rgba(105, 120, 160, .16); /* modal backdrop tint */
    --v2-body-tint: #b2aced33;              /* page background under the old theme */
    /* Lines */
    --v2-shell-edge: #b0ceff54;             /* header and sidebar edge */
    --v2-sidebar-head-line: #e6edef;        /* line under the sidebar logo */
    --v2-modal-head-line: #ebe9f1;          /* line under modal titles */
    --v2-card-head-line: #d6d6d6;           /* line under card headers */
    --v2-table-grid-line: #989898;          /* Bootstrap table borders */
    --v2-tabs-line: #a5a5a5;                /* Bootstrap tab borders */
    --v2-tabs-hover-line: #b9babb;          /* tab border on hover */
    --v2-rule-line: #cdcece;                /* <hr> */
    --v2-picker-line: #c8cef5;              /* class / subject / section buttons */
    --v2-select-underline: rgba(130, 139, 178, .3); /* nice-select underline */
    --v2-roles-line: #e9e9ef;               /* role / permission boxes */
    --v2-summary-line: rgba(205, 205, 205, .2); /* dashboard summary boxes */
    --v2-visibility-box-line: #cacaca;      /* card visibility box */
    --v2-visibility-box-divider: #f0f0f0;   /* card visibility box rows */
    --v2-email-footer-line: #dfe6e9;        /* email preview footer */
    /* Text */
    --v2-summary-ink: #585858;              /* dashboard summary box numbers */
    --v2-alert-ink: #4b4b4b;                /* alert section text */
    --v2-textarea-ink: #5e6278;             /* textarea text */
    --v2-primary-btn-ink: #415094;          /* .primary-btn text */
    --v2-select-chosen-ink: #dde1ff;        /* Select2 chosen value */
    --v2-slider-arrow: #0f0f0f;             /* carousel arrows */
    --v2-text-lightblue: #6da5ff;           /* .color-lightblue */
    --v2-text-green: #19cf7d;               /* .color-green */
    --v2-suggestion-hover: #5b58ff;         /* search suggestion on hover */
    /* Small surfaces */
    --v2-code-bg: #ecf7ff;                  /* inline <code> */
    --v2-bg-light: #e6edef;                 /* .bg-light */
    --v2-sidebar-head-bg: #edfaff;          /* sidebar logo area (narrow sidebar, RTL) */
    --v2-search-focus-outline: #eef0ff;     /* header search box focus */
    --v2-scroll-thumb: rgba(35, 180, 220, .1); /* scrollbar thumb */
    --v2-button-group-hover: #a1a9ff34;     /* button group on hover */
    --v2-modal-close-bg: #f3f6f9;           /* modal close button */
    --v2-close-icon-bg: #ff000099;          /* red close icon */
    --v2-tag-remove-bg: rgba(118, 118, 118, .1); /* tag input remove button */
    --v2-btn-cancel-bg: rgba(4, 82, 204, .1); /* .ot-btn-cancel */
    --v2-event-icon-bg: rgba(57, 44, 125, .1); /* upcoming event icon */
    --v2-theme-menu-bg: #000;               /* theme switch menu item */
    --v2-switch-knob: #e7e6e6;              /* toggle switch knob */
    --v2-switch-knob-line: #c1c1c1;         /* toggle switch knob border */
    /* Sidebar menu (older markup) */
    --v2-menu-bullet: #6f767e;              /* dot before menu items */
    --v2-menu-active-bg: rgba(115, 218, 255, .3); /* open menu item */
    --v2-menu-active-sub-bg: rgba(115, 218, 255, .12); /* open sub-menu */
    --v2-menu-active-edge: #6b9ffb;         /* edge of the open menu item */
    /* Badges (.badge-basic-*, .ot-badge) */
    --v2-badge-basic-success-bg: rgba(41, 214, 151, .1);
    --v2-badge-basic-danger-bg: rgba(255, 106, 84, .1);
    --v2-badge-basic-warning-bg: rgba(255, 153, 26, .1);
    --v2-badge-basic-info-bg: rgba(0, 223, 229, .1);
    --v2-badge-basic-info-bg-solid: #e5feff; /* fallback under the info tint */
    --v2-badge-basic-info-ink: #00dfe5;
    --v2-badge-basic-primary-bg: #eef0ff;
    --v2-badge-basic-primary-bg-solid: rgb(86, 105, 255); /* background-color under the primary tint */
    --v2-badge-basic-secondary-bg: rgba(136, 137, 138, .1);
    --v2-badge-basic-secondary-ink: #858a88;
    --v2-badge-green-ink: #7ab668;          /* .ot-badge.primary text */
    /* Bootstrap background helpers (.bg-*) */
    --v2-fill-secondary: #373534;           /* .bg-secondary */
    --v2-fill-success: #3cc13b;             /* .bg-success */
    --v2-fill-danger: #d22d3d;              /* .bg-danger */
    --v2-fill-info: #717171;                /* .bg-info */
    --v2-fill-dark: #2c323f;                /* .bg-dark */
    --v2-fill-warning: #e2c636;             /* .bg-warning */
    /* Gradients: older buttons, check boxes, stat icons, coloured page backgrounds */
    --v2-checkbox-on-start: #392c7d;        /* ticked check box / radio */
    --v2-checkbox-on-end: #314cad;
    --v2-btn-warning-start: rgb(231, 197, 6); /* .ot-btn-warning */
    --v2-btn-warning-end: rgb(255, 251, 0);
    --v2-btn-success-start: rgb(66, 231, 6); /* .ot-btn-success */
    --v2-btn-success-end: rgb(68, 255, 0);
    --v2-btn-secondary-start: rgb(60, 61, 59); /* .ot-btn-secondary */
    --v2-btn-secondary-end: rgb(80, 80, 80);
    --v2-btn-info-start: rgb(47, 194, 216); /* .ot-btn-info */
    --v2-btn-info-end: rgb(0, 221, 255);
    --v2-btn-danger-start: rgb(148, 63, 63); /* .ot-btn-danger */
    --v2-search-icon-start: #8e2de2;        /* header search icon */
    --v2-stat-icon-1: #c6b1ff;              /* dashboard summary icon */
    --v2-stat-icon-2-start: #ffb657;        /* .icon.style2 */
    --v2-stat-icon-2-end: #fd8b55;
    --v2-stat-icon-3-start: #d7b3ff;        /* .icon.style3 */
    --v2-stat-icon-3-end: #7b0cf2;
    --v2-stat-icon-4-start: #2fb5ff;        /* .icon.style4 */
    --v2-stat-icon-4-end: #6bd1f5;
    --v2-page-bg-1-start: #3c32ffdf;        /* .bg-colour1 to .bg-colour7 (bridge.css paints the page plain) */
    --v2-page-bg-1-end: #4ca3ffcc;
    --v2-page-bg-2-start: #d7892e;
    --v2-page-bg-2-end: #fd975e;
    --v2-page-bg-4-start: #ee47dd;
    --v2-page-bg-5-start: #8959a8;
    --v2-page-bg-5-end: #e06b6b;
    --v2-page-bg-6-start: #0f5f7a;
    --v2-page-bg-6-end: #11998e;
    --v2-page-bg-7-start: #c00543;
    --v2-page-bg-7-end: #ff1198;
    --v2-deco-circle-1: rgba(255, 255, 255, .25); /* decorative circles on coloured backgrounds */
    --v2-deco-circle-2: rgba(255, 255, 255, .18);
    --v2-deco-circle-3: rgba(255, 255, 255, .15);
    --v2-deco-circle-4: rgba(255, 255, 255, .12);
    /* ID cards and certificates */
    --v2-idcard-ink: #003249;               /* ID card text */
    --v2-certificate-ink: #15344d;          /* certificate headings */
    --v2-certificate-muted: #939393;        /* certificate description */
    /* Hold-to-confirm button (.button-hold) */
    --v2-hold-btn-ink: #f6f8ff;
    --v2-hold-btn-bg: #2b3044;
    --v2-hold-btn-ring: #646b8c;
    --v2-hold-btn-done: #5c86ff;
    --v2-hold-btn-shadow: rgba(0, 9, 61, .2);
    /* Chat windows (css/chatbot.css: student AI tutor, css/ai.css: AI pages) */
    --v2-chat-subtitle: #777;               /* line under the chat title */
    --v2-chat-mode-label: #666;             /* teacher mode label */
    --v2-chat-tool-bg: #f0f0f0;             /* top bar buttons */
    --v2-chat-tool-bg-hover: #e7e7e7;
    --v2-chat-tool-ink: #222;
    --v2-chat-image-line: #afa2a2;          /* border round attached images */
    --v2-chat-user-bubble: #392c7d;         /* student message */
    --v2-chat-bot-bubble: #f4f5f7;          /* tutor message */
    --v2-chat-bot-ink: #111;
    --v2-chat-typing-dot: #bbb6b6;          /* "typing" dots */
    --v2-chat-input-line: #eee;             /* line above the message box */
    --v2-chat-remove-bg: #ff3b30;           /* remove attached image */
    --v2-chat-code-bg: #e8e8e8;             /* inline code in replies */
    --v2-chat-pre-bg: #1e1e1e;              /* code blocks in replies */
    --v2-chat-toggle-off: #d1d5db;          /* mode switch, off */
    --v2-chat-toggle-on: #00050a;           /* mode switch, on */
    --v2-ai-user-bubble: #0d6efd;           /* question bubble on the AI pages */
    --v2-ai-bot-bubble: #f5f5f5;            /* answer bubble, table headings */
    --v2-ai-bot-ink: #222;
    --v2-ai-loading-dot: #888;
    --v2-ai-table-line: #ccc;               /* tables in answers */
    --v2-ai-section-bg: #f9f9f9;            /* answer sections */
    --v2-ai-section-title: #333;
    --v2-ai-suggest-bg: #eef2ff;            /* "enhance prompt" suggestion */
    --v2-ai-suggest-bg-hover: #e5edff;
    --v2-ai-suggest-line: #dbe4ff;
    --v2-ai-overlay-btn: rgba(0, 0, 0, .45); /* copy / retry buttons over an answer */
    --v2-ai-overlay-btn-hover: rgba(0, 0, 0, .65);
    --v2-ai-copied: #4ade80;                /* copy button after copying */
    /* Assessment filter buttons (css/assessmentButtons.css) */
    --v2-qfilter-glow: rgba(138, 131, 240, .12); /* button shadow */
    --v2-qfilter-active: #36388f;           /* selected class / subject button */
    --v2-qfilter-accent: #353e98;           /* subject icon, tabs */
    --v2-qfilter-ink: #333;                 /* labels */
    --v2-qfilter-disabled: rgb(196, 188, 188); /* subject icon when not available */
    --v2-qfilter-scroll-thumb: rgba(0, 0, 0, .12);
    /* Gauges and range bars (css/bars.css, css/gauge.css, css/halfgauge.css) */
    --v2-gauge-range-grey: rgb(171, 168, 168); /* .range.gray */
    --v2-gauge-divider: rgb(219, 210, 210);
    --v2-gauge-tick: rgb(197, 195, 195);
    --v2-gauge-bar-dark: rgb(143, 134, 134); /* .dark-gray-bar */
    /* Small overlays on solid colour */
    --v2-btn-group-divider: rgba(255, 255, 255, .35); /* line between joined solid buttons */
    --v2-auth-chip-bg: rgba(255, 255, 255, .12); /* subject chips on the login panel */

    /* ------------------------------------------------------------ Page colours
     * Colours that pages set in their own <style> blocks, inline styles and script-built HTML. */
    /* Thinking levels and learning outcome type (icons and labels on lesson plan, interactions, reports) */
    --v2-level-remember: purple;
    --v2-level-understand: blue;
    --v2-level-apply: #107b70;
    --v2-level-analyze: deeppink;
    --v2-level-evaluate: darkorange;
    --v2-level-create: brown;
    --v2-activity-based: #fc5306;           /* "Activity based" learning outcome */
    /* Performance reports */
    --v2-report-highlight: rgb(243, 117, 15); /* student's own figures, below-average figures */
    --v2-report-student-ink: rgb(6, 10, 6); /* "student average" legend and values */
    --v2-report-section-mark: #03faf6;      /* section average on the learning outcome report */
    --v2-report-neutral: #d4d4d4;           /* unselected filter buttons, legend dot */
    --v2-report-neutral-ink: #000;
    --v2-report-dot-grey: #b0b0b0;          /* grey legend dot */
    --v2-answer-correct-ink: blue;          /* correct option in answer review */
    --v2-gauge-track: lightgray;            /* empty part of the range bars */
    --v2-gauge-bar-mid: rgb(163, 160, 160);
    --v2-gauge-card-glass: #ffffffba;       /* gauge card */
    /* Activity rubric ratings */
    --v2-rating-good: lightgreen;           /* "Good" */
    --v2-rating-fair: yellow;               /* "Fair" */
    --v2-rating-none: gray;                 /* "Not available" */
    /* Page parts in views */
    --v2-card-cap-bg: rgba(0, 0, 0, .03);   /* header of the in-page cards (.gyanCard-header) */
    --v2-break-column-bg: rgb(0 0 0 / 5%);  /* break column in time tables */
    --v2-routine-bg: #ececec;               /* class routine / attendance box */
    --v2-routine-head-ink: #d6d6d6;
    --v2-marked-bg: #6b6b6b;                /* marked cell in report tables */
    --v2-tooltip-bg: rgba(52, 58, 64, .95); /* dark tooltips on lesson structure / interactions */
    --v2-backdrop-light: rgba(0, 0, 0, .25); /* click blocker */
    --v2-backdrop: rgba(0, 0, 0, .4);       /* loading overlay */
    --v2-backdrop-strong: rgba(0, 0, 0, .5); /* image viewer overlay */
    --v2-backdrop-heavy: rgba(0, 0, 0, .55); /* upload / log overlays */
    --v2-glass-strong: rgba(255, 255, 255, .6); /* text boxes over answer sheets */
    --v2-textbox-line: #ccc;                /* text boxes over answer sheets */
    --v2-answer-right-bg: #0c8940;          /* correct MCQ option when entering marks */
    --v2-answer-wrong-bg: #be1929;          /* wrong MCQ option when entering marks */
    --v2-recording: rgb(190, 6, 6);         /* record button while recording */
    --v2-search-match-bg: #b6c4e0;          /* highlighted search match */
    --v2-image-remove-bg: rgba(255, 0, 0, .9); /* red remove button on attached images */
    --v2-exam-secondary-btn-bg: #989795;    /* grey buttons on the online exam page */
    --v2-exam-legend-dot: #84837e;
    --v2-toast-good-ink: #155724;           /* "submitted" toast */
    --v2-drop-zone-bg: #f0f8ff;             /* drag-and-drop area */
    --v2-chat-launcher-shadow: rgba(57, 44, 125, .35); /* floating tutor button */
    /* Voice tutor (student-panel/StudentPerformances/sarvam) */
    --v2-voice-scrollbar: #ccc;
    --v2-voice-bot-bubble: #f1f3f5;
    --v2-voice-bubble-shadow: rgb(202, 198, 198);
    --v2-voice-header-end: #6c5ce7;         /* end of the header gradient */
    /* Fee payment (common/fee-pay, student-panel/payment) */
    --v2-pay-accent: #2260ff;               /* selected payment method */
    --v2-pay-accent-ring: #b5c9fc;
    --v2-pay-tile-line: #b5bfd9;
    --v2-pay-muted: #707070;
    --v2-pay-input-bg: #fbfbfb;
    --v2-pay-input-bg-dark: #27282e;
    --v2-pay-secondary: #6c757d;
    --v2-stripe-brand: #635bff;             /* Stripe button */
    --v2-stripe-brand-hover: #5d55ff;
    --v2-pay-success: #0a8f51;              /* payment result pages */
    --v2-pay-cancelled: #ec252b;
    --v2-pay-error: #fb2b55;
    --v2-redirect-bg: #f5f7fa;              /* auto-login redirect page */
}

/* ================================================================ Dark mode
 * Switched on by the moon button in the teacher / student header: ui-kit.js sets <html data-theme="dark"> and remembers
 * the choice in this browser (localStorage "v2-theme"); partials/v2-theme-init.blade.php applies it before the page paints.
 * Only tokens that would look wrong on a dark page are redefined here; every other token keeps its light value. */

:root[data-theme="dark"] {
    color-scheme: dark;

    /* Surfaces and text */
    --v2-bg: #12131b;
    --v2-card: #1b1d29;
    --v2-surface-hover: #252838;
    --v2-surface-hover-soft: #222534;
    --v2-surface-subtle: #20222f;
    --v2-surface-sunken: #171923;
    --v2-surface-muted: #2a2d3d;
    --v2-ink: #e7e8f2;
    --v2-ink-soft: #cdd0e1;
    --v2-muted: #a2a6bf;
    --v2-pill-ink: #b6b9cd;
    --v2-faint: #80859f;                 /* 4.6:1 on cards */
    --v2-line: #2f3245;
    --v2-line-strong: #454a62;
    --v2-input-border: #3b3f56;
    --v2-line-dashed: #3e4258;
    --v2-track: #2d3043;
    --v2-neutral: #70748f;

    /* Brand: --v2-primary is lighter so it reads as text / links on dark surfaces; solid fills under white text
     * use the deeper --v2-primary-fill (no single colour passes 4.5:1 both against white and against the dark cards) */
    --v2-primary: #6470ec;
    --v2-primary-dark: #7a85f0;
    --v2-primary-darker: #929bf3;
    --v2-primary-soft: #262a50;
    --v2-primary-soft-hover: #30355f;
    --v2-primary-fill: #5562e3;          /* deeper than --v2-primary: white text 4.95:1 */
    --v2-primary-fill-hover: #5a66e6;    /* 4.69:1 */
    --v2-primary-fill-active: #4f5bdc;   /* 5.44:1 */

    /* Status */
    --v2-good: #5fd394;
    --v2-good-soft: #163324;
    --v2-warn: #f3a866;
    --v2-warn-ink: #2b1d00;
    --v2-warn-soft: #3a2916;
    --v2-bad: #ff8585;
    --v2-bad-soft: #3c1e22;
    --v2-info: #82aaff;
    --v2-info-soft: #1c2945;

    /* Score bands */
    --v2-band-low-soft: #3c1e22;
    --v2-band-mid-soft: #3a3017;
    --v2-band-high-soft: #163324;
    --v2-marker: #e7e8f2;
    --v2-mark-section: #33c4c4;

    /* Subjects and accents: soft backgrounds become dark tints */
    --v2-mat: #5b8ff2;
    --v2-sci: #33b277;
    --v2-eng: #a57af0;
    --v2-kan: #2fb0b0;
    --v2-hin: #e65a8a;
    --v2-accent-1-soft: #262a50;
    --v2-accent-2-soft: #3a2616;
    --v2-accent-3-soft: #15321f;
    --v2-accent-4-soft: #2c2245;
    --v2-accent-5-soft: #133232;
    --v2-accent-6-soft: #3a1c28;
    --v2-accent-7-soft: #1c2945;
    --v2-accent-8-soft: #352a14;
    --v2-count-assets-bg: #1c2945;       --v2-count-assets-fg: #8cb2ff;
    --v2-count-activities-bg: #3a2916;   --v2-count-activities-fg: #f3a866;
    --v2-count-assignments-bg: #2c2245;  --v2-count-assignments-fg: #b996f5;
    --v2-count-questions-bg: #163324;    --v2-count-questions-fg: #5fd394;
    --v2-count-interactions-bg: #3a1c28; --v2-count-interactions-fg: #f27aa0;
    --v2-count-zero-bg: #252838;         --v2-count-zero-fg: #7d819b;

    /* Shadows and overlays */
    --v2-shadow-sm: 0 1px 2px rgba(0, 0, 0, .45);
    --v2-shadow-menu: 0 10px 30px rgba(0, 0, 0, .55);
    --v2-shadow-drawer: 0 0 40px rgba(0, 0, 0, .6);
    --v2-overlay: rgba(0, 0, 0, .6);
    --v2-btn-shadow: 0 1px 2px rgba(0, 0, 0, .4);

    /* Older page parts drawn as light surfaces */
    --v2-glass: rgba(27, 29, 41, .6);
    --v2-glass-light: rgba(27, 29, 41, .5);
    --v2-glass-header: rgb(27 29 41 / 90%);
    --v2-glass-card: #1b1d29d9;
    --v2-glass-input: #1b1d29bf;
    --v2-glass-auth: #1b1d2999;
    --v2-glass-picker: #1b1d29b5;
    --v2-glass-modal: rgba(0, 0, 0, .45);
    --v2-body-tint: #12131b;
    --v2-shell-edge: #2f3245;
    --v2-sidebar-head-line: #2f3245;
    --v2-modal-head-line: #2f3245;
    --v2-card-head-line: #2f3245;
    --v2-table-grid-line: #3b3f56;
    --v2-tabs-line: #3b3f56;
    --v2-tabs-hover-line: #454a62;
    --v2-rule-line: #2f3245;
    --v2-picker-line: #3b3f56;
    --v2-roles-line: #2f3245;
    --v2-visibility-box-line: #3b3f56;
    --v2-visibility-box-divider: #2f3245;
    --v2-summary-ink: #cdd0e1;
    --v2-alert-ink: #cdd0e1;
    --v2-textarea-ink: #e7e8f2;
    --v2-primary-btn-ink: #929bf3;
    --v2-slider-arrow: #e7e8f2;
    --v2-code-bg: #20222f;
    --v2-bg-light: #20222f;
    --v2-sidebar-head-bg: #1b1d29;
    --v2-search-focus-outline: #262a50;
    --v2-modal-close-bg: #252838;
    --v2-switch-knob: #454a62;
    --v2-badge-basic-primary-bg: #262a50;
    --v2-badge-basic-info-bg-solid: #133232;
    --v2-theme-menu-bg: #20222f;
    --v2-logo-filter: brightness(1.9) saturate(1.15); /* lighter blue / purple logo on the dark sidebar */

    /* Chat windows, AI pages, assessment filter buttons */
    --v2-chat-subtitle: #a2a6bf;
    --v2-chat-mode-label: #a2a6bf;
    --v2-chat-tool-bg: #252838;
    --v2-chat-tool-bg-hover: #2f3245;
    --v2-chat-tool-ink: #e7e8f2;
    --v2-chat-bot-bubble: #252838;
    --v2-chat-bot-ink: #e7e8f2;
    --v2-chat-input-line: #2f3245;
    --v2-chat-code-bg: #2f3245;
    --v2-chat-toggle-off: #454a62;
    --v2-chat-toggle-on: #6470ec;
    --v2-ai-bot-bubble: #252838;
    --v2-ai-bot-ink: #e7e8f2;
    --v2-ai-table-line: #3b3f56;
    --v2-ai-section-bg: #20222f;
    --v2-ai-section-title: #e7e8f2;
    --v2-ai-suggest-bg: #262a50;
    --v2-ai-suggest-bg-hover: #30355f;
    --v2-ai-suggest-line: #3b3f78;
    --v2-qfilter-ink: #cdd0e1;
    --v2-qfilter-accent: #929bf3;

    /* Page colours: dark text and light fills that would vanish on a dark page */
    --v2-level-remember: #c58af5;
    --v2-level-understand: #7aa7ff;
    --v2-level-apply: #3cc0b0;
    --v2-level-analyze: #ff6bb5;
    --v2-level-evaluate: #ffa246;
    --v2-level-create: #d99467;
    --v2-activity-based: #ff7a3d;
    --v2-answer-correct-ink: #7aa7ff;
    --v2-report-student-ink: #e7e8f2;
    --v2-report-neutral: #2f3245;
    --v2-report-neutral-ink: #e7e8f2;
    --v2-gauge-card-glass: #1b1d29ba;
    --v2-gauge-track: #2d3043;
    --v2-card-cap-bg: rgba(255, 255, 255, .03);
    --v2-break-column-bg: rgba(255, 255, 255, .05);
    --v2-routine-bg: #20222f;
    --v2-routine-head-ink: #a2a6bf;
    --v2-drop-zone-bg: #1c2945;
    --v2-search-match-bg: #30355f;
    --v2-toast-good-ink: #5fd394;
    --v2-voice-bot-bubble: #252838;
    --v2-voice-bubble-shadow: rgba(0, 0, 0, .4);
    --v2-voice-scrollbar: #454a62;
    --v2-glass-strong: rgba(27, 29, 41, .75);
    --v2-textbox-line: #454a62;
}
