@import url("https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap");
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.css");
@import url("https://cdn-uicons.flaticon.com/uicons-regular-straight/css/uicons-regular-straight.css");
@import url("https://cdn-uicons.flaticon.com/uicons-solid-straight/css/uicons-solid-straight.css");



:root {
    --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --sidebar-width-expanded: 250px;
    --sidebar-width-collapsed: 76px;
    --sidebar-gap: 1rem;
    --sidebar-current-width: var(--sidebar-width-expanded);

    --fs-display: 3rem;
    --fs-h1: 2.25rem;
    --fs-h2: 1.75rem;
    --fs-h3: 1.35rem;
    --fs-body: 1rem;
    --fs-small: 0.875rem;

    --fw-regular: 400;
    --fw-medium: 500;
    --fw-bold: 700;

    --primary-color: #828282;
    --secondary-color: #C2C2C2;
    --background-color: #FFF7ED;
    --foreground-color: #FFEDD4;
    --foreground-dark-color: #FFD6A8;
    --background-dark-color: #052F4A;
    --text-color: #024A70;
    --text-color-neg: #052F4A;
    --text-dark-color: #FFFFFF;
    --background-table-color: #FFFFFF;
    --background-table-header-color: #BEDBFF;
    --background-cta-high-color: #FF6900;
    --background-note-dark-color: #052F4A;
    --background-note-light-color: #FF6467;
    --red-light-color: #FFC9C9;
    --red-dark-color: #FB2C36;
    --border-soft-color: #cad5e2;
    --green-light-color: #5EE9B5;
    --grey-light-color: #4A5565;
    --orange-border-color: #ffd6ab;
}

:root {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
}

body {
    font-family: var(--font-sans);
    margin: 0;
    padding: 0;
}

.d-none {
    display: none !important;
}

.h1 {
    font-size: var(--fs-h1);
    font-weight: var(--fw-bold);
    color: var(--text-color-neg);
}

.h2 {
    font-size: var(--fs-h2);
    font-weight: var(--fw-medium);
    color: var(--text-color-neg);
}

.h3 {
    font-size: var(--fs-h3);
    font-weight: var(--fw-medium);
    color: var(--text-color-neg);
}

.h {
    font-weight: var(--fw-bold);
    color: var(--text-color-neg);
}

.text-small {
    font-size: var(--fs-small);
}

.flex-row {
    display: flex;
    flex-direction: row;
}

