/* Ajustes de FileUpload para formularios de expedientes. */

.fi-fo-file-upload {
    width: 100%;
}

.fi-fo-file-upload .fi-fo-file-upload-error-message {
    order: -1;
    width: 100%;
    border-radius: 0.5rem;
    background: rgba(220, 38, 38, 0.08);
    padding: 0.5rem 0.75rem;
    font-weight: 600;
}

.dark .fi-fo-file-upload .fi-fo-file-upload-error-message {
    background: rgba(248, 113, 113, 0.12);
}

.fi-fo-file-upload .filepond--root {
    width: 100%;
}

.fi-fo-file-upload .filepond--root[data-has-files] .filepond--drop-label {
    position: relative;
    transform: none;
}

.fi-fo-file-upload .filepond--root[data-has-files] .filepond--list-scroller {
    margin-top: 0.5rem;
}

.fi-fo-file-upload .filepond--item {
    min-height: 3.25rem;
}

/* Explorador de archivos de expedientes. No depende de Tailwind compilado. */
.efe {
    overflow: visible;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.dark .efe {
    border-color: rgba(255, 255, 255, 0.12);
    background: #111827;
}

.efe__header {
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(248, 250, 252, 0.88);
    padding: 1rem 1.25rem;
}

.dark .efe__header {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(3, 7, 18, 0.35);
}

.efe__header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.efe__title {
    margin: 0;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 700;
}

.dark .efe__title {
    color: #ffffff;
}

.efe__subtitle {
    margin: 0.25rem 0 0;
    color: #64748b;
    font-size: 0.875rem;
}

.dark .efe__subtitle {
    color: #cbd5e1;
}

.efe__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.efe__tab,
.efe__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 0.7rem;
    background: #ffffff;
    color: #334155;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
    padding: 0.5rem 0.75rem;
    text-decoration: none;
    transition: 120ms ease;
}

.efe__tab:hover,
.efe__btn--ghost:hover {
    border-color: #6d953a;
    color: #4f7f22;
}

.efe__tab.is-active {
    border-color: #6d953a;
    background: rgba(109, 149, 58, 0.12);
    color: #4f7f22;
}

.dark .efe__tab,
.dark .efe__btn {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(15, 23, 42, 0.86);
    color: #e5e7eb;
}

.dark .efe__tab.is-active {
    border-color: #8fbd5b;
    background: rgba(109, 149, 58, 0.22);
    color: #b8e083;
}

.efe__body {
    display: grid;
    min-width: 0;
    min-height: 28rem;
    grid-template-columns: minmax(14rem, 18rem) minmax(0, 1fr);
    overflow: visible;
}

.efe__sidebar {
    border-right: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(248, 250, 252, 0.7);
    padding: 1rem;
}

.dark .efe__sidebar {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(3, 7, 18, 0.25);
}

.efe__sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: #0f172a;
    font-size: 0.875rem;
    font-weight: 700;
}

.dark .efe__sidebar-head {
    color: #f8fafc;
}

.efe__link {
    border: 0;
    background: transparent;
    color: #6d953a;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 700;
}

.efe__tree {
    display: grid;
    gap: 0.25rem;
}

.efe__tree-item {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 0.65rem;
    border: 1px solid transparent;
    border-radius: 0.8rem;
    background: transparent;
    color: #334155;
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0.65rem 0.75rem;
    text-align: left;
}

.efe__tree-item:hover {
    background: #ffffff;
}

.efe__tree-item.is-active {
    border-color: rgba(109, 149, 58, 0.5);
    background: rgba(109, 149, 58, 0.12);
    color: #4f7f22;
    font-weight: 700;
}

.efe__tree-item.is-drop-target,
.efe__crumb.is-drop-target,
.efe__item.is-drop-target {
    border-color: #6d953a !important;
    background: rgba(109, 149, 58, 0.18) !important;
    box-shadow: inset 0 0 0 2px rgba(109, 149, 58, 0.25);
}

