/* ===========================================================================
   custom.css — project-specific overrides on top of AdminLTE 3.
   Keep app-wide tweaks here; do not edit vendor files under /assets/plugins.
   =========================================================================== */

.content-wrapper {
	background-color: #f5f8fc !important;
}

/* ---------------------------------------------------------------------------
   Sign-in page — split layout (brand panel left, form right).
   Inspired by the Adminator sign-in (form on the right-hand side) but built
   from AdminLTE 3 components. Fully responsive: the left panel collapses on
   small screens.
   --------------------------------------------------------------------------- */
.signin-wrapper {
    min-height: 100vh;
    display: flex;
    flex-wrap: wrap;
}

.signin-brand {
    flex: 1 1 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: #fff;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.signin-brand .signin-brand-inner {
    max-width: 420px;
}

.signin-brand h1 {
    font-weight: 300;
    font-size: 2.5rem;
}

.signin-brand h1 b {
    font-weight: 700;
}

.signin-form-panel {
    flex: 1 1 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    background: #f5f8fc;
}

.signin-form-panel .signin-card {
    width: 100%;
    max-width: 380px;
}

/* Stack to a single column on tablets / phones, hide the brand panel. */
@media (max-width: 767.98px) {
    .signin-brand {
        display: none;
    }
    .signin-form-panel {
        flex-basis: 100%;
    }
}

/* ---------------------------------------------------------------------------
   RoqDesk brand mark — mirrors the marketing site (/landing) header brand:
   a gradient rounded-square "R" badge next to the RoqDesk wordmark. Used in the
   app sidebar and on the sign-in / sign-up pages.
   --------------------------------------------------------------------------- */
.rd-brand-logo {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #2c93ff 0%, #007bff 45%, #0056b3 100%);
    box-shadow: 0 6px 14px rgba(0, 123, 255, .4);
    color: #fff;
    font-weight: 800;
    font-size: 1.05rem;
    line-height: 1;
}

.rd-brand {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: -.03em;
    text-decoration: none;
}
.rd-brand:hover,
.rd-brand:focus {
    text-decoration: none;
}
.rd-brand--ink, .rd-brand--ink:hover, .rd-brand--ink:focus { color: #0b1f33; }
.rd-brand--light, .rd-brand--light:hover, .rd-brand--light:focus { color: #fff; }
.rd-brand--lg { font-size: 2rem; }
.rd-brand--lg .rd-brand-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    font-size: 1.5rem;
}

/* Sidebar header brand (dark sidebar): swap AdminLTE's image brand for the badge. */
.brand-link {
    display: flex;
    align-items: center;
    gap: .55rem;
	border-bottom: none !important;
}
.brand-link .brand-text {
    margin: 0;
    color: #0b1f33;
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: -.03em;
}

/* ---------------------------------------------------------------------------
   Master-only UI — nav items, buttons, etc. only Master Account users may see.
   Hidden by default; app.js reveals them after confirming the role.
   --------------------------------------------------------------------------- */
.master-only {
    display: none;
}

/* ---------------------------------------------------------------------------
   Kanban board — drag-and-drop columns (jQuery UI sortable).
   --------------------------------------------------------------------------- */
.kanban-col {
    min-height: 120px;
}

.kanban-card {
    cursor: grab;
}

.kanban-card:active {
    cursor: grabbing;
}

/* Drop-target placeholder shown while dragging. */
.kanban-placeholder {
    border: 2px dashed #adb5bd;
    background: #f4f6f9;
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
    min-height: 64px;
}

/* ---------------------------------------------------------------------------
   Modal backdrop — use a semi-transparent white overlay instead of the default
   dark one.
   --------------------------------------------------------------------------- */
.modal-backdrop {
    background-color: #fff;
}

.modal-backdrop.show {
    opacity: 0.5;
}

/* ---------------------------------------------------------------------------
   Forms — required-field indicator. Add class="required" to a field's <label>
   to append a red asterisk.
   --------------------------------------------------------------------------- */
label.required::after {
    content: " *";
    color: #dc3545;
    font-weight: 700;
}

/* ---------------------------------------------------------------------------
   Select2 — align the default and Bootstrap 4 themes with AdminLTE form
   controls (height, borders, focus colour). These rules are the AdminLTE
   recommended fixes so Select2 visually matches .form-control inputs.
   --------------------------------------------------------------------------- */
.select2-container--default .select2-selection--single,
.select2-container--bootstrap4 .select2-selection--single {
    height: calc(2.25rem + 2px);
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 1.5;
    padding-left: 0;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: calc(2.25rem + 2px);
}

/* Multi-select height/spacing to match inputs. */
.select2-container--default .select2-selection--multiple {
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    min-height: calc(2.25rem + 2px);
}

/* AdminLTE primary colour for selected options and focus states. */
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: #007bff;
}