.flex-row-between {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.flex-column {
    display: flex;
    flex-direction: column;
}

.flex-align-end {
    display: flex;
    align-items: flex-end;
}

.align-center {
    align-items: center;
}

.gap1 {
    gap: 1rem;
}

.gap-2 {
    gap: .5rem;
}

.p-2 {
    padding: 0.5rem;
}

.bordered-default {
    border: 1px solid var(--text-color-neg);
    border-radius: 0.5rem;
}

.cta-red button {
    background-color: var(--red-light-color);
    color: var(--red-dark-color);
    border-color: var(--red-light-color);
}

.economic-item-input {
    display: block;
    min-width: 50%;
}

.aggregate-input input,
.economic-item-input input,
.economic-item-input textarea,
.economic-item-input select,
.economic-item-input app-textarea-div,
.economic-item-input app-textarea-div div,
economic-group-select select {
    background-color: transparent;
    border: none;
    outline: none;
    width: 100%;
}


/* .economic-item-input[type="textarea"] {
    width: 90%;
} */


.economic-item-input textarea {
    height: 1rem;
    line-height: 1rem;
    overflow: scroll;
}

.economic-item-input div[is-number="false"] {
    color: red;
    font-weight: bold;
    ;
}

app-textarea-div>[data-placeholder-active="true"] {
    opacity: 0.5;
}


add-economic-item-button {
    display: block;
}


.search-input[type="text"],
.search-input[type="group"],
.search-input[type="password"]
{
    display: block;
    padding: 0.25rem 0.5rem;
    background-color: var(--background-color);
    border: thin solid var(--background-dark-color);
    border-radius: 0.5rem;
}

.search-input[type="text"] input,
.search-input[type="group"] input ,
.search-input[type="password"] input
{
    display: block;
    background-color: transparent;
    border: none;
    width: 100%;
}

.search-input-rounded {
    border-radius: 10rem;
}

app-input {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

app-button {
    display: block;
}

app-button button {
    width: 100%;
}

app-button button,
button {
    display: inline-flex;
    gap: 0.5rem;
    background-color: var(--foreground-color);
    color: var(--text-color-neg);
    border: none;
    padding: 0.75rem 1rem;
    cursor: pointer;
    justify-content: center;
    align-items: center;
    border-radius: 0.5rem;
    border: thin solid var(--border-soft-color);
    white-space: nowrap;
}

app-button button span {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

.square-button button {
    width: 100%;
    height: 100%;
    padding: 0;
}

.square-button {
    width: 2.25rem;
    height: 2.25rem;
}

.round-button button {
    width: 100%;
    height: 100%;
    padding: 0;
    border-radius: 50%;
}

.round-button {
    width: 2.25rem;
    height: 2.25rem;
}

app-button:active {
    transform: scale(0.95);
}

app-button {
    display: inline-flex;
    flex-shrink: 0;
    cursor: pointer;
}

app-button button i,
.square-button button i {
    scale: 1.4;
    position: relative;
    top: 2px;
}

button:disabled {
    cursor: default;
    opacity: 0.5;
}

.cta-plane button {
    border: none;
}

.cta-green button {
    background-color: rgba(94, 233, 181, 0.3);
}

.cta-green button i {
    color: var(--green-light-color);
}

.cta-grey button {
    background-color: rgba(74, 85, 101, 0.3);
}

.cta-grey button i {
    color: var(--grey-light-color);
}

.cta-default button {
    background-color: var(--foreground-color);
    color: var(--text-color-neg);
    border: thin solid var(--foreground-dark-color);
}

.cta-high button {
    background-color: var(--background-cta-high-color);
    color: var(--text-color-neg);
    border: thin solid var(--background-cta-high-color);
    font-weight: bold;
}

.cta-high-inv button {
    background-color: var(--background-cta-high-color);
    color: var(--text-dark-color);
    border: thin solid var(--background-cta-high-color);
}

login-form button span {
    flex: 0 1 auto;
}

login-form .cta-high {
    font-weight: normal;
    font-size: 110%;
}

.cta-dark button {
    background-color: var(--background-dark-color);
    color: var(--text-dark-color);
    border: thin solid var(--text-color-neg);
    font-weight: bold;
}

.cta-thin button {
    padding: 0.5rem 1.5rem;
}

.cta-raw button {
    padding: 0;
    background-color: transparent;
    border: none;
}

.cta-side button {
    background-color: transparent;
    color: var(--text-dark-color);
    border: none;
    padding: 0.25rem 0;
}

.cta-round button {
    border-radius: 2rem;
    border-color: var(--orange-border-color);
}

.cta-100 {
    width: 100%;
}

.cta-left button {
    justify-content: left;
}

.cta-left span {
    text-align: left;
}

input {
    font-family: var(--font-sans);
    font-size: var(--fs-body);
    color: var(--text-color);
}

.title-light {
    font-size: 90%;
}

remove-economic-item-button button {
    border-radius: 50%;
    padding: 0;
    height: 2rem;
    width: 2rem;
}

remove-economic-item-button app-button {
    border: none;
    padding: 0;
}

remove-economic-item-breakdown-button button {
    padding: 0;
    height: 2rem;
    width: 2rem;
}

remove-economic-item-breakdown-button app-button {
    border: none;
    padding: 0;
}

/* Layout con sidebar */

.app-conainer {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
    justify-content: center;
}

.app-shell {
    display: flex;
    min-height: 100vh;
    padding: 1rem;
    max-width: calc(1366px - 2rem);
    width: 100%;
}

.app-shell--sidebar-collapsed {
    --sidebar-current-width: var(--sidebar-width-collapsed);
}

:root[data-sidebar-collapsed="1"] {
    --sidebar-current-width: var(--sidebar-width-collapsed);
}

.app-main {
    flex: 1;
    overflow-x: auto;
    margin-left: calc(var(--sidebar-current-width) + var(--sidebar-gap));
    margin-bottom: 50px;
    position: relative;
    transition: margin-left .28s cubic-bezier(0.16, 1, 0.3, 1);
}

app-sidebar {
    display: block;
    position: fixed;
    background-color: #0d2338;
    margin-right: var(--sidebar-gap);
    height: calc(100vh - 2rem);
    border-radius: 2rem;
    width: var(--sidebar-current-width);
    transition: width .28s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-shell--sidebar-no-transition .app-main,
.app-shell--sidebar-no-transition app-sidebar {
    transition: none !important;
}

.sidebar {
    color: #f5f7fb;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
}

.sidebar__header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 6px;
}

.sidebar__logo {
    padding: 12px 14px;
    margin-bottom: 0;
    min-width: 0;
}

.sidebar__toggle-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 18px;
    padding: 0 8px;
}

.sidebar__logo-main {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    transition: opacity .18s ease-in-out;
}

.sidebar__toggle {
    width: 2rem;
    height: 2rem;
    min-width: 2rem;
    border-radius: 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #f5f7fb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .2s ease-in-out;
    line-height: 1;
}

.sidebar__toggle i {
    display: block;
    line-height: 1;
    transform: translateY(1px);
}

.sidebar__toggle:hover {
    background: rgba(255, 255, 255, 0.16);
}

.sidebar__toggle:focus-visible {
    outline: 2px solid var(--background-cta-high-color);
    outline-offset: 2px;
}

.sidebar__section {
    margin-bottom: 1rem;
}

.sidebar__section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 10px;
    transition: opacity .18s ease-in-out;
}

.sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 10px;
    font-size: 14px;
    color: #f5f7fb;
    text-decoration: none;
}

.sidebar__link:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.sidebar__link--active {
    padding-left: 1rem;
    border-left: solid 2px var(--background-cta-high-color);
}

.sidebar__link--active button {
    color: var(--background-cta-high-color);
    padding: 0.25rem 0;
}

.app-shell--sidebar-collapsed .sidebar,
:root[data-sidebar-collapsed="1"] .sidebar {
    padding-left: 10px;
    padding-right: 10px;
}

.app-shell--sidebar-collapsed .sidebar__header,
:root[data-sidebar-collapsed="1"] .sidebar__header {
    justify-content: center;
}

.app-shell--sidebar-collapsed .sidebar__toggle-row,
:root[data-sidebar-collapsed="1"] .sidebar__toggle-row {
    justify-content: center;
    padding: 0;
}

.app-shell--sidebar-collapsed .sidebar__section-title,
:root[data-sidebar-collapsed="1"] .sidebar__section-title {
    opacity: 0;
    pointer-events: none;
}

.sidebar__logo-short {
    display: none;
}

.app-shell--sidebar-collapsed .sidebar__logo-main,
:root[data-sidebar-collapsed="1"] .sidebar__logo-main {
    display: none;
}

