/*
 * Soft theme - airy cards on a pale canvas, floating dark sidebar, pastel accents.
 * Built from the shared structural rules of cyber-theme.css (colours come from tokens) plus the
 * Soft-specific section at the bottom. Chosen in Settings > Theme (html[data-style="soft"]).
 */

/* ---------- Tokens ---------- */
:root {
    --cy-bg: #efeff2;
    --cy-surface: #ffffff;
    --cy-surface-2: #f6f6f9;
    --cy-border: #e8e8ee;
    --cy-text: #17171c;
    --cy-muted: #686876;
    --cy-accent: #8b7fd4;
    --cy-accent-strong: #7a6dc6;
    --cy-accent-ink: #ffffff;
    --cy-nav: #17171c;
    --cy-nav-2: #26262e;
    --cy-radius: 24px;
    --cy-radius-sm: 14px;
    --cy-shadow: 0 2px 28px rgba(23, 23, 40, .05);
    --cy-blue: #7d9be8;
    --cy-orange: #f0a16b;
    --cy-purple: #8b7fd4;
    --cy-red: #e2616a;
    --cy-green: #2fb67c;
    --cy-lilac: #dcd7f3;
    --cy-peach: #f3e4da;
    color-scheme: light;
}
html[data-theme="dark"] {
    --cy-bg: #0d0d11;
    --cy-surface: #17171d;
    --cy-surface-2: #1f1f28;
    --cy-border: #2b2b36;
    --cy-text: #f1f1f6;
    --cy-muted: #9b9bab;
    --cy-nav: #0a0a0d;
    --cy-nav-2: #26262e;
    --cy-shadow: 0 2px 28px rgba(0, 0, 0, .35);
    --cy-lilac: #2c2842;
    --cy-peach: #2e2622;
    color-scheme: dark;
}

/* ---------- Base ---------- */
html, body, body.tw-bg-gray-100 {
    background-color: var(--cy-bg) !important;
    color: var(--cy-text);
}
/* Fonts come from Settings > Theme (--cy-font / --cy-num-font are written into every page) */
body, body.tw-font-sans, .tw-font-sans { font-family: var(--cy-font, system-ui, sans-serif) !important; }
body { font-weight: var(--cy-w-text, 400); }
h1, h2, h3, h4, h5, h6, .box-title, .modal-title, .content-header > h1, .content-header h1, .cy-widget-head h3 { font-weight: var(--cy-w-heading, 600) !important; }
button, input, select, textarea { font-family: var(--cy-font, system-ui, sans-serif); }
.tw-font-mono { font-family: var(--cy-num-font, var(--cy-font, system-ui, sans-serif)) !important; font-weight: var(--cy-w-num, 600) !important; font-variant-numeric: tabular-nums; }
.display_currency, .price_total, .pos_totals_value, .pos_totals_right_value, input.input_number, td.text-right { font-variant-numeric: tabular-nums; }
a { color: inherit; }
.content-wrapper, .right-side, .wrapper, main.tw-bg-gray-100, .tw-bg-gray-100 { background-color: var(--cy-bg) !important; }
hr, .tw-border-gray-100, .tw-border-gray-200, .tw-border-gray-300, .tw-divide-gray-200 > * { border-color: var(--cy-border) !important; }
.text-muted, .help-block, small.text-muted { color: var(--cy-muted) !important; }
::selection { background: var(--cy-accent); color: var(--cy-accent-ink); }

/* Tailwind utilities used all over the layout, mapped to tokens (works in light and dark) */
.tw-bg-white { background-color: var(--cy-surface) !important; }
.tw-bg-gray-50, .tw-bg-gray-100 { background-color: var(--cy-surface-2) !important; }
.tw-bg-gray-200 { background-color: var(--cy-border) !important; }
.tw-text-gray-900, .tw-text-gray-800, .tw-text-gray-700, .tw-text-black { color: var(--cy-text) !important; }
.tw-text-gray-600, .tw-text-gray-500, .tw-text-gray-400 { color: var(--cy-muted) !important; }
.tw-shadow, .tw-shadow-sm, .tw-shadow-md, .tw-shadow-lg, .tw-shadow-xl { box-shadow: var(--cy-shadow) !important; }
.tw-rounded-xl, .tw-rounded-2xl { border-radius: var(--cy-radius) !important; }
.tw-ring-gray-200, .tw-ring-gray-100 { --tw-ring-color: var(--cy-border) !important; }

/* Pastel icon badges on dashboard cards: translucent so they work on both themes */
[class*="tw-bg-"][class*="-50"]:not(.tw-bg-gray-50):not(.tw-bg-white),
[class*="tw-bg-"][class*="-100"]:not(.tw-bg-gray-100) { --cy-badge: 1; }
html[data-theme="dark"] [class*="tw-bg-blue-"][class*="-50"], html[data-theme="dark"] [class*="tw-bg-blue-"][class*="-100"] { background-color: rgba(91, 141, 239, .16) !important; }
html[data-theme="dark"] [class*="tw-bg-green-"][class*="-50"], html[data-theme="dark"] [class*="tw-bg-green-"][class*="-100"],
html[data-theme="dark"] [class*="tw-bg-emerald-"][class*="-50"] { background-color: rgba(53, 194, 138, .16) !important; }
html[data-theme="dark"] [class*="tw-bg-yellow-"][class*="-50"], html[data-theme="dark"] [class*="tw-bg-yellow-"][class*="-100"],
html[data-theme="dark"] [class*="tw-bg-orange-"][class*="-50"], html[data-theme="dark"] [class*="tw-bg-orange-"][class*="-100"],
html[data-theme="dark"] [class*="tw-bg-amber-"][class*="-50"], html[data-theme="dark"] [class*="tw-bg-amber-"][class*="-100"] { background-color: rgba(245, 158, 66, .16) !important; }
html[data-theme="dark"] [class*="tw-bg-red-"][class*="-50"], html[data-theme="dark"] [class*="tw-bg-red-"][class*="-100"],
html[data-theme="dark"] [class*="tw-bg-rose-"][class*="-50"] { background-color: rgba(239, 91, 91, .16) !important; }
html[data-theme="dark"] [class*="tw-bg-purple-"][class*="-50"], html[data-theme="dark"] [class*="tw-bg-violet-"][class*="-50"],
html[data-theme="dark"] [class*="tw-bg-indigo-"][class*="-50"] { background-color: rgba(165, 107, 245, .16) !important; }
html[data-theme="dark"] [class*="tw-bg-sky-"][class*="-50"], html[data-theme="dark"] [class*="tw-bg-cyan-"][class*="-50"],
html[data-theme="dark"] [class*="tw-bg-primary-"][class*="-50"] { background-color: rgba(91, 141, 239, .16) !important; }