.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default .select2-selection--single:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #007bff;
    border-color: #0062cc;
    color: #fff;
    padding: 0 0.5rem;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #fff;
    margin-right: 0.25rem;
}

/* Make Select2 fill the width of input groups / form rows. */
.select2-container {
    width: 100% !important;
}

/* ---------------------------------------------------------------------------
   DataTables — project standard (see App.dataTable in app.js):
   per-column filter row on desktop, generic search on mobile, horizontal
   scroll instead of the Responsive add-on.
   --------------------------------------------------------------------------- */

/* DataTables' Bootstrap 4 integration zeroes the left, right and bottom border
   widths of .table-bordered cells (it uses separate borders + the table edge),
   which drops the outer left and bottom borders. Force border-collapse and
   restore every cell border width so the full grid is drawn without doubling.
   Each override below mirrors a DataTables rule at matching specificity. */
table.dataTable.table-bordered {
    border-collapse: collapse !important;
}

/* Counter `border-left-width: 0` (and top/right) on all cells. */
table.table-bordered.dataTable th,
table.table-bordered.dataTable td {
    border-width: 1px;
}

/* Counter `border-right-width: 0` on the last column. */
table.table-bordered.dataTable th:last-child,
table.table-bordered.dataTable td:last-child {
    border-right-width: 1px;
}

/* Counter `border-bottom-width: 0` on body cells (restores the bottom border). */
table.table-bordered.dataTable tbody th,
table.table-bordered.dataTable tbody td {
    border-bottom-width: 1px;
}

/* DataTables core sets a 6px top/bottom margin on the table (with !important);
   zero it so the table sits flush within the panel. */
table.dataTable {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Vertically centre the content of every table cell. */
.table th,
.table td,
table.dataTable th,
table.dataTable td {
    vertical-align: middle;
}

/* Tighten body-cell padding. Header cells keep 0.75rem so the DataTables sort
   arrows stay vertically centred against the heading text. */
.table td,
table.dataTable td {
    padding: 0.5rem;
}

.table th,
table.dataTable th {
    padding: 0.75rem;
}

/* The DataTable header has two rows (the filter row above the title row) and
   DataTables forces border-collapse: separate, so Bootstrap's `.table th`
   border-top draws a line on each — doubling up (and the topmost one doubles
   with the card-header border). Drop the header border-top; the card header
   above and the thead bottom border below provide the framing. */
table.dataTable thead th {
    border-top: 0;
}

/* The per-column filter inputs sit in the upper header row. The inputs are
   borderless and transparent so they look built into the table. */
table.dataTable thead tr.dt-column-filters th {
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
    font-weight: 400;
}

table.dataTable thead tr.dt-column-filters .dt-filter {
    width: 100%;
    height: auto;
    border: 0;
    border-radius: 0;
    background-color: transparent;
    box-shadow: none;
    padding: 0.1rem 0;
    font-weight: 400;
}

table.dataTable thead tr.dt-column-filters .dt-filter:focus {
    outline: 0;
    border: 0;
    box-shadow: none;
    background-color: transparent;
}

/* Generic search is hidden on desktop; shown only on small screens. */
.dt-global-search {
    display: none;
}

/* Actions and Status columns: shrink to the width of their content (buttons /
   badge), never wrap, and centre. The width:1% + white-space:nowrap trick sizes
   the column to its content; the borderless filter input (width:100%) shrinks
   with it rather than forcing the column wider. */
table.dataTable th.dt-actions,
table.dataTable td.dt-actions,
table.dataTable th.dt-status,
table.dataTable td.dt-status {
    width: 1%;
    white-space: nowrap;
    text-align: center;
}

table.dataTable td.dt-actions .btn {
    white-space: nowrap;
}

/* Centre status/badge columns (apply className "text-center" to the column).
   !important is needed to beat DataTables' own cell rules. */
table.dataTable tbody td.text-center,
table.dataTable thead th.text-center {
    text-align: center !important;
}

/* On small screens: hide the per-column filter row and show the generic
   search box instead. */
@media (max-width: 767.98px) {
    table.dataTable thead tr.dt-column-filters {
        display: none;
    }
    .dt-global-search {
        display: block;
    }
}

/* Pull the DataTable flush to the panel edges so it reads as built into the
   card (like the inbox), while the .card-body keeps its padding for the
   "Showing X of Y" info and the pagination below the table. The -1.25rem
   matches the default Bootstrap .card-body padding. */
.card-body > .dataTables_wrapper > .table-responsive {
    margin-left: -1.25rem;
    margin-right: -1.25rem;
    width: auto;
    border-bottom: 1px solid #dee2e6;
}

/* On desktop the generic search box is hidden, so also close the gap between
   the card header and the table (on mobile the search box sits above it). */
@media (min-width: 768px) {
    .card-body > .dataTables_wrapper > .table-responsive {
        margin-top: -1.25rem;
    }
}

.callout a:hover {
  color: #000 !important;
}