/* ============================================================================
   SITE HELPDESK THEME — admin area + staff login
   Injected by the shd_theme module. Deactivate the module to revert instantly.

   Adapted to Perfex's Bootstrap 3 + Tailwind hybrid markup:
     - cards are .panel_s (not .panel)              - top bar is #header
     - sidebar is <aside id="menu" class="sidebar">  - items use .menu-icon / .menu-text
   Some rules use !important to beat Tailwind utility classes already in markup.

   HOUSE RULE: nothing in this file may be specific to one deployment.
   No company names, no hidden widgets, no integration-specific selectors.
   Everything a deployment might vary lives in the token block below.
   ============================================================================ */


/* ============================================================================
   0. BRAND TOKENS  —  THE ONLY BLOCK YOU EDIT TO REBRAND
   ============================================================================
   Swap the --brand-* ramp for the deployment's palette and the whole theme
   follows. Keep the ramp ordered light -> dark; 500 is the true brand colour.

   >>> PLACEHOLDER PALETTE — replace with the real Site Helpdesk brand ramp. <<<

   If the brand colour is in the blue family it will read as the same thing as
   the semantic "info" state. Shift --info-* below (teal or violet both work)
   so the two stay tellable apart.
   ============================================================================ */
:root {
  /* --- brand ramp ------------------------------------------------------- */
  --brand-50:  #EEF2FF;   /* tinted row/hover backgrounds, soft badges       */
  --brand-100: #E0E7FF;   /* avatar fill                                     */
  --brand-200: #C7D2FE;
  --brand-300: #A5B4FC;
  --brand-400: #818CF8;   /* focus ring                                      */
  --brand-500: #4F46E5;   /* THE brand colour — buttons, active nav, links   */
  --brand-600: #4338CA;   /* hover / pressed                                 */
  --brand-700: #3730A3;   /* text on soft brand fills                        */
  --brand-800: #312E81;
  --brand-900: #1E1B4B;

  /* --- neutrals --------------------------------------------------------- */
  --gray-50:  #F9FAFB;  --gray-100: #F3F4F6;  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;  --gray-400: #9CA3AF;  --gray-500: #6B7280;
  --gray-600: #4B5563;  --gray-700: #374151;  --gray-800: #1F2937;
  --gray-900: #111827;

  /* --- surfaces --------------------------------------------------------- */
  --app-bg:      #F7F8FA;   /* page canvas — intentionally not pure white    */
  --card-bg:     #FFFFFF;
  --card-border: #E5E7EB;   /* hairline card border                          */

  /* --- semantic states -------------------------------------------------- */
  --success-bg: #DCFCE7; --success-fg: #15803D; --success-solid: #22C55E;
  --danger-bg:  #FEE2E2; --danger-fg:  #DC2626; --danger-solid:  #EF4444;
  --warning-bg: #FEF3C7; --warning-fg: #B45309; --warning-solid: #F59E0B;
  --info-bg:    #DBEAFE; --info-fg:    #1D4ED8; --info-solid:    #3B82F6;
  --neutral-bg: #F3F4F6; --neutral-fg: #4B5563;

  /* --- type ------------------------------------------------------------- */
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto,
               'Helvetica Neue', Arial, sans-serif;

  /* --- shape + elevation ------------------------------------------------ */
  --radius-lg: 8px; --radius-xl: 12px; --radius-2xl: 16px; --radius-pill: 9999px;
  --shadow-sm: 0 1px 2px 0 rgba(0,0,0,.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.10), 0 8px 10px -6px rgba(0,0,0,.10);
  --focus-ring: 0 0 0 2px var(--brand-400);
}


/* ============================================================================
   1. Base
   ============================================================================ */
body {
  background: var(--app-bg) !important;
  color: var(--gray-900);
  font-family: var(--font-sans) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1,h2,h3,h4,h5,h6,.btn,.form-control,input,select,textarea,button,
.panel-title,.table,label,a { font-family: inherit !important; }
h1,h2,h3 { font-weight: 700; color: var(--gray-900); line-height: 1.2; }
h4,h5,h6 { font-weight: 600; color: var(--gray-900); line-height: 1.3; }
a          { color: var(--brand-600); }
a:hover,
a:focus    { color: var(--brand-700); }
hr         { border-color: var(--gray-100); }
#wrapper .content { background: transparent; }

::-webkit-scrollbar        { width: 6px; height: 6px; }
::-webkit-scrollbar-track  { background: var(--gray-100); }
::-webkit-scrollbar-thumb  { background: var(--gray-300); border-radius: var(--radius-pill); }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }


