/* CSS Version: 2025-01-23-v4 - Hide brand text, show logo only */

/* ========================================================================
   CSS VARIABLES - SWYFT BRAND COLORS AND SETTINGS
   ======================================================================== */

:root {
  --swyft-primary: #4F62FE;
  --swyft-tertiary: #56c747;
  --swyft-secondary: #13294C;
  --swyft-white: #ffffff;
  --swyft-danger: #d9534f;
  --swyft-info: #4F62FE;
  --swyft-lighter-primary: #13294C;
  --swyft-mint: #CAFBC3;
  --swyft-border-radius-default: 12px;
}

/* ========================================================================
   GLOBAL STYLES
   ======================================================================== */

body {
  background-color: var(--swyft-primary);
  background-image: linear-gradient(135deg, var(--swyft-secondary) 0%, var(--swyft-primary) 100%);
  color: var(--swyft-secondary);
  font-weight: 400;
}

/* ========================================================================
   CONTAINERS AND LAYOUT
   ======================================================================== */

a.d-block {
  color: var(--swyft-white) !important;
}

div.login-box > div.card {
  border-radius: var(--swyft-border-radius-default);
}

div.card {
  background-color: var(--swyft-white);
  border-radius: 20px;
}

div.card-body {
  border-radius: inherit;
}



.object-container {
  width: 100%;
  padding: 2rem 1.5rem;
  background-color: var(--swyft-white);
  box-sizing: border-box;
  border-radius: var(--swyft-border-radius-default);
}

.object-container h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.jobrun-full-height-card {
  height: 100% !important;
  width: 100% !important;
}

.detail-container {
  width: 100%;
  max-width: 1400px;
  margin: 2rem auto;
  padding: 2.5rem 3rem;
  background-color: var(--swyft-white);
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
  font-family: "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

.section {
  margin-bottom: 2.5rem;
}

.section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  border-bottom: 1px solid var(--swyft-secondary);
  padding-bottom: 6px;
  margin-bottom: 1rem;
}

/* ========================================================================
   NAVBAR
   ======================================================================== */

.nav-tabs .nav-link.active {
  background-color: var(--swyft-primary) !important;
  border-color: var(--swyft-primary) !important;
  color: var(--swyft-white) !important;
}

.bg-custom-navbar {
  background-color: var(--swyft-primary) !important;
}

.navbar-dark {
  background-color: inherit;
}

.navbar-dark .navbar-brand,
.navbar-dark .nav-link {
  color: var(--swyft-white) !important;
  font-weight: 500;
}

/* ========================================================================
   BREADCRUMBS
   ======================================================================== */

.breadcrumb-item.active {
  color: var(--swyft-info);
}

/* ========================================================================
   SIDEBAR
   ======================================================================== */

.sidebar {
  overflow-x: hidden !important;
  white-space: normal !important;
}

.sidebar .nav-link {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-dark-custom {
  background-color: var(--swyft-primary) !important;
}

.sidebar-dark-custom .nav-link {
  color: var(--swyft-white) !important;
  border-radius: var(--swyft-border-radius-default);
  margin: 4px 6px;
  transition: background 0.2s ease;
}

.nav-link:focus {
  color: var(--swyft-white) !important;
  border-color: var(--swyft-primary) !important;
}

.nav-link:hover {
  color: var(--swyft-primary) !important;
}

li.nav-item.dropdown > a.nav-link:hover {
  background-color: var(--swyft-white) !important;
  color: var(--swyft-primary) !important;
  font-weight: 600;
} 

.sidebar-dark-custom .nav-link.active,
.sidebar-dark-custom .nav-link:hover {
  background-color: var(--swyft-white) !important;
  color: var(--swyft-primary) !important;
  font-weight: 600;
}

.brand-link img {
  max-height: 40px !important;
  width: auto !important;
}

/* Hide brand text only - use color transparent to keep layout */
.brand-link .brand-text {
  color: transparent !important;
  font-size: 0 !important;
}

/* ========================================================================
   BUTTONS
   ======================================================================== */

.btn-danger,
.btn-primary,
.btn-secondary,
.btn-success,
.btn-info {
  border-radius: var(--swyft-border-radius-default);
  font-weight: 400;
}

.btn-success {
  background-color: var(--swyft-primary);
  border-color: var(--swyft-primary);
}

.btn-primary {
  background-color: var(--swyft-primary);
  border-color: var(--swyft-primary);
  color: var(--swyft-white);
}

.btn-primary:hover {
  background-color: var(--swyft-secondary);
  border-color: var(--swyft-secondary);
  color: var(--swyft-white);
}

.btn-secondary {
  background-color: var(--swyft-primary);
  border-color: var(--swyft-primary) !important;
  color: var(--swyft-white) !important;
}

.btn-secondary:hover {
  background-color: var(--swyft-secondary);
  border-color: var(--swyft-secondary);
}

.btn-info {
  background-color: var(--swyft-info);
  border-color: var(--swyft-info);
}

.accent-teal a:not(.dropdown-item):not(.btn-app):not(.nav-link):not(.brand-link):not(.page-link):not(.btn):hover {
  color: var(--swyft-info);
}

.dropdown-item.active {
  background-color: var(--swyft-white) !important;
  color: var(--swyft-primary) !important;
}

.btn-info:not(:disabled):not(.disabled):active,
.btn-primary:not(:disabled):not(.disabled):active,
.btn-success:not(:disabled):not(.disabled):active {
  background-color: var(--swyft-tertiary);
  border-color: var(--swyft-tertiary);
}

.btn-success:hover {
  background-color: var(--swyft-secondary);
  border-color: var(--swyft-secondary);
}

.btn-info:focus,
.btn-primary:focus,
.btn-success:focus {
  background-color: var(--swyft-secondary);
  border-color: var(--swyft-secondary);
}

.btn-primary:not(:disabled):not(.disabled).active,
.btn-primary:not(:disabled):not(.disabled):active,
.show > .btn-primary.dropdown-toggle {
  color: var(--swyft-white);
  background-color: var(--swyft-secondary) !important;
  border-color: var(--swyft-lighter-primary) !important;
}

/* ========================================================================
   FORM INPUTS AND CONTROLS
   ======================================================================== */

input[type="text"],
input[type="password"],
select,
textarea {
  border-radius: var(--swyft-border-radius-default);
  border: 1px solid var(--swyft-secondary);
  padding: 6px 10px;
}

input[type=checkbox]:checked,
input[type=radio]:checked {
  background-color: var(--swyft-primary) !important;
}

.vTextField,
.vLargeTextField,
.vURLField,
.vIntegerField,
.vBigIntegerField,
.vForeignKeyRawIdAdminField,
.vDateField,
.vTimeField,
input[type="number"],
input[type="text"] {
  border-radius: 8px;
  color: var(--swyft-secondary);
}

.form-control:focus {
  color: unset;
}

:focus {
  box-shadow: none !important;
  border-color: var(--swyft-secondary) !important;
}

.input-group-text {
  background-color: var(--swyft-primary);
}

/* ========================================================================
   SELECT2 DROPDOWN CUSTOMIZATION
   ======================================================================== */

.vSelect {
  height: calc(2.25rem + 2px) !important;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--swyft-secondary);
  background-color: var(--swyft-white);
  background-clip: padding-box;
  border: 1px solid var(--swyft-secondary);
  border-radius: 0.25rem;
  box-shadow: inset 0 0 0 transparent !important;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  color: unset !important;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
  background-color: var(--swyft-white);
  color: var(--swyft-primary);
}

