﻿html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 0 !important;
}

.form-control,
.form-select {
  border-radius: 0.5rem;
}

.card {
  border-radius: 12px;
  background:#fffdf5;
}

.card-header {
  border-bottom: 1px solid #eee;
}

.subtle-divider {
    border: none !important;
    border-top: 1px solid rgb(11 0 0 / 8%);
    margin: 4px 0;
    background: #b8b8b8;
}
.text-muted{
    color:black !important;
}

.app-navbar .nav-link {
  color: #1f2937;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.app-navbar .nav-link:hover,
.app-navbar .nav-link:focus {
  color: #111827;
}

.app-navbar .nav-link.active {
  border-bottom: 2px solid #000;
}

.app-navbar .navbar-brand {
  letter-spacing: 0.2px;
}

.app-navbar .dropdown-menu {
  border-radius: 10px;
}

.app-navbar .dropdown-item:hover,
.app-navbar .dropdown-item:focus {
  background-color: #f8f9fa;
}

.dashboard-card {
  border: 0;
  border-radius: 12px;
  box-shadow: 0 .125rem .5rem rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 .5rem 1rem rgba(0, 0, 0, 0.12);
}

.dashboard-stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(253, 161, 43, 0.15);
  color: #FDA12B;
}

.quick-link-btn {
  border-radius: 10px;
}

.page-header {
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
}

.page-title {
  font-weight: 600;
  color: #333;
}

.filter-bar {
  background-color: #fff;
  border-radius: 8px;
}

.filter-bar .form-control,
.filter-bar .form-select {
  height: 34px;
  font-size: 13px;
}

.filter-bar .btn {
  white-space: nowrap;
}

/* Custom checkbox (brand color) */
.form-check-input {
  cursor: pointer;
  width: 16px;
  height: 16px;
}

.form-check-input:hover {
  border-color: #FDA12B;
}

.form-check-input:checked {
  background-color: #FDA12B;
  border-color: #FDA12B;
}

.form-check-input:focus {
  box-shadow: 0 0 0 0.15rem rgba(253, 161, 43, 0.25);
}

.table input[type="checkbox"] {
  vertical-align: middle;
}

.invoice-form-shell > .card-body {
  padding: 1.25rem;
}

.invoice-section-card {
  overflow: hidden;
}

.invoice-section-card .card-header {
  font-size: 0.95rem;
}

.invoice-section-card .form-label {
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.invoice-local-section {
  background-color: #fcfcfc;
}

#reserveFundCard .card-body > div {
  min-width: 120px;
}

.invoice-additional-card .table {
  margin-bottom: 0;
}

.invoice-additional-card .table thead th {
  white-space: nowrap;
  font-size: 0.8rem;
  color: #6c757d;
}

.invoice-additional-card .table tbody td {
  vertical-align: middle;
}

.invoice-additional-card .add-expense-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.invoice-additional-card .add-expense-btn i,
.invoice-additional-card .move-right i,
.invoice-additional-card .move-left i {
  pointer-events: none;
}

.invoice-additional-card .add-expense-btn {
  font-size: 0;
  min-width: 32px;
  height: 32px;
  padding: 0.25rem 0.5rem;
}

.invoice-additional-card .add-expense-btn i {
  font-size: 0.875rem;
  margin: 0 !important;
}

.invoice-additional-card #expensesContainer .form-control {
  min-height: 34px;
}

.invoice-additional-card #expensesContainer {
  border-left: 4px solid #ffc107;
  background: #fffdf5;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.invoice-additional-card .text-end .form-control {
  margin-left: auto;
}

.pagination {
  margin-bottom: 0;
}

.pagination .page-link {
  border-radius: 6px;
  margin: 0 2px;
  padding: 6px 10px;
  font-size: 13px;
  min-width: 32px;
  text-align: center;
}

.pagination .active .page-link,
.pagination .page-item.active .page-link {
  background-color: #FDA12B;
  border-color: #FDA12B;
}

.app-footer {
  padding: 10px 0;
  border-top: 1px solid #eee;
  color: #999;
  font-size: 12px;
  background: #fff;
}

/* === PRO TABLE HEADER === */
.table-pro thead {
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
  border-top: 3px solid #FDA12B;
  border-bottom: 2px solid #dee2e6;
  box-shadow: inset 0 -1px 0 #dee2e6;
}

.table-pro thead th {
  position: sticky;
  top: 0;
  background: inherit;
  z-index: 2;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  color: #6c757d;
  letter-spacing: 0.5px;
  padding: 10px 8px;
  border-bottom: none;
  vertical-align: middle;
}

