/* ============================================
   ASSIMIL BACK-OFFICE - THEME & DESIGN TOKENS
   All CSS custom properties (variables) are
   defined here for easy theming.
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    /* - Logo - */
    --color-logo: #0277c0;
    --logo-height: 45px;
    --logo-height-login: 55px;
    --logo-height-sidebar: 26px;

    /* - Brand colors - */
    --color-primary: #3ab3ff;
    --color-primary-light: #7dcfff;
    --color-primary-lighter: #b0e2ff;
    --color-primary-rgb: 58, 179, 255;
    --color-secondary: #fdac05;
    --color-secondary-light: #fdc248;
    --color-danger: #ff4757;
    --color-danger-light: #ff6b7a;
    --color-error: #dc2626;
    --color-error-bg: #fef2f2;
    --color-error-border: #fca5a5;
    --color-error-text: #cc0000;
    --color-success: #70c3f6;
    --color-warning: #e67e33;
    --color-purple: #cd1dff;
    --color-green: #27ae60;
    --color-info: #4871a0;
    --color-info-bg: #f0f9ff;
    --color-info-border: #bae6fd;
    --color-info-text: #0369a1;

    /* - Text - */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-on-dark: #cbd5e1;
    --text-on-primary: #ffffff;
    --text-body: #333333;
    --text-link: #414951;
    --text-link-accent: #3ab3ff;

    /* - Backgrounds - */
    --page-bg: #f0f0f0;
    --card-bg: #ffffff;
    --bg-subtle: #f7f7f7;
    --bg-hover: #f5f5f5;
    --bg-highlight: #fafafa;
    --bg-muted: #f6f6f6;
    --bg-purple-light: #fbeefa;

    /* - Borders - */
    --border-color: transparent;
    --border-light: transparent;
    --border-input: #e0e0e0;

    /* - Sidebar - */
    --sidebar-width: 220px;
    --sidebar-collapsed-width: 72px;
    --sidebar-bg: #ffffff;
    --sidebar-hover: #f5f5f5;
    --sidebar-submenu-bg: #fafafa;
    --sidebar-text: #64748b;
    --sidebar-text-hover: #1e293b;
    --sidebar-border: #e8e8e8;

    /* - Header - */
    --header-height: 52px;

    /* - Radius - */
    --radius-pill: 50px;
    --radius-lg: 12px;
    --radius-md: 8px;
    --radius-sm: 6px;
    --radius-xs: 4px;

    /* - Spacing - */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 16px;
    --space-xl: 20px;
    --space-2xl: 30px;

    /* - Font sizes - */
    --font-2xs: 0.65rem;
    --font-xs: 0.75rem;
    --font-sm: 0.8rem;
    --font-base: 0.88rem;
    --font-md: 0.95rem;
    --font-lg: 1.05rem;

    /* - Shadows - */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-focus: 0 0 0 3px rgba(var(--color-primary-rgb), 0.1);

    /* - Transitions - */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;

    /* - Bootstrap overrides - */
    --bs-primary: var(--color-primary);
    --bs-primary-rgb: var(--color-primary-rgb);
}

/* ============================================
   BASE STYLES — ASSIMIL BACK-OFFICE
   Uses CSS variables defined in style.css :root
   ============================================ */

/* FONT STACK */
body,
input, select, textarea {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 13px;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.1;
}

/* BASE LAYOUT */

html {
    background-color: var(--page-bg);
    height: 100%;
    box-sizing: border-box;
}

html * {
    margin: 0;
}

body {
    background: var(--page-bg);
    color: var(--text-body);
    margin: 0;
    max-width: none;
    overflow-x: hidden;
}

.formFieldset {
    padding: var(--space-lg);
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md);
}

a:link, a:visited, a:hover {
    color: var(--text-link);
}

a:hover, a:active {
    outline: none;
}

h1 {
    color: var(--text-primary);
    font-weight: 400;
    font-size: 1.8em;
    margin: 0.6em 0 0.3em 0;
}

ul {
    padding: 0;
}

img {
    border: 0;
}

/* GENERAL */

.content h1 {
    border-bottom: 1px solid var(--border-input);
    margin: 0.6em 1em 1em;
    padding: 0 0.25em;
}

.content p {
    margin: 0.6em 1em 1em;
    padding: 0 0.25em;
}

.content table {
    margin-top: 1.5em;
}

th {
    background-color: var(--bg-subtle);
}

table .btn {
    padding: 2px 0;
}

.scaffold-list h1 {
    border: none;
}

.footer {
    background: var(--border-color);
    color: var(--text-secondary);
    clear: both;
    font-size: 0.8em;
    margin-top: 1em;
    padding: 0.5em 1em;
    min-height: 0.5em;
}

.footer a {
    color: var(--text-link-accent);
}

.spinner {
    position: fixed;
    top: var(--space-lg);
    right: var(--space-lg);
    z-index: 9999;
    color: var(--color-primary);
    font-size: 42px;
}

