/* =========================================================
   Trafineo.Pique – theme on top of Radzen "standard"
   Brand: Pique blue #19217A, Pique red #BA2620
   ========================================================= */
:root {
    --pique-blue: #19217A;
    --pique-blue-dark: #10165A;
    --pique-red: #BA2620;
    --pique-bg: #F4F6FB;
    --pique-border: #E2E6F0;
    --pique-muted: #5F6B85;

    --rz-primary: var(--pique-blue);
    --rz-primary-light: #3A44A0;
    --rz-primary-lighter: rgba(25, 33, 122, 0.12);
    --rz-primary-dark: var(--pique-blue-dark);
    --rz-primary-darker: #0A0E3C;
    --rz-on-primary: #FFFFFF;
    --rz-secondary: var(--pique-red);
    --rz-secondary-light: #D2453F;
    --rz-secondary-lighter: rgba(186, 38, 32, 0.12);
    --rz-secondary-dark: #951E19;
    --rz-on-secondary: #FFFFFF;
    --rz-body-background-color: var(--pique-bg);
    --rz-border-radius: 8px;
}

/* Radzen theme overrides: html:root has a higher specificity than the theme's :root,
   so the order in which the stylesheets are loaded does not matter */
html:root {
    /* cards: white on the grey body */
    --rz-card-background-color: #FFFFFF;
    --rz-card-flat-background-color: #FFFFFF;

    /* sidebar + panel menu: light instead of the dark default of the standard theme */
    --rz-sidebar-background-color: #FFFFFF;
    --rz-sidebar-color: #2E3450;
    --rz-sidebar-border-inline-end: 1px solid var(--pique-border);
    --rz-panel-menu-item-color: #2E3450;
    --rz-panel-menu-item-background-color: transparent;
    --rz-panel-menu-item-border: none;
    --rz-panel-menu-item-border-radius: 8px;
    --rz-panel-menu-item-hover-color: var(--pique-blue);
    --rz-panel-menu-item-hover-background-color: #EEF0F8;
    --rz-panel-menu-item-active-color: var(--pique-blue);
    --rz-panel-menu-item-active-background-color: rgba(25, 33, 122, 0.10);
    --rz-panel-menu-item-active-indicator: var(--pique-red);
    --rz-panel-menu-icon-color: #6B7390;
}

/* the Radzen theme does not set a font on body: texts outside of components
   (e.g. validator messages) would otherwise fall back to the browser default serif font */
html, body {
    background: var(--pique-bg);
    font-family: var(--rz-text-font-family);
    font-size: var(--rz-body-font-size);
    line-height: var(--rz-body-line-height);
    color: var(--rz-text-color);
}

.rz-messages-error {
    font-family: var(--rz-text-font-family);
    font-size: 0.8125rem;
    line-height: 1.3;
}

.pique-full {
    width: 100%;
}

.pique-muted {
    color: var(--pique-muted);
}

.pique-mono input,
.pique-mono {
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    letter-spacing: 0.02em;
}

.pique-uppercase input {
    text-transform: uppercase;
}

.pique-loading {
    display: flex;
    justify-content: center;
    padding: 3rem 0;
}

/* ---------- layout ---------- */
.pique-header {
    background: #FFFFFF !important;
    border-bottom: 3px solid var(--pique-blue);
    box-shadow: 0 1px 6px rgba(16, 22, 90, 0.08);
}

.pique-header-bar {
    padding: 0.35rem 1rem 0.35rem 0.5rem;
    min-height: 60px;
}

.pique-header .rz-sidebar-toggle {
    color: var(--pique-blue);
}

.pique-brand {
    display: inline-flex;
    align-items: center;
}

.pique-logo {
    height: 40px;
    width: auto;
    display: block;
}

.pique-env-badge {
    letter-spacing: 0.08em;
    font-weight: 700;
}

.pique-profile .rz-navigation-item-link,
.pique-profile {
    color: var(--pique-blue);
}

.pique-username {
    font-weight: 600;
}

.pique-sidebar .rz-panel-menu {
    padding: 0.75rem 0.5rem;
}

.pique-sidebar .rz-navigation-item {
    margin-bottom: 0.125rem;
}

.pique-sidebar .rz-navigation-item-link {
    font-weight: 500;
}

.pique-sidebar .rz-navigation-item-wrapper-active .rz-navigation-item-link {
    font-weight: 700;
}

.pique-body {
    background: var(--pique-bg);
}

.pique-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem;
}

.pique-footer {
    background: #FFFFFF;
    border-top: 1px solid var(--pique-border);
    padding: 0.75rem 1.5rem;
    color: var(--pique-muted);
}

.pique-page-head {
    margin-bottom: 1.25rem;
}

.pique-page-head h1 {
    color: var(--pique-blue);
    font-weight: 700;
}

/* ---------- cards & forms ---------- */
.pique-card {
    background: #FFFFFF !important;
    border: 1px solid var(--pique-border) !important;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(16, 22, 90, 0.04);
    padding: 1.25rem;
}

.pique-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem 0;
    color: var(--pique-blue);
    font-weight: 700;
}

/* validation state: Radzen draws the frame on .rz-form-field-content, not on the input */
.rz-form-field:has(.invalid) .rz-form-field-content,
.rz-form-field:has(.invalid):hover .rz-form-field-content,
.rz-form-field.rz-state-focused:has(.invalid) .rz-form-field-content {
    border-color: var(--rz-danger);
}

