:root {
    --covicol-red: #c91e25;
    --covicol-red-dark: #9d151b;
    --covicol-ink: #17191c;
    --covicol-muted: #6b7280;
    --covicol-bg: #f4f5f7;
}

body {
    background: var(--covicol-bg);
    color: var(--covicol-ink);
    min-height: 100vh;
}

a { color: var(--covicol-red-dark); }
a:hover { color: var(--covicol-red); }

.btn-primary {
    --bs-btn-bg: var(--covicol-red);
    --bs-btn-border-color: var(--covicol-red);
    --bs-btn-hover-bg: var(--covicol-red-dark);
    --bs-btn-hover-border-color: var(--covicol-red-dark);
    --bs-btn-active-bg: var(--covicol-red-dark);
    --bs-btn-active-border-color: var(--covicol-red-dark);
}

.form-control:focus, .form-select:focus, .form-check-input:focus {
    border-color: rgba(201, 30, 37, .5);
    box-shadow: 0 0 0 .25rem rgba(201, 30, 37, .12);
}

.form-check-input:checked { background-color: var(--covicol-red); border-color: var(--covicol-red); }

.guest-shell {
    min-height: 0;
    flex: 1 0 auto;
    background:
        radial-gradient(circle at 10% 20%, rgba(201, 30, 37, .14), transparent 30rem),
        linear-gradient(135deg, #111317 0%, #24272c 56%, #f4f5f7 56%, #f4f5f7 100%);
}

.guest-page { min-height: 100vh; display: flex; flex-direction: column; }

.auth-card {
    width: min(440px, calc(100vw - 2rem));
    border: 0;
    border-radius: 1.25rem;
    box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, .24);
}