.spinner i {
    display: block;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* FORMS */

fieldset,
.property-list {
    margin: 0.4em 1em 0 1em;
    padding: 0.3em 1.2em 1em;
    position: relative;
    zoom: 1;
    border: none;
}

.property-list .fieldcontain {
    list-style: none;
    overflow: hidden;
    zoom: 1;
}

.fieldcontain {
    margin-top: 0.8em;
}

.fieldcontain label,
.fieldcontain .property-label {
    color: var(--text-secondary);
    text-align: right;
    width: 25%;
    font-size: var(--font-base);
}

.fieldcontain .property-label {
    float: left;
}

.fieldcontain .property-value {
    display: block;
    margin-left: 27%;
}

label {
    cursor: pointer;
    display: inline-block;
    margin: 0 0.25em 0 0;
    font-size: var(--font-base);
}

/* PILL-SHAPED FORM CONTROLS */
input, select, textarea {
    background-color: var(--card-bg);
    font-size: var(--font-md);
    padding: 0.5em 1em;
    border: 1px solid var(--border-input);
    border-radius: var(--radius-pill);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:focus, select:focus, textarea:focus {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-focus);
    outline: none;
}

/* Bootstrap form-control override for pill shape */
.form-control, .form-select {
    border-radius: var(--radius-pill) !important;
    padding: 0.45em 1.2em !important;
    font-size: var(--font-base) !important;
    border-color: var(--border-input) !important;
}

/* Select needs extra right padding for dropdown arrow */
select.form-select:not([multiple]):not([size]),
select:not([multiple]):not([size]) {
    padding-right: 3em !important;
    background-position: right 1em center;
}

.form-control:focus, .form-select:focus {
    border-color: var(--color-primary) !important;
    box-shadow: var(--shadow-focus) !important;
}

/* Floating labels need adjustment for pill shape */
.form-floating > .form-control,
.form-floating > .form-select {
    border-radius: var(--radius-pill) !important;
    padding: 1em 1.2em 0.4em !important;
}

.form-floating > label {
    padding-left: 1.2em;
}

/* Textarea should NOT be pill-shaped */
textarea,
textarea.form-control {
    border-radius: var(--radius-lg) !important;
}

/* Multi-select and sized selects should NOT be pill-shaped */
.form-select[multiple],
.form-select[size]:not([size="1"]),
select[multiple] {
    border-radius: var(--radius-lg) !important;
    vertical-align: top;
}

select {
    padding: 0.4em 0.8em;
}

textarea {
    width: 250px;
    height: 120px;
    overflow: auto;
    vertical-align: top;
}

.required-indicator {
    color: var(--color-primary);
    display: inline-block;
    font-weight: bold;
    margin-left: 0.3em;
    position: relative;
    top: 0.1em;
}

/* EMBEDDED PROPERTIES */

fieldset.embedded {
    background-color: transparent;
    border: 1px solid var(--border-color);
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    box-shadow: none;
    border-radius: var(--radius-md);
}

fieldset.embedded legend {
    margin: 0 1em;
}

/* MESSAGES AND ERRORS */

.errors,
.message {
    font-size: var(--font-base);
    line-height: 1.8;
    margin: 0.8em 0;
    padding: 0.25em;
    border-radius: var(--radius-md);
}

.message {
    background: var(--color-info-bg);
    border: 1px solid var(--color-info-border);
    color: var(--color-info-text);
    padding: 10px 14px;
}

.errors {
    background: var(--color-error-bg);
    border: 1px solid var(--color-error-border);
    color: var(--color-error);
    padding: 10px 14px;
    white-space: pre;
}

.errors ul,
.message {
    padding: 0;
}

.errors li {
    padding-left: 2em;
    list-style-type: none;
    list-style: none;
}

.errors li:before {
    font-family: 'FontAwesome';
    content: "\f071";
    color: var(--color-error);
    margin-right: 10px;
}

.message {
    padding-left: 1.5em;
}

/* form fields with errors */

.error input, .error select, .error textarea {
    background: var(--color-error-bg);
    border-color: var(--color-error-border);
    color: var(--color-error-text);
}

.error input:focus, .error select:focus, .error textarea:focus {
    box-shadow: 0 0 0 3px rgba(252, 165, 165, 0.3);
}

input:invalid, select:invalid, textarea:invalid {
    background: var(--color-error-bg);
    border-color: var(--color-error-border);
    color: var(--color-error-text);
}

input:invalid:focus, select:invalid:focus, textarea:invalid:focus {
    box-shadow: 0 0 0 3px rgba(252, 165, 165, 0.3);
}

/* TABLES */

table {
    width: 100%;
    margin-bottom: 0.8em;
}

tr {
    border: 0;
}

tr > td:first-child, tr > th:first-child {
    padding-left: 1em;
}

tr > td:last-child, tr > th:last-child {
    padding-right: 1em;
}

td, th {
    line-height: 1.4em;
    padding: 0.4em 0.5em;
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--text-secondary);
    font-weight: 600;
    line-height: 1.5em;
    padding: 0.3em 0.5em;
    font-size: var(--font-sm);
}

thead th {
    white-space: nowrap;
}

th a {
    display: block;
    text-decoration: none;
}

th a:link, th a:visited {
    color: var(--text-secondary);
}

th a:hover, th a:focus {
    color: var(--text-primary);
}

th.sortable a {
    background-position: right;
    background-repeat: no-repeat;
}

th.asc a {
    background-image: url(skin/sorted_asc-d4a12261579f19fd589cc94bdb1756a5.svg);
}

th.desc a {
    background-image: url(skin/sorted_desc-282b731c420ec8fedbe9439ce440024c.svg);
}

.odd {
    background: var(--bg-subtle);
}

.even {
    background: var(--card-bg);
}

th:hover, tr:hover {
    background: var(--bg-hover);
}

/* PAGINATION */

.pagination {
    border-top: 0;
    margin: 0;
    padding: 0.3em 0.2em;
    text-align: center;
    background-color: var(--bg-subtle);
    border-radius: var(--radius-sm);
}

.pagination a,
.pagination .currentStep {
    color: var(--text-secondary);
    display: inline-block;
    margin: 0 0.1em;
    padding: 0.2em 0.6em;
    text-decoration: none;
    border-radius: var(--radius-xs);
}

.pagination a:hover, .pagination a:focus,
.pagination .currentStep {
    background-color: var(--color-primary);
    color: var(--text-on-primary);
    outline: none;
}

/* ACTION BUTTONS */

.buttons {
    border-top: solid 1px var(--border-color);
    overflow: hidden;
    padding: 0.3em;
    margin: 0.1em 0 0 0;
    border: none;
}

.buttons input,
.buttons a {
    float: right;
    background-color: var(--color-danger);
    border: 0;
    color: var(--text-on-primary);
    cursor: pointer;
    display: inline-block;
    font-family: inherit;
    margin: 0;
    overflow: visible;
    padding: 0.35em 1em;
    text-decoration: none;
    border-radius: var(--radius-pill);
    margin-right: var(--space-md);
    font-size: var(--font-base);
}

.buttons input:hover, .buttons input:focus,
.buttons a:hover, .buttons a:focus {
    background-color: var(--color-danger-light);
    color: var(--text-on-primary);
    outline: none;
}

a.skip {
    position: absolute;
    left: -9999px;
}

/* LOGIN PAGE */

.login_page {
    margin-left: auto;
    margin-right: auto;
    width: 320px;
}

.login_page h1 {
    margin: var(--space-2xl) 0;
}

.login_page input {
    width: 100%;
    margin-top: 5px;
    margin-bottom: var(--space-lg);
}

.login_page .submit_button,
.login_page .btn,
.login_page button[type="submit"] {
    margin-top: 10px;
    width: 100%;
    background-color: var(--color-primary);
    border: none;
    padding: 10px 15px;
    color: var(--text-on-primary);
    border-radius: var(--radius-pill) !important;
    font-weight: 600;
    font-size: var(--font-base);
}

/* MISC */

.form-info {
    font-size: 0.8em;
    color: var(--text-muted);
}

.large-label-form .fieldcontain label {
    width: 50%;
}

.legende {
    display: inline-block;
    float: right;
    margin-right: var(--space-xl);
    margin-bottom: var(--space-xl);
    padding: 10px;
    border: 1px solid var(--border-color);
    font-size: 0.8em;
    border-radius: var(--radius-md);
    background: var(--card-bg);
}

.legende h3 {
    font-size: 11px;
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
}

.legende ul {
    list-style: none;
}

.legende li {
    vertical-align: middle;
    margin-bottom: var(--space-xs);
}

.legende li .description {
    vertical-align: top;
    padding-left: var(--space-sm);
}

.legende_item {
    height: 18px;
    width: 18px;
    display: inline-block;
}

.legende_label {
    padding: var(--space-xs) var(--space-sm);
    margin-right: var(--space-xs);
}

h3.formSection {
    border-bottom: 1px solid var(--border-color);
    font-weight: normal;
    font-size: var(--font-base);
}

h4.formSection {
    margin-top: 10px;
    margin-bottom: 6px;
}

.whatsnew-html h5 {
    font-size: larger;
    margin-bottom: 6px;
    margin-top: var(--space-md);
}

