/* =========================
   FULLCALENDAR
   ========================= */

.fc {
    font-size: 1rem;
}

.fc-toolbar button,
.fc-button {
    font-size: 1rem;
    padding: .375rem .75rem;
    line-height: 1.3;
}

.fc th,
.fc td,
.fc-time,
.fc-day-header,
.fc-axis {
    font-size: 1rem;
}


/* =========================
   COLOR PICKER
   ========================= */

.color-pick-display {
    width: 45px;
    height: 25px;
    border-radius: 5px;
    border: 1px solid #ccc;
    box-shadow: inset 0px 0px 3px rgba(0, 0, 0, 0.2);
    display: inline-block;
}

    .color-pick-display.large {
        width: 60px;
        height: 30px;
    }

    .color-pick-display.small {
        width: 30px;
        height: 15px;
    }


/* =========================
   CARDS
   ========================= */

.selectable-card {
    border: 1px solid var(--border, #dadada);
    transition: box-shadow 0.3s, border-color 0.3s;
    cursor: pointer;
}

    .selectable-card:hover {
        box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    }

    .selectable-card.selected {
        border-color: var(--primary-color);
        box-shadow: 0px 4px 10px rgba(0, 123, 255, 0.25);
    }

.app-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.app-card-link:hover {
    color: inherit;
    text-decoration: none;
}

.app-standard-card {
    --app-card-border: color-mix(in srgb, var(--primary-color, #7a7a7a) 18%, #d9dee7);
    --app-card-soft: color-mix(in srgb, var(--primary-color, #7a7a7a) 7%, var(--background, #fff));
    --app-card-accent: var(--primary-color-dark, #a3be1f);
    --app-card-ink: var(--text-content-object, #111);
    --app-card-muted: var(--text-content-title, #535353);
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--app-card-border);
    border-radius: .75rem;
    background: var(--background, #fff);
    color: var(--app-card-ink);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.app-card-link:hover .app-standard-card,
.app-standard-card.card-selectable:hover {
    border-color: color-mix(in srgb, var(--primary-color, #7a7a7a) 38%, var(--border, #dadada));
    box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .08);
}

.app-card-link:focus-visible {
    outline: 0;
}

.app-card-link:focus-visible .app-standard-card,
.app-standard-card.card-selectable:focus-within {
    border-color: var(--primary-color-dark, #a3be1f);
    box-shadow: 0 0 0 .15rem color-mix(in srgb, var(--primary-color-dark, #a3be1f) 24%, transparent);
}

.app-card-disabled {
    cursor: default;
    opacity: .62;
    filter: grayscale(100%);
    pointer-events: none;
}

.card-index,
.card-selectable {
    border: 1px solid var(--border, #dadada);
    transition: box-shadow 0.3s, border-color 0.3s;
    cursor: pointer;
}

.app-card-shell {
    display: flex;
    min-width: 0;
}

.app-card-core,
.app-card-select-area,
.app-card-content {
    min-width: 0;
}

.app-card-core {
    flex: 1 1 auto;
}

.app-card-navigation-area {
    color: inherit;
    cursor: pointer;
    display: block;
    text-decoration: none;
}

.app-card-navigation-area:hover,
.app-card-navigation-area:focus-visible {
    color: inherit;
    text-decoration: none;
}

.app-card-navigation-area:focus-visible {
    border-radius: .55rem;
    box-shadow: inset 0 0 0 2px var(--primary-color-dark, #a3be1f);
    outline: none;
}

.app-card-summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: .6rem;
    min-width: 0;
    padding: .8rem;
}

.app-card-media {
    display: flex;
    width: 3.25rem;
    height: 3.25rem;
    min-width: 3.25rem;
    max-width: 3.25rem;
    min-height: 3.25rem;
    max-height: 3.25rem;
    flex: 0 0 3.25rem;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 50%;
    background: var(--app-card-soft);
}

.app-card-media > img.card-image {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
}

.app-card-media .card-icon {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    margin: 0;
    color: var(--app-card-accent);
}

.app-card-title-row {
    display: flex;
    min-width: 0;
    align-items: flex-start;
    gap: .4rem;
}

.app-card-title {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--app-card-ink);
    font-size: .86rem;
    font-weight: 600;
    line-height: 1.2;
}

.app-card-title-inactive {
    text-decoration: line-through;
}

.app-card-record-link {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    color: var(--text-content-object, #111);
    line-height: 1;
    text-decoration: none;
}

.app-card-record-link:hover,
.app-card-record-link:focus-visible {
    color: var(--primary-color-dark, #a3be1f);
}

.app-card-lines {
    display: grid;
    gap: .12rem;
    margin-top: .18rem;
}

.app-card-line {
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: pre-line;
    color: var(--app-card-muted);
    font-size: .66rem;
    line-height: 1.25;
}

.app-card-line-primary {
    color: var(--app-card-ink);
}

.app-card-meta {
    display: flex;
    max-width: min(16rem, 32vw);
    min-width: 4rem;
    flex-direction: column;
    align-items: flex-end;
    gap: .08rem;
    text-align: right;
}

.app-card-meta-icons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .2rem;
}

.app-card-meta > span {
    max-width: 100%;
    overflow-wrap: anywhere;
    color: var(--app-card-muted);
    font-size: .63rem;
    line-height: 1.2;
}

/* Direct debit monitor: semantic state remains scoped to this monitor. */
.dd-monitor-card .app-standard-card {
    border-left-width: .25rem;
}

.dd-monitor-card-success .app-standard-card { border-left-color: var(--success, #28a745); }
.dd-monitor-card-warning .app-standard-card { border-left-color: var(--warning, #ffc107); }
.dd-monitor-card-error .app-standard-card { border-left-color: var(--danger, #dc3545); }
.dd-monitor-card-muted .app-standard-card { border-left-color: var(--secondary, #6c757d); }

.dd-monitor-card-success .app-card-media .card-icon { color: var(--success, #28a745); }
.dd-monitor-card-warning .app-card-media .card-icon { color: var(--warning, #b38600); }
.dd-monitor-card-error .app-card-media .card-icon { color: var(--danger, #dc3545); }
.dd-monitor-card-muted .app-card-media .card-icon { color: var(--secondary, #6c757d); }

.dd-monitor-status {
    display: inline-flex;
    align-items: center;
    padding: .12rem .42rem;
    border-radius: 999px;
    font-weight: 600;
    white-space: nowrap;
}

.dd-monitor-status-success {
    color: var(--success, #218838);
    background: color-mix(in srgb, var(--success, #28a745) 12%, transparent);
}

.dd-monitor-status-warning {
    color: #735800;
    background: color-mix(in srgb, var(--warning, #ffc107) 22%, transparent);
}

.dd-monitor-status-error {
    color: var(--danger, #c82333);
    background: color-mix(in srgb, var(--danger, #dc3545) 12%, transparent);
}

.dd-monitor-status-muted {
    color: var(--secondary, #5a6268);
    background: color-mix(in srgb, var(--secondary, #6c757d) 12%, transparent);
}

.app-interactive-card > .app-card-shell > .indicator {
    width: .35rem;
    flex: 0 0 .35rem;
    background: transparent;
    transition: background-color .2s ease;
}

.app-interactive-card.selected {
    border-color: var(--primary-color-dark, #a3be1f);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary-color-dark, #a3be1f) 30%, transparent);
}

.app-interactive-card.selected > .app-card-shell > .indicator {
    background-color: var(--primary-color-dark, #a3be1f);
}

.app-card-actions,
.app-card-details {
    display: grid;
    gap: .3rem;
    margin: 0 .8rem;
    padding: .6rem 0 .7rem;
    border-top: 1px solid var(--app-card-border);
}

.app-card-actions + .app-card-details {
    margin-top: -.35rem;
}

.app-card-action-group {
    width: 100%;
}

.btn-group.app-card-action-group {
    display: flex;
    overflow: hidden;
    border: 1px solid var(--app-card-border);
    border-radius: .48rem;
}

.btn-group.app-card-action-group > .btn {
    display: inline-flex;
    min-height: 2rem;
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
    gap: .25rem;
    border: 0 !important;
    border-radius: 0 !important;
    border-left: 1px solid var(--app-card-border) !important;
}

.btn-group.app-card-action-group > .btn:first-child {
    border-left: 0 !important;
}

.card-actions-wrap.app-card-action-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
    gap: .3rem;
}

.card-actions-wrap.app-card-action-group > .btn {
    display: flex;
    min-width: 0;
    min-height: 2.35rem;
    align-items: center;
    justify-content: center;
    gap: .25rem;
    line-height: 1.2;
    white-space: normal;
}

.app-standard-card .app-card-actions .btn-app,
.app-standard-card .app-card-details .btn-app {
    position: relative;
    border-radius: .48rem;
    box-shadow: none;
    font-size: .68rem;
    font-weight: 500;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, transform .08s ease;
}

.app-standard-card .app-card-actions .btn-app:not(.btn-success),
.app-standard-card .app-card-details .btn-app:not(.btn-success) {
    border-color: var(--app-card-border) !important;
    background: var(--background, #fff) !important;
    color: var(--app-card-ink) !important;
}

.app-standard-card .app-card-actions .btn-app:not(.btn-success):hover,
.app-standard-card .app-card-details .btn-app:not(.btn-success):hover {
    border-color: var(--app-card-accent) !important;
    background: var(--app-card-soft) !important;
    color: var(--app-card-ink) !important;
}

.app-standard-card .app-card-actions .btn-app:focus-visible,
.app-standard-card .app-card-details .btn-app:focus-visible {
    z-index: 2;
    outline: 0;
    box-shadow: 0 0 0 .15rem color-mix(in srgb, var(--app-card-accent) 24%, transparent) !important;
}

.app-standard-card .app-card-actions .btn-app:active,
.app-standard-card .app-card-details .btn-app:active {
    transform: translateY(1px);
}

.app-standard-card .app-card-actions .btn-app.btn-success {
    border-color: #28a745 !important;
    background: #28a745 !important;
    color: #fff !important;
}

.app-standard-card .app-card-actions .btn-app.btn-success:hover,
.app-standard-card .app-card-actions .btn-app.btn-success:focus-visible {
    border-color: #218838 !important;
    background: #218838 !important;
    color: #fff !important;
}

.app-card-detail-content {
    margin-top: .3rem;
    margin-bottom: 0;
    border: 1px solid var(--app-card-border);
    border-radius: .35rem;
    background: var(--app-card-soft);
}

@media (max-width: 575.98px) {
    .app-card-summary {
        grid-template-columns: auto minmax(0, 1fr);
        gap: .55rem;
        padding: .7rem;
    }

    .app-card-media,
    .app-card-media > img.card-image {
        width: 2.75rem;
        height: 2.75rem;
        min-width: 2.75rem;
        max-width: 2.75rem;
        min-height: 2.75rem;
        max-height: 2.75rem;
        flex-basis: 2.75rem;
    }

    .app-card-title {
        font-size: .84rem;
    }

    .app-card-meta {
        grid-column: 2;
        max-width: none;
        min-width: 0;
        align-items: flex-start;
        margin-top: -.15rem;
        text-align: left;
    }

    .app-card-meta-icons {
        justify-content: flex-start;
    }

    .app-card-actions,
    .app-card-details {
        margin-right: .7rem;
        margin-left: .7rem;
        padding-bottom: .65rem;
    }

    .btn-group.app-card-action-group > .btn {
        min-height: 2.35rem;
    }

    .card-actions-wrap.app-card-action-group {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* =========================
   FORM HELPERS
   ========================= */

.fields-group-header {
    background-color: #f5f5f5;
    font-weight: bold;
    padding: 4px 10px;
    margin: 16px 0 8px 0;
    border-radius: 4px;
    font-size: 1rem;
    border-left: 4px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}


/* =========================
   HELP / POPOVER
   ========================= */

.help-popover {
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    box-shadow: none;
}

    .help-popover:focus,
    .help-popover:active {
        outline: none;
        box-shadow: none;
    }

    .help-popover:hover .help-icon {
        border-color: var(--primary-color);
        color: var(--primary-color);
    }

.popover {
    z-index: 9999;
}

.popover-header {
    background-color: var(--primary-color);
    color: #fff;
    font-weight: bold;
    border-bottom: 0;
}

.help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    border: 1px solid #bbb;
    color: #555;
    background: #fff;
}


/* =========================
   IMAGES
   ========================= */

.img-form-details {
    object-fit: cover;
    object-position: center;
    width: 6rem;
    height: 6rem;
}

@media (min-width: 576px) {
    .img-form-details {
        width: 7.5rem;
        height: 7.5rem;
    }
}

@media (min-width: 768px) {
    .img-form-details {
        width: 9.5rem;
        height: 9.5rem;
    }
}

/*.imagezone-image {
    width: 50rem;
    height: 13rem;
}
@media (min-width: 768px) {
    .imagezone-image {
        width: 25rem;
        height: 13rem;
    }
}*/

.club-logo-upload {
    width: 10rem;
    max-width: 100%;
}

.club-logo-upload .imagezone-image img {
    width: 6.25rem;
    height: 6.25rem;
    object-fit: contain !important;
}

.club-logo-upload-primary .imagezone-image img {
    background-color: #6c757d;
}

/* =========================
   TABS
   ========================= */

.tabs-container {
    position: relative;
}

.btn-scroll-tabs {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 6px;
    padding: 4px 6px;
    cursor: pointer;
    box-shadow: 0 0 4px rgba(0,0,0,0.2);
}

    .btn-scroll-tabs.left {
        left: -7px;
    }

    .btn-scroll-tabs.right {
        right: -4px;
    }

.scroll-nav-tabs {
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap !important;
}

    .scroll-nav-tabs li {
        display: inline-block !important;
    }


/* =========================
   SEO
   ========================= */

.seo-ok {
    color: #198754;
}

.seo-warn {
    color: #fd7e14;
}

.seo-bad {
    color: #dc3545;
}


/* =========================
   PREVIEWS
   ========================= */

.email-preview {
    border: 1px solid #e6e6e6;
    border-radius: 6px;
    padding: 12px 14px;
    background-color: #ffffff;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

    .email-preview p {
        margin-bottom: 10px;
    }

    .email-preview a {
        color: #0d6efd;
        text-decoration: none;
    }

        .email-preview a:hover {
            text-decoration: underline;
        }

    .email-preview ul,
    .email-preview ol {
        padding-left: 20px;
        margin-bottom: 10px;
    }

    .email-preview img {
        max-width: 100%;
        height: auto;
        border-radius: 4px;
    }

    .email-preview > *:last-child {
        margin-bottom: 0;
    }

.text-preview {
    white-space: pre-line;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 10px 12px;
    background-color: #fff;
    line-height: 1.5;
}


/* =========================
   CUSTOM FIELDS
   ========================= */

.custom-field-help {
    display: block;
    font-size: 0.78rem;
    line-height: 1.2;
    margin-top: 0.2rem;
}

.theme-settings-shell {
    display: flex;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #dee2e6;
    border-radius: 0.85rem;
    background: #fff;
}

.theme-settings-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem 1rem;
}

.theme-settings-header h4,
.theme-settings-header p,
.theme-detail-heading h5,
.theme-detail-heading p,
.login-background-heading h5,
.login-background-heading p {
    margin: 0;
}

.theme-settings-header h4 {
    color: #353a40;
    font-size: 1.15rem;
}

.theme-settings-header p,
.theme-detail-heading p,
.login-background-heading p {
    margin-top: 0.2rem;
    color: #6c757d;
    font-size: 0.85rem;
}

.theme-settings-tabs {
    padding: 0 1.5rem;
}

.theme-settings-tabs .nav-link {
    padding-right: 0.25rem;
    padding-left: 0.25rem;
    border: 0;
    border-bottom: 2px solid transparent;
    color: #6c757d;
}

.theme-settings-tabs .nav-link + .nav-link {
    margin-left: 1.5rem;
}

.theme-settings-tabs .nav-link.active {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
}

.theme-settings-content {
    min-height: 0;
    flex: 1 1 auto;
    padding: 1.25rem 1.5rem 1.5rem;
    background: #f8f9fa;
}

.theme-options-label {
    display: block;
    margin-bottom: 0.6rem;
    color: #6c757d;
    font-size: 0.8rem;
}

.theme-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: 0.6rem;
}

.theme-option-card {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.7rem;
    border: 1px solid #dee2e6;
    border-radius: 0.55rem;
    background: #fff;
    color: #353a40;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.theme-option-card:hover {
    border-color: var(--primary-color);
    color: #353a40;
    text-decoration: none;
    transform: translateY(-1px);
}

.theme-option-card.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(24, 110, 69, 0.12);
}

.theme-option-swatch {
    width: 2rem;
    height: 2rem;
    flex: 0 0 2rem;
    overflow: hidden;
    border: 1px solid #ced4da;
    border-radius: 0.4rem;
}

.theme-option-swatch span {
    display: block;
    height: 50%;
}

.theme-option-name {
    overflow: hidden;
    flex: 1 1 auto;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.theme-option-active {
    flex: 0 0 auto;
    color: #26834f;
}

.theme-details-content {
    margin-top: 1rem;
}

.theme-detail-layout {
    display: grid;
    grid-template-columns: minmax(15rem, 0.85fr) minmax(22rem, 1.35fr);
    gap: 1rem;
}

.theme-preview-column,
.theme-colors-column {
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 0.7rem;
    background: #fff;
}

.theme-detail-section-title,
.theme-detail-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.theme-detail-section-title {
    align-items: center;
    margin-bottom: 0.75rem;
    color: #353a40;
    font-size: 0.85rem;
    font-weight: 600;
}

.theme-applied-badge,
.theme-edit-state {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 500;
}

.theme-applied-badge {
    background: #e8f5ee;
    color: #267549;
}

.theme-edit-state {
    background: #f0f1f3;
    color: #6c757d;
}

.theme-edit-state-unlocked {
    background: #e8f5ee;
    color: #267549;
}

.theme-detail-heading {
    margin-bottom: 0.85rem;
}

.theme-detail-heading h5,
.login-background-heading h5 {
    color: #353a40;
    font-size: 1rem;
}

.custom-theme-preview {
    --preview-primary: #7a7a7a;
    --preview-primary-dark: #a3be1f;
    --preview-border: #dadada;
    --preview-text: #fff;
    --preview-hover: #fff;
    --preview-active-text: #535353;
    width: 100%;
    max-width: 22rem;
    margin-right: auto;
    margin-left: auto;
    overflow: hidden;
    border: 1px solid var(--preview-border);
    border-radius: 0.75rem;
    background: var(--preview-primary);
    color: var(--preview-text);
    box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.12);
}

.custom-theme-preview-header,
.custom-theme-preview-account {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem;
    background: var(--preview-primary-dark);
    color: var(--preview-text);
}

.custom-theme-preview-header small,
.custom-theme-preview-account small {
    display: block;
    opacity: 0.8;
}

.custom-theme-preview-logo,
.custom-theme-preview-avatar {
    display: inline-flex;
    width: 2rem;
    height: 2rem;
    flex: 0 0 2rem;
    align-items: center;
    justify-content: center;
    border: 1px solid currentColor;
    border-radius: 50%;
}

.custom-theme-preview-search {
    margin: 0.65rem 0.75rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--preview-border);
    border-radius: 0.55rem;
    background: rgba(0, 0, 0, 0.2);
    color: var(--preview-text);
    opacity: 0.85;
}

.custom-theme-preview-body {
    padding: 0.35rem 0 0.75rem;
}

.custom-theme-preview-body > small {
    display: block;
    padding: 0.55rem 1rem 0.2rem 2.8rem;
    letter-spacing: 0.08em;
    opacity: 0.7;
}

.custom-theme-preview-item {
    display: flex;
    min-height: 2.25rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 1rem 0.45rem 2.8rem;
    color: var(--preview-text);
}

.custom-theme-preview-hover,
.custom-theme-preview-active {
    background: var(--preview-hover);
    color: var(--preview-active-text);
}

.custom-theme-preview-active {
    font-weight: 600;
}

.custom-theme-color-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.custom-theme-color-field {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0;
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 0.55rem;
    background: #fff;
}

.custom-theme-color-field-readonly {
    background: #f8f9fa;
}

.custom-theme-color-control {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.custom-theme-color-control input[type="color"] {
    width: 2.75rem;
    height: 2.25rem;
    padding: 0.15rem;
    border: 1px solid #ced4da;
    border-radius: 0.4rem;
    background: #fff;
    cursor: pointer;
}

.custom-theme-color-control input[type="color"]:disabled {
    cursor: default;
    opacity: 1;
}

.custom-theme-color-control output {
    color: #535353;
    font-family: monospace;
    font-size: 0.85rem;
}

.custom-theme-auto-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    color: #535353;
    font-size: 0.9rem;
}

.custom-theme-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.85rem;
}

.theme-apply-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

.login-background-heading {
    margin-bottom: 1rem;
}

.login-background-layout {
    display: grid;
    grid-template-columns: minmax(20rem, 1.4fr) minmax(18rem, 0.8fr);
    gap: 1rem;
    align-items: stretch;
}

.login-background-preview {
    position: relative;
    display: grid;
    min-height: 18rem;
    overflow: hidden;
    place-items: center;
    border: 1px solid #ced4da;
    border-radius: 0.75rem;
    aspect-ratio: 16 / 9;
    background: #214b39;
}

.login-background-preview img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.login-background-preview::after {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.18);
    content: "";
}

.login-background-preview-card {
    position: relative;
    z-index: 1;
    width: min(12rem, calc(100% - 2rem));
    padding: 1.5rem 1rem;
    border-radius: 0.7rem;
    background: rgba(24, 28, 31, 0.9);
    color: #fff;
    text-align: center;
    box-shadow: 0 0.65rem 1.5rem rgba(0, 0, 0, 0.22);
}

.login-background-preview-card strong,
.login-background-preview-card small {
    display: block;
}

.login-background-preview-card small {
    margin-top: 0.5rem;
    opacity: 0.8;
}

.login-background-form {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 0.75rem;
    background: #fff;
}

.login-background-drop-zone {
    display: flex;
    min-height: 11rem;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.25rem;
    margin: 0;
    padding: 1.25rem;
    border: 1px dashed #adb5bd;
    border-radius: 0.65rem;
    background: #f8f9fa;
    color: #535353;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.login-background-drop-zone:hover,
.login-background-drop-zone:focus,
.login-background-drop-zone:focus-within,
.login-background-drop-zone.is-dragging {
    border-color: var(--primary-color);
    background: #f1f7f4;
}

.login-background-drop-zone span,
.login-background-drop-zone small {
    color: #6c757d;
}

.login-background-drop-icon {
    margin-bottom: 0.35rem;
    font-size: 1.5rem;
}

.login-background-file-name {
    min-height: 1.25rem;
    margin-top: 0.65rem;
    overflow: hidden;
    color: #6c757d;
    font-size: 0.8rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.login-background-error {
    margin-top: 0.5rem;
    padding: 0.5rem 0.65rem;
    border-left: 3px solid #dc3545;
    background: #fff1f2;
    color: #842029;
    font-size: 0.8rem;
}

.login-background-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
    margin-top: 0.85rem;
}

.custom-theme-contrast-warning {
    padding: 0.65rem 0.75rem;
    border-left: 3px solid #dc9f00;
    background: #fff5d6;
    color: #5b4300;
    font-size: 0.85rem;
}

@media (max-width: 991.98px) {
    .theme-detail-layout,
    .login-background-layout {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 992px) {
    #nav-Themes_F > .scroll-desktop {
        overflow: hidden;
    }

    .theme-settings-shell {
        height: 100%;
    }

    .theme-settings-content {
        overflow-x: hidden;
        overflow-y: auto;
        padding-bottom: calc(1.5rem + var(--footer-height));
        overscroll-behavior: contain;
        scroll-padding-bottom: calc(1.5rem + var(--footer-height));
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 575.98px) {
    .theme-settings-header,
    .theme-settings-content {
        padding-right: 1rem;
        padding-left: 1rem;
    }

    .theme-settings-tabs {
        padding: 0 1rem;
    }

    .theme-options-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .custom-theme-color-grid {
        grid-template-columns: 1fr;
    }

    .custom-theme-tools {
        align-items: flex-start;
        flex-direction: column;
    }

    .login-background-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .login-background-actions .btn {
        width: 100%;
    }
}

/* Listas globais de sugestões (jQuery UI autocomplete). */
.ui-autocomplete.ui-menu {
    box-sizing: border-box;
    max-height: min(18rem, 50vh);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-color: color-mix(in srgb, var(--primary-color) 28%, transparent);
    background: var(--background);
    color: var(--text-content-object);
    scrollbar-color: var(--primary-color-dark) transparent;
    scrollbar-width: thin;
    z-index: 1100;
}

.ui-autocomplete.ui-menu::-webkit-scrollbar {
    width: 0.55rem;
}

.ui-autocomplete.ui-menu::-webkit-scrollbar-track {
    background: transparent;
}

.ui-autocomplete.ui-menu::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: var(--primary-color-dark);
}

.ui-autocomplete.ui-menu .ui-menu-item-wrapper.ui-state-active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: var(--text-color-sidebar);
}