.dark .efe__tree-item {
    color: #e5e7eb;
}

.dark .efe__tree-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.efe__tree-item span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.efe--compact-sidebar .efe__body {
    grid-template-columns: minmax(11rem, 13rem) minmax(0, 1fr);
}

.efe--compact-sidebar .efe__sidebar {
    padding: 0.75rem 0.65rem;
    overflow-x: hidden;
    overflow-y: auto;
}

.efe--compact-sidebar .efe__sidebar-head {
    display: flex;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
}

.efe--compact-sidebar .efe__tree {
    margin-top: 0;
}

.efe--compact-sidebar .efe__tree-item {
    justify-content: flex-start;
    min-height: 2.5rem;
    padding: 0.5rem 0.6rem;
    text-align: left;
}

.efe--compact-sidebar .efe__tree-icon {
    flex: 0 0 auto;
}

.efe--compact-sidebar .efe__tree-label {
    position: static;
    flex: 1 1 auto;
    min-width: 0;
    transform: none;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.25;
    opacity: 1;
    overflow: hidden;
    padding: 0;
    pointer-events: auto;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.efe--compact-sidebar .efe__tree-label::before {
    display: none;
}

.efe--compact-sidebar .efe__tree-item:hover .efe__tree-label {
    opacity: 1;
}

.efe--compact-sidebar .efe__empty-small {
    display: none;
}

.efe--compact-sidebar .efe__header-inner {
    display: block;
}

.efe--compact-sidebar .efe__actions-grid {
    grid-template-columns: 1fr;
}

.efe--compact-sidebar .efe__action-card {
    padding: 1rem;
}

.efe--compact-sidebar .efe__form-row {
    align-items: center;
}

.efe--compact-sidebar .efe__form-label {
    align-items: center;
    line-height: 1.25;
}

.efe--compact-sidebar .efe__file-input {
    max-width: 100%;
}

.efe--compact-sidebar .efe__item {
    align-items: stretch;
    flex-direction: column;
}

.efe--compact-sidebar .efe__item-main {
    width: 100%;
}

.efe--compact-sidebar .efe__item-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.efe--compact-sidebar .efe__item-title {
    max-width: 100%;
}

.efe--compact-sidebar .efe__item-actions {
    align-self: flex-end;
    max-width: 100%;
}

.efe--compact-sidebar .efe__menu-trigger {
    max-width: 100%;
}

.efe--compact-sidebar .efe__menu {
    right: 0;
}

.efe svg,
.efe__tree-icon,
.efe__crumb-icon,
.efe__crumb-separator,
.efe__form-icon,
.efe__btn svg {
    width: 1rem !important;
    height: 1rem !important;
    flex: 0 0 auto;
}

.efe__tree-icon {
    width: 1.25rem !important;
    height: 1.25rem !important;
}

.efe__tree-icon--folder,
.efe__form-icon--folder {
    color: #d97706;
}

.efe__main {
    display: grid;
    align-content: start;
    gap: 1.25rem;
    min-width: 0;
    overflow: visible;
    padding: 1.25rem;
}

.efe__breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    color: #64748b;
    font-size: 0.875rem;
}

.efe__drag-hint {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 0.45rem;
    border: 1px dashed rgba(109, 149, 58, 0.45);
    border-radius: 999px;
    background: rgba(109, 149, 58, 0.08);
    color: #4f7f22;
    font-size: 0.8125rem;
    font-weight: 700;
    padding: 0.45rem 0.75rem;
}

.efe__drag-hint svg {
    width: 1rem !important;
    height: 1rem !important;
}

.dark .efe__drag-hint {
    border-color: rgba(184, 224, 131, 0.5);
    background: rgba(109, 149, 58, 0.18);
    color: #b8e083;
}

