/* ==========================================================================
   SkyHost polish layer
   Loaded after custom.css and premium.css. Colours come from the existing
   tokens (--fivem-*, --sky-*); this file fixes layout, spacing and the
   component UI: buttons, checkboxes, radios, switches, form layouts, tabs,
   modals, tables and support pages.
   Logical properties only, so it serves LTR and RTL.
   ========================================================================== */

:root {
    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-5: 24px;
    --sp-6: 32px;
    --sp-7: 48px;
    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 20px;
    --sidebar-w: 280px;
    --field-h: 46px;
}

/* ---------- Page layout and spacing ---------- */
@media (min-width: 1200px) {
    body.fivem-theme .container { max-width: 1240px; }
}
body.fivem-theme #main-body { padding: var(--sp-6) 0 var(--sp-7); }
body.fivem-theme .master-breadcrumb + #main-body,
body.fivem-theme .master-breadcrumb ~ #main-body { padding-top: var(--sp-6); }
body.fivem-theme .master-breadcrumb .breadcrumb { padding: var(--sp-3) 0; }
body.fivem-theme .primary-content > .card,
body.fivem-theme .primary-content > form > .card,
body.fivem-theme .primary-content .card + .card { margin-bottom: var(--sp-5); }
body.fivem-theme .card { margin-bottom: var(--sp-5); }
body.fivem-theme .sidebar .card,
body.fivem-theme .card-sidebar { margin-bottom: var(--sp-4) !important; }
body.fivem-theme .primary-content > .header-lined { margin-bottom: var(--sp-5); padding-bottom: var(--sp-4); }
body.fivem-theme .card-body.extra-padding { padding: var(--sp-6); }
body.fivem-theme .card-body > .card-title:first-child,
body.fivem-theme .card-body > h3:first-child { margin-bottom: var(--sp-4); }
body.fivem-theme hr { margin: var(--sp-5) 0; }

/* Client area: fixed-width sidebar + fluid content, sticky on desktop */
@media (min-width: 992px) {
    body.fivem-theme #main-body .row > .col-lg-4.col-xl-3 {
        flex: 0 0 var(--sidebar-w);
        width: var(--sidebar-w);
        max-width: var(--sidebar-w);
        padding-inline-end: var(--sp-4);
    }
    body.fivem-theme #main-body .row > .col-lg-8.col-xl-9 {
        flex: 1 1 0;
        width: auto;
        max-width: calc(100% - var(--sidebar-w));
        min-width: 0;
        padding-inline-start: var(--sp-4);
    }
    /* The whole sidebar column sticks (not just the first card), so every card scrolls together */
    body.fivem-theme #main-body .row > .col-lg-4.col-xl-3 {
        position: sticky;
        top: 96px;
        align-self: flex-start;
        max-height: calc(100vh - 112px);
        overflow-y: auto;
        scrollbar-width: none;
    }
    body.fivem-theme #main-body .row > .col-lg-4.col-xl-3::-webkit-scrollbar { display: none; }
}
@media (max-width: 991.98px) {
    body.fivem-theme #main-body .row > .col-lg-4.col-xl-3 { margin-bottom: var(--sp-4); }
}
body.fivem-theme .sidebar .card-body { padding: var(--sp-4) var(--sp-4); font-size: 14px; color: var(--fivem-muted); }
body.fivem-theme .sidebar .card-body a { color: var(--fivem-accent-light); }
body.fivem-theme .sidebar .card-footer { padding: var(--sp-3) var(--sp-4); }
body.fivem-theme .sidebar .card-header { cursor: default; }
body.fivem-theme .panel-collapsable .card-header,
body.fivem-theme .card-sidebar .card-header { cursor: pointer; user-select: none; }

/* Neutral top accent instead of coloured card edges */
body.fivem-theme .card[class*="card-accent-"] { border-top: 1px solid var(--sky-border); }

/* ---------- Buttons ---------- */
body.fivem-theme .btn {
    min-height: 42px;
    padding: 0 var(--sp-4);
    gap: var(--sp-2);
    border-radius: var(--r-sm);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.2;
    white-space: nowrap;
    -webkit-user-select: none;
    user-select: none;
}
body.fivem-theme input.btn { display: inline-block; padding-block: 0; }
body.fivem-theme .btn > i,
body.fivem-theme .btn > svg { flex: none; font-size: .92em; }
body.fivem-theme .btn-lg { min-height: 52px; padding: 0 var(--sp-5); border-radius: var(--r-md); font-size: 15px; }
body.fivem-theme .btn-sm { min-height: 36px; padding: 0 14px; border-radius: 9px; font-size: 13px; }
body.fivem-theme .btn-xs { min-height: 28px; padding: 0 10px; border-radius: 8px; font-size: 12px; }
body.fivem-theme .btn-block + .btn-block { margin-top: var(--sp-2); }
body.fivem-theme .btn:active:not(:disabled):not(.disabled) { transform: translateY(0) scale(.985); }
body.fivem-theme .btn:focus-visible { outline: 2px solid var(--sky-spark); outline-offset: 2px; box-shadow: none; }

