/* ==========================================================================
   enix-base.css — global EnixServer look for every Bootstrap 4 / Twenty-One
   component used by the enixnova WHMCS template.
   Colours: ONLY tokens from enix-tokens.css (dark default, html[data-theme=light]).
   Does NOT style the site chrome (enix-chrome.css) nor page layouts
   (enix-clientarea.css / order form).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Document, typography, links
   -------------------------------------------------------------------------- */
html { scroll-behavior: smooth; }

body,
body.primary-bg-color,
.primary-bg-color {
  background-color: var(--bg);
  color: var(--text);
}
body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color .25s ease, color .25s ease;
}

::selection { background: var(--primary); color: #fff; }

/* scrollbars like the site */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--font-head);
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--text);
  line-height: 1.2;
}
h5, h6, .h5, .h6 { font-weight: 700; letter-spacing: 0; }
strong, b { font-weight: 700; }

a { color: var(--primary); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--primary-hover); text-decoration: none; }
a:focus { text-decoration: none; }
/* visible keyboard focus everywhere (mouse clicks don't show it) */
a:focus-visible, button:focus-visible, .btn:focus-visible,
[role="button"]:focus-visible, summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
a:not([href]):not([class]), a:not([href]):not([class]):hover { color: inherit; }

.text-muted { color: var(--text-muted) !important; }
.text-dark, .text-body { color: var(--text) !important; }
.text-black-50, .text-white-50 { color: var(--text-muted) !important; }
.text-primary, .text-info { color: var(--primary) !important; }
a.text-primary:hover, a.text-primary:focus { color: var(--primary-hover) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-secondary { color: var(--text-muted) !important; }

.bg-white, .bg-light, .bg-default { background-color: var(--card) !important; color: var(--text); }
.bg-secondary { background-color: var(--bg-subtle) !important; }
.bg-dark { background-color: var(--bg-subtle) !important; color: var(--text); }
.bg-primary { background-color: var(--primary) !important; }

.border, .border-top, .border-right, .border-bottom, .border-left { border-color: var(--border) !important; }

hr { border: 0; border-top: 1px solid var(--border); }

code, kbd, pre, samp, .text-monospace { font-family: var(--font-mono); }
code {
  color: var(--primary);
  background: var(--primary-soft);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 85%;
}
pre {
  color: var(--text);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
pre code { background: transparent; padding: 0; color: inherit; }
kbd { background: var(--card-hover); color: var(--text); border: 1px solid var(--border-strong); border-radius: 6px; box-shadow: none; }
blockquote, .blockquote { border-left: 3px solid var(--border-strong); padding-left: 14px; color: var(--text-muted); }
mark, .mark { background: var(--primary-soft); color: var(--text); padding: 0 4px; border-radius: 4px; }

/* --------------------------------------------------------------------------
   2. Main body
   -------------------------------------------------------------------------- */
/* Bootstrap .container = the site's .wrap (1280px, 24px gutters) so content lines up with the header */
.container,
body.enix-body .container {
  width: 100%;
  max-width: 1280px;
  padding-left: 24px;
  padding-right: 24px;
}

/* sticky footer on short pages (chrome sets height:auto; min-height:100% on body.enix-body) */
body.enix-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body.enix-body > section#main-body { flex: 1 0 auto; }
body.enix-body > footer, body.enix-body > .site-footer { flex-shrink: 0; }

section#main-body {
  padding: 36px 0 64px;
  min-height: 420px;
  background: transparent;
  color: var(--text);
}
.main-content, section#main-content { margin-bottom: 40px; }
.primary-content { color: var(--text); }

.w-hidden { display: none; }

/* --------------------------------------------------------------------------
   3. Cards
   -------------------------------------------------------------------------- */
.card,
.mc-promo-manage,
.mc-promo-login {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  box-shadow: none;
  transition: border-color .2s ease, background-color .2s ease;
}
.card:hover { border-color: var(--border-strong); }

.card-header,
.card-footer {
  background-color: var(--bg-subtle);
  border-color: var(--border);
  color: var(--text);
  padding: 14px 20px;
}
.card-header { border-bottom: 1px solid var(--border); }
.card-footer { border-top: 1px solid var(--border); }
.card-header:first-child { border-radius: calc(var(--radius-md) - 1px) calc(var(--radius-md) - 1px) 0 0; }
.card-footer:last-child { border-radius: 0 0 calc(var(--radius-md) - 1px) calc(var(--radius-md) - 1px); }

.card-title,
.primary-content .card-title {
  font-family: var(--font-head);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.015em;
}
.primary-content .card-title { font-size: 22px; margin-bottom: 20px; }
.card-subtitle, .card-text { color: var(--text-muted); }
.card-body { color: var(--text); }
.primary-content .card,
.primary-content .mc-promo-manage,
.primary-content .mc-promo-login { margin-bottom: 18px; }
.primary-content .card-body { padding: 24px; }

/* login / small centred cards */
.primary-content .card.mw-540,
.primary-content .card.mw-750 { box-shadow: var(--shadow); }
.primary-content .card.mw-540 .card-body .h3,
.primary-content .card.mw-540 .card-body h1,
.primary-content .card.mw-540 .card-body h3 { font-size: 28px; margin-bottom: 6px; }
.primary-content .card.mw-540 .card-footer { background: transparent; padding-top: 18px; padding-bottom: 18px; text-align: center; color: var(--text-muted); }

/* --------------------------------------------------------------------------
   4. Buttons  (site .btn: pill, weight 700, no glow)
   -------------------------------------------------------------------------- */
.btn:not(.btn-return-to-admin) {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
  padding: 10px 22px;
  border-radius: 40px;
  border: 1px solid transparent;
  box-shadow: none;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s cubic-bezier(.16,1,.3,1);
}
.btn:not(.btn-return-to-admin):hover { transform: translateY(-1px); text-decoration: none; }
.btn:active, .btn.active { transform: translateY(0); }
.btn:not(.btn-return-to-admin):focus, .btn:not(.btn-return-to-admin).focus { outline: 0; box-shadow: 0 0 0 3px var(--primary-soft) !important; }
.btn.disabled, .btn:disabled { opacity: .55; transform: none; cursor: not-allowed; }
.btn-sm, .btn-group-sm > .btn { padding: 6px 14px; font-size: 13px; border-radius: 40px; }
.btn-lg, .btn-group-lg > .btn { padding: 13px 28px; font-size: 15.5px; border-radius: 40px; }
.btn-xs, .btn-group-xs > .btn { padding: 2px 10px; font-size: 12px; border-radius: 40px; }
.btn-block { width: 100%; }

/* primary */
.btn-primary,
.btn-primary:not(:disabled):not(.disabled):active,
.btn-primary:not(:disabled):not(.disabled).active,
.show > .btn-primary.dropdown-toggle {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: none;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary.focus {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #fff;
}
.btn-primary.disabled, .btn-primary:disabled { background-color: var(--primary); border-color: var(--primary); color: #fff; }

/* default / secondary / light = site .btn-secondary */
.btn-default,
.btn-secondary,
.btn-light,
.btn-dark,
.btn-outline-secondary,
.btn-outline-dark,
.btn-outline-light,
.btn-outline-default,
.btn-default:not(:disabled):not(.disabled):active,
.btn-secondary:not(:disabled):not(.disabled):active,
.btn-light:not(:disabled):not(.disabled):active,
.btn-default.active, .btn-secondary.active, .btn-light.active,
.open > .dropdown-toggle.btn-default,
.show > .btn-default.dropdown-toggle,
.show > .btn-secondary.dropdown-toggle,
.show > .btn-light.dropdown-toggle {
  background-color: var(--card);
  border-color: var(--border-strong);
  color: var(--text);
  box-shadow: none;
}
.btn-default:hover, .btn-default:focus, .btn-default.focus,
.btn-secondary:hover, .btn-secondary:focus,
.btn-light:hover, .btn-light:focus,
.btn-dark:hover, .btn-dark:focus,
.btn-outline-secondary:hover, .btn-outline-dark:hover, .btn-outline-light:hover, .btn-outline-default:hover,
.btn-default:active:hover, .btn-default.active:hover, .btn-default:active:focus {
  background-color: var(--card-hover);
  border-color: var(--text-muted);
  color: var(--text);
}
.btn-default.disabled:hover, .btn-default[disabled]:hover, fieldset[disabled] .btn-default:hover,
.btn-default.disabled:focus, .btn-default[disabled]:focus, .btn-default.disabled, .btn-default:disabled {
  background-color: var(--card) !important;
  border-color: var(--border-strong) !important;
  color: var(--text-muted);
}

/* semantic solid buttons (solid token colour, no glow) */
.btn-success, .btn-success:not(:disabled):not(.disabled):active { background-color: var(--success); border-color: var(--success); color: #fff; }
.btn-danger, .btn-danger:not(:disabled):not(.disabled):active { background-color: var(--danger); border-color: var(--danger); color: #fff; }
.btn-warning, .btn-warning:not(:disabled):not(.disabled):active { background-color: var(--warning); border-color: var(--warning); color: #fff; }
.btn-info, .btn-info:not(:disabled):not(.disabled):active { background-color: var(--primary); border-color: var(--primary); color: #fff; }
.btn-success:hover, .btn-success:focus, .btn-danger:hover, .btn-danger:focus,
.btn-warning:hover, .btn-warning:focus { color: #fff; filter: brightness(.92); }
.btn-info:hover, .btn-info:focus { background-color: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn-success:disabled, .btn-success.disabled { background-color: var(--success); border-color: var(--success); }
.btn-danger:disabled, .btn-danger.disabled { background-color: var(--danger); border-color: var(--danger); }
.btn-warning:disabled, .btn-warning.disabled { background-color: var(--warning); border-color: var(--warning); }

/* outline */
.btn-outline-primary, .btn-outline-info { color: var(--primary); border-color: var(--primary); background: transparent; }
.btn-outline-primary:hover, .btn-outline-info:hover,
.btn-outline-primary:not(:disabled):not(.disabled):active, .btn-outline-primary:not(:disabled):not(.disabled).active,
.btn-outline-info:not(:disabled):not(.disabled):active, .btn-outline-info:not(:disabled):not(.disabled).active {
  background: var(--primary-soft); color: var(--primary); border-color: var(--primary);
}
.btn-outline-success { color: var(--success); border-color: var(--success); background: transparent; }
.btn-outline-success:hover, .btn-outline-success:not(:disabled):not(.disabled):active { background: var(--success); color: #fff; border-color: var(--success); }
.btn-outline-danger { color: var(--danger); border-color: var(--danger); background: transparent; }
.btn-outline-danger:hover, .btn-outline-danger:not(:disabled):not(.disabled):active { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-outline-warning { color: var(--warning); border-color: var(--warning); background: transparent; }
.btn-outline-warning:hover, .btn-outline-warning:not(:disabled):not(.disabled):active { background: var(--warning); color: #fff; border-color: var(--warning); }

/* link */
.btn-link { color: var(--primary); font-weight: 600; background: transparent; border-color: transparent; }
.btn-link:hover, .btn-link:focus { color: var(--primary-hover); text-decoration: none; background: transparent; transform: none; }
.btn-link.disabled, .btn-link:disabled { color: var(--text-dim); }

/* button groups keep the pill only on the outer ends */
.btn-group > .btn:not(:last-child):not(.dropdown-toggle),
.btn-group > .btn-group:not(:last-child) > .btn { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.btn-group > .btn:not(:first-child),
.btn-group > .btn-group:not(:first-child) > .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.btn-group > .btn:hover, .btn-group-toggle > .btn:hover { transform: none; }
.btn-group-toggle > .btn.active { background: var(--primary-soft); border-color: var(--primary); color: var(--text); }

/* buttons glued to inputs */
.input-group > .input-group-append > .btn,
.input-group > .input-group-prepend > .btn { border-radius: var(--radius-sm); padding-top: 0; padding-bottom: 0; transform: none; }
.input-group > .input-group-append > .btn:hover,
.input-group > .input-group-prepend > .btn:hover { transform: none; }
.input-group > .input-group-append > .btn,
.input-group > .input-group-append > .input-group-text { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.input-group > .input-group-prepend > .btn,
.input-group > .input-group-prepend > .input-group-text { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group > .input-group-append:not(:last-child) > .btn,
.input-group > .input-group-append > .btn:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }

/* --------------------------------------------------------------------------
   5. Forms
   -------------------------------------------------------------------------- */
label, .col-form-label, .form-control-label, .control-label {
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
}
.form-control-label { margin-bottom: 6px; }
.form-text, .help-block { color: var(--text-muted); }
/* Twenty-One greys every #registration label (#666, weight 300): custom fields like "CNP/CUI *" too */
#registration label:not(.custom-control-label):not(.form-check-label):not(.field-icon),
#frmCheckout .form-group > label {
  color: var(--text); font-weight: 600; font-size: 14px;
}
legend { color: var(--text); font-family: var(--font-head); font-weight: 800; }
fieldset { border-color: var(--border); }

.form-control,
.custom-select,
#registration .field,
#registration .form-control,
.field {
  background-color: var(--input-bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14.5px;
  box-shadow: none;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.form-control,
.custom-select,
#registration .field,
#registration .form-control { height: 44px; padding: 10px 14px; }
textarea.form-control, #registration textarea.field, textarea.field,
select[multiple].form-control, select[size].form-control { height: auto; }
.form-control-sm, .input-group-sm > .form-control { height: 36px; padding: 6px 12px; font-size: 13.5px; }
.form-control-lg, .input-group-lg > .form-control, #registration .input-group-lg > .form-control { height: 52px; padding: 12px 16px; font-size: 16px; }

.form-control:hover, .custom-select:hover, .field:hover { border-color: var(--text-dim); }
.form-control:focus,
.custom-select:focus,
.field:focus,
#registration .field:focus,
#registration .form-control:focus {
  background-color: var(--input-bg);
  border-color: var(--primary);
  color: var(--text);
  outline: 0;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 28%, transparent);
}
.form-control::placeholder, .field::placeholder { color: var(--text-dim); opacity: 1; }
.form-control:disabled, .form-control[readonly],
.custom-select:disabled, .field[disabled], .field[readonly],
#registration .field[disabled], #registration .field[readonly] {
  background-color: var(--bg-subtle);
  color: var(--text-muted);
  border-color: var(--border);
  opacity: 1;
}
.form-control-plaintext { color: var(--text); }

/* select arrow */
select.form-control,
.custom-select,
#registration select.field,
select.field {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 12px;
}
select.form-control[multiple], select.form-control[size]:not([size="1"]) { background-image: none; padding-right: 14px; }
select option, select optgroup { background-color: var(--card); color: var(--text); }

/* Twenty-One registration form: icons inside fields */
#registration .prepend-icon .field,
#registration .prepend-icon .form-control { padding-left: 40px; }
#registration .prepend-icon .field-icon { height: 44px; line-height: 44px; width: 42px; }
#registration .field-icon i,
#registration .prepend-icon .field-icon i { color: var(--text-dim); }
#registration .prepend-icon:focus-within .field-icon i { color: var(--primary); }
/* phone field: let the dial-code box keep its room (beats the prepend-icon padding above) */
#registration .intl-tel-input.separate-dial-code input { padding-left: 66px !important; }
#registration .intl-tel-input.separate-dial-code.allow-dropdown input { padding-left: 58px !important; }
#registration .intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-2 input { padding-left: 84px !important; }
#registration .intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-3 input { padding-left: 92px !important; }
#registration .intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-4 input { padding-left: 100px !important; }
#registration .intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-5 input { padding-left: 108px !important; }
#registration .intl-tel-input + .field-icon, #registration .prepend-icon .intl-tel-input ~ .field-icon { display: none; }
.card-title small, .card-title i small { display: block; margin-top: 4px; font-family: var(--font-body); font-weight: 500; font-size: 13px; letter-spacing: 0; color: var(--text-muted); }
.card-title > i:has(small) { font-style: normal; }

/* input groups */
.input-group-text {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  font-size: 14px;
}
.input-group > .form-control,
.input-group > .custom-select { height: 44px; }
.input-group > .input-group-append > .btn,
.input-group > .input-group-prepend > .btn { height: 44px; }
.input-group-sm > .input-group-append > .btn, .input-group-sm > .input-group-prepend > .btn { height: 36px; }
.input-group-lg > .input-group-append > .btn, .input-group-lg > .input-group-prepend > .btn { height: 52px; }

/* Twenty-One .input-group-merge (icon inside the field) */
.input-group-merge { border-radius: var(--radius-sm); transition: box-shadow .15s ease; }
.input-group-merge .input-group-text { background-color: var(--input-bg); color: var(--text-dim); }
.input-group-merge .input-group-prepend .input-group-text { border-right: 0; }
.input-group-merge .input-group-append .input-group-text { border-left: 0; }
.input-group-merge .form-control:not(:first-child) { border-left: 0; padding-left: 4px; }
.input-group-merge .form-control:not(:last-child) { border-right: 0; padding-right: 4px; }
.input-group-merge .input-group-append .btn,
.input-group-merge .input-group-append .btn:not(:disabled):not(.disabled):active { border-color: var(--border-strong); border-left: 0; background: var(--input-bg); color: var(--text-dim); }
.input-group-merge .input-group-append .btn:hover,
.input-group-merge .input-group-append .btn:focus { color: var(--text); background: var(--input-bg); box-shadow: none !important; }
.input-group-merge:focus-within { box-shadow: 0 0 0 3px var(--primary-soft); }
.input-group-merge:focus-within .form-control,
.input-group-merge:focus-within .input-group-text,
.input-group-merge:focus-within .btn { border-color: var(--primary) !important; box-shadow: none; }
.input-group-merge:focus-within .input-group-text { color: var(--primary); }

/* custom checkboxes / radios / switches */
.custom-control-label { font-weight: 500; color: var(--text); }
.custom-control-label::before {
  background-color: var(--input-bg);
  border: 1px solid var(--border-strong);
  box-shadow: none;
}
.custom-checkbox .custom-control-label::before { border-radius: 5px; }
.custom-control-input:checked ~ .custom-control-label::before,
.custom-checkbox .custom-control-input:indeterminate ~ .custom-control-label::before {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.custom-control-input:focus ~ .custom-control-label::before { box-shadow: 0 0 0 3px var(--primary-soft); }
.custom-control-input:focus:not(:checked) ~ .custom-control-label::before { border-color: var(--primary); }
.custom-control-input:not(:disabled):active ~ .custom-control-label::before { background-color: var(--primary-soft); border-color: var(--primary); }
.custom-control-input:disabled ~ .custom-control-label,
.custom-control-input[disabled] ~ .custom-control-label { color: var(--text-dim); }
.custom-control-input:disabled ~ .custom-control-label::before { background-color: var(--bg-subtle); }
.custom-switch .custom-control-label::after { background-color: var(--text-dim); }
.custom-switch .custom-control-input:checked ~ .custom-control-label::after { background-color: #fff; }

/* plain checkboxes / radios */
input[type="checkbox"], input[type="radio"] { accent-color: var(--primary); }
.form-check-label, .checkbox label, .radio label { color: var(--text); font-weight: 500; }

/* custom file */
.custom-file, .custom-file-input { height: 44px; }
.custom-file-label {
  background-color: var(--input-bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500;
  height: 44px;
  padding: 10px 14px;
  line-height: 1.5;
}
.custom-file-label::after {
  background-color: var(--bg-subtle);
  color: var(--text);
  border-left: 1px solid var(--border-strong);
  height: 42px;
  padding: 10px 14px;
  line-height: 1.5;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.custom-file-input:focus ~ .custom-file-label { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

/* ranges */
.custom-range::-webkit-slider-thumb { background: var(--primary); }
.custom-range::-moz-range-thumb { background: var(--primary); }
.custom-range::-webkit-slider-runnable-track { background: var(--border-strong); }
.custom-range::-moz-range-track { background: var(--border-strong); }

/* validation */
.invalid-feedback, .form-group .field-error-msg { color: var(--danger); font-size: 13px; }
.valid-feedback { color: var(--success); font-size: 13px; }
.warning-feedback { color: var(--warning); font-size: 13px; }
.form-control.is-invalid, .was-validated .form-control:invalid,
.has-error .form-control, .has-error .field { border-color: var(--danger); }
.form-control.is-invalid:focus, .was-validated .form-control:invalid:focus { border-color: var(--danger); box-shadow: 0 0 0 3px var(--primary-soft); }
.form-control.is-valid, .was-validated .form-control:valid { border-color: var(--success); }
.form-control.is-warning, .form-control.is-warning:focus { border-color: var(--warning); }
.has-error button { border-color: var(--danger); box-shadow: none; }
form[data-role=json-form] .has-error input.form-control,
form[data-role=json-form] .has-error textarea.form-control,
form[data-role=json-form] .has-error select.form-control { background-color: var(--input-bg); border-color: var(--danger); }
form[data-role=json-form] .has-error .tooltip-inner { background-color: var(--danger); color: #fff; }

/* captcha image */
.captchaimage img, #inputCaptchaImage { border-radius: var(--radius-sm); }

/* password strength meter */
.password-strength-meter .progress,
#passwordStrengthBar.progress { height: 8px; border-radius: var(--radius-pill); }
.password-strength-meter p, #passwordStrengthTextLabel { color: var(--text-muted); font-size: 13px; }

/* intl-tel-input (phone number) */
.intl-tel-input { width: 100%; display: block; }
.intl-tel-input .selected-flag { border-radius: var(--radius-sm) 0 0 var(--radius-sm); outline: 0; }
.intl-tel-input.separate-dial-code .selected-flag,
.intl-tel-input.allow-dropdown .flag-container:hover .selected-flag { background-color: var(--bg-subtle); }
.intl-tel-input.separate-dial-code .selected-flag { border-right: 1px solid var(--border-strong); }
.intl-tel-input .selected-dial-code { color: var(--text); font-size: 14px; }
.intl-tel-input .selected-flag .iti-arrow { border-top-color: var(--text-muted); }
.intl-tel-input .selected-flag .iti-arrow.up { border-bottom-color: var(--text-muted); }
.intl-tel-input .country-list {
  background-color: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  color: var(--text);
  margin-top: 4px;
  max-width: 340px;
}
.intl-tel-input .country-list .country { padding: 7px 12px; font-size: 14px; }
.intl-tel-input .country-list .country.highlight { background-color: var(--primary-soft); }
.intl-tel-input .country-list .country .dial-code { color: var(--text-dim); }
.intl-tel-input .country-list .divider { border-bottom-color: var(--border); }
.iti { width: 100%; }
.iti__country-list { background-color: var(--card); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow); color: var(--text); }
.iti__country.iti__highlight { background-color: var(--primary-soft); }
.iti__dial-code { color: var(--text-dim); }
.iti__divider { border-bottom-color: var(--border); }
.iti__arrow { border-top-color: var(--text-muted); }
.iti__arrow--up { border-bottom-color: var(--text-muted); }
.iti--separate-dial-code .iti__selected-flag, .iti--allow-dropdown .iti__flag-container:hover .iti__selected-flag { background-color: var(--bg-subtle); }

/* bootstrap-switch (mailing list toggle etc.) */
.bootstrap-switch {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--input-bg);
  box-shadow: none;
}
.bootstrap-switch .bootstrap-switch-container { border-radius: var(--radius-pill); }
.bootstrap-switch.bootstrap-switch-focused { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.bootstrap-switch .bootstrap-switch-handle-on,
.bootstrap-switch .bootstrap-switch-handle-off,
.bootstrap-switch .bootstrap-switch-label { font-size: 13px; font-weight: 700; padding: 6px 14px; }
.bootstrap-switch .bootstrap-switch-label { background: var(--card-hover); color: var(--text); }
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary,
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success,
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-info,
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary,
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-success,
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-info,
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary:hover,
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success:hover,
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-info:hover {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-default,
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default,
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-secondary,
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-secondary,
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-secondary:hover {
  background-color: var(--bg-subtle);
  border-color: var(--border);
  color: var(--text-muted);
}
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-danger,
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-danger { background-color: var(--danger); border-color: var(--danger); color: #fff; }
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-warning,
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-warning { background-color: var(--warning); border-color: var(--warning); color: #fff; }

/* --------------------------------------------------------------------------
   6. Tables + DataTables
   -------------------------------------------------------------------------- */
.table { color: var(--text); background-color: transparent; }
.table th, .table td { border-top-color: var(--border); }
.table thead th {
  border-bottom: 1px solid var(--border-strong);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.table tbody + tbody { border-top-color: var(--border); }
.table-bordered, .table-bordered th, .table-bordered td { border-color: var(--border); }
.table-striped tbody tr:nth-of-type(odd) { background-color: var(--row-hover); }
.table-hover tbody tr:hover { background-color: var(--row-hover); color: var(--text); }
.table .thead-light th, .table .thead-dark th { background-color: var(--bg-subtle); color: var(--text-muted); border-color: var(--border); }
.table-active, .table-active > th, .table-active > td { background-color: var(--primary-soft); }
.table-success, .table-success > td, .table-success > th,
.table-danger, .table-danger > td, .table-danger > th,
.table-warning, .table-warning > td, .table-warning > th,
.table-info, .table-info > td, .table-info > th { background-color: var(--primary-soft); color: var(--text); }

table.table-list thead th {
  background-color: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  padding: 12px 10px;
}
table.table-list tbody td { padding: 12px 10px; border-top: 1px solid var(--border); }
.table-list > tbody > tr > td { background-color: var(--card); color: var(--text); }
.table-list > tbody > tr:hover > td { background-color: var(--card-hover); }
.table-list > tbody > tr > td a.border-left { border-left-color: var(--border) !important; }

.table-container {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  color: var(--text);
}
.dataTables_wrapper { color: var(--text-muted); }
.dataTables_wrapper table.table-list {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  border-collapse: separate !important;
  border-spacing: 0;
  overflow: hidden;
}
.dataTables_wrapper table.table-list thead th { border-bottom: 1px solid var(--border-strong); font-weight: 700; }
.dataTables_wrapper table.table-list thead th.sorting_asc,
.dataTables_wrapper table.table-list thead th.sorting_desc { background-color: var(--card-hover); color: var(--text); }
.dataTables_wrapper .dataTables_filter label,
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_info { color: var(--text-muted); font-weight: 500; font-size: 13.5px; }
.dataTables_wrapper .dataTables_filter label .form-control {
  background: var(--input-bg) url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3ccircle cx='11' cy='11' r='8'/%3e%3cline x1='21' y1='21' x2='16.65' y2='16.65'/%3e%3c/svg%3e") no-repeat 14px center;
  padding: 8px 14px 8px 40px !important;
  height: 40px;
  border-radius: var(--radius-pill);
  font-size: 14px;
}
.dataTables_wrapper .dataTables_length select { height: 36px; padding: 4px 32px 4px 12px; display: inline-block; width: auto; }
.dataTables_wrapper .dataTables_processing { background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); }
table.dataTable thead .sorting:before, table.dataTable thead .sorting:after,
table.dataTable thead .sorting_asc:before, table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_desc:before, table.dataTable thead .sorting_desc:after { color: var(--text-dim); }
table.dataTable.dtr-inline.collapsed > tbody > tr > td:first-child:before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th:first-child:before { background-color: var(--primary); box-shadow: none; border-color: var(--card); }
table.dataTable > tbody > tr.child ul.dtr-details > li { border-bottom-color: var(--border); }
.dataTables_empty { color: var(--text-muted); }

/* --------------------------------------------------------------------------
   7. Alerts (soft tinted boxes, colour carried by a left bar)
   -------------------------------------------------------------------------- */
.alert {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  border-left-width: 3px;
  background-color: var(--card);
  color: var(--text);
  padding: 14px 18px;
  font-size: 14.5px;
}
.alert-primary, .alert-info { background-color: var(--primary-soft); border-color: var(--border); border-left-color: var(--primary); color: var(--text); }
.alert-success { background-color: var(--card); border-color: var(--border); border-left-color: var(--success); color: var(--text); }
.alert-warning { background-color: var(--card); border-color: var(--border); border-left-color: var(--warning); color: var(--text); }
.alert-danger { background-color: var(--card); border-color: var(--border); border-left-color: var(--danger); color: var(--text); }
.alert-secondary, .alert-light, .alert-dark, .alert-default { background-color: var(--bg-subtle); border-color: var(--border); border-left-color: var(--border-strong); color: var(--text); }
.alert-success > i:first-child, .alert-success .fa-check-circle, .alert-success .enix-fa-check-circle { color: var(--success); }
.alert-warning > i:first-child, .alert-warning .fa-exclamation-triangle, .alert-warning .enix-fa-exclamation-triangle { color: var(--warning); }
.alert-danger > i:first-child, .alert-danger .fa-exclamation-circle, .alert-danger .enix-fa-exclamation-circle { color: var(--danger); }
.alert-info > i:first-child, .alert-primary > i:first-child { color: var(--primary); }
.alert .alert-link, .alert a { color: var(--primary); font-weight: 700; }
.alert .alert-link:hover, .alert a:hover { color: var(--primary-hover); }
.alert hr { border-top-color: var(--border); }
.alert ul { margin-bottom: 0; padding-left: 18px; }
.alert .close { color: var(--text-muted); text-shadow: none; opacity: .8; }

/* network issues banner (above main body) */
.network-issue-alert {
  border-radius: 0;
  border-width: 0 0 1px 0;
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  font-size: 14px;
}
.network-issue-alert.alert-warning { background-color: var(--card); }
.network-issue-alert .fa-exclamation-triangle, .network-issue-alert .enix-fa-exclamation-triangle { color: var(--warning); }
.network-issue-alert .fa-info-circle, .network-issue-alert .enix-fa-info-circle { color: var(--primary); }

/* --------------------------------------------------------------------------
   8. Badges, labels, WHMCS statuses
   Rule: blue soft background; white text (dark) / #1d4ed8 (light).
   Status meaning is carried by a small coloured dot only.
   -------------------------------------------------------------------------- */
.badge,
.label,
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background-color: var(--primary-soft);
  color: var(--text);
  vertical-align: middle;
  white-space: nowrap;
}
.badge-primary, .badge-secondary, .badge-success, .badge-danger, .badge-warning,
.badge-info, .badge-light, .badge-dark, .badge-default,
.label-default, .label-success, .label-info, .label-warning, .label-danger, .label-primary, .label-placeholder,
.label[class*="status-"], .label.status, .status[class*="status-"],
[class*="requestor-type-"] {
  background-color: var(--primary-soft) !important;
  color: var(--text);
}
html[data-theme="light"] .badge,
html[data-theme="light"] .label,
html[data-theme="light"] .status,
html[data-theme="light"] [class*="requestor-type-"] { color: var(--primary-hover); }
a.badge:hover, a.badge:focus { background-color: var(--primary-soft); color: var(--text); box-shadow: none; }

/* coloured status dots */
.label-success::before, .label-danger::before, .label-warning::before, .label-info::before, .label-default::before,
.badge-success::before, .badge-danger::before, .badge-warning::before,
.label.status::before, .status[class*="status-"]::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  flex: 0 0 6px;
}
.label-success::before, .badge-success::before,
.status-active::before, .status-open::before, .status-completed::before, .status-paid::before,
.status-accepted::before, .status-delivered::before { background: var(--success); }
.label-danger::before, .badge-danger::before,
.status-unpaid::before, .status-pending::before, .status-fraud::before, .status-inprogress::before,
.status-terminated::before, .status-lost::before, .status-dead::before, .status-collections::before { background: var(--danger); }
.label-warning::before, .badge-warning::before,
.status-suspended::before, .status-pending-transfer::before, .status-customer-reply::before,
.status-pending-registration::before, .status-redemption::before, .status-grace::before,
.status-refunded::before, .status-payment-pending::before, .status-onhold::before { background: var(--warning); }
.label-default::before, .status-closed::before, .status-cancelled::before,
.status-expired::before, .status-transferred-away::before { background: var(--text-dim); }
.badge:empty { display: none; }

/* counters inside buttons / list items / nav stay compact */
.btn .badge, .list-group-item .badge, .nav-link .badge {
  padding: 2px 8px;
  font-size: 10.5px;
  letter-spacing: 0;
}

/* --------------------------------------------------------------------------
   9. List groups + WHMCS sidebar
   -------------------------------------------------------------------------- */
.list-group-item {
  background-color: var(--card);
  border-color: var(--border);
  color: var(--text);
}
.list-group-item-action { color: var(--text-muted); }
.list-group-item-action:hover, .list-group-item-action:focus {
  background-color: var(--card-hover);
  color: var(--text);
  text-decoration: none;
}
.list-group-item-action:active { background-color: var(--card-hover); color: var(--text); }
.list-group-item.active {
  background-color: var(--card);
  border-color: var(--border);
  color: var(--text);
  box-shadow: none; /* owner: no active highlight in navigation */
  font-weight: inherit;
}
.list-group-item.disabled, .list-group-item:disabled { color: var(--text-dim); background-color: var(--card); }
.list-group-item-success, .list-group-item-danger, .list-group-item-warning, .list-group-item-info, .list-group-item-primary {
  background-color: var(--primary-soft); color: var(--text);
}

.sidebar .card { overflow: hidden; }
.sidebar .card-header { background-color: var(--card); padding: 14px 18px; }
.sidebar .card-title {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}
.sidebar .card-title > i:first-child { color: var(--primary); margin-right: 2px; }
.sidebar .card-sidebar .card-minimise { color: var(--text-dim); font-size: 13px; margin-top: 3px; }
.sidebar .card-sidebar .card-minimise:hover { color: var(--text); }
.sidebar .list-group { font-size: 14px; }
.sidebar .list-group-item {
  padding: 10px 18px;
  border-color: var(--border);
  background-color: var(--card);
  color: var(--text-muted);
}
.sidebar div.list-group-item { color: var(--text-muted); font-size: 13.5px; line-height: 1.55; }
.sidebar a.list-group-item:hover,
.sidebar a.list-group-item:focus { background-color: var(--card-hover); color: var(--text); }
/* owner: the active item must look exactly like the others (no bold / colour / bar / background) */
.sidebar .list-group-item.active,
.sidebar .card-sidebar .list-group-item.active {
  background-color: var(--card);
  border-color: var(--border);
  color: var(--text-muted);
  font-weight: inherit;
  box-shadow: none;
}
.sidebar a.list-group-item.active:hover,
.sidebar a.list-group-item.active:focus { background-color: var(--card-hover); color: var(--text); }
.sidebar .list-group-item.active::before, .sidebar .list-group-item.active::after { content: none; display: none; }.sidebar .list-group-item .badge {
  width: auto;
  min-width: 26px;
  justify-content: center;
  padding: 2px 8px;
  background-color: var(--primary-soft);
  color: var(--text);
}
html[data-theme="light"] .sidebar .list-group-item .badge { color: var(--primary-hover); }
.sidebar .list-group-item > i.far.fa-circle,
.sidebar .sidebar-menu-item-icon { color: var(--text-dim); }
.sidebar .list-group-item:hover .sidebar-menu-item-icon { color: var(--primary); }
.sidebar .sidebar-menu-item-icon-wrapper { width: 20px; margin-right: 8px; text-align: center; }
.sidebar .card-footer { background-color: var(--card); padding: 12px 18px; }
.sidebar .card-body { padding: 16px 18px; color: var(--text-muted); font-size: 14px; }

/* --------------------------------------------------------------------------
   10. Nav tabs / pills / pagination / breadcrumb
   -------------------------------------------------------------------------- */
.nav-tabs { border-bottom: 1px solid var(--border); }
.nav-tabs .nav-link {
  color: var(--text-muted);
  font-weight: 600;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  margin-bottom: -1px;
  padding: 10px 16px;
}
.nav-tabs .nav-link:hover, .nav-tabs .nav-link:focus { color: var(--text); border-color: transparent; }
.nav-tabs .nav-link.active, .nav-tabs .nav-item.show .nav-link {
  color: var(--text);
  background: transparent;
  border-color: transparent;
  border-bottom-color: var(--primary);
}
.nav-tabs .nav-link.disabled { color: var(--text-dim); }
.tab-content { color: var(--text); }
.responsive-tabs-sm .nav-item a:hover { background-color: var(--card-hover); }
@media (max-width: 767.98px) {
  .responsive-tabs-sm { background: var(--card); border-color: var(--border); }
  .responsive-tabs-sm .nav-item { border-bottom-color: var(--border) !important; }
  .responsive-tabs-sm .nav-item a.active { background-color: var(--card-hover) !important; }
  .responsive-tabs-sm-connector .channel { background: var(--card); border-color: var(--border); }
  .responsive-tabs-sm-connector .bottom-border { border-color: var(--border); }
}

.nav-pills .nav-link { color: var(--text-muted); font-weight: 600; border-radius: var(--radius-pill); padding: 8px 16px; }
.nav-pills .nav-link:hover { color: var(--text); background: var(--card-hover); }
.nav-pills .nav-link.active, .nav-pills .show > .nav-link { background: var(--primary-soft); color: var(--text); }
html[data-theme="light"] .nav-pills .nav-link.active { color: var(--primary-hover); }

.pagination { font-size: 14px; flex-wrap: wrap; }
.page-item { margin: 0 3px 6px 0; }
.page-link,
.pagination > li > a,
.pagination > li > span {
  background-color: var(--card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-sm) !important;
  margin-left: 0;
  min-width: 36px;
  text-align: center;
  font-weight: 600;
}
.page-link:hover, .page-link:focus { background-color: var(--card-hover); border-color: var(--border-strong); color: var(--text); box-shadow: none; }
.page-item.active .page-link,
.pagination > .active > a, .pagination > .active > a:hover, .pagination > .active > a:focus,
.pagination > .active > span, .pagination > .active > span:hover, .pagination > .active > span:focus {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.page-item.disabled .page-link { background-color: var(--card); border-color: var(--border); color: var(--text-dim); }

.breadcrumb { background-color: transparent; font-size: 13.5px; }
.breadcrumb-item, .breadcrumb-item a { color: var(--text-muted); }
.breadcrumb-item a:hover { color: var(--text); }
.breadcrumb-item.active { color: var(--text); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--text-dim); }

/* --------------------------------------------------------------------------
   11. Dropdowns (no active colour flood)
   -------------------------------------------------------------------------- */
.dropdown-menu {
  background-color: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  color: var(--text);
  padding: 6px;
  font-size: 14px;
}
.dropdown-item:not(.enix-x) {
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-weight: 500;
}
.dropdown-item:not(.enix-x):hover, .dropdown-item:not(.enix-x):focus { background-color: var(--card-hover); color: var(--text); text-decoration: none; }
.dropdown-item:not(.enix-x).active, .dropdown-item:not(.enix-x):active { background-color: transparent; color: var(--text); }
.dropdown-item.disabled, .dropdown-item:disabled { color: var(--text-dim); background: transparent; }
.dropdown-divider { border-top-color: var(--border); margin: 6px 0; }
.dropdown-header { color: var(--text-dim); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.dropdown-item-text { color: var(--text-muted); }

/* --------------------------------------------------------------------------
   12. Modals
   -------------------------------------------------------------------------- */
.modal-backdrop { background-color: #000; }
.modal-backdrop.show { opacity: .6; }
.modal-content {
  background-color: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  color: var(--text);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.modal .modal-header,
.modal-header {
  background-color: var(--card);
  border-bottom: 1px solid var(--border);
  color: var(--text);
  padding: 18px 22px;
}
.modal-header.bg-primary, .modal-header.bg-primary.text-white,
.modal-header.text-white { background-color: var(--card) !important; color: var(--text) !important; }
.modal-header.text-white .close, .modal-header.bg-primary .close { color: var(--text-muted); }
.modal-title { font-family: var(--font-head); font-weight: 800; font-size: 20px; color: var(--text); }
.modal-body { padding: 22px; color: var(--text); }
.modal-footer { background-color: var(--bg-subtle); border-top: 1px solid var(--border); padding: 14px 22px; }
.close {
  color: var(--text-muted);
  text-shadow: none;
  opacity: .8;
  font-weight: 400;
}
.close:hover, .close:not(:disabled):not(.disabled):hover, .close:not(:disabled):not(.disabled):focus { color: var(--text); opacity: 1; }

/* generate password modal */
#modalGeneratePassword .input-inline-100 { width: 110px; }
html:not([data-theme="light"]) .copy-to-clipboard img { filter: invert(1); opacity: .85; }

/* language / currency chooser */
.modal-localisation .modal-content { background-color: var(--card); }
.modal-localisation .modal-body { background: var(--card); }
.modal-localisation .modal-footer { background: var(--card); border: 0; }
.modal-localisation .h5 { color: var(--text); font-family: var(--font-head); font-weight: 800; }
.modal-localisation .item-selector .item {
  margin: 3px 0;
  padding: 7px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  background: var(--bg-subtle);
  font-size: 14px;
}
.modal-localisation .item-selector .item:hover { background-color: var(--card-hover); color: var(--text); border-color: var(--border-strong); text-decoration: none; }
.modal-localisation .item-selector .item.active { background-color: var(--card-hover); border-color: var(--primary); color: var(--text); }

/* --------------------------------------------------------------------------
   13. Popovers, tooltips, toasts, progress, overlay
   -------------------------------------------------------------------------- */
.popover {
  background-color: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  font-family: var(--font-body);
  color: var(--text);
}
.popover-header { background-color: var(--bg-subtle); border-bottom: 1px solid var(--border); color: var(--text); font-family: var(--font-head); font-weight: 800; }
.popover-body { color: var(--text); }
.bs-popover-bottom > .arrow::after, .bs-popover-auto[x-placement^="bottom"] > .arrow::after { border-bottom-color: var(--card); }
.bs-popover-bottom > .arrow::before, .bs-popover-auto[x-placement^="bottom"] > .arrow::before { border-bottom-color: var(--border-strong); }
.bs-popover-top > .arrow::after, .bs-popover-auto[x-placement^="top"] > .arrow::after { border-top-color: var(--card); }
.bs-popover-top > .arrow::before, .bs-popover-auto[x-placement^="top"] > .arrow::before { border-top-color: var(--border-strong); }
.bs-popover-left > .arrow::after, .bs-popover-auto[x-placement^="left"] > .arrow::after { border-left-color: var(--card); }
.bs-popover-left > .arrow::before, .bs-popover-auto[x-placement^="left"] > .arrow::before { border-left-color: var(--border-strong); }
.bs-popover-right > .arrow::after, .bs-popover-auto[x-placement^="right"] > .arrow::after { border-right-color: var(--card); }
.bs-popover-right > .arrow::before, .bs-popover-auto[x-placement^="right"] > .arrow::before { border-right-color: var(--border-strong); }
.bs-popover-bottom .popover-header::before, .bs-popover-auto[x-placement^="bottom"] .popover-header::before { border-bottom-color: var(--bg-subtle); }

/* header notifications popover */
.popover-user-notifications { max-width: 380px; padding: 0; }
.popover-user-notifications .popover-body { padding: 0; }
.client-alerts { list-style: none; margin: 0; padding: 6px; max-height: 360px; overflow-y: auto; }
.client-alerts li { border-bottom: 1px solid var(--border); }
.client-alerts li:last-child { border-bottom: 0; }
.client-alerts li a {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  line-height: 1.45;
}
.client-alerts li a:hover { background-color: var(--card-hover); color: var(--text); text-decoration: none; }
.client-alerts li a > i { color: var(--primary); margin-top: 3px; }
.client-alerts li.none { padding: 14px 12px; color: var(--text-muted); text-align: center; font-size: 13.5px; }
.client-alerts .message { color: var(--text-muted); }

.tooltip { font-family: var(--font-body); }
.tooltip.show { opacity: 1; }
.tooltip-inner {
  background-color: var(--card-hover);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 12.5px;
  box-shadow: var(--shadow);
}
.bs-tooltip-top .arrow::before, .bs-tooltip-auto[x-placement^="top"] .arrow::before { border-top-color: var(--border-strong); }
.bs-tooltip-bottom .arrow::before, .bs-tooltip-auto[x-placement^="bottom"] .arrow::before { border-bottom-color: var(--border-strong); }
.bs-tooltip-left .arrow::before, .bs-tooltip-auto[x-placement^="left"] .arrow::before { border-left-color: var(--border-strong); }
.bs-tooltip-right .arrow::before, .bs-tooltip-auto[x-placement^="right"] .arrow::before { border-right-color: var(--border-strong); }

.toast {
  background-color: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  color: var(--text);
}
.toast-header { background-color: var(--bg-subtle); border-bottom: 1px solid var(--border); color: var(--text); }

.progress {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  box-shadow: none;
  overflow: hidden;
}
.progress-bar { background-color: var(--primary); color: #fff; font-size: 11px; font-weight: 700; }
.progress-bar.bg-success { background-color: var(--success) !important; }
.progress-bar.bg-warning { background-color: var(--warning) !important; }
.progress-bar.bg-danger { background-color: var(--danger) !important; }
.progress-bar.bg-info { background-color: var(--primary) !important; }

.spinner-border, .spinner-grow { color: var(--primary); }

#fullpage-overlay {
  background-color: rgba(0, 0, 0, 0.7);
  color: #fff;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
#fullpage-overlay .msg {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 22px 26px;
  box-shadow: var(--shadow);
  font-weight: 600;
}
#fullpage-overlay .msg i { color: var(--primary); }

/* --------------------------------------------------------------------------
   14. Verification banners (user validation / email verification)
   -------------------------------------------------------------------------- */
.verification-banner {
  background-color: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-weight: 500;
  font-size: 14.5px;
  padding: 12px 0;
}
.verification-banner .fas,
.verification-banner .fal,
.verification-banner .far, .verification-banner .enix-ico { color: var(--warning); font-size: 22px; padding-top: 4px; }
.verification-banner.user-validation .fas,
.verification-banner.user-validation .fal,
.verification-banner.user-validation .far, .verification-banner.user-validation .enix-ico { color: var(--primary); }
.verification-banner .text { color: var(--text); }
.verification-banner .btn { border-radius: 40px; }
@media (min-width: 768px) {
  .verification-banner .btn { padding: 8px 20px; }
  .verification-banner .fas, .verification-banner .fal, .verification-banner .far, .verification-banner .enix-ico { font-size: 26px; }
}
.verification-banner .btn.close { color: var(--text-muted); background: transparent; border: 0; font-size: 22px; padding: 2px 8px; }
.verification-banner .btn.close:hover { color: var(--text); transform: none; }
.verification-banner.email-verification .btn.btn-action,
.verification-banner.email-verification .btn.btn-action:active,
.verification-banner.email-verification .btn.btn-action[disabled]:hover,
.verification-banner.user-validation .btn.btn-action {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.verification-banner.email-verification .btn.btn-action:hover,
.verification-banner.user-validation .btn.btn-action:hover { background-color: var(--primary-hover); border-color: var(--primary-hover); }

/* --------------------------------------------------------------------------
   15. Markdown editor (EasyMDE / bootstrap-markdown) + markdown content
   -------------------------------------------------------------------------- */
.md-editor, div.md-editor.active {
  background: var(--input-bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
div.md-editor.active { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.md-editor > .btn-toolbar { background-color: var(--bg-subtle) !important; border-bottom: 1px solid var(--border); padding: 6px; }
.md-editor > .btn-toolbar .btn { padding: 4px 10px; border-radius: var(--radius-sm); font-size: 13px; background: transparent; border-color: transparent; color: var(--text-muted); }
.md-editor > .btn-toolbar .btn:hover { background: var(--card-hover); color: var(--text); transform: none; }
.md-editor > textarea.markdown-editor,
.md-editor > .md-preview {
  background-color: var(--input-bg) !important;
  color: var(--text);
  border-top: 1px solid var(--border) !important;
  border-bottom: 1px solid var(--border) !important;
}
.md-editor .md-footer { background: var(--bg-subtle); border-top: 1px solid var(--border); color: var(--text-muted); }
.markdown-editor-status, .editor-statusbar { color: var(--text-muted); font-size: 12px; }

.editor-toolbar {
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  border-bottom: 0;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  opacity: 1;
  padding: 6px;
}
.editor-toolbar:hover { opacity: 1; }
.editor-toolbar button, .editor-toolbar a {
  color: var(--text-muted) !important;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
}
.editor-toolbar button:hover, .editor-toolbar a:hover,
.editor-toolbar button.active, .editor-toolbar a.active {
  background: var(--card-hover);
  border-color: var(--border);
  color: var(--text) !important;
}
.editor-toolbar i.separator { border-left-color: var(--border); border-right-color: transparent; }
.editor-toolbar.disabled-for-preview button:not(.no-disable) { opacity: .4; background: transparent; }
.CodeMirror {
  background: var(--input-bg);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14.5px;
}
.CodeMirror-focused { border-color: var(--primary); }
.CodeMirror-cursor { border-left-color: var(--text); }
.CodeMirror-selected, .CodeMirror-focused .CodeMirror-selected { background: var(--primary-soft); }
.CodeMirror .CodeMirror-placeholder { color: var(--text-dim); }
.CodeMirror-gutters { background: var(--bg-subtle); border-right-color: var(--border); }
.cm-s-easymde .cm-header, .cm-s-easymde .cm-strong { color: var(--text); }
.cm-s-easymde .cm-link, .cm-s-easymde .cm-url { color: var(--primary); }
.cm-s-easymde .cm-comment { background: var(--primary-soft); color: var(--text); }
.editor-preview, .editor-preview-side { background: var(--card); color: var(--text); border-color: var(--border); }
.editor-preview pre, .editor-preview-side pre { background: var(--bg-subtle); }

.md-preview h1, .markdown-content h1,
.md-preview h2, .markdown-content h2,
.md-preview h3, .markdown-content h3,
.md-preview h4, .markdown-content h4,
.md-preview h5, .markdown-content h5,
.md-preview h6, .markdown-content h6 { color: var(--text); }
.markdown-content, .md-preview { color: var(--text); }
.markdown-content table td, .markdown-content table th { border-color: var(--border) !important; }

/* --------------------------------------------------------------------------
   15b. select2 / daterangepicker (only where a page loads them)
   -------------------------------------------------------------------------- */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
  background-color: var(--input-bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  min-height: 44px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--text); line-height: 42px; padding-left: 14px; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 42px; }
.select2-container--default .select2-selection--multiple .select2-selection__choice { background: var(--primary-soft); border: 1px solid var(--border); color: var(--text); border-radius: var(--radius-pill); }
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--single { border-color: var(--primary); }
.select2-dropdown { background: var(--card); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--text); box-shadow: var(--shadow); }
.select2-search--dropdown .select2-search__field { background: var(--input-bg); border: 1px solid var(--border-strong); color: var(--text); border-radius: 6px; }
.select2-container--default .select2-results__option[aria-selected=true] { background: var(--card-hover); }
.select2-container--default .select2-results__option--highlighted[aria-selected] { background: var(--primary-soft); color: var(--text); }

.daterangepicker { background: var(--card); border: 1px solid var(--border-strong); border-radius: var(--radius-md); color: var(--text); box-shadow: var(--shadow); font-family: var(--font-body); }
.daterangepicker:before { border-bottom-color: var(--border-strong); }
.daterangepicker:after { border-bottom-color: var(--card); }
.daterangepicker .calendar-table { background: var(--card); border-color: var(--card); }
.daterangepicker td.off, .daterangepicker td.off.in-range { background: var(--card); color: var(--text-dim); }
.daterangepicker td.available:hover, .daterangepicker th.available:hover { background: var(--card-hover); color: var(--text); }
.daterangepicker td.in-range { background: var(--primary-soft); color: var(--text); }
.daterangepicker td.active, .daterangepicker td.active:hover { background: var(--primary); color: #fff; }
.daterangepicker .calendar-table .next span, .daterangepicker .calendar-table .prev span { border-color: var(--text-muted); }
.daterangepicker .drp-buttons { border-color: var(--border); }
.daterangepicker .ranges li:hover { background: var(--card-hover); }
.daterangepicker .ranges li.active { background: var(--primary); color: #fff; }

/* --------------------------------------------------------------------------
   16. Misc Twenty-One leftovers with hard-coded light colours
   -------------------------------------------------------------------------- */
.jumbotron { background-color: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); color: var(--text); }
.well { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: none; color: var(--text); }
.select-account { border-top-color: var(--border); }
.select-account a { border-bottom-color: var(--border); color: var(--text); }
.select-account a:hover { background-color: var(--card-hover); }
.continue-container, .invite-box { background-color: var(--card); border-color: var(--border); border-radius: var(--radius-md); color: var(--text); }
#popup-backdrop { background-color: var(--bg); }
a.admin-inline-edit { color: var(--text-dim); }
a.admin-inline-edit:hover { color: var(--text); }
.admin-masquerade-notice { font-family: var(--font-body); color: var(--text-muted); }
.shadow, .shadow-sm, .shadow-lg { box-shadow: var(--shadow) !important; }

/* --------------------------------------------------------------------------
   17. Small screens
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
  section#main-body { padding: 22px 0 48px; }
  .primary-content .card-body { padding: 18px; }
  .primary-content .card-body.extra-padding { padding: 20px; }
  .primary-content .card.mw-540 .card-body { padding-left: 20px !important; padding-right: 20px !important; }
  .modal-dialog { margin: 12px; }
  .modal-content { border-radius: var(--radius-md); }
  .btn-lg { padding: 12px 22px; }
}

/* narrower gutters on phones */
@media (max-width: 640px) {
  .enix-body .container { padding-left: 16px; padding-right: 16px; }
}

/* --------------------------------------------------------------------------
   18. Lucide icons (Font Awesome replaced by js/enix-fa2lucide.js, or written as data-lucide in the .tpl)
   Wrapper <i class="enix-ico ..."> keeps FA's box (inline-block, 1em, line-height 1) so every old
   "... i { }" rule still sizes / colours it; FA helpers fa-fw / fa-lg / fa-2x ... still apply.
   -------------------------------------------------------------------------- */
.enix-ico {
  display: inline-block;
  font-style: normal;
  font-weight: normal;
  line-height: 1;
  vertical-align: -0.125em;
}
.enix-ico > svg, svg.enix-ico {
  display: inline-block;
  width: 1em;
  height: 1em;
  stroke-width: 2;
  flex-shrink: 0;
}
.enix-ico > svg { vertical-align: top; }
svg.enix-ico { vertical-align: -0.125em; }
.enix-ico.fa-fw { width: 1.25em; text-align: center; }
.enix-ico.fa-lg { font-size: 1.3333em; vertical-align: -0.2em; }
/* big status icons (user-invite / verify-email / domain details) look heavy at stroke 2 */
.enix-ico.fa-2x > svg, .enix-ico.fa-3x > svg, .enix-ico.fa-5x > svg { stroke-width: 1.6; }
/* <i class="enix-ico"><i data-lucide></i></i> before lucide draws it: no FA glyph, no size jump */
.enix-ico > i[data-lucide] { display: inline-block; width: 1em; height: 1em; }
/* flex rows that used FA's fixed width */
.sidebar .sidebar-menu-item-icon-wrapper .enix-ico { width: 1.25em; text-align: center; }
.list-group-item > .enix-ico:first-child, .dropdown-item > .enix-ico:first-child { margin-right: 4px; }
.input-group-text .enix-ico { font-size: 15px; }
.btn > .enix-ico:first-child:not(:last-child) { margin-right: 2px; }
.btn > .enix-ico:last-child:not(:first-child) { margin-left: 2px; }
/* OAuth "Sign in with ..." pages (oauth/layout.tpl loads tokens + this file after oauth.css) */
body.enix-oauth { background-color: var(--bg); color: var(--text); font-family: var(--font-body); }
body.enix-oauth section#header { border-bottom-color: var(--border); background: var(--bg-subtle); color: var(--text-muted); }
body.enix-oauth section#footer { color: var(--text-dim); }
body.enix-oauth .content-container { background-color: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--text); }
body.enix-oauth .action-buttons { background-color: var(--bg-subtle); border-top-color: var(--border); border-radius: 0 0 var(--radius-md) var(--radius-md); }