/* ============================================================================
   2. Buttons
   ============================================================================ */
.btn {
  border-radius: var(--radius-lg);
  font-size: 14px; font-weight: 500; padding: 8px 16px;
  border: 1px solid transparent; transition: all .15s ease;
}
.btn:focus, .btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.btn[disabled], .btn.disabled  { opacity: .5; }

/* Perfex uses .btn-info as a de-facto primary in a lot of toolbars */
.btn-primary, .btn-info {
  background: var(--brand-500) !important;
  border-color: var(--brand-500) !important;
  color: #fff !important;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active,
.btn-info:hover,    .btn-info:focus,    .btn-info:active,    .btn-info.active {
  background: var(--brand-600) !important;
  border-color: var(--brand-600) !important;
  color: #fff !important;
}

.btn-default {
  background: #fff; color: var(--gray-700); border: 1px solid var(--gray-200);
}
.btn-default:hover, .btn-default:focus {
  background: var(--gray-50); color: var(--gray-900); border-color: var(--gray-200);
}

.btn-danger  { background: var(--danger-solid)  !important; border-color: var(--danger-solid)  !important; color:#fff !important; }
.btn-danger:hover, .btn-danger:focus, .btn-danger:active   { background:#DC2626 !important; border-color:#DC2626 !important; }
.btn-success { background: var(--success-solid) !important; border-color: var(--success-solid) !important; color:#fff !important; }
.btn-success:hover, .btn-success:focus, .btn-success:active { background:#16A34A !important; border-color:#16A34A !important; }
.btn-warning { background: var(--warning-solid) !important; border-color: var(--warning-solid) !important; color:#fff !important; }
.btn-warning:hover, .btn-warning:focus { background:#D97706 !important; border-color:#D97706 !important; }

.btn-link        { color: var(--brand-600); }
.btn-link:hover  { color: var(--brand-700); }


/* ============================================================================
   3. Forms
   ============================================================================ */
.form-control {
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  background: #fff; color: var(--gray-900);
  padding: 8px 12px; font-size: 14px; box-shadow: none; height: auto;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control::placeholder { color: var(--gray-400); }
.form-control:focus        { border-color: transparent; box-shadow: var(--focus-ring); outline: none; }
label, .control-label      { font-size: 14px; font-weight: 500; color: var(--gray-700); margin-bottom: 4px; }
.help-block                { color: var(--gray-400); font-size: 12px; }
.form-group                { margin-bottom: 16px; }
.input-group-addon {
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); color: var(--gray-500);
}

/* select2 — Perfex uses it for nearly every picker */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
  border-radius: var(--radius-lg) !important;
  border: 1px solid var(--gray-200) !important;
  min-height: 38px;
}
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple {
  border-color: transparent !important; box-shadow: var(--focus-ring);
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background: var(--brand-500) !important;
}
.select2-dropdown { border-color: var(--gray-200); border-radius: var(--radius-lg); }


/* ============================================================================
   4. Cards / panels   (Perfex's card is .panel_s)
   ============================================================================ */
.panel_s, .panel, .widget, .tile, .well {
  background: var(--card-bg) !important;
  border-radius: var(--radius-xl) !important;
  border: 1px solid var(--card-border) !important;
  box-shadow: var(--shadow-sm) !important;
}
.panel-heading {
  background: #fff; border-bottom: 1px solid var(--gray-100);
  border-top-left-radius: var(--radius-xl); border-top-right-radius: var(--radius-xl);
  padding: 16px 20px;
}
.panel-title  { font-size: 16px; font-weight: 600; color: var(--gray-900); }
.panel-body   { padding: 20px; }
.panel-footer {
  background: #fff; border-top: 1px solid var(--gray-100);
  border-bottom-left-radius: var(--radius-xl); border-bottom-right-radius: var(--radius-xl);
}
.panel-default > .panel-heading { background: #fff; color: var(--gray-900); }


/* ============================================================================
   5. Badges / labels — one consistent soft-pill language
   Bootstrap's saturated label colours are replaced with soft tint + strong text.
   ============================================================================ */
.label, .badge {
  display: inline-flex; align-items: center; gap: 5px;
  border-radius: var(--radius-pill); padding: 3px 10px;
  font-size: 12px; font-weight: 500; line-height: 1.4; letter-spacing: .01em;
}
.badge { background: var(--neutral-bg); color: var(--neutral-fg); }
.table .label, .table .badge { font-size: 11px; }

.label-success, .badge-success, .label.bg-success, .badge.bg-success { background: var(--success-bg) !important; color: var(--success-fg) !important; }
.label-danger,  .badge-danger,  .label.bg-danger,  .badge.bg-danger  { background: var(--danger-bg)  !important; color: var(--danger-fg)  !important; }
.label-warning, .badge-warning, .label.bg-warning, .badge.bg-warning { background: var(--warning-bg) !important; color: var(--warning-fg) !important; }
.label-info,    .badge-info,    .label.bg-info,    .badge.bg-info    { background: var(--info-bg)    !important; color: var(--info-fg)    !important; }
.label-primary, .badge-primary, .label.bg-primary, .badge.bg-primary { background: var(--brand-50)   !important; color: var(--brand-700)  !important; }
.label-default, .badge-default, .label.bg-default, .badge.bg-default { background: var(--neutral-bg) !important; color: var(--neutral-fg) !important; }

/* Reusable soft pills for markup you control (module views, custom columns) */
.shd-pill { display:inline-flex; align-items:center; border-radius: var(--radius-pill); padding:3px 10px; font-size:12px; font-weight:500; }
.shd-pill--neutral { background: var(--neutral-bg); color: var(--neutral-fg); }
.shd-pill--brand   { background: var(--brand-50);   color: var(--brand-700);  }
.shd-pill--info    { background: var(--info-bg);    color: var(--info-fg);    }
.shd-pill--warning { background: var(--warning-bg); color: var(--warning-fg); }
.shd-pill--danger  { background: var(--danger-bg);  color: var(--danger-fg);  }
.shd-pill--success { background: var(--success-bg); color: var(--success-fg); }


/* ============================================================================
   6. Tables
   ============================================================================ */
.table { color: var(--gray-700); font-size: 14px; }
.table > thead > tr > th {
  background: var(--gray-50); color: var(--gray-500);
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid var(--gray-200); border-top: none; padding: 10px 12px;
}
.table > tbody > tr > td { border-top: 1px solid var(--gray-100); padding: 12px; vertical-align: middle; }
.table-hover > tbody > tr:hover { background: var(--gray-50); }
.table-bordered,
.table-bordered > tbody > tr > td,
.table-bordered > thead > tr > th { border-color: var(--gray-100); }


/* ============================================================================
   7. Dropdowns / modals / tabs
   ============================================================================ */
.dropdown-menu {
  border-radius: var(--radius-2xl); border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-xl); padding: 6px;
}
.dropdown-menu > li > a {
  border-radius: var(--radius-lg); padding: 8px 12px; font-size: 14px; color: var(--gray-700);
}
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus { background: var(--gray-50); color: var(--gray-900); }
.dropdown-header {
  color: var(--gray-400); text-transform: uppercase;
  font-size: 10px; letter-spacing: .12em; font-weight: 600;
}

.modal-content { border-radius: var(--radius-2xl); border: none; box-shadow: var(--shadow-xl); }
.modal-header  { border-bottom: 1px solid var(--gray-100); padding: 16px 20px; }
.modal-title   { font-size: 18px; font-weight: 600; color: var(--gray-900); }
.modal-body    { padding: 20px; font-size: 14px; color: var(--gray-700); }
.modal-footer  { border-top: 1px solid var(--gray-100); }
.modal-backdrop.in { opacity: .4; background: var(--gray-900); }

.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
  color: var(--brand-600); border-bottom: 2px solid var(--brand-500);
}
.nav-pills > li.active > a,
.nav-pills > li.active > a:hover,
.nav-pills > li.active > a:focus {
  background: var(--brand-500); border-radius: var(--radius-lg);
}
.progress-bar          { background: var(--brand-500); }
a.text-info, .text-info { color: var(--brand-600) !important; }


/* ============================================================================
   8. Navigation — top bar + BOTH menus
   The main sidebar (#side-menu) and the slide-out Setup drawer (#setup-menu)
   share identical markup:
     metis-menu > li.menu-item-x > a( i.menu-icon + span.menu-text + span.arrow )
     children:   ul.nav-second-level > li.sub-menu-item-x > a( span.sub-menu-text )

   NOTE: this is the most version-fragile section in the file. Verify visually
   against each new Perfex release before shipping an upgrade.
   ============================================================================ */

/* -- Top bar -- */
#header {
  background: #fff !important;
  border-bottom: 1px solid var(--gray-100) !important;
  box-shadow: var(--shadow-sm);
}
#header .navbar-nav > li > a,
#header .dropdown > a        { color: var(--gray-600); }
#header .navbar-nav > li > a:hover,
#header .dropdown > a:hover  { color: var(--gray-900); }
#header .label-danger,
#header .notification-count  { background: var(--danger-solid) !important; color: #fff; }

/* -- Both menu shells: light surface -- */
aside#menu.sidebar, #menu.sidebar,
#setup-menu-wrapper.sidebar, #setup-menu-wrapper {
  background: #fff !important; border-right: 1px solid var(--gray-100) !important;
}
aside#menu .slimScrollDiv, aside#menu .slimscroll,
#setup-menu-wrapper .slimScrollDiv, #setup-menu-wrapper .slimscroll { background: #fff !important; }
#menu #logo, #menu #companyname { color: var(--gray-900) !important; background: #fff !important; }

/* Setup drawer header (close X + heading) */
#setup-menu .customizer-heading { color: var(--gray-900) !important; font-weight: 600; }
#setup-menu .close-customizer,
#setup-menu .close-customizer i { color: var(--gray-400) !important; }
#setup-menu .close-customizer:hover,
#setup-menu .close-customizer:hover i { color: var(--gray-700) !important; }

/* -- Top-level items -- */
#side-menu, #setup-menu { padding: 8px !important; }
#side-menu > li > a, #setup-menu > li > a {
  color: var(--gray-600) !important;
  font-size: 14px !important; font-weight: 500 !important;
  border-radius: var(--radius-lg) !important;
  padding: 10px 12px !important; margin: 2px 6px !important;
  border-left: none !important; transition: all .15s ease;
  display: flex; align-items: center; background: transparent;
}
#side-menu > li > a .menu-icon, #side-menu > li > a > i,
#setup-menu > li > a .menu-icon, #setup-menu > li > a > i { color: var(--gray-400) !important; }
#side-menu > li > a .menu-text, #setup-menu > li > a .menu-text { color: inherit !important; flex: 1; }
#side-menu > li > a .arrow,     #setup-menu > li > a .arrow     { color: var(--gray-400) !important; }
#side-menu > li > a:hover,      #setup-menu > li > a:hover {
  background: var(--gray-50) !important; color: var(--gray-900) !important;
}
#side-menu > li > a:hover .menu-icon,
#setup-menu > li > a:hover .menu-icon { color: var(--gray-600) !important; }

/* active / open top-level -> soft brand pill (metisMenu puts .active on the li) */
#side-menu > li.active > a,        #setup-menu > li.active > a,
#side-menu > li.active > a:focus,  #setup-menu > li.active > a:focus,
#side-menu > li.active > a:hover,  #setup-menu > li.active > a:hover {
  background: var(--brand-50) !important; color: var(--brand-700) !important; border-left: none !important;
}
#side-menu > li.active > a .menu-icon, #side-menu > li.active > a > i,
#setup-menu > li.active > a .menu-icon, #setup-menu > li.active > a > i,
#side-menu > li.active > a .arrow,      #setup-menu > li.active > a .arrow {
  color: var(--brand-500) !important;
}