.app-shell--sidebar-collapsed .sidebar__logo-short,
:root[data-sidebar-collapsed="1"] .sidebar__logo-short {
    display: block;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.app-shell--sidebar-collapsed .sidebar__section,
:root[data-sidebar-collapsed="1"] .sidebar__section {
    margin-bottom: 0.75rem;
}

.app-shell--sidebar-collapsed .sidebar__nav,
:root[data-sidebar-collapsed="1"] .sidebar__nav {
    align-items: center;
}

.app-shell--sidebar-collapsed .cta-side button,
:root[data-sidebar-collapsed="1"] .cta-side button {
    padding: 0.45rem;
    min-width: 2.25rem;
    min-height: 2.25rem;
    border-radius: 0.6rem;
}

.app-shell--sidebar-collapsed side-button app-button button span,
:root[data-sidebar-collapsed="1"] side-button app-button button span {
    display: none;
}

.app-shell--sidebar-collapsed .sidebar__link--active,
:root[data-sidebar-collapsed="1"] .sidebar__link--active {
    padding-left: 0;
    border-left: none;
}

.app-shell--sidebar-collapsed .sidebar__link--active button,
:root[data-sidebar-collapsed="1"] .sidebar__link--active button {
    background-color: rgba(255, 255, 255, 0.16);
}

.sidebar__icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.sidebar__bottom {
    padding-top: 24px;
}

.sidebar__logout {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f5f7fb;
    font-size: 14px;
    cursor: pointer;
}

.sidebar__logout:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.sidebar__logout-icon {
    font-size: 16px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.page-title {
    font-size: var(--fs-h1);
    font-weight: var(--fw-bold);
    margin: 0;
}

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

.catalog-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}


table {
    border-collapse: collapse;
    border: var(--secondary-color) solid thin;
    width: 100%;
}

th,
td {
    border: var(--secondary-color) solid thin;
    padding: 0.2rem;
}

.ed-table {
    display: flex;
    flex-direction: column;
    position: relative;
    gap: 0.5rem;
}

.ed-table-row {
    padding: 0.5rem;
    background-color: var(--background-table-color);
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    position: relative;
    gap: 0.5rem;
}

.ed-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ed-body-root>.ed-insert-anchor {
    position: relative;
}

.ed-row-pre {
    width: 100%;
    display: flex;
    justify-content: center;
}

.ed-insert-between-button {
    position: absolute;
    top: -0.25rem;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    z-index: 3;
    cursor: pointer;
    background-image: url('../img/teardrop_background.svg');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    transition: opacity 0.15s ease-out;
}

/* Solo el gráfico de fondo: el botón interno no lleva otro fondo */
.ed-insert-between-button .round-button,
.ed-insert-between-button .round-button button {
    background-color: transparent;
    background-image: none;
    border: none;
}
.ed-insert-between-button .round-button button {
    color: var(--text-dark-color);
}

.ed-insert-after-button {
    position: absolute;
    top: calc(100% + 0.25rem);
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    z-index: 3;
    cursor: pointer;
    background-image: url('../img/teardrop_background.svg');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    transition: opacity 0.15s ease-out;
}

/* Mismo aspecto que el botón entre filas: solo el gráfico de fondo */
.ed-insert-after-button .round-button,
.ed-insert-after-button .round-button button {
    background-color: transparent;
    background-image: none;
    border: none;
}
.ed-insert-after-button .round-button button {
    color: var(--text-dark-color);
}

.ed-insert-between-button::before {
    content: "";
    position: absolute;
    /* left: -8rem;
    right: -8rem;
    top: -0.6rem;
    bottom: -0.2rem; */
}

.ed-insert-after-button::before {
    content: "";
    position: absolute;
}

/* Botón entre filas: visible al hover en zona superior de su fila, zona inferior de la fila anterior, o en el propio botón (zonas detectadas por JS) */
.ed-insert-anchor.show-insert-between>.ed-insert-between-button,
.ed-insert-between-button:hover {
    opacity: 1;
}

/* Botón después de la última fila: visible al hover en zona inferior de la fila o en el propio botón (mismo diseño, zonas por JS) */
.ed-insert-anchor.show-insert-after>.ed-insert-after-button,
.ed-insert-after-button:hover {
    opacity: 1;
}

.ed-row {
    border-radius: 0.5rem;
    min-height: 3rem;
    display: flex;
    flex-direction: row;
    align-items: center;
}

.ed-row-layout {
    display: grid;
    grid-template-columns: 80px 1fr repeat(3, 90px) 150px 90px;
    padding: 0 1rem;
    align-items: center;
    gap: 0.5rem;
}

.ed-row-layout>.ed-cell-layout:last-of-type,
.cat-row-layout>.ed-cell-layout:last-of-type,
.ed-note-layout>.ed-cell-layout:last-of-type,
.ed-header-layout>.ed-cell-layout:last-of-type,
.projects-row-layout>.ed-cell-layout:last-of-type,
.expenses-row-layout>.ed-cell-layout:last-of-type,
.clients-select-row-layout>.ed-cell-layout:last-of-type,
.users-select-row-layout>.ed-cell-layout:last-of-type,
.clients-select-row-layout>.ed-cell-layout:last-of-type {
    justify-content: right;
    text-align: right;
}


.ed-cell-layout {
    display: flex;
    justify-content: left;
    align-items: center;
    overflow: visible;
    height: 100%;
    text-align: left;
}

.ed-row-layout.ed-header,
.projects-row-layout.ed-header,
.clients-row-layout.ed-header,
.historic-row-layout.ed-header,
.users-row-layout.ed-header,
.expenses-row-layout.ed-header,
.clients-select-row-layout.ed-header,
.users-select-row-layout.ed-header,
.cat-row-layout.ed-header {
    background-color: var(--background-table-header-color);
    border-radius: 0.5rem;
    text-align: center;
    font-weight: bold;
    color: var(--text-color-neg);
    text-transform: uppercase;
}

.ed-row-layout.ed-header .ed-cell-layout,
.projects-row-layout.ed-header .ed-cell-layout,
.clients-row-layout.ed-header .ed-cell-layout,
.historic-row-layout.ed-header .ed-cell-layout,
.users-row-layout.ed-header .ed-cell-layout,
.expenses-row-layout.ed-header .ed-cell-layout,
.clients-select-row-layout.ed-header .ed-cell-layout,
.users-select-row-layout.ed-header .ed-cell-layout,
.cat-row-layout.ed-header .ed-cell-layout {
    min-width: 0;
    overflow: hidden;
}


.ed-note-layout {
    display: grid;
    grid-template-columns: 80px 1fr 90px;
    padding: 0 1rem;
    align-items: center;
}

.ed-note {
    padding: 0 1rem 0 0;
}

.ed-note>*:first-child {
    margin-right: 0.5rem;
    border-radius: 0.5rem 0 0 0.5rem;
    justify-content: center;
}

.ed-item .ed-note,
.ed-item .ed-note>*:first-child {
    border-radius: 0;
}

.ed-item .ed-note:last-of-type {
    border-bottom-right-radius: 0.5rem;
    border-bottom-left-radius: 0.5rem;
}

.ed-item .ed-note:last-of-type>*:first-child {
    border-bottom-left-radius: 0.5rem;
}


.ed-note-light {
    background-color: var(--background-note-light-color);
    color: var(--background-note-dark-color);
}

.ed-note-light>*:first-child {
    background-color: var(--background-note-dark-color);
    color: var(--background-note-light-color);
}

.ed-note-dark {
    background-color: var(--background-note-dark-color);
    color: var(--background-note-light-color);
}

.ed-note-dark>*:first-child {
    background-color: var(--background-note-light-color);
    color: var(--background-note-dark-color);
}


.ed-note-dark>*:not(:first-child) textarea {
    color: var(--background-note-dark-color);
}

.ed-header-layout {
    display: grid;
    grid-template-columns: 1fr 90px;
    padding: 0 1rem;
    align-items: center;
}

.ed-header-layout.ed-header {
    background: linear-gradient(90deg, var(--background-table-header-color), #d5e7ff);
    color: var(--text-color-neg);
    border: 1px dashed #8cb2df;
    font-weight: 600;
}

.ed-header-layout.ed-header textarea {
    color: var(--text-color-neg);
}

.ed-header-layout.ed-header-dark {
    background: linear-gradient(90deg, var(--text-color-neg), var(--background-dark-color));
    color: var(--background-table-header-color);
    border: 1px dashed var(--background-table-header-color);
    font-weight: 600;
}

.ed-header-layout.ed-header-dark textarea {
    color: var(--background-table-header-color);
}

.ed-header--deduction {
    border-left: 3px solid var(--red-dark-color);
}

.ed-title {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.ed-title--clickable {
    cursor: pointer;
}

.ed-title-date {
    opacity: 0.8;
}

.ed-title-right {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) 125px 40px;
    gap: 0.5rem;
}

.ed-title-right economic-item-input {
    text-align: right;
}

.ed-title-left {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.ed-item {
    border-radius: 0.5rem;
    background-color: var(--foreground-color);
    display: flex;
    flex-direction: column;
    border: solid thin var(--foreground-dark-color);
}

.ed-body .ed-item:nth-child(odd) {
    background: none;
}

.ed-group {
    border-radius: 0.5rem;
    background-color: var(--background-dark-color);
    color: var(--text-dark-color);
    font-weight: bold;
}

.projects-row-layout {
    display: grid;
    grid-template-columns: 1fr minmax(120px, 200px) minmax(120px, 200px) 120px 100px;
    min-height: 3rem;
    padding: 0 1rem;
    align-items: center;
    gap: 0.5rem;
}

.projects-row {
    background-color: var(--background-color);
    border: solid thin var(--foreground-dark-color);
}

.projects-body .projects-row:nth-child(odd) {
    background: none;
}

.expenses-row-layout {
    display: grid;
    grid-template-columns: 120px 1.4fr 110px 1fr 110px 60px 90px;
    min-height: 3rem;
    padding: 0 1rem;
    align-items: center;
    gap: 0.5rem;
}

.expenses-row {
    background-color: var(--background-color);
    border: solid thin var(--foreground-dark-color);
}

.expenses-body .expenses-row:nth-child(odd) {
    background: none;
}

.clients-row-layout {
    display: grid;
    grid-template-columns: 220px 110px 110px 1fr 200px 60px;
    min-height: 3rem;
    padding: 0 1rem;
    align-items: center;
}

.clients-row {
    background-color: var(--foreground-color);
    border: solid thin var(--foreground-dark-color);
}

.clients-body .clients-row:nth-child(odd) {
    background: none;
}

.historic-row-layout {
    display: grid;
    grid-template-columns: 150px 1fr 120px 90px;
    min-height: 3rem;
    padding: 0 1rem 0 0;
    align-items: center;
    gap: 0.5rem;
}

.historic-row-layout .ed-cell-layout:first-of-type {
    background-color: var(--foreground-color);
    padding-left: 1rem;
    border: solid thin var(--foreground-dark-color);
    border-radius: 0.5rem 0 0 0.5rem;
}

.users-row-layout {
    display: grid;
    grid-template-columns: 220px 1fr 220px 60px;
    min-height: 3rem;
    padding: 0 1rem;
    align-items: center;
    gap: 0.5rem;
}

.clients-select-row-layout {
    display: grid;
    grid-template-columns: 1.2fr 140px 160px 1.4fr 140px;
    min-height: 3rem;
    padding: 0 1rem;
    align-items: center;
}

.users-select-row-layout {
    display: grid;
    grid-template-columns: 1.2fr 1.4fr 140px;
    min-height: 3rem;
    padding: 0 1rem;
    align-items: center;
}

.users-select-row {
    background-color: var(--foreground-color);
    border: solid thin var(--foreground-dark-color);
}

.users-select-body .users-select-row:nth-child(odd) {
    background: none;
}

.login-body {
    height: 100vh;
    background-image: linear-gradient(to top, var(--foreground-dark-color), transparent);
}

.login-form-wrapper {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-form-card {
    width: min(420px, 100%);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border-radius: 1rem;
    background-color: var(--background-color);
    border: 1px solid var(--background-cta-high-color);
}

.login-form-top {
    border-radius: 1rem 1rem 0 0;
    background-color: var(--background-table-color);
    border-bottom: 1px solid var(--background-cta-high-color);
    padding: 1rem;
}

.login-form-bottom {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
}

.login-form-super-title {
    color: var(--background-cta-high-color);
    font-size: var(--fs-small);
    font-weight: var(--fw-bold);
}

.login-form-title {
    color: var(--text-color-neg);
    font-size: var(--fs-h2);
    font-weight: var(--fw-bold);
}

.login-form-subtitle {
    font-size: var(--fs-small);
}

.login-form-status {
    min-height: 1.25rem;
    font-size: var(--fs-small);
    color: var(--text-color-neg);
}

.clients-select-row {
    background-color: var(--foreground-color);
    border: solid thin var(--foreground-dark-color);
}

.clients-select-body .clients-select-row:nth-child(odd) {
    background: none;
}

.cat-row-layout {
    display: grid;
    grid-template-columns: 60px 1fr repeat(2, 90px);
    min-height: 3rem;
    border-radius: 0.5rem;
    padding: 0 1rem;
}

.cat-row {
    background-color: var(--foreground-color);
    border: solid thin var(--foreground-dark-color);
}

.cat-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cat-group>.cat-row-layout:not(:first-child):nth-child(2n) {
    background-color: var(--background-table-color);
}


.floating-bar {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 1px);
    padding: 0.5rem;
    background-color: var(--background-color);
    color: var(--text-dark-color);
    border-radius: 1rem 1rem 0 0;
    border: thin solid var(--background-cta-high-color);
    gap: 0.5rem;
    z-index: 100;
}

.search-bar {
    display: grid;
    grid-template-columns: calc(100% / 7 * 3) 150px 150px;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    width: 100%;
}


economic-item-orderer {
    position: absolute;
    display: flex;
    flex-direction: column;
    width: 0.9rem;
    padding: 0 0.1rem;
    left: 2px;
    transform: translate(-50%);
    background-color: var(--background-table-color);
    border: thin solid var(--border-soft-color);
    border-radius: 1rem;
    z-index: 2;
    gap: 0.5rem;
    opacity: .3;
    transition: opacity .1s ease-in-out;
}

.ed-row:hover economic-item-orderer {
    opacity: 1;
}

economic-item-orderer * {
    width: 100%;
}

economic-item-orderer button {
    padding: 0;
    background-color: transparent;
    border: none;
}

.aggregate-container {
    flex-direction: row;
    justify-content: flex-end;
}


.aggregate-content {
    border-radius: 0.5rem;
    height: 3rem;
    display: grid;
    grid-template-columns: 1fr repeat(2, 90px);
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    min-width: 400px;
}

.aggregate-content-header {
    border-radius: 0.5rem;
    display: grid;
    grid-template-columns: 1fr 110px;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
}


.aggregate-content-group {
    border: dashed 2px var(--background-dark-color);
}

.aggregate-content-group--deduction .aggregate-content-group__total--deduction,
.aggregate-content-group--deduction .aggregate-content-group__total--deduction input {
    font-weight: 700;
    color: var(--red-dark-color);
}

.aggregate-content-ed {
    border: solid 2px var(--background-dark-color);
}

.catalog-table-container {
    height: 50vh;
    overflow: auto;
}

.catalog-importer-bottom {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
}

environment-check {
    height: 1.25rem;
    width: 1.25rem;
    border-radius: 0.5rem;
    padding: 0.5rem;
    background-color: var(--foreground-dark-color);
}

environment-check app-check {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

environment-check app-check input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Create a custom checkbox */
environment-check app-check .app-check-label {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    border: 2px solid var(--text-color-neg);
    box-sizing: border-box;
    border-radius: 0.25rem;
}

/* On mouse-over, add a grey background color */
environment-check app-check:hover input~.app-check-label {
    background-color: #ccc;
}


/* Create the app-check-label/indicator (hidden when not checked) */
environment-check app-check .app-check-label:after {
    content: "";
    position: absolute;
    display: none;
}

/* Show the app-check-label when checked */
environment-check app-check input:checked~.app-check-label:after {
    display: block;
}

/* Style the app-check-label/indicator */
environment-check app-check .app-check-label:after {
    left: 25%;
    top: 2px;
    width: 25%;
    height: 50%;
    border: solid var(--text-color-neg);
    border-width: 0 3px 3px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}


popup-component {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2000;
}

.content-default {
    background: #fff;
    border-radius: 1rem;
    padding: 16px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
}

.popup-content-select-group {
    border: thin solid var(--background-cta-high-color);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 315px;
}

/* Create group popup */
.create-group-popup-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 340px;
    border: 1px solid var(--foreground-dark-color);
}

.create-group-popup-content .create-group-popup__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.create-group-popup-content .create-group-popup__title {
    margin: 0;
    font-size: var(--fs-h3);
    font-weight: var(--fw-medium);
    color: var(--text-color-neg);
}

.create-group-popup-content .create-group-popup__form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.create-group-popup-content .create-group-popup__field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.create-group-popup-content .create-group-popup__label {
    font-size: 0.85rem;
    font-weight: var(--fw-medium);
    color: var(--text-color);
}

.create-group-popup-content .create-group-popup__input {
    width: 100%;
    min-height: 2.5rem;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--foreground-dark-color);
    border-radius: 0.625rem;
    box-sizing: border-box;
}

.create-group-popup-content .create-group-popup__footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.popup-content-select-client {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 640px;
}


.project-top {
    display: grid;
    grid-template-columns: 50% 40%;
    justify-content: space-between;
    align-items: top;
    padding: 1rem;
}

project-notes {
    display: block;
}

.project-notes-section {
    padding: 0.5rem;
    gap: 0.5rem;
}

.project-notes-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.project-notes-section__header--clickable {
    cursor: pointer;
}

.project-notes-section__title {
    margin: 0;
    font-size: var(--fs-h3);
    font-weight: var(--fw-medium);
    color: var(--text-color-neg);
}

.project-notes-section__toggle {
    flex-shrink: 0;
}

.project-notes-section__body {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(260px, 1fr);
    gap: 0.5rem;
    align-items: start;
}

.project-notes-section__column {
    min-width: 0;
}

.project-notes-section__column--attachments {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.project-notes-section__label {
    margin-bottom: 0.125rem;
}

.project-notes-section__textarea {
    width: 100%;
    min-height: 16.5rem;
    resize: vertical;
    padding: 1rem;
    border: 1px solid var(--text-color-neg);
    border-radius: 0.75rem;
    background-color: var(--background-color);
    color: var(--text-color-neg);
    box-sizing: border-box;
    font-family: var(--font-sans);
    font-size: var(--fs-body);
    line-height: 1.4;
}

.project-notes-section__textarea::placeholder {
    color: var(--text-color);
    opacity: 0.8;
}

.project-notes-section__textarea:focus {
    outline: 2px solid rgba(2, 74, 112, 0.14);
    border-color: var(--text-color-neg);
}

.project-notes-section__attachments {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.project-notes-section__attachments-empty {
    display: flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0.375rem 0.875rem;
    border: 1px dashed var(--foreground-dark-color);
    border-radius: 0.625rem;
    color: var(--text-color);
    background-color: rgba(255, 247, 237, 0.35);
    box-sizing: border-box;
}

.project-notes-section__attachment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 2.75rem;
    padding: 0.375rem 0.375rem 0.375rem 0.875rem;
    border: 1px solid var(--foreground-dark-color);
    border-radius: 0.625rem;
    background-color: var(--background-color);
    box-sizing: border-box;
}

.project-notes-section__attachment-item:nth-child(odd) {
    background: none;
}

.project-notes-section__attachment-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-color);
}

.project-notes-section__attachment-item .square-button {
    width: 2rem;
    height: 2rem;
}

.project-notes-section__attachment-item .square-button button {
    background-color: rgba(255, 214, 168, 0.55);
    border-color: transparent;
}

.project-notes-section__upload-row {
    display: flex;
    justify-content: flex-end;
    padding-top: 0.25rem;
}

@media (max-width: 960px) {
    .project-notes-section__body {
        grid-template-columns: 1fr;
    }

    .project-notes-section__upload-row {
        justify-content: stretch;
    }
}


select-client-button {
    display: block;
}



.cta-side:not([disabled]) {
    transition: all .3s cubic-bezier(0.16, 1, 0.3, 1);
}

side-button.cta-side app-button:not([disabled]):hover {
    padding-left: 1rem;
    border-left: solid 2px var(--background-cta-high-color);
}

.app-shell--sidebar-collapsed side-button app-button:not([disabled]):hover,
:root[data-sidebar-collapsed="1"] side-button app-button:not([disabled]):hover {
    padding-left: 0;
    border-left: none;
}

side-button app-button:not([disabled]):hover span,
side-button app-button:not([disabled]):hover i {
    color: var(--background-cta-high-color)
}

app-switcher-check {
    display: block;
}

display-switcher {
    display: none;
}

/* Quitar scroll horizontal en popups y zona general derecha */
main.app-main,
div.content-default.popup-content-select-client,
div.content-default {
    overflow-x: hidden;
}

.expenses-row-layout {
    display: grid;
    /* Fecha | Concepto | Importe | Estado | Adjuntos | Acciones */
    grid-template-columns: 110px 2fr 140px 110px 60px 44px;
    min-height: 3rem;
    padding: 0.5rem 1rem;
    align-items: center;
    gap: 0.5rem;
}

.expenses-row-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.expenses-row-wrapper--highlighted {
    animation: expenses-highlight-fade 2s ease-out;
}

@keyframes expenses-highlight-fade {
    0% {
        background-color: var(--background-cta-high-color);
        opacity: 0.9;
    }
    100% {
        background-color: transparent;
        opacity: 1;
    }
}

.expenses-attachment-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: inherit;
    color: var(--text-color);
    border-radius: 0.375rem;
}