.whatsnew-html h6 {
    font-size: 10pt;
    margin-bottom: 6px;
    margin-top: var(--space-md);
}

input:-webkit-autofill:focus {
    background-color: rgba(126, 214, 223, 0.17) !important;
}

h1, h2, h3 {
    margin-top: 10px;
    margin-bottom: 5px;
}

h2 {
    font-size: 1.1em;
}

.filename {
    font-style: italic;
}

.exceptionMessage {
    margin: 10px;
    border: 1px solid #000;
    padding: 5px;
    background-color: #E9E9E9;
}

.stack,
.snippet {
    margin: 0 25px 10px;
}

.stack,
.snippet {
    border: 1px solid #ccc;
    -mox-box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
    -webkit-box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
}

/* error details */
.error-details {
    border-top: 1px solid #FFAAAA;
    -mox-box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
    -webkit-box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid #FFAAAA;
    -mox-box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
    -webkit-box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
    background-color: #FFF3F3;
    line-height: 1.5;
    overflow: hidden;
    padding: 5px;
    padding-left: 25px;
}

.error-details dt {
    clear: left;
    float: left;
    font-weight: bold;
    margin-right: 5px;
}

.error-details dt:after {
    content: ":";
}

.error-details dd {
    display: block;
}

/* stack trace */
.stack {
    padding: 5px;
    overflow: auto;
    height: 150px;
}

/* code snippet */
.snippet {
    background-color: #fff;
    font-family: monospace;
}

.snippet .line {
    display: block;
}

.snippet .lineNumber {
    background-color: #ddd;
    color: #999;
    display: inline-block;
    margin-right: 5px;
    padding: 0 3px;
    text-align: right;
    width: 3em;
}

.snippet .error {
    background-color: #fff3f3;
    font-weight: bold;
}

.snippet .error .lineNumber {
    background-color: #faa;
    color: #333;
    font-weight: bold;
}

.snippet .line:first-child .lineNumber {
    padding-top: 5px;
}

.snippet .line:last-child .lineNumber {
    padding-bottom: 5px;
}
/* ============================================
   ASSIMIL BACK-OFFICE - MODERN SIDEBAR LAYOUT
   Variables are defined in theme.css
   ============================================ */

body, input, select, textarea, button, a, h1, h2, h3, h4, h5, h6, p, span, div, li, td, th, label {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ============================================
   SIDEBAR
   ============================================ */

.app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    z-index: 1040;
    overflow-y: auto;
    overflow-x: hidden;
    transition: width var(--transition-normal);
    display: flex;
    flex-direction: column;
}

/* Collapsed state - icons only */
.app-sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    min-height: var(--header-height);
}

/* "MENU" label in header */
.sidebar-menu-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: var(--text-primary);
    text-transform: uppercase;
}

.app-sidebar.collapsed .sidebar-menu-label {
    display: none;
}

.sidebar-env-badge {
    background-color: var(--color-primary);
    color: var(--text-on-primary);
    font-size: var(--font-2xs);
    padding: 2px var(--space-sm);
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: opacity var(--transition-fast);
}

.app-sidebar.collapsed .sidebar-env-badge {
    opacity: 0;
    width: 0;
    padding: 0;
    overflow: hidden;
}

.sidebar-nav {
    list-style: none;
    padding: var(--space-sm) 0;
    margin: 0;
    flex: 1;
}

.sidebar-nav li {
    list-style: none;
}

.sidebar-menu-item {
    position: relative;
}

.sidebar-menu-item > a,
.sidebar-menu-item > .sidebar-menu-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px var(--space-lg);
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 500;
    transition: background-color var(--transition-fast), color var(--transition-fast);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
}

.app-sidebar.collapsed .sidebar-menu-item > a,
.app-sidebar.collapsed .sidebar-menu-item > .sidebar-menu-toggle {
    padding: 14px 0;
    justify-content: center;
    gap: 0;
}

.sidebar-menu-item > a:hover,
.sidebar-menu-item > .sidebar-menu-toggle:hover {
    background-color: var(--sidebar-hover);
    color: var(--sidebar-text-hover);
}

.sidebar-menu-item > a:link,
.sidebar-menu-item > a:visited {
    color: var(--sidebar-text);
}

.sidebar-menu-item > a:hover {
    color: var(--sidebar-text-hover);
}

/* Icon styling - Phosphor outline icons */
.sidebar-menu-item > a i.ph,
.sidebar-menu-toggle i.ph:first-child {
    width: 24px;
    text-align: center;
    font-size: 1.35rem;
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: color var(--transition-fast);
}

/* Label text - hidden when collapsed */
.sidebar-menu-item > a > span,
.sidebar-menu-toggle > span {
    transition: opacity var(--transition-fast);
}

.app-sidebar.collapsed .sidebar-menu-item > a > span,
.app-sidebar.collapsed .sidebar-menu-toggle > span {
    display: none;
}

/* Submenu arrow - hidden when collapsed */
.submenu-arrow {
    margin-left: auto;
    font-size: 0.7rem !important;
    transition: transform 0.2s, color var(--transition-fast);
    color: var(--text-muted) !important;
    flex-shrink: 0;
}

.app-sidebar.collapsed .submenu-arrow {
    display: none;
}

.sidebar-menu-item.has-submenu.open > .sidebar-menu-toggle .submenu-arrow {
    transform: rotate(90deg);
}

/* ---- Active menu item ---- */
.sidebar-menu-item.active > a,
.sidebar-menu-item.active > .sidebar-menu-toggle {
    color: var(--sidebar-text-hover);
}

.sidebar-menu-item.active > a i.ph,
.sidebar-menu-item.active > .sidebar-menu-toggle i.ph:first-child {
    color: var(--color-logo);
}

/* Active indicator - small round dot, only for items without submenu */
.sidebar-menu-item.active:not(.has-submenu)::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background-color: var(--color-logo);
    border-radius: 50%;
}

/* Active indicator - dot next to active submenu item, centered under parent icon */
.sidebar-submenu li.active::before {
    content: '';
    position: absolute;
    left: 28px;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background-color: var(--color-logo);
    border-radius: 50%;
}

.sidebar-submenu li {
    position: relative;
}

/* Sub-menu */
.sidebar-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
    background-color: var(--sidebar-submenu-bg);
}

.sidebar-menu-item.has-submenu.open > .sidebar-submenu {
    max-height: 500px;
}

/* Hide submenu when sidebar is collapsed */
.app-sidebar.collapsed .sidebar-submenu {
    max-height: 0 !important;
}

.sidebar-submenu li a,
.sidebar-submenu li a:link,
.sidebar-submenu li a:visited {
    display: block;
    padding: 6px var(--space-lg) 6px 44px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: var(--font-sm);
    transition: color var(--transition-fast), background-color var(--transition-fast);
}

.app-sidebar.collapsed .sidebar-submenu li a {
    padding-left: var(--space-lg);
}

.sidebar-submenu li a:hover {
    color: var(--sidebar-text-hover);
    background-color: var(--sidebar-hover);
}

