/*
 * Centrex Front custom styles.
 * Ported from old/public/css/centrexfront.css, adapted to AdminLTE 3 / BS4
 * (box-* → card-*, login-box-body → login-card-body).
 *
 * "Modern theme" section at the bottom refreshes the visual language
 * (tokens, cards, tables, buttons, forms, modals, login) without changing
 * layout or navigation. Vendored AdminLTE CSS is never modified.
 */

:root {
    --cx-accent: #4174B8;
    --cx-accent-dark: #35619c;
    --cx-accent-soft: rgba(65, 116, 184, 0.08);
    --cx-border: rgba(16, 24, 40, 0.1);
    --cx-text: #1f2937;
    --cx-muted: #6b7280;
    --cx-surface: #ffffff;
    --cx-surface-alt: #f8fafc;
    --cx-radius: 0.5rem;
    --cx-radius-sm: 0.375rem;
    --cx-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
    --cx-shadow: 0 1px 3px rgba(16, 24, 40, 0.1), 0 1px 2px rgba(16, 24, 40, 0.06);
    --cx-shadow-lg: 0 20px 45px rgba(16, 24, 40, 0.18);
}

body .main-sidebar .logo .logo-xl {
    font-family: "Good Times";
}

/* ---------- Login page ---------- */

body .login-logo {
    font-family: 'Good Times';
    font-size: 32px;
    color: #FFFFFF
}

.login-page {
    background: #4e8fd0;
    background:
        radial-gradient(ellipse at 20% 10%, rgba(255, 255, 255, 0.14) 0, rgba(255, 255, 255, 0) 55%),
        linear-gradient(160deg, #4e8fd0 0%, #35619c 100%);
    overflow-y: hidden
}

.login-box-msg {
    color: #F00
}

.login-box .card {
    border: 0;
    border-radius: 0.75rem;
    box-shadow: var(--cx-shadow-lg);
}

.login-card-body {
    border-radius: 0.75rem;
    padding: 1.75rem;
}

.btn-default.btn-eduid {
    color: #3470b5;
    font-weight: bold;
    text-align: center;
    padding-right: 44px;
    background: #ffffff;
    background: linear-gradient(to bottom, #ffffff 0, #d8e6ed 100%)
}

.btn-default.btn-eduid:hover {
    color: #3470b5
}

.btn-default.btn-eduid > :first-child {
    background-repeat: no-repeat;
    background-position: 4px center;
    background-size: auto 90%;
    background-image: url('../img/eduid_trans.png');
    width: 84px
}

/* ---------- Modals ---------- */

.modal-backdrop {
    background-color: #0f172a
}

.modal-backdrop.show {
    opacity: 0.4
}

/* Old rule forced min-width: 700px !important; keep the desktop width but
   let the dialog shrink on small screens. */
@media (min-width: 768px) {
    .modal-dialog {
        max-width: 700px
    }
}

.modal-content {
    border: 0;
    border-radius: 0.625rem;
    box-shadow: var(--cx-shadow-lg) !important
}

.modal-header {
    background-color: transparent;
    border-bottom: 1px solid var(--cx-border)
}

.modal-title {
    font-weight: 600;
    font-size: 1.1rem
}

.modal-header, .modal-footer {
    padding-top: 10px !important;
    padding-bottom: 10px !important
}

.modal-footer {
    justify-content: flex-start;
    border-top: 1px solid var(--cx-border);
    background-color: var(--cx-surface-alt);
    border-bottom-left-radius: 0.625rem;
    border-bottom-right-radius: 0.625rem
}

.ajax_loader {
    min-height: 300px;
    padding-top: 150px;
    padding-bottom: 150px;
    text-align: center
}

/* ---------- Toastr ---------- */

#toast-container > div {
    opacity: .97 !important;
    border-radius: var(--cx-radius);
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.2) !important
}

.toast-top-center {
    top: 60px
}

/* ---------- Tables ---------- */

table.table-rowclick td {
    cursor: pointer
}

.btn-extension {
    margin-right: 2px
}

.legends {
    padding-left: 20px;
    font-size: 12px
}

.legends > div {
    padding: 2px
}

.legends > div i.fa {
    padding: 0;
    cursor: default;
    width: 18px;
    text-align: center
}

/* ---------- Softphone credentials ---------- */

.auth_data {
    font-family: 'Courier New', 'Lucida Console', Monaco, monospace;
    margin-top: 5px;
    text-align: center;
    font-size: 18px
}

/* ---------- Sortable lists (softkeys, extensions) ---------- */

legend {
    font-size: 18px;
    padding-bottom: 3px
}

