/* Ajustes propios de Climora sobre el tema Techmin */
.avatar-initials { display:inline-flex; align-items:center; justify-content:center; font-weight:600; }
.table-lines input.form-control-sm, .table-lines select.form-select-sm { min-width: 70px; }
.table-lines td { vertical-align: middle; }
.table-lines .drag-handle { cursor: grab; color: var(--tz-secondary-color); }
.timeline-note { border-left: 2px solid var(--tz-border-color); margin-left: 18px; padding-left: 24px; position: relative; padding-bottom: 18px; }
.timeline-note:last-child { padding-bottom: 0; }
.timeline-note .timeline-icon { position:absolute; left:-17px; top:0; width:32px; height:32px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:15px; }
.kpi-icon { width:48px; height:48px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:22px; }
.calc-result-big { font-size: 2.4rem; font-weight: 700; line-height: 1.1; }
.fc .fc-toolbar-title { font-size: 1.1rem; }
.fc-event { cursor: pointer; font-size: .8rem; }
.sticky-summary { position: sticky; top: 90px; }
.form-label { font-weight: 500; }
.table-centered th, .table-centered td { vertical-align: middle; }
.text-money { font-variant-numeric: tabular-nums; }
.select2-container .select2-selection--single { height: calc(1.5em + .9rem + 2px); border: 1px solid var(--tz-border-color); background: var(--tz-input-bg, #fff); }
.select2-container .select2-selection--single .select2-selection__rendered { line-height: calc(1.5em + .9rem); color: var(--tz-body-color); padding-left: .9rem; }
.select2-container .select2-selection--single .select2-selection__arrow { height: calc(1.5em + .9rem); }
.select2-dropdown { border-color: var(--tz-border-color); }
[data-bs-theme="dark"] .select2-container .select2-selection--single,
[data-bs-theme="dark"] .select2-dropdown, [data-bs-theme="dark"] .select2-search__field { background: var(--tz-secondary-bg); color: var(--tz-body-color); }
[data-bs-theme="dark"] .select2-results__option { color: var(--tz-body-color); }
.table-lines td.col-desc { min-width: 200px; width: 100%; }
.table-lines input.form-control-sm, .table-lines select.form-select-sm { min-width: 0; }
.table-lines input[name$="-quantity"], .table-lines input[name$="-discount"], .table-lines input[name$="-tax"] { width: 62px; padding-left: .4rem; padding-right: .2rem; }
.table-lines input[name$="-unit_price"] { width: 84px; padding-left: .4rem; padding-right: .2rem; }
.table-lines select[name$="-kind"] { width: 108px; padding-left: .4rem; }
.table-lines .btn-remove-line { padding: .1rem .35rem; }
.table-lines .line-total { font-size: .85rem; }
.table-lines th, .table-lines td { padding-left: .3rem; padding-right: .3rem; white-space: nowrap; }

/* ---------- Responsive ---------- */
.table-responsive { -webkit-overflow-scrolling: touch; }
.table-responsive > .table { margin-bottom: 0; }
.table-responsive > .table th, .table-responsive > .table td { white-space: nowrap; }
.table-responsive > .table td.text-wrap, .table-responsive > .table th.text-wrap { white-space: normal; }
@media (max-width: 991.98px) {
    .sticky-summary { position: static; }
    .card-header form.row > [class*="col-"] { flex: 1 1 100%; max-width: 100%; }
    .card-header form.row > .col-auto { flex: 0 0 auto; width: auto; }
    .page-title-box .page-title { font-size: 1rem; }
}
@media (max-width: 575.98px) {
    .content-page .container-fluid { padding-left: 12px; padding-right: 12px; }
    .table > :not(caption) > * > * { padding: .5rem .5rem; }
    .btn-sm { padding: .28rem .5rem; }
    #ajaxModal .modal-dialog { margin: .5rem; }
}

/* ---------- Modales ---------- */
.modal-content { border-radius: 14px; border: 0; overflow: hidden; }
.modal-header { padding: 1.25rem 1.75rem; }
.modal-body { padding: 1.5rem 1.75rem; }
.modal-footer { padding: 1rem 1.75rem 1.25rem; }
@media (max-width: 575.98px) {
    .modal-content { border-radius: 12px; }
    .modal-header, .modal-footer { padding-left: 1.25rem; padding-right: 1.25rem; }
    .modal-body { padding: 1.25rem; }
}

/* Tipografía: un punto más pequeña en todo el sitio (el tema usa rem, así que escala todo proporcionalmente) */
html { font-size: 15px; }
.fs-18 { font-size: 17px !important; }
.fs-16 { font-size: 15px !important; }
.fs-15 { font-size: 14px !important; }
.fs-14 { font-size: 13px !important; }

/* Modales con formulario: el <form> es el hijo flex de .modal-content; sin esto el cuerpo no se encoge y el pie queda fuera de pantalla */
.modal-dialog-scrollable .modal-content > form { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.modal-dialog-scrollable .modal-content > form .modal-body { overflow-y: auto; }

/* Cabecera superior: empresa (protagonista, con mini-logo) + título de página debajo */
.topbar-heading { display: flex; flex-direction: column; justify-content: center; height: var(--tz-topbar-height); min-width: 0; margin-left: .25rem; }
.topbar-company { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.topbar-company-logo { height: 28px; width: auto; max-width: 90px; object-fit: contain; border-radius: 4px; }
.topbar-company-name { font-size: 19px; font-weight: 700; line-height: 1.2; color: var(--tz-topbar-item-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-page { font-size: 12.5px; font-weight: 500; line-height: 1.3; color: var(--tz-secondary-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.topbar-page .badge { font-size: 10px; vertical-align: middle; }
@media (max-width: 575.98px) {
    .topbar-heading { max-width: 52vw; }
    .topbar-company-name { font-size: 15px; }
    .topbar-company-logo { height: 22px; }
    .topbar-page { font-size: 11.5px; }
}

/* Logo Climora en el menú lateral: más grande y alineado a la izquierda, a la altura del texto del menú */
.leftside-menu .logo { text-align: left; padding-left: 18px; }
.leftside-menu .logo span.logo-lg img { height: 34px; }
html[data-sidenav-size="condensed"] .leftside-menu .logo, html[data-sidenav-size="sm-hover"] .leftside-menu .logo { padding-left: 0; text-align: center; }
