/* ============================================================
   ASU theme — recolours the Sneat/Bootstrap components to the
   ASU corporate palette defined in ep-layout.css (template/).
   Load after core.css, theme-default.css and ep-layout.css.
   ============================================================ */

:root {
    --bs-primary: #3D54A3;
    --bs-primary-rgb: 61, 84, 163;
    --bs-link-color: #3D54A3;
    --bs-link-hover-color: #2E3E7C;
    --bs-body-color: #1a2332;
    --bs-body-bg: #f5f6f8;
    --bs-border-color: #e2e6f0;
}

/* theme-default.css sets `img { width: 100% }` globally; brand logos must keep their own size. */
.ep-sidebar-brand img,
.ep-public-bar img,
.ep-auth-brand img {
    width: auto !important;
    max-width: none;
}

body {
    background: var(--ep-surface);
    color: var(--ep-text);
    font-family: system-ui, "Segoe UI", -apple-system, "Helvetica Neue", Arial, sans-serif;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--ep-navy);
}

a {
    color: var(--asu-blue);
}

    a:hover {
        color: var(--asu-blue-700);
    }

.text-primary {
    color: var(--asu-blue) !important;
}

.text-muted {
    color: var(--ep-muted) !important;
}

.bg-primary {
    background-color: var(--asu-blue) !important;
}

.border-primary {
    border-color: var(--asu-blue) !important;
}

/* ---- Buttons ---------------------------------------------- */
.btn {
    border-radius: 9px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.btn-sm {
    border-radius: 7px;
}

.btn-primary {
    color: #fff;
    background-color: var(--ep-navy);
    border-color: var(--ep-navy);
    box-shadow: 0 2px 6px rgba(35, 47, 94, 0.2);
}

    .btn-primary:hover,
    .btn-primary:focus,
    .btn-primary.focus {
        color: #fff;
        background-color: var(--asu-blue-700);
        border-color: var(--asu-blue-700);
        transform: none;
    }

    .btn-primary:active,
    .btn-primary.active,
    .btn-primary.show,
    .show > .btn-primary.dropdown-toggle {
        color: #fff !important;
        background-color: var(--asu-blue-900) !important;
        border-color: var(--asu-blue-900) !important;
    }

    .btn-primary:disabled,
    .btn-primary.disabled {
        background-color: var(--asu-blue-tint-1);
        border-color: var(--asu-blue-tint-1);
    }

.btn-outline-primary {
    color: var(--asu-blue);
    border-color: var(--asu-blue-tint-2);
    background: transparent;
}

    .btn-outline-primary:hover,
    .btn-outline-primary:focus,
    .btn-outline-primary.active,
    .btn-outline-primary:active,
    .btn-check:checked + .btn-outline-primary {
        color: #fff !important;
        background-color: var(--asu-blue) !important;
        border-color: var(--asu-blue) !important;
        transform: none;
    }

.btn-secondary {
    color: #45506b;
    background: #fff;
    border-color: #d4d9e6;
    box-shadow: none;
}

    .btn-secondary:hover,
    .btn-secondary:focus {
        color: var(--ep-navy);
        background: var(--ep-surface);
        border-color: #c0c8e0;
        transform: none;
    }

.btn-outline-secondary {
    color: #45506b;
    border-color: #d4d9e6;
    background: #fff;
}

    .btn-outline-secondary:hover,
    .btn-outline-secondary:focus,
    .btn-outline-secondary.active {
        color: var(--ep-navy) !important;
        background: var(--ep-surface) !important;
        border-color: #c0c8e0 !important;
        transform: none;
    }

/* Gold accent button from the template (.cer-btn-gold) */
.btn-gold,
.btn-warning {
    color: var(--ep-navy);
    background: linear-gradient(135deg, var(--ep-gold) 0%, var(--ep-gold-light) 100%);
    border-color: transparent;
    box-shadow: 0 2px 6px rgba(245, 166, 28, 0.25);
}

    .btn-gold:hover,
    .btn-gold:focus,
    .btn-warning:hover,
    .btn-warning:focus {
        color: var(--ep-navy);
        filter: brightness(1.04);
        border-color: transparent;
        transform: none;
    }

.btn-outline-warning {
    color: var(--asu-orange-deep);
    border-color: var(--asu-orange-tint-2);
}

    .btn-outline-warning:hover {
        color: var(--ep-navy) !important;
        background: var(--asu-orange-tint-3) !important;
        border-color: var(--asu-orange) !important;
    }

.btn-info {
    color: #fff;
    background-color: var(--asu-blue-tint-1);
    border-color: var(--asu-blue-tint-1);
    box-shadow: none;
}

    .btn-info:hover,
    .btn-info:focus {
        color: #fff;
        background-color: var(--asu-blue);
        border-color: var(--asu-blue);
        transform: none;
    }

.btn-outline-info {
    color: var(--asu-blue);
    border-color: var(--asu-blue-tint-3);
}

    .btn-outline-info:hover {
        color: #fff !important;
        background: var(--asu-blue-tint-1) !important;
        border-color: var(--asu-blue-tint-1) !important;
    }

.btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(61, 84, 163, 0.3) !important;
}