.select2-container--default .select2-selection--single {
  border-radius: 12px !important;
}

.select2-container--default .select2-dropdown .select2-search__field:focus,
.select2-container--default .select2-search--inline .select2-search__field:focus {
  border-radius: var(--swyft-border-radius-default);
  border: 1px solid var(--swyft-primary);
}

.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted[aria-selected]:hover {
  border: 1px solid var(--swyft-primary);
  background-color: var(--swyft-primary);
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
  background-color: var(--swyft-primary) !important;
}

.select2-dropdown {
  border-radius: var(--swyft-border-radius-default) !important;
}

.select2-results__option--highlighted {
  border-radius: var(--swyft-border-radius-default) !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
  border-radius: var(--swyft-border-radius-default);
}

.selector-chosen h2 {
  background: var(--swyft-lighter-primary);
  color: var(--swyft-white);
}

.selector-available h2 {
  background: var(--swyft-white) !important;
  color: var(--swyft-lighter-primary) !important;
}

div.id_groups_selector_chosen,
div.selector-available {
  border-radius: var(--swyft-border-radius-default);
}

/* ========================================================================
   DROPDOWNS
   ======================================================================== */

.dropdown-menu {
  background-color: var(--swyft-primary);
}

.dropdown-header {
  color: var(--swyft-white);
}

/* ========================================================================
   LINKS
   ======================================================================== */

.accent-teal .btn-link,
.accent-teal .nav-tabs .nav-link,
.accent-teal a:not(.dropdown-item):not(.btn-app):not(.nav-link):not(.brand-link):not(.page-link):not(.btn) {
  color: var(--swyft-secondary);
  text-decoration: none;
}

a.back-link:hover,
a.detail-link:hover {
  color: var(--swyft-white) !important;
}

a.back-link:not(.dropdown-item):not(.btn-app):not(.nav-link):not(.brand-link):not(.page-link):not(.btn):hover {
  color: var(--swyft-white) !important;
}

.back-link {
  font-size: 0.95rem;
  font-weight: normal;
  text-decoration: none;
  padding: 0.4rem 0.6rem;
  border: 2px solid var(--swyft-secondary);
  border-radius: 6px;
  transition: background 0.2s ease-in-out;
}

.back-link:hover {
  background-color: var(--swyft-secondary);
  text-decoration: none;
}

a.detail-link {
  text-decoration: underline !important;
}

a.detail-link:hover {
  text-decoration: none;
}

.view-all-link {
  margin-top: 16px;
  font-size: 14px;
}

.view-all-link a {
  color: var(--swyft-tertiary);
  text-decoration: none;
  font-weight: 500;
}

.view-all-link a:hover {
  color: var(--swyft-info);
  text-decoration: underline;
}

/* ========================================================================
   TABLES
   ======================================================================== */

.table td {
  color: var(--swyft-secondary);
}

table > thead {
  background-color: var(--swyft-primary) !important;
}

thead > tr a {
  color: var(--swyft-white) !important;
}

.table thead th {
  color: var(--swyft-white) !important;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 12px;
  font-size: 0.8rem;
  border-radius: var(--swyft-border-radius-default);
}

table > thead {
  background-color: var(--swyft-lighter-primary);
  text-transform: uppercase;
}

tr > td,
tr > th {
  padding: 14px 16px;
}

tr > th {
  color: var(--swyft-white);
  text-align: left;
}

tr > td {
  color: var(--swyft-primary);
}

tbody {
  background-color: var(--swyft-white);
  border-radius: 8px;
}

.responsive-table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
}

table.object-table {
  width: 100%;
  min-width: 900px;
}

.clickable-row {
  cursor: pointer;
  transition: 0.15s;
}

tr.clickable-row:hover {
  background-color: var(--swyft-info);
}

/* ========================================================================
   LOGIN PAGE
   ======================================================================== */

.login-box-msg {
  color: var(--swyft-primary);
}

.login-logo {
  text-align: center;
}

.login-logo img {
  border-radius: 30px;
  max-width: 500px;
  padding: 20px;
  margin: 0 auto;
  display: block;
}