/* -- Submenus — indented list with a guide rail -- */
#side-menu .nav-second-level, #setup-menu .nav-second-level {
  background: transparent !important;
  margin: 2px 6px 4px 30px !important; padding: 2px 0 !important;
  border-left: 2px solid var(--gray-100) !important; border-radius: 0 !important;
}
#side-menu .nav-second-level > li > a, #setup-menu .nav-second-level > li > a {
  color: var(--gray-500) !important; font-size: 13px !important; font-weight: 500 !important;
  border-radius: var(--radius-lg) !important; padding: 8px 12px !important; margin: 1px 4px !important;
  background: transparent !important; display: flex; align-items: center;
}
#side-menu .nav-second-level .sub-menu-text, #setup-menu .nav-second-level .sub-menu-text,
#side-menu .nav-second-level .menu-icon,     #setup-menu .nav-second-level .menu-icon { color: inherit !important; }
#side-menu .nav-second-level > li > a:hover, #setup-menu .nav-second-level > li > a:hover {
  background: var(--gray-50) !important; color: var(--gray-800) !important;
}
#side-menu .nav-second-level > li.active > a, #setup-menu .nav-second-level > li.active > a,
#side-menu .nav-second-level > li > a.active, #setup-menu .nav-second-level > li > a.active {
  background: var(--brand-50) !important; color: var(--brand-700) !important; font-weight: 600 !important;
}