.rz-form-field.rz-state-focused:has(.invalid) .rz-form-field-content {
    box-shadow: 0 0 0 1px var(--rz-danger);
}

.pique-triptype {
    padding: 0.25rem 0;
}

.pique-alert {
    margin-bottom: 1.25rem;
}

.pique-submit {
    min-width: 260px;
}

.pique-filter {
    margin-bottom: 1.25rem;
}

.pique-filter-button {
    height: 48px;
}

/* ---------- result ---------- */
.pique-result-wrap {
    max-width: 760px;
}

.pique-result {
    border-top: 4px solid #1E8E3E !important;
}

.pique-result-actions {
    margin-top: 1rem;
}

/* equal buttons, independent of the text length / language */
.pique-action-button {
    min-width: 10rem;
}

.pique-result-icon-cancelled {
    color: var(--pique-red) !important;
}

/* receipt: logo only on the printout */
.pique-print-only {
    display: none;
}

.pique-receipt-logo {
    max-width: 280px;
    height: auto;
}

.pique-print-body {
    background: #FFFFFF !important;
    padding: 1.5rem;
}

.pique-print-body .pique-print-only {
    display: block;
}

/* ---------- history: card list on small screens ---------- */
.pique-history-list .rz-datalist-data {
    gap: 0.75rem;
    padding: 0;
}

.pique-history-list .rz-datalist-data > li {
    padding: 0;
    border: none;
    background: transparent;
}

.pique-history-item {
    background: #FFFFFF;
    border: 1px solid var(--pique-border);
    border-radius: 12px;
    padding: 0.875rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.pique-history-item-head,
.pique-history-item-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.pique-history-code {
    font-weight: 700;
    color: var(--pique-blue);
}

.pique-history-amount {
    font-weight: 700;
}

.pique-history-route {
    font-weight: 600;
}

.pique-result-icon {
    color: #1E8E3E;
    font-size: 2.25rem !important;
}

.pique-approval {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    background: var(--rz-primary-lighter);
}

.pique-approval-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--pique-muted);
}

.pique-approval-code {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--pique-blue);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.pique-details {
    display: grid;
    grid-template-columns: minmax(140px, max-content) 1fr;
    gap: 0.5rem 1.5rem;
    margin: 0;
}

.pique-details dt {
    color: var(--pique-muted);
}

.pique-details dd {
    margin: 0;
    font-weight: 600;
}

/* ---------- grid ---------- */
.pique-grid {
    border-radius: 12px;
    overflow: hidden;
    background: #FFFFFF;
}

.pique-negative {
    color: var(--pique-red);
    font-weight: 600;
}

.pique-subtext {
    font-size: 0.8rem;
    color: var(--pique-muted);
}

.pique-inline-icon {
    font-size: 1rem !important;
    vertical-align: middle;
    margin-left: 0.25rem;
    color: var(--pique-muted);
}

.pique-primary-icon {
    color: var(--pique-blue);
}

/* ---------- static pages ---------- */
.pique-prose p {
    margin: 0 0 1rem 0;
    line-height: 1.6;
}

.pique-empty {
    padding: 4rem 1rem;
    text-align: center;
}

.pique-empty-icon {
    font-size: 4rem !important;
    color: var(--pique-blue);
}

/* ---------- login ---------- */
.pique-login-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(25, 33, 122, 0.18), transparent 60%),
        radial-gradient(900px 500px at 110% 110%, rgba(186, 38, 32, 0.12), transparent 60%),
        var(--pique-bg);
}

.pique-login-lang {
    display: flex;
    justify-content: flex-end;
    padding: 1rem 1.25rem 0 1.25rem;
}

.pique-login-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
}

.pique-login-card {
    width: 100%;
    max-width: 440px;
    padding: 2rem !important;
    border-radius: 16px !important;
    box-shadow: 0 12px 40px rgba(16, 22, 90, 0.12) !important;
    border-top: 4px solid var(--pique-blue) !important;
}

.pique-login-logo {
    width: 100%;
    max-width: 340px;
    height: auto;
    align-self: center;
}

.pique-login-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    font-size: 0.85rem;
    color: var(--pique-muted);
}

/* ---------- responsive ---------- */
@media (max-width: 768px) {
    .pique-content {
        padding: 1rem 0.75rem;
    }

    .pique-logo {
        height: 30px;
    }

    .pique-username {
        display: none;
    }

    .pique-submit {
        width: 100%;
        min-width: 0;
    }

    .pique-result-actions .pique-action-button {
        flex: 1 1 0;
        min-width: 0;
    }

    .pique-details {
        grid-template-columns: 1fr;
        gap: 0.125rem;
    }

    .pique-details dd {
        margin-bottom: 0.5rem;
    }

    .pique-login-card {
        padding: 1.5rem !important;
    }
}

/* ---------- print (authorization receipt) ---------- */
@media print {
    .pique-header, .pique-sidebar, .pique-footer, .pique-noprint, .rz-sidebar, .rz-header, .rz-footer {
        display: none !important;
    }

    .pique-body, .pique-content, body {
        background: #FFFFFF !important;
        padding: 0 !important;
    }

    .pique-result {
        box-shadow: none;
        border: 1px solid #CCC !important;
    }
}
