/*
 * Mercyland readability layer for the whole agency workspace (CRM + insurance pages).
 * the base theme sets body text to thin (300) grey #526066 at 14px; staff asked for black, slightly larger text.
 * Loaded after the theme in layout/header.blade.php.
 */
body {
    color: #111 !important;
    font-weight: 400 !important;
    font-size: 15px;
}
body p, body td, body th, body li, body dd, body dt, body label, body span, body .card-body, body .form-control,
body .dropdown-item, body .modal-body, body .table { color: inherit; }
body .table td, body .table th { color: #111; font-size: 15px; }
body .table thead th { color: #111; font-weight: 600; }
body .form-control, body .custom-select, body .bootstrap-select .btn { color: #111 !important; font-size: 15px; font-weight: 400; }
body .form-control::placeholder { color: #6b7280; }
body label, body .control-label { color: #111; font-weight: 500; }
body .card-title, body h1, body h2, body h3, body h4, body h5, body h6 { color: #0b1220; font-weight: 500; }

/* "muted" text stays readable: dark grey, never faint */
body .text-muted, body small.text-muted, body .text-default { color: #374151 !important; }
body small, body .small { font-size: 13px; }

/* left menu */
#left-sidebar .sidebar-nav > ul > li > a, #left-sidebar .sidebar-nav ul li a, .left-sidebar .sidebar-nav ul li a { color: #111 !important; font-weight: 400; font-size: 15px; }
#left-sidebar .sidebar-nav ul li a.active, #left-sidebar .sidebar-nav ul li a:hover, .left-sidebar .sidebar-nav ul li.active > a { color: #15803d !important; }
#left-sidebar .sidebar-nav ul li a i, .left-sidebar .sidebar-nav ul li a i { color: #111; }

/* breadcrumbs */
.page-titles .breadcrumb .breadcrumb-item, .page-titles .breadcrumb .breadcrumb-item a { color: #1f2937; font-size: 14px; }
.page-titles .breadcrumb .breadcrumb-item.active { color: #000; font-weight: 600; }

/* insurance definition lists + timelines (were 11px pale grey) */
.ins-admin .ins-kv dt { color: #374151 !important; font-size: 12px !important; font-weight: 600 !important; }
.ins-admin .ins-kv dd { color: #111; font-size: 15px; }
.ins-admin .ins-timeline li { font-size: 14px !important; color: #111; }
.ins-admin .ins-timeline small, .ins-admin .ins-expected, .ins-admin .ins-tile .ins-who, .ins-admin .ins-msg small { color: #4b5563 !important; font-size: 12px !important; }

/*
 * Queue tabs / pills: never squeeze a label onto several lines.
 * Each tab stays on one line; the row scrolls sideways when it is wider than the screen.
 */
.ins-admin .ins-queue-nav, .ins-admin .ins-queue-tabs {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 6px;
}
.ins-admin .ins-queue-nav .nav-item, .ins-admin .ins-queue-tabs .nav-item { flex: 0 0 auto; }
.ins-admin .ins-queue-nav .nav-link, .ins-admin .ins-queue-tabs .nav-link {
    white-space: nowrap;
    font-size: 15px !important;
    padding: 8px 14px !important;
    color: #111;
}
.ins-admin .ins-queue-nav .nav-link.active, .ins-admin .ins-queue-tabs .nav-link.active { color: #fff; }
.ins-admin .ins-queue-tabs .nav-link.active { color: #000; font-weight: 600; }
.ins-admin .ins-queue-nav .badge { font-size: 12px; vertical-align: 1px; }

/* page action buttons in the heading wrap to the next line instead of overlapping */
.page-titles .list-page-actions-containers { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.page-titles .list-page-actions-containers form { margin: 0; }

/* small controls/buttons used across the insurance screens */
body .form-control-sm, body .custom-select-sm { font-size: 14px !important; height: auto; min-height: 34px; color: #111 !important; }
body .btn, body .btn-sm { font-size: 14px; font-weight: 500; }
body .label, body .badge { font-size: 12px; font-weight: 500; }

/* tables: headers never squeeze - wide tables scroll sideways inside their card */
.ins-admin .card-body { overflow-x: auto; }
.ins-admin .table th { white-space: nowrap; }
.ins-admin .table td { min-width: 120px; }
.ins-admin .table td:has(> input[type=checkbox]:only-child), .ins-admin .table td:has(> input[type=radio]:only-child), .ins-admin .table th:has(> input[type=checkbox]:only-child) { min-width: 0; width: 1%; }

/* status flags were 11px pale */
.ins-admin .ins-flag { font-size: 12px !important; font-weight: 500; padding: 2px 8px; }
.ins-admin .table td:empty, .ins-admin .table th:empty { min-width: 0; width: 1%; padding-left: 4px; padding-right: 4px; }
/* responsive tables grow to their content and scroll, instead of crushing columns */
.ins-admin .table-responsive > .table { width: max-content; min-width: 100%; }
.ins-admin .table-responsive > .table td { max-width: 320px; }

/*
 * Left menu: every entry stays on ONE line and fits the sidebar.
 * (the readable 15px text made long names such as "Signed forms & consents" break onto 2-3 lines)
 * the base theme's sidebar is 200px with a 50px list indent + 15px link indent, which cannot hold these names on one line.
 * Expanded sidebar (desktop): 250px wide, page moved to match, sub-items line up under their heading text.
 * Collapsed (icon) sidebar: hover fly-outs grow to fit their names.
 */
@media (min-width: 1024px) {
    body:not(.mini-sidebar):not(.settings) .left-sidebar { width: 250px; }
    body:not(.mini-sidebar):not(.settings) .page-wrapper { margin-left: 260px; }
    body:not(.mini-sidebar):not(.settings) .topbar .top-navbar .navbar-header { width: 250px; }
}
body:not(.mini-sidebar) .left-sidebar:not(.settings-menu) #sidebarnav a { white-space: nowrap !important; overflow: hidden; text-overflow: ellipsis; }
body:not(.mini-sidebar) .left-sidebar:not(.settings-menu) #sidebarnav a .hide-menu { white-space: nowrap !important; }
body:not(.mini-sidebar) .left-sidebar:not(.settings-menu) #sidebarnav > li > a { font-size: 14.5px !important; padding-right: 30px !important; }
body:not(.mini-sidebar) .left-sidebar:not(.settings-menu) #sidebarnav > li > a.has-arrow::after { right: 14px !important; }
body:not(.mini-sidebar) .left-sidebar:not(.settings-menu) #sidebarnav > li > ul { padding-left: 0 !important; }
body:not(.mini-sidebar) .left-sidebar:not(.settings-menu) #sidebarnav > li > ul > li > a { font-size: 14px !important; padding: 7px 12px 7px 57px !important; line-height: 1.35 !important; }
.mini-sidebar .left-sidebar #sidebarnav > li > ul { width: auto !important; min-width: 220px; }
.mini-sidebar .left-sidebar #sidebarnav > li > ul > li > a { white-space: nowrap !important; padding-right: 22px !important; }
.mini-sidebar .left-sidebar #sidebarnav > li.has-submenu:hover > a { width: auto !important; min-width: 295px; white-space: nowrap; }

/* header: "View website" button (the base theme's top bar is white) - outlined brand blue, centred with the icons */
#right-topnav-navbar > li.ml-view-site-item { display: flex; align-items: center; align-self: stretch; }
.topbar #right-topnav-navbar .ml-view-site { display: inline-flex !important; align-items: center; gap: 6px; font-size: 14px !important; font-weight: 500;
    color: #fff !important; background: #15803d; border: 1px solid #15803d; border-radius: 6px; padding: 7px 14px !important; margin: 0 10px 0 0 !important; font-weight: 600 !important;
    box-shadow: 0 1px 2px rgba(0,0,0,.12);
    line-height: 1.2 !important; height: auto !important; white-space: nowrap; }
.topbar #right-topnav-navbar .ml-view-site i { font-size: 15px; color: inherit; }
.topbar #right-topnav-navbar .ml-view-site:hover { background: #f28c28; border-color: #f28c28; color: #fff !important; }
@media (max-width: 767px) { .topbar #right-topnav-navbar .ml-view-site { padding: 6px 8px !important; } }

/* =====================================================================
 * Settings (/admin/settings): light, modern, grouped menu + clean content card
 * (sections, icons, search and accordion come from insurance/admin/partials/settings-menu-*)
 * ===================================================================== */
body.settings { background: #f4f6fa; }
body.settings .left-sidebar.settings-menu { background: #fff !important; width: 268px; border-right: 1px solid #e5e9f0; box-shadow: none; }
body.settings .left-sidebar.settings-menu .sidebar-nav { background: #fff !important; padding: 14px 12px 40px !important; }
@media (min-width: 1024px) { body.settings .page-wrapper { margin-left: 284px !important; } }
body.settings .settings-menu #sidebarnav > li > a { display: flex !important; align-items: center; gap: 10px; color: #1f2937 !important; font-size: 14.5px !important; font-weight: 500 !important;
    padding: 9px 30px 9px 10px !important; border-radius: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.settings .settings-menu #sidebarnav > li > a .hide-menu { color: inherit !important; }
body.settings .settings-menu #sidebarnav > li > a:hover { background: #f3f6fa; }
body.settings .settings-menu #sidebarnav > li.ml-open > a, body.settings .settings-menu #sidebarnav > li.active > a { background: #e8f6ee; color: #116632 !important; }
body.settings .settings-menu #sidebarnav > li > a.has-arrow::after { right: 12px !important; border-color: #9aa3b2 !important; }
body.settings .settings-menu .ml-set-ico { flex: 0 0 18px; font-size: 15px; color: #6b7280 !important; text-align: center; }
body.settings .settings-menu #sidebarnav > li.ml-open .ml-set-ico, body.settings .settings-menu #sidebarnav > li.active .ml-set-ico { color: #15803d !important; }
body.settings .settings-menu #sidebarnav > li > ul { padding: 2px 0 8px 38px !important; margin: 0; border-left: 2px solid #eef1f5; margin-left: 18px; }
body.settings .settings-menu #sidebarnav > li > ul > li > a { display: block; color: #374151 !important; font-size: 14px !important; padding: 6px 10px !important; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.settings .settings-menu #sidebarnav > li > ul > li > a:hover { background: #f3f6fa; color: #111 !important; }
body.settings .settings-menu #sidebarnav > li > ul > li > a.active, body.settings .settings-menu #sidebarnav > li > ul > li > a.ml-current {
    background: #fff4e8; color: #c2620a !important; font-weight: 600; box-shadow: inset 3px 0 0 #f28c28; }
body.settings .settings-menu .ml-set-head { list-style: none; font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: #9aa3b2; padding: 16px 10px 6px; }
body.settings .settings-menu .ml-set-search-li { list-style: none; padding: 0 0 6px; }
body.settings .settings-menu .ml-set-search { position: relative; }
body.settings .settings-menu .ml-set-search i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #9aa3b2; font-size: 13px; }
body.settings .settings-menu .ml-set-search input { width: 100%; height: 38px; border: 1px solid #dfe3ea; border-radius: 8px; padding: 0 10px 0 32px; font-size: 14px; background: #f8fafc; color: #111; }
body.settings .settings-menu .ml-set-search input:focus { outline: none; border-color: #15803d; background: #fff; box-shadow: 0 0 0 3px rgba(21,128,61,.12); }
body.settings .settings-menu .ml-set-ins > a { color: #0f5c2e !important; }
body.settings .settings-menu .exit-panel { border-bottom: 1px solid #eef1f5 !important; margin-bottom: 8px !important; }
body.settings .settings-menu .exit-panel a, body.settings .settings-menu .exit-panel i { color: #15803d !important; }

/* content */
body.settings .page-titles { margin-bottom: 8px; }
body.settings #embed-content-container { padding: 26px 30px !important; }
body.settings .card.min-h-300 { border: 1px solid #e5e9f0; border-radius: 12px; box-shadow: 0 4px 14px rgba(16,24,40,.04); }
body.settings #embed-content-container h3, body.settings #embed-content-container h4, body.settings #embed-content-container .card-title { font-weight: 600; color: #0b1220; }
body.settings #embed-content-container .form-group { margin-bottom: 18px; }
body.settings #embed-content-container .form-group > label, body.settings #embed-content-container .control-label { font-weight: 600; font-size: 14px; color: #1f2937; }
body.settings #embed-content-container .form-control { border-radius: 8px; border-color: #dfe3ea; min-height: 40px; }
body.settings #embed-content-container .form-control:focus { border-color: #15803d; box-shadow: 0 0 0 3px rgba(21,128,61,.12); }
body.settings #embed-content-container hr { border-color: #eef1f5; }
body.settings #embed-content-container .btn-info, body.settings #embed-content-container .btn-success { border-radius: 8px; padding: 8px 18px; }
body.settings #embed-content-container .nav-tabs { border-bottom: 2px solid #e5e9f0; }
body.settings #embed-content-container .nav-tabs .nav-link.active { border: 0; border-bottom: 2px solid #15803d; color: #15803d; margin-bottom: -2px; }
/* settings: top-left "Exit" box matches the light settings menu */
body.settings .topbar .navbar-header { background: #fff !important; width: 268px !important; border-right: 1px solid #e5e9f0; }
body.settings .topbar .navbar-header .exit-panel { border: 0 !important; margin: 0 !important; }
body.settings .topbar .navbar-header .exit-panel a { display: inline-flex !important; align-items: center; gap: 8px; color: #15803d !important; font-weight: 600; padding: 24px 18px !important; }
body.settings .topbar .navbar-header .exit-panel a:hover { color: #0f5c2e !important; }

/* admin page headings: Mercyland green, bold */
.page-titles h3.text-themecolor, .page-titles .text-themecolor { color: #15803d !important; font-weight: 700 !important; letter-spacing: -.01em; }

/* settings overview (pages/settings/sections/home) */
.ml-setov { padding: 4px 2px; }
.ml-setov-intro h4 { font-weight: 700; color: #0b1220; margin: 0 0 2px; }
.ml-setov-intro p { color: #4b5563; margin: 0 0 6px; }
.ml-setov-h { font-size: 12px !important; font-weight: 700 !important; letter-spacing: .08em; text-transform: uppercase; color: #6b7280 !important; margin: 22px 0 10px; }
.ml-setov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.ml-setov-card { display: flex; gap: 12px; align-items: flex-start; border: 1px solid #e5e9f0; border-radius: 12px; padding: 14px; background: #fff; color: #111 !important; transition: border-color .15s, box-shadow .15s, transform .15s; }
.ml-setov-card:hover { border-color: #15803d; box-shadow: 0 6px 16px rgba(16,24,40,.07); transform: translateY(-1px); text-decoration: none; }
.ml-setov-card strong { display: block; font-size: 15px; font-weight: 600; }
.ml-setov-card small { display: block; color: #4b5563 !important; font-size: 13px !important; margin-top: 2px; }
.ml-setov-ico { flex: 0 0 40px; height: 40px; border-radius: 10px; background: #e8f6ee; color: #15803d; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.ml-setov-ico.grey { background: #eef2f7; color: #1f4f8a; }
.ml-setov-version { margin: 24px 0 0; font-size: 13px; color: #6b7280; }

/* [MERCYLAND] no links back to the original vendor's documentation/help site */
.help-documentation, a[href*="growcrm.io"], a[href*="growcrm.co"] { display: none !important; }

/* header clock: agency time, next to search */
.topbar .ml-clock-item { display: flex; align-items: center; }
.topbar .ml-clock { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; color: #e0533d; font-size: 22px; font-weight: 500; letter-spacing: .5px; white-space: nowrap; cursor: default; }
.topbar .ml-clock i { font-size: 18px; }
.topbar .ml-clock small { font-size: 11px; color: #6b7280; font-weight: 600; letter-spacing: 0; }
@media (max-width: 991px) { .topbar .ml-clock-item { display: none; } }
.topbar .ml-clock #ml-clock-time, .topbar .ml-clock #ml-clock-ampm { display: inline !important; width: auto !important; position: static !important; color: inherit !important; opacity: 1 !important; }
.topbar .ml-clock #ml-clock-ampm { color: #6b7280 !important; }
.topbar .top-search-bar { min-width: 0; } .topbar .ml-clock-item { margin-left: 16px; }
.topbar .ml-clock { color: #e0533d !important; }
.topbar .ml-clock i { color: #e0533d !important; display: inline-block !important; }
.topbar .ml-clock b#ml-clock-time { display: inline !important; color: #e0533d !important; font-weight: 500; font-size: 22px; }

/* left menu: Grow's scroll plugin measures the menu once at page load, so opening a group (e.g. Settings) left the bottom unreachable.
   Native scrolling always follows the real height. (Collapsed / mini menu keeps Grow's behaviour - its fly-outs need overflow visible.) */
body:not(.mini-sidebar) .left-sidebar #main-scroll-sidebar { height: 100% !important; overflow-y: auto !important; overflow-x: hidden !important;
    overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: #c9d3cd transparent; padding-bottom: 32px; }
body:not(.mini-sidebar) .left-sidebar #main-scroll-sidebar > .ps__rail-y, body:not(.mini-sidebar) .left-sidebar #main-scroll-sidebar > .ps__rail-x,
body:not(.mini-sidebar) .left-sidebar #main-scroll-sidebar > .ps__scrollbar-y-rail, body:not(.mini-sidebar) .left-sidebar #main-scroll-sidebar > .ps__scrollbar-x-rail { display: none !important; }
body:not(.mini-sidebar) .left-sidebar #main-scroll-sidebar::-webkit-scrollbar { width: 6px; }
body:not(.mini-sidebar) .left-sidebar #main-scroll-sidebar::-webkit-scrollbar-thumb { background: #c9d3cd; border-radius: 3px; }