.expenses-attachment-indicator:hover:not(:disabled) {
    background-color: rgba(0, 0, 0, 0.06);
}

.expenses-attachment-indicator:disabled {
    cursor: default;
    opacity: 0.6;
}

.expenses-attachment-indicator i {
    font-size: 1rem;
}

.expenses-row-allocation {
    margin-top: -1px;
    margin-left: 1.5rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: rgba(255, 247, 237, 0.4);
    border: 1px solid var(--foreground-dark-color);
    border-radius: 0.5rem;
    border-top-left-radius: 0;
}

.expenses-allocation-table {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.expenses-allocation-collapsible {
    display: grid;
    grid-template-rows: 1fr;
    transition: grid-template-rows 0.25s ease-in-out;
}

.expenses-allocation-collapsible--collapsed {
    grid-template-rows: 0fr;
}

.expenses-allocation-collapsible__inner {
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.expenses-allocation-toggle-btn {
    padding: 0.15rem 0.35rem;
    font-size: 0.75rem;
    line-height: 1;
    border: 1px solid var(--foreground-dark-color);
    border-radius: 0.25rem;
    background: rgba(255, 247, 237, 0.9);
    color: var(--text-color);
    cursor: pointer;
    flex-shrink: 0;
}

.expenses-allocation-toggle-btn:hover {
    background: rgba(255, 214, 168, 0.4);
}

.expenses-allocation-header {
    display: grid;
    grid-template-columns: 1fr 100px;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-color);
}

.expenses-allocation-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.expenses-allocation-row {
    display: grid;
    grid-template-columns: 1fr 100px;
    gap: 0.75rem;
    font-size: 0.9rem;
    min-height: 1.75rem;
    align-items: center;
}

.expenses-allocation-cell {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.expenses-allocation-cell--amount {
    text-align: right;
}

.expenses-allocation-header--editable {
    grid-template-columns: 1fr 100px 44px;
}

.expenses-allocation-row--editable {
    grid-template-columns: 1fr 100px 44px;
}

.expenses-allocation-row--highlighted {
    background-color: color-mix(in srgb, var(--background-cta-high-color) 25%, transparent);
    border-radius: 0.375rem;
    padding: 0.15rem 0.25rem;
}

.expenses-allocation-project-picker {
    position: relative;
    width: 100%;
}

.expenses-allocation-project-label {
    display: none;
    min-height: 1.75rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.9rem;
    color: var(--text-color);
    line-height: 1.4;
}

.expenses-allocation-project-picker--selected .expenses-allocation-project-label {
    display: block;
}

.expenses-allocation-project-picker--selected .expenses-allocation-project-trigger,
.expenses-allocation-project-picker--selected .expenses-allocation-project-dropdown {
    display: none !important;
}

.expenses-allocation-project-trigger {
    width: 100%;
    min-height: 1.75rem;
    padding: 0.25rem 0.5rem;
    padding-right: 1.5rem;
    border: 1px solid var(--foreground-dark-color);
    border-radius: 0.375rem;
    font-size: 0.9rem;
    box-sizing: border-box;
    background: rgba(255, 247, 237, 0.9);
    color: var(--text-color);
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem;
}

.expenses-allocation-project-trigger:not(:disabled):hover {
    background: rgba(255, 214, 168, 0.4);
}

.expenses-allocation-project-trigger:disabled {
    cursor: default;
    background-color: transparent;
    border-color: transparent;
    color: var(--text-color);
    opacity: 1;
}

.expenses-allocation-project-trigger--placeholder {
    border-color: var(--background-cta-high-color);
    color: var(--background-cta-high-color);
    font-style: italic;
    background-color: rgba(255, 214, 168, 0.15);
}

.expenses-allocation-project-chevron {
    font-size: 0.65rem;
    opacity: 0.7;
    flex-shrink: 0;
}

.expenses-allocation-project-trigger:disabled .expenses-allocation-project-chevron {
    display: none;
}

.expenses-allocation-project-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.15rem;
    z-index: 1000;
    background: rgba(255, 247, 237, 0.98);
    border: 1px solid var(--foreground-dark-color);
    border-radius: 0.375rem;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    max-height: 12rem;
}

.expenses-allocation-project-search {
    flex-shrink: 0;
    padding: 0.35rem 0.5rem;
    border: none;
    border-bottom: 1px solid var(--foreground-dark-color);
    border-radius: 0.375rem 0.375rem 0 0;
    font-size: 0.9rem;
    background: transparent;
}

.expenses-allocation-project-search:focus {
    outline: none;
}

.expenses-allocation-project-list {
    overflow-y: auto;
    padding: 0.25rem 0;
    max-height: 10rem;
}

.expenses-allocation-project-option {
    display: block;
    width: 100%;
    padding: 0.35rem 0.5rem;
    border: none;
    background: transparent;
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
    color: var(--text-color);
}

.expenses-allocation-project-option:hover {
    background: rgba(255, 214, 168, 0.4);
}

.expenses-allocation-project-empty {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.8;
}

.expenses-allocation-project-load-more {
    padding: 0.25rem 0.5rem;
    border-top: 1px solid var(--foreground-dark-color);
}

.expenses-allocation-project-load-more-btn {
    width: 100%;
    padding: 0.35rem 0.5rem;
    border: none;
    background: transparent;
    font-size: 0.85rem;
    color: var(--background-cta-high-color);
    cursor: pointer;
    text-align: center;
}

.expenses-allocation-project-load-more-btn:hover:not(:disabled) {
    background: rgba(255, 214, 168, 0.3);
}

.expenses-allocation-project-load-more-btn:disabled {
    cursor: default;
    color: var(--text-color);
    opacity: 0.8;
}

.expenses-allocation-select,
.expenses-allocation-input {
    width: 100%;
    min-height: 1.75rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--foreground-dark-color);
    border-radius: 0.375rem;
    font-size: 0.9rem;
    box-sizing: border-box;
}