.extensions-list-group, .softkey-list-group {
    margin-top: 5px;
    padding: 4px;
    border: 1px solid var(--cx-border);
    border-radius: var(--cx-radius-sm);
    list-style: none !important
}

.softkey-list-group {
    border: 0;
    padding: 0
}

.extensions-list-item, .softkey-list-item {
    display: block;
    padding: 8px 15px;
    margin-bottom: 4px;
    background-color: #fff;
    border: 1px solid var(--cx-border);
    border-radius: var(--cx-radius-sm)
}

.extensions-list-item:last-child {
    margin-bottom: 0
}

.extensions-list-text {
    width: 100%
}

.extensions-list-content, .softkey-list-content {
    display: flex
}

.extensions-list-content input, .softkey-list-content input {
    margin-right: 6px
}

.extensions-list-content span {
    line-height: 20px;
    margin-left: 10px
}

.extensions-list-content span:hover {
    cursor: pointer;
    color: red
}

.extension-timeout {
    width: 25px;
    border-radius: 0;
    box-shadow: none;
    border: 1px solid #d2d6de;
    height: 20px;
    padding: 2px 2px;
    font-size: 10px;
    text-align: right;
    margin-right: 0
}

.softkey-fieldset {
    margin-top: 10px
}

.softkey-fieldset legend {
    margin-bottom: 0
}

.softkey-number, .softkey-remove {
    line-height: 28px
}

.softkey-number {
    text-align: right;
    min-width: 20px
}

.softkey-type, .softkey-name, .softkey-external {
    height: 28px;
    padding: 3px 12px 3px 6px
}

.softkey-type {
    margin-left: 15px;
    width: auto !important;
    display: inline-block
}

.softkey-name {
    margin-left: 5px
}

.softkey-external {
    margin-left: 5px;
    margin-right: 15px
}

.li-sortable {
    cursor: move
}

.forced-pointer {
    cursor: pointer
}

.btn-del:hover {
    color: #F00
}

.ui-state-highlight {
    height: 38px;
    margin-bottom: 4px;
    background: #ECECEC;
    border: 1px dashed #dadada;
    border-radius: var(--cx-radius-sm)
}

.ui-state-highlight-softkey {
    height: 46px;
    margin-bottom: 4px;
    border: 1px solid #ccc;
    background: #e7e7e7
}

.ui-state-highlight:last-child {
    margin-bottom: 0
}

.ui-sortable-helper {
    box-shadow: 0 4px 12px rgba(16, 24, 40, 0.15)
}

/* ---------- jQuery UI autocomplete / select2 above modals ---------- */

.ui-autocomplete {
    position: absolute;
    top: 0;
    left: 0;
    cursor: default;
    z-index: 11111 !important
}

.ui-menu .ui-menu-item {
    color: #000;
    padding: 5px 10px
}

.select2-container.select2-container--open, .select2-dropdown {
    z-index: 100000
}

/* ---------- Password strength meter ---------- */

.form-group-password .password_strength {
    padding: 0;
    line-height: 12px;
    height: 12px;
    margin-top: 4px
}

.form-group-password .password_strength .progress {
    height: 10px;
    line-height: 10px;
    border-radius: 0
}

.form-group-password .password_strength .progress .password-verdict {
    display: none
}

/* ============================================================
   Modern theme — visual refresh on top of AdminLTE 3 defaults.
   Layout, navigation and color semantics are unchanged.
   ============================================================ */

/* ---------- Typography ---------- */

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
        'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--cx-text)
}

.content-header h1 {
    font-size: 1.5rem;
    font-weight: 600
}

/* ---------- Navbar ---------- */

.main-header.navbar {
    border-bottom: 0;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.1)
}

/* ---------- Sidebar ---------- */

.sidebar .nav-link p {
    font-size: 0.9rem;
}

.sidebar {
    height: calc(100% - 3.5rem);
    overflow-y: auto;
}

.nav-sidebar .nav-item {
    min-width: none;
    max-width: 100%;
}

.nav-sidebar .nav-item > .nav-link {
    border-radius: var(--cx-radius-sm);
    margin: 0.125rem 0.5rem;
    transition: background-color 0.15s ease
}

.nav-sidebar .nav-item > .nav-link.active {
    font-weight: 600;
    box-shadow: none
}

.nav-sidebar .nav-header {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--cx-muted)
}

.brand-link {
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.1)
}

/* ---------- Cards ---------- */

.card {
    border: 1px solid var(--cx-border);
    border-radius: var(--cx-radius);
    box-shadow: var(--cx-shadow);
    margin-bottom: 1.25rem
}