/* Mobile responsive styling for login logo and card */
@media (max-width: 768px) {
  .login-logo img {
    max-width: 280px;
    padding: 15px;
  }

  .login-box {
    margin: 20px !important;
    width: calc(100% - 40px) !important;
  }

  .login-box > .card {
    margin: 0;
  }

  .login-box .card-body {
    padding: 1.5rem 1rem;
  }
}

/* ========================================================================
   ADMIN DETAIL VIEW - FORM LAYOUT
   ======================================================================== */

/* Make field labels appear beside values (not above) */
.change-form .form-group,
form .form-group,
.card-body .form-group,
fieldset .form-group {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  margin-bottom: 15px !important;
  gap: 16px !important;
}

.change-form .form-group label,
form .form-group label,
.card-body .form-group label,
fieldset .form-group label {
  font-weight: 600 !important;
  color: var(--swyft-secondary) !important;
  min-width: 180px !important;
  max-width: 220px !important;
  flex-shrink: 0 !important;
  text-align: right !important;
  padding-top: 8px !important;
  margin-bottom: 0 !important;
}

.change-form .form-group .readonly,
.change-form .form-group > div:not(.form-text):not(.input-group),
.change-form .form-group > p,
form .form-group .readonly,
form .form-group > div:not(.form-text):not(.input-group),
.card-body .form-group .readonly,
.card-body .form-group > div:not(.form-text):not(.input-group) {
  flex: 1 !important;
  color: var(--swyft-secondary) !important;
}

/* Multi-column layout for fieldsets on larger screens */
@media (min-width: 1024px) {
  .change-form fieldset,
  .change-form .card-body > fieldset,
  form fieldset,
  .card-body > fieldset,
  .card > fieldset {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0 40px !important;
    column-gap: 40px !important;
  }
}

@media (min-width: 1400px) {
  .change-form fieldset,
  .change-form .card-body > fieldset,
  form fieldset,
  .card-body > fieldset,
  .card > fieldset {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

fieldset > .form-group {
  grid-column: span 1 !important;
}

.form-group:has(textarea),
.form-group:has(.vLargeTextField),
.form-group.wide {
  grid-column: 1 / -1 !important;
}

.form-group .form-text,
.form-group .help-block {
  display: block !important;
  width: 100% !important;
  margin-top: 4px !important;
  font-size: 12px !important;
  color: var(--swyft-secondary) !important;
}

.inline-group,
.inline-related,
.tabular,
.card:has(.inline-group),
.card:has(.inline-related),
fieldset:has(.inline-group),
fieldset:has(.inline-related) {
    grid-column: 1 / -1 !important;
}

/* ========================================================================
   ADMIN DETAIL VIEW - SUBMIT ROW
   ======================================================================== */

.submit-row .closelink,
.submit-row a.closelink {
  display: none !important;
}

.submit-row .form-group:has(a[href*="changelist"]),
.form-group:has(> a.btn[href*="changelist"]) {
  display: none !important;
}

.submit-row a.btn[href*="changelist"] {
  display: none !important;
}

.submit-row .btn-warning {
  margin-top: 15px !important;
}

.submit-row a.closelink {
  background: var(--swyft-info) !important;
  border-color: var(--swyft-info) !important;
}

.submit-row a.closelink:hover,
.submit-row a.closelink:focus {
  background: var(--swyft-tertiary) !important;
  border-color: var(--swyft-tertiary) !important;
}

.submit-row .btn-danger {
  background: var(--swyft-danger) !important;
  border-color: var(--swyft-danger) !important;
  color: var(--swyft-white) !important;
  margin-top: 10px !important;
}

.submit-row .btn-danger:hover,
.submit-row .btn-danger:focus {
  background: var(--swyft-danger) !important;
  border-color: var(--swyft-danger) !important;
  color: var(--swyft-white) !important;
}

.submit-row .btn-danger:active {
  background: var(--swyft-danger) !important;
}

/* ========================================================================
   CHANGELIST VIEWS
   ======================================================================== */

/* Fix oversized "Go" button in changelist actions */
.actions button[type="submit"],
.actions input[type="submit"],
.actions button[name="index"],
.actions .btn,
.actions .btn-primary,
.actions button.btn,
.actions button.btn-primary,
form .actions button,
form .actions button.btn-primary {
  width: auto !important;
  padding: 6px 14px !important;
  font-size: 0.875rem !important;
  height: auto !important;
  line-height: 1.4 !important;
  display: inline-block !important;
  border-radius: 4px !important;
  vertical-align: middle !important;
}

.changelist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.changelist-title {
  font-size: 1.75rem;
  font-weight: 600;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2.5rem;
}

.detail-title {
  font-size: 1.75rem;
  font-weight: 600;
}

.info-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  row-gap: 18px;
  column-gap: 40px;
}

.label {
  font-weight: 500;
  white-space: nowrap;
}

ul.fee-list {
  margin: 0;
  padding-left: 1.25rem;
}

ul.fee-list li {
  margin-bottom: 4px;
}

/* ========================================================================
   FILTER FORMS
   ======================================================================== */

.object-filter-form {
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: flex-end;
}

.object-filter-form label {
  font-size: 0.9rem;
}

.object-filter-form select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border: 1px solid var(--swyft-secondary);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease-in-out, box-shadow 0.2s;
}

.object-filter-form select:focus {
  outline: none;
  border-color: var(--swyft-secondary) !important;
  box-shadow: 0 0 0 2px rgba(25, 59, 59, 0.2);
}

.object-filter-form input,
.object-filter-form select {
  padding: 6px 10px;
  font-size: 0.9rem;
  width: 160px;
  color: var(--swyft-secondary);
}

.object-filter-form button,
.object-filter-form a.button {
  padding: 6px 12px;
  font-size: 0.9rem;
}

/* Spacing for form groups in filters */
.form-group-filter-spacing {
  margin-top: 1.6rem;
}

