/* Estilo común para los módulos administrativos de Azúcar ERP. */
.fi-main {
    --azucar-primary: #4f46e5;
    --azucar-primary-dark: #312e81;
    --azucar-primary-soft: #f5f3ff;
    --azucar-border: #ddd6fe;
    --azucar-text: #172033;
    --azucar-muted: #64748b;
}

.fi-sidebar {
    border-right: 1px solid #ddd6fe;
    background: linear-gradient(180deg, #ffffff, #fafaff);
}

.fi-sidebar-group-label {
    color: #6d28d9 !important;
    font-weight: 800 !important;
    letter-spacing: .04em;
}

.fi-sidebar-item-button {
    border-radius: 9px !important;
}

.fi-sidebar-item-active > .fi-sidebar-item-button,
.fi-sidebar-item-button:hover {
    background: #f5f3ff !important;
}

.fi-section,
.fi-ta,
.fi-in-table-repeatable,
.fi-in-repeatable-item,
.fi-fo-repeater-item {
    overflow: hidden;
    border: 1px solid var(--azucar-border) !important;
    border-radius: 14px !important;
    background: #ffffff;
    box-shadow: 0 1px 3px rgb(15 23 42 / 8%);
}

.fi-section-header {
    padding: 1.1rem 1.35rem !important;
    border-bottom: 1px solid #ddd6fe;
    background: linear-gradient(135deg, #f5f3ff, #eef2ff);
}

.fi-section-header-heading,
.fi-section-header-description {
    color: var(--azucar-primary-dark) !important;
}

.fi-section-header-heading {
    font-size: 1.05rem !important;
    font-weight: 800 !important;
}

.fi-section-content {
    padding: 1.35rem !important;
}

.fi-in-repeatable-item,
.fi-fo-repeater-item {
    margin-bottom: .85rem;
    background: #fafaff;
}

.fi-in-repeatable-item:last-child,
.fi-fo-repeater-item:last-child {
    margin-bottom: 0;
}

.fi-in-table-repeatable {
    max-width: 100%;
    overflow-x: auto;
}

.fi-in-table-repeatable > table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    font-size: .875rem;
    text-align: left;
}

.fi-in-table-repeatable > table > thead > tr > th {
    padding: .95rem 1.1rem;
    background: var(--azucar-primary);
    color: #ffffff;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .025em;
    text-transform: uppercase;
}

.fi-in-table-repeatable > table > tbody > tr:nth-child(even) {
    background: #fafaff;
}

.fi-in-table-repeatable > table > tbody > tr > td {
    padding: 1rem 1.1rem;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

.fi-ta-header {
    padding: 1.15rem 1.35rem !important;
    border-bottom: 1px solid #ddd6fe;
    background: linear-gradient(135deg, #f5f3ff, #eef2ff);
}

.fi-ta-header-heading {
    color: var(--azucar-primary-dark) !important;
    font-weight: 800 !important;
}

.fi-ta-filters {
    margin-bottom: 1rem;
    overflow: hidden;
    border: 1px solid var(--azucar-border) !important;
    border-radius: 14px !important;
    background: #fafaff;
    box-shadow: 0 1px 3px rgb(15 23 42 / 6%);
}

.fi-ta-filters-header {
    border-bottom: 1px solid #ddd6fe;
    background: #f5f3ff;
}

.fi-ta-search-field .fi-input-wrp,
.fi-fo-field-wrp .fi-input-wrp {
    border-radius: 9px !important;
}

.fi-fo-field-wrp .fi-input,
.fi-fo-field-wrp .fi-select-input,
.fi-fo-field-wrp .fi-textarea {
    border-radius: 8px !important;
}

.fi-ta-table > thead > tr > th,
.fi-ta-table > thead > tr > td {
    padding-top: .95rem !important;
    padding-bottom: .95rem !important;
    background: var(--azucar-primary) !important;
    color: #ffffff !important;
    font-size: .75rem !important;
    font-weight: 800 !important;
    letter-spacing: .025em;
    text-transform: uppercase;
}

.fi-ta-table > tbody > tr > td {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
    color: var(--azucar-text);
}

.fi-ta-table > tbody > tr:nth-child(even) {
    background: #fafaff;
}

.fi-ta-table > tbody > tr:hover {
    background: #f5f3ff !important;
}

.fi-fo-field-wrp-label > label,
.fi-fo-field-wrp-label > span {
    color: #334155 !important;
    font-weight: 700 !important;
}

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

.fi-btn.fi-color-primary {
    box-shadow: 0 2px 5px rgb(79 70 229 / 20%);
}

.fi-modal-window {
    overflow: hidden;
    border: 1px solid var(--azucar-border) !important;
    border-radius: 16px !important;
    box-shadow: 0 22px 50px rgb(15 23 42 / 20%) !important;
}

.fi-modal-header {
    border-bottom: 1px solid #ddd6fe;
    background: linear-gradient(135deg, #f5f3ff, #eef2ff);
}

.fi-modal-heading {
    color: var(--azucar-primary-dark) !important;
    font-weight: 800 !important;
}

.fi-modal-description {
    color: #5b21b6 !important;
}

.fi-modal-footer {
    border-top: 1px solid #e5e7eb;
    background: #fafaff;
}

.fi-ta-empty-state,
.fi-in-placeholder {
    border: 1px dashed #c4b5fd;
    border-radius: 12px;
    background: #fafaff;
    color: #5b21b6 !important;
}

.fi-ta-empty-state {
    margin: 1rem;
    padding: 2rem !important;
}

.fi-in-placeholder {
    padding: 1.25rem !important;
    text-align: center;
}

/* Fichas de consulta: más densas, con la lectura de una tabla operativa. */
.fi-resource-view-record-page .fi-sc {
    gap: .75rem !important;
}

.fi-resource-view-record-page .fi-section {
    border-radius: 10px !important;
}

.fi-resource-view-record-page .fi-section-header {
    min-height: auto !important;
    padding: .65rem .9rem !important;
}

.fi-resource-view-record-page .fi-section-header-heading {
    font-size: .95rem !important;
    line-height: 1.2 !important;
}

.fi-resource-view-record-page .fi-section-header-description {
    margin-top: .15rem !important;
    font-size: .78rem !important;
    line-height: 1.25 !important;
}

.fi-resource-view-record-page .fi-section-content {
    padding: .75rem .9rem !important;
}

.fi-resource-view-record-page .fi-in-entry-label {
    font-size: .72rem !important;
    line-height: 1.15 !important;
}

.fi-resource-view-record-page .fi-in-entry-content {
    font-size: .86rem !important;
    line-height: 1.25 !important;
}

.fi-resource-view-record-page .fi-in-table-repeatable > table {
    font-size: .8rem;
}

.fi-resource-view-record-page .fi-in-table-repeatable > table > thead > tr > th {
    padding: .55rem .75rem;
}

.fi-resource-view-record-page .fi-in-table-repeatable > table > tbody > tr > td {
    padding: .6rem .75rem;
}

@media (max-width: 640px) {
    .fi-section-content {
        padding: 1rem !important;
    }

    .fi-ta-table > thead > tr > th,
    .fi-ta-table > thead > tr > td,
    .fi-ta-table > tbody > tr > td {
        padding-right: .85rem !important;
        padding-left: .85rem !important;
    }
}