/* ---------- Top header ---------- */
.theme-header-bg {
    background-image: none !important;
    background-color: var(--cy-nav) !important;
    border-bottom: 1px solid rgba(255, 255, 255, .06) !important;
}
.theme-header-bg .theme-btn-bg, .theme-btn-bg {
    background-color: rgba(255, 255, 255, .07) !important;
    border: 1px solid rgba(255, 255, 255, .1) !important;
    border-radius: 12px !important;
    color: #e7ecf8 !important;
}
.theme-header-bg .theme-btn-bg:hover, .theme-btn-bg:hover { background-color: rgba(196, 241, 53, .18) !important; color: var(--cy-accent) !important; }
.theme-header-bg { color: #e7ecf8; }
.theme-header-bg .cy-theme-btn { color: #e7ecf8 !important; }
.theme-header-bg .tw-text-white { color: #e7ecf8 !important; }
.theme-logo-bg { background-color: var(--cy-nav) !important; border-color: rgba(255, 255, 255, .06) !important; }

/* Welcome banner on the dashboard (blue gradient block) */
[class*="tw-from-primary"], .tw-from-primary-800, .tw-bg-primary-800 {
    background-image: linear-gradient(120deg, var(--cy-nav) 0%, var(--cy-nav-2) 60%, #1b2a55 100%) !important;
}
.tw-bg-primary-800, .tw-bg-primary-700, .tw-bg-primary-900 { background-color: var(--cy-nav) !important; }

/* ---------- Sidebar ---------- */
.side-bar { background-color: var(--cy-surface) !important; border-right: 1px solid var(--cy-border); }
.side-bar #side-bar, .side-bar .tw-border-r { border-color: var(--cy-border) !important; }
.side-bar .tw-bg-gray-100 { background-color: var(--cy-surface-2) !important; }
#sidebar-search { color: var(--cy-text) !important; }
#side-bar a { color: var(--cy-muted) !important; border-radius: 12px !important; }
#side-bar a svg, #side-bar a i { color: var(--cy-muted) !important; }
#side-bar .theme-sidebar-hover:hover, #side-bar .theme-sidebar-hover:focus {
    background-color: var(--cy-surface-2) !important;
    color: var(--cy-text) !important;
}
#side-bar .theme-sidebar-hover:hover svg { color: var(--cy-text) !important; }
#side-bar .theme-sidebar-active, #side-bar a.theme-sidebar-active {
    background-color: var(--cy-accent) !important;
    color: var(--cy-accent-ink) !important;
    font-weight: 600;
}
#side-bar a.theme-sidebar-active svg, #side-bar a.theme-sidebar-active i { color: var(--cy-accent-ink) !important; }
#side-bar .theme-sidebar-child-hover:hover, #side-bar .theme-sidebar-child-active { color: var(--cy-text) !important; font-weight: 600; }
#side-bar .chiled .tw-bg-gray-100 { background-color: var(--cy-border) !important; }

/* Icon rail: icons only, menu names appear when hovering the bar */
@media (min-width: 1024px) {
    html[data-rail="1"] aside.side-bar {
        width: 76px !important;
        transition: width .18s ease, box-shadow .18s ease;
        position: relative;
        z-index: 40;
        overflow: hidden;
    }
    html[data-rail="1"] aside.side-bar.cy-open {
        width: 256px !important;
        margin-right: -180px;
        box-shadow: 12px 0 40px rgba(0, 0, 0, .25);
        overflow: visible;
    }
    html[data-rail="1"] aside.side-bar:not(.cy-open) .side-bar-heading,
    html[data-rail="1"] aside.side-bar:not(.cy-open) #side-bar a > span,
    html[data-rail="1"] aside.side-bar:not(.cy-open) #side-bar a > svg.svg,
    html[data-rail="1"] aside.side-bar:not(.cy-open) .chiled,
    html[data-rail="1"] aside.side-bar:not(.cy-open) #sidebar-search,
    html[data-rail="1"] aside.side-bar:not(.cy-open) #sidebar-search-clear {
        display: none !important;
    }
    html[data-rail="1"] aside.side-bar:not(.cy-open) #side-bar a { justify-content: center; padding-left: 0; padding-right: 0; }
    html[data-rail="1"] aside.side-bar:not(.cy-open) #side-bar a svg:first-child { width: 22px; height: 22px; }
    html[data-rail="1"] aside.side-bar:not(.cy-open) .tw-px-3.tw-pt-2 > div { justify-content: center; padding-left: 0; padding-right: 0; }
}
.cy-rail-btn svg { transition: transform .2s; }
html:not([data-rail="1"]) .cy-rail-btn svg { transform: none; }
html[data-rail="1"] .cy-rail-btn svg { transform: rotate(180deg); }

/* ---------- Cards, boxes, tabs ---------- */
.box, .nav-tabs-custom, .info-box, .small-box, .panel, .well, .callout, .tw-bg-white.tw-rounded-xl, .tw-bg-white.tw-rounded-lg,
.tw-bg-white.tw-rounded-2xl, .tw-bg-white.tw-rounded-md {
    background-color: var(--cy-surface) !important;
    color: var(--cy-text);
    border: 1px solid var(--cy-border) !important;
    border-radius: var(--cy-radius) !important;
    box-shadow: var(--cy-shadow) !important;
}
.box-header, .box-footer, .panel-heading, .panel-footer { background: transparent !important; border-color: var(--cy-border) !important; color: var(--cy-text); }
.box-header .box-title, .box-title, .panel-title { color: var(--cy-text) !important; font-weight: 700; }
.box.box-solid.box-primary > .box-header, .box-primary > .box-header { background: transparent !important; color: var(--cy-text) !important; border-bottom: 1px solid var(--cy-border); }
.box.box-primary, .box.box-solid { border-top: 1px solid var(--cy-border) !important; }
.nav-tabs-custom > .nav-tabs { border-bottom: 1px solid var(--cy-border) !important; background: transparent; }
.nav-tabs-custom > .nav-tabs > li > a, .nav-tabs > li > a { color: var(--cy-muted) !important; border-radius: 10px 10px 0 0; background: transparent !important; }
.nav-tabs-custom > .nav-tabs > li.active > a, .nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus {
    color: var(--cy-text) !important;
    background: var(--cy-surface-2) !important;
    border: 1px solid var(--cy-border) !important;
    border-bottom-color: transparent !important;
    font-weight: 600;
}
.nav-tabs-custom > .nav-tabs > li.active { border-top-color: var(--cy-accent) !important; }
.nav-tabs-custom > .tab-content { background: transparent !important; color: var(--cy-text); }
.nav-pills > li.active > a, .nav-pills > li.active > a:hover { background: var(--cy-accent) !important; color: var(--cy-accent-ink) !important; }
.content-header > h1, .content-header h1, h1, h2, h3, h4, h5 { color: var(--cy-text); }
.content-header > h1 small, .content-header small { color: var(--cy-muted) !important; }

/* ---------- Tables / DataTables ---------- */
.table { color: var(--cy-text); background: transparent; }
.table > thead > tr > th, .table > thead > tr > td {
    background-color: var(--cy-surface-2) !important;
    color: var(--cy-muted) !important;
    border-color: var(--cy-border) !important;
    font-weight: 600;
    text-transform: none;
}
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th {
    border-color: var(--cy-border) !important;
    color: var(--cy-text);
}
.table-striped > tbody > tr:nth-of-type(odd) { background-color: transparent !important; }
.table-striped > tbody > tr:nth-of-type(even) { background-color: color-mix(in srgb, var(--cy-surface-2) 55%, transparent) !important; }
.table-hover > tbody > tr:hover, table.dataTable tbody tr:hover { background-color: color-mix(in srgb, var(--cy-accent) 10%, transparent) !important; }
.table-bordered, .table-bordered > thead > tr > th, .table-bordered > tbody > tr > td { border-color: var(--cy-border) !important; }
table.dataTable tbody tr, table.dataTable tbody td { background-color: transparent; }
tr.bg-green, .bg-green, .table-th-green thead th, .table-th-green > thead > tr > th, thead.bg-green th, tr.bg-green th {
    background-color: var(--cy-nav-2) !important;
    color: #e7ecf8 !important;
    border-color: transparent !important;
}
.table tfoot, .footer-total { background-color: var(--cy-surface-2) !important; }
.dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_info,
.dataTables_wrapper label { color: var(--cy-muted) !important; }
.dataTables_wrapper .dataTables_paginate .paginate_button, .pagination > li > a, .pagination > li > span {
    background: var(--cy-surface) !important; color: var(--cy-text) !important; border: 1px solid var(--cy-border) !important; border-radius: 10px; margin: 0 2px;
}
.pagination > .active > a, .pagination > .active > span, .dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--cy-accent) !important; color: var(--cy-accent-ink) !important; border-color: var(--cy-accent) !important; font-weight: 700;
}
.dt-buttons .btn, .dt-buttons .dt-button, button.dt-button {
    background: var(--cy-surface-2) !important; color: var(--cy-text) !important; border: 1px solid var(--cy-border) !important; border-radius: 10px !important; box-shadow: none !important;
}

