/* Cloudfonica Call Filter 9 reference: compact Bootstrap typography and spacing.
   Navigation retains the requested blue highlight without an underline. */
@font-face {
    font-family: 'Panel Sans'; font-style: normal; font-weight: 400; font-display: swap;
    src: url('/assets/fonts/LiberationSans-Regular.ttf') format('truetype');
}
@font-face {
    font-family: 'Panel Sans'; font-style: normal; font-weight: 700; font-display: swap;
    src: url('/assets/fonts/LiberationSans-Bold.ttf') format('truetype');
}
body.source-ui, body.auth-login {
    font-family: Arial, 'Panel Sans', Helvetica, sans-serif;
    font-size: 14px; line-height: 20px; color: #333;
}
body.source-ui button, body.source-ui input, body.source-ui select, body.source-ui textarea,
body.auth-login button, body.auth-login input { font-family: inherit; font-size: 14px; }
body.source-ui .navbar .brand img { max-height: 32px; width: 140px; }
body.source-ui .navbar .nav > li > a { font-size: 14px; font-weight: 400; }
body.source-ui nav.main-nav > ul > li > a { font-size: 13px; font-weight: 400; }
body.source-ui .main-content { padding-bottom: 60px; }
body.source-ui .source-container { max-width: 990px; margin: 0 auto; }
body.source-ui .fieldset { border: 0; border-radius: 0; box-shadow: none; padding: 0; margin: 0 0 20px; }
body.source-ui .dg_header {
    background: transparent; border: 0; border-radius: 0;
    padding: 0; margin: 20px 0; color: #263884;
    font-size: 22px; font-weight: 400; line-height: 26px;
}
body.source-ui .dg_header span { font-weight: inherit; }
body.source-ui .hero h1 { font-size: 22px; line-height: 26px; margin: 20px 0; color: #263884; font-weight: 700; }
body.source-ui .servertime { font-size: 14px; padding-top: 12px; padding-bottom: 5px; }
body.source-ui .table-scroll { margin-bottom: 0; }
body.source-ui .table { border-color: #ddd; border-radius: 4px; }
body.source-ui .table th { color: #263884; background: #eaeaea; font-size: 14px; font-weight: 700; }
body.source-ui .table th, body.source-ui .table td { padding: 8px; line-height: 20px; vertical-align: middle; border-color: #ddd; }
body.source-ui .table-striped tbody > tr:nth-child(odd) > td { background: #f9f9f9; }
body.source-ui .table-striped tbody > tr:nth-child(even) > td { background: #f5f5f5; }
body.source-ui .table-toolbar, body.source-ui .table-footer { font-size: 14px; padding: 0; margin: 10px 0; }
body.source-ui .records-box select { width: 75px; height: 26px; padding: 2px 6px; margin-right: 4px; }
body.source-ui .search-box input { width: 206px; height: 28px; margin-left: 4px; }
body.source-ui .pager { display: inline-flex; }
body.source-ui .pager span { padding: 4px 12px; line-height: 20px; font-size: 14px; }
body.source-ui .pager span:first-child { border-radius: 4px 0 0 4px; }
body.source-ui .pager span:last-child { border-radius: 0 4px 4px 0; }
body.source-ui .pager span + span { border-left: 0; }
body.source-ui .actions { gap: 6px; }
body.source-ui .table .icon-btn, body.source-ui .table .action-btn {
    width: 22px; min-width: 22px; height: 22px; border-radius: 3px;
    border: 1px solid rgba(0,0,0,.12); box-shadow: inset 0 1px rgba(255,255,255,.2);
}
body.source-ui .table .icon-btn svg, body.source-ui .table .action-btn svg { width: 12px; height: 12px; }
body.source-ui .table .icon-btn--primary, body.source-ui .table .icon-btn--neutral { background: linear-gradient(#5bc0de,#2f96b4); }
body.source-ui .table .icon-btn--danger { background: linear-gradient(#ee5f5b,#bd362f); }
body.source-ui .btn {
    border-radius: 4px; padding: 4px 12px; font-weight: 400; line-height: 20px;
    border: 1px solid #bbb; box-shadow: inset 0 1px rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
    background: linear-gradient(#fff,#e6e6e6); color: #333;
}
body.source-ui .btn-info { background: linear-gradient(#5bc0de,#2f96b4); border-color: #2f96b4 #2f96b4 #1f6377; color: #fff; }
body.source-ui .btn-warning { background: linear-gradient(#fbb450,#f89406); border-color: #f89406 #f89406 #ad6704; color: #fff; }
body.source-ui .btn-danger { background: linear-gradient(#ee5f5b,#bd362f); border-color: #bd362f #bd362f #802420; color: #fff; }
body.source-ui .btn-primary { background: linear-gradient(#08c,#04c); border-color: #04c #04c #002a80; color: #fff; }
body.source-ui .btn-group { display: inline-flex; gap: 0; flex-wrap: wrap; }
body.source-ui .btn-group > .btn { border-radius: 0; margin-left: -1px; }
body.source-ui .btn-group > .btn:first-child { border-radius: 4px 0 0 4px; margin-left: 0; }
body.source-ui .btn-group > .btn:last-child { border-radius: 0 4px 4px 0; }
body.source-ui .control-label { color: #333; }
body.source-ui .form-horizontal input[type='text'], body.source-ui .form-horizontal input[type='password'],
body.source-ui .form-horizontal input[type='number'], body.source-ui .form-horizontal select {
    width: 220px; height: 30px; padding: 4px 6px; border: 1px solid #ccc;
    border-radius: 4px; box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
}
body.source-ui .form-horizontal .control-group { margin-bottom: 20px; }
body.source-ui .form-horizontal .control-label { padding-top: 5px; }
body.source-ui .utility-settings-grid { gap: 24px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
body.source-ui .utility-settings-col { align-content: start; row-gap: 24px; }
body.source-ui .switch-field p { font-size: 14px; text-align: right; flex: 1; }
body.source-ui .switch-buttons { margin-left: 18px; }
body.source-ui .switch-btn { min-width: 58px; padding: 7px 12px; font-size: 14px; line-height: 20px; }
body.source-ui .switch-btn.active { background: #a5dc86; border-color: #83b967; color: #333; }
body.source-ui .float-nav .icon-btn {
    width: 38px; min-width: 38px; height: 38px; border-radius: 50%;
    color: #a7d3c0; background: #fff; border: 1px solid #eee; box-shadow: 0 2px 3px rgba(0,0,0,.12);
}
body.source-ui .float-nav .icon-btn svg { width: 15px; height: 15px; }
body.module-home.source-ui .home-source-layout .dg_header { font-size: 24px; line-height: 28px; }
body.module-home.source-ui .home-source-layout .table td, body.module-home.source-ui .home-source-layout .table th { font-size: 14px; }
body.module-filter-performance.source-ui #fieldset_insertData > .dg_header { display: none; }
body.module-filter-performance.source-ui .hero h1 { font-size: 22px; line-height: 26px; margin: 20px 0; }
body.module-filter-performance.source-ui .perf-filter-shell,
body.module-cdr.source-ui .cdr-filter-shell { background: #f5f5f5; border: 1px solid #e3e3e3; padding: 10px; border-radius: 4px; }
body.module-filter-performance.source-ui .perf-filter-shell .control-group { margin-bottom: 18px; }
body.module-filter-performance.source-ui .perf-filter-shell .control-label,
body.module-cdr.source-ui .cdr-filter-shell .control-label { font-size: 14px; font-weight: 400; white-space: normal; }
body.module-filter-performance.source-ui .perf-filter-shell .controls input[type='text'],
body.module-filter-performance.source-ui .perf-filter-shell .controls select,
body.module-cdr.source-ui .cdr-filter-shell .controls input[type='text'],
body.module-cdr.source-ui .cdr-filter-shell .controls select { width: 100%; max-width: 100%; height: 30px; }
body.module-filter-performance.source-ui .perf-filter-shell .date-input-group .icon-btn,
body.module-cdr.source-ui .date-input-group .add-on {
    width: 30px; min-width: 30px; height: 30px;
    background: #eee; border-color: #ccc; color: #333;
}
body.module-filter-performance.source-ui .perf-filter-shell .date-input-group .icon-btn svg { width: 14px; height: 14px; }
body.module-filter-performance.source-ui .perf-filter-shell .controls input.js-datetime-display { width: 0; flex: 1 1 auto; }
body.module-filter-performance.source-ui .perf-filter-shell .help-block,
body.module-cdr.source-ui .cdr-search-box .help-block { font-size: 14px; }
body.source-ui .app-modal-dialog { border-radius: 6px; }
body.source-ui .app-modal-head { border-radius: 6px 6px 0 0; }
@media (min-width: 1181px) {
    body.source-ui .page-wrapper { padding-top: 40px; }
    body.source-ui .navbar-inner { padding-left: 10px; padding-right: 10px; }
    body.source-ui .navbar .brand { width: 170px; margin: 4px 0; }
    body.source-ui .navbar .nav > li > a { padding: 10px 12px; }
    body.source-ui .navbar .nav.pull-right > li:last-child > a { padding-right: 0; }
    body.source-ui nav#primary { top: 40px; left: 0; width: 218px; height: calc(100vh - 40px); }
    body.source-ui .main-content { margin-left: 218px; width: calc(100% - 218px); padding-right: 20px; padding-left: 20px; }
    body.source-ui .servertime { padding-top: 5px; }
}
@media (max-width: 1180px) {
    body.source-ui .utility-settings-grid { grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); }
    body.source-ui .switch-field p { text-align: left; }
}
@media (max-width: 767px) {
    body.source-ui .source-container { max-width: none; }
    body.source-ui .form-horizontal .controls input:not([type='checkbox']):not([type='radio']):not([type='submit']):not([type='button']),
    body.source-ui .form-horizontal .controls select { width: 100%; }
    body.source-ui .utility-settings-grid { grid-template-columns: minmax(0,1fr); }
    body.source-ui .btn-group { max-width: 100%; }
    body.source-ui .table-toolbar { gap: 8px; }
    body.source-ui .search-box input { width: 160px; }
    body.source-ui .form-horizontal .control-group { margin-bottom: 14px; }
    body.source-ui .navbar .brand { margin: 7px 0; }
}
/* Match the original single-row table summary and pagination. */
body.source-ui .table-footer { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
body.source-ui .table-footer::before, body.source-ui .table-footer::after { display: none; }
body.source-ui .table-footer .pager, body.source-ui .table-footer .js-table-summary { float: none; margin: 0; }
body.source-ui .navbar .btn-navbar {
    background: #1d2c69; border: 1px solid #5769a9; box-shadow: none;
}
body.source-ui .navbar .btn-navbar .icon-bar { background: #fff; }
/* Gateway row actions: consistent outline icons and restrained semantic colors. */
body.module-gateway.source-ui .gateway-actions { display: flex; flex-wrap: nowrap; gap: 6px; }
body.module-gateway.source-ui .gateway-action {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; min-width: 32px; height: 32px; padding: 0;
    border: 1px solid #d7dee8; border-radius: 5px;
    background: #f5f7fa; color: #526174; text-decoration: none;
    box-shadow: none; transition: background-color 120ms ease, border-color 120ms ease;
}
body.module-gateway.source-ui .gateway-action svg { width: 16px; height: 16px; display: block; fill: none; }
body.module-gateway.source-ui .gateway-action--edit { background: #eff6ff; border-color: #c9dcf7; color: #285ca4; }
body.module-gateway.source-ui .gateway-action--disable { background: #fff3f3; border-color: #f0d1d1; color: #b33f45; }
body.module-gateway.source-ui .gateway-action--enable { background: #eff8f1; border-color: #cce5d1; color: #2e7844; }
body.module-gateway.source-ui .gateway-action--health:hover { background: #e7edf4; border-color: #afbdce; }
body.module-gateway.source-ui .gateway-action--edit:hover { background: #deebff; border-color: #8db5ed; }
body.module-gateway.source-ui .gateway-action--disable:hover { background: #ffe3e3; border-color: #dc9ca0; }
body.module-gateway.source-ui .gateway-action--enable:hover { background: #def0e3; border-color: #91c69e; }
body.module-gateway.source-ui .gateway-action:focus-visible { outline: 2px solid #285ca4; outline-offset: 2px; }
@media (max-width: 767px) {
    body.module-gateway.source-ui .gateway-action { width: 36px; min-width: 36px; height: 36px; }
}
/* Keep dashboard summaries equal while allowing long values to wrap. */
body.module-home.source-ui .home-summary-grid {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px;
}
body.module-home.source-ui .home-summary-grid::before,
body.module-home.source-ui .home-summary-grid::after { display: none; }
body.module-home.source-ui .home-summary-grid > .span4 {
    float: none; width: auto; margin: 0; min-width: 0; display: flex;
}
body.module-home.source-ui .home-summary-grid .fieldset {
    display: flex; flex-direction: column; width: 100%; margin: 0;
}
body.module-home.source-ui .home-summary-grid .dg_header {
    margin: 20px 0 14px; line-height: 28px; min-height: 28px;
}
body.module-home.source-ui .home-summary-grid .dg_header span,
body.module-home.source-ui .home-summary-grid .dg_header a { display: block; line-height: 28px; }
body.module-home.source-ui .home-summary-grid .table-scroll { flex: 1; }
body.module-home.source-ui .home-summary-grid table { height: 100%; min-height: 136px; }
@media (max-width: 767px) {
    body.module-home.source-ui .home-summary-grid { grid-template-columns: minmax(0, 1fr); }
}
body.module-home.source-ui .home-summary-grid .dg_header a { margin: 0; padding: 0; font-size: inherit; }
/* Utility controls: even spacing, clear action groups and aligned settings. */
body.module-utility.source-ui .utility-actions {
    align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 16px; border: 1px solid #e1e5ec; border-radius: 6px; background: #fafbfc;
}
body.module-utility.source-ui .utility-actions .btn-group { gap: 8px; flex-wrap: wrap; }
body.module-utility.source-ui .utility-actions .btn {
    margin: 0; border-radius: 4px; min-height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
body.module-utility.source-ui .utility-actions .btn i { width: 14px; text-align: center; }
body.module-utility.source-ui .utility-settings-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
body.module-utility.source-ui .utility-settings-col { display: contents; }
body.module-utility.source-ui .switch-field {
    padding: 14px 12px; margin: 0; border: 1px solid #e1e5ec; border-radius: 5px; background: #fafbfc;
}
body.module-utility.source-ui .switch-row { gap: 10px; min-height: 32px; }
body.module-utility.source-ui .switch-field p { text-align: left; font-size: 14px; line-height: 20px; }
body.module-utility.source-ui .switch-buttons { margin: 0; }
body.module-utility.source-ui .switch-btn {
    width: 42px; min-width: 42px; height: 32px; padding: 4px 8px;
    color: #697386; background: #fff; border: 1px solid #ccd3de; box-shadow: none; cursor: pointer;
}
body.module-utility.source-ui .switch-btn + .switch-btn { margin-left: -1px; }
body.module-utility.source-ui .switch-btn:first-child { border-radius: 4px 0 0 4px; }
body.module-utility.source-ui .switch-btn:last-child { border-radius: 0 4px 4px 0; }
body.module-utility.source-ui .switch-btn.active { background: #e5f3df; border-color: #9ac68b; color: #2e662d; position: relative; }
body.module-utility.source-ui .switch-btn[data-value='0'].active { background: #e8edf5; border-color: #b4c0d3; color: #354762; }
body.module-utility.source-ui .switch-btn:hover { background: #edf1f7; }
body.module-utility.source-ui .switch-btn:focus-visible { outline: 2px solid #285ca4; outline-offset: 2px; z-index: 1; }
@media (max-width: 1180px) {
    body.module-utility.source-ui .utility-settings-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 600px) {
    body.module-utility.source-ui .utility-settings-grid { grid-template-columns: minmax(0,1fr); }
    body.module-utility.source-ui .utility-actions { padding: 12px; align-items: stretch; }
    body.module-utility.source-ui .utility-actions-left { display: grid; grid-template-columns: 1fr; width: 100%; }
    body.module-utility.source-ui .utility-actions-right { margin: 0; width: 100%; }
    body.module-utility.source-ui .utility-actions .btn { width: 100%; }
}
/* Shared action icons across initial and AJAX-loaded tables. */
body.source-ui .icon-btn svg, body.source-ui .action-btn svg { fill: none; }
body.source-ui .table .panel-action-icon {
    width: 32px; min-width: 32px; height: 32px; border-radius: 5px;
    background: #f5f7fa; border: 1px solid #d7dee8; color: #526174; box-shadow: none;
}
body.source-ui .table .panel-action-icon svg { width: 16px; height: 16px; }
body.source-ui .table .panel-action-icon--primary { background: #eff6ff; border-color: #c9dcf7; color: #285ca4; }
body.source-ui .table .panel-action-icon--danger { background: #fff3f3; border-color: #f0d1d1; color: #b33f45; }
body.source-ui .table .panel-action-icon--success { background: #eff8f1; border-color: #cce5d1; color: #2e7844; }
body.source-ui .table .action-link:hover .panel-action-icon { filter: brightness(.95); }
body.source-ui .table .actions { gap: 6px; flex-wrap: nowrap; }
@media (max-width: 767px) {
    body.source-ui .table .panel-action-icon { width: 36px; min-width: 36px; height: 36px; }
}
body.source-ui .table .panel-action-icon {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0; line-height: 1; vertical-align: middle; box-sizing: border-box;
}
/* Outgoing bucket actions follow the shared control styling. */
body.module-route-prefix-out.source-ui .js-selected-delete,
body.module-route-prefix-out.source-ui #insertData .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px;
}
body.module-route-prefix-out.source-ui .table .actions { justify-content: flex-start; }
body.module-route-prefix-out.source-ui .table th:last-child { white-space: nowrap; }
/* Login follows the original Cloudfonica portal's white and blue design. */
body.auth-login { padding: 0; margin: 0; background: #fff; color: #333; }
body.auth-login .login-shell {
    min-height: 100vh; min-height: 100dvh; display: flex;
    align-items: flex-start; justify-content: center; padding: 40px 20px;
}
body.auth-login .login-panel {
    width: 320px; max-width: 100%; padding: 0; margin: 0;
    border: 0; border-radius: 0; background: #fff; box-shadow: none;
}
body.auth-login .login-brand { text-align: center; margin: 0 0 40px; }
body.auth-login .login-brand img { display: block; width: 280px; max-width: 100%; max-height: none; height: auto; margin: 0 auto; }
body.auth-login .login-brand h1 {
    margin: 58px 0 0; padding: 0 0 10px; border-bottom: 1px solid #e5e5e5;
    font-size: 18px; line-height: 24px; font-weight: 400; color: #263884; text-transform: uppercase;
}
body.auth-login .login-field { margin: 0 0 10px; }
body.auth-login .login-field label {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
body.auth-login .login-field input {
    display: block; width: 100%; height: 52px; padding: 12px;
    border: 1px solid #d5d5d5; border-radius: 4px; background: #fff;
    color: #333; font: inherit; font-size: 18px; line-height: 24px; text-align: center;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075); box-sizing: border-box; margin: 0;
}
body.auth-login .login-field input::placeholder { color: #999; opacity: 1; }
body.auth-login .login-field input:focus {
    border-color: #536db0; outline: 2px solid rgba(38,56,132,.15); outline-offset: 1px;
}
body.auth-login .login-actions { margin-top: 40px; }
body.auth-login .login-actions .btn {
    display: block; width: 100%; height: 60px; padding: 16px;
    border: 1px solid #263884; border-radius: 4px; background: #263884;
    color: #fff; font-size: 14px; line-height: 24px; font-weight: 400; text-shadow: none;
    box-shadow: inset 0 1px rgba(255,255,255,.15); cursor: pointer;
}
body.auth-login .login-actions .btn:hover { background: #314b99; }
body.auth-login .login-actions .btn:focus-visible { outline: 2px solid #536db0; outline-offset: 3px; }
body.auth-login .login-alert {
    border: 1px solid #ebc4c4; border-radius: 4px; background: #fff2f2;
    color: #963d42; font-size: 14px; padding: 12px; margin: 0 0 18px;
}
@media (max-width: 480px) {
    body.auth-login .login-shell { padding-top: 32px; }
    body.auth-login .login-brand h1 { margin-top: 40px; font-size: 16px; }
}
body.auth-login .login-brand h1 { font-size: 16px; }
@media (max-width: 360px) {
    body.auth-login .login-brand h1 { font-size: 14px; }
}