#side-menu .badge, #setup-menu .badge {
  border-radius: var(--radius-pill) !important; font-weight: 600; padding: 2px 8px;
}


/* ============================================================================
   9. Dashboard — widgets + KPI tiles
   Styling only. Which widgets appear is a per-deployment decision made in the
   dashboard's own Customize panel, never hardcoded here.
   ============================================================================ */
.widget          { padding: 0; overflow: visible; }
.widget-dragger  { cursor: move; opacity: 0; transition: opacity .15s ease; }
.widget:hover .widget-dragger { opacity: .4; }

.top_stats_wrapper {
  background: var(--card-bg) !important;
  border: 1px solid var(--card-border) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-sm) !important;
  padding: 18px 20px !important;
  transition: box-shadow .15s ease, transform .15s ease;
  height: 100%;
}
.top_stats_wrapper:hover { box-shadow: var(--shadow-xl) !important; transform: translateY(-1px); }

/* the tile icon -> rounded colour chip */
.top_stats_wrapper svg {
  width: 40px !important; height: 40px !important; padding: 8px;
  border-radius: var(--radius-lg); box-sizing: border-box;
  margin-right: 12px !important; flex-shrink: 0;
  background: var(--gray-100); color: var(--gray-500) !important;   /* default */
}
.top_stats_wrapper .tw-font-semibold { font-size: 20px !important; color: var(--gray-900) !important; }
.top_stats_wrapper .tw-font-medium   { color: var(--gray-500) !important; font-weight: 500 !important; }