.sidebar-submenu li.active a,
.sidebar-submenu li.active a:link,
.sidebar-submenu li.active a:visited {
    color: var(--color-logo);
    font-weight: 600;
}

/* ---- Sidebar footer with collapse toggle ---- */
.sidebar-collapse-btn {
    background: none;
    border: none;
    color: var(--sidebar-text);
    cursor: pointer;
    padding: var(--space-sm) var(--space-md);
    opacity: 0.6;
    transition: opacity var(--transition-fast);
    font-size: 1.1rem;
}

.sidebar-collapse-btn:hover {
    opacity: 1;
}

/* ---- Tooltip on hover when collapsed ---- */
.app-sidebar.collapsed .sidebar-menu-item > a,
.app-sidebar.collapsed .sidebar-menu-item > .sidebar-menu-toggle {
    position: relative;
}

.app-sidebar.collapsed .sidebar-menu-item > a::after,
.app-sidebar.collapsed .sidebar-menu-item > .sidebar-menu-toggle::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(var(--sidebar-collapsed-width) + 6px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--text-primary);
    color: var(--text-on-primary);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: var(--font-xs);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
    z-index: 1050;
    box-shadow: var(--shadow-md);
}

.app-sidebar.collapsed .sidebar-menu-item > a:hover::after,
.app-sidebar.collapsed .sidebar-menu-item > .sidebar-menu-toggle:hover::after {
    opacity: 1;
}

/* ============================================
   TOP HEADER
   ============================================ */

.top-header {
    height: var(--header-height);
    background: var(--card-bg);
    border-bottom: none;
    display: flex;
    align-items: center;
    padding: 0 var(--space-xl);
    gap: var(--space-md);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.top-header-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: var(--space-sm);
}

/* SVG logo sizing and coloring */
.top-header-logo .logo-svg {
    height: var(--logo-height);
    width: auto;
    color: var(--color-logo);
}

/* On login page (no-sidebar), make logo larger */
.main-wrapper.no-sidebar .top-header-logo .logo-svg {
    height: var(--logo-height-login);
}

/* "Back-office" text next to logo */
.header-bo-text {
    color: var(--text-primary);
    font-weight: 500;
    font-size: var(--font-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.top-header .mainTitle {
    background-color: var(--color-primary);
    color: var(--text-on-primary);
    padding: 2px var(--space-sm);
    border-radius: var(--radius-pill);
    font-size: var(--font-2xs);
    text-transform: uppercase;
    font-weight: 600;
    float: none;
    margin: 0;
}

/* Sidebar SVG logo */
.sidebar-header .logo-svg {
    height: var(--logo-height-sidebar);
    width: auto;
    color: var(--color-logo);
}

.sidebar-toggle-btn {
    display: none; /* hidden on desktop */
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    font-size: var(--font-lg);
    color: var(--text-primary);
    cursor: pointer;
}

.sidebar-toggle-btn:hover {
    background-color: var(--page-bg);
}

.top-header-user {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.headerUserInfo {
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 500;
}

.header-logout-btn,
.header-logout-btn:link,
.header-logout-btn:visited {
    color: var(--text-secondary);
    font-size: var(--font-sm);
    text-decoration: none;
    padding: var(--space-xs) 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.header-logout-btn:hover {
    background: var(--page-bg);
    color: var(--text-primary);
}

/* ============================================
   MAIN WRAPPER & PAGE CONTENT
   ============================================ */

.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background-color: var(--page-bg);
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition-normal);
}

/* When sidebar is collapsed */
.main-wrapper.sidebar-collapsed {
    margin-left: var(--sidebar-collapsed-width);
}

.page-content {
    flex: 1;
    padding: var(--space-xl);
}

/* When no sidebar (login page) */
.main-wrapper.no-sidebar {
    margin-left: 0;
}

.main-wrapper.no-sidebar .top-header {
    justify-content: center;
}

.main-wrapper.no-sidebar .sidebar-toggle-btn {
    display: none;
}

.main-wrapper.no-sidebar .top-header-logo {
    display: flex;
}

/* Login page */
.main-wrapper.no-sidebar .top-header {
    padding-top: var(--space-xl);
    background-color: var(--card-bg);
}

.main-wrapper.no-sidebar .content-area {
    background-color: var(--card-bg);
}

.login_page {
    max-width: 400px;
    margin: 40px auto 0;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    padding: var(--space-xl) var(--space-xl) var(--space-lg);
}

.login_page h1 {
    font-weight: 300 !important;
    font-size: 1.5rem;
    text-align: center;
    letter-spacing: 1px;
    color: var(--text-primary);
    margin-bottom: var(--space-xl);
}

.login_page .form-control {
    border: none;
    border-bottom: 1px solid var(--border-light);
    border-radius: 0;
    padding-left: 0;
    background: transparent;
    font-size: 0.95rem;
}

.login_page .form-control:focus {
    box-shadow: none;
    border-bottom-color: var(--color-primary);
}

.login_page .form-floating label {
    padding-left: 0;
    color: var(--text-muted);
}

.login_page .btn-theme {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    letter-spacing: 0.5px;
    margin-top: var(--space-md);
}

/* Overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1035;
}

.sidebar-overlay.open {
    display: block;
}

/* ============================================
   BUTTONS
   ============================================ */

.custom-form div {
    margin-bottom: var(--space-md);
}

a.btn, a.btn:link, a.btn:visited, a.btn:hover {
    color: var(--text-on-primary);
    text-decoration: none;
    border-radius: var(--radius-pill);
}

.btn {
    color: var(--text-on-primary);
    border-radius: var(--radius-pill) !important;
    font-size: 0.8rem;
}

.btn-theme, .btn-theme-secondary {
    border-radius: var(--radius-pill) !important;
}

.btn-theme:hover {
    background-color: var(--color-primary-lighter) !important;
    border-color: var(--color-primary-lighter) !important;
}

.btn-theme-secondary:hover {
    background-color: var(--color-secondary-light) !important;
    border-color: var(--color-secondary-light) !important;
}

.checkbox-label {
    padding-left: 10px;
    padding-top: 3px;
}

.form-check-label {
    padding-left: 10px;
}

.btn-theme {
    background-color: var(--color-primary-light);
    border-color: var(--color-primary-light);
}

.btn-theme-secondary {
    background-color: var(--color-secondary);
    border-color: var(--color-secondary);
}

.btn-smart-width {
    width: auto;
    padding: var(--space-xs) 10px;
}

.icon-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
}

.icon-btn .ph {
    font-size: 1.3em;
}

/* ---- Warning banner ---- */
.warning-banner {
    padding: var(--space-md) var(--space-lg);
    background: rgba(var(--color-primary-rgb), 0.08);
    border: 1px solid rgba(var(--color-primary-rgb), 0.3);
    border-radius: 8px;
    font-size: 0.9em;
}

.btn-default {
    background-color: var(--color-success);
    border-color: var(--color-success);
}

table .btn {
    padding-left: var(--space-sm) !important;
    padding-right: var(--space-sm) !important;
    font-size: 0.8em !important;
}

.btn-theme.active {
    background-color: var(--color-danger-light);
    border-color: var(--color-danger-light);
}

.btn-primary:hover,
.btn-primary:active,
.btn-outline-primary:hover,
.btn-outline-primary:active {
    background-color: var(--color-primary-lighter);
    border-color: var(--color-primary-lighter);
    color: var(--text-on-primary);
}

/* ============================================
   TABLES - compact
   ============================================ */

.list {
    padding: 0;
}

.list table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* Hide table header when no results */
.list table:not(:has(tbody tr)) thead {
    display: none;
}

.list table thead {
    background: var(--sidebar-submenu-bg);
}

.list table thead th,
.list table thead td {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 2px solid var(--border-light);
    font-size: var(--font-base);
}

.list table tbody tr {
    transition: background-color var(--transition-fast);
}

.list table tbody tr:hover {
    background-color: rgba(var(--color-primary-rgb), 0.03);
}

.list table tbody tr {
    position: relative;
}

.list table tbody tr:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: var(--space-2xl);
    right: var(--space-2xl);
    height: 1px;
    background-color: transparent;
}