/* ---- Badges ------------------------------------------------ */
.badge {
    border-radius: 999px;
    font-weight: 700;
    font-size: 11.5px;
    padding: 4px 11px;
    text-transform: none;
    letter-spacing: 0;
}

.bg-label-primary {
    background-color: var(--asu-blue-tint-4) !important;
    color: var(--asu-blue-700) !important;
}

.bg-label-warning {
    background-color: var(--asu-orange-tint-4) !important;
    color: var(--asu-orange-deep) !important;
}

.bg-label-info {
    background-color: #e6eefb !important;
    color: #2f5aa8 !important;
}

.bg-label-secondary {
    background-color: #eef0f4 !important;
    color: #5b6680 !important;
}

.badge.bg-primary {
    background-color: var(--asu-blue) !important;
}

.badge.bg-warning {
    background-color: var(--asu-orange) !important;
    color: var(--ep-navy) !important;
}

/* ---- Cards (.cer-card look) -------------------------------- */
.card {
    border: 1px solid var(--ep-border);
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(35, 47, 94, 0.05);
    overflow: visible;
}

.card-header {
    background: #fafbfd;
    border-bottom: 1px solid #eef1f7;
    border-top-left-radius: 14px !important;
    border-top-right-radius: 14px !important;
    padding: 15px 20px;
}

    .card-header h5,
    h5.card-header {
        font-size: 15.5px;
        font-weight: 700;
        color: var(--ep-navy);
    }

.card-body {
    padding: 18px 20px 20px;
}

.card-header + .card-body {
    padding-top: 18px;
}