/* Button spacing in filters */
.btn-filter-spacing {
  margin-right: 5px;
  margin-left: 15px;
}

/* ========================================================================
   TOOLTIPS
   ======================================================================== */

.tooltip-container {
  position: relative;
  display: inline-block;
}

.tooltip-text {
  visibility: hidden;
  background-color: var(--swyft-secondary);
  color: var(--swyft-white);
  font-size: 0.85rem;
  text-align: left;
  border-radius: 6px;
  padding: 5px 8px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 0;
  opacity: 0;
  transition: opacity 0.3s;
  white-space: nowrap;
}

.tooltip-container:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* ========================================================================
   JOB RUN CHANGE FORM
   ======================================================================== */

.auto-refresh-notice {
  background: var(--swyft-info);
  border-left: 4px solid var(--swyft-lighter-primary);
  padding: 12px 16px;
  margin: 10px 0;
  border-radius: 4px;
  font-size: 14px;
  width: 100%;
}

.auto-refresh-notice strong {
  color: var(--swyft-lighter-primary);
}

/* Job log styles from admin.py */
.job-log-output {
  background: var(--swyft-white);
  padding: 10px;
  border-radius: 6px;
  max-width: 100%;
  overflow-x: auto;
}

.job-log-search-hidden {
  display: none;
}

/* ========================================================================
   JOB RUN LOGS - FIELD DISPLAY
   ======================================================================== */

/* Main wrapper */
.job-log-wrapper {
  background: var(--swyft-white);
  border: none;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  margin: 0;
  width: 100%;
  max-width: 100%;
}

/* Card body padding override for logs */
.card-body .job-log-wrapper {
  margin: 0;
}

/* Job run tabs styling */
#logs.tab-pane {
  padding: 0;
}

#logs .job-log-wrapper {
  margin-top: 0;
}

/* Ensure details tab has proper padding and uses full width */
#details.tab-pane {
  padding: 0;
}

#details.tab-pane .form-row,
#details.tab-pane .submit-row {
  max-width: none !important;
}

#details.tab-pane form {
  max-width: none !important;
}

.card-outline-tabs .card-body {
  max-width: 100% !important;
}

.card-outline-tabs #details {
  width: 100%;
  max-width: none !important;
}

/* Header section */
.job-log-header {
  background: var(--swyft-primary);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid var(--swyft-primary);
  width: 100%;
  box-sizing: border-box;
}

.job-log-title {
  color: var(--swyft-white);
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.job-log-actions {
  display: flex;
  gap: 8px;
}

/* Button styles */
.log-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.log-btn-primary {
  background: var(--swyft-primary);
  color: var(--swyft-white);
}

.log-btn-primary:hover {
  background: var(--swyft-secondary);
}

.log-btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: var(--swyft-white);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.log-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Search box */
.job-log-search {
  padding: 12px 20px;
  background: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.log-search-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  font-size: 14px;
}

.log-search-input:focus {
  outline: none;
  border-color: var(--swyft-tertiary);
}

/* Controls section */
.job-log-controls {
  padding: 16px 20px;
  background: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
}

.log-control-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.log-control-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--swyft-secondary);
  margin: 0;
}

/* Toggle switch */
.log-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  background: #ccc;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.3s;
}

.log-toggle.active {
  background: var(--swyft-primary);
}

.log-toggle-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: var(--swyft-white);
  border-radius: 50%;
  transition: transform 0.3s;
}

.log-toggle.active .log-toggle-slider {
  transform: translateX(20px);
}

/* Number input */
.log-input {
  width: 60px;
  padding: 6px 10px;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  font-size: 14px;
  text-align: center;
}

.log-input:focus {
  outline: none;
  border-color: var(--swyft-tertiary);
}

/* Log content wrapper with dark background */
.job-log-content-wrapper {
  background: #1e1e1e;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
}

.job-log-content {
  background: #1e1e1e;
  color: #d4d4d4;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.6;
  max-height: 600px;
  overflow: auto;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
}

/* Log lines */
.log-line {
  display: flex;
  padding: 6px 0;
  border-bottom: 1px solid #2d2d2d;
  transition: background 0.1s;
  width: 100%;
  box-sizing: border-box;
}

.log-line:hover {
  background: #2d2d2d;
}

.line-number {
  min-width: 60px;
  padding: 0 16px;
  text-align: right;
  color: #858585;
  user-select: none;
  border-right: 1px solid #2d2d2d;
  font-weight: 500;
}

.line-content {
  flex: 1;
  padding: 0 16px;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Log level colors */
.log-error {
  background: rgba(244, 67, 54, 0.1);
}

.log-error .line-content {
  color: #ff6b6b;
}

.log-warning {
  background: rgba(255, 152, 0, 0.1);
}

.log-warning .line-content {
  color: #ffa726;
}

.log-success {
  background: rgba(76, 175, 80, 0.1);
}

.log-success .line-content {
  color: #81c784;
}

.log-info .line-content {
  color: #64b5f6;
}

/* Empty state */
.job-log-empty {
  padding: 60px 20px;
  text-align: center;
  color: #858585;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
}

/* Footer */
.job-log-footer {
  padding: 12px 20px;
  background: #f8f9fa;
  border-top: 1px solid #e0e0e0;
  font-size: 13px;
  color: var(--swyft-secondary);
  width: 100%;
  box-sizing: border-box;
}

/* Scrollbar styling */
.job-log-content::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.job-log-content::-webkit-scrollbar-track {
  background: #2d2d2d;
}

.job-log-content::-webkit-scrollbar-thumb {
  background: #4a4a4a;
  border-radius: 5px;
}

.job-log-content::-webkit-scrollbar-thumb:hover {
  background: #5a5a5a;
}

/* Job run status badges from admin.py */
.status-badge-warning {
  background: var(--swyft-tertiary);
  color: var(--swyft-white);
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.status-badge-error {
  background: var(--swyft-danger);
  color: var(--swyft-white);
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.status-badge-success {
  background: var(--swyft-tertiary);
  color: var(--swyft-white);
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
}

/* Button for viewing job logs */
.view-logs-button {
  margin-right: 10px;
}

/* Kill job button styles from admin.py */
.kill-job-button {
  background: var(--swyft-danger);
  color: var(--swyft-white);
  border-color: var(--swyft-danger);
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.kill-job-button:hover {
  background: var(--swyft-danger);
  border-color: var(--swyft-danger);
}

.field-action_buttons .kill-job-button {
  border-radius: 4px;
}

#jazzy-actions > .kill-job-button {
    margin-top: 10px;
}

/* Object tools button spacing in admin detail pages */
#jazzy-actions > div.object-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

#jazzy-actions > div.object-tools > li,
#jazzy-actions > div.object-tools > a,
#jazzy-actions > div.object-tools > div {
    margin: 0;
}

/* ========================================================================
   MANAGE DASHBOARD METRICS PAGE
   ======================================================================== */

.metrics-container {
  max-width: 900px;
  margin: 20px auto;
  padding: 20px;
}

.metrics-header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--swyft-secondary);
}