.list table tbody td {
    padding: var(--space-sm) var(--space-lg);
    vertical-align: top;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Extra padding on first/last cells for card-like spacing */
.list table thead th:first-child,
.list table thead td:first-child,
.list table tbody td:first-child {
    padding-left: var(--space-2xl);
}

.list table thead th:last-child,
.list table thead td:last-child,
.list table tbody td:last-child {
    padding-right: var(--space-2xl);
}

.list table tbody td ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.list table tbody td ul li {
    padding: 1px 0;
}

/* ---- Icon colors in table ---- */
.list table .icon-email {
    color: var(--text-secondary);
}

.list table .icon-user {
    color: var(--color-primary-light);
}

.list table .icon-book {
    color: var(--color-primary);
    font-size: 1.15em;
}

.list table .icon-globe {
    color: var(--color-info);
}

.list table .icon-link {
    color: var(--color-primary);
    font-size: 16px;
}

.list table .icon-payment {
    color: var(--color-primary);
}

.list table .icon-credit-card {
    color: var(--color-secondary);
}

.list table .icon-tag {
    color: var(--color-secondary);
}

.list table .icon-warning {
    color: var(--color-warning);
}

.list table .icon-shield {
    color: var(--color-purple);
}

.list table .icon-db {
    color: var(--text-muted);
}

/* ---- SKU link ---- */
.list table .sku-link {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 1em;
}

.list table .sku-link:hover {
    color: var(--color-primary-light);
}

/* ---- Copy button ---- */
.btn-copy {
    display: inline-block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 4px;
    opacity: 0.7;
    transition: opacity 0.2s;
    vertical-align: middle;
}

.list table .btn-copy .fa, .btn-copy .fa {
    color: var(--color-primary) !important;
    font-size: 0.9em;
    pointer-events: none;
}

.btn-copy:hover {
    opacity: 1;
}

/* ---- Price ---- */
.list table .price {
    color: var(--text-primary);
    font-weight: 600;
}

/* ---- Muted info ---- */
.list table .info-muted {
    color: var(--text-muted);
    font-size: 0.85em;
}

.list table .info-lang {
    font-size: 0.8em;
    color: var(--text-secondary);
}

/* ---- Date ---- */
.list table .info-date {
    color: var(--text-secondary);
    font-size: 0.8em;
    margin-top: 6px;
}

/* ---- Refund date ---- */
.list table .refund-date {
    color: var(--color-danger);
    font-weight: 600;
}

/* ---- Separator ---- */
.separator {
    color: var(--text-muted);
    margin: 0 2px;
}

/* ---- Badges inline ---- */
.badge-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7em;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-purchase {
    background-color: rgba(var(--color-primary-rgb), 0.12);
    color: var(--color-primary);
}

.badge-trial {
    background-color: rgba(var(--color-primary-rgb), 0.06);
    color: rgba(var(--color-primary-rgb), 0.6);
}

.badge-active, .badge-completed, .badge-validated {
    background-color: rgba(46, 204, 113, 0.12);
    color: var(--color-green);
}

.badge-revoked, .badge-refunded {
    background-color: rgba(255, 71, 87, 0.1);
    color: var(--color-danger);
}

.badge-pending, .badge-preparation {
    background-color: rgba(230, 126, 51, 0.12);
    color: var(--color-warning);
}

/* ---- Revoke button ---- */
.btn-revoke {
    display: inline-block;
    background-color: var(--color-purple) !important;
    color: var(--text-on-primary) !important;
    border: none !important;
    border-radius: var(--radius-sm);
    padding: 4px 10px;
    margin: 6px 0;
    font-size: 0.85em;
    text-decoration: none;
}

.btn-revoke .fa {
    color: var(--text-on-primary) !important;
}

.btn-revoke:hover {
    opacity: 0.85;
}

td.bordered {
    border-left: solid 1px var(--border-light);
    border-right: solid 1px var(--border-light);
    padding-left: var(--space-sm);
    padding-right: var(--space-sm);
}

table.innerTable td {
    line-height: 1.0em;
}

th {
    font-size: var(--font-sm);
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
}

th.sortable a {
    background: url(skin/sorted_asc-d4a12261579f19fd589cc94bdb1756a5.svg) no-repeat right top, url(skin/sorted_desc-282b731c420ec8fedbe9439ce440024c.svg) no-repeat right bottom;
}

th.desc a {
    background-image: url(skin/sorted_asc-d4a12261579f19fd589cc94bdb1756a5.svg);
}

th.asc a {
    background-image: url(skin/sorted_desc-282b731c420ec8fedbe9439ce440024c.svg);
}

/* ---- Details toggle icon ---- */
details summary::-webkit-details-marker {
    display: none;
}

details[open] > summary .content-toggle-icon {
    transform: rotate(90deg);
}

/* ---- Section card (shared by revenue, lists, forms) ---- */
.list-section {
    background: var(--bg-subtle, #f7f7f7);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: var(--space-lg);
}

/* ---- Table inside a section card ---- */
.list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1em;
}

.list-table th {
    text-align: left;
    padding: 10px 12px;
    color: var(--text-secondary, #64748b);
    font-weight: 500;
    border-bottom: 2px solid var(--border-color, #e2e8f0);
    white-space: nowrap;
}

.list-table th.right,
.list-table td.right {
    text-align: right;
}

.list-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    color: var(--text-primary, #1e293b);
}

.list-table tr:last-child td {
    border-bottom: none;
}

.list-table tr:hover td {
    background: rgba(0, 0, 0, 0.02);
}

/* When table is inside list-section, the section provides the card look */
.list-section table {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
    margin: 0;
}

.list-section .list-table th,
.list-section .list-table td {
    padding: 10px 12px;
}

/* No extra first/last cell indent - section padding handles it */
.list-section .list-table th:first-child,
.list-section .list-table td:first-child {
    padding-left: 12px;
}

.list-section .list-table th:last-child,
.list-section .list-table td:last-child {
    padding-right: 12px;
}

.no-data {
    text-align: center;
    padding: 32px;
    color: var(--text-muted, #94a3b8);
    font-style: italic;
}

/* ---- Légende ---- */
ul.legende {
    display: flex;
    float: none;
    flex-wrap: wrap;
    gap: var(--space-lg);
    list-style: none;
    padding: var(--space-2xl);
    margin: 0 0 var(--space-lg) 0;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    font-size: var(--font-sm);
    color: var(--text-primary);
}

/* Inside list-section, the section provides the card look */
.list-section ul.legende {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
}

ul.legende li {
    display: flex;
    align-items: center;
    gap: 0.4em;
}

ul.legende li.legende-achat i {
    color: var(--color-primary);
}

ul.legende li.legende-trial i {
    color: rgba(var(--color-primary-rgb), 0.6);
}

ul.legende li.legende-check i {
    color: var(--color-purple);
}

/* ============================================
   FORMS - compact
   ============================================ */

.formArea {
    padding: var(--space-md) var(--space-xl);
    border-bottom: solid 1px var(--border-color);
    border-top: solid 1px var(--border-color);
}

.formSearchArea {
    background-color: var(--card-bg);
    margin-bottom: var(--space-lg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: var(--space-2xl);
}

/* When formSearchArea is also list-section, list-section provides the card */
.list-section.formSearchArea {
    border: none;
}

.form-floating > .form-control,
.form-floating > .form-select {
    font-size: var(--font-base);
    height: calc(2.8rem + 2px);
    min-height: calc(2.8rem + 2px);
    padding-top: 1.4rem;
    padding-bottom: 0.25rem;
}

.form-floating > label {
    padding-top: 0.55rem;
    padding-bottom: 0.25rem;
    font-size: var(--font-sm);
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-select ~ label {
    transform: scale(0.7) translateY(-0.55rem);
    transform-origin: left top;
    opacity: 0.65;
}

/* Force label back inside for empty readonly fields */
.form-floating > .form-control:placeholder-shown:not(:focus) ~ label {
    transform: none;
    opacity: 1;
}

/* --- Multiselect padding --- */
select.form-select[multiple] {
    padding: 10px 14px;
    height: auto !important;
    min-height: auto !important;
}

.form-control:focus {
    border-color: var(--color-primary-light);
    box-shadow: 0 0 0 0.2rem rgba(var(--color-primary-rgb), 0.2);
    background-color: rgba(var(--color-primary-rgb), 0.04);
}

/* ============================================
   PAGE HEADER (title + action buttons)
   ============================================ */

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.page-header h1 {
    margin: 0;
}

/* Action sidebar (Créer, etc.) inside page-header */
.page-header .sidebar {
    position: static;
    width: auto;
    background: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
}

.page-header .sidebar ul {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-header .sidebar li .menuSeparator {
    display: none;
}

.page-header .sidebar li a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background: var(--color-primary);
    color: var(--text-on-primary);
    border-radius: var(--radius-pill);
    font-size: var(--font-base);
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s, box-shadow 0.2s;
}

.page-header .sidebar li a:hover {
    background: var(--color-primary-dark, #1a8a96);
    box-shadow: var(--shadow-sm);
}

/* ============================================
   HEADINGS
   ============================================ */

h1.contenerTitle,
#page-body > h1,
.page-header h1 {
    margin-bottom: var(--space-lg);
    font-weight: 400;
    font-size: 1.8em;
    color: var(--text-primary);
}

h1.contenerTitle .title-action,
#page-body > h1 .title-action,
.page-header h1 .title-action {
    color: var(--color-primary);
}

h1.contenerTitle .title-separator,
#page-body > h1 .title-separator,
.page-header h1 .title-separator {
    color: var(--text-secondary);
    margin: 0 0.3em;
}

h2, h3 {
    margin-top: 0.8em;
    margin-bottom: 0.3em;
    font-size: var(--font-md);
    text-transform: uppercase;
    color: var(--text-secondary);
    font-weight: 600;
}

h3 {
    font-size: 0.8em;
}

h2.formTitle {
    border-bottom: solid 1px var(--border-color);
}

h3.formSection {
    text-transform: uppercase;
    padding-top: var(--space-lg);
    border-bottom: 1px solid var(--border-color);
    font-weight: normal;
    font-size: var(--font-base);
}

h3.formHeader {
    text-transform: uppercase;
    padding-top: var(--space-xs);
    border-top: solid 1px lightgray;
    border-bottom: solid 1px lightgray;
    padding-bottom: var(--space-xs);
}

p {
    line-height: 1.5;
    margin: 0.25em 0;
}

/* ============================================
   PAGINATION
   ============================================ */

.paginateButtons {
    margin-top: var(--space-xl);
    margin-bottom: var(--space-xl);
    font-size: 0.8em;
    text-align: center;
    width: 100%;
    text-transform: uppercase;
}

.paginateButtons a, .paginateButtons .currentStep {
    margin-right: var(--space-sm);
    background-color: var(--bg-highlight);
    padding: var(--space-xs) 10px;
    border-radius: var(--radius-xs);
}

.paginateButtons .currentStep {
    font-weight: bold;
    background-color: var(--card-bg);
    border: solid 1px var(--color-primary-light);
}

.listIntro {
    padding-bottom: 10px;
}

/* ============================================
   LINKS
   ============================================ */

a {
    text-decoration: none;
}

a:link, a:visited, a:hover {
    color: var(--text-link);
}

.visibleLinks {
    color: var(--text-body);
}

.visibleLinks a:link, .visibleLinks a:visited, .visibleLinks a:active, .visibleLinks a, a.visibleLinks {
    color: var(--text-link-accent);
}

ul.listInMainContent {
    list-style: disc;
    padding-top: 10px;
}

ul.sublist {
    list-style: disc;
    padding: 10px 0 10px var(--space-xl);
}

/* ============================================
   CONTENT AREAS
   ============================================ */

.legende_title {
    text-transform: uppercase;
    font-weight: bold;
    font-size: var(--font-base);
}

.nbResults {
    padding-right: var(--space-lg);
    text-transform: uppercase;
    color: var(--color-primary);
    font-size: var(--font-base);
}

.disabled, a.disabled {
    font-style: italic;
    color: gray !important;
}

.linkList {
    padding-top: var(--space-sm);
    padding-bottom: var(--space-sm);
}

.linkList li {
    padding: var(--space-sm);
}

.linkList li ul {
    padding: var(--space-lg);
    background-color: var(--bg-highlight);
    margin-top: var(--space-sm);
}

.sectionList {
    padding-top: var(--space-sm);
    font-size: var(--font-base);
    color: var(--text-link-accent);
}

.true {
    color: var(--color-danger);
}

.smallPadding, .linkList li.smallPadding {
    padding: 2px;
}

.ok {
    color: var(--color-success);
}

/* ============================================
   JOBS
   ============================================ */

.jobsArea h3 {
    margin: var(--space-lg) 0 var(--space-xs) 0;
    text-transform: uppercase;
    font-size: var(--font-base);
}

.jobsArea a:link, .jobsArea a:visited, .jobsArea a:active, .jobsArea a, a.jobsArea {
    color: var(--text-link-accent);
}

/* ============================================
   BADGES
   ============================================ */

.badge, .toUpdateBadge, .errorBadge {
    background: var(--color-danger);
    color: var(--text-on-primary);
    padding: 3px var(--space-sm);
    font-size: var(--font-sm);
    text-transform: uppercase;
    border-radius: var(--radius-pill);
    margin-left: var(--space-sm);
}

.badgePositive {
    background: var(--color-success);
}

.badgeFailure {
    background: grey;
}

.badgeHacked {
    background: black;
}

.toUpdateBadge {
    background: var(--color-purple);
    font-size: var(--font-base);
}

.errorBadge {
    background: #000;
    font-size: var(--font-base);
}

.processingBadge {
    background: var(--color-warning);
    font-size: var(--font-base);
}

.count {
    width: 35px;
    display: inline-block;
    text-align: right;
    padding-right: var(--space-sm);
}

.lightLabel {
    color: gray;
}

.smallLightLabel {
    color: gray;
    font-size: 0.8em;
}

.deactivated {
    text-decoration: line-through;
}

.false {
    text-decoration: line-through;
}

/* ============================================
   DASHBOARD
   ============================================ */

.dashboard-cards {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.dashboard-card {
    flex: 1;
    min-width: 200px;
    background: var(--bg-subtle, #f7f7f7);
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
}

.dashboard-card .card-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.dashboard-card .card-icon .ph {
    font-size: 2em;
    color: var(--text-on-primary);
}

.dashboard-card .card-value {
    font-size: 1.8em;
    font-weight: 600;
    color: var(--text-primary, #1e293b);
    margin-bottom: 4px;
}

.dashboard-card .card-label {
    font-size: 0.9em;
    color: var(--text-secondary, #64748b);
}

.dashboard-card .card-refund {
    font-size: 0.8em;
    color: var(--color-danger);
    margin-top: 4px;
}

.dashboard-card .card-previous {
    font-size: 0.95em;
    color: var(--text-primary, #1e293b);
    margin-top: 6px;
}

.dashboard-card .card-platform {
    font-size: 0.85em;
    color: var(--text-muted, #94a3b8);
    margin-top: 6px;
}

/* ---- Chart section ---- */
.dashboard-chart {
    background: var(--bg-subtle, #f7f7f7);
    border-radius: 12px;
    padding: 24px 28px;
    margin-top: 24px;
}

.dashboard-chart .chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.dashboard-chart .chart-title {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-primary, #1e293b);
    display: flex;
    align-items: center;
    gap: 10px;
}

.year-nav {
    cursor: pointer;
    font-size: 0.85em;
    color: var(--text-muted, #94a3b8);
    padding: 2px 6px;
    border-radius: 4px;
    user-select: none;
    transition: color 0.2s;
}

.year-nav:hover {
    color: var(--color-primary, #3ab3ff);
}

.dashboard-chart .chart-legend {
    display: flex;
    gap: 20px;
    font-size: 0.85em;
    color: var(--text-secondary, #64748b);
}

.dashboard-chart .chart-legend span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dashboard-chart .chart-legend .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

/* ---- Chart toggle ---- */
.chart-toggle {
    display: flex;
    background: var(--bg-surface, #e8e8e8);
    border-radius: 6px;
    overflow: hidden;
    font-size: 0.82em;
}

.chart-toggle button {
    border: none;
    background: transparent;
    padding: 5px 14px;
    cursor: pointer;
    color: var(--text-secondary, #64748b);
    transition: all 0.2s;
    font-family: inherit;
    font-size: inherit;
}

.chart-toggle button.active {
    background: var(--color-primary, #3ab3ff);
    color: var(--text-on-primary);
    border-radius: 6px;
}

/* ============================================
   MISC UTILITIES
   ============================================ */

#page-body {
    margin: 1.5em 1em;
}

#controller-list ul {
    list-style-position: inside;
}

#controller-list li {
    line-height: 1.3;
    list-style-position: inside;
    margin: 0.25em 0;
}

.strong {
    font-weight: bold;
}

.tradItem {
    margin-bottom: var(--space-xs);
    text-transform: uppercase;
    font-size: smaller;
    color: white;
    width: 80px;
}

.tradItem input, .tradItem span a, .tradItem span a:link {
    padding: 2px 6px;
    color: white;
    border: none;
    text-transform: uppercase;
}

.tradItem input.done, .tradItem span.done a:link {
    background-color: var(--color-success);
    padding: 2px 6px;
}

.tradItem input.todo, .tradItem span.todo a:link {
    background-color: var(--color-danger);
    padding: 2px 6px;
}

.tradReferenceForm {
    margin-top: 6px;
    background-color: var(--bg-muted);
    padding: 10px;
    margin-bottom: 14px;
}

.reference h3.formSection {
    padding-top: 0;
}

.lastUpdate {
    border: solid 1px var(--border-color);
    float: right;
    padding: var(--space-sm);
    text-transform: uppercase;
    font-size: smaller;
    border-radius: var(--radius-sm);
    background: var(--card-bg);
}

.lastUpdate span {
    font-weight: 600;
}

.tradOtherForm {
    border: solid 1px lightgray;
    padding: 10px;
}

.tradOtherForm .existingTranslation h3 {
    text-transform: uppercase;
}

.adminInfoStyle {
    text-transform: uppercase;
    color: var(--color-danger);
}

.smaller {
    font-size: var(--font-base);
}

.btn-link {
    background-color: black;
    color: white;
    padding: var(--space-xs) 10px;
    border-radius: var(--radius-pill);
}

a.btn-link:link, .btn-link, a.btn-link:visited, a.btn-link hover {
    color: white;
    font-size: var(--font-xs);
    margin-left: 0;
}

.explanation {
    font-size: var(--font-base);
    margin-bottom: var(--space-sm);
    margin-top: var(--space-xs);
}

.importantDate {
    font-weight: bold;
    padding: 0 0 0 var(--space-sm);
}

.separator {
    padding: 0 1px;
}

.tagsList {
    display: inline-block;
    margin-bottom: var(--space-sm);
    font-size: 0.8em;
    background: var(--card-bg);
    border: solid black 1px;
    color: black;
}

.eventInfoArea {
    margin-top: var(--space-sm);
}

.weekDay .zoneId {
    font-size: 0.8em;
    text-transform: uppercase;
}

.zoneId {
    margin-left: var(--space-xs);
}

.global_btns {
    text-transform: uppercase;
    font-size: var(--font-base);
}

.global_btns a {
    font-size: 0.8em;
}

/* ============================================
   TOOLTIPS
   ============================================ */

.tooltip {
    position: relative;
    display: inline-block;
    border-bottom: 1px dotted var(--color-primary);
    border-top: 1px dotted var(--color-primary);
}

.tooltip .tooltipText {
    visibility: hidden;
    width: auto;
    background-color: black;
    color: var(--text-on-primary);
    text-align: center;
    padding: 5px 10px;
    border-radius: var(--radius-xs);
    position: absolute;
    z-index: 1;
    top: -30px;
    right: 50%;
}

.tooltip:hover .tooltipText {
    visibility: visible;
}

/* ============================================
   POPUP LIST (autocomplete)
   ============================================ */

.popup-list {
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    z-index: 1000;
    background-color: var(--card-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    min-width: 300px;
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid var(--border-input);
}

.popup-list li {
    padding: var(--space-sm) var(--space-lg);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.popup-list li:hover {
    background-color: var(--bg-subtle);
}

/* ============================================
   DATE PICKERS
   ============================================ */

.input-group .input-group-addon select#start_day,
.input-group .input-group-addon select#end_day,
.input-group .input-group-addon select#start_month,
.input-group .input-group-addon select#end_month,
.input-group .input-group-addon select#start_year,
.input-group .input-group-addon select#end_year {
    padding: 0.35em 0.8em;
    border: 1px solid var(--border-input);
    border-radius: var(--radius-pill);
    font-size: var(--font-sm);
    background-color: var(--card-bg);
    color: var(--text-body);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5em center;
    padding-right: 1.8em;
    cursor: pointer;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input-group .input-group-addon select:hover {
    border-color: var(--color-primary-light);
}

.input-group .input-group-addon select:focus {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-focus);
    outline: none;
}

/* Round toggle switches for checkboxes */
.form-check {
    padding-left: 3em;
}

.form-check .form-check-input {
    width: 2.4em;
    height: 1.4em;
    border-radius: 0.7em;
    appearance: none;
    -webkit-appearance: none;
    background-color: var(--text-muted);
    border: none;
    cursor: pointer;
    position: relative;
    transition: background-color var(--transition-fast);
    vertical-align: middle;
    flex-shrink: 0;
    margin-left: -3em;
}

.form-check .form-check-input::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: calc(1.4em - 6px);
    height: calc(1.4em - 6px);
    border-radius: 50%;
    background-color: white;
    transition: transform var(--transition-fast);
}

.form-check .form-check-input:checked {
    background-color: var(--color-primary);
}

.form-check .form-check-input:checked::before {
    transform: translateX(1em);
}

/* ============================================
   IMPORTANT INFO, OPTIONS
   ============================================ */

.paletteColorsInForm {
    margin-left: 294px;
    padding-top: var(--space-lg);
}

.btn_form {
    width: 24px;
    margin-left: var(--space-sm);
    font-weight: bold;
}

.reporting li {
    margin-top: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.importantInfo {
    border: solid 1px var(--border-color);
    padding: 10px;
    margin-bottom: var(--space-lg);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
}

.importantInfo ul {
    padding: var(--space-sm);
    list-style: disc;
    list-style-position: inside;
}

.importantInfo ul li {
    list-style: disc;
    list-style-position: inside;
    padding-top: var(--space-xs);
}

.optionalSection {
    background-color: var(--bg-muted);
    padding: var(--space-lg);
    padding-top: 6px;
    margin-bottom: var(--space-sm);
    margin-top: var(--space-sm);
    border-radius: var(--radius-sm);
}

.versionOption {
    font-variant: small-caps;
    color: var(--color-danger);
}

.commonOption {
    font-variant: small-caps;
    color: var(--text-primary);
    font-weight: 600;
}

.summary-table {
    margin-bottom: var(--space-xl);
    border-bottom: solid lightgrey 1px;
}

.summary-table th {
    font-weight: bold;
    text-align: center;
}

.summary-table-main th {
    background-color: var(--bg-purple-light);
}

ol, ul {
    list-style: none;
    color: var(--text-body);
}

.menuSeparator {
    margin-right: 5px;
    margin-left: 5px;
    color: lightgray;
}

/* ============================================
   RESPONSIVE — SIDEBAR LAYOUT
   ============================================ */

/* Tablet: keep collapsed sidebar */
@media screen and (max-width: 1024px) {
    :root {
        --sidebar-width: 200px;
    }
}

/* Mobile: sidebar off-canvas */
@media screen and (max-width: 768px) {

    /* Sidebar hidden by default, slides in — override collapsed state */
    .app-sidebar,
    .app-sidebar.collapsed {
        transform: translateX(-100%);
        width: 260px;
    }

    .app-sidebar.open {
        transform: translateX(0);
    }

    /* Main content takes full width */
    .main-wrapper,
    .main-wrapper.sidebar-collapsed {
        margin-left: 0;
    }

    /* Show hamburger button */
    .sidebar-toggle-btn {
        display: inline-flex;
    }

    /* Show logo in top header on mobile */
    .top-header-logo {
        display: flex;
    }

    .top-header {
        padding: 0 12px;
    }

    /* Page content less padding */
    .page-content {
        padding: 12px;
    }

    /* Nav adjustments */
    .nav {
        padding: 0.3em;
    }

    .nav li {
        margin: 0 0.4em 0 0;
        padding: 0.2em;
    }

    /* Hide individual steps in pagination */
    .pagination .step, .pagination .currentStep {
        display: none;
    }

    .pagination .prevLink {
        float: left;
    }

    .pagination .nextLink {
        float: right;
    }

    .pagination {
        overflow: hidden;
    }

    /* Forms compact */
    fieldset,
    .property-list {
        padding: 0.3em 0.6em 0.8em;
    }

    input, textarea {
        width: 100%;
        box-sizing: border-box;
    }

    select, input[type=checkbox], input[type=radio], input[type=submit], input[type=button], input[type=reset] {
        width: auto;
    }

    /* Stack form fields */
    .fieldcontain {
        margin-top: 0.5em;
    }

    .fieldcontain label,
    .fieldcontain .property-label,
    .fieldcontain .property-value {
        display: block;
        float: none;
        margin: 0 0 0.2em 0;
        text-align: left;
        width: auto;
    }

    .errors ul,
    .message p {
        margin: 0.5em;
    }

    .error ul {
        margin-left: 0;
    }

    /* Logo smaller on mobile */
    .sidebar-header img {
        height: 24px;
    }

    /* Hide all but first column on very small screens */
    .scaffold-list td:not(:first-child),
    .scaffold-list th:not(:first-child) {
        display: none;
    }

    .scaffold-list thead th {
        text-align: center;
    }

    /* Hide header user info on very small screens */
    .headerUserInfo {
        display: none;
    }

    /* formBtnArea */
    .formBtnArea {
        float: none;
        padding-right: 0;
        padding-bottom: 12px;
        text-align: center;
    }

    /* Legende */
    .legende {
        float: none;
        margin-right: 0;
        margin-bottom: 12px;
    }

    /* lastUpdate */
    .lastUpdate {
        float: none;
        margin-bottom: 8px;
    }
}

/* Very small screens */
@media screen and (max-width: 480px) {
    #page-body {
        margin: 0.8em;
    }

    #page-body h1 {
        margin-top: 0;
    }

    .top-header-user {
        gap: 6px;
    }

    .header-logout-btn {
        padding: 3px 6px;
        font-size: 0.7rem;
    }
}

/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS file within this directory can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the top of the
* compiled file, but it's generally better to create a new file per style scope.
*
*= require theme
*= require main
*= require themes/ui-lightness/jquery-ui-1.10.4.custom.min
*= require font-awesome/font-awesome.min
*= require errors
*= require style
*= require mobile
*/

