.ck-editor__editable,
textarea {
    min-height: 150px;
}

.datatable {
    width: 100% !important;
}

.dataTables_length,
.dataTables_filter,
.dt-buttons {
    margin-bottom: 0.333em;
    margin-top: .2rem;
}

.dataTables_filter {
    margin-right: .2rem;
}

.dt-buttons .btn {
    margin-left: 0.333em;
    border-radius: 0;
}

.table.datatable {
    box-sizing: border-box;
    border-collapse: collapse;
}

table.dataTable thead th {
    border-bottom: 2px solid #c8ced3;
}

.dataTables_wrapper.no-footer .dataTables_scrollBody {
    border-bottom: 1px solid #c8ced3;
}

.select2 {
    max-width: 100%;
    width: 100% !important;
}

.select2-selection__rendered {
    padding-bottom: 5px !important;
}

.has-error .invalid-feedback {
    display: block !important;
}

.btn-info,
.badge-info {
    color: white;
}

table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc {
    background-image: none;
}

.sidebar .nav-item {
    cursor: pointer;
}

.btn-default {
    color: #23282c;
    background-color: #f0f3f5;
    border-color: #f0f3f5;
}

.btn-default.focus,
.btn-default:focus {
    box-shadow: 0 0 0 .2rem rgba(209, 213, 215, .5);
}

.btn-default:hover {
    color: #23282c;
    background-color: #d9e1e6;
    border-color: #d1dbe1;
}

.btn-group-xs > .btn,
.btn-xs {
    padding: 1px 5px;
    font-size: 12px;
    line-height: 1.5;
    border-radius: 3px;
}

.searchable-title {
    font-weight: bold;
}
.searchable-fields {
    padding-left:5px;
}
.searchable-link {
    padding:0 5px 0 5px;
}
.searchable-link:hover   {
    cursor: pointer;
    background: #eaeaea;
}
.select2-results__option {
    padding-left: 0px;
    padding-right: 0px;
}


/* ------------------------------------------------------------------
   Candidate registration wizard — mobile first

   Around nine in ten candidates complete this on a phone, so the small
   screen is the default case rather than an afterthought. Everything
   below is written for the phone and widened at 768px, not the reverse.
   ------------------------------------------------------------------ */

.wiz-progress {
    height: 4px; background: #e6eaee; border-radius: 2px; overflow: hidden;
    margin-bottom: 12px;
}
.wiz-progress span {
    display: block; height: 100%; background: #1d4d7b;
    transition: width 0.25s ease;
}

