/* TMVC blue/cyan theme. Bootstrap 5 overrides and responsive layout live here. */
:root {
    --bg-dark: #050B1A;
    --bg-card: #0A1530;
    --blue-deep: #0B3BD6;
    --blue-primary: #1E6BFF;
    --cyan-accent: #00B4FF;
    --cyan-light: #2FD3FF;
    --glow: #8FD8FF;
    --text-main: #FFFFFF;
    --text-muted: #C9D6EA;
    --silver: #B8BCC4;
    --accent: var(--blue-primary);
    --accent-deep: var(--blue-deep);
    --accent-soft: #edf4ff;
    --ink: #182742;
    --muted: #607089;
    --canvas: #ffffff;
    --line: #e2e9f3;
    --sidebar-width: 248px;
    --bs-body-font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    --bs-body-color: var(--ink);
    --bs-body-bg: var(--canvas);
    --bs-primary: var(--accent);
    --bs-primary-rgb: 30, 107, 255;
    --bs-link-color: var(--accent-deep);
    --bs-link-hover-color: #082b9e;
    --bs-border-color: var(--line);
    --bs-secondary-color: var(--muted);
}
body { font-size: .925rem; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; }
button, a, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #1E6BFF; outline-offset: 4px; }
.ui-icon { width: 22px; height: 22px; flex-shrink: 0; stroke: currentColor; stroke-width: 1.7; fill: none; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.btn { min-height: 44px; border-radius: 9px; font-size: .875rem; font-weight: 600; padding: .65rem 1.05rem; }
.btn-primary { --bs-btn-bg: var(--accent); --bs-btn-border-color: var(--accent); --bs-btn-hover-bg: var(--accent-deep); --bs-btn-hover-border-color: var(--accent-deep); --bs-btn-active-bg: #082b9e; --bs-btn-active-border-color: #082b9e; --bs-btn-disabled-bg: var(--accent); --bs-btn-disabled-border-color: var(--accent); --bs-btn-focus-shadow-rgb: 30,107,255; }
.btn .ui-icon { width: 18px; height: 18px; margin-right: 5px; }
.text-secondary { color: var(--muted) !important; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 2000; padding: 12px 18px; background: white; border: 2px solid var(--accent); border-radius: 8px; }
.skip-link:focus { top: 12px; }
.admin-sidebar { --bs-offcanvas-width: 280px; background: #fff !important; border-right: 1px solid var(--line); }
.sidebar-brand { height: 88px; padding: 22px 25px; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--accent-deep); font-size: 1.4rem; font-weight: 750; letter-spacing: -.8px; }
.brand-logo { display: block; width: 198px; height: auto; max-width: 100%; }
.service-row-actions { display: inline-flex; gap: 4px; }
.service-images-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 16px; }
.service-image-card { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #f5f8fd; }
.service-image-card img { display: block; width: 100%; height: 160px; object-fit: contain; }
.service-image-card span { display: block; padding: 10px 12px; color: var(--muted); font-size: .75rem; }
.auth-story .brand { max-width: 100%; }
.auth-story .brand-logo { width: 340px; }
.sidebar-body { display: flex !important; flex-direction: column; padding: 24px 17px 16px !important; }
.nav-caption { margin: 0 13px 18px; font-size: .65rem; font-weight: 700; letter-spacing: 1.3px; color: #83928b; }
.sidebar-nav { display: grid; gap: 8px; }
.sidebar-link { display: flex; align-items: center; gap: 13px; width: 100%; min-height: 48px; border: 0; border-radius: 9px; padding: 12px 14px; background: transparent; color: #56675f; font-size: .88rem; text-align: left; }
.sidebar-link:hover { background: #f2f7f4; color: var(--accent-deep); }
.sidebar-link.active { background: var(--accent-soft); color: var(--accent-deep); font-weight: 650; }
.nav-soon { margin-left: auto; font-size: .57rem; color: #697b72; background: #f4f6f4; border-radius: 4px; padding: 3px 5px; }
.sidebar-bottom { margin-top: auto; padding-top: 42px; }
.sidebar-note { margin: 0 5px 25px; padding: 19px 15px; background: #f3f8f5; border: 1px solid #e9f1eb; border-radius: 12px; }
.sidebar-note > .ui-icon { display: block; color: var(--accent); margin-bottom: 13px; }
.sidebar-note strong { display: block; font-size: .82rem; }
.sidebar-note p { color: var(--muted); font-size: .74rem; line-height: 1.7; margin: 7px 0 0; }
.sidebar-account { display: flex; gap: 11px; align-items: center; border-top: 1px solid var(--line); padding: 21px 6px 0; margin-top: 14px; }
.sidebar-account > div { min-width: 0; }
.sidebar-account strong { display: block; font-size: .75rem; overflow-wrap: anywhere; }
.sidebar-account small { display: block; color: var(--muted); font-size: .66rem; margin-top: 3px; }
.avatar { display: inline-flex; justify-content: center; align-items: center; width: 38px; height: 38px; border-radius: 50%; background: #e5f0ff; color: var(--blue-deep); font-weight: 650; font-size: .75rem; flex-shrink: 0; }
.avatar-small { width: 33px; height: 33px; font-size: .63rem; }
.admin-workspace { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { min-height: 88px; padding: 16px 36px; border-bottom: 1px solid var(--line); background: #fff; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.breadcrumb { font-size: .78rem; --bs-breadcrumb-divider-color: #8098bd; }
.breadcrumb-item:first-child { color: var(--accent-deep); }
.workspace-label { color: var(--muted); font-size: .73rem; display: inline-flex; align-items: center; gap: 8px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; flex-shrink: 0; }
.profile-toggle { display: flex; align-items: center; gap: 10px; padding: 0; border: none; }
.profile-name { font-size: .76rem; max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.dropdown-menu { --bs-dropdown-bg: white; --bs-dropdown-link-active-bg: var(--accent); border-radius: 12px; box-shadow: 0 12px 35px #050b1a14; padding: 8px; max-width: calc(100vw - 24px); }
.dropdown-item, .dropdown-item-text { white-space: normal; overflow-wrap: anywhere; }
.dropdown-item { min-height: 44px; border-radius: 6px; display: flex; align-items: center; }
.dashboard-content { padding: 35px 36px 25px; max-width: 1600px; width: 100%; margin: 0 auto; flex: 1; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.eyebrow { font-size: .64rem; letter-spacing: 1.7px; font-weight: 700; color: var(--accent-deep); margin-bottom: 9px; }
h1 { font-size: clamp(1.55rem, 2.2vw, 2rem); font-weight: 680; letter-spacing: -.8px; margin-bottom: 9px; }
.page-heading .text-secondary { font-size: .84rem; }
.demo-notice { display: flex; align-items: center; gap: 9px; color: #607089; font-size: .73rem; margin-bottom: 23px; }
.demo-notice .ui-icon { width: 16px; height: 16px; }
.demo-notice strong { font-weight: 600; }
.metric-card { background: white; border: 1px solid var(--line); border-radius: 13px; padding: 22px 19px 16px; height: 100%; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; box-shadow: 0 3px 5px #050b1a05; }
.metric-icon { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 13px; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }
.metric-icon.amber { background: #fff4df; color: #a56b0e; }
.metric-card h2 { font-size: .73rem; color: var(--muted); font-weight: 500; margin: 0 0 6px; }
.metric-value { font-size: clamp(1.35rem, 1.9vw, 1.8rem); font-weight: 700; letter-spacing: -.6px; color: var(--accent-deep); line-height: 1.1; margin: 0; }
.metric-detail { flex-basis: 100%; color: #607089; font-size: .65rem; border-top: 1px solid #edf1f7; padding-top: 12px; margin: 0; }
.dashboard-middle { margin-top: 0; margin-bottom: 24px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.chart-panel, .shortcuts-panel { height: 100%; padding: 23px; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 18px; }
.panel-heading h2 { font-size: 1rem; font-weight: 650; margin: 0; letter-spacing: -.2px; }
.panel-heading p { font-size: .73rem; color: var(--muted); margin: 7px 0 0; }
.period-label { padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; font-size: .67rem; white-space: nowrap; color: var(--muted); }
.chart-legend { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .63rem; margin-bottom: 8px; }
.activity-chart { display: block; width: 100%; height: auto; min-height: 185px; }
.chart-grid { stroke: #edf1f7; stroke-width: 1; }
.chart-label, .chart-month { fill: #607089; font-size: 11px; }
.chart-month { text-anchor: middle; }
.chart-area { fill: #e5f0ff; }
.chart-line { stroke: var(--accent); stroke-width: 2.5; fill: none; stroke-linejoin: round; }
.chart-point { fill: var(--accent); stroke: #fff; stroke-width: 1.5; }
.shortcut { display: flex; align-items: center; gap: 13px; width: 100%; padding: 13px 12px; margin-top: 12px; min-height: 66px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--ink); text-align: left; font-size: .79rem; transition: background .15s, border-color .15s; }
.shortcut:hover { background: #f4f8ff; border-color: #a8c7ff; }
.shortcut > .ui-icon { margin-left: auto; width: 16px; color: #7a8da8; }
.shortcut small { display: block; color: #607089; font-size: .62rem; margin-top: 4px; }
.shortcut-icon { padding: 8px; background: #edf4ff; color: var(--accent); border-radius: 8px; }
.activity-panel > .panel-heading { padding: 23px 23px 0; }
.soft-badge, .state-badge { display: inline-block; padding: 5px 9px; border-radius: 5px; font-size: .64rem; color: #247254; background: #eaf6ee; white-space: nowrap; }
.soft-badge { color: var(--muted); background: #f1f5fb; }
.state-pending { color: #936008; background: #fff4df; }
.activity-table { --bs-table-bg: white; font-size: .75rem; }
.activity-table th { background: #f7f9fd; color: var(--muted); font-size: .65rem; font-weight: 500; padding: 11px 23px; border-bottom-color: var(--line); }
.activity-table td { padding: 15px 23px; border-color: #edf1f7; }
.activity-table tr:last-child td { border-bottom: 0; }
.person { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.person strong { font-weight: 500; }
.activity-date { color: var(--muted); white-space: nowrap; font-size: .7rem; }
.activity-mobile { display: none; }
.workspace-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: #607089; font-size: .65rem; padding: 10px 36px 24px; }
.footer-dot { padding: 0 5px; }
.modal-content { background: white; border-radius: 16px; border: none; }
.modal-header, .modal-footer { padding: 18px 24px; }
.modal-body { padding: 24px; color: var(--muted); line-height: 1.7; }
.icon-button { padding: 8px; color: var(--ink); }
.icon-button .ui-icon { margin: 0; width: 22px; height: 22px; }

/* Authentication pages share the same theme and never embed CSS in views. */
.auth-page { min-height: 100vh; padding: 32px; display: flex; align-items: center; justify-content: center; }
.auth-layout { display: grid; grid-template-columns: 1fr 1fr; width: min(1080px, 100%); min-height: 680px; border-radius: 24px; background: #fff; border: 1px solid var(--line); box-shadow: 0 20px 70px #050b1a24; overflow: hidden; }
.auth-story { padding: 45px; background: var(--bg-dark); display: flex; flex-direction: column; position: relative; overflow: hidden; }
.auth-story h2 { max-width: 360px; font-size: clamp(2rem, 3vw, 2.9rem); font-weight: 650; letter-spacing: -1.6px; line-height: 1.2; margin: 62px 0 20px; }
.auth-story > p { max-width: 310px; color: var(--text-muted); line-height: 1.8; font-size: .9rem; }
.auth-illustration { border: 1px solid #20385a; border-radius: 13px; background: var(--bg-card); padding: 22px; margin: 28px 0; transform: rotate(-3deg); box-shadow: 0 10px 30px #00b4ff14; }
.illustration-title { display: flex; align-items: center; gap: 10px; color: var(--accent-deep); font-weight: 600; font-size: .83rem; }
.illustration-bars { height: 85px; display: flex; align-items: flex-end; gap: 14px; margin-top: 16px; }
.illustration-bars span { flex: 1; border-radius: 5px 5px 0 0; background: var(--cyan-accent); height: 42%; }
.illustration-bars span:nth-child(2) { height: 66%; }
.illustration-bars span:nth-child(3) { height: 52%; }
.illustration-bars span:nth-child(4) { height: 80%; }
.illustration-bars span:nth-child(5) { height: 100%; background: var(--accent); }
.illustration-bars span:nth-child(6) { height: 72%; }
.auth-story-footer { margin-top: auto; font-size: .7rem; color: var(--text-muted); display: flex; align-items: center; gap: 7px; }
.auth-content { display: flex; justify-content: center; flex-direction: column; padding: 50px; min-width: 0; }
.auth-content h1 { font-size: 1.9rem; }
.auth-intro { color: var(--muted); line-height: 1.7; margin: 0 0 30px; font-size: .84rem; }
.auth-content .form-label { font-size: .79rem; font-weight: 600; margin-bottom: 8px; }
.form-control { min-height: 48px; background-color: #fff; border-radius: 9px; font-size: .88rem; border-color: #d7e1ef; padding: 11px 14px; }
.form-control:focus { border-color: var(--blue-primary); box-shadow: 0 0 0 .2rem #1e6bff1a; }
.form-control::placeholder { color: #7a8da8; }
.password-field { position: relative; }
.password-field input { padding-right: 52px; }
.password-toggle { position: absolute; right: 3px; top: 2px; padding: 10px; border: 0; background: transparent; color: var(--muted); border-radius: 6px; min-height: 44px; }
.auth-link { font-size: .79rem; padding: 0; border: 0; background: none; color: var(--accent-deep); min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; }
.auth-help { text-align: center; font-size: .7rem; color: var(--muted); line-height: 1.8; margin: 26px 0 0; }
.auth-mark { width: 48px; height: 48px; border-radius: 14px; color: var(--accent); background: var(--accent-soft); display: flex; align-items: center; justify-content: center; margin-bottom: 23px; }
.auth-notice { font-size: .79rem; line-height: 1.6; margin-top: 18px; }
.form-text { font-size: .71rem; }
.error-content { padding: 80px 24px; text-align: center; }

/* Users module */
.users-page .page-heading { margin-bottom: 26px; }
.user-summary { margin-bottom: 24px; }
.user-metric { flex-wrap: nowrap; min-height: 132px; padding: 23px 20px; }
.user-metric .metric-icon { width: 52px; height: 52px; }
.user-metric .metric-icon .ui-icon { width: 26px; height: 26px; }
.user-metric > div:last-child { min-width: 0; }
.user-metric h2 { color: var(--ink); font-size: .79rem; font-weight: 650; }
.user-metric .metric-value { font-size: 1.65rem; }
.metric-caption { color: var(--muted); font-size: .68rem; margin: 6px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.metric-date { color: var(--accent-deep); font-size: 1rem; font-weight: 700; line-height: 1.25; margin: 0; }
.metric-success { background: #e3f5e9; color: #248351; }
.metric-warm { background: #fff1d7; color: #a26b10; }
.metric-blue { background: #edf4ff; color: var(--blue-deep); }
.users-table-panel { padding: 0 24px 22px; overflow: visible; }
.users-panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 23px 0 19px; border-bottom: 1px solid var(--line); }
.users-panel-heading h2 { font-size: 1rem; font-weight: 650; margin: 0; }
.users-panel-heading p { color: var(--muted); font-size: .72rem; margin: 7px 0 0; }
.users-table-wrap { padding-top: 18px; }
.users-table-tools, .users-table-footer { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 18px; }
.users-table-footer { margin: 18px 0 0; }
.dt-buttons { display: flex; gap: 7px; }
.dt-buttons .btn { min-height: 37px; padding: 7px 13px; border: 1px solid var(--line); color: #445775; background: #fff; }
.dataTables_filter label { display: flex; align-items: center; margin: 0; }
.dataTables_filter input { width: 220px; min-height: 40px; border: 1px solid #d7e1ef !important; border-radius: 8px; padding: 8px 12px; margin: 0 !important; color: var(--ink); outline: none; }
.dataTables_filter input:focus { border-color: var(--blue-primary) !important; box-shadow: 0 0 0 .2rem #1e6bff1a; }
.dataTables_wrapper .dataTables_processing { top: 115px; padding: 13px; height: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--accent-deep); box-shadow: 0 8px 25px #050b1a14; }
#tableUsers { margin: 0 !important; border-collapse: collapse !important; }
#tableUsers thead th { color: #607089; font-size: .68rem; font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
#tableUsers tbody td { font-size: .75rem; padding: 14px; border-bottom: 1px solid #edf1f7; vertical-align: middle; }
#tableUsers tbody tr:hover { background: #f5f8ff; }
.user-cell { display: inline-flex; align-items: center; gap: 11px; min-width: 190px; }
.user-cell strong, .user-cell small { display: block; }
.user-cell strong { color: var(--ink); font-size: .75rem; font-weight: 600; margin-bottom: 4px; }
.user-cell small { color: var(--muted); font-size: .66rem; }
.role-badge { display: inline-block; padding: 5px 9px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-deep); font-size: .66rem; font-weight: 600; }
.permission-copy { color: #607089; }
.state-inactive { background: #f1f3f7; color: #607089; }
.user-action { width: 38px; min-height: 38px; padding: 7px; border: 1px solid #d7e1ef; background: #edf4ff; color: var(--accent); }
.user-action:hover { background: var(--accent); color: #fff; }
.user-action .ui-icon { width: 18px; height: 18px; margin: 0; }
.dataTables_info { color: var(--muted) !important; font-size: .68rem; padding: 0 !important; }
.dataTables_paginate { padding: 0 !important; }
.dataTables_wrapper .dataTables_paginate .paginate_button { min-width: 36px; margin: 0 2px; padding: 7px 10px !important; border: 1px solid transparent !important; border-radius: 7px; color: var(--muted) !important; background: transparent !important; }
.dataTables_wrapper .dataTables_paginate .paginate_button:hover { color: var(--accent-deep) !important; border-color: #a8c7ff !important; background: var(--accent-soft) !important; }
.dataTables_wrapper .dataTables_paginate .paginate_button.current, .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover { color: #fff !important; border-color: var(--accent) !important; background: var(--accent) !important; }
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled { opacity: .45; }
.user-modal-content .modal-header { align-items: flex-start; }
.user-modal-content .modal-title { color: var(--ink); font-size: 1.4rem; font-weight: 650; }
.user-modal-content .modal-body { padding-top: 20px; }
.user-modal-intro { color: var(--muted); font-size: .8rem; margin: 0 0 21px; }
.user-modal-content .form-label { font-size: .75rem; font-weight: 600; }
.form-select { min-height: 48px; border-color: #d7e1ef; border-radius: 9px; font-size: .88rem; }
.form-select:focus { border-color: var(--blue-primary); box-shadow: 0 0 0 .2rem #1e6bff1a; }
.user-access-switch { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 10px; background: #f7f9fd; }
.user-access-switch strong, .user-access-switch span { display: block; }
.user-access-switch strong { font-size: .78rem; margin-bottom: 4px; }
.user-access-switch span { color: var(--muted); font-size: .69rem; }
.form-switch .form-check-input { width: 2.5em; height: 1.35em; cursor: pointer; }
.form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }
.user-form-message { margin: 18px 0 0; font-size: .76rem; }

/* Services module shares the Users controls and table presentation. */
.equipo-cell { display: block; max-width: 250px; overflow-wrap: anywhere; }
.equipo-cell strong, .equipo-cell small { display: block; }
.equipo-cell small { color: var(--muted); margin-top: 5px; }
.equipo-modal-content form { display: flex; flex-direction: column; min-height: 0; max-height: 100%; }
.equipo-modal-content .modal-header, .equipo-modal-content .modal-footer { flex-shrink: 0; }
.equipo-modal-content .form-select { text-overflow: ellipsis; }
.equipo-fieldset { margin: 0 0 25px; padding: 0 0 25px; border-bottom: 1px solid var(--line); min-width: 0; }
.equipo-fieldset legend { font-size: .88rem; font-weight: 650; color: var(--ink); margin-bottom: 16px; }
.module-table { margin: 0 !important; border-collapse: collapse !important; }
.module-table thead th { color: var(--muted); font-size: .68rem; font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.module-table tbody td { font-size: .75rem; padding: 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.module-table tbody tr:hover { background: #f5f8ff; }
.module-table.collapsed tbody td.dtr-control { position: relative; padding-left: 32px; cursor: pointer; }
.module-table.collapsed tbody td.dtr-control::before { content: '+'; position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--blue-deep); font-weight: 700; }
.module-table.collapsed tbody tr.parent td.dtr-control::before { content: '−'; }
.module-table .dtr-details { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.module-table .dtr-title { font-weight: 600; margin-right: 12px; }
.module-table .dtr-data { overflow-wrap: anywhere; }
.service-cell { display: block; max-width: 290px; overflow-wrap: anywhere; }
.service-cell strong, .service-cell small { display: block; }
.service-cell small { color: var(--muted); margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.services-page .user-metric { flex-wrap: wrap; }
.services-page .metric-value { overflow-wrap: anywhere; }
.service-modal-content form { display: flex; flex-direction: column; min-height: 0; max-height: 100%; }
.service-modal-content .modal-header, .service-modal-content .modal-footer { flex-shrink: 0; }
.service-modal-content textarea { resize: vertical; }
.service-modal-content .user-access-switch { height: 100%; }
.service-modal-content .form-select { text-overflow: ellipsis; }
/* Searchable equipment selector inside service modals. */
.service-filters { display: flex; align-items: end; flex-wrap: wrap; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.service-filter-field { flex: 1 1 160px; min-width: 0; }
.service-filter-field .form-label { font-size: .75rem; font-weight: 600; }
.service-filter-status { flex-basis: 100%; color: var(--muted); font-size: .73rem; }
.select2-hidden-accessible { border: 0 !important; clip: rect(0, 0, 0, 0) !important; height: 1px !important; margin: -1px !important; overflow: hidden !important; padding: 0 !important; position: absolute !important; width: 1px !important; }
.select2-container--service { display: inline-block; position: relative; vertical-align: middle; max-width: 100%; font-size: .88rem; color: var(--ink); }
.select2-container--service .select2-selection--single { display: flex; align-items: center; min-height: 48px; padding: 11px 38px 11px 14px; border: 1px solid #d7e1ef; border-radius: 9px; background: #fff; cursor: pointer; }
.select2-container--service .select2-selection__rendered { display: block; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select2-container--service .select2-selection__arrow { position: absolute; right: 16px; top: 18px; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); }
.select2-container--service.select2-container--focus .select2-selection, .select2-container--service.select2-container--open .select2-selection { border-color: var(--blue-primary); box-shadow: 0 0 0 .2rem #1e6bff1a; }
.select2-container--service .select2-dropdown { display: block; position: absolute; left: 0; z-index: 1060; background: #fff; border: 1px solid #d7e1ef; border-radius: 9px; box-shadow: 0 8px 24px #050b1a1a; overflow: hidden; }
.select2-container--service .select2-search--dropdown { display: block; padding: 8px; }
.select2-container--service .select2-search__field { width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid #d7e1ef; border-radius: 6px; color: var(--ink); background: #fff; }
.select2-container--service .select2-search__field:focus { outline: 2px solid var(--blue-primary); outline-offset: 0; }
.select2-container--service .select2-results__options { list-style: none; padding: 0; margin: 0; max-height: 220px; overflow-y: auto; }
.select2-container--service .select2-results__option { padding: 10px 14px; min-height: 44px; overflow-wrap: anywhere; cursor: pointer; }
.select2-container--service .select2-results__option[aria-selected="true"] { background: var(--accent-soft); }
.select2-container--service .select2-results__option--highlighted[aria-selected] { background: var(--blue-deep); color: #fff; }
/* Dark framing inspired by the banner; the main content stays white. */
.admin-workspace, .dashboard-content, .auth-content { background: #fff; }
.admin-sidebar { background: linear-gradient(180deg, var(--bg-dark), var(--bg-card)) !important; color: var(--text-main); border-right-color: #20385a; }
.admin-sidebar .brand, .auth-story .brand { color: var(--text-main); }
.admin-sidebar .brand img, .auth-story .brand img { filter: drop-shadow(0 0 8px #00b4ff33); }
.nav-caption { color: var(--silver); }
.sidebar-link { color: var(--text-muted); transition: background .15s, color .15s; }
.sidebar-link:hover { background: #14294c; color: var(--cyan-light); }
.sidebar-link.active { background: linear-gradient(110deg, var(--blue-deep), var(--blue-primary)); color: var(--text-main); box-shadow: inset 3px 0 var(--cyan-light), 0 4px 16px #1e6bff26; }
.nav-soon { color: var(--text-muted); background: #14294c; }
.sidebar-note { background: var(--bg-card); border-color: #20385a; }
.sidebar-note > .ui-icon { color: var(--cyan-light); }
.sidebar-note p, .sidebar-account small { color: var(--text-muted); }
.sidebar-account { border-top-color: #20385a; }
.admin-sidebar .avatar, .topbar .avatar { background: #142e58; color: var(--glow); border: 1px solid #2b5180; }
.admin-sidebar .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }
.topbar { background: linear-gradient(110deg, var(--bg-dark), var(--bg-card)); color: var(--text-main); border-bottom-color: #20385a; box-shadow: 0 2px 12px #050b1a12; }
.topbar .breadcrumb-item:first-child { color: var(--cyan-light); }
.topbar .breadcrumb-item.active, .topbar .workspace-label { color: var(--text-muted); }
.topbar .profile-toggle, .topbar .icon-button { color: var(--text-main); }
.topbar .profile-toggle:hover, .topbar .icon-button:hover { color: var(--cyan-light); }
.topbar .status-dot { background: var(--cyan-light); box-shadow: 0 0 8px #2fd3ff66; }
.btn-primary { --bs-btn-color: #fff; --bs-btn-hover-color: #fff; --bs-btn-active-color: #fff; --bs-btn-disabled-color: #fff; }
.btn-primary:hover { box-shadow: 0 4px 14px #1e6bff26; }
.auth-story { color: var(--text-main); background: radial-gradient(ellipse at bottom right, #0b3bd64d, transparent 65%), var(--bg-dark); }
.illustration-title { color: var(--cyan-light); }
.illustration-bars span:nth-child(5) { background: var(--cyan-light); box-shadow: 0 0 18px #00b4ff40; }

@media (min-width: 768px) {
    .admin-sidebar { position: fixed; top: 0; bottom: 0; left: 0; width: var(--sidebar-width); z-index: 1030; display: flex; flex-direction: column; }
    .admin-sidebar .sidebar-body { overflow-y: auto; flex-grow: 1; }
    .admin-workspace { margin-left: var(--sidebar-width); }
}
@media (min-width: 768px) and (max-width: 1199.98px) {
    :root { --sidebar-width: 84px; }
    .sidebar-brand { padding: 20px; }
    .sidebar-brand .brand > span, .nav-caption, .sidebar-link > span, .sidebar-account, .sidebar-note { display: none; }
    .sidebar-body { padding: 18px 12px !important; }
    .sidebar-link { justify-content: center; padding: 13px; }
    .sidebar-brand .brand img { width: 40px; height: 40px; max-width: none; object-fit: cover; object-position: left center; }
    .metric-card { flex-wrap: nowrap; }
    .metric-detail { display: none; }
    .dashboard-content { padding: 28px; }
    .topbar { padding: 16px 28px; }
    .shortcuts-panel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .shortcuts-panel .panel-heading { grid-column: 1 / -1; margin-bottom: 0; }
    .shortcut { margin: 0; padding: 10px; gap: 8px; }
}
@media (max-width: 991.98px) {
    .workspace-label, .profile-name { display: none; }
    .auth-page { padding: 24px; }
    .auth-layout { grid-template-columns: .85fr 1fr; min-height: 620px; }
    .auth-story { padding: 30px; }
    .auth-content { padding: 35px; }
    .auth-story h2 { font-size: 2rem; }
    .activity-table td, .activity-table th { padding-left: 14px; padding-right: 14px; }
    .user-metric { min-height: 114px; }
}
@media (max-width: 767.98px) {
    .topbar { padding: 12px 18px; min-height: 72px; }
    .dashboard-content { padding: 25px 18px; }
    .page-heading { align-items: flex-start; flex-direction: column; gap: 17px; }
    .page-heading .btn { font-size: .8rem; }
    .eyebrow { font-size: .58rem; }
    .demo-notice { align-items: flex-start; line-height: 1.6; font-size: .69rem; }
    .demo-notice .ui-icon { margin-top: 3px; }
    .metric-card { padding: 17px 14px; gap: 12px; }
    .metric-icon { width: 35px; height: 35px; border-radius: 10px; }
    .metric-icon .ui-icon { width: 20px; }
    .metric-card h2 { font-size: .7rem; }
    .metric-value { font-size: 1.4rem; }
    .metric-detail { display: none; }
    .chart-panel, .shortcuts-panel { padding: 18px; }
    .panel-heading { align-items: flex-start; }
    .panel-heading p { font-size: .68rem; line-height: 1.6; }
    .period-label { font-size: .59rem; padding: 6px; }
    .activity-chart { min-height: 0; }
    .activity-panel > .panel-heading { padding: 20px 18px 0; }
    .activity-panel .table-responsive { display: none; }
    .activity-mobile { display: block; }
    .activity-item { display: grid; grid-template-columns: 33px 1fr auto; align-items: start; gap: 10px; padding: 18px; border-top: 1px solid var(--line); }
    .activity-item h3 { font-size: .74rem; margin: 2px 0 5px; }
    .activity-item p { font-size: .71rem; margin-bottom: 6px; line-height: 1.6; }
    .activity-item small { font-size: .63rem; color: var(--muted); }
    .activity-item .state-badge { font-size: .56rem; padding: 4px 5px; }
    .workspace-footer { padding: 0 18px 22px; font-size: .61rem; }
    .workspace-footer > span:last-child { display: none; }
    .user-metric { display: block; min-height: 154px; }
    .user-metric .metric-icon { width: 38px; height: 38px; margin-bottom: 13px; }
    .user-metric .metric-icon .ui-icon { width: 20px; height: 20px; }
    .user-metric h2 { font-size: .7rem; }
    .user-metric .metric-value { font-size: 1.4rem; }
    .metric-date { font-size: .86rem; }
    .metric-caption { font-size: .61rem; white-space: normal; line-height: 1.45; }
    .users-table-panel { padding: 0 14px 18px; }
    .users-panel-heading { align-items: flex-start; }
    .users-panel-heading .soft-badge { display: none; }
    .users-table-tools, .users-table-footer { align-items: stretch; flex-direction: column; }
    .users-table-tools .dataTables_filter { order: -1; }
    .dataTables_filter input { width: 100%; }
    .dataTables_filter label { width: 100%; }
    .dt-buttons { overflow-x: auto; }
    .users-table-footer .dataTables_paginate { text-align: left; overflow-x: auto; white-space: nowrap; }
    .user-modal-content .modal-body, .user-modal-content .modal-header, .user-modal-content .modal-footer { padding-left: 18px; padding-right: 18px; }
    .auth-page { padding: 16px; }
    .auth-layout { display: block; min-height: 0; border-radius: 18px; max-width: 460px; }
    .auth-story { padding: 22px 26px; }
    .auth-story h2, .auth-story > p, .auth-illustration, .auth-story-footer { display: none; }
    .auth-content { padding: 30px 26px; }
    .auth-content h1 { font-size: 1.65rem; }
    .auth-mark { display: none; }
    .auth-intro { margin-bottom: 23px; }
}
@media (max-width: 374.98px) {
    .dashboard-content { padding-left: 12px; padding-right: 12px; }
    .metric-card { display: block; }
    .metric-icon { margin-bottom: 10px; }
    .activity-item { grid-template-columns: 28px 1fr; }
    .activity-item .state-badge { grid-column: 2; justify-self: start; }
    .auth-content { padding: 24px 20px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

.service-materials { min-width: 0; }
.service-materials-table { min-width: 650px; }
.service-materials-table td:first-child { width: 38%; min-width: 210px; }
.service-materials-table td:nth-child(2), .service-materials-table td:nth-child(3) { min-width: 120px; }
.service-materials-table td:nth-child(4) { min-width: 125px; }
.service-materials-table label.material-field { display: block; }
.service-detail-page, .service-detail-page form, .service-detail-page .panel { min-width: 0; }
.service-section-nav { display: flex; gap: 8px; flex-wrap: wrap; }
.service-section-nav a { padding: 10px 16px; border-radius: 12px; background: #eef5ff; color: #0B3BD6; text-decoration: none; font-weight: 600; }
.service-detail-page h1, .service-facts dd { overflow-wrap: anywhere; }
.service-facts dt { font-size: .8rem; color: #64748b; margin-bottom: 8px; }
.service-facts dd { margin-bottom: 0; }
.service-long-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.service-save-bar { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; padding: 18px; border: 1px solid #dbe8f8; border-radius: 16px; background: #fff; }
.service-pending-photo { margin: 0; padding: 12px; border: 1px solid #dbe8f8; border-radius: 16px; min-width: 0; }
.service-pending-photo img { width: 100%; height: 180px; object-fit: contain; border-radius: 8px; background: #050B1A; }
.service-pending-photo figcaption { overflow-wrap: anywhere; font-size: .8rem; margin: 10px 0; }
.service-photo-viewer { width: min(1100px, 94vw); max-height: 94vh; padding: 20px; border: 0; border-radius: 20px; }
.service-photo-viewer::backdrop { background: rgb(5 11 26 / 85%); }
.service-photo-viewer img { width: 100%; max-height: 70vh; object-fit: contain; background: #050B1A; }
.service-detail-page #servicePhotos, .service-detail-page #serviceMaterials, .service-detail-page #serviceInformation { scroll-margin-top: 24px; }
.service-detail-page .service-image-card img { height: 220px; object-fit: contain; }
.service-status-1, .service-status-2 { color: #0B3BD6; background: #eaf2ff; }
.service-status-3, .service-status-4 { color: #845500; background: #fff4d6; }
.service-status-5, .service-status-6 { color: #006780; background: #e0f7ff; }
.service-status-7, .service-status-8 { color: #176747; background: #e5f7ed; }
.service-status-9 { color: #9c2844; background: #fdebf0; }
.live-dashboard, .live-dashboard .panel, .live-dashboard .col-xl-8, .live-dashboard .col-xl-4 { min-width: 0; }
.dashboard-status-row { margin-top: 14px; font-size: .82rem; }
.dashboard-status-track { height: 5px; background: #eaf2ff; border-radius: 8px; margin-top: 6px; overflow: hidden; }
.dashboard-status-track span { display: block; height: 100%; background: #1E6BFF; border-radius: 8px; }
.dashboard-recent-table { font-size: .86rem; }
.dashboard-recent-table td { overflow-wrap: anywhere; }
.live-dashboard .metric-value { overflow-wrap: anywhere; }
.print-only { display: none; }
.report-content, .report-content .panel { min-width: 0; }
.report-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.report-period { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 20px; }
.report-period legend { font-size: .8rem; font-weight: 650; margin-bottom: 10px; }
.report-period .btn { border: 1px solid var(--line); }
.report-period .btn-check:checked + .btn { color: white; background: var(--blue-primary); border-color: var(--blue-primary); }
.report-period .btn-check:focus-visible + .btn { outline: 3px solid var(--cyan-accent); outline-offset: 3px; }
.report-filter-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)) auto; gap: 12px; align-items: end; }
.report-filter-grid > [hidden] { display: none; }
.report-filter-grid .form-label { font-size: .75rem; }
.report-filter-footer { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; font-size: .8rem; }
.report-scope { font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }
.report-notice { padding: 12px 16px; border-left: 3px solid var(--cyan-accent); background: #f2f8ff; color: #4a607d; font-size: .77rem; line-height: 1.6; }
.report-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.report-metric { display: block; padding: 20px; min-width: 0; }
.report-metric-title { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.report-metric-title h2 { margin: 0; font-size: .78rem; line-height: 1.5; }
.report-metric .metric-value { margin: 8px 0; font-size: clamp(1.5rem,2.1vw,2.2rem); overflow-wrap: anywhere; }
.report-metric .metric-value small { font-size: .65rem; }
.report-metric .metric-caption { font-size: .68rem; line-height: 1.6; white-space: normal; overflow: visible; text-overflow: clip; }
.report-delta { font-size: .75rem; font-weight: 650; color: var(--blue-deep); margin-bottom: 8px; }
.report-delta span { display: block; color: var(--muted); font-weight: 400; font-size: .65rem; margin-top: 4px; }
.report-delta-neutral { color: var(--muted); }
.report-chart-grid { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(0,1fr); gap: 20px; }
.report-content .panel-heading { flex-wrap: wrap; gap: 12px; }
.report-group { display: flex; flex-wrap: wrap; gap: 4px; background: #f3f7ff; padding: 4px; border-radius: 8px; }
.report-group a { padding: 7px 9px; font-size: .65rem; color: var(--muted); border-radius: 6px; }
.report-group a.active { background: var(--blue-primary); color: white; }
#reportTrend { width: 100%; height: auto; display: block; }
.report-legend { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; font-size: .7rem; color: var(--muted); }
.report-color { display: inline-block; height: 10px; width: 10px; border-radius: 50%; flex-shrink: 0; margin-right: 4px; }
.report-donut-layout { display: grid; grid-template-columns: minmax(110px,.9fr) minmax(0,1.1fr); align-items: center; gap: 10px; }
#reportDonut { width: 100%; max-width: 240px; height: auto; }
.report-state-legend { list-style: none; padding: 0; margin: 0; font-size: .65rem; }
.report-state-legend li { display: flex; gap: 4px; align-items: center; margin-bottom: 9px; }
.report-state-legend li span { flex: 1; }
.report-state-legend small { color: var(--muted); min-width: 34px; text-align: right; }
.report-analysis-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.report-type-row { margin: 17px 0; font-size: .73rem; }
.report-type-row > div, .report-total { display: flex; justify-content: space-between; gap: 10px; }
.report-type-row progress { appearance: none; width: 100%; height: 8px; border: 0; border-radius: 10px; margin-top: 8px; background: #edf4ff; }
.report-type-row progress::-webkit-progress-bar { background: #edf4ff; border-radius: 10px; }
.report-type-row progress::-webkit-progress-value { background: #1E6BFF; border-radius: 10px; }
.report-type-row progress::-moz-progress-bar { background: #1E6BFF; border-radius: 10px; }
.report-total { padding: 12px; background: #edf4ff; border-radius: 8px; font-size: .75rem; }
.report-table { font-size: .74rem; }
.report-table thead th { background: #edf4ff; color: var(--ink); font-size: .68rem; padding: 11px; }
.report-table td { padding: 12px 10px; overflow-wrap: anywhere; max-width: 240px; }
.report-actor-scroll { max-height: 300px; }
.report-insights { background: #edf6ff; }
.report-insight { background: white; padding: 13px; margin-top: 12px; border-radius: 8px; }
.report-insight strong, .report-followup strong { display: block; color: var(--blue-deep); font-size: .8rem; }
.report-insight span, .report-followup span { display: block; color: var(--muted); font-size: .68rem; line-height: 1.6; margin-top: 5px; }
.report-followup { background: #fff4d6; border: 1px solid #f4df9d; border-radius: 8px; padding: 13px; margin-top: 12px; }
.report-followup strong { color: #845500; }
.report-search { width: min(340px,100%); }
.report-pagination { display: flex; gap: 12px; justify-content: space-between; align-items: center; font-size: .73rem; flex-wrap: wrap; }
.report-pagination .form-select { min-height: 36px; width: 76px; padding: 7px 28px 7px 10px; }
.report-pagination .btn { min-height: 36px; padding: 5px 13px; }
.report-metadata { display: flex; flex-wrap: wrap; gap: 10px 24px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: .68rem; }
@media (min-width: 1600px) { .report-metrics { grid-template-columns: repeat(6,minmax(0,1fr)); } }
@media (max-width: 1199.98px) { .report-filter-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } .report-analysis-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .report-insights { grid-column: 1 / -1; } .report-chart-grid { grid-template-columns: 1fr; } }
@media (max-width: 767.98px) { .report-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); } .report-analysis-grid { grid-template-columns: 1fr; } .report-insights { grid-column: auto; } .report-content .page-heading { align-items: flex-start; flex-direction: column; } .report-content .panel { padding: 18px !important; } .report-filter-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .report-metric { padding: 15px; } .report-content .table-responsive { max-width: 100%; } }
@media (max-width: 399.98px) { .report-filter-grid { grid-template-columns: 1fr; } .report-metric-title { flex-direction: column; align-items: flex-start; gap: 7px; } .report-donut-layout { grid-template-columns: 1fr; } #reportDonut { margin: auto; } }
@media print {
  @page { size: A4 landscape; margin: 12mm; }
  body:has(.report-content) { background: white !important; font-size: 10pt; }
  body:has(.report-content) .admin-sidebar, body:has(.report-content) .topbar, body:has(.report-content) .workspace-footer, body:has(.report-content) .skip-link, .report-content .no-print { display: none !important; }
  body:has(.report-content) .admin-workspace { margin: 0 !important; width: 100% !important; }
  .report-content { padding: 0 !important; max-width: none; width: 100%; }
  .report-content .print-only { display: block; }
  .report-brand { background: #050B1A !important; padding: 14px; margin-bottom: 18px; }
  .report-brand img { width: 230px; }
  .report-content * { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .report-content .panel, .report-metric { break-inside: avoid; box-shadow: none; }
  .report-content .panel:has(#reportTable) { break-inside: auto; }
  .report-content .report-metrics { grid-template-columns: repeat(3,1fr); }
  .report-content .report-chart-grid, .report-content .report-analysis-grid { grid-template-columns: 1fr 1fr; }
  .report-content .table-responsive, .report-actor-scroll { overflow: visible; max-height: none; }
  #reportTable tbody tr[hidden] { display: table-row !important; }
  #reportTable #reportEmpty[hidden] { display: none !important; }
  #reportTable tbody tr { break-inside: avoid; }
  .report-content a { color: inherit; text-decoration: none; }
  .report-content .btn { border: 0; padding: 0; background: none; min-height: 0; }
}
@media (max-width: 575.98px) { .service-detail-page .panel { padding: 18px !important; } .service-save-bar > div { width: 100%; } .service-save-bar .btn { flex: 1; } }