.table-pro thead th:not(:last-child) {
  border-right: 1px solid #f1f1f1;
}

.table-pro tbody tr:hover {
  background-color: #fff8e6;
  transition: 0.2s ease;
}

.table-pro td {
  vertical-align: middle;
}

.invoice-additional-card #expensesContainer table td {
  vertical-align: middle;
}

.invoice-additional-card #expensesContainer td:last-child {
  text-align: right;
}

.invoice-additional-card #expensesContainer .card-header {
  font-size: 0.9rem;
}

.invoice-additional-card .table .text-end {
  text-align: right !important;
}

/* Global toast styling */
#globalToastContainer {
    top: 20px;
  right: 20px;
    z-index: 9999;
}

#globalToastContainer .toast {
    border-radius: 14px;
    min-width: 300px;
    padding: 6px 4px;
 font-size: 14px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.10);
    position: relative;
    overflow: hidden;
    /* Slide-in animation — works with Bootstrap's .show toggle */
    transform: translateY(-10px);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

#globalToastContainer .toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Left accent bar — inherits currentColor from the text-bg-* variant */
#globalToastContainer .toast::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: currentColor;
    opacity: 0.5;
}

#globalToastContainer .btn-close {
    filter: none !important;
}
.toast-body {
  display: flex;
    align-items: center;
    gap: 10px;
}

.toast-body i {
    font-size: 18px;
    flex-shrink: 0;
}

/* Softer, modern semantic colours */
.text-bg-success {
  background-color: #e6f7ec !important;
    color: #1e7e34 !important;
}

.text-bg-danger {
    background-color: #fdecea !important;
    color: #b02a37 !important;
}

.text-bg-warning {
    background-color: #fff4e5 !important;
    color: #b58105 !important;
}

/* ── Tab wrapper ──────────────────────────────────────────────────── */
.unit-create-relationships {
  background: #fffdf5;
  border: 1px solid #e9e1d0;
  border-radius: 8px;
}

.unit-assignment-picker,
.unit-assignment-summaries {
  max-width: 900px;
}

.unit-assignment-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: .5rem;
}

.unit-assignment-picker-field {
  flex: 1 1 12rem;
  min-width: 0;
}

.unit-assignment-picker .form-select,
.unit-assignment-picker .select2-container .select2-selection--single,
.unit-assignment-picker .btn {
  min-height: 38px;
}

.unit-assignment-picker .btn {
  min-width: 6rem;
}

.unit-assignment-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 575.98px) {
  .unit-assignment-picker-field {
    flex-basis: 100%;
  }
}

.unit-tabs-wrapper {
background: #fff8e1;
    border-radius: 12px;
    padding: 8px 12px;
    border: 1px solid #f1e3b0;
}

/* ── Custom tabs ──────────────────────────────────────────────────── */
.custom-tabs {
    border-bottom: none;
    gap: 4px;
}

.custom-tabs .nav-link {
    border: none;
    border-radius: 10px;
    color: #6c757d;
    font-weight: 500;
    padding: 8px 14px;
    transition: background 0.2s ease, color 0.2s ease;
}

.custom-tabs .nav-link:hover {
    background: rgba(255, 193, 7, 0.18);
    color: #000;
}

.custom-tabs .nav-link.active {
    background: #ffc107;
    color: #000;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.custom-tabs .nav-link i {
    opacity: 0.8;
}

/* ── Tab content panel ────────────────────────────────────────────── */
.unit-tab-content {
    background: #fff;
    border-radius: 0 0 12px 12px;
    border: 1px solid #eee;
    border-top: none;
}

/* ── Select2 integration ────────────────────────────────────────── */
/* Keep the Select2 container flush with Bootstrap sm form controls  */
.select2-container--default .select2-selection--single {
    border-color: #dee2e6;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
 outline: none;
}

/* is-invalid visual feedback when Select2 wraps the native <select> */
.is-invalid + .select2-container--default .select2-selection--single,
select.is-invalid ~ .select2-container .select2-selection--single {
    border-color: #dc3545 !important;
}

/* Dropdown panel: rounded to match app card style */
.select2-container--default .select2-dropdown {
    border-radius: 8px;
    border-color: #dee2e6;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Highlighted result matches brand yellow */
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #ffc107;
    color: #000;
}

/* Search input inside dropdown */
.select2-container--default .select2-search--dropdown .select2-search__field {
    border-radius: 6px;
    border-color: #dee2e6;
    padding: 4px 8px;
    font-size: 13px;
}