.metrics-header h1 {
  margin: 0 0 10px 0;
  font-size: 28px;
  color: var(--swyft-primary);
}

.metrics-header p {
  color: var(--swyft-secondary);
  margin: 5px 0;
}

.metrics-section {
  margin-bottom: 30px;
  background: var(--swyft-white);
  border-radius: 8px;
  padding: 20px;
}

.metrics-section h2 {
  font-size: 20px;
  margin: 0 0 15px 0;
  color: var(--swyft-secondary);
}

.metric-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.metric-item {
  background: var(--swyft-white);
  border: 1px solid var(--swyft-secondary);
  border-radius: 4px;
  padding: 12px 15px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  cursor: move;
  transition: all 0.2s;
}

.metric-item:hover {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-color: var(--swyft-info);
}

.metric-item.dragging {
  opacity: 0.5;
}

.metric-checkbox {
  margin-right: 12px;
}

.metric-label {
  font-size: 15px;
  color: var(--swyft-primary);
}

.drag-handle {
  color: var(--swyft-secondary);
  margin-left: 10px;
  cursor: move;
}

.metric-order {
  background: var(--swyft-info);
  color: var(--swyft-white);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  margin-right: 10px;
}

.metrics-section .actions {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--swyft-secondary);
  display: flex;
  gap: 10px;
}

.metrics-section .actions button,
.metrics-section .actions a {
  flex: 1;
  text-align: center;
  padding: 10px 20px;
}

.metrics-empty-message {
  color: var(--swyft-secondary);
  padding: 20px;
  text-align: center;
}

.help-text {
  color: var(--swyft-secondary);
  font-size: 13px;
  margin-top: 10px;
  font-style: italic;
}

/* ========================================================================
   DASHBOARD INDEX - DATE FILTERS
   ======================================================================== */

.preset-date-ranges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.preset-btn {
  padding: 6px 14px;
  background: var(--swyft-white);
  color: var(--swyft-secondary);
  border: 1px solid var(--swyft-secondary);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.preset-btn:hover {
  background: var(--swyft-lighter-primary);
  color: var(--swyft-white);
  border-color: var(--swyft-lighter-primary);
}

.preset-btn:active {
  background: var(--swyft-secondary);
  border-color: var(--swyft-secondary);
}

.preset-btn.active {
  background: var(--swyft-lighter-primary);
  color: var(--swyft-white);
  border-color: var(--swyft-lighter-primary);
  font-weight: 600;
}

.preset-btn.active:hover {
  background: var(--swyft-secondary);
  border-color: var(--swyft-secondary);
}

.date-filter-container {
  background: var(--swyft-white);
  border: 1px solid var(--swyft-secondary);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
}

.date-filter-form-flex {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
}

.date-filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.date-filter-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--swyft-secondary);
}

.date-filter-group input[type="date"],
.date-filter-group select.user-selector {
  padding: 6px 10px;
  border: 1px solid var(--swyft-secondary);
  border-radius: 4px;
  font-size: 14px;
  min-width: 160px;
}

.date-filter-group select.user-selector {
  min-width: 200px;
  cursor: pointer;
}

.date-filter-actions {
  display: flex;
  gap: 8px;
}

.date-filter-btn {
  padding: 7px 16px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.date-filter-btn-primary {
  background: var(--swyft-primary);
  color: var(--swyft-white);
  border: none;
}

.date-filter-btn-primary:hover {
  background: var(--swyft-secondary);
}

.date-filter-btn-primary:active {
  background: var(--swyft-tertiary);
}

.date-filter-btn-secondary {
  background: var(--swyft-white);
  color: var(--swyft-secondary);
  border: 2px solid var(--swyft-secondary);
}

.date-filter-btn-secondary:hover {
  background: var(--swyft-secondary);
  color: var(--swyft-white);
}

/* ========================================================================
   DASHBOARD INDEX - METRIC FILTER DROPDOWN
   ======================================================================== */

.metric-filter-standalone {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 12px !important;
  margin-bottom: 12px !important;
  width: 100% !important;
}

.metric-filter-dropdown {
  position: relative;
  min-width: 250px;
}

.metric-filter-button {
  width: 100%;
  padding: 7px 12px;
  background: var(--swyft-white);
  border: 2px solid var(--swyft-secondary);
  border-radius: 4px;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--swyft-secondary);
  transition: background 0.2s, color 0.2s;
}

.metric-filter-button:hover {
  background: var(--swyft-secondary);
  color: var(--swyft-white);
}

.metric-filter-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: var(--swyft-white);
  border: 1px solid var(--swyft-secondary);
  border-radius: 4px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
}