/* ---------- Forms ---------- */
.form-control, .input-group-addon, input[type="text"], input[type="number"], input[type="email"], input[type="password"],
input[type="search"], input[type="tel"], input[type="date"], textarea, select, .tw-dw-input, .tw-dw-select, .tw-dw-textarea {
    background-color: var(--cy-surface-2) !important;
    color: var(--cy-text) !important;
    border: 1px solid var(--cy-border) !important;
    border-radius: var(--cy-radius-sm) !important;
    box-shadow: none !important;
}
.form-control::placeholder, input::placeholder, textarea::placeholder { color: var(--cy-muted) !important; opacity: .8; }
.form-control:focus, input:focus, textarea:focus, select:focus, .select2-container--open .select2-selection {
    border-color: var(--cy-accent) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--cy-accent) 30%, transparent) !important;
    outline: none;
}
.form-control[disabled], .form-control[readonly], input[readonly] { background-color: color-mix(in srgb, var(--cy-surface-2) 70%, transparent) !important; color: var(--cy-muted) !important; opacity: 1; }
label, .control-label { color: var(--cy-text); font-weight: 600; }
.input-group-addon { color: var(--cy-muted) !important; }
.select2-container--default .select2-selection--single, .select2-container--default .select2-selection--multiple {
    background-color: var(--cy-surface-2) !important; border: 1px solid var(--cy-border) !important; border-radius: var(--cy-radius-sm) !important; min-height: 34px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--cy-text) !important; }
.select2-container--default .select2-selection--multiple .select2-selection__choice { background: var(--cy-border) !important; color: var(--cy-text) !important; border: 0 !important; border-radius: 8px; }
.select2-dropdown { background: var(--cy-surface) !important; border: 1px solid var(--cy-border) !important; border-radius: 12px !important; color: var(--cy-text); overflow: hidden; box-shadow: var(--cy-shadow); }
.select2-container--default .select2-results__option { color: var(--cy-text); }
.select2-container--default .select2-results__option--highlighted[aria-selected], .select2-container--default .select2-results__option--highlighted { background: var(--cy-accent) !important; color: var(--cy-accent-ink) !important; }
.select2-container--default .select2-results__option[aria-selected=true] { background: var(--cy-surface-2) !important; }
.select2-search--dropdown .select2-search__field { background: var(--cy-surface-2) !important; color: var(--cy-text) !important; border-color: var(--cy-border) !important; }
.daterangepicker, .datepicker, .bootstrap-datetimepicker-widget { background: var(--cy-surface) !important; color: var(--cy-text) !important; border: 1px solid var(--cy-border) !important; border-radius: 14px !important; }
.daterangepicker td, .daterangepicker th, .datepicker table tr td, .datepicker table tr th { color: var(--cy-text) !important; }
.daterangepicker td.off, .daterangepicker td.off.in-range { background: transparent !important; color: var(--cy-muted) !important; }
.daterangepicker td.in-range { background: var(--cy-surface-2) !important; }
.daterangepicker td.active, .daterangepicker td.active:hover, .daterangepicker .ranges li.active, .datepicker table tr td.active {
    background: var(--cy-accent) !important; color: var(--cy-accent-ink) !important; border-radius: 8px;
}
.daterangepicker .ranges li { color: var(--cy-text); } .daterangepicker .ranges li:hover { background: var(--cy-surface-2); }
.daterangepicker select { background: var(--cy-surface-2) !important; color: var(--cy-text) !important; }

