/* ==========================================================================
   JTC theme — dark purple re-skin of the Riho template + JTC login page
   Palette: violet-50 #F5F3FF | violet-800 #5B21B6 | violet-900 #4C1D95
            violet-950 #3B0764 | gray-900 #111827 | gray-500 #6B7280
   ========================================================================== */

:root {
    --theme-default: #4C1D95;
}

/* ---------- Dark purple sidebar (uses the theme's built-in dark-sidebar
   mode for text/icon contrast; only the background is overridden) ---------- */

body.dark-sidebar .page-wrapper.compact-wrapper .page-body-wrapper div.sidebar-wrapper {
    background-color: #3B0764;
}

/* Give the active submenu item a clear highlight pill — the theme's default
   active state is just a text-opacity change (rgba(255,255,255,.6) -> #fff),
   which reads as barely-there against a dark purple background. */
.sidebar-wrapper .sidebar-submenu li a.active {
    background-color: rgba(255, 255, 255, .12);
    border-radius: 6px;
    font-weight: 600;
}

/* ---------- Login page ---------- */

.jtc-login {
    margin: 0;
    font-family: "Outfit", "Segoe UI", system-ui, -apple-system, sans-serif;
    background: #F5F3FF;
}

.jtc-mobile-brand {
    background: #4C1D95;
    color: #fff;
    text-align: center;
    padding: 1rem;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: .1em;
}

.jtc-login-wrapper {
    display: flex;
    min-height: 100vh;
}

.jtc-brand-panel {
    position: relative;
    overflow: hidden;
    background: #4C1D95;
    color: #fff;
    flex: 1;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
}

.jtc-brand-content {
    text-align: center;
    z-index: 1;
}

.jtc-monogram {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 auto 1.25rem;
}

.jtc-brand-panel h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: .05em;
}

.jtc-brand-panel .jtc-tagline {
    color: rgba(255, 255, 255, .8);
    font-size: 1.1rem;
}

.jtc-blob {
    position: absolute;
    border-radius: 50%;
}

.jtc-blob-1 {
    width: 320px;
    height: 320px;
    background: #5B21B6;
    top: -80px;
    right: -80px;
    opacity: .5;
}

.jtc-blob-2 {
    width: 240px;
    height: 240px;
    background: #3B0764;
    bottom: -60px;
    left: -60px;
    opacity: .6;
}

.jtc-copyright {
    position: absolute;
    bottom: 1.5rem;
    color: rgba(255, 255, 255, .5);
    font-size: .85rem;
    z-index: 1;
}

.jtc-form-panel {
    flex: 1;
    background: #F5F3FF;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
}

.jtc-form-box {
    width: 100%;
    max-width: 420px;
}

.jtc-form-box h2 {
    color: #111827;
    font-weight: 700;
}

.jtc-subheading {
    color: #6B7280;
    margin-bottom: 2rem;
}

.jtc-form-box .form-label {
    color: #111827;
    font-weight: 500;
}

.jtc-form-box .form-control {
    background: #fff;
    border-radius: .5rem;
    padding: .65rem .9rem;
}

.jtc-form-box .form-control:focus {
    border-color: #4C1D95;
    box-shadow: 0 0 0 .25rem rgba(76, 29, 149, .25);
}

.jtc-btn-primary {
    background: #4C1D95;
    color: #fff;
    border: 0;
    border-radius: .5rem;
    padding: .7rem;
    font-weight: 600;
}

.jtc-btn-primary:hover,
.jtc-btn-primary:focus {
    background: #3B0764;
    color: #fff;
}

.jtc-link {
    color: #4C1D95;
    text-decoration: none;
    font-weight: 500;
}

.jtc-link:hover {
    color: #3B0764;
}

.jtc-password-wrap {
    position: relative;
}

.jtc-password-wrap .form-control {
    padding-right: 2.75rem;
}

.jtc-password-toggle {
    position: absolute;
    right: .6rem;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #6B7280;
    line-height: 1;
    padding: .25rem;
}

@media (min-width: 992px) {
    .jtc-brand-panel {
        display: flex;
    }

    .jtc-mobile-brand {
        display: none;
    }
}

/* ---------- Checklist Yes/No pill toggle (Master Setup) ---------- */

.jtc-toggle-pill {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .2rem;
    border-radius: 50rem;
    background: #F3F4F6;
    border: 1px solid #E5E7EB;
}

.jtc-toggle-pill-btn {
    min-width: 3.25rem;
}

.jtc-setting-list > div:last-of-type {
    border-bottom: none !important;
}

/* ---------- Checklist template document picker (Master Setup) ---------- */