/* per-metric colour coding — each tile carries its own wrapper class */
.quick-stats-invoices .top_stats_wrapper svg { background: var(--brand-50);   color: var(--brand-600) !important; }
.quick-stats-leads    .top_stats_wrapper svg { background: var(--success-bg); color: var(--success-fg) !important; }
.quick-stats-projects .top_stats_wrapper svg { background: var(--info-bg);    color: var(--info-fg)    !important; }
.quick-stats-tasks    .top_stats_wrapper svg { background: var(--warning-bg); color: var(--warning-fg) !important; }

.progress-bar-mini {
  height: 6px !important; border-radius: var(--radius-pill) !important;
  background: var(--gray-100) !important; overflow: hidden;
}
.progress-bar-mini .progress-bar { border-radius: var(--radius-pill) !important; }
.quick-stats-invoices .progress-bar { background: var(--brand-500) !important; }

.widget .panel_s .panel-heading, .widget .panel-heading { font-weight: 600; }
.widget h4.no-margin, .widget .widget-title { font-size: 15px; font-weight: 600; color: var(--gray-900); }
.widget canvas { max-width: 100%; }

#dashboard-customization-btn, .customize-dashboard { border-radius: var(--radius-lg) !important; }


/* ============================================================================
   10. DataTables — toolbar, search, pagination, bulk actions
   Row styling itself lives in §6.
   ============================================================================ */
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  border-radius: var(--radius-lg) !important;
  border: 1px solid var(--gray-200) !important;
  height: 36px; padding: 6px 12px; font-size: 14px; box-shadow: none; background: #fff;
}
.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus {
  border-color: transparent !important; box-shadow: var(--focus-ring) !important; outline: none;
}
.dataTables_wrapper .dataTables_info { color: var(--gray-500); font-size: 13px; }

.dt-buttons .btn, .table-btn, .bulk-actions-btn {
  border-radius: var(--radius-lg) !important; font-size: 13px; font-weight: 500;
}
.dt-buttons .btn        { background: #fff; border: 1px solid var(--gray-200); color: var(--gray-700); }
.dt-buttons .btn:hover  { background: var(--gray-50); color: var(--gray-900); }

.dataTables_paginate .paginate_button {
  border-radius: var(--radius-lg) !important; margin: 0 2px !important; padding: 5px 11px !important;
  border: 1px solid transparent !important; color: var(--gray-600) !important; background: transparent !important;
}
.dataTables_paginate .paginate_button:hover {
  background: var(--gray-100) !important; color: var(--gray-900) !important; border-color: transparent !important;
}
.dataTables_paginate .paginate_button.current,
.dataTables_paginate .paginate_button.current:hover {
  background: var(--brand-500) !important; color: #fff !important; border-color: var(--brand-500) !important;
}
.dataTables_paginate .paginate_button.disabled { opacity: .4; }


/* ============================================================================
   11. Switches, checkboxes, radios, fieldsets
   ============================================================================ */
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand-500); }