/* ---------- Buttons ---------- */
.btn { border-radius: 12px !important; font-weight: 600; transition: all .15s; box-shadow: none; }
.btn-default { background: var(--cy-surface-2) !important; color: var(--cy-text) !important; border: 1px solid var(--cy-border) !important; }
.btn-default:hover, .btn-default:focus { background: var(--cy-border) !important; }
.btn-primary, .tw-dw-btn-primary, .tw-dw-btn.tw-dw-btn-primary {
    background: var(--cy-accent) !important; border-color: var(--cy-accent) !important; color: var(--cy-accent-ink) !important; border-radius: 12px !important;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .tw-dw-btn-primary:hover { background: var(--cy-accent-strong) !important; border-color: var(--cy-accent-strong) !important; color: var(--cy-accent-ink) !important; }
.btn-success { background: var(--cy-green) !important; border-color: var(--cy-green) !important; color: #04281a !important; }
.btn-info { background: var(--cy-blue) !important; border-color: var(--cy-blue) !important; color: #fff !important; }
.btn-warning { background: var(--cy-orange) !important; border-color: var(--cy-orange) !important; color: #3a2200 !important; }
.btn-danger { background: var(--cy-red) !important; border-color: var(--cy-red) !important; color: #fff !important; }
.btn-link { color: var(--cy-text) !important; }
.tw-dw-btn { border-radius: 12px !important; }
.btn-modal, a.btn-modal { border-radius: 12px !important; }
.dropdown-menu { background: var(--cy-surface) !important; border: 1px solid var(--cy-border) !important; border-radius: 14px !important; box-shadow: var(--cy-shadow) !important; padding: 6px; }
.dropdown-menu > li > a { color: var(--cy-text) !important; border-radius: 8px; }
.dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus { background: var(--cy-surface-2) !important; color: var(--cy-text) !important; }
.dropdown-menu .divider { background: var(--cy-border) !important; }
.label-success, .badge-success { background: color-mix(in srgb, var(--cy-green) 25%, transparent) !important; color: var(--cy-green) !important; }
.label { border-radius: 8px; font-weight: 600; }

/* ---------- Modals, alerts, lists ---------- */
.modal-content { background: var(--cy-surface) !important; color: var(--cy-text) !important; border: 1px solid var(--cy-border) !important; border-radius: 20px !important; box-shadow: 0 30px 80px rgba(0, 0, 0, .45) !important; }
.modal-header, .modal-footer { border-color: var(--cy-border) !important; background: transparent !important; }
.modal-title { color: var(--cy-text) !important; font-weight: 700; }
.close { color: var(--cy-text) !important; text-shadow: none; opacity: .6; }
.list-group-item { background: var(--cy-surface-2) !important; border-color: var(--cy-border) !important; color: var(--cy-text) !important; }
a.list-group-item:hover { background: var(--cy-border) !important; }
.alert { border-radius: 14px; border: 1px solid var(--cy-border); }
.progress { background: var(--cy-surface-2); border-radius: 10px; }
.swal-modal, .swal2-popup { background: var(--cy-surface) !important; color: var(--cy-text) !important; border-radius: 20px !important; }
.swal-title, .swal-text, .swal2-title, .swal2-html-container { color: var(--cy-text) !important; }
.toast-message { font-weight: 600; }
#toast-container > div { border-radius: 14px; opacity: .98; }
.bg-gray, .bg-light-gray { background-color: var(--cy-surface-2) !important; color: var(--cy-text) !important; }
.bg-aqua, .bg-light-blue, .bg-blue { background-color: var(--cy-blue) !important; }

/* ---------- Charts ---------- */
.apexcharts-text, .apexcharts-legend-text, .apexcharts-xaxis-label, .apexcharts-yaxis-label { fill: var(--cy-muted) !important; color: var(--cy-muted) !important; }
.apexcharts-gridline, .apexcharts-xaxis line, .apexcharts-yaxis line { stroke: var(--cy-border) !important; }
.apexcharts-menu, .apexcharts-tooltip, .apexcharts-xaxistooltip { background: var(--cy-surface) !important; color: var(--cy-text) !important; border-color: var(--cy-border) !important; }
.highcharts-background { fill: transparent !important; }
.highcharts-axis-labels text, .highcharts-legend-item text, .highcharts-title, .highcharts-axis-title { fill: var(--cy-muted) !important; color: var(--cy-muted) !important; }
.highcharts-grid-line { stroke: var(--cy-border) !important; }

/* ---------- Footer ---------- */
footer, .main-footer { background: transparent !important; color: var(--cy-muted) !important; border-color: var(--cy-border) !important; }

/* ---------- POS ---------- */
body.lockscreen, body.lockscreen .content-wrapper { background-color: var(--cy-bg) !important; }
.pos-form-actions, .pos-footer { background: var(--cy-surface) !important; border-top: 1px solid var(--cy-border) !important; }
#pos_table, #pos_table thead th { background: transparent; }
#pos_table thead th { background: var(--cy-surface-2) !important; color: var(--cy-muted) !important; }
.product_box, .product-box, .tw-product-card { background: var(--cy-surface) !important; border: 1px solid var(--cy-border) !important; border-radius: 14px !important; color: var(--cy-text); }
.product_box:hover, .product-box:hover { border-color: var(--cy-accent) !important; }
.pos_product_div, #product_list_body { background: transparent !important; }
.pos-express-finalize, #pos-finalize { border-radius: 12px !important; }

/* ---------- Auth pages ---------- */
.login-box, .register-box, .login-form, .auth-card { background: var(--cy-surface) !important; color: var(--cy-text) !important; border: 1px solid var(--cy-border); border-radius: 24px; box-shadow: var(--cy-shadow); }

/* ---------- Theme switch button (injected by cyber-theme.js) ---------- */
.cy-theme-btn, .cy-rail-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 12px;
    background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); color: #e7ecf8;
    cursor: pointer; transition: all .15s; padding: 0; flex-shrink: 0;
}
.cy-theme-btn:hover, .cy-rail-btn:hover { background: rgba(196, 241, 53, .2); color: var(--cy-accent); }
.cy-theme-btn svg, .cy-rail-btn svg { width: 18px; height: 18px; }
.cy-theme-btn .cy-moon { display: none; }
html[data-theme="dark"] .cy-theme-btn .cy-sun { display: none; }
html[data-theme="dark"] .cy-theme-btn .cy-moon { display: block; }
.cy-theme-float {
    position: fixed; right: 16px; bottom: 16px; z-index: 9999;
    background: var(--cy-nav); box-shadow: var(--cy-shadow);
}

/* ---------- Print: never print the dark theme ---------- */
@media print {
    html, body, .tw-bg-white, .box, .table, .table > thead > tr > th, .table > tbody > tr > td, .form-control {
        background: #fff !important; color: #000 !important; box-shadow: none !important; border-color: #ccc !important;
    }
}

/* ---------- Scrollbars ---------- */
* { scrollbar-color: var(--cy-border) transparent; scrollbar-width: thin; }
*::-webkit-scrollbar { width: 10px; height: 10px; background: transparent; }
*::-webkit-scrollbar-track { background: var(--cy-surface-2); border-radius: 10px; }
*::-webkit-scrollbar-thumb { background: var(--cy-border); border-radius: 10px; border: 2px solid var(--cy-surface-2); }
*::-webkit-scrollbar-thumb:hover { background: var(--cy-muted); }
div.dataTables_processing, .dataTables_processing { background: var(--cy-surface) !important; color: var(--cy-text) !important; border: 1px solid var(--cy-border) !important; border-radius: 12px !important; }

/* ---------- POS screen specifics (colours hard-coded in app.css / blade) ---------- */
.bg-white, .img-thumbnail, div.pos-tab-container, div.pos-tab-content, .pos-card, .pos-subcat-pill, #pos_header_more_options {
    background-color: var(--cy-surface) !important; color: var(--cy-text); border-color: var(--cy-border) !important;
}
.pos-subcat-strip, .bg-lightgray, .bg-light-gray { background-color: var(--cy-surface-2) !important; }
#pos_header_more_options .pos-nav-divider { background: var(--cy-border) !important; }
body.lockscreen #pos_table > tbody > tr:nth-child(odd) { background-color: var(--cy-surface) !important; }
body.lockscreen #pos_table > tbody > tr:nth-child(even) { background-color: var(--cy-surface-2) !important; }
body.lockscreen #pos_table > tbody > tr:hover, #pos_table > tbody > tr.product_row:hover { background-color: color-mix(in srgb, var(--cy-accent) 10%, var(--cy-surface)) !important; }
tr.product_row, #pos_table tr.product_row td { color: var(--cy-text); }
.pos_form_totals { background-color: var(--cy-surface-2) !important; border-color: var(--cy-border) !important; color: var(--cy-text) !important; }
.pos_form_totals .tw-text-gray-500, .pos_form_totals span, .pos_form_totals b { color: var(--cy-text); }
.pos_form_totals .text-muted, .pos_form_totals .tw-text-gray-500, .pos_form_totals td { color: var(--cy-muted); }
.pos_totals_right { background-color: color-mix(in srgb, var(--cy-accent) 16%, var(--cy-surface)) !important; border-color: var(--cy-border) !important; }
.pos_totals_right_label { color: var(--cy-muted) !important; }
.pos_totals_right .total_payable, .pos_totals_right span.price_total, .pos_totals_right .price_total { color: var(--cy-text) !important; }
.input-number .btn-default { background: var(--cy-surface-2) !important; }
button.pos-finalize:not(.tw-bg-green-600):not([class*="tw-bg-green"]) { background-color: var(--cy-surface-2) !important; color: var(--cy-text) !important; border: 1px solid var(--cy-border) !important; }
button.pos-express-finalize[data-pay_method="cash"] { background-color: var(--cy-accent) !important; color: var(--cy-accent-ink) !important; border: 0 !important; font-weight: 700; }
.cy-theme-float { bottom: 76px; right: 14px; }
body.lockscreen .cy-theme-float { bottom: 84px; }
.pos_totals_left { background-color: var(--cy-border) !important; }
.pos_totals_cell { background-color: var(--cy-surface-2) !important; }
.pos_totals_label { color: var(--cy-muted) !important; }
.pos_totals_value, .pos_totals_value.price_total, .pos_totals_right .pos_totals_value { color: var(--cy-text) !important; }
#pos_table .pos_line_total, #pos_table td span.display_currency, #pos_table td { color: var(--cy-text); }
.pos_line_total_text, span.pos_line_total_text, .display_currency.pos_line_total_text { color: var(--cy-text) !important; }
.pos_totals_right_value, .pos_totals_right_value.number { color: var(--cy-text) !important; }
html[data-theme="dark"] .pos_totals_right_value, html[data-theme="dark"] .pos_totals_right_value.number { color: var(--cy-accent) !important; }

/* ---------- Login / register ---------- */
.tw-text-\[\#1e1e1e\], .tw-text-\[\#111827\], .tw-text-\[\#0f172a\] { color: var(--cy-text) !important; }
button.tw-from-indigo-500, button[class*="tw-from-indigo"] {
    background-image: none !important; background-color: var(--cy-accent) !important; color: var(--cy-accent-ink) !important; font-weight: 700;
}
span.tw-text-transparent, a.tw-text-transparent { background-image: none !important; -webkit-text-fill-color: currentColor; color: var(--cy-text) !important; font-weight: 700; text-decoration: underline; text-decoration-color: var(--cy-accent); }

/* The layout has a 5 s colour transition on the header; make theme switching instant-feeling */
.tw-duration-5000, .tw-transition-all { transition-duration: .2s !important; }


/* =====================================================================
   SOFT - specific look (overrides the shared rules above)
   ===================================================================== */
body { letter-spacing: -.005em; }

/* ---------- Page titles: big, light, with a muted subtitle ---------- */
.content-header { padding-top: 18px; }
.content-header > h1, .content-header h1 {
    font-size: 36px !important; letter-spacing: -.03em; line-height: 1.1; margin: 0 0 6px;
}
.content-header > h1 small, .content-header h1 small {
    display: block; font-size: 15px !important; font-weight: 400; color: var(--cy-muted) !important; margin-top: 6px; letter-spacing: 0;
}

/* ---------- Header: no bar, round white icon buttons ---------- */
.theme-header-bg {
    background: transparent !important; border-bottom: 0 !important; color: var(--cy-text);
}
.theme-header-bg .tw-text-white, .theme-header-bg { color: var(--cy-text) !important; }
.theme-header-bg .theme-btn-bg, .theme-btn-bg, .cy-theme-btn, .cy-rail-btn {
    background: var(--cy-surface) !important; color: var(--cy-text) !important; border: 1px solid var(--cy-border) !important;
    border-radius: 999px !important; box-shadow: none !important;
}
.theme-header-bg .theme-btn-bg:hover, .theme-btn-bg:hover, .cy-theme-btn:hover { background: var(--cy-lilac) !important; color: var(--cy-text) !important; }
.theme-header-bg .theme-btn-bg svg, .theme-btn-bg svg { color: var(--cy-text); }
.theme-header-bg button[id*="dashboard"], .theme-header-bg #dashboard_date_filter { background: var(--cy-surface) !important; }
.cy-theme-float { background: var(--cy-surface) !important; }

/* ---------- Sidebar: floating dark capsule with icon tiles ---------- */
.side-bar {
    background: var(--cy-nav) !important; border: 0 !important; box-shadow: 0 10px 40px rgba(23, 23, 40, .18);
    margin: 16px 0 16px 16px; height: calc(100% - 32px) !important; border-radius: 32px !important; overflow: hidden;
}
.theme-logo-bg, .side-bar > a.theme-logo-bg { background: transparent !important; border: 0 !important; height: 68px !important; color: #fff; }
.side-bar > a.theme-logo-bg::before { content: "\2731"; font-size: 34px; color: #fff; line-height: 1; margin-right: 0; }
.side-bar .side-bar-heading { color: #fff !important; font-weight: 600; margin-left: 10px; }
.side-bar .tw-border-r, .side-bar #side-bar, .side-bar .tw-border-gray-200 { border: 0 !important; }
.side-bar .tw-bg-gray-100, .side-bar .tw-bg-gray-50 { background-color: var(--cy-nav-2) !important; border-color: transparent !important; }
#sidebar-search { color: #fff !important; }
#side-bar a, #side-bar a svg, #side-bar a i { color: #a6a6b4 !important; }
#side-bar > a, #side-bar > div > a.drop_down {
    background: var(--cy-nav-2) !important; border-radius: 18px !important; padding-top: 12px !important; padding-bottom: 12px !important; margin-bottom: 8px;
}
#side-bar .theme-sidebar-hover:hover, #side-bar .theme-sidebar-hover:focus { background: #34343e !important; color: #fff !important; }
#side-bar .theme-sidebar-hover:hover svg, #side-bar .theme-sidebar-hover:hover i { color: #fff !important; }
#side-bar .theme-sidebar-active, #side-bar a.theme-sidebar-active {
    background: #fff !important; color: #17171c !important; font-weight: 600;
}
#side-bar a.theme-sidebar-active svg, #side-bar a.theme-sidebar-active i, #side-bar .theme-sidebar-active svg { color: #17171c !important; }
#side-bar .chiled a { background: transparent !important; color: #a6a6b4 !important; padding-left: 4px; }
#side-bar .chiled a:hover, #side-bar .theme-sidebar-child-active { color: #fff !important; }
#side-bar .chiled .tw-bg-gray-100, #side-bar .chiled .tw-absolute { background-color: #34343e !important; }
#side-bar .badge, .side-bar .label { background: var(--cy-accent); color: #fff; }

/* Icon rail: icon tiles only, names show on hover */
@media (min-width: 1024px) {
    html[data-rail="1"] aside.side-bar { width: 88px !important; position: relative; z-index: 40; transition: width .18s ease; }
    html[data-rail="1"] aside.side-bar.cy-open {
        width: 268px !important; margin-right: -168px; overflow-y: auto; overflow-x: hidden;
    }
    html[data-rail="1"] aside.side-bar:not(.cy-open) .side-bar-heading,
    html[data-rail="1"] aside.side-bar:not(.cy-open) #side-bar a > span,
    html[data-rail="1"] aside.side-bar:not(.cy-open) #side-bar a > svg.svg,
    html[data-rail="1"] aside.side-bar:not(.cy-open) .chiled,
    html[data-rail="1"] aside.side-bar:not(.cy-open) #sidebar-search,
    html[data-rail="1"] aside.side-bar:not(.cy-open) #sidebar-search-clear,
    html[data-rail="1"] aside.side-bar:not(.cy-open) .tw-px-3.tw-pt-2 { display: none !important; }
    html[data-rail="1"] aside.side-bar:not(.cy-open) #side-bar { padding-left: 14px; padding-right: 14px; }
    html[data-rail="1"] aside.side-bar:not(.cy-open) #side-bar a { justify-content: center; padding-left: 0; padding-right: 0; height: var(--cy-tile); }
    html[data-rail="1"] aside.side-bar:not(.cy-open) #side-bar a svg:first-child { width: 24px; height: 24px; }
    html[data-rail="1"] aside.side-bar:not(.cy-open) > a.theme-logo-bg { justify-content: center; }
}

/* ---------- Cards ---------- */
.box, .nav-tabs-custom, .info-box, .small-box, .panel, .well, .callout, .tw-bg-white.tw-rounded-xl, .tw-bg-white.tw-rounded-lg,
.tw-bg-white.tw-rounded-2xl, .tw-bg-white.tw-rounded-md {
    border: 0 !important; border-radius: var(--cy-radius) !important; box-shadow: var(--cy-shadow) !important; background-color: var(--cy-surface) !important;
}
.box-header { padding: 22px 24px 8px !important; border: 0 !important; }
.box-header .box-title, .box-title { font-size: 20px; letter-spacing: -.01em; }
.box-body { padding: 8px 24px 22px; }
.box-footer { padding: 14px 24px 20px; border: 0 !important; }

/* Dashboard: first three stat cards get the dark / lilac / peach treatment from the design */
.theme-header-bg .tw-grid:not(.tw-absolute) > div { padding: 4px; }
.theme-header-bg .tw-grid:not(.tw-absolute) > div:nth-child(1) { background: var(--cy-nav) !important; }
.theme-header-bg .tw-grid:not(.tw-absolute) > div:nth-child(2) { background: linear-gradient(145deg, #565bb5 0%, #6a5fbd 55%, #7d63c0 100%) !important; }
.theme-header-bg .tw-grid:not(.tw-absolute) > div:nth-child(3) { background: linear-gradient(160deg, #f7ebe4 0%, #efd9cc 100%) !important; }
.theme-header-bg .tw-grid:not(.tw-absolute) > div:nth-child(1) *, .theme-header-bg .tw-grid:not(.tw-absolute) > div:nth-child(2) * { color: #fff !important; }
.theme-header-bg .tw-grid:not(.tw-absolute) > div:nth-child(1) p.tw-text-gray-500, .theme-header-bg .tw-grid:not(.tw-absolute) > div:nth-child(1) small { color: rgba(255, 255, 255, .65) !important; }
.theme-header-bg .tw-grid:not(.tw-absolute) > div:nth-child(1) [class*="tw-bg-"][class*="-100"], .theme-header-bg .tw-grid:not(.tw-absolute) > div:nth-child(2) [class*="tw-bg-"][class*="-100"] { background: rgba(255, 255, 255, .16) !important; }
.theme-header-bg .tw-grid:not(.tw-absolute) > div:nth-child(3) * { color: #3b2f2a !important; }
.theme-header-bg .tw-grid:not(.tw-absolute) > div:nth-child(3) [class*="tw-bg-"][class*="-100"] { background: rgba(255, 255, 255, .55) !important; }
.theme-header-bg .tw-grid:not(.tw-absolute) > div p.tw-font-mono, .theme-header-bg .tw-grid:not(.tw-absolute) p[class*="total_"] { font-size: clamp(16px, 1.45vw, 28px) !important; letter-spacing: -.03em; text-overflow: clip; }
.theme-header-bg .tw-grid:not(.tw-absolute) > div [class*="tw-w-10"][class*="tw-rounded-full"] { box-shadow: none; }
.theme-header-bg h1 { font-size: 40px !important; letter-spacing: -.03em; color: var(--cy-text) !important; }
.theme-header-bg select.form-control, .theme-header-bg .select2-selection { background: var(--cy-surface) !important; border-radius: 999px !important; }

/* ---------- Tables: airy rows, quiet headers ---------- */
.table > thead > tr > th, .table > thead > tr > td {
    background: transparent !important; color: var(--cy-muted) !important; font-weight: 500; font-size: 13px;
    border-bottom: 1px solid var(--cy-border) !important; border-top: 0 !important; padding: 12px 14px !important;
}
.table > tbody > tr > td, .table > tfoot > tr > td { border-top: 0 !important; padding: 16px 14px !important; font-size: 14.5px; vertical-align: middle !important; }
.table-striped > tbody > tr:nth-of-type(even), .table-striped > tbody > tr:nth-of-type(odd) { background-color: transparent !important; }
.table > tbody > tr { border-bottom: 1px solid color-mix(in srgb, var(--cy-border) 55%, transparent); }
.table-hover > tbody > tr:hover, table.dataTable tbody tr:hover { background-color: color-mix(in srgb, var(--cy-lilac) 45%, transparent) !important; }
.table-bordered, .table-bordered > thead > tr > th, .table-bordered > tbody > tr > td { border-color: transparent !important; }
tr.bg-green, .bg-green, .table-th-green thead th, .table-th-green > thead > tr > th, thead.bg-green th, tr.bg-green th {
    background-color: transparent !important; color: var(--cy-muted) !important; border-bottom: 1px solid var(--cy-border) !important;
}
.table tfoot, .footer-total, tr.footer-total td, table tfoot tr td { background-color: var(--cy-surface-2) !important; font-weight: 600; }
.table tfoot td:first-child { border-radius: 14px 0 0 14px; } .table tfoot td:last-child { border-radius: 0 14px 14px 0; }
.dataTables_wrapper .dataTables_paginate .paginate_button, .pagination > li > a, .pagination > li > span {
    border: 0 !important; background: transparent !important; border-radius: 999px !important; min-width: 36px; text-align: center; color: var(--cy-muted) !important;
}
.pagination > .active > a, .pagination > .active > span, .dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--cy-nav) !important; color: #fff !important; border-color: transparent !important;
}
.dt-buttons .btn, .dt-buttons .dt-button, button.dt-button { background: var(--cy-surface) !important; border: 1px solid var(--cy-border) !important; border-radius: 999px !important; }
.dataTables_wrapper .dataTables_filter input { border-radius: 999px !important; padding-left: 14px; }

/* ---------- Buttons, tabs, inputs: pills with a dark primary ---------- */
.btn { border-radius: 999px !important; font-weight: 500; padding-left: 16px; padding-right: 16px; }
.btn-xs { padding-left: 10px; padding-right: 10px; }
.btn-default { background: var(--cy-surface) !important; border: 1px solid var(--cy-border) !important; }
.btn-primary, .tw-dw-btn-primary, .tw-dw-btn.tw-dw-btn-primary {
    background: var(--cy-nav) !important; border-color: var(--cy-nav) !important; color: #fff !important; border-radius: 18px !important; font-weight: 500;
}
html[data-theme="dark"] .btn-primary, html[data-theme="dark"] .tw-dw-btn-primary { background: var(--cy-accent) !important; border-color: var(--cy-accent) !important; color: var(--cy-accent-ink) !important; }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .tw-dw-btn-primary:hover { background: #000 !important; border-color: #000 !important; color: #fff !important; }
html[data-theme="dark"] .btn-primary:hover { background: var(--cy-accent-strong) !important; border-color: var(--cy-accent-strong) !important; }
.btn-success { background: color-mix(in srgb, var(--cy-green) 18%, transparent) !important; color: var(--cy-green) !important; border-color: transparent !important; }
.btn-info { background: var(--cy-lilac) !important; color: var(--cy-text) !important; border-color: transparent !important; }
.btn-warning { background: var(--cy-peach) !important; color: #8a4a1c !important; border-color: transparent !important; }
.btn-danger { background: color-mix(in srgb, var(--cy-red) 16%, transparent) !important; color: var(--cy-red) !important; border-color: transparent !important; }
.nav-tabs-custom > .nav-tabs > li.active > a, .nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus {
    background: var(--cy-nav) !important; color: #fff !important; border: 0 !important; border-radius: 999px !important;
}
.nav-tabs-custom > .nav-tabs > li > a, .nav-tabs > li > a { border-radius: 999px !important; border: 0 !important; margin-right: 6px; }
.nav-tabs-custom > .nav-tabs, .nav-tabs { border-bottom: 0 !important; padding: 8px 12px 0; }
.nav-tabs-custom > .nav-tabs > li.active { border-top-color: transparent !important; }
.nav-pills > li.active > a, .nav-pills > li.active > a:hover { background: var(--cy-nav) !important; color: #fff !important; border-radius: 999px; }
.form-control, input[type="text"], input[type="number"], input[type="email"], input[type="password"], input[type="search"], input[type="tel"], input[type="date"], textarea, select, .tw-dw-input, .tw-dw-select {
    background-color: var(--cy-surface) !important; border: 1px solid var(--cy-border) !important; border-radius: var(--cy-radius-sm) !important; height: auto; min-height: 38px;
}
.select2-container--default .select2-selection--single, .select2-container--default .select2-selection--multiple {
    background-color: var(--cy-surface) !important; border-radius: var(--cy-radius-sm) !important; min-height: 38px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 36px !important; }
.select2-container--default .select2-results__option--highlighted[aria-selected], .select2-container--default .select2-results__option--highlighted { background: var(--cy-lilac) !important; color: var(--cy-text) !important; }
.daterangepicker td.active, .daterangepicker td.active:hover, .daterangepicker .ranges li.active, .datepicker table tr td.active { background: var(--cy-nav) !important; color: #fff !important; }
.form-control:focus, input:focus, textarea:focus, select:focus, .select2-container--open .select2-selection {
    border-color: var(--cy-accent) !important; box-shadow: 0 0 0 4px color-mix(in srgb, var(--cy-accent) 22%, transparent) !important;
}
label, .control-label { font-weight: 500; }
::selection { background: var(--cy-lilac); color: var(--cy-text); }
.label { border-radius: 999px; padding: .3em .8em; font-weight: 500; }
.label-success { background: color-mix(in srgb, var(--cy-green) 16%, transparent) !important; color: var(--cy-green) !important; }
.label-danger { background: color-mix(in srgb, var(--cy-red) 14%, transparent) !important; color: var(--cy-red) !important; }
.label-warning { background: var(--cy-peach) !important; color: #b0642a !important; }
.label-info, .label-primary { background: var(--cy-lilac) !important; color: var(--cy-accent-strong) !important; }
.dropdown-menu { border-radius: 18px !important; border: 0 !important; box-shadow: 0 14px 50px rgba(23, 23, 40, .16) !important; padding: 8px; }
.dropdown-menu > li > a:hover { background: var(--cy-lilac) !important; }
.modal-content { border-radius: 28px !important; border: 0 !important; }
.list-group-item { border-radius: 12px !important; }
.alert { border: 0; border-radius: 18px; }
#toast-container > div { border-radius: 18px; }

/* ---------- Charts: lilac bars, dark highlight ---------- */
.apexcharts-bar-area { fill: var(--cy-lilac) !important; }
.apexcharts-bar-area:hover { fill: var(--cy-accent) !important; }
.apexcharts-line, .apexcharts-series path[stroke] { stroke: var(--cy-accent); }

/* ---------- POS: same bones, softer colours ---------- */
.pos_totals_right { background-color: var(--cy-lilac) !important; }
html[data-theme="dark"] .pos_totals_right_value, html[data-theme="dark"] .pos_totals_right_value.number { color: var(--cy-text) !important; }
button.pos-express-finalize[data-pay_method="cash"] { background-color: var(--cy-nav) !important; color: #fff !important; border-radius: 18px !important; }
html[data-theme="dark"] button.pos-express-finalize[data-pay_method="cash"] { background-color: var(--cy-accent) !important; color: var(--cy-accent-ink) !important; }
.product_box:hover, .product-box:hover { border-color: var(--cy-accent) !important; }

/* ---------- Login ---------- */
button.tw-from-indigo-500, button[class*="tw-from-indigo"] { background-color: var(--cy-nav) !important; color: #fff !important; border-radius: 18px !important; }
html[data-theme="dark"] button.tw-from-indigo-500, html[data-theme="dark"] button[class*="tw-from-indigo"] { background-color: var(--cy-accent) !important; color: var(--cy-accent-ink) !important; }
span.tw-text-transparent, a.tw-text-transparent { text-decoration-color: var(--cy-accent) !important; }

/* ---------- Footer ---------- */
footer, .main-footer { padding-left: 24px; }

/* The original dashboard draws a two-tone band behind the stat cards; Soft has no banner */
.theme-header-bg .tw-absolute.tw-inset-0.tw-grid { display: none !important; }
.theme-header-bg .cy-theme-btn, .theme-header-bg .cy-rail-btn { color: var(--cy-text) !important; }
.theme-header-bg { color: var(--cy-text) !important; }

/* Active parent item of an opened menu group stays white; gradient "Add" buttons become dark pills */
#side-bar > a.theme-sidebar-active, #side-bar > div > a.drop_down.theme-sidebar-active, #side-bar > div > a.theme-sidebar-active {
    background: #fff !important; color: #17171c !important;
}
#side-bar > div > a.drop_down.theme-sidebar-active svg, #side-bar > div > a.theme-sidebar-active svg { color: #17171c !important; }
a[class*="tw-from-indigo"], button[class*="tw-from-indigo"], .tw-dw-btn[class*="tw-from-"], a[class*="tw-from-primary"].tw-dw-btn {
    background-image: none !important; background-color: var(--cy-nav) !important; color: #fff !important; border: 0 !important; border-radius: 18px !important; box-shadow: none !important;
}
html[data-theme="dark"] a[class*="tw-from-indigo"], html[data-theme="dark"] .tw-dw-btn[class*="tw-from-"] { background-color: var(--cy-accent) !important; color: var(--cy-accent-ink) !important; }

/* Icon tiles shrink on short screens so the whole menu fits without scrolling:
   (screen height - frame - logo) / about 14 items - gap, between 36px and 52px */
html[data-rail="1"] { --cy-tile: clamp(36px, calc((100vh - 128px) / 14 - 8px), 52px); }
@media (min-width: 1024px) {
    html[data-rail="1"] aside.side-bar:not(.cy-open) #side-bar { scrollbar-width: none; -ms-overflow-style: none; }
    html[data-rail="1"] aside.side-bar:not(.cy-open) #side-bar::-webkit-scrollbar { display: none; width: 0; height: 0; }
    html[data-rail="1"] aside.side-bar:not(.cy-open) #side-bar a svg:first-child { width: calc(var(--cy-tile) * .46); height: calc(var(--cy-tile) * .46); }
}

/* Pin button inside the sidebar: keeps the menu open (page moves over) or goes back to the icon rail */
.cy-pin { position: absolute; top: 16px; right: 14px; width: 30px; height: 30px; border-radius: 10px; border: 0; background: rgba(255,255,255,.1); color: #cfd3e0; display: none; align-items: center; justify-content: center; cursor: pointer; z-index: 3; padding: 0; }
.cy-pin:hover { background: rgba(255,255,255,.22); color: #fff; }
.cy-pin svg { width: 16px; height: 16px; transition: transform .2s; }
html:not([data-rail="1"]) .cy-pin { display: inline-flex; }
html[data-rail="1"] aside.side-bar.cy-open .cy-pin { display: inline-flex; }
html:not([data-rail="1"]) .cy-pin svg { transform: rotate(45deg); }
@media (max-width: 1023px) { .cy-pin { display: none !important; } }