.metric-filter-menu.show {
  display: block;
}

.metric-filter-item {
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.1s;
}

.metric-filter-item:hover {
  background: var(--swyft-white);
}

.metric-filter-item input[type="checkbox"] {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--swyft-secondary);
  border-radius: 3px;
  background-color: var(--swyft-white);
  position: relative;
  transition: all 0.2s ease;
}

.metric-filter-item input[type="checkbox"]:checked {
  background-color: var(--swyft-tertiary);
  border-color: transparent;
}

.metric-filter-item input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--swyft-white);
  font-size: 14px;
  font-weight: bold;
}

.metric-filter-item input[type="checkbox"]:hover {
  border-color: var(--swyft-tertiary);
}

.metric-filter-item label {
  cursor: pointer;
  flex-grow: 1;
  font-size: 14px;
}

/* ========================================================================
   DASHBOARD INDEX - EXPORT BUTTON
   ======================================================================== */

.export-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.export-btn {
  padding: 7px 16px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.export-btn-csv,
.export-csv-button {
  padding: 7px 12px;
  background: var(--swyft-white);
  border: 2px solid var(--swyft-secondary);
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  color: var(--swyft-secondary);
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.export-btn-csv:hover,
.export-csv-button:hover {
  background: var(--swyft-secondary);
  color: var(--swyft-white);
}

/* ========================================================================
   DASHBOARD INDEX - METRIC CARDS
   ======================================================================== */

/* Expand the admin content area to full width on the dashboard */
#content-related,
.content-related {
  display: none !important;
}

#content-main,
.content-main,
.colM,
.colMS {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
}

.content .container-fluid .row > [class^="col-"] {
  max-width: 100% !important;
}

.voila-admin-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 24px;
  margin-bottom: 16px;
  justify-items: stretch;
  align-items: stretch;
  width: 100%;
  height: auto;
  grid-auto-rows: minmax(auto, 240px);
  padding-bottom: 64px;
  align-content: start;
}

@media (min-width: 1025px) {
  .voila-admin-dashboard {
    grid-auto-rows: minmax(200px, 220px);
  }
}

@media (max-width: 640px) {
  .voila-admin-dashboard {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }
}

.metric-card-container {
  perspective: 1000px;
  width: 100%;
  height: 100%;
  min-height: 180px;
}

.metric-card {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  cursor: pointer;
}

.metric-card-container:hover .metric-card {
  transform: rotateY(180deg);
}

.metric-card-front,
.metric-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  background: var(--swyft-white);
  border: 1px solid rgba(48, 79, 79, 0.15);
  border-radius: 8px;
  padding: 16px 12px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.metric-card-front {
  gap: 6px;
}

.metric-card-back {
  transform: rotateY(180deg);
  padding: 20px;
  background: linear-gradient(135deg, var(--swyft-secondary) 0%, var(--swyft-primary) 100%);
  color: var(--swyft-white);
}

.metric-card-container.hidden {
  display: none;
}

.metric-value {
  font-weight: 700;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.2;
  color: var(--swyft-primary);
}

.metric-description {
  color: var(--swyft-white);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  overflow-y: auto;
  max-height: 100%;
  margin-bottom: 12px;
}

.metric-description-title {
  color: var(--swyft-white);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

.metric-view-data-link {
  margin-top: 8px;
  font-size: 13px;
  color: var(--swyft-white) !important;
  text-decoration: underline;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.metric-view-data-link:hover {
  color: var(--swyft-white) !important;
  text-decoration: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.metric-card-back-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

/* Trend indicators */
.metric-trend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  margin-top: 4px;
}

.metric-trend-up {
  color: var(--swyft-tertiary);
}

.metric-trend-down {
  color: var(--swyft-danger);
}

.metric-trend-neutral {
  color: var(--swyft-secondary);
}

.trend-arrow {
  font-size: 16px;
  line-height: 1;
}

.trend-percentage {
  line-height: 1;
}

/* Chart button */
.metric-chart-btn {
  margin-top: 12px;
  margin-bottom: 8px;
  padding: 8px 16px;
  background: var(--swyft-lighter-primary);
  color: var(--swyft-white);
  border: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.metric-chart-btn:hover {
  background: var(--swyft-secondary);
}

/* ========================================================================
   DASHBOARD INDEX - CHART MODAL
   ======================================================================== */

.chart-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  align-items: center;
  justify-content: center;
}

.chart-modal-content {
  background-color: var(--swyft-white);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow: auto;
}

.chart-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--swyft-secondary);
}

.chart-modal-header h3 {
  margin: 0;
  font-size: 18px;
  color: var(--swyft-primary);
}

.chart-modal-close {
  background: none;
  border: none;
  font-size: 28px;
  font-weight: 300;
  color: var(--swyft-secondary);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.chart-modal-close:hover {
  background: var(--swyft-white);
  color: var(--swyft-primary);
}

.chart-modal-body {
  padding: 20px;
}

/* Fee breakdown button */
.metric-breakdown-btn {
  margin-top: 12px;
  margin-bottom: 8px;
  padding: 8px 16px;
  background: var(--swyft-tertiary);
  color: var(--swyft-white);
  border: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.metric-breakdown-btn:hover {
  background: var(--swyft-secondary);
}

/* Fee breakdown modal content */
.breakdown-modal-content {
  max-width: 800px;
}

/* Fee breakdown table */
.breakdown-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0;
}

.breakdown-table thead {
  background: var(--swyft-primary);
}

.breakdown-table thead th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--swyft-white);
  border-bottom: 2px solid var(--swyft-secondary);
}