/* Card header numbered/icon tile (.cer-num) */
.ep-card-ico {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: var(--ep-navy);
    color: var(--ep-gold-light);
    font-weight: 700;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ---- Forms ------------------------------------------------- */
.form-control,
.form-select {
    border-color: #d4d9e6;
    border-radius: 9px;
}

    .form-control:focus,
    .form-select:focus {
        border-color: var(--asu-blue);
        box-shadow: 0 0 0 3px rgba(61, 84, 163, 0.14);
    }

.input-group-text {
    border-color: #d4d9e6;
    border-radius: 9px;
}

.input-group:focus-within .input-group-text {
    border-color: var(--asu-blue);
}

.form-check-input:checked {
    background-color: var(--asu-blue);
    border-color: var(--asu-blue);
    box-shadow: none;
}

.form-check-input:focus {
    border-color: var(--asu-blue);
    box-shadow: 0 0 0 3px rgba(61, 84, 163, 0.14);
}

/* ---- Tables ------------------------------------------------ */
.table > thead > tr > th,
.table > thead > tr > td {
    color: var(--ep-muted) !important;
    background-color: #fafbfd !important;
}

.table > tbody > tr:hover > * {
    --bs-table-accent-bg: rgba(61, 84, 163, 0.05) !important;
}

/* ---- Navigation bits --------------------------------------- */
.dropdown-item.active,
.dropdown-item:active {
    background-color: var(--asu-blue-tint-4);
    color: var(--asu-blue-700);
}

.dropdown-item:hover {
    color: var(--ep-navy);
    background-color: var(--ep-surface);
}

.page-item.active .page-link,
.pagination li.active > a:not(.page-link) {
    background-color: var(--asu-blue);
    border-color: var(--asu-blue);
    box-shadow: none;
}

.nav-pills .nav-link.active,
.nav-pills .nav-link.active:hover {
    background-color: var(--asu-blue);
    box-shadow: none;
}

.nav-tabs .nav-link.active {
    color: var(--asu-blue);
    border-bottom-color: var(--asu-blue);
}

.progress-bar,
.progress-bar.bg-primary {
    background-color: var(--asu-blue) !important;
}

.progress-bar.bg-info {
    background-color: var(--asu-orange) !important;
}

.alert-primary {
    background: var(--asu-blue-tint-4);
    border-color: var(--asu-blue-tint-3);
    color: var(--asu-blue-700);
}

.alert-info {
    background: #eef2fb;
    border-color: #d5def3;
    color: #2e3e7c;
}

.alert-warning {
    background: var(--asu-orange-tint-4);
    border-color: var(--asu-orange-tint-3);
    color: #7a4a06;
}

.alert {
    border-radius: 12px;
}

.list-group-item.active {
    background-color: var(--asu-blue);
    border-color: var(--asu-blue);
}


/* Breadcrumb */
.page-breadcrumb .breadcrumb-item.active {
    color: var(--ep-navy);
}

.page-breadcrumb .breadcrumb-item a:hover {
    color: var(--asu-blue);
}

/* Page heading (template .cer-page-head) */
.ep-page-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

    .ep-page-head .ep-page-ico {
        width: 54px;
        height: 54px;
        border-radius: 14px;
        background: linear-gradient(135deg, var(--ep-navy), var(--asu-blue));
        color: var(--ep-gold-light);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 26px;
        flex-shrink: 0;
    }

    .ep-page-head h1,
    .ep-page-head h4 {
        font-size: 22px;
        font-weight: 700;
        margin: 0;
        color: var(--ep-navy);
    }

    .ep-page-head p {
        margin: 2px 0 0;
        color: var(--ep-muted);
        font-size: 13.5px;
    }

/* ---- Ticket side panel (_TicketSidePanel.cshtml) ----------- */
.ticket-panel .card-header .badge {
    font-size: 12px;
}

.tp-section {
    padding: 16px 20px;
    border-bottom: 1px solid #eef1f7;
}

.tp-section-last {
    border-bottom: 0;
}

.tp-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--ep-muted);
    margin-bottom: 10px;
}

    .tp-title .bx {
        color: var(--asu-orange-deep);
        font-size: 14px;
        vertical-align: -2px;
        margin-right: 2px;
    }

    .tp-title .btn-link {
        text-transform: none;
        letter-spacing: 0;
        font-weight: 600;
    }

.tp-targets {
    display: grid;
    gap: 6px;
}

.tp-target {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.tp-k {
    color: var(--ep-muted);
    font-size: 12px;
}

.tp-v {
    font-weight: 600;
    color: var(--ep-navy);
}

.tp-callout {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--asu-orange-tint-4);
    color: #7a4a06;
    font-size: 13px;
}

    .tp-callout .bx {
        font-size: 18px;
        color: var(--asu-orange-deep);
        flex-shrink: 0;
    }

.tp-person {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tp-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: var(--ep-navy);
    background: linear-gradient(135deg, var(--ep-gold) 0%, var(--ep-gold-light) 100%);
}

.tp-person-empty .tp-avatar {
    background: #eef0f4;
    color: #8a94ab;
    font-size: 18px;
}

.tp-person-empty .fw-semibold {
    color: var(--asu-orange-deep);
}

.tp-path {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 6px;
}

    .tp-path li {
        display: grid;
        grid-template-columns: 92px 1fr;
        gap: 8px;
        font-size: 13.5px;
        color: var(--ep-navy);
    }

.tp-step + .tp-step {
    margin-top: 10px;
}

.tp-step .form-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ep-navy);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tp-num {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--asu-blue-tint-4);
    color: var(--asu-blue-700);
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tp-step select:disabled {
    background-color: #f7f8fb;
    color: #9aa3b8;
}

.tp-facts {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 6px 8px;
    margin: 0;
    font-size: 13px;
}

    .tp-facts dt {
        font-weight: 500;
        color: var(--ep-muted);
    }

    .tp-facts dd {
        margin: 0;
        color: var(--ep-navy);
        min-width: 0;
        overflow-wrap: anywhere;
    }

/* ---- Ticket creation forms (ticket-form.js) ----------------- */
.tf-step + .tf-step {
    margin-top: 26px;
}