.expenses-allocation-input {
    text-align: right;
}

.expenses-allocation-input--error {
    border-color: var(--background-cta-high-color);
    border-width: 2px;
    background-color: rgba(255, 214, 168, 0.25);
}

.expenses-allocation-input:focus {
    outline: none;
}

/* Ocultar flechas de incremento/decremento en importes de reparto */
.expenses-allocation-input::-webkit-outer-spin-button,
.expenses-allocation-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

.expenses-allocation-input[type="number"] {
    -moz-appearance: textfield; /* Firefox */
    appearance: textfield;
}

.expenses-allocation-amount-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
}

.expenses-allocation-currency {
    font-size: 0.9rem;
    color: var(--text-color);
}
.economic-item-input.expenses-total-input--error {
    border: 2px solid var(--background-cta-high-color);
    border-radius: 0.375rem;
    background-color: rgba(255, 214, 168, 0.25);
}

/* Sin outline adicional: el borde ya indica el error; outline+offset creaba doble línea */
.economic-item-input.expenses-total-input--error app-textarea-div,
.economic-item-input.expenses-total-input--error app-textarea-div div {
    outline: none;
}

.expenses-allocation-select:disabled {
    background-color: transparent;
    border-color: transparent;
    padding-left: 0;
    padding-right: 0;
    opacity: 1;
    -webkit-appearance: none;
    appearance: none;
    color: var(--text-color);
}

