/* ============================================================
   myDigiCard UI Stability & Accessibility Layer
   Loaded last by the shared layouts to keep text readable,
   controls consistent and responsive behaviour predictable.
   ============================================================ */

:root {
    --dvc-ui-text: #172033;
    --dvc-ui-muted: #5f6f82;
    --dvc-ui-border: #dbe4ee;
    --dvc-ui-surface: #ffffff;
    --dvc-ui-bg: #f4f7fb;
    --dvc-ui-navy: #053d76;
    --dvc-ui-orange: #e84322;
    --dvc-ui-focus: rgba(5, 61, 118, .22);
}

/* Font Awesome 6 class-name compatibility for the packaged FA 5 files. */
.fa-solid {
    font-family: "Font Awesome 5 Free" !important;
    font-weight: 900 !important;
}

.fa-regular {
    font-family: "Font Awesome 5 Free" !important;
    font-weight: 400 !important;
}

.fa-brands {
    font-family: "Font Awesome 5 Brands" !important;
    font-weight: 400 !important;
}

/* --------------------------- Admin panel --------------------------- */
body.corporate-panel {
    color: var(--dvc-ui-text);
    background: var(--dvc-ui-bg);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body.corporate-panel .content-wrapper,
body.corporate-panel .card,
body.corporate-panel .card-body,
body.corporate-panel .modal-content,
body.corporate-panel .dropdown-menu {
    color: var(--dvc-ui-text);
}

body.corporate-panel .text-muted,
body.corporate-panel small.text-muted,
body.corporate-panel .help-block,
body.corporate-panel .form-text {
    color: var(--dvc-ui-muted) !important;
}

body.corporate-panel label,
body.corporate-panel .control-label,
body.corporate-panel .col-form-label {
    color: #27364a;
    font-weight: 600;
}

body.corporate-panel .form-control,
body.corporate-panel .custom-select,
body.corporate-panel .select2-container--default .select2-selection--single,
body.corporate-panel .select2-container--default .select2-selection--multiple {
    color: #172033;
    background-color: #fff;
    border-color: #cfd9e5;
}

body.corporate-panel .form-control::placeholder,
body.corporate-panel textarea::placeholder {
    color: #8391a3;
    opacity: 1;
}

body.corporate-panel .form-control:focus,
body.corporate-panel .custom-select:focus,
body.corporate-panel .select2-container--focus .select2-selection,
body.corporate-panel .select2-container--open .select2-selection {
    border-color: #5c86b1;
    box-shadow: 0 0 0 .2rem var(--dvc-ui-focus);
}

body.corporate-panel .form-control:disabled,
body.corporate-panel .form-control[readonly],
body.corporate-panel .custom-select:disabled {
    color: #536274;
    background-color: #eef2f6;
    opacity: 1;
}

body.corporate-panel .table {
    color: #263448;
    background: #fff;
}

body.corporate-panel .table thead th {
    color: #334155;
    background: #f5f8fc;
    border-bottom-color: #d7e0ea;
    font-weight: 700;
    vertical-align: middle;
}

body.corporate-panel .table td,
body.corporate-panel .table th {
    border-top-color: #e5ebf2;
    vertical-align: middle;
}

body.corporate-panel .table-hover tbody tr:hover {
    color: #172033;
    background-color: #f7faff;
}

body.corporate-panel .card-header {
    color: #172033;
    background-color: #fff;
    border-bottom-color: #e0e8f1;
}

body.corporate-panel .card-title,
body.corporate-panel .card-header h1,
body.corporate-panel .card-header h2,
body.corporate-panel .card-header h3,
body.corporate-panel .card-header h4,
body.corporate-panel .card-header h5,
body.corporate-panel .card-header h6 {
    color: inherit;
}

/* Preserve readable text on coloured panels. */
body.corporate-panel .bg-primary,
body.corporate-panel .bg-info,
body.corporate-panel .bg-success,
body.corporate-panel .bg-danger,
body.corporate-panel .bg-secondary,
body.corporate-panel .bg-dark,
body.corporate-panel .bg-teal,
body.corporate-panel .small-box.bg-primary,
body.corporate-panel .small-box.bg-info,
body.corporate-panel .small-box.bg-success,
body.corporate-panel .small-box.bg-danger,
body.corporate-panel .small-box.bg-secondary,
body.corporate-panel .small-box.bg-dark,
body.corporate-panel .small-box.bg-teal {
    color: #fff !important;
}

body.corporate-panel .bg-warning,
body.corporate-panel .small-box.bg-warning {
    color: #2d2600 !important;
}

body.corporate-panel .bg-primary h1,
body.corporate-panel .bg-primary h2,
body.corporate-panel .bg-primary h3,
body.corporate-panel .bg-primary h4,
body.corporate-panel .bg-primary h5,
body.corporate-panel .bg-primary h6,
body.corporate-panel .bg-info h1,
body.corporate-panel .bg-info h2,
body.corporate-panel .bg-info h3,
body.corporate-panel .bg-info h4,
body.corporate-panel .bg-info h5,
body.corporate-panel .bg-info h6,
body.corporate-panel .bg-success h1,
body.corporate-panel .bg-success h2,
body.corporate-panel .bg-success h3,
body.corporate-panel .bg-success h4,
body.corporate-panel .bg-success h5,
body.corporate-panel .bg-success h6,
body.corporate-panel .bg-danger h1,
body.corporate-panel .bg-danger h2,
body.corporate-panel .bg-danger h3,
body.corporate-panel .bg-danger h4,
body.corporate-panel .bg-danger h5,
body.corporate-panel .bg-danger h6,
body.corporate-panel .bg-secondary h1,
body.corporate-panel .bg-secondary h2,
body.corporate-panel .bg-secondary h3,
body.corporate-panel .bg-secondary h4,
body.corporate-panel .bg-secondary h5,
body.corporate-panel .bg-secondary h6,
body.corporate-panel .bg-dark h1,
body.corporate-panel .bg-dark h2,
body.corporate-panel .bg-dark h3,
body.corporate-panel .bg-dark h4,
body.corporate-panel .bg-dark h5,
body.corporate-panel .bg-dark h6,
body.corporate-panel .bg-teal h1,
body.corporate-panel .bg-teal h2,
body.corporate-panel .bg-teal h3,
body.corporate-panel .bg-teal h4,
body.corporate-panel .bg-teal h5,
body.corporate-panel .bg-teal h6,
body.corporate-panel .text-white h1,
body.corporate-panel .text-white h2,
body.corporate-panel .text-white h3,
body.corporate-panel .text-white h4,
body.corporate-panel .text-white h5,
body.corporate-panel .text-white h6,
body.corporate-panel .growth-hero h1,
body.corporate-panel .growth-hero h2,
body.corporate-panel .growth-hero h3,
body.corporate-panel .growth-hero h4,
body.corporate-panel .growth-hero h5,
body.corporate-panel .growth-hero h6 {
    color: inherit !important;
}

body.corporate-panel .small-box h3,
body.corporate-panel .small-box p,
body.corporate-panel .info-box-number,
body.corporate-panel .info-box-text {
    color: inherit !important;
}

body.corporate-panel .alert {
    border-width: 1px;
    font-weight: 500;
}

body.corporate-panel .alert-danger {
    color: #7f1d1d;
    background: #fef2f2;
    border-color: #fecaca;
}

body.corporate-panel .alert-warning {
    color: #713f12;
    background: #fffbeb;
    border-color: #fde68a;
}

body.corporate-panel .alert-success {
    color: #14532d;
    background: #f0fdf4;
    border-color: #bbf7d0;
}

body.corporate-panel .alert-info {
    color: #164e63;
    background: #ecfeff;
    border-color: #a5f3fc;
}

body.corporate-panel .alert a:not(.btn) {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
}

body.corporate-panel .badge-light {
    color: #334155;
    background: #eef2f7;
    border: 1px solid #dbe3ec;
}

body.corporate-panel .badge-warning {
    color: #3f3500;
}

body.corporate-panel .btn-outline-light {
    color: #fff;
}

body.corporate-panel .btn-outline-secondary {
    color: #455468;
    border-color: #8290a2;
}

body.corporate-panel .btn-outline-secondary:hover {
    color: #fff;
}

body.corporate-panel .pagination .page-link {
    color: var(--dvc-ui-navy);
}

body.corporate-panel .pagination .page-item.active .page-link {
    color: #fff;
    background: var(--dvc-ui-navy);
    border-color: var(--dvc-ui-navy);
}

body.corporate-panel .dropdown-item {
    color: #263448;
}

body.corporate-panel .dropdown-item:hover,
body.corporate-panel .dropdown-item:focus {
    color: #102a43;
    background: #eef5fc;
}

body.corporate-panel .select2-container--default .select2-results__option {
    color: #263448;
}

body.corporate-panel .select2-container--default .select2-results__option--highlighted[aria-selected] {
    color: #fff;
    background: var(--dvc-ui-navy);
}

body.corporate-panel a:focus-visible,
body.corporate-panel button:focus-visible,
body.corporate-panel input:focus-visible,
body.corporate-panel select:focus-visible,
body.corporate-panel textarea:focus-visible {
    outline: 3px solid rgba(254, 84, 49, .35);
    outline-offset: 2px;
}

/* --------------------------- Public website --------------------------- */
body.corporate-site,
body.legacy-public-site {
    color: #1d2939;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body.corporate-site p,
body.legacy-public-site p,
body.corporate-site li,
body.legacy-public-site li {
    color: inherit;
}

body.corporate-site .text-muted,
body.legacy-public-site .text-muted {
    color: #607086 !important;
}

body.corporate-site label,
body.legacy-public-site label,
body.auth-site label {
    color: #27364a;
    font-weight: 600;
}

body.corporate-site .form-control,
body.legacy-public-site .form-control,
body.auth-site .form-control {
    color: #172033;
    background-color: #fff;
    border-color: #cfd9e5;
}

body.corporate-site .form-control::placeholder,
body.legacy-public-site .form-control::placeholder,
body.auth-site .form-control::placeholder {
    color: #8391a3;
    opacity: 1;
}

body.corporate-site .form-control:focus,
body.legacy-public-site .form-control:focus,
body.auth-site .form-control:focus {
    border-color: #5c86b1;
    box-shadow: 0 0 0 .2rem var(--dvc-ui-focus);
}

body.corporate-site .text-white h1,
body.corporate-site .text-white h2,
body.corporate-site .text-white h3,
body.corporate-site .text-white h4,
body.corporate-site .text-white h5,
body.corporate-site .text-white h6,
body.corporate-site .bg-dark h1,
body.corporate-site .bg-dark h2,
body.corporate-site .bg-dark h3,
body.corporate-site .bg-dark h4,
body.corporate-site .bg-dark h5,
body.corporate-site .bg-dark h6,
body.corporate-site .corporate-footer h1,
body.corporate-site .corporate-footer h2,
body.corporate-site .corporate-footer h3,
body.corporate-site .corporate-footer h4,
body.corporate-site .corporate-footer h5,
body.corporate-site .corporate-footer h6,
body.legacy-public-site .corporate-footer h1,
body.legacy-public-site .corporate-footer h2,
body.legacy-public-site .corporate-footer h3,
body.legacy-public-site .corporate-footer h4,
body.legacy-public-site .corporate-footer h5,
body.legacy-public-site .corporate-footer h6 {
    color: #fff !important;
}

body.corporate-site .corporate-footer,
body.legacy-public-site .corporate-footer,
body.corporate-site .corporate-footer p,
body.legacy-public-site .corporate-footer p,
body.corporate-site .corporate-footer a,
body.legacy-public-site .corporate-footer a {
    color: rgba(255, 255, 255, .82);
}

body.corporate-site .corporate-footer a:hover,
body.legacy-public-site .corporate-footer a:hover {
    color: #fff;
}

/* --------------------------- Authentication --------------------------- */
body.auth-site {
    color: var(--dvc-ui-text);
    background: #f5f8fc;
}

body.auth-site .card,
body.auth-site .card-body,
body.auth-site .auth-form-wrap {
    color: var(--dvc-ui-text);
}

body.auth-site .text-muted,
body.auth-site small {
    color: var(--dvc-ui-muted) !important;
}

body.auth-site .auth-brand-pane,
body.auth-site .auth-brand-pane h1,
body.auth-site .auth-brand-pane h2,
body.auth-site .auth-brand-pane h3,
body.auth-site .auth-brand-pane p,
body.auth-site .auth-brand-pane li {
    color: #fff;
}

/* --------------------------- Responsive safeguards --------------------------- */
img,
svg,
video,
canvas {
    max-width: 100%;
}

.table-responsive {
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 767.98px) {
    body.corporate-panel .content-header {
        padding-left: 12px;
        padding-right: 12px;
    }

    body.corporate-panel .content > .container-fluid,
    body.corporate-panel .content-header > .container-fluid {
        padding-left: 12px;
        padding-right: 12px;
    }

    body.corporate-panel .card-body {
        padding: 1rem;
    }

    body.corporate-panel .btn {
        white-space: normal;
    }

    body.corporate-panel .input-group > .form-control {
        min-width: 0;
    }
}

@media (max-width: 575.98px) {
    body.corporate-panel .content-header h1 {
        font-size: 1.45rem;
        line-height: 1.25;
    }

    body.corporate-panel .table {
        font-size: .82rem;
    }

    body.corporate-panel .small-box h3 {
        font-size: 1.65rem;
    }
}

/* Font Awesome compatibility for views using FA6-style family classes with the packaged FA5 font files. */
.fa-solid,
.fa-regular,
.fa-brands {
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* Stabilization: responsive workspace tables and long session/device identifiers. */
body.corporate-panel .dvc-session-device {
    max-width: 420px;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

body.corporate-panel .dataTables_wrapper .dataTables_filter input,
body.corporate-panel .dataTables_wrapper .dataTables_length select {
    border: 1px solid #cfd9e5;
    border-radius: 8px;
    padding: .35rem .55rem;
    background: #fff;
    color: #172033;
}

body.corporate-panel .dataTables_wrapper .dataTables_paginate .paginate_button.current > .page-link,
body.corporate-panel .page-item.active .page-link {
    color: #fff !important;
}