.efe__crumb {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 0;
    border-radius: 0.55rem;
    background: transparent;
    color: #334155;
    cursor: pointer;
    font-weight: 600;
    padding: 0.35rem 0.5rem;
}

.efe__crumb:hover {
    background: rgba(148, 163, 184, 0.14);
}

.dark .efe__crumb {
    color: #e5e7eb;
}

.efe__crumb-separator {
    color: #94a3b8;
}

.efe__actions-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
}

.efe__action-card,
.efe__notice {
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 1rem;
    background: rgba(248, 250, 252, 0.75);
    padding: 1rem;
}

.dark .efe__action-card {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(3, 7, 18, 0.25);
}

.efe__form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #0f172a;
    font-size: 0.875rem;
    font-weight: 700;
}

.dark .efe__form-label {
    color: #f8fafc;
}

.efe__form-row {
    display: flex;
    gap: 0.5rem;
    min-width: 0;
    margin-top: 0.75rem;
}

.efe__input,
.efe__file-input {
    width: 100%;
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 0.75rem;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.875rem;
    padding: 0.55rem 0.75rem;
}

.dark .efe__input,
.dark .efe__file-input {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(15, 23, 42, 0.9);
    color: #ffffff;
}

.efe__file-input {
    border-style: dashed;
    cursor: pointer;
}

.efe__btn--primary {
    border-color: #6d953a;
    background: #6d953a;
    color: #ffffff;
}

.efe__btn--warning {
    border-color: #d97706;
    background: #d97706;
    color: #ffffff;
}

.efe__btn--info {
    border-color: #2563eb;
    background: #2563eb;
    color: #ffffff;
}

.efe__btn--danger {
    border-color: rgba(220, 38, 38, 0.25);
    color: #b91c1c;
}

.efe__btn--danger:hover {
    background: rgba(220, 38, 38, 0.08);
}

.efe__loading {
    margin-top: 0.5rem;
    color: #64748b;
    font-size: 0.75rem;
}

.efe__help-text {
    margin: 0.5rem 0 0;
    color: #64748b;
    font-size: 0.75rem;
}

.dark .efe__help-text {
    color: #cbd5e1;
}

.efe__pending-list {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.85rem;
}

.efe__pending-warning {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(245, 158, 11, 0.45);
    border-radius: 0.85rem;
    background: rgba(245, 158, 11, 0.12);
    color: #fcd34d;
    font-size: 0.8125rem;
    font-weight: 750;
    padding: 0.65rem 0.75rem;
}

.efe__pending-warning svg {
    width: 1rem !important;
    height: 1rem !important;
}

.efe__pending-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(109, 149, 58, 0.35);
    border-radius: 0.9rem;
    background: rgba(15, 23, 42, 0.45);
    padding: 0.75rem;
}

.efe__pending-item::before {
    position: absolute;
    inset: 0;
    width: var(--efe-upload-progress, 0%);
    background: linear-gradient(90deg, rgba(109, 149, 58, 0.42), rgba(109, 149, 58, 0.16));
    content: "";
    transition: width 160ms ease;
}

.efe__pending-icon,
.efe__pending-copy {
    position: relative;
    z-index: 1;
}

.efe__pending-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 2.25rem;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.75rem;
    background: rgba(109, 149, 58, 0.22);
    color: #b8e083;
}

.efe__pending-icon svg {
    width: 1.2rem !important;
    height: 1.2rem !important;
}