.breakdown-table tbody tr {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.breakdown-table tbody tr:hover {
  background: rgba(79, 98, 254, 0.05);
}

.breakdown-table td {
  padding: 12px 16px;
  color: var(--swyft-secondary);
}

.breakdown-table td:nth-child(2),
.breakdown-table td:nth-child(3),
.breakdown-table td:nth-child(4) {
  text-align: right;
}

.breakdown-table th:nth-child(2),
.breakdown-table th:nth-child(3),
.breakdown-table th:nth-child(4) {
  text-align: right;
}

.breakdown-total-row {
  background: var(--swyft-primary) !important;
}

.breakdown-total-row td {
  color: var(--swyft-white) !important;
  font-weight: 600;
  padding: 14px 16px;
}

/* Loading indicator */
.breakdown-loading {
  text-align: center;
  padding: 40px 20px;
  color: var(--swyft-secondary);
  font-size: 16px;
}

/* ========================================================================
   DASHBOARD INDEX - BANNERS
   ======================================================================== */

.view-as-banner {
  background: linear-gradient(135deg, var(--swyft-info) 0%, var(--swyft-tertiary) 100%);
  color: var(--swyft-white);
  padding: 12px 16px;
  margin-bottom: 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.view-as-banner strong {
  font-weight: 600;
}

.demo-banner {
  background: linear-gradient(135deg, var(--swyft-primary) 0%, var(--swyft-secondary) 100%);
  color: var(--swyft-white);
  padding: 12px 16px;
  margin-bottom: 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0 2px 8px rgba(25, 59, 59, 0.2);
}

.demo-banner strong {
  font-weight: 700;
}

/* ========================================================================
   RUN COMMANDS PAGE
   ======================================================================== */

#content h1 {
  margin-bottom: 30px;
}

#message-container {
  display: block;
  width: 100%;
  margin-bottom: 20px;
}

.section-header {
  font-size: 20px;
  font-weight: 600;
  color: var(--swyft-lighter-primary);
  margin-bottom: 20px;
  margin-top: 0;
}

.job-runner-section {
  margin-bottom: 50px;
  clear: both;
}

.job-form {
  background: var(--swyft-white);
  border: 1px solid var(--swyft-secondary);
  border-radius: 8px;
  padding: 40px;
  max-width: 900px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.job-form .form-row {
  display: flex;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.job-form .form-group {
  flex: 1;
  min-width: 320px;
  display: flex;
  flex-direction: column;
}

.job-form .form-group label {
  font-size: 15px;
  font-weight: 600;
  color: var(--swyft-secondary);
  margin-bottom: 10px;
}

.job-form .form-control {
  padding: 12px 14px;
  border: 1px solid var(--swyft-secondary);
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--swyft-primary);
  background-color: var(--swyft-white);
  min-height: 44px;
  transition: border-color 0.2s;
}

.job-form .form-control:focus {
  outline: none;
  border-color: var(--swyft-lighter-primary);
  box-shadow: 0 0 0 3px rgba(34, 84, 84, 0.1);
}

.job-form .run-button {
  background: var(--swyft-primary);
  color: var(--swyft-white);
  border: none;
  padding: 12px 32px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: background-color 0.2s;
  align-self: flex-start;
}

.job-form .run-button:hover {
  background: var(--swyft-secondary);
}

.brand-link {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}

.brand-link .brand-image {
  float: none !important;
  margin: 0 auto !important;
}

.job-form .run-button:active {
  background: var(--swyft-tertiary);
}

.job-form .run-button:disabled {
  background: var(--swyft-secondary);
  cursor: not-allowed;
}

.recent-jobs {
  background: var(--swyft-white);
  border: 1px solid var(--swyft-secondary);
  border-radius: 8px;
  padding: 20px;
}

.recent-jobs h2 {
  margin-top: 0;
  margin-bottom: 20px;
  color: var(--swyft-lighter-primary);
  font-size: 20px;
  font-weight: 600;
}

.job-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.job-list li {
  padding: 16px;
  border-bottom: 1px solid var(--swyft-secondary);
  font-size: 14px;
  line-height: 1.8;
}

.job-list li:last-child {
  border-bottom: none;
}

.job-list li strong {
  color: var(--swyft-lighter-primary);
}

.job-list li a {
  color: var(--swyft-tertiary);
  text-decoration: none;
}

.job-list li a:hover {
  color: var(--swyft-info);
  text-decoration: underline;
}

.status-running {
  color: var(--swyft-tertiary);
  font-weight: 500;
}

/* ========================================================================
   MESSAGES
   ======================================================================== */

.messages {
  margin: 20px auto;
  max-width: 900px;
}

.messages .success,
.message.success {
  background: var(--swyft-tertiary);
  color: var(--swyft-white);
  padding: 12px 15px;
  border-radius: 4px;
  border: 1px solid var(--swyft-tertiary);
}

.message {
  padding: 15px 20px;
  margin-bottom: 20px;
  border-radius: 8px;
  font-size: 14px;
}

.message.error {
  background-color: var(--swyft-danger);
  border: 1px solid var(--swyft-danger);
  color: var(--swyft-white);
}

/* ========================================================================
   EMAIL TEMPLATES
   ======================================================================== */

.email-body {
  font-family: Arial, sans-serif;
  color: var(--swyft-info);
}

.email-body h2 {
  color: var(--swyft-info);
}

.email-body h3 {
  color: var(--swyft-info);
  margin-top: 30px;
}

.email-body .indent {
  margin-left: 20px;
}

.email-body ul {
  list-style-type: disc;
  padding-left: 20px;
  margin-top: 10px;
  margin-bottom: 20px;
}

.email-body li {
  margin-bottom: 5px;
}

.email-body table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.email-body th,
.email-body td {
  border: 1px solid var(--swyft-secondary);
  padding: 8px;
  text-align: left;
}

.email-body th {
  background-color: var(--swyft-info);
  color: var(--swyft-white);
}

.email-body hr.solid {
  border-top: 1px solid var(--swyft-info);
}

/* ========================================================================
   ERROR PAGES
   ======================================================================== */

.error-page-body {
  background-color: var(--swyft-white);
  font-family: "Segoe UI", sans-serif;
  color: var(--swyft-primary);
}

.error-page-body h1 {
  font-size: 2rem;
  margin-top: 2rem;
}

.error-page-body p {
  font-size: 1.1rem;
  margin-top: 1rem;
}

/* ========================================================================
   USER MENU - HIDE JAZZMIN'S BUILT-IN LINKS (keep custom ones from usermenu_links)
   ======================================================================== */

/*
 * Jazzmin adds built-in "Change password" (anchor) and "Log out" (form with button).
 * We have custom links with icons in usermenu_links (settings.py).
 * Hide Jazzmin's built-in links and their preceding dividers.
 */

/* Hide the built-in Change password link */
#jazzy-usermenu > a[href*="password_change"] {
  display: none !important;
}