/* "Present / Тековно" badge on ownership rows */
.present-label {
    color: #198754;
    font-weight: 500;
}

/* Empty state — shared by Ownership, Parking, AdditionalCosts lists */
.empty-state {
  font-size: 14px;
}

.empty-state i {
    opacity: 0.5;
}

/* ── Sticky save bar ────────────────────────────────────────────── */
.sticky-actions {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding: 12px 16px;
    border-top: 1px solid #eee;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(6px);
    margin-top: 12px;
}

/* Back button */
.back-btn {
    border-radius: 8px;
  font-weight: 500;
    color: #495057;
    transition: background 0.2s ease, transform 0.2s ease;
}

.back-btn:hover {
    background: #f8f9fa;
    transform: translateX(-2px);
}

/* Save button */
.save-btn {
 border-radius: 8px;
    font-weight: 600;
    padding: 6px 14px;
    box-shadow: 0 2px 6px rgba(255, 193, 7, 0.30);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.save-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(255, 193, 7, 0.35);
}
/* Invoice workflow presentation; financial form names and submission remain unchanged. */
.invoice-workflow-header > div { min-width: 0; overflow-wrap: anywhere; }
.invoice-correction .correction-section-heading { margin: 2rem 0 1rem; padding-top: 1rem; border-top: 1px solid var(--bs-border-color, #dee2e6); }
.invoice-correction .correction-recipients { padding: 1rem; min-width: 0; }
.invoice-correction .correction-charge .invoice-charge-meta span:empty { display: none; }
.invoice-correction .correction-participation { max-height: 32rem; }
.invoice-correction [data-source-units] { min-width: 43rem; }
.invoice-correction [data-source-units] input[type=number] { min-width: 5rem; }
.invoice-correction [data-source-units] .correction-reserve-count { width: 5rem; }
.invoice-correction [data-source-units] th[scope=row] { position: sticky; left: 0; z-index: 1; background: var(--bs-body-bg, #fff); min-width: 6rem; }
.invoice-correction [data-source-units] thead { z-index: 2; }
.invoice-correction .correction-summary { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr)); }
.invoice-correction .correction-summary .card { padding: .65rem .75rem; min-width: 0; overflow-wrap: anywhere; }
.invoice-correction .correction-summary dt { font-size: .875rem; color: var(--bs-secondary-color, #6c757d); }
.invoice-correction .correction-summary dd { margin: .2rem 0 0; font-size: 1.125rem; font-weight: 650; font-variant-numeric: tabular-nums; }
html:has(.invoice-correction .correction-results-region) { scrollbar-gutter: stable; }
.invoice-correction #correction-results { table-layout: fixed; width: 100%; min-width: 32rem; }
.invoice-correction .correction-result-identity { width: 24%; }
.invoice-correction .correction-result-amount { width: 16%; }
.invoice-correction .correction-result-status { width: 28%; }
.invoice-correction #correction-results :is(th, td) { overflow-wrap: anywhere; }
.invoice-correction #correction-results td.text-end { font-variant-numeric: tabular-nums; }
.invoice-correction .correction-disclosure-toggle { display: flex; align-items: center; gap: .625rem; width: 100%; padding: .75rem 1rem; border: 1px solid #dee2e6; border-radius: .25rem; background: #f8f9fa; color: #212529; text-align: left; font: inherit; }
.invoice-correction .correction-disclosure-toggle[aria-expanded=true] { background: #fff8e1; border-color: #d6b15c; }
.invoice-correction .correction-disclosure-toggle .bi { color: #a65d00; flex-shrink: 0; transition: transform .15s ease; }
.invoice-correction .correction-disclosure-toggle[aria-expanded=true] .bi { transform: rotate(90deg); }
.invoice-correction .correction-disclosure-toggle:focus-visible { outline: 2px solid #a65d00; outline-offset: 2px; }
.invoice-correction .correction-disclosure-compact .correction-disclosure-toggle { padding: .375rem .5rem; font-size: .875rem; }
.invoice-correction .correction-disclosure-compact li { overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) { .invoice-correction .correction-disclosure-toggle .bi { transition: none; } }
.invoice-correction .correction-catalog-scroll { max-height: 22rem; overflow: auto; }
.invoice-correction .correction-legacy-weights { min-width: 8rem; }
.invoice-correction [data-source-unit][hidden] { display: none !important; }
.invoice-correction .correction-catalog-scroll thead { position: sticky; top: 0; background: white; z-index: 1; }
.recipient-group-host { white-space: normal !important; }
.recipient-group-host > .recipient-groups,
.recipient-group-host > .dual-list-container { width: min(62rem, calc(100vw - 6rem)); max-width: 100%; min-width: 0; }
.recipient-groups + .dual-list-container > .flex-fill { min-width: 0; flex-basis: 0; }
.recipient-groups + .dual-list-container select { width: 100%; }
@media (max-width: 575.98px) {
    .recipient-groups + .dual-list-container { flex-direction: column; }
    .recipient-groups + .dual-list-container > .d-flex { flex-direction: row !important; gap: .5rem; }
}
.invoice-correction .correction-dual-list { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.invoice-correction .correction-dual-list[hidden] { display: none; }
.invoice-correction .correction-recipients > :is(.recipient-groups, .correction-dual-list) { width: 100%; }
.invoice-correction .correction-dual-list .select-wrapper { min-width: 0; }
.invoice-correction .correction-dual-list select { height: 12rem; }
.invoice-correction .correction-move-controls { flex-direction: column; align-self: center; }
.invoice-correction .correction-move-controls .btn { width: 2.25rem; padding-inline: 0; }
@media (max-width: 575.98px) {
    .invoice-correction .correction-dual-list { grid-template-columns: minmax(0, 1fr); }
    .invoice-correction .correction-move-controls { flex-flow: row wrap; }
    .invoice-correction .correction-move-controls i { display: inline-block; transform: rotate(90deg); }
}

/* Identity entry pages share the application's restrained orange branding. */
.login-background { background-image: url("../images/login-background.webp"); background-size: cover; background-position: center; background-repeat: no-repeat; }
.auth-shell { display: grid; place-items: center; flex: 1; padding: 2rem 0; }
.auth-card { width: 100%; max-width: 28rem; padding: 2rem; border: 1px solid #dee2e6; border-top: 4px solid #fda12b; border-radius: 8px; background: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .05); overflow-wrap: anywhere; }
.auth-brand { display: flex; align-items: center; gap: .75rem; margin-bottom: 2rem; font-size: 1.125rem; font-weight: 600; color: #343a40; }
.auth-brand img { object-fit: contain; flex-shrink: 0; }
.auth-card .form-control { min-height: 2.875rem; }
.auth-card .form-label { font-weight: 500; }
.auth-submit { min-height: 2.75rem; padding: .625rem 1rem; background: #fda12b; border-color: #fda12b; color: #212529; font-weight: 600; white-space: normal; }
.auth-submit:hover, .auth-submit:active { background: #ef921a; border-color: #ef921a; color: #212529; }
.auth-submit:focus-visible { outline: 3px solid #805000; outline-offset: 3px; }
.auth-status-icon { color: #805000; font-size: 2rem; }
.account-navigation { flex-shrink: 0; }
.account-toggle { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: .5rem; }
.account-toggle img { flex-shrink: 0; }
.account-navigation .account-toggle:hover, .account-navigation .account-toggle.show { color: #212529; background-color: #fff; }
.account-greeting { max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-navigation .account-menu { position: absolute; right: 0; left: auto; width: min(18rem, calc(100vw - 1.5rem)); max-width: calc(100vw - 1.5rem); border-radius: 6px; }
.account-identifier { white-space: normal; overflow-wrap: anywhere; color: #495057; }
.account-menu .dropdown-item { white-space: normal; overflow-wrap: anywhere; }
.account-settings .account-content { min-width: 0; overflow-wrap: anywhere; }
.account-settings form:not(.account-menu form) { max-width: 32rem; }
.account-settings .form-label { font-weight: 500; }
.account-settings .nav-pills .nav-link.active { background: #fda12b; color: #212529; }
.account-settings .nav-link { color: #495057; }
.account-recovery-codes { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .5rem; max-width: 32rem; }
@media (max-width: 575.98px) {
    .account-greeting { max-width: 8rem; }
    .auth-shell { padding: 1rem 0; }
    .auth-card { padding: 1.5rem; }
}
.payment-item-breakdown > summary {
    cursor: pointer;
    list-style: none;
    padding: .25rem 0;
}

.payment-history-content {
    min-width: 0;
    overflow-wrap: anywhere;
}

.payment-item-breakdown > summary::-webkit-details-marker {
    display: none;
}

.payment-item-breakdown > summary:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 3px;
}

.payment-item-breakdown[open] > summary .bi-chevron-right {
    display: inline-block;
    transform: rotate(90deg);
}

.payment-history-item-description {
    flex: 1 1 12rem;
    min-width: 0;
}