.efe__pending-copy {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.efe__pending-title {
    display: block;
    width: 100%;
    margin: 0;
    overflow: hidden;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.efe__pending-meta {
    overflow: hidden;
    margin: 0.15rem 0 0;
    color: #d9f99d;
    font-size: 0.75rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.efe__notice--warning {
    border-color: rgba(217, 119, 6, 0.3);
    background: rgba(251, 191, 36, 0.12);
}

.efe__notice--info {
    border-color: rgba(37, 99, 235, 0.3);
    background: rgba(59, 130, 246, 0.1);
}

.efe__list {
    min-width: 0;
    overflow: visible;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 1rem;
}

.efe__list--interrupciones {
    overflow: visible;
    padding-bottom: 0.25rem;
}

.dark .efe__list {
    border-color: rgba(255, 255, 255, 0.12);
}

.efe__slots-section {
    position: relative;
    overflow: visible;
}

.efe__items {
    margin: 0;
    min-width: 0;
    overflow: visible;
    padding: 0;
    list-style: none;
}

.efe__item {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-width: 0;
    padding: 1rem;
    box-sizing: border-box;
}

.efe__item:has(.efe__menu[style*="display: block"]),
.efe__item:has(.efe__menu:not([style*="display: none"])) {
    z-index: 10000;
}

.efe .efe__items--slots > .efe__slot:has(.efe__menu:not([style*="display: none"])) {
    z-index: 10001;
}

.efe .efe__items--slots > .efe__slot .efe__menu {
    z-index: 10002;
}

.efe__item.is-dragging {
    opacity: 0.48;
}

.efe__items--sortable .efe__item.sortable-chosen,
.efe__items--sortable .efe__item.sortable-ghost,
.efe__items--sortable .efe__item.sortable-drag {
    background: rgba(109, 149, 58, 0.12);
}

.efe__items--sortable .efe__item.sortable-ghost {
    opacity: 0.45;
}

.efe__items--sortable .efe__item-icon {
    cursor: grab;
}

.efe__items--sortable .efe__item-icon:active {
    cursor: grabbing;
}

.efe__interrupciones-item {
    border-left: 4px solid transparent;
}

.efe__interrupciones-item--required {
    border-left-color: #22c55e;
    background: #dcfce7;
}

.efe__interrupciones-item--required:hover {
    background: #bbf7d0;
}

.efe__interrupciones-item--required .efe__item-icon--file {
    background: rgba(34, 197, 94, 0.16);
    color: #15803d;
}

.efe__interrupciones-item--extra {
    border-left-color: #6d953a;
}

.dark .efe__interrupciones-item--required {
    background: rgba(22, 101, 52, 0.28);
    border-left-color: #4ade80;
}

.dark .efe__interrupciones-item--required:hover {
    background: rgba(22, 101, 52, 0.38);
}

.dark .efe__interrupciones-item--required .efe__item-icon--file {
    background: rgba(74, 222, 128, 0.16);
    color: #86efac;
}

.dark .efe__interrupciones-item--extra {
    border-left-color: #84cc16;
}

.efe__item + .efe__item {
    border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.dark .efe__item + .efe__item {
    border-color: rgba(255, 255, 255, 0.1);
}

.efe__item:hover {
    background: rgba(248, 250, 252, 0.75);
}

.dark .efe__item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.efe__item-main {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    min-width: 0;
    overflow: hidden;
    gap: 0.9rem;
}

.efe__item-main--clickable {
    cursor: pointer;
}

.efe__item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 2.75rem;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.9rem;
    cursor: grab;
}

.efe__item-icon:active {
    cursor: grabbing;
}

.efe__item-icon.is-dragging {
    opacity: 0.48;
}

.efe__item-icon svg,
.efe__empty-icon svg {
    width: 1.45rem !important;
    height: 1.45rem !important;
}

.efe__item-icon--folder {
    background: rgba(251, 191, 36, 0.14);
    color: #d97706;
}

.efe__item-icon--file {
    background: rgba(109, 149, 58, 0.12);
    color: #6d953a;
}

.efe__item-copy {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.efe__item-title {
    display: block;
    width: 100%;
    margin: 0;
    max-width: 34rem;
    overflow: hidden;
    border: 0;
    background: transparent;
    color: #0f172a;
    cursor: default;
    font-size: 0.9rem;
    font-weight: 700;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.efe__item-title--button {
    cursor: pointer;
}

.efe__item-title--button:hover {
    color: #6d953a;
}

.dark .efe__item-title {
    color: #ffffff;
}

.efe__item-meta {
    overflow: hidden;
    margin: 0.2rem 0 0;
    color: #64748b;
    font-size: 0.75rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dark .efe__item-meta {
    color: #cbd5e1;
}

.efe__item-actions {
    position: relative;
    z-index: 10000;
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

.efe__medical-toggle {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid rgba(109, 149, 58, 0.35);
    border-radius: 999px;
    color: #4f7f22;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 750;
    padding: 0.45rem 0.65rem;
    white-space: nowrap;
}

.efe__medical-toggle input {
    width: 0.95rem;
    height: 0.95rem;
    accent-color: #6d953a;
}

.dark .efe__medical-toggle {
    border-color: rgba(184, 224, 131, 0.35);
    color: #b8e083;
}

.efe__menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 0.7rem;
    background: transparent;
    color: #cbd5e1;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 700;
    padding: 0.45rem 0.65rem;
}

.efe__menu-trigger svg {
    width: 1rem !important;
    height: 1rem !important;
}

.efe__menu-trigger:hover {
    border-color: #6d953a;
    color: #b8e083;
}

.efe__menu {
    position: absolute;
    top: calc(100% + 0.4rem);
    right: 0;
    z-index: 9999;
    min-width: 11rem;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 0.85rem;
    background: #111827;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.32);
    padding: 0.35rem;
}

.efe__menu-item {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 0.55rem;
    border: 0;
    border-radius: 0.6rem;
    background: transparent;
    color: #e5e7eb;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 650;
    padding: 0.55rem 0.65rem;
    text-align: left;
    text-decoration: none;
}

.efe__menu-item svg {
    width: 1rem !important;
    height: 1rem !important;
}

.efe__menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.efe__menu-item--danger {
    color: #fca5a5;
}

.efe__menu-item--danger:hover {
    background: rgba(220, 38, 38, 0.16);
}

.efe__empty {
    display: grid;
    justify-items: center;
    gap: 0.75rem;
    padding: 3rem 1.5rem;
    text-align: center;
}

.efe__empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    border-radius: 1.25rem;
    background: rgba(148, 163, 184, 0.14);
    color: #94a3b8;
}

.efe__empty-title {
    margin: 0;
    color: #0f172a;
    font-size: 0.9rem;
    font-weight: 700;
}

.dark .efe__empty-title {
    color: #ffffff;
}

.efe__empty-text,
.efe__empty-small {
    margin: 0.25rem 0 0;
    color: #64748b;
    font-size: 0.875rem;
}

.efe__empty-small {
    border: 1px dashed rgba(148, 163, 184, 0.45);
    border-radius: 0.85rem;
    padding: 1rem;
}

.efe__slot-file-input {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.efe__slots-section + .efe__slots-section {
    border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.dark .efe__slots-section + .efe__slots-section {
    border-color: rgba(255, 255, 255, 0.1);
}

.efe__slots-heading {
    margin: 0;
    padding: 0.85rem 1rem 0.35rem;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.dark .efe__slots-heading {
    color: #94a3b8;
}

.efe__slots-hint {
    margin: 0;
    padding: 0 1rem 0.65rem;
    color: #64748b;
    font-size: 0.8125rem;
    line-height: 1.4;
}

.dark .efe__slots-hint {
    color: #94a3b8;
}

.efe__items--slots {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0 0.75rem 0.75rem;
}

.efe__items--slots .efe__item + .efe__item {
    border-top: none;
}

.efe__items--slots .efe__slot {
    align-items: stretch;
    flex-direction: column;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
}

.efe .efe__items--slots > .efe__slot.efe__slot--pending:hover {
    background: #fee2e2 !important;
}

.efe .efe__items--slots > .efe__slot.efe__slot--complete:hover {
    background: #dcfce7 !important;
}

.efe__items--slots .efe__slot--pending:hover,
.efe__items--slots .efe__slot--pending:hover .efe__item-main {
    background: transparent;
}

.efe__slot .efe__item-main {
    flex: 1;
    min-width: 0;
    width: 100%;
}

.efe__slot .efe__item-copy {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.efe__slot-title {
    max-width: none;
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.35;
}

.efe__slot-meta {
    line-height: 1.4;
    word-break: break-word;
}

.efe .efe__items--slots > .efe__slot {
    box-sizing: border-box;
    width: 100%;
    border: 1px solid transparent;
    border-left-width: 4px;
    border-radius: 0.75rem;
    padding: 1rem;
}

.efe .efe__items--slots > .efe__slot.efe__slot--pending {
    border-color: #dc2626;
    border-left-color: #b91c1c;
    background: #fef2f2;
}

.efe .efe__items--slots > .efe__slot.efe__slot--complete {
    border-color: #16a34a;
    border-left-color: #15803d;
    background: #f0fdf4;
}

.efe .efe__items--slots > .efe__slot.efe__slot--pending .efe__item-title,
.efe .efe__items--slots > .efe__slot.efe__slot--pending .efe__slot-title,
.efe .efe__items--slots > .efe__slot.efe__slot--pending .efe__item-meta,
.efe .efe__items--slots > .efe__slot.efe__slot--pending .efe__slot-meta {
    color: #b91c1c !important;
}

.efe .efe__items--slots > .efe__slot.efe__slot--complete .efe__item-title,
.efe .efe__items--slots > .efe__slot.efe__slot--complete .efe__slot-title {
    color: #15803d !important;
}

.efe .efe__items--slots > .efe__slot.efe__slot--complete .efe__item-meta,
.efe .efe__items--slots > .efe__slot.efe__slot--complete .efe__slot-meta {
    color: #166534 !important;
}

.efe .efe__items--slots > .efe__slot.efe__slot--pending .efe__item-icon--slot-pending {
    background: #fecaca !important;
    color: #b91c1c !important;
}

.efe .efe__items--slots > .efe__slot.efe__slot--complete .efe__item-icon--slot-complete {
    background: #bbf7d0 !important;
    color: #15803d !important;
}

.dark .efe .efe__items--slots > .efe__slot.efe__slot--pending:hover {
    background: rgba(220, 38, 38, 0.22) !important;
}

.dark .efe .efe__items--slots > .efe__slot.efe__slot--complete:hover {
    background: rgba(22, 163, 74, 0.2) !important;
}

.dark .efe .efe__items--slots > .efe__slot.efe__slot--pending {
    border-color: #dc2626;
    border-left-color: #dc2626;
    background: rgba(220, 38, 38, 0.16);
}

.dark .efe .efe__items--slots > .efe__slot.efe__slot--complete {
    border-color: #16a34a;
    border-left-color: #16a34a;
    background: rgba(22, 163, 74, 0.14);
}

.dark .efe .efe__items--slots > .efe__slot.efe__slot--pending .efe__item-title,
.dark .efe .efe__items--slots > .efe__slot.efe__slot--pending .efe__slot-title,
.dark .efe .efe__items--slots > .efe__slot.efe__slot--pending .efe__item-meta,
.dark .efe .efe__items--slots > .efe__slot.efe__slot--pending .efe__slot-meta {
    color: #fca5a5 !important;
}

.dark .efe .efe__items--slots > .efe__slot.efe__slot--complete .efe__item-title,
.dark .efe .efe__items--slots > .efe__slot.efe__slot--complete .efe__slot-title {
    color: #86efac !important;
}

.dark .efe .efe__items--slots > .efe__slot.efe__slot--complete .efe__item-meta,
.dark .efe .efe__items--slots > .efe__slot.efe__slot--complete .efe__slot-meta {
    color: #cbd5e1 !important;
}

.dark .efe .efe__items--slots > .efe__slot.efe__slot--pending .efe__item-icon--slot-pending {
    background: rgba(220, 38, 38, 0.28) !important;
    color: #fca5a5 !important;
}

.dark .efe .efe__items--slots > .efe__slot.efe__slot--complete .efe__item-icon--slot-complete {
    background: rgba(22, 163, 74, 0.28) !important;
    color: #86efac !important;
}

.efe .efe__items--slots .efe__slot-upload-btn.efe__btn {
    align-self: stretch;
    width: 100%;
    border-color: #dc2626 !important;
    background: #dc2626 !important;
    color: #ffffff !important;
}

.efe .efe__items--slots .efe__slot-upload-btn.efe__btn:hover {
    border-color: #b91c1c !important;
    background: #b91c1c !important;
    color: #ffffff !important;
}

.efe__slot-upload-area {
    width: 100%;
}

.efe__pending-item--slot {
    width: 100%;
    border-color: rgba(220, 38, 38, 0.45);
}

.efe__pending-item--slot::before {
    background: linear-gradient(90deg, rgba(220, 38, 38, 0.42), rgba(220, 38, 38, 0.16));
}

.efe__pending-item--slot .efe__pending-icon {
    background: rgba(220, 38, 38, 0.22);
    color: #fca5a5;
}

.efe__item-icon--slot-pending,
.efe__item-icon--slot-complete {
    cursor: default;
    flex-shrink: 0;
}

.efe__empty--compact {
    padding: 1.25rem 1rem 1.5rem;
}

@media (max-width: 900px) {
    .efe__body,
    .efe__actions-grid {
        grid-template-columns: 1fr;
    }

    .efe__sidebar {
        border-right: 0;
        border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    }

    .efe__item {
        align-items: flex-start;
        flex-direction: column;
    }

    .efe__item-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .efe__form-row {
        flex-direction: column;
    }
}

.efe__bulk-bar,
.efe__folder-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.efe__bulk-bar {
    padding: 0.75rem 1rem;
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 0.85rem;
    background: rgba(59, 130, 246, 0.08);
}

.efe__select-toggle {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    margin-right: 0.25rem;
}

.efe__select-toggle input {
    width: 1.125rem;
    height: 1.125rem;
    margin: 0;
    accent-color: #2563eb;
    cursor: pointer;
}

.efe__reorder-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.efe__reorder-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 0.5rem;
    background: #fff;
    color: #334155;
    cursor: pointer;
}

.efe__reorder-btn:hover {
    background: #f8fafc;
}

.efe__item-actions-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.efe__modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(6px);
}

.dark .efe__modal-backdrop {
    background: rgba(0, 0, 0, 0.88);
}

.efe__modal {
    width: min(100%, 38rem);
    padding: 0;
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: #ffffff;
    color: #0f172a;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08),
        0 25px 50px -12px rgba(0, 0, 0, 0.55),
        0 12px 24px -8px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.dark .efe__modal {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.18);
    color: #f8fafc;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.06),
        0 25px 50px -12px rgba(0, 0, 0, 0.75);
}

.efe__modal-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.35rem 1.5rem 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.08) 0%, transparent 100%);
}

.dark .efe__modal-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.15) 0%, transparent 100%);
}

.efe__modal-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    background: #2563eb;
    color: #ffffff;
}

.efe__modal-icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

.efe__modal-title {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
}

.efe__modal-text {
    margin: 0;
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.5;
}

.dark .efe__modal-text {
    color: #cbd5e1;
}

.efe__modal-actions {
    display: grid;
    gap: 0.65rem;
    padding: 1.25rem 1.5rem 1.5rem;
}

.efe__modal-action {
    width: 100%;
    justify-content: center;
    text-align: center;
}

.efe__modal-action--secondary {
    border: 1px dashed rgba(148, 163, 184, 0.55);
}