.wiz-steps { display: flex; gap: 6px; margin-bottom: 14px; }
.wiz-step {
    flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: center;
    gap: 6px; padding: 8px 4px; border-radius: 6px;
    background: #f1f3f5; color: #868e96; font-size: 12px; line-height: 1.25;
    border-bottom: 3px solid #dee2e6; text-decoration: none;
}
a.wiz-step:hover { text-decoration: none; background: #e4ecf3; color: #1d4d7b; }
.wiz-step .n {
    flex: 0 0 auto;
    width: 22px; height: 22px; line-height: 22px; text-align: center;
    border-radius: 50%; background: #ced4da; color: #fff;
    font-weight: 700; font-size: 11px;
}
.wiz-step .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wiz-step.done { background: #eaf6ee; color: #1e7e34; border-bottom-color: #28a745; }
.wiz-step.done .n { background: #28a745; }
.wiz-step.current { background: #e9f0f7; color: #1d4d7b; font-weight: 600; border-bottom-color: #1d4d7b; }
.wiz-step.current .n { background: #1d4d7b; }

.wiz-current-title {
    font-size: 17px; font-weight: 600; color: #1d4d7b;
    margin: 0 0 16px; padding-bottom: 10px; border-bottom: 1px solid #eceff1;
}
.wiz-current-title span { color: #212529; }
.wiz-current-title span::before { content: "\2014\00a0"; color: #adb5bd; }

.wiz-nav {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 24px; padding-top: 16px; border-top: 1px solid #e3e6e8;
}

/* One spacing rule for every field, whether or not its wrapper happens to
   carry .form-group — some came across from the old form without it, which
   left the vertical rhythm uneven down the column. */
.wiz-form .row > [class*="col-"] { margin-bottom: 1rem; }
.wiz-form .form-group > strong,
.wiz-form .row > [class*="col-"] > strong { display: block; margin-bottom: 4px; }

/* Labels wrap to two lines on some fields and one on others. Reserving two
   lines for every label lines the inputs up across a row.

   This was a flex column at one point, which was a mistake twice over: it put
   each part of a label that is not wrapped in one element — the text, the red
   asterisk, the colon — on its own row, and it stretched the WHMIS pictograms
   from 85px to the full column width, aspect ratio dragging the height with
   them. Reserving height does the same job and touches nothing else. */
.wiz-form .row > [class*="col-"] > strong { min-height: 2.6em; }

/* Those pictograms carry no width or height attribute, so they are worth
   pinning down whatever the surrounding layout does. */
.wiz-form img { max-width: 100%; height: auto; }

@media (max-width: 767.98px) {
    /* Six names will not fit across a phone, so the chips reduce to a row of
       numbers and the step being filled in is named underneath. */
    .wiz-step .t { display: none; }
    .wiz-step { padding: 9px 2px; }

    /* Full width is asserted rather than inherited: the markup came from a
       Bootstrap 3 form and some of it still carries no small-screen column. */
    .wiz-form [class*="col-"] { flex: 0 0 100%; max-width: 100%; }

    /* 16px or larger stops iOS zooming in when a field takes focus, which
       otherwise leaves the page scrolled sideways. */
    .wiz-form .form-control,
    .wiz-form input, .wiz-form select, .wiz-form textarea {
        font-size: 16px; height: auto; min-height: 44px; padding: 10px 12px;
    }
    .wiz-form textarea { min-height: 96px; }
    .wiz-form input[type="file"] { padding: 10px; }

    /* Comfortable tap targets for the many radio and checkbox groups. */
    .wiz-form input[type="checkbox"], .wiz-form input[type="radio"] {
        min-width: 20px; min-height: 20px; margin-right: 8px;
    }
    .wiz-form label { display: inline-flex; align-items: center; padding: 6px 0; min-height: 36px; }

    .wiz-form strong { display: block; margin-bottom: 4px; font-size: 14px; line-height: 1.35; }
    .wiz-form .form-group { margin-bottom: 18px; }

    .wiz-current-title { font-size: 15px; }
    .wiz-current-title span { display: block; }
    .wiz-current-title span::before { content: none; }

    /* Keep the next/back controls within thumb reach on a long step. */
    .wiz-nav {
        position: sticky; bottom: 0; background: #fff; margin: 18px -15px 0;
        padding: 10px 15px; border-top: 1px solid #dfe3e6; z-index: 5;
        box-shadow: 0 -2px 6px rgba(0,0,0,0.06);
    }
    .wiz-nav .btn { min-height: 44px; padding: 10px 16px; }
    .wiz-nav .wiz-count { font-size: 11px; }

    /* Reclaim the gutters the card spends on a narrow screen. */
    .wiz-form .card-body { padding: 12px; }

    /* The signature pad is sized to its container at runtime; touch-action
       stops a drag scrolling the page instead of drawing. */
    #canvas canvas { max-width: 100%; height: auto; touch-action: none; }
}

@media (min-width: 768px) {
    .wiz-count { display: none; }
}

/* The signature pad. The admin form styles this from an inline block the
   wizard does not load, so the border lives here instead. */
#canvas canvas { border: 1px solid #3a87ad; border-radius: 3px; background: #fff; }
#canvas { margin-bottom: 10px; }

/* ------------------------------------------------------------------
   Grids

   Actions are icons rather than words: three labelled buttons per row
   made the last column wider than the data it belonged to, and pushed
   the useful columns off the side on a laptop.
   ------------------------------------------------------------------ */

.grid-actions { white-space: nowrap; }
.grid-actions .btn,
.grid-actions form { display: inline-block; margin: 0 2px 0 0; vertical-align: middle; }
.grid-actions .btn {
    width: 30px; height: 30px; padding: 0; line-height: 28px; text-align: center;
}
.grid-actions .btn i { line-height: inherit; }

/* The row's own name links to it, so the name is the way in and the
   Show button that used to sit in the actions column is gone. */
.grid-link { font-weight: 600; }
.grid-link:hover { text-decoration: underline; }

/* A second line of context under the primary cell — an email under a
   name, a reference under a number — without spending a column on it. */
.grid-sub { display: block; font-size: 11px; color: #869099; line-height: 1.5; }

table.dataTable td { vertical-align: middle; }

@media (max-width: 767.98px) {
    .grid-actions .btn { width: 36px; height: 36px; line-height: 34px; }
}


/* ------------------------------------------------------------------
   Dashboard widgets

   Ported verbatim from the Cash Valley stylesheet so the recruitment
   dashboard and the lending dashboards read as one product: same card
   geometry, same section rules, same chart box. Keep the two copies in
   step — a tweak here that is not mirrored there is a visible seam for
   anyone who runs both apps side by side.
   ------------------------------------------------------------------ */

    .stat-card {
        border-radius: 10px;
        padding: 25px;
        margin-bottom: 20px;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        transition: transform 0.2s, box-shadow 0.2s;
        min-height: 140px;
        display: flex;
        flex-direction: column;
    }
    .stat-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    }
    .stat-card > .d-flex {
        height: 100%;
        align-items: flex-start;
    }
    .stat-card > .d-flex > div:first-child {
        flex: 1;
        min-width: 0;
        max-width: calc(100% - 70px);
        overflow: hidden;
    }
    .stat-card-icon {
        font-size: 3rem;
        opacity: 0.9;
        flex-shrink: 0;
        margin-left: 15px;
        width: 55px;
    }
    .stat-card-value {
        font-size: 1.4rem;
        font-weight: 700;
        margin: 8px 0 0 0;
        word-break: break-word;
        overflow-wrap: break-word;
        line-height: 1.3;
        max-width: 100%;
    }
    @media (min-width: 992px) {
        .stat-card-value {
            font-size: 1.6rem;
        }
    }
    @media (min-width: 1200px) {
        .stat-card-value {
            font-size: 1.8rem;
        }
    }
    .stat-card-label {
        font-size: 0.85rem;
        text-transform: uppercase;
        letter-spacing: 1px;
        font-weight: 600;
        opacity: 0.95;
        margin-bottom: 5px;
    }
    .stat-card.text-white .stat-card-label {
        color: rgba(255, 255, 255, 0.9);
    }
    @media (max-width: 576px) {
        .stat-card-value {
            font-size: 1.5rem;
        }
        .stat-card-icon {
            font-size: 2rem;
        }
    }
    .chart-container {
        position: relative;
        height: 300px;
        margin-bottom: 30px;
    }
    .chart-container-large {
        height: 400px;
    }
    /* The filter sits straight on the card body. It carries no fill of its
       own — a grey panel inside a white panel reads as a second page. */
    .dashboard-filter {
        padding: 0;
        margin-bottom: 10px;
    }
    .section-title {
        font-size: 1.5rem;
        font-weight: 600;
        color: #343a40;
        margin: 30px 0 20px 0;
        padding-bottom: 10px;
        border-bottom: 3px solid #007bff;
        display: flex;
        align-items: center;
    }
    .section-title i {
        margin-right: 10px;
        color: #007bff;
    }
    .section-title:first-of-type {
        margin-top: 0;
    }
    /* Smaller inline context note alongside a section title, e.g. the total
       count summary on the pipeline heading. */
    .section-title small {
        font-size: 0.85rem;
        font-weight: 400;
        color: #6c757d;
        margin-left: 10px;
    }

    /* A third, quieter line under the stat-card value — the "why" behind the
       number (counts, context, rates). */
    .stat-card-sub {
        font-size: 0.78rem;
        margin-top: 6px;
        line-height: 1.3;
        opacity: 0.9;
    }
    .stat-card.text-white .stat-card-sub {
        color: rgba(255, 255, 255, 0.85);
    }

    /* Light (non-gradient) stat card used for the secondary rows, where the
       colour meaning carries on a left border instead of a full fill, so the
       headline cards stay the loudest thing on the page. */
    .stat-card-light {
        background: #ffffff;
        color: #2c3e50;
        border: 1px solid #e6e9ef;
    }
    .stat-card-light .stat-card-label {
        color: #6c757d;
    }
    .stat-card-light .stat-card-sub {
        color: #8a94a6;
    }