.card.card-outline {
    border-top-width: 2px
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--cx-border);
    padding: 0.75rem 1.25rem
}

.card-header .card-title {
    font-weight: 600;
    font-size: 1.05rem
}

.card-footer {
    background-color: var(--cx-surface-alt);
    border-top: 1px solid var(--cx-border);
    border-bottom-left-radius: calc(var(--cx-radius) - 1px);
    border-bottom-right-radius: calc(var(--cx-radius) - 1px)
}

/* ---------- Tables ---------- */

.card .table-bordered,
.card .table-bordered td,
.card .table-bordered th {
    border-left: 0;
    border-right: 0
}

.card .table-bordered thead th {
    border-bottom-width: 1px
}

.table thead th {
    border-top: 0;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--cx-muted)
}

.table-sm td, .table-sm th {
    padding: 0.5rem 0.75rem
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: var(--cx-surface-alt)
}

.table-hover tbody tr:hover {
    background-color: var(--cx-accent-soft)
}

/* DataTables controls */

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border-radius: var(--cx-radius-sm)
}

.pagination .page-link {
    border: 0;
    border-radius: var(--cx-radius-sm);
    margin: 0 2px;
    color: var(--cx-text)
}

.pagination .page-item.active .page-link {
    background-color: var(--cx-accent);
    color: #fff
}

.pagination .page-item.disabled .page-link {
    color: #c0c6cf
}

/* ---------- Buttons ---------- */

.btn {
    border-radius: var(--cx-radius-sm);
    font-weight: 500;
    transition: box-shadow 0.15s ease, background-color 0.15s ease,
        border-color 0.15s ease
}

.btn:not(.btn-link):not(:disabled):hover {
    box-shadow: 0 2px 6px rgba(16, 24, 40, 0.15)
}

.btn-primary {
    background-color: var(--cx-accent);
    border-color: var(--cx-accent)
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active,
.btn-primary:not(:disabled):not(.disabled):active {
    background-color: var(--cx-accent-dark);
    border-color: var(--cx-accent-dark)
}

.btn-default {
    background-color: #fff;
    border-color: #d5dbe3;
    color: var(--cx-text)
}

.btn-default:hover {
    background-color: var(--cx-surface-alt);
    border-color: #c4ccd6;
    color: var(--cx-text)
}

/* ---------- Forms ---------- */

.form-control, .custom-select {
    border-radius: var(--cx-radius-sm);
    border-color: #d5dbe3
}

.form-control:focus, .custom-select:focus {
    border-color: var(--cx-accent);
    box-shadow: 0 0 0 3px rgba(65, 116, 184, 0.15)
}

.col-form-label {
    font-weight: 500
}

.input-group-text {
    border-radius: var(--cx-radius-sm);
    border-color: #d5dbe3;
    background-color: var(--cx-surface-alt);
    color: var(--cx-muted)
}

/* Select2 to match the inputs */

.select2-container--bootstrap4 .select2-selection,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    border-radius: var(--cx-radius-sm);
    border-color: #d5dbe3
}

.select2-container--bootstrap4.select2-container--focus .select2-selection,
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: var(--cx-accent);
    box-shadow: 0 0 0 3px rgba(65, 116, 184, 0.15)
}

.select2-dropdown {
    border-radius: var(--cx-radius-sm);
    border-color: #d5dbe3;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12)
}

/* Datetimepicker dropdown */

.bootstrap-datetimepicker-widget.dropdown-menu {
    border-radius: var(--cx-radius);
    border: 1px solid var(--cx-border);
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12)
}

/* ---------- Dropdown menus ---------- */

.dropdown-menu {
    border: 1px solid var(--cx-border);
    border-radius: var(--cx-radius);
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12);
    padding: 0.375rem
}

.dropdown-menu .dropdown-item {
    border-radius: var(--cx-radius-sm);
    padding: 0.4rem 0.75rem
}

/* ---------- Callouts & popovers (confirmation) ---------- */

.callout {
    border-radius: var(--cx-radius);
    border-left-width: 3px;
    box-shadow: var(--cx-shadow-sm)
}

.popover {
    border: 1px solid var(--cx-border);
    border-radius: var(--cx-radius);
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.15)
}

/* ---------- Dashboard widgets ---------- */

.info-box, .small-box {
    border-radius: var(--cx-radius);
    box-shadow: var(--cx-shadow)
}

/* ---------- Footer ---------- */

.main-footer {
    border-top: 1px solid var(--cx-border);
    font-size: 0.85rem;
    color: var(--cx-muted)
}