.tf-step-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

    .tf-step-head .tf-num {
        width: 28px;
        height: 28px;
        border-radius: 8px;
        background: var(--ep-navy);
        color: var(--ep-gold-light);
        font-weight: 700;
        font-size: 13px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .tf-step-head h6 {
        margin: 0;
        font-size: 15px;
        font-weight: 700;
        color: var(--ep-navy);
    }

    .tf-step-head small {
        display: block;
        color: var(--ep-muted);
        font-size: 12.5px;
    }

.tf-sections {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.tf-section-card {
    position: relative;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    border: 1.5px solid var(--ep-border);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color .12s, box-shadow .12s, background .12s;
    margin: 0;
}

    .tf-section-card:hover {
        border-color: var(--asu-blue-tint-2);
    }

    .tf-section-card input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

    .tf-section-card .tf-ico {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: var(--asu-blue-tint-4);
        color: var(--asu-blue);
        font-size: 20px;
    }

    .tf-section-card .tf-name {
        font-weight: 700;
        color: var(--ep-navy);
        font-size: 14px;
    }

    .tf-section-card .tf-desc {
        font-size: 12.5px;
        color: var(--ep-muted);
        line-height: 1.35;
        margin-top: 2px;
    }

    .tf-section-card .tf-check {
        position: absolute;
        top: 10px;
        right: 10px;
        color: var(--asu-blue);
        font-size: 20px;
        opacity: 0;
        transition: opacity .12s;
    }

    .tf-section-card:has(input:checked) {
        border-color: var(--asu-blue);
        background: #f7f8fd;
        box-shadow: 0 0 0 3px rgba(61, 84, 163, 0.12);
    }

        .tf-section-card:has(input:checked) .tf-check {
            opacity: 1;
        }

        .tf-section-card:has(input:checked) .tf-ico {
            background: var(--ep-navy);
            color: var(--ep-gold-light);
        }

    .tf-section-card:has(input:focus-visible) {
        outline: 3px solid rgba(61, 84, 163, 0.35);
        outline-offset: 2px;
    }

.tf-drop {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1.5px dashed #c9d0e0;
    border-radius: 12px;
    background: #fafbfd;
    cursor: pointer;
    transition: border-color .12s, background .12s;
    margin: 0;
}

    .tf-drop:hover,
    .tf-drop.drag {
        border-color: var(--asu-blue);
        background: #f3f5fc;
    }

    .tf-drop.has-file {
        border-style: solid;
        border-color: #8ccf9e;
        background: #f3fbf5;
    }

    .tf-drop .tf-drop-ico {
        width: 42px;
        height: 42px;
        border-radius: 10px;
        background: #fff;
        border: 1px solid var(--ep-border);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 22px;
        color: var(--asu-blue);
        flex-shrink: 0;
    }

    .tf-drop input[type=file] {
        position: absolute;
        width: 1px;
        height: 1px;
        opacity: 0;
    }

.tf-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    color: var(--ep-muted);
    margin-top: 4px;
}

.tf-error {
    color: #d92d20;
    font-size: 12.5px;
    margin-top: 6px;
}

.tf-aside .list-unstyled li {
    display: flex;
    gap: 10px;
    font-size: 13px;
    color: #45506b;
}

    .tf-aside .list-unstyled li + li {
        margin-top: 12px;
    }

    .tf-aside .list-unstyled li .bx {
        font-size: 18px;
        color: var(--asu-orange-deep);
        flex-shrink: 0;
    }

.tf-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    padding-top: 18px;
    margin-top: 22px;
    border-top: 1px solid #eef1f7;
}

.note-editor.note-frame {
    border-color: #d4d9e6 !important;
    border-radius: 9px;
    overflow: hidden;
}

/* Select2 */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    border-color: #d4d9e6 !important;
    border-radius: 9px !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--asu-blue) !important;
}

/* AG Grid accent */
.ag-theme-alpine {
    --ag-alpine-active-color: var(--asu-blue);
    --ag-row-hover-color: rgba(61, 84, 163, 0.05);
    --ag-selected-row-background-color: rgba(61, 84, 163, 0.1);
    --ag-input-focus-border-color: var(--asu-blue);
    --ag-header-background-color: #fafbfd;
}

/* SweetAlert2 confirm button */
.swal2-styled.swal2-confirm {
    background-color: var(--ep-navy) !important;
    border-radius: 9px !important;
}