.jtc-doc-picker {
    border: 2px dashed #E5E7EB;
    cursor: pointer;
    transition: border-color .15s ease, color .15s ease;
}

.jtc-doc-picker:hover {
    border-color: #4C1D95;
    color: #4C1D95;
}

/* ---------- Checklist index: respect explicit per-column widths ---------- */

#checklist-table {
    table-layout: fixed;
}

#task-table {
    table-layout: fixed;
}

#business-process-table {
    table-layout: fixed;
}

/* ---------- Business Process Tasks: suppress text-selection highlight
   during drag-and-drop reordering (SortableJS runs in forceFallback mode
   here, which uses simulated pointer-based dragging instead of native
   HTML5 drag-and-drop, so the browser's normal text-selection behavior
   needs to be explicitly disabled on the row being dragged) ---------- */

#bp-task-list tr.sortable-chosen,
#bp-task-list tr.sortable-chosen * {
    user-select: none;
}

/* ---------- Ticket status dropdown (Edit Ticket modal, select2):
   background/text color reflects the currently selected status,
   matching the same semantic colors already used for status badges
   elsewhere (success/warning/danger/info/secondary). Class is set
   server-side on render and swapped by ticket-form.js on change (see
   data-status-classes). ---------- */

select.status-select {
    font-weight: 600;
}

select.status-select.status-select-success {
    background-color: rgba(0, 172, 70, 0.12);
    color: #00863a;
    border-color: rgba(0, 172, 70, 0.35);
}

select.status-select.status-select-warning {
    background-color: rgba(255, 174, 26, 0.18);
    color: #a3690a;
    border-color: rgba(255, 174, 26, 0.4);
}

select.status-select.status-select-danger {
    background-color: rgba(254, 106, 73, 0.14);
    color: #d84315;
    border-color: rgba(254, 106, 73, 0.4);
}

select.status-select.status-select-info {
    background-color: rgba(23, 56, 120, 0.1);
    color: #173878;
    border-color: rgba(23, 56, 120, 0.3);
}

select.status-select.status-select-secondary {
    background-color: #f1f2f6;
    color: #6c757d;
    border-color: #dee2e6;
}

/* select2 hides the <select> above and renders its own box, so the same
   status-select-* modifier classes are applied by JS to .select2-selection
   instead — select2.css loads after this file, so !important is needed
   to win over its default background/border. */
.select2-container--default .select2-selection--single.status-select-success {
    background-color: rgba(0, 172, 70, 0.12) !important;
    border-color: rgba(0, 172, 70, 0.35) !important;
}
.select2-container--default .select2-selection--single.status-select-success .select2-selection__rendered {
    color: #00863a !important;
    font-weight: 600;
}
.select2-container--default .select2-selection--single.status-select-warning {
    background-color: rgba(255, 174, 26, 0.18) !important;
    border-color: rgba(255, 174, 26, 0.4) !important;
}
.select2-container--default .select2-selection--single.status-select-warning .select2-selection__rendered {
    color: #a3690a !important;
    font-weight: 600;
}
.select2-container--default .select2-selection--single.status-select-danger {
    background-color: rgba(254, 106, 73, 0.14) !important;
    border-color: rgba(254, 106, 73, 0.4) !important;
}
.select2-container--default .select2-selection--single.status-select-danger .select2-selection__rendered {
    color: #d84315 !important;
    font-weight: 600;
}
.select2-container--default .select2-selection--single.status-select-info {
    background-color: rgba(23, 56, 120, 0.1) !important;
    border-color: rgba(23, 56, 120, 0.3) !important;
}
.select2-container--default .select2-selection--single.status-select-info .select2-selection__rendered {
    color: #173878 !important;
    font-weight: 600;
}
.select2-container--default .select2-selection--single.status-select-secondary {
    background-color: #f1f2f6 !important;
    border-color: #dee2e6 !important;
}
.select2-container--default .select2-selection--single.status-select-secondary .select2-selection__rendered {
    color: #6c757d !important;
    font-weight: 600;
}

/* Ticket Task status dropdown menu: force a fully opaque background —
   inside the Task List table it was picking up a translucent bg. */
.ticket-task-status-dropdown .dropdown-menu {
    background-color: #fff !important;
    opacity: 1;
}

/* "Add More Files" label text: dark in light mode, white in the
   theme's dark mode (body.dark-only, toggled via the customizer) —
   plain text-dark would stay black and disappear in dark mode. */
.ticket-checklist-doc-add-text {
    color: #212529;
}
body.dark-only .ticket-checklist-doc-add-text {
    color: #fff;
}