/* Hide the built-in Log out form (it's a form, not an anchor) */
#jazzy-usermenu > form#logout-form {
  display: none !important;
}

/* Hide the dividers associated with the hidden items */
#jazzy-usermenu > a[href*="password_change"] + div.dropdown-divider,
#jazzy-usermenu > form#logout-form + div.dropdown-divider {
  display: none !important;
}

/* ========================================================================
   UTILITY CLASSES
   ======================================================================== */

body > div.wrapper > footer > div.float-right.d-none.d-sm-inline {
  display: none !important;
}

/* Hide Jazzmin danger button in actions */
#jazzy-actions > div > div.form-group > a.btn.btn-danger.form-control.active {
  display: none !important;
}

/* ========================================================================
   DRAG AND DROP STYLES (for JavaScript manipulation)
   ======================================================================== */

.metric-item-drag-border-top {
  border-top: 2px solid var(--swyft-info);
}

/* ========================================================================
   PRINT STYLES
   ======================================================================== */

@media print {
  .metric-filter-standalone,
  .preset-date-ranges,
  .date-filter-container,
  .export-actions,
  .chart-modal,
  .metric-chart-btn,
  .metric-view-data-link,
  .date-filter-actions,
  .demo-banner,
  .view-as-banner,
  #header,
  .breadcrumbs,
  nav,
  .sidebar,
  button {
    display: none !important;
  }

  body {
    margin: 0;
    padding: 20px;
    background: var(--swyft-white);
  }

  #content {
    margin: 0;
    padding: 0;
  }

  .voila-admin-dashboard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    page-break-inside: avoid;
  }

  .metric-card-container {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .metric-card {
    transform: none !important;
    height: auto;
  }

  .metric-card-front {
    display: block !important;
    position: static;
    background: var(--swyft-white);
    border: 2px solid var(--swyft-primary);
    padding: 15px;
    min-height: 100px;
  }

  .metric-card-back {
    display: none !important;
  }

  .metric-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--swyft-primary);
    margin-bottom: 8px;
  }

  .metric-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--swyft-primary);
  }

  .metric-trend {
    font-size: 11px;
    margin-top: 4px;
  }

  @page {
    margin: 1cm;
  }

  .voila-admin-dashboard::before {
    content: "Dashboard Metrics Report";
    display: block;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--swyft-primary);
  }
}

/* ========================================================================
   COI REQUEST MODAL
   ======================================================================== */

.detail-header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-container {
  background: var(--swyft-white);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--swyft-secondary);
  background: var(--swyft-primary);
  border-radius: 8px 8px 0 0;
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  color: var(--swyft-white);
  border-bottom: none;
  padding-bottom: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  font-weight: 300;
  color: var(--swyft-white);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-body {
  padding: 20px;
}

.modal-body p {
  margin-bottom: 16px;
  color: var(--swyft-secondary);
}

.modal-body label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--swyft-secondary);
}

.coi-textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--swyft-secondary);
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  min-height: 100px;
  box-sizing: border-box;
}

.coi-textarea:focus {
  outline: none;
  border-color: var(--swyft-primary);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid #e0e0e0;
  background: #f8f9fa;
  border-radius: 0 0 8px 8px;
}

.modal-footer .btn {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
}

.modal-footer .btn-secondary {
  background: var(--swyft-white);
  border: 1px solid var(--swyft-secondary);
  color: var(--swyft-secondary);
}

.modal-footer .btn-secondary:hover {
  background: var(--swyft-secondary);
  color: var(--swyft-white);
}

.modal-footer .btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ========================================================================
   LINE OF INSURANCE - JSONFORM FIELD KEYS INPUT
   ======================================================================== */

.rjf-form-row-inner input[type=text] {
  min-width: 200px !important;
  width: 100%;
}

/* Django JSONForm container styling */
.django-jsonform-container {
  border-radius: 8px;
  padding: 16px;
  border: 1px solid rgba(19, 41, 76, 0.15);
}

/* Django JSONForm and inline admin "Add another" button styling */
.rjf-add-button,
.django-jsonform-container a.btn-default,
.django-jsonform-container a.btn.btn-default,
.inline-group a.btn-default,
.inline-related a.btn-default,
a.btn-default[href="#"],
a.btn.btn-sm.btn-default {
  background-color: var(--swyft-primary) !important;
  border-color: var(--swyft-primary) !important;
  color: var(--swyft-white) !important;
  border-radius: 5px !important;
}

a.btn-default[href="#"]:hover,
a.btn.btn-sm.btn-default:hover {
  background-color: var(--swyft-secondary) !important;
  border-color: var(--swyft-secondary) !important;
}

/* ========================================================================
   RESPONSIVE - MOBILE
   ======================================================================== */

@media (max-width: 768px) {
  .info-grid {
    grid-template-columns: 1fr;
  }

  .detail-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .detail-header-actions {
    flex-direction: column;
    width: 100%;
  }

  .detail-header-actions .btn {
    width: 100%;
    text-align: center;
  }

  .modal-container {
    width: 95%;
    margin: 10px;
  }
}