.expenses-allocation-select--placeholder {
    border-color: var(--background-cta-high-color);
    color: var(--background-cta-high-color);
    font-style: italic;
    background-color: rgba(255, 214, 168, 0.15);
}

.expenses-allocation-cell--action {
    display: flex;
    justify-content: center;
}

.expenses-allocation-del-btn {
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: 1px solid var(--foreground-dark-color);
    border-radius: 0.375rem;
    background: rgba(255, 247, 237, 0.8);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.expenses-allocation-del-btn:hover {
    background: rgba(255, 214, 168, 0.5);
}

.expenses-allocation-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.35rem;
    padding-top: 0.35rem;
    border-top: 1px dashed var(--foreground-dark-color);
}

.expenses-allocation-table--collapsed .expenses-allocation-add-row {
    display: none;
}

.expenses-allocation-add-row {
    margin: 0;
    padding: 0;
    border: none;
}

.expenses-allocation-add-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
    border: 1px solid var(--foreground-dark-color);
    border-radius: 0.375rem;
    background: rgba(255, 247, 237, 0.9);
    cursor: pointer;
}

.expenses-allocation-add-btn:hover {
    background: rgba(255, 214, 168, 0.4);
}

.expenses-allocation-summary {
    margin: 0;
    margin-left: auto;
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-color);
}