/* Solid states */
body.fivem-theme .btn-primary,
body.fivem-theme .btn-success {
    color: #fff !important;
    background: linear-gradient(180deg, #7d95b3 0%, #62789a 100%) !important;
    border: 1px solid rgba(190, 208, 230, .34) !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .22) inset, 0 6px 16px rgba(60, 78, 104, .35);
}
body.fivem-theme .btn-primary:hover,
body.fivem-theme .btn-success:hover,
body.fivem-theme .btn-primary:focus,
body.fivem-theme .btn-success:focus {
    background: linear-gradient(180deg, #8ba3c1 0%, #6b82a4 100%) !important;
    border-color: rgba(205, 220, 240, .5) !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .28) inset, 0 10px 24px rgba(60, 78, 104, .45);
    transform: translateY(-1px);
}
body.fivem-theme .btn-primary:active,
body.fivem-theme .btn-success:active,
body.fivem-theme .btn-primary.active { background: linear-gradient(180deg, #6b82a4 0%, #566b8b 100%) !important; box-shadow: 0 1px 0 rgba(0, 0, 0, .2) inset; }

/* Quiet / ghost buttons */
body.fivem-theme .btn-default,
body.fivem-theme .btn-secondary,
body.fivem-theme .btn-outline-primary,
body.fivem-theme .btn-outline-light,
body.fivem-theme .btn-outline-secondary {
    color: #dde5f0 !important;
    background: rgba(158, 179, 204, .08) !important;
    border: 1px solid rgba(158, 179, 204, .26) !important;
    box-shadow: none;
}
body.fivem-theme .btn-default:hover,
body.fivem-theme .btn-secondary:hover,
body.fivem-theme .btn-outline-primary:hover,
body.fivem-theme .btn-outline-light:hover,
body.fivem-theme .btn-outline-secondary:hover {
    color: #fff !important;
    background: rgba(158, 179, 204, .18) !important;
    border-color: rgba(158, 179, 204, .48) !important;
    transform: translateY(-1px);
}

/* Semantic buttons */
body.fivem-theme .btn-danger { color: #ffb0ba !important; background: rgba(229, 107, 122, .12) !important; border: 1px solid rgba(229, 107, 122, .4) !important; box-shadow: none; }
body.fivem-theme .btn-danger:hover { color: #fff !important; background: #d0475a !important; border-color: #d0475a !important; transform: translateY(-1px); }
body.fivem-theme .btn-warning { color: #f4d397 !important; background: rgba(231, 189, 114, .12) !important; border: 1px solid rgba(231, 189, 114, .4) !important; box-shadow: none; }
body.fivem-theme .btn-warning:hover { color: #1b1508 !important; background: #e7bd72 !important; border-color: #e7bd72 !important; transform: translateY(-1px); }
body.fivem-theme .btn-info { color: #bcd7ff !important; background: rgba(142, 197, 255, .12) !important; border: 1px solid rgba(142, 197, 255, .36) !important; box-shadow: none; }
body.fivem-theme .btn-info:hover { color: #fff !important; background: rgba(142, 197, 255, .26) !important; }
body.fivem-theme .btn-link { min-height: 0; padding: 0; color: var(--fivem-accent-light); background: none !important; border: 0 !important; box-shadow: none; text-decoration: none; }
body.fivem-theme .btn-link:hover { color: #fff; transform: none; text-decoration: underline; text-underline-offset: 3px; }
body.fivem-theme .btn.disabled,
body.fivem-theme .btn:disabled,
body.fivem-theme .btn[disabled] { opacity: .45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* Joined controls */
body.fivem-theme .btn-group { gap: 0; }
body.fivem-theme .btn-group > .btn:not(:first-child),
body.fivem-theme .btn-group > .btn-group:not(:first-child) > .btn { margin-inline-start: -1px; border-start-start-radius: 0; border-end-start-radius: 0; }
body.fivem-theme .btn-group > .btn:not(:last-child),
body.fivem-theme .btn-group > .btn-group:not(:last-child) > .btn { border-start-end-radius: 0; border-end-end-radius: 0; }
body.fivem-theme .btn-group > .btn:hover { z-index: 2; transform: none; }
body.fivem-theme .input-group > .input-group-append > .btn,
body.fivem-theme .input-group > .input-group-prepend > .btn { min-height: var(--field-h); }
body.fivem-theme .input-group > .input-group-append > .btn { margin-inline-start: -1px; border-start-start-radius: 0; border-end-start-radius: 0; border-start-end-radius: var(--r-sm); border-end-end-radius: var(--r-sm); }
body.fivem-theme .input-group > .input-group-prepend > .btn { border-start-end-radius: 0; border-end-end-radius: 0; }
body.fivem-theme .input-group > .form-control:not(:last-child) { border-start-end-radius: 0 !important; border-end-end-radius: 0 !important; }
body.fivem-theme .input-group > .form-control:not(:first-child) { border-start-start-radius: 0 !important; border-end-start-radius: 0 !important; }
body.fivem-theme .input-group > .form-control:first-child { border-start-start-radius: var(--r-sm) !important; border-end-start-radius: var(--r-sm) !important; }
body.fivem-theme .input-group > .form-control:last-child { border-start-end-radius: var(--r-sm) !important; border-end-end-radius: var(--r-sm) !important; }
body.fivem-theme .input-group-text { min-height: var(--field-h); padding: 0 14px; color: #8a97ab; border-radius: var(--r-sm); }
body.fivem-theme .input-group > .input-group-prepend > .input-group-text { border-start-end-radius: 0; border-end-end-radius: 0; }
body.fivem-theme .input-group > .input-group-append > .input-group-text { border-start-start-radius: 0; border-end-start-radius: 0; }

/* Dropdown toggle carets and split buttons */
body.fivem-theme .btn.dropdown-toggle::after { margin-inline-start: 2px; }

/* Close button */
body.fivem-theme .close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    float: none;
    width: 34px;
    height: 34px;
    padding: 0;
    color: #c8d1de;
    background: rgba(158, 179, 204, .08);
    border: 1px solid transparent;
    border-radius: 10px;
    opacity: 1;
    font-size: 22px;
    font-weight: 400;
    line-height: 1;
    text-shadow: none;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}
body.fivem-theme .close:hover { color: #fff; background: rgba(158, 179, 204, .2); border-color: rgba(158, 179, 204, .3); opacity: 1; }
body.fivem-theme .alert .close { position: absolute; top: 10px; inset-inline-end: 10px; width: 28px; height: 28px; font-size: 18px; }
body.fivem-theme .alert-dismissible { padding-inline-end: 52px; }

/* ---------- Checkboxes, radios, switches ---------- */
body.fivem-theme input[type="checkbox"]:not(.custom-control-input):not(.iCheck-helper),
body.fivem-theme input[type="radio"]:not(.custom-control-input):not(.iCheck-helper) {
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin: 0;
    vertical-align: middle;
    background: var(--sky-field, rgba(6, 7, 22, .72));
    border: 1.5px solid rgba(158, 179, 204, .42);
    border-radius: 6px;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, box-shadow .2s ease, transform .15s ease;
}
body.fivem-theme input[type="radio"]:not(.custom-control-input):not(.iCheck-helper) { border-radius: 50%; }
body.fivem-theme input[type="checkbox"]:not(.custom-control-input):not(.iCheck-helper):hover,
body.fivem-theme input[type="radio"]:not(.custom-control-input):not(.iCheck-helper):hover { border-color: var(--fivem-accent-light); background: rgba(158, 179, 204, .1); }
body.fivem-theme input[type="checkbox"]:not(.custom-control-input):not(.iCheck-helper):focus-visible,
body.fivem-theme input[type="radio"]:not(.custom-control-input):not(.iCheck-helper):focus-visible { outline: 0; border-color: var(--sky-spark); box-shadow: 0 0 0 4px rgba(142, 197, 255, .18); }
body.fivem-theme input[type="checkbox"]:not(.custom-control-input):not(.iCheck-helper):checked,
body.fivem-theme input[type="radio"]:not(.custom-control-input):not(.iCheck-helper):checked,
body.fivem-theme input[type="checkbox"]:not(.custom-control-input):not(.iCheck-helper):indeterminate {
    background: linear-gradient(180deg, #7d95b3, #5c7292);
    border-color: rgba(190, 208, 230, .6);
}
body.fivem-theme input[type="checkbox"]:not(.custom-control-input):not(.iCheck-helper):checked::after {
    content: "";
    position: absolute;
    top: 2px;
    inset-inline-start: 6px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
body.fivem-theme input[type="checkbox"]:not(.custom-control-input):not(.iCheck-helper):indeterminate::after {
    content: "";
    position: absolute;
    top: 8px;
    inset-inline: 4px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
}
body.fivem-theme input[type="radio"]:not(.custom-control-input):not(.iCheck-helper):checked::after {
    content: "";
    position: absolute;
    inset: 4px;
    background: #fff;
    border-radius: 50%;
}
body.fivem-theme input[type="checkbox"]:disabled,
body.fivem-theme input[type="radio"]:disabled { opacity: .45; cursor: not-allowed; }

/* Labels that wrap a checkbox / radio line up on one baseline */
body.fivem-theme .form-check { display: flex; align-items: flex-start; gap: 10px; min-height: 24px; padding-inline-start: 0; margin-bottom: var(--sp-2); }
body.fivem-theme .form-check .form-check-input { position: static; margin: 2px 0 0; }
body.fivem-theme .form-check .form-check-label,
body.fivem-theme .form-check > label { margin: 0; font-weight: 500; cursor: pointer; }
body.fivem-theme .controls.form-check { display: block; }
body.fivem-theme .controls.form-check label,
body.fivem-theme label.checkbox-inline,
body.fivem-theme label.radio-inline,
body.fivem-theme .checkbox-inline,
body.fivem-theme .radio-inline,
body.fivem-theme .checkbox label,
body.fivem-theme .radio label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 var(--sp-4) var(--sp-2) 0;
    padding-inline-start: 0;
    color: #cbd3df;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}
[dir="rtl"] body.fivem-theme .controls.form-check label,
[dir="rtl"] body.fivem-theme label.checkbox-inline,
[dir="rtl"] body.fivem-theme label.radio-inline,
[dir="rtl"] body.fivem-theme .checkbox-inline,
[dir="rtl"] body.fivem-theme .radio-inline { margin: 0 0 var(--sp-2) var(--sp-4); }
body.fivem-theme .checkbox-inline input,
body.fivem-theme .radio-inline input,
body.fivem-theme .checkbox label input,
body.fivem-theme .radio label input { position: static; margin: 0; }
body.fivem-theme label:hover > input[type="checkbox"]:not(:checked):not(:disabled),
body.fivem-theme label:hover > input[type="radio"]:not(:checked):not(:disabled) { border-color: var(--fivem-accent-light); }

/* Bootstrap custom controls */
body.fivem-theme .custom-control { min-height: 24px; padding-inline-start: 32px; }
body.fivem-theme .custom-control-label { color: #cbd3df; font-size: 14px; font-weight: 500; cursor: pointer; }
body.fivem-theme .custom-control-label::before { inset-inline-start: -32px; top: 2px; width: 20px; height: 20px; background: var(--sky-field, rgba(6, 7, 22, .72)); border: 1.5px solid rgba(158, 179, 204, .42); border-radius: 6px; box-shadow: none; transition: background .18s ease, border-color .18s ease; }
body.fivem-theme .custom-radio .custom-control-label::before { border-radius: 50%; }
body.fivem-theme .custom-control-label::after { inset-inline-start: -32px; top: 2px; width: 20px; height: 20px; }
body.fivem-theme .custom-control-input:checked ~ .custom-control-label::before { background: linear-gradient(180deg, #7d95b3, #5c7292); border-color: rgba(190, 208, 230, .6); }
body.fivem-theme .custom-control-input:focus ~ .custom-control-label::before { box-shadow: 0 0 0 4px rgba(142, 197, 255, .18); border-color: var(--sky-spark); }

/* iCheck (used by .icheck-button inputs) */
body.fivem-theme .icheckbox_square-blue,
body.fivem-theme .iradio_square-blue {
    display: inline-block;
    position: relative;
    width: 20px;
    height: 20px;
    margin: 0;
    vertical-align: middle;
    background: var(--sky-field, rgba(6, 7, 22, .72)) !important;
    background-image: none !important;
    border: 1.5px solid rgba(158, 179, 204, .42);
    border-radius: 6px;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, box-shadow .2s ease;
}
body.fivem-theme .iradio_square-blue { border-radius: 50%; }
body.fivem-theme .icheckbox_square-blue.hover,
body.fivem-theme .iradio_square-blue.hover { border-color: var(--fivem-accent-light); }
body.fivem-theme .icheckbox_square-blue.focus,
body.fivem-theme .iradio_square-blue.focus { border-color: var(--sky-spark); box-shadow: 0 0 0 4px rgba(142, 197, 255, .18); }
body.fivem-theme .icheckbox_square-blue.checked,
body.fivem-theme .iradio_square-blue.checked { background: linear-gradient(180deg, #7d95b3, #5c7292) !important; border-color: rgba(190, 208, 230, .6); }
body.fivem-theme .icheckbox_square-blue.checked::after { content: ""; position: absolute; top: 2px; inset-inline-start: 6px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
body.fivem-theme .iradio_square-blue.checked::after { content: ""; position: absolute; inset: 4px; background: #fff; border-radius: 50%; }
body.fivem-theme .icheckbox_square-blue.disabled,
body.fivem-theme .iradio_square-blue.disabled { opacity: .45; cursor: not-allowed; }
body.fivem-theme .iCheck-helper { z-index: 3; }

/* bootstrap-switch (Yes / No toggles): plain two-option control, selected side filled */
body.fivem-theme .bootstrap-switch {
    width: auto !important;
    direction: ltr !important;
    min-width: 96px;
    background: transparent;
    border: 1px solid rgba(158, 179, 204, .35);
    border-radius: 6px;
    box-shadow: none;
    overflow: hidden;
}
body.fivem-theme .bootstrap-switch.bootstrap-switch-focused { border-color: var(--sky-spark); box-shadow: none; }
body.fivem-theme .bootstrap-switch .bootstrap-switch-container {
    display: flex !important;
    width: 100% !important;
    margin-left: 0 !important;
    transform: none;
    transition: none;
}
body.fivem-theme .bootstrap-switch .bootstrap-switch-label { display: none !important; }
body.fivem-theme .bootstrap-switch .bootstrap-switch-handle-on,
body.fivem-theme .bootstrap-switch .bootstrap-switch-handle-off {
    flex: 1 1 50%;
    width: auto !important;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    border: 0;
    border-radius: 0;
    color: #98a4b6 !important;
    background: transparent !important;
    box-shadow: none !important;
}
body.fivem-theme .bootstrap-switch.bootstrap-switch-on .bootstrap-switch-handle-on,
body.fivem-theme .bootstrap-switch.bootstrap-switch-off .bootstrap-switch-handle-off { color: #fff !important; background: #5c7292 !important; }
body.fivem-theme .bootstrap-switch.bootstrap-switch-disabled { opacity: .5; }

/* intl-tel-input country dropdown (phone fields on every page) */
body.fivem-theme .intl-tel-input .country-list {
    min-width: 280px;
    max-height: 260px;
    margin-top: 8px;
    padding: 6px;
    color: #dce3ed;
    background: #111326;
    border: 1px solid rgba(158, 179, 204, .22);
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
    white-space: normal;
    scrollbar-width: thin;
    scrollbar-color: rgba(158, 179, 204, .35) transparent;
}
body.fivem-theme .intl-tel-input .country-list::-webkit-scrollbar { width: 8px; }
body.fivem-theme .intl-tel-input .country-list::-webkit-scrollbar-track { background: transparent; }
body.fivem-theme .intl-tel-input .country-list::-webkit-scrollbar-thumb { background: rgba(158, 179, 204, .3); border-radius: 8px; }
body.fivem-theme .intl-tel-input .country-list .country { display: flex; padding: 9px 12px; align-items: center; gap: 10px; border-radius: 9px; cursor: pointer; transition: background-color .2s ease; }
body.fivem-theme .intl-tel-input .country-list .country .flag-box,
body.fivem-theme .intl-tel-input .country-list .country .iti-flag { position: static; margin: 0; flex: 0 0 auto; }
body.fivem-theme .intl-tel-input .country-list .country .country-name { margin: 0; color: #e4eaf3; font-size: 14px; font-weight: 500; }
body.fivem-theme .intl-tel-input .country-list .country .dial-code { margin-inline-start: auto; color: #8592a6; font-size: 13px; font-variant-numeric: tabular-nums; }
body.fivem-theme .intl-tel-input .country-list .country.highlight,
body.fivem-theme .intl-tel-input .country-list .country:hover { background: rgba(142, 197, 255, .12); }
body.fivem-theme .intl-tel-input .country-list .country.highlight .dial-code,
body.fivem-theme .intl-tel-input .country-list .country:hover .dial-code { color: var(--sky-spark, #8ec5ff); }
body.fivem-theme .intl-tel-input .country-list .divider { margin: 4px 0 6px; padding: 0; border-bottom: 1px solid rgba(158, 179, 204, .16); }
body.fivem-theme .intl-tel-input .selected-flag { background: rgba(109, 131, 159, .1); transition: background-color .2s ease; }
body.fivem-theme .intl-tel-input .flag-container:hover .selected-flag,
body.fivem-theme .intl-tel-input .selected-flag:focus { background: rgba(109, 131, 159, .2); }
body.fivem-theme .intl-tel-input .selected-dial-code { color: #cfd8e5; font-weight: 600; }
body.fivem-theme .intl-tel-input .iti-arrow { border-top-color: #8592a6; }
body.fivem-theme .intl-tel-input .iti-arrow.up { border-bottom-color: #8592a6; }
/* Phone field on plain forms (account details, contact details): flag, dial code and arrow sit side by side
   in a flex row instead of being absolutely positioned, so they never overlap in either direction. */
body.fivem-theme .intl-tel-input { display: flex; width: 100%; align-items: stretch; direction: ltr; }
body.fivem-theme .intl-tel-input .flag-container { position: relative; inset: auto; flex: 0 0 auto; padding: 0; }
body.fivem-theme .intl-tel-input.intl-tel-input .selected-flag { position: relative; display: flex; width: auto !important; height: 100%; padding: 0 12px; align-items: center; gap: 8px; border: 1px solid rgba(158, 179, 204, .16); border-inline-end: 0; border-radius: var(--r-sm, 12px) 0 0 var(--r-sm, 12px); }
body.fivem-theme .intl-tel-input .selected-flag .iti-flag,
body.fivem-theme .intl-tel-input .selected-flag .iti-arrow { position: static; flex: 0 0 auto; margin: 0; }
body.fivem-theme .intl-tel-input .selected-flag .iti-flag { width: 20px; height: 15px; }
body.fivem-theme .intl-tel-input .selected-flag .iti-flag.be { width: 18px; }
body.fivem-theme .intl-tel-input .selected-flag .iti-flag.ch { width: 15px; }
body.fivem-theme .intl-tel-input .selected-flag .iti-flag.mc { width: 19px; }
body.fivem-theme .intl-tel-input .selected-flag .iti-flag.ne { width: 18px; }
body.fivem-theme .intl-tel-input .selected-flag .iti-flag.np { width: 13px; }
body.fivem-theme .intl-tel-input .selected-flag .iti-flag.va { width: 15px; }
body.fivem-theme .intl-tel-input .selected-dial-code { position: static; flex: 0 0 auto; width: auto; margin: 0; padding: 0; white-space: nowrap; direction: ltr; unicode-bidi: isolate; }
body.fivem-theme .intl-tel-input input.form-control { flex: 1; width: auto; min-width: 0; padding-inline: .85rem !important; border-radius: 0 var(--r-sm, 12px) var(--r-sm, 12px) 0; text-align: start; }

/* ---------- Form fields ---------- */
body.fivem-theme .form-control,
body.fivem-theme .custom-select { min-height: var(--field-h); padding: 0 var(--sp-4); line-height: 1.4; border-radius: var(--r-sm); }
body.fivem-theme select.form-control,
body.fivem-theme .custom-select { padding-inline-end: 40px; -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%239eb3cc' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; background-size: 12px; }
[dir="rtl"] body.fivem-theme select.form-control,
[dir="rtl"] body.fivem-theme .custom-select { background-position: left 16px center; }
body.fivem-theme select.form-control[multiple],
body.fivem-theme select.form-control[size]:not([size="1"]) { padding: var(--sp-2); background-image: none; }
body.fivem-theme select option { color: #edf1f6; background: #111326; }
body.fivem-theme textarea.form-control { min-height: 120px; padding: var(--sp-3) var(--sp-4); resize: vertical; }
body.fivem-theme .form-control.is-invalid,
body.fivem-theme .has-error .form-control { border-color: rgba(229, 107, 122, .7); box-shadow: 0 0 0 4px rgba(229, 107, 122, .12); }
body.fivem-theme .form-control.is-valid,
body.fivem-theme .has-success .form-control { border-color: rgba(104, 197, 161, .7); }
body.fivem-theme .invalid-feedback,
body.fivem-theme .help-block { margin-top: 6px; color: #ff9aa6; font-size: 12.5px; }
body.fivem-theme .form-group > label,
body.fivem-theme .form-group > .control-label { display: block; }
body.fivem-theme .form-group small.form-text,
body.fivem-theme .form-group .field-help-text { display: block; margin-top: 6px; }
body.fivem-theme .custom-file { height: var(--field-h); }
body.fivem-theme .custom-file-label { display: flex; align-items: center; height: var(--field-h); padding: 0 var(--sp-4); color: #7d889b; background: var(--sky-field, rgba(6, 7, 22, .72)); border: 1px solid rgba(158, 179, 204, .2); border-radius: var(--r-sm); }
body.fivem-theme .custom-file-label::after { display: flex; align-items: center; height: 100%; padding: 0 var(--sp-4); color: #dde5f0; background: rgba(158, 179, 204, .12); border-inline-start: 1px solid rgba(158, 179, 204, .2); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
[dir="rtl"] body.fivem-theme .custom-file-label::after { border-radius: var(--r-sm) 0 0 var(--r-sm); }
body.fivem-theme .custom-file-input:focus ~ .custom-file-label { border-color: var(--sky-spark); box-shadow: 0 0 0 4px rgba(142, 197, 255, .14); }
body.fivem-theme .attachment-group { flex-wrap: nowrap; }
body.fivem-theme .prepend-icon .field-icon { display: flex; align-items: center; justify-content: center; width: 44px; height: var(--field-h); color: #7d889b; }

/* Horizontal forms: stack the label above the field, capped for readability */
body.fivem-theme .form-group.row > label.col-form-label,
body.fivem-theme .form-group.row > .col-form-label {
    flex: 0 0 100%;
    max-width: 100%;
    padding-block: 0;
    margin-bottom: 6px;
    text-align: start !important;
}
body.fivem-theme .form-group.row > .col-form-label ~ [class*="col-"] { flex: 0 0 100%; max-width: 640px; }
body.fivem-theme .form-group.row > [class*="offset-"] { margin-inline-start: 0; flex: 0 0 100%; max-width: 640px; }
body.fivem-theme .form-group.row { margin-inline: 0; }
body.fivem-theme .form-group.row > [class*="col-"] { padding-inline: 0; }
body.fivem-theme .form-group.row > .col-form-label ~ .col-md-9 textarea,
body.fivem-theme .form-group.row > .col-form-label ~ .col-sm-9 textarea { width: 100%; }
body.fivem-theme .form-group.text-center,
body.fivem-theme .card-body > .text-center > .btn { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-2) var(--sp-3); }
body.fivem-theme form > .form-group.text-center { margin-top: var(--sp-5); }
body.fivem-theme .card-body .row > [class*="col-"] > .form-group { margin-bottom: var(--sp-4); }

/* ---------- Tabs, pills, collapse ---------- */
body.fivem-theme .nav-tabs { gap: var(--sp-1); border-bottom: 1px solid var(--sky-border); }
body.fivem-theme .nav-tabs .nav-link { padding: 12px var(--sp-4); margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; font-size: 14px; font-weight: 600; transition: color .2s ease, border-color .2s ease, background .2s ease; }
body.fivem-theme .nav-tabs .nav-link:hover { background: rgba(158, 179, 204, .06); }
body.fivem-theme .nav-tabs .nav-link.active { color: #fff; background: transparent; border-bottom-color: var(--fivem-accent-light); }
body.fivem-theme .nav-pills { gap: var(--sp-2); }
[dir="rtl"] body.fivem-theme .ticket-reply .requestor-badge { float: left !important; }
body.fivem-theme .nav-pills .nav-link { display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--sp-4); color: var(--fivem-muted); border-radius: var(--r-sm); font-size: 14px; font-weight: 600; }
body.fivem-theme .nav-pills .nav-link:hover { color: #fff; background: rgba(158, 179, 204, .1); }
body.fivem-theme .nav-pills .nav-link.active { color: #fff; background: linear-gradient(180deg, #7d95b3, #5c7292); }
body.fivem-theme .tab-content { padding-top: var(--sp-4); }
body.fivem-theme .nav-tabs + .tab-content.bg-white,
body.fivem-theme .product-details-tab-container { padding: var(--sp-5); }
body.fivem-theme .panel-collapsable .card-header .card-minimise { transition: transform .25s ease; }
body.fivem-theme .card-sidebar .card-header .card-minimise { float: none !important; margin-inline-start: auto; }
body.fivem-theme .card-sidebar .card-title { display: flex; align-items: center; gap: var(--sp-2); }
body.fivem-theme .card-sidebar .card-title .badge { margin-inline-start: auto; float: none !important; }
body.fivem-theme .card-sidebar .card-minimise { order: 3; }

/* ---------- Alerts ---------- */
body.fivem-theme .alert { position: relative; margin-bottom: var(--sp-5); padding: var(--sp-4) var(--sp-5); border-inline-start-width: 3px; border-radius: var(--r-md); font-size: 14px; line-height: 1.6; }
body.fivem-theme .alert-success { border-inline-start-color: #68c5a1; }
body.fivem-theme .alert-danger,
body.fivem-theme .alert-error { border-inline-start-color: #e56b7a; }
body.fivem-theme .alert-warning { border-inline-start-color: #e7bd72; }
body.fivem-theme .alert-info { border-inline-start-color: #8ec5ff; }
body.fivem-theme .alert ul { margin: var(--sp-2) 0 0; padding-inline-start: 20px; }
body.fivem-theme .alert > i:first-child { margin-inline-end: var(--sp-2); }

/* ---------- Modals, dropdowns, tooltips ---------- */
body.fivem-theme .modal-content { overflow: hidden; }
body.fivem-theme .modal-header { align-items: center; padding: var(--sp-4) var(--sp-5); color: #fff; background: rgba(158, 179, 204, .05) !important; border-bottom: 1px solid var(--sky-border); }
body.fivem-theme .modal-header .modal-title { color: #fff; font-size: 18px; font-weight: 700; }
body.fivem-theme .modal-body { color: #cbd3df; }
body.fivem-theme .modal-footer { background: rgba(2, 1, 18, .25); }
body.fivem-theme .modal-dialog { margin-top: 8vh; }
body.fivem-theme .modal-lg .modal-content { border-radius: var(--r-lg); }
body.fivem-theme .modal-header .close { margin: 0; margin-inline-start: auto; padding: 0; }
body.fivem-theme .modal-body { padding: var(--sp-5); }
body.fivem-theme .modal-footer { gap: var(--sp-2); padding: var(--sp-4) var(--sp-5); border-top: 1px solid var(--sky-border); }
body.fivem-theme .modal-footer > * { margin: 0; }
body.fivem-theme .modal.fade .modal-dialog { transition: transform .3s cubic-bezier(.22, 1, .36, 1), opacity .2s ease; transform: translateY(12px) scale(.98); }
body.fivem-theme .modal.show .modal-dialog { transform: none; }
body.fivem-theme .dropdown-item { padding: 9px 12px; font-size: 14px; }
body.fivem-theme .tooltip-inner { padding: 7px 11px; color: #eaf0f8; background: #1d2036; border: 1px solid var(--sky-border); border-radius: 8px; font-size: 12.5px; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
body.fivem-theme .tooltip.bs-tooltip-top .arrow::before { border-top-color: #1d2036; }
body.fivem-theme .tooltip.bs-tooltip-bottom .arrow::before { border-bottom-color: #1d2036; }

/* ---------- Tables and DataTables ---------- */
body.fivem-theme .table-container { margin-bottom: var(--sp-5); border-radius: var(--r-lg); box-shadow: var(--sky-hi), 0 14px 36px rgba(0, 0, 0, .16); }
body.fivem-theme .table-container .dataTables_wrapper { padding: 0; }
body.fivem-theme .dataTables_wrapper .row:first-child { align-items: center; margin: 0; padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--sky-border); }
body.fivem-theme .dataTables_wrapper .row:last-child:not(:first-child) { align-items: center; margin: 0; padding: var(--sp-4) var(--sp-5); border-top: 1px solid var(--sky-border); }
body.fivem-theme .dataTables_wrapper .row > [class*="col-"] { padding-inline: 0; }
body.fivem-theme .dataTables_wrapper .dataTables_length label,
body.fivem-theme .dataTables_wrapper .dataTables_filter label { display: inline-flex; align-items: center; gap: var(--sp-2); margin: 0; color: #8e99aa; font-size: 13px; font-weight: 500; }
body.fivem-theme .dataTables_wrapper .dataTables_length select { min-height: 38px; width: auto; padding: 0 34px 0 12px; }
body.fivem-theme .dataTables_wrapper .dataTables_filter input { min-height: 38px; width: 220px; margin: 0; }
body.fivem-theme .dataTables_wrapper .dataTables_paginate .pagination { margin: 0; gap: var(--sp-1); }
body.fivem-theme .dataTables_wrapper .table-responsive { margin: 0; }
body.fivem-theme table.table-list { margin: 0; border: 0 !important; border-radius: 0; }
body.fivem-theme table.table-list tbody tr[onclick],
body.fivem-theme table.table-list tbody tr.clickable { cursor: pointer; }
body.fivem-theme table.table-list thead th.sorting::before,
body.fivem-theme table.table-list thead th.sorting_asc::before,
body.fivem-theme table.table-list thead th.sorting_desc::before { opacity: .35; }
body.fivem-theme .table-list td .btn { min-height: 32px; padding: 0 12px; font-size: 12.5px; }
body.fivem-theme .table-striped tbody tr:nth-of-type(odd) { background: rgba(158, 179, 204, .04); }
body.fivem-theme .table-bordered,
body.fivem-theme .table-bordered td,
body.fivem-theme .table-bordered th { border-color: var(--sky-border); }

/* Consistent status pills */
body.fivem-theme .label.status.status-active,
body.fivem-theme .label.status.status-paid,
body.fivem-theme .label.status.status-open,
body.fivem-theme .label.status.status-answered,
body.fivem-theme .label.status.status-completed { color: #8de1bf; background: rgba(104, 197, 161, .13); border-color: rgba(104, 197, 161, .28); }
body.fivem-theme .label.status.status-closed,
body.fivem-theme .label.status.status-draft,
body.fivem-theme .label.status.status-inprogress,
body.fivem-theme .label.status.status-on-hold { color: #b5c0d0; background: rgba(158, 179, 204, .1); border-color: rgba(158, 179, 204, .26); }
body.fivem-theme .label.status.status-overdue,
body.fivem-theme .label.status.status-cancelled,
body.fivem-theme .label.status.status-terminated,
body.fivem-theme .label.status.status-suspended,
body.fivem-theme .label.status.status-refunded,
body.fivem-theme .label.status.status-collections { color: #ff9aa6; background: rgba(229, 107, 122, .13); border-color: rgba(229, 107, 122, .3); }

/* ---------- Badges, breadcrumbs, pagination ---------- */
body.fivem-theme .badge { padding: 4px 9px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; }
body.fivem-theme .breadcrumb-item + .breadcrumb-item::before { content: "\203A"; font-size: 15px; line-height: 1; }
[dir="rtl"] body.fivem-theme .breadcrumb-item + .breadcrumb-item::before { content: "\2039"; }
body.fivem-theme .page-item .page-link { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 12px; }

/* ---------- Support: tickets, KB, announcements ---------- */
body.fivem-theme .view-ticket .card-title { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3); }
body.fivem-theme .view-ticket .ticket-actions { display: flex; gap: var(--sp-2); float: none !important; margin: 0 !important; }
body.fivem-theme .view-ticket > .card-body { padding: var(--sp-5) !important; border: 0 !important; }
body.fivem-theme .view-ticket > .card-body + .card-body { padding-top: 0 !important; }
body.fivem-theme .view-ticket > .card-body:first-child p:last-child { margin-bottom: 0; }
body.fivem-theme .ticket-reply { overflow: hidden; margin: 0; background: rgba(2, 1, 18, .28) !important; border: 1px solid var(--sky-border); border-radius: var(--r-md); }
body.fivem-theme .ticket-reply.staff { border-color: rgba(158, 179, 204, .34); background: rgba(109, 131, 159, .08) !important; }
body.fivem-theme .ticket-reply .posted-by { display: block; overflow: hidden; padding: 12px var(--sp-5); line-height: 26px; color: #8e99aa; background: rgba(158, 179, 204, .06) !important; border: 0 !important; border-bottom: 1px solid var(--sky-border) !important; font-size: 13px; }
body.fivem-theme .ticket-reply .posted-by-name { color: #fff; font-weight: 700; }
body.fivem-theme .ticket-reply .message { padding: var(--sp-5) !important; color: #d4dbe6 !important; background: transparent !important; border: 0 !important; font-size: 14.5px; line-height: 1.75; }
body.fivem-theme .ticket-reply .requestor-badge { float: right !important; margin-inline-start: var(--sp-3); padding: 2px 10px; color: #cbd5e3; background: rgba(158, 179, 204, .12); border: 1px solid rgba(158, 179, 204, .24); border-radius: 999px; font-size: 11px; letter-spacing: .04em; }
body.fivem-theme .ticket-reply .attachments { border-top: 1px solid var(--sky-border); }
body.fivem-theme .attachment-list { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin: var(--sp-3) 0 0; padding: 0; list-style: none; }
body.fivem-theme .attachment-list figure { margin: 0; }
body.fivem-theme .attachment-list li a,
body.fivem-theme .attachment-list li > span { display: flex; align-items: center; gap: var(--sp-2); padding: 8px 12px; color: #cbd3df; background: rgba(158, 179, 204, .08); border: 1px solid var(--sky-border); border-radius: 10px; font-size: 13px; }
body.fivem-theme .attachment-list li a:hover { color: #fff; border-color: var(--sky-border-strong); }
body.fivem-theme #ticketReplyContainer .card-body { padding: var(--sp-5); }
body.fivem-theme .md-editor { overflow: hidden; border-radius: var(--r-md); }
body.fivem-theme .md-editor > .md-header { padding: var(--sp-2) var(--sp-3); }
body.fivem-theme .md-editor > .md-header .btn { min-height: 30px; padding: 0 9px; border-radius: 7px !important; }

body.fivem-theme .kb-category,
body.fivem-theme .kb-article-item,
body.fivem-theme .announcement-single,
body.fivem-theme .kbarticles a { transition: transform .25s cubic-bezier(.22, 1, .36, 1), border-color .2s ease, background .2s ease; }
body.fivem-theme .kb-category { padding: var(--sp-5); border: 1px solid var(--sky-border); border-radius: var(--r-md); }
body.fivem-theme .kb-category:hover { transform: translateY(-2px); border-color: var(--sky-border-strong); }
body.fivem-theme .kb-article-item { display: block; margin-bottom: var(--sp-2); padding: var(--sp-4) var(--sp-5); border: 1px solid var(--sky-border); border-radius: var(--r-md); }
body.fivem-theme .kb-article-item:hover { transform: translateX(3px); border-color: var(--sky-border-strong); }
body.fivem-theme .kb-article-item i { margin-inline-end: var(--sp-2); color: var(--fivem-accent-light); }
body.fivem-theme .announcement-single { margin-bottom: var(--sp-5); padding-bottom: var(--sp-5); border-bottom: 1px solid var(--sky-border); }
body.fivem-theme .announcement-single article { padding: var(--sp-5); border: 1px solid var(--sky-border); border-radius: var(--r-md); }
body.fivem-theme .announcement-single h2 a { color: #fff; }
body.fivem-theme .kb-search,
body.fivem-theme .home-domain-search { margin-bottom: var(--sp-5); }
body.fivem-theme .list-group-flush > .list-group-item { border-inline: 0; }

/* ---------- Product details, misc panels ---------- */
body.fivem-theme .product-details .product-status { margin-bottom: var(--sp-5); }
body.fivem-theme .product-details-tab-container .tab-pane { padding: 0; }
body.fivem-theme .card-body .table { margin-bottom: 0; }
body.fivem-theme .text-muted.small,
body.fivem-theme small.text-muted { font-size: 12.5px; }
body.fivem-theme .list-inline-item:not(:last-child) { margin-inline-end: var(--sp-3); }
body.fivem-theme .row.no-gutters + .row { margin-top: var(--sp-4); }
body.fivem-theme .empty-state,
body.fivem-theme .text-center > p.text-muted:only-child { padding: var(--sp-6) var(--sp-4); }

/* ---------- Mobile ---------- */
@media (max-width: 767.98px) {
    body.fivem-theme #main-body { padding: var(--sp-5) 0 var(--sp-6); }
    body.fivem-theme .card-body.extra-padding { padding: var(--sp-5) var(--sp-4); }
    body.fivem-theme .modal-header,
    body.fivem-theme .modal-body,
    body.fivem-theme .modal-footer { padding-inline: var(--sp-4); }
    body.fivem-theme .dataTables_wrapper .row:first-child,
    body.fivem-theme .dataTables_wrapper .row:last-child:not(:first-child) { padding: var(--sp-3) var(--sp-4); gap: var(--sp-3); }
    body.fivem-theme .dataTables_wrapper .dataTables_filter input { width: 100%; }
    body.fivem-theme .dataTables_wrapper .dataTables_filter label { display: flex; width: 100%; }
    body.fivem-theme .form-group.row > .col-form-label ~ [class*="col-"] { max-width: 100%; }
    body.fivem-theme .ticket-reply .posted-by,
    body.fivem-theme .ticket-reply .message { padding-inline: var(--sp-4) !important; }
    body.fivem-theme .view-ticket > .card-body { padding: var(--sp-4); }
    body.fivem-theme .form-group.text-center .btn { flex: 1 1 100%; }
}

/* ==========================================================================
   Service overview (clientareaproductdetails.tpl)
   ========================================================================== */
body.fivem-theme .fivem-service-overview > .card-body { padding: var(--sp-6); }
.fivem-service-head { display: flex; align-items: center; gap: var(--sp-4); margin-bottom: var(--sp-5); padding-bottom: var(--sp-5); border-bottom: 1px solid var(--sky-border); }
.fivem-service-badge { display: flex; flex: 0 0 56px; align-items: center; justify-content: center; width: 56px; height: 56px; color: var(--fivem-accent-light); background: rgba(109, 131, 159, .14); border: 1px solid var(--sky-border-strong); border-radius: 16px; font-size: 22px; }
.fivem-service-title { flex: 1; min-width: 0; }
.fivem-service-title h3 { margin: 0 0 4px; overflow: hidden; font-size: 22px; font-weight: 800; letter-spacing: -.03em; text-overflow: ellipsis; }
.fivem-service-title p { margin: 0; font-size: 14px; }
.fivem-service-head .label.status { flex: none; padding: 7px 14px; font-size: 12px; }
.fivem-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--sp-3); margin: 0; }
.fivem-detail-grid > div { padding: var(--sp-4) var(--sp-5); background: rgba(2, 1, 18, .34); border: 1px solid var(--sky-border); border-radius: var(--r-md); transition: border-color .2s ease; }
.fivem-detail-grid > div:hover { border-color: var(--sky-border-strong); }
.fivem-detail-grid dt { margin: 0 0 6px; color: #7d889b; font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.fivem-detail-grid dd { margin: 0; color: #fff; font-size: 16px; font-weight: 650; overflow-wrap: anywhere; }
.fivem-detail-grid .is-wide { grid-column: 1 / -1; }
.fivem-service-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-5); padding-top: var(--sp-5); border-top: 1px solid var(--sky-border); }
.fivem-service-actions .btn { min-width: 160px; }
@media (max-width: 575.98px) {
    body.fivem-theme .fivem-service-overview > .card-body { padding: var(--sp-5) var(--sp-4); }
    .fivem-service-head { flex-wrap: wrap; }
    .fivem-service-head .label.status { margin-inline-start: 72px; }
    .fivem-service-actions .btn { flex: 1 1 100%; }
}

/* Dashboard panels: clearer rows with a directional cue */
body.fivem-theme .fivem-home-panels .list-group-item-action { display: flex; align-items: center; gap: var(--sp-2); }
body.fivem-theme .fivem-home-panels .list-group-item-action::after { content: "\f054"; margin-inline-start: auto; color: var(--fivem-accent-light); font-family: "Font Awesome 6 Pro", "Font Awesome 5 Free"; font-size: 10px; font-weight: 900; opacity: .35; transition: opacity .2s ease, transform .3s cubic-bezier(.22, 1, .36, 1); }
[dir="rtl"] body.fivem-theme .fivem-home-panels .list-group-item-action::after { transform: scaleX(-1); }
body.fivem-theme .fivem-home-panels .list-group-item-action:hover::after { opacity: 1; transform: translateX(3px); }
[dir="rtl"] body.fivem-theme .fivem-home-panels .list-group-item-action:hover::after { transform: scaleX(-1) translateX(3px); }
body.fivem-theme .fivem-home-panels .list-group-item .badge { margin-inline-start: auto; float: none !important; }
body.fivem-theme .fivem-home-panels .list-group-item .badge + *::after { margin-inline-start: 0; }
body.fivem-theme .fivem-home-panels .card-title { display: flex; align-items: center; gap: var(--sp-2); }
body.fivem-theme .fivem-home-panels .card-title .float-right { order: 3; float: none !important; margin-inline-start: auto; }
body.fivem-theme .fivem-home-panels .card-title > i { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; color: var(--fivem-accent-light); background: rgba(109, 131, 159, .13); border-radius: 9px; }
body.fivem-theme .fivem-home-panels .card-body p:last-child { margin-bottom: 0; }

/* Sidebar rows that are plain text (or links without the icon wrapper) keep their padding */
body.fivem-theme .sidebar div.list-group-item,
body.fivem-theme .sidebar a.list-group-item:not(:has(.sidebar-menu-item-wrapper)) { padding: 12px var(--sp-4); font-size: 13.5px; }
body.fivem-theme .sidebar div.list-group-item { color: var(--fivem-muted); }

/* ==========================================================================
   Error pages (404, 429, 403)
   ========================================================================== */
.fivem-error { display: flex; justify-content: center; padding: var(--sp-6) 0 var(--sp-5); }
.fivem-error-card { position: relative; width: 100%; max-width: 620px; overflow: hidden; padding: var(--sp-7) var(--sp-6) var(--sp-6); text-align: center; background: radial-gradient(70% 50% at 50% 0%, rgba(109, 131, 159, .14), transparent 70%), var(--sky-card); border: 1px solid var(--sky-border); border-radius: 28px; box-shadow: var(--sky-hi), 0 40px 90px rgba(0, 0, 0, .4); }
.fivem-error-card::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--fivem-accent) 30%, var(--fivem-accent-light) 50%, var(--fivem-accent) 70%, transparent); }
.fivem-error-icon { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; margin-bottom: var(--sp-4); color: var(--fivem-accent-light); background: rgba(109, 131, 159, .14); border: 1px solid var(--sky-border-strong); border-radius: 20px; font-size: 26px; }
.fivem-error-code { display: block; margin-bottom: var(--sp-2); color: rgba(158, 179, 204, .22); font-size: clamp(64px, 12vw, 104px); font-weight: 800; line-height: 1; letter-spacing: -.06em; }
.fivem-error-kicker { display: inline-block; margin-bottom: var(--sp-3); color: var(--fivem-accent-light); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.fivem-error-card h1 { margin: 0 0 var(--sp-3); font-size: clamp(24px, 3.4vw, 32px); font-weight: 800; letter-spacing: -.04em; }
.fivem-error-card p { max-width: 460px; margin: 0 auto var(--sp-3); font-size: 15px; line-height: 1.7; }
.fivem-error-card .fivem-error-sub { font-size: 14px; }
.fivem-error-perms { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-2); margin: 0 0 var(--sp-4); }
.fivem-error-perms span { padding: 5px 12px; color: #cbd5e3; background: rgba(158, 179, 204, .1); border: 1px solid var(--sky-border); border-radius: 999px; font-size: 12.5px; }
.fivem-error-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-3); margin-top: var(--sp-5); }
@media (max-width: 575.98px) {
    .fivem-error-card { padding: var(--sp-6) var(--sp-4); border-radius: 22px; }
    .fivem-error-actions .btn { flex: 1 1 100%; }
}

/* ==========================================================================
   Account forms and support entry
   ========================================================================== */
body.fivem-theme label.col-form-label:not(.col-sm-3):not(.col-md-3) { padding-block: 0; }
body.fivem-theme .fivem-fields { margin-inline: calc(var(--sp-3) * -1); }
body.fivem-theme .fivem-fields > [class*="col-"] { padding-inline: var(--sp-3); }
body.fivem-theme .fivem-fields .form-group { margin-bottom: var(--sp-4); }
body.fivem-theme form > .form-group.text-center { padding-top: var(--sp-2); }

/* Support departments */
.fivem-dept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--sp-4); }
.fivem-dept { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-5); color: var(--fivem-text) !important; background: rgba(2, 1, 18, .3); border: 1px solid var(--sky-border); border-radius: var(--r-md); transition: transform .28s cubic-bezier(.22, 1, .36, 1), border-color .2s ease, background .2s ease; }
.fivem-dept:hover { transform: translateY(-3px); background: rgba(109, 131, 159, .1); border-color: var(--sky-border-strong); }
.fivem-dept-icon { display: inline-flex; flex: 0 0 46px; align-items: center; justify-content: center; width: 46px; height: 46px; color: var(--fivem-accent-light); background: rgba(109, 131, 159, .14); border: 1px solid var(--sky-border); border-radius: 13px; font-size: 17px; }
.fivem-dept-copy { display: flex; flex: 1; flex-direction: column; min-width: 0; gap: 3px; }
.fivem-dept-copy strong { font-size: 16px; font-weight: 700; }
.fivem-dept-copy small { color: var(--fivem-muted); font-size: 13px; line-height: 1.5; }
.fivem-dept-arrow { color: var(--fivem-accent-light); font-size: 12px; opacity: .4; transition: transform .3s cubic-bezier(.22, 1, .36, 1), opacity .2s ease; }
.fivem-dept:hover .fivem-dept-arrow { opacity: 1; transform: translateX(4px); }
[dir="rtl"] .fivem-dept:hover .fivem-dept-arrow { transform: translateX(-4px); }
.fivem-dept-empty { grid-column: 1 / -1; }

/* Support ticket form */
body.fivem-theme .ticket-card { max-width: 960px; margin-inline: auto; }
body.fivem-theme .ticket-card > .card-body { padding: var(--sp-6) clamp(var(--sp-4), 4vw, 40px); }
.ticket-head { display: flex; align-items: center; gap: var(--sp-4); margin-bottom: var(--sp-6); padding-bottom: var(--sp-5); border-bottom: 1px solid var(--sky-border); }
.ticket-head-icon { display: inline-flex; flex: 0 0 52px; align-items: center; justify-content: center; width: 52px; height: 52px; color: var(--fivem-accent-light); background: rgba(109, 131, 159, .14); border: 1px solid var(--sky-border-strong); border-radius: 16px; font-size: 20px; }
.ticket-head-copy { min-width: 0; }
body.fivem-theme .ticket-head .card-title { margin: 0 0 4px; font-size: 24px; font-weight: 800; letter-spacing: -.03em; }
.ticket-head p { font-size: 14.5px; line-height: 1.55; }
.ticket-form .alert { margin-bottom: var(--sp-5); }
.ticket-section { margin-bottom: var(--sp-6); padding: var(--sp-5); background: rgba(2, 1, 18, .26); border: 1px solid var(--sky-border); border-radius: var(--r-md); }
.ticket-section-title { display: flex; align-items: center; gap: var(--sp-3); margin: 0 0 var(--sp-5); color: #fff; font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.ticket-step { display: inline-flex; flex: 0 0 26px; align-items: center; justify-content: center; width: 26px; height: 26px; color: var(--fivem-accent-light); background: rgba(109, 131, 159, .16); border: 1px solid var(--sky-border-strong); border-radius: 50%; font-size: 12.5px; font-weight: 700; }
.ticket-section .form-group { margin-bottom: var(--sp-4); }
.ticket-section .form-group:last-child,
.ticket-section > :last-child { margin-bottom: 0; }
.ticket-section .form-group > label { margin-bottom: var(--sp-2); font-size: 13.5px; font-weight: 600; color: #cfd8e4; }
.ticket-grid { display: grid; gap: 0 var(--sp-4); }
.ticket-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ticket-grid-3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.ticket-form .form-control.disabled,
.ticket-form .form-control:disabled { opacity: .7; cursor: not-allowed; }
.ticket-attachments { margin-top: var(--sp-5); padding-top: var(--sp-5); border-top: 1px solid var(--sky-border); }
.ticket-section .md-editor { border: 1px solid rgba(158, 179, 204, .2); background: var(--sky-field, rgba(6, 7, 22, .72)); }
.ticket-section .md-editor > .md-footer { padding: var(--sp-2) var(--sp-4); color: var(--fivem-muted); background: rgba(158, 179, 204, .06); border-top: 1px solid var(--sky-border); font-size: 12px; }
.ticket-section .md-editor > textarea { border: 0; border-radius: 0; box-shadow: none; }
.ticket-hint { display: flex; align-items: center; gap: var(--sp-2); margin: var(--sp-3) 0 0; color: var(--fivem-muted); font-size: 12.5px; line-height: 1.5; }
.ticket-hint i { opacity: .7; }
.ticket-captcha { display: flex; justify-content: center; margin-bottom: var(--sp-5); }
.ticket-captcha:empty { display: none; }
.ticket-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--sp-3); padding-top: var(--sp-5); border-top: 1px solid var(--sky-border); }
.ticket-actions .btn { min-width: 140px; }
.ticket-actions .btn-primary { min-width: 200px; }
.ticket-actions .btn i { margin-inline-end: var(--sp-2); }
@media (max-width: 767px) {
    body.fivem-theme .ticket-card > .card-body { padding: var(--sp-5) var(--sp-4); }
    .ticket-head { align-items: flex-start; }
    .ticket-section { padding: var(--sp-4); }
    .ticket-grid-2 { grid-template-columns: minmax(0, 1fr); }
    .ticket-actions { flex-direction: column-reverse; align-items: stretch; }
    .ticket-actions .btn,
    .ticket-actions .btn-primary { width: 100%; min-width: 0; }
}

/* ==========================================================================
   Contact page
   ========================================================================== */
.fivem-contact { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--sp-5); align-items: start; }
.fivem-contact .fivem-contact-card { margin: 0; }
.fivem-contact-head { display: flex; align-items: center; gap: var(--sp-4); margin-bottom: var(--sp-5); padding-bottom: var(--sp-5); border-bottom: 1px solid var(--sky-border); }
.fivem-contact-head h1 { margin: 0 0 4px; font-size: 26px; font-weight: 800; letter-spacing: -.035em; }
.fivem-contact-icon { display: inline-flex; flex: 0 0 52px; align-items: center; justify-content: center; width: 52px; height: 52px; color: var(--fivem-accent-light); background: rgba(109, 131, 159, .14); border: 1px solid var(--sky-border-strong); border-radius: 16px; font-size: 20px; }
.fivem-contact-actions { display: flex; justify-content: flex-end; margin-top: var(--sp-5); padding-top: var(--sp-5); border-top: 1px solid var(--sky-border); }
.fivem-contact-actions .btn { min-width: 200px; }
.fivem-contact-aside { position: sticky; top: 96px; display: grid; gap: var(--sp-3); }
.fivem-contact-link { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-4) var(--sp-5); color: var(--fivem-text) !important; background: var(--sky-card); border: 1px solid var(--sky-border); border-radius: var(--r-md); box-shadow: var(--sky-hi); transition: transform .28s cubic-bezier(.22, 1, .36, 1), border-color .2s ease, background .2s ease; }
.fivem-contact-link:hover { transform: translateY(-2px); border-color: var(--sky-border-strong); background: rgba(109, 131, 159, .1); }
.fivem-contact-link > span:nth-child(2) { display: flex; flex: 1; flex-direction: column; min-width: 0; gap: 2px; }
.fivem-contact-link strong { font-size: 15px; font-weight: 700; }
.fivem-contact-link small { color: var(--fivem-muted); font-size: 13px; }
.fivem-contact-link-icon { display: inline-flex; flex: 0 0 42px; align-items: center; justify-content: center; width: 42px; height: 42px; color: var(--fivem-accent-light); background: rgba(109, 131, 159, .14); border: 1px solid var(--sky-border); border-radius: 12px; }
.fivem-contact-arrow { color: var(--fivem-accent-light); font-size: 12px; opacity: .4; transition: transform .3s cubic-bezier(.22, 1, .36, 1), opacity .2s ease; }
.fivem-contact-link:hover .fivem-contact-arrow { opacity: 1; transform: translateX(4px); }
[dir="rtl"] .fivem-contact-link:hover .fivem-contact-arrow { transform: translateX(-4px); }
@media (max-width: 991.98px) {
    .fivem-contact { grid-template-columns: minmax(0, 1fr); }
    .fivem-contact-aside { position: static; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
@media (max-width: 575.98px) {
    .fivem-contact-actions .btn { width: 100%; }
    .fivem-contact-head { align-items: flex-start; }
}

/* ==========================================================================
   One continuous page background
   The atmosphere lives on the viewport (fixed), not on the page height, so it
   never tiles or breaks on long pages. Header, breadcrumb, main body and
   footer are transparent and simply sit on top of it.
   ========================================================================== */
body.fivem-theme {
    background:
        radial-gradient(70vw 62vh at 12% 6%, rgba(109, 131, 159, .17), transparent 70%),
        radial-gradient(60vw 58vh at 92% 52%, rgba(35, 37, 61, .38), transparent 70%),
        radial-gradient(80vw 50vh at 50% 108%, rgba(109, 131, 159, .11), transparent 70%),
        var(--fivem-bg, #020112) !important;
    background-attachment: fixed !important;
    background-repeat: no-repeat !important;
}

/* Header: part of the page at the top, frosted glass once content scrolls under it */
body.fivem-theme .header {
    background: transparent;
    border-bottom: 1px solid transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
body.fivem-theme .header::before { display: none; }
body.fivem-theme .header.is-scrolled {
    background: rgba(5, 5, 22, .62);
    border-bottom-color: rgba(158, 179, 204, .1);
    box-shadow: 0 10px 34px rgba(0, 0, 0, .22);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    backdrop-filter: blur(20px) saturate(1.4);
}
@media (max-width: 1199.98px) {
    /* An open mobile menu overlaps the page, so give it a readable surface */
    body.fivem-theme .header:has(.navbar-collapse.show) {
        background: rgba(5, 5, 22, .88);
        border-bottom-color: rgba(158, 179, 204, .12);
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
    }
}

/* Breadcrumb: no band of its own */
body.fivem-theme .master-breadcrumb {
    background: transparent;
    border-bottom: 0;
}

/* Footer: same background as the page, divided by a soft fading hairline only */
body.fivem-theme .footer {
    background: transparent;
    border-top: 0;
}
body.fivem-theme .footer::before {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(158, 179, 204, .2) 50%, transparent);
    box-shadow: none;
}
body.fivem-theme .footer::after { display: none; }

/* User management: even spacing between the action buttons, also when they wrap */
.btn-manage-permissions,
.btn-remove-user {
    margin: 0 .5rem .5rem 0;
}
.btn-remove-user {
    margin-right: 0;
}
[dir="rtl"] .btn-manage-permissions,
[dir="rtl"] .btn-remove-user {
    margin: 0 0 .5rem .5rem;
}
[dir="rtl"] .btn-remove-user {
    margin-left: 0;
}

/* ---------- Language / currency chooser ---------- */
body.fivem-theme .modal-localisation .modal-dialog { max-width: 520px; margin-top: 0; }
body.fivem-theme .modal-localisation .modal-content {
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(109, 131, 159, .18), transparent 60%),
        linear-gradient(160deg, #1a1c39, #0d0e26);
    border: 1px solid var(--sky-border);
    border-radius: var(--r-lg);
    box-shadow: var(--sky-hi), 0 30px 80px rgba(0, 0, 0, .55);
}
.sky-locale-head {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-5) var(--sp-5) var(--sp-4);
}
.sky-locale-icon {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: #cfe0f5;
    font-size: 18px;
    background: linear-gradient(145deg, rgba(109, 131, 159, .35), rgba(109, 131, 159, .1));
    border: 1px solid var(--sky-border-strong);
    border-radius: 13px;
}
.sky-locale-heading { flex: 1; min-width: 0; }
.sky-locale-title { margin: 0; color: #fff; font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
body.fivem-theme .sky-locale-close {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin: 0;
    padding: 0;
    color: #cbd3df;
    font-size: 22px;
    line-height: 1;
    text-shadow: none;
    opacity: 1;
    background: rgba(158, 179, 204, .08);
    border: 1px solid var(--sky-border);
    border-radius: 10px;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}
body.fivem-theme .sky-locale-close:hover { color: #fff; background: rgba(158, 179, 204, .18); transform: rotate(90deg); }

body.fivem-theme .modal-localisation .sky-locale-body { padding: var(--sp-2) var(--sp-5) var(--sp-5); background: none; }
.sky-locale-group + .sky-locale-group { margin-top: var(--sp-5); }
.sky-locale-label {
    margin: 0 0 var(--sp-3);
    color: var(--fivem-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.sky-locale-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); margin: 0; }
body.fivem-theme .modal-localisation .item-selector .sky-locale-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    min-height: 56px;
    margin: 0;
    padding: 10px 14px;
    color: #e3e9f2;
    font-size: 15px;
    font-weight: 600;
    text-align: start;
    background: rgba(158, 179, 204, .05);
    border: 1px solid var(--sky-border);
    border-radius: var(--r-md);
    transition: background .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
body.fivem-theme .modal-localisation .item-selector .sky-locale-item:hover {
    color: #fff;
    background: rgba(158, 179, 204, .12);
    border-color: var(--sky-border-strong);
    transform: translateY(-2px);
}
body.fivem-theme .modal-localisation .item-selector .sky-locale-item.active {
    color: #fff;
    background: linear-gradient(145deg, rgba(109, 131, 159, .34), rgba(109, 131, 159, .12));
    border-color: var(--fivem-accent-light);
    box-shadow: 0 0 0 3px rgba(158, 179, 204, .14);
}
body.fivem-theme .modal-localisation .sky-locale-item:focus-visible { outline: 2px solid var(--fivem-accent-light); outline-offset: 2px; }
.sky-locale-code {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 30px;
    padding: 0 6px;
    color: #cfe0f5;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .06em;
    background: rgba(2, 1, 18, .45);
    border: 1px solid var(--sky-border);
    border-radius: 8px;
}
.sky-locale-item.active .sky-locale-code { color: #0d0e26; background: var(--fivem-accent-light); border-color: transparent; }
.sky-locale-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sky-locale-check {
    flex: none;
    color: var(--fivem-accent-light);
    font-size: 13px;
    opacity: 0;
    transform: scale(.6);
    transition: opacity .2s ease, transform .2s ease;
}
.sky-locale-item.active .sky-locale-check { opacity: 1; transform: none; }

body.fivem-theme .modal-localisation .sky-locale-foot { justify-content: flex-end; padding: var(--sp-4) var(--sp-5); background: rgba(2, 1, 18, .3); border-top: 1px solid var(--sky-border); }
body.fivem-theme .sky-locale-cancel {
    min-width: 96px;
    color: #cbd3df;
    background: transparent;
    border: 1px solid var(--sky-border);
    border-radius: var(--r-sm);
}
body.fivem-theme .sky-locale-cancel:hover { color: #fff; background: rgba(158, 179, 204, .1); }
body.fivem-theme .sky-locale-apply { min-width: 120px; font-weight: 700; }

@media (max-width: 480px) {
    .sky-locale-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    body.fivem-theme .sky-locale-close,
    body.fivem-theme .modal-localisation .item-selector .sky-locale-item,
    .sky-locale-check { transition: none; }
    body.fivem-theme .modal-localisation .item-selector .sky-locale-item:hover,
    body.fivem-theme .sky-locale-close:hover { transform: none; }
}
.sky-locale-flag {
    display: inline-flex;
    flex: none;
    width: 38px;
    height: 28px;
    overflow: hidden;
    background: rgba(2, 1, 18, .45);
    border: 1px solid var(--sky-border-strong);
    border-radius: 7px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}
.sky-locale-flag img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sky-locale-item.active .sky-locale-flag { border-color: var(--fivem-accent-light); }