/* Perfex's on/off switch -> brand colour when ON (colour only, geometry intact) */
.onoffswitch-inner:before { background-color: var(--brand-500) !important; }
.onoffswitch-checkbox:checked + .onoffswitch-label,
.onoffswitch-checkbox:checked + .onoffswitch-label:before {
  background-color: var(--brand-500) !important; border-color: var(--brand-500) !important;
}

.checkbox label, .radio label, .checkbox-inline, .radio-inline { color: var(--gray-700); }
fieldset legend {
  font-size: 14px; font-weight: 600; color: var(--gray-800);
  border-bottom: 1px solid var(--gray-100); padding-bottom: 8px; margin-bottom: 14px;
}


/* ============================================================================
   12. TICKETS — the core surface of this product
   Three message types must be unmistakable at a glance:
       internal note  = amber  (never shown to the customer)
       customer reply = blue
       staff reply    = white / neutral
   Getting this wrong means a private note gets read as a reply, so the internal
   note carries the strongest visual treatment of the three.
   ============================================================================ */

/* internal notes */
.ticketstaffnotes > div {
  background: var(--warning-bg) !important;
  border: 1px solid #FDE68A !important;
  border-left: 4px solid var(--warning-solid) !important;   /* bold accent = "internal" */
  border-radius: var(--radius-lg) !important;
}
.ticketstaffnotes { border-radius: var(--radius-lg); }

/* customer reply */
.panel-body.client-reply {
  background: #EFF6FF !important;
  border: 1px solid #BFDBFE !important;
  border-left: 4px solid var(--info-solid) !important;
  border-radius: var(--radius-xl) !important;
}
.ticket-submitter-info.border-right { border-right: 1px solid var(--gray-100) !important; }

/* sender caption -> coloured tag */
.ticket-submitter-info p.text-muted {
  display: inline-block; border-radius: var(--radius-pill); padding: 2px 10px;
  font-size: 11px; font-weight: 600; letter-spacing: .02em; margin-top: 2px;
}
.panel-body:not(.client-reply) .ticket-submitter-info p.text-muted {   /* staff / opening message */
  background: var(--gray-100) !important; color: var(--gray-600) !important;
}
.panel-body.client-reply .ticket-submitter-info p.text-muted {         /* customer reply */
  background: var(--info-bg) !important; color: var(--info-fg) !important;
}

/* ticket meta sidebar + single-ticket header */
.ticket-info-tab .panel_s { box-shadow: none !important; }
#ticket-single .panel-heading, .ticket-single .panel-heading { padding: 16px 20px; }

/* Ticket status / priority colours.
   Perfex renders these with an inline background from tblticketstatus, so the
   pill SHAPE from §5 is what carries over — deliberately no colour override
   here, because those colours are configured per deployment in Setup.
   Only the neutral fallbacks are styled. */
.ticket-status-badge, .ticket-priority-badge {
  border-radius: var(--radius-pill); padding: 3px 10px; font-size: 12px; font-weight: 500;
}


/* ============================================================================
   13. Sticky horizontal scrollbar for wide tables  (paired with shd-theme.js)
   The floating bar is pinned to the viewport bottom and driven by the script.
   ============================================================================ */
.shd-hscroll {
  position: fixed; bottom: 0; left: 0; height: 16px;
  overflow-x: auto; overflow-y: hidden; z-index: 1035;
  background: rgba(255,255,255,.75);
  box-shadow: 0 -1px 4px rgba(0,0,0,.07);
}
.shd-hscroll-inner { height: 1px; }
.table-responsive  { padding-bottom: 1px; }


/* ============================================================================
   14. Staff login screen
   Hooked via app_admin_authentication_head, so it shares every token above.
   ============================================================================ */
.login-panel, #login .panel_s {
  border-radius: var(--radius-2xl) !important;
  box-shadow: var(--shadow-xl) !important;
  border: 1px solid var(--card-border) !important;
}
.login-panel .panel-body { padding: 28px; }