.expenses-allocation-summary--error {
    color: var(--background-cta-high-color);
    font-weight: 600;
}

.expenses-allocation-summary__pending--highlight {
    font-weight: 600;
    color: var(--background-cta-high-color);
}

/* Wrapper genérico para inputs monetarios: € fuera del campo de edición */
.monetary-input-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
}

.monetary-input-currency {
    font-size: 0.9rem;
    color: var(--text-color);
}

.expenses-amount-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
}

.expenses-amount-currency {
    font-size: 0.9rem;
    color: var(--text-color);
}

.project-expenses__body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.project-expenses__summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
}

.project-expenses__summary-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--foreground-dark-color);
    border-radius: 0.75rem;
    background-color: var(--background-color);
}

.project-expenses__list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.project-expenses__item {
    display: grid;
    grid-template-columns: 1.5fr 120px 110px 60px 44px;
    gap: 0.5rem;
    align-items: center;
    padding: 0.5rem 1rem;
    border: 1px solid var(--foreground-dark-color);
    border-radius: 0.75rem;
    background-color: var(--background-color);
}

.project-expenses__item-main {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.project-expenses__item-main span {
    color: var(--text-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-expenses__item-amount,
.project-expenses__item-status {
    text-align: right;
}

.expense-editor {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: min(960px, 84vw);
}

.content-large {
    min-width: min(960px, 84vw);
}

.expense-editor__header,
.expense-editor__section-header,
.expense-editor__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.expense-editor__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.expense-editor__field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.expense-editor__field--full {
    grid-column: 1 / -1;
}

.expense-editor__field input,
.expense-editor__field textarea,
.expense-editor__field select,
.expense-editor__allocation-row input,
.expense-editor__allocation-row select,
.expense-editor__file-row input {
    width: 100%;
    min-height: 2.5rem;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--foreground-dark-color);
    border-radius: 0.625rem;
    box-sizing: border-box;
}

.expense-editor__section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--foreground-dark-color);
    border-radius: 0.875rem;
    background-color: rgba(255, 247, 237, 0.28);
}

.expense-editor__allocations,
.expense-editor__attachments {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.expense-editor__allocation-row,
.expense-editor__attachment-item {
    display: grid;
    grid-template-columns: 1fr 140px 44px;
    gap: 0.5rem;
    align-items: center;
}

.expense-editor__attachment-item {
    grid-template-columns: 1fr auto;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--foreground-dark-color);
    border-radius: 0.625rem;
    background-color: var(--background-color);
}

.expense-editor__attachment-actions {
    display: flex;
    gap: 0.35rem;
}

.expense-attachments-popup {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.expense-attachments-popup__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.expense-attachments-popup__summary {
    color: var(--text-color);
    font-size: 0.9rem;
}

.expense-attachments-popup__section {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.expense-editor__allocation-summary {
    text-align: right;
    color: var(--text-color);
}

@media (max-width: 960px) {
    .expenses-row-layout,
    .project-expenses__item {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .project-expenses__summary,
    .expense-editor__grid {
        grid-template-columns: 1fr;
    }
}