.brand-logo { display: block; width: min(100%, 350px); height: auto; margin: 0 auto; }
.app-brand-panel { background: #fff; border-bottom: 1px solid #d9dde3; }
.app-brand-logo { display: block; width: min(100%, 255px); height: auto; margin: 0 auto; }

.app-sidebar {
    width: 272px;
    min-height: 100vh;
    background: #15171a;
    color: #fff;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1030;
    overflow-y: auto;
}

.app-sidebar .nav-link {
    color: #d4d7dc;
    border-radius: .65rem;
    margin: .1rem .75rem;
    padding: .65rem .85rem;
}

.app-sidebar .nav-link:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.sidebar-title { color: #858b94; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; }
.app-main { margin-left: 272px; min-height: 100vh; display: flex; flex-direction: column; }
.app-topbar { background: #fff; border-bottom: 1px solid #e5e7eb; min-height: 72px; }
.user-menu-identity { max-width: 13rem; }
.user-avatar { width: 2rem; height: 2rem; flex: 0 0 2rem; display: grid; place-items: center; border-radius: 50%; background: var(--covicol-red); color: #fff; font-size: .76rem; font-weight: 700; letter-spacing: .02em; }
.dropdown-toggle-indicator { color: #6b7280; font-size: .75rem; }
.user-menu .dropdown-menu { min-width: 13rem; }
.user-menu .dropdown-item { padding-top: .55rem; padding-bottom: .55rem; }
.content-wrap { padding: 1.75rem; flex: 1 0 auto; }
.app-footer { padding: 1rem 1.75rem; border-top: 1px solid #e5e7eb; color: #6b7280; background: #fff; font-size: .78rem; text-align: center; letter-spacing: .02em; }
.guest-footer { flex: 0 0 auto; background: #15171a; border-color: rgba(255,255,255,.1); color: #d4d7dc; }

.metric-card, .panel-card {
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    box-shadow: 0 .35rem 1.25rem rgba(17, 24, 39, .05);
}

.metric-value { font-size: 2rem; font-weight: 750; line-height: 1; }
.metric-label { color: var(--covicol-muted); font-size: .875rem; }
.metric-accent { width: .45rem; border-radius: 1rem; background: var(--covicol-red); }
.table > :not(caption) > * > * { padding: .8rem .75rem; }
.table thead th { color: #4b5563; font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; }
.badge-soft-success { color: #12633d; background: #dff5e9; }
.badge-soft-secondary { color: #4b5563; background: #edf0f3; }
.permission-group { border: 1px solid #e5e7eb; border-radius: .85rem; }
.code-label { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .82rem; }
.status-dot { width: .55rem; height: .55rem; border-radius: 50%; display: inline-block; background: currentColor; }
.request-object { max-width: 34rem; }
.timeline { position: relative; padding-left: 1.65rem; }
.timeline::before { content: ""; position: absolute; left: .42rem; top: .4rem; bottom: .4rem; width: 2px; background: #d9dde3; }
.timeline-item { position: relative; padding: 0 0 1.25rem .5rem; }
.timeline-item::before { content: ""; position: absolute; left: -1.47rem; top: .3rem; width: .8rem; height: .8rem; border-radius: 50%; background: #fff; border: 3px solid var(--covicol-red); }
.item-card { border: 1px solid #dfe2e6; border-radius: .85rem; background: #fff; }
.item-number { width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 50%; background: #25282d; color: #fff; font-weight: 700; }
.sticky-actions { position: sticky; bottom: 0; z-index: 10; border-top: 1px solid #ddd; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); }
.hash-text { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .74rem; word-break: break-all; }
.summary-term { color: #6b7280; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
.summary-value { font-weight: 600; margin-bottom: 1rem; }
.verification-result { position: relative; }
.verification-result-content { position: relative; z-index: 1; }
.verification-page { min-height: 100vh; display: flex; flex-direction: column; background: #f4f5f7; }
.verification-page main { flex: 1 0 auto; }
.verification-public-header { background: #fff; border-bottom: 1px solid #e5e7eb; box-shadow: 0 .2rem 1rem rgba(17,24,39,.04); }
.verification-public-logo { display: block; width: min(250px, 55vw); height: 58px; object-fit: contain; object-position: left center; }
.verification-result { border: 1px solid #e1e4e8; border-radius: 1rem; background: #fff; box-shadow: 0 .5rem 2rem rgba(17,24,39,.07); padding: clamp(1rem, 3vw, 2rem); overflow: hidden; }
.verification-section { border-top: 1px solid #e5e7eb; padding-top: 1.25rem; margin-top: 1.25rem; }
.verification-section:first-of-type { border-top: 0; padding-top: 0; }
.verification-field { border: 1px solid #e5e7eb; border-radius: .7rem; background: #fafafa; padding: .85rem 1rem; }
.verification-field .summary-value { margin-bottom: 0; }
.verification-timeline { border-left: 2px solid #d8dce1; margin-left: .6rem; padding-left: 1.25rem; }
.verification-event { position: relative; border: 1px solid #e1e4e8; border-radius: .75rem; padding: 1rem; margin-bottom: 1rem; background: #fff; }
.verification-event:last-child { margin-bottom: 0; }
.verification-event::before { content: ""; position: absolute; left: -1.72rem; top: 1.1rem; width: .8rem; height: .8rem; border: 3px solid #fff; border-radius: 50%; background: #d49b00; box-shadow: 0 0 0 1px #d8dce1; }
.verification-event-positive::before { background: #198754; }
.verification-event-negative::before { background: #dc3545; }
.verification-search-card { min-height: 15rem; display: grid; place-items: center; }
.verification-annulled-watermark {
    position: absolute;
    inset: 46% auto auto 50%;
    z-index: 0;
    transform: translate(-50%, -50%) rotate(-35deg);
    color: rgba(185, 28, 28, .13);
    font-size: clamp(3.5rem, 14vw, 6.5rem);
    font-weight: 900;
    letter-spacing: .08em;
    line-height: 1;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
}
.currency-select { width: 6rem; }
.purchase-progress { width: 100%; height: .65rem; accent-color: var(--covicol-red); }
.comparison-scroll { max-height: 70vh; }
.comparison-table { min-width: 980px; font-size: .86rem; }
.comparison-table thead th { position: sticky; top: 0; z-index: 2; background: #f5f6f8; min-width: 235px; }
.comparison-table .comparison-item-column { min-width: 280px; left: 0; z-index: 3; }
.comparison-table tbody th { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 280px; }
.comparison-minimum { background: #e9f8ef !important; }
.comparison-partial { background: #fff8db !important; }
.comparison-invalid { background: #fdebec !important; }
.comparison-missing { background: #f4f5f7 !important; }
.form-error-highlight {
    outline: 3px solid rgba(220, 53, 69, .35);
    outline-offset: 2px;
    border-radius: .4rem;
    animation: form-error-pulse 1.1s ease-in-out 2;
}
.select2-container.form-error-highlight .select2-selection { border-color: #dc3545; }
@keyframes form-error-pulse {
    50% { box-shadow: 0 0 0 .3rem rgba(220, 53, 69, .12); }
}
.tax-option-card { border: 1px solid #d9dde3; border-radius: .9rem; padding: 1rem; background: #fff; transition: opacity .15s ease, background-color .15s ease; }
.tax-option-card.is-disabled { opacity: .68; background: #f6f7f8; }
.retention-row { display: flex; align-items: center; gap: 1rem; padding: .8rem 0; border-top: 1px solid #e5e7eb; }
.retention-row:first-child { border-top: 0; padding-top: 0; }
.retention-row:last-child { padding-bottom: 0; }
.retention-percentage { width: 9rem; flex: 0 0 9rem; }

.sigco-chat { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1080; }
.sigco-clarification-fab { position: fixed; right: 1.25rem; bottom: 5.25rem; z-index: 1075; }
.sigco-clarification-fab .btn { width: 2.65rem; height: 2.65rem; border-radius: 50%; padding: 0; display: grid; place-items: center; font-size: 1.15rem; line-height: 1; font-weight: 800; }
.sigco-chat-toggle { border: 0; border-radius: 999px; padding: .8rem 1.15rem; background: linear-gradient(135deg,#b0061b,#790312); color: #fff; font-weight: 700; box-shadow: 0 .75rem 2rem rgba(94,3,15,.3); display: flex; align-items: center; gap: .5rem; }
.sigco-chat-toggle-icon { width: 1.7rem; height: 1.7rem; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.18); }
.sigco-chat-panel { position: absolute; right: 0; bottom: 3.8rem; width: min(390px,calc(100vw - 2rem)); max-height: min(650px,calc(100vh - 6rem)); overflow: hidden; border: 1px solid #dfe2e6; border-radius: 1rem; background: #fff; box-shadow: 0 1.2rem 3rem rgba(17,24,39,.24); }
.sigco-chat-header { padding: 1rem 1.1rem; color: #fff; background: linear-gradient(135deg,#25282d,#111827); display: flex; justify-content: space-between; align-items: center; }
.sigco-chat-header div div { font-size: .75rem; color: #d1d5db; }
.sigco-chat-close { border: 0; background: transparent; color: #fff; font-size: 1.7rem; line-height: 1; }
.sigco-chat-messages { height: 310px; overflow-y: auto; padding: 1rem; background: #f5f6f8; display: flex; flex-direction: column; gap: .75rem; }
.sigco-chat-message { max-width: 88%; padding: .7rem .85rem; border-radius: .85rem; white-space: pre-line; font-size: .9rem; line-height: 1.4; }
.sigco-chat-message.is-assistant { align-self: flex-start; background: #fff; border: 1px solid #e1e4e8; }
.sigco-chat-message.is-user { align-self: flex-end; color: #fff; background: #8f0719; }
.sigco-chat-message.is-error { align-self: flex-start; color: #842029; background: #f8d7da; border: 1px solid #f5c2c7; }
.sigco-chat-links { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .6rem; }
.sigco-chat-links a { border: 1px solid #b0061b; border-radius: 999px; padding: .25rem .55rem; color: #8f0719; background: #fff; font-size: .76rem; font-weight: 600; text-decoration: none; }
.sigco-chat-suggestions { display: flex; gap: .4rem; padding: .65rem .8rem; overflow-x: auto; border-top: 1px solid #e5e7eb; background: #fff; }
.sigco-chat-suggestions button { flex: 0 0 auto; border: 1px solid #d7dbe0; border-radius: 999px; padding: .35rem .65rem; background: #fff; color: #343a40; font-size: .75rem; }
.sigco-chat-form { display: grid; grid-template-columns: 1fr auto; gap: .5rem; padding: .8rem; border-top: 1px solid #e5e7eb; background: #fff; }
.sigco-chat-form textarea { resize: none; border: 1px solid #ced4da; border-radius: .65rem; padding: .55rem .65rem; font: inherit; }
.sigco-chat-form button { border: 0; border-radius: .65rem; padding: 0 .85rem; color: #fff; background: #b0061b; font-weight: 600; }
.sigco-chat-form button:disabled { opacity: .65; }
.sigco-chat-disclaimer { padding: 0 .8rem .7rem; color: #6b7280; background: #fff; font-size: .68rem; }

@media (max-width: 991.98px) {
    .app-sidebar { position: static; width: 100%; min-height: auto; }
    .app-main { margin-left: 0; }
    .content-wrap { padding: 1rem; }
    .sidebar-scroll { display: flex; overflow-x: auto; padding-bottom: .5rem; }
    .app-sidebar .nav-link { white-space: nowrap; }
}

@media (max-width: 575.98px) {
    .verification-public-logo { height: 46px; }
    .retention-row { align-items: flex-start; flex-direction: column; }
    .retention-percentage { width: 100%; flex-basis: auto; }
    .sigco-chat { right: .75rem; bottom: .75rem; }
    .sigco-chat-panel { bottom: 3.65rem; }
    .sigco-chat-messages { height: min(310px,45vh); }
}
