/* ITC Safety Certificados - internal UI/UX hardening */
:root {
    --itc-navy: #12376b;
    --itc-navy-strong: #0f2a52;
    --itc-ink: #17212b;
    --itc-muted: #475569;
    --itc-line: #d9e0e7;
    --itc-soft: #f6f8fb;
    --itc-surface: #ffffff;
    --itc-red: #c41e1e;
    --itc-green: #15803d;
    --itc-amber: #b45309;
    --itc-teal: #0f766e;
}

html {
    background: var(--itc-soft);
}

body {
    color: var(--itc-ink);
}

.fi-body {
    background:
        linear-gradient(180deg, #f8fafc 0%, #f3f7fb 46%, #eef3f8 100%) !important;
}

.fi-main {
    padding-top: 1rem;
}

.fi-header-heading,
.fi-header-subheading {
    letter-spacing: 0;
}

.fi-header-heading {
    color: var(--itc-ink);
    font-weight: 850;
}

.fi-header-subheading {
    color: var(--itc-muted);
}

.fi-header {
    align-items: flex-start !important;
    flex-wrap: wrap !important;
    gap: 0.75rem 1rem !important;
}

.fi-header-actions-ctn {
    max-width: 100% !important;
    overflow: visible !important;
}

.fi-header-actions-ctn > .fi-ac {
    flex-wrap: wrap !important;
    justify-content: flex-end !important;
    row-gap: 0.5rem !important;
}

/* Sidebar */
.fi-sidebar,
.fi-sidebar-header,
.fi-sidebar-header-ctn,
.fi-sidebar-footer {
    background: linear-gradient(180deg, #10284f 0%, #132952 100%) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.fi-sidebar-item-label {
    color: #cbd5e1 !important;
}

.fi-sidebar-item-btn {
    border-radius: 8px !important;
}

.fi-sidebar-item-btn:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
}

.fi-sidebar-item.fi-active .fi-sidebar-item-label,
.fi-sidebar-item[aria-current="page"] .fi-sidebar-item-label {
    color: #ffffff !important;
    font-weight: 750;
}

.fi-sidebar-item.fi-active .fi-sidebar-item-btn,
.fi-sidebar-item[aria-current="page"] .fi-sidebar-item-btn {
    background-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: inset 3px 0 0 var(--itc-red);
}

.fi-sidebar-item-btn svg {
    color: #93c5fd !important;
}

.fi-sidebar-item.fi-active .fi-sidebar-item-btn svg,
.fi-sidebar-item[aria-current="page"] .fi-sidebar-item-btn svg {
    color: #ffffff !important;
}

.fi-sidebar-group-label {
    color: #8ea3bd !important;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.fi-topbar {
    border-bottom-color: rgba(217, 224, 231, 0.85) !important;
    backdrop-filter: blur(10px);
}

.fi-topbar-open-sidebar-btn,
.fi-topbar-close-sidebar-btn,
.fi-sidebar-close-sidebar-btn,
.fi-sidebar-close-collapse-sidebar-btn,
.fi-sidebar-open-collapse-sidebar-btn,
.fi-sidebar-database-notifications-btn {
    color: #93c5fd !important;
}

/* Panels, sections and cards */
.fi-section,
.fi-modal-window,
.fi-fo-field-wrp,
.fi-ta-ctn,
.fi-wi-widget,
.fi-wi-stats-overview-stat {
    border-color: var(--itc-line) !important;
    border-radius: 10px !important;
}

.fi-section,
.fi-ta-ctn,
.fi-wi-stats-overview-stat {
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05) !important;
}

.fi-section-header {
    border-bottom-color: rgba(217, 224, 231, 0.8) !important;
}

.fi-section-header-heading,
.fi-wi-stats-overview-stat-label {
    color: var(--itc-ink) !important;
    font-weight: 800 !important;
}

.fi-section-header-description,
.fi-wi-stats-overview-stat-description,
.fi-ta-text {
    color: var(--itc-muted) !important;
}

/* Tables */
.fi-ta-header,
.fi-ta-toolbar {
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.fi-ta-table thead {
    background: #f8fafc;
}

.fi-ta-table th {
    color: #334155 !important;
    font-size: 0.72rem;
    font-weight: 850 !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.fi-ta-row:hover {
    background: #f8fbff !important;
}

.fi-ta-cell {
    vertical-align: middle;
}

.fi-ta-actions {
    white-space: nowrap;
}

/* Buttons and actions */
.fi-btn {
    border-radius: 8px !important;
    font-weight: 750 !important;
}

.fi-btn-color-primary {
    background-color: var(--itc-navy) !important;
}

.fi-btn-color-info {
    background-color: var(--itc-teal) !important;
}

.fi-btn-color-warning {
    color: #78350f !important;
}

.fi-btn-color-danger {
    background-color: var(--itc-red) !important;
}

/* Badges and semantic states */
.fi-badge {
    border-radius: 999px !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
}

.fi-badge-color-warning {
    background: #fef3c7 !important;
    color: #92400e !important;
}

.fi-badge-color-success {
    background: #dcfce7 !important;
    color: #166534 !important;
}

.fi-badge-color-danger {
    background: #fee2e2 !important;
    color: #991b1b !important;
}

.fi-badge-color-info {
    background: #ccfbf1 !important;
    color: #115e59 !important;
}

.fi-badge-color-primary {
    background: #dbeafe !important;
    color: #1e3a8a !important;
}

.fi-badge-color-gray {
    background: #f1f5f9 !important;
    color: #475569 !important;
}

/* Forms */
.fi-input,
.fi-select-input,
.fi-textarea {
    border-radius: 8px !important;
}

.fi-input:focus,
.fi-select-input:focus,
.fi-textarea:focus {
    box-shadow: 0 0 0 4px rgba(18, 55, 107, 0.12) !important;
}

.fi-fo-field-wrp-label {
    color: #334155 !important;
    font-weight: 750 !important;
}

.fi-fo-field-wrp-helper-text {
    color: var(--itc-muted) !important;
}

/* Dashboard density */
.fi-wi-stats-overview-stat {
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
}

.fi-wi-stats-overview-stat-value {
    color: var(--itc-navy-strong) !important;
    font-weight: 900 !important;
}

.fi-wi-stats-overview-stat-icon {
    color: var(--itc-navy) !important;
}

@media (max-width: 768px) {
    .fi-main {
        padding-inline: 0.75rem !important;
    }

    .fi-section,
    .fi-modal-window,
    .fi-ta-ctn,
    .fi-wi-stats-overview-stat {
        border-radius: 8px !important;
    }

    .fi-ta-content {
        overflow-x: auto;
    }
}
