/* === Rozložení dashboardu === */

.dashboard-layout{
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
  align-items:start;
}

.dash-col{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:14px;
}

@media (min-width:800px){
  .dashboard-layout{
    grid-template-columns:1fr 1fr;
    column-gap:10px;
  }

  .dash-col-1{grid-column:1}
  .dash-col-2{grid-column:2}
  .dash-col-3{grid-column:1 / span 2}
}

@media (min-width:1100px){
  .dashboard-layout{
    grid-template-columns:30% 30% 40%;
    column-gap:10px;
  }

  .dash-col-1,
  .dash-col-2,
  .dash-col-3{
    grid-column:auto;
  }
}

form{margin-top:15px}

.dash-add-actions{display:flex;gap:10px;justify-content:center;flex-wrap:nowrap;}
.dash-add-actions .default-button,.dash-add-actions .default-button-grey{
	font-size: 50px;
    border-radius: 60px;
    width: 108px;
}

/* Modal pro nahrávání příloh */

#attachmentModal{
  display:none;
  position:fixed;
  z-index: 10050 !important;
  left:0;
  top:0;
  width:100%;
  height:100%;
  background:rgba(0,0,0,0.4);
  justify-content:center;
  align-items:center;
}

#attachmentModal .modal-content{
  position:relative;
  border-radius:10px;
  padding:25px 35px;
  box-shadow:0 4px 12px rgba(0,0,0,0.2);
  text-align:center;
  max-width:400px;
  z-index: 10051 !important;
}

#attachmentModal h3{margin-top:0}
#attachmentModal input[type="file"]{margin:15px 0}

#attachmentModal .close{
  position:absolute;
  right:20px;
  top:15px;
  font-size:1.5rem;
  cursor:pointer;
}

#fileInfo{margin-top:8px;font-weight:bold}
#uploadStatus{transition:opacity .3s ease}

/* Přednahrání */
#attachedFilePreview{
  margin-bottom: 10px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  border:1px solid #d0d8e8;
  border-radius:6px;
  padding:6px 10px;
  font-size:.90rem;
}

#attachedFilePreview span.remove{
  color:red;
  cursor:pointer;
  font-weight: bold;
  font-size:2rem;
  margin-left:8px;
  opacity: 0.5;
}

#attachedFilePreview span.remove:hover{
  opacity: 1;
}

/* Tabulka posledních transakcí */
#lastTransactionsTable{
  width:100%;
  border-collapse:collapse;
  font-size:13px;
  margin-top:10px;
}

#lastTransactionsTable th,
#lastTransactionsTable td{
  padding:2px 5px;
  border-bottom:1px solid #b7b0b05c;
  text-align:center;
}

#lastTransactionsTable tr{
  cursor:pointer;
  transition:background .2s;
}

.lastTransaction-button{
  font-size:15px;
  margin-top:10px;
  padding:2px 10px;
}

.latest-transaction-author{
font-size:0.78rem;
margin-top:2px;
margin-left:5px;
font-weight: 600;
}

.amount-cell {
  text-align: right;
  font-weight: 600;
}


/* Výpis jednotlivých účtů */
.dash-balances {
  padding: 0;
}

table.balances-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 17px;
  cursor: default;
}

table.balances-table tbody td {
  transition: all 0.3s ease;
}

.balances-table th {
  text-align: left;
}

.balances-table th,
.balances-table td {
  vertical-align: middle;
}

.balances-table td:first-child {
  padding: 4px 12px;
}

.balances-table td.balance-amount-col {
  padding: 4px 4px;
  text-align: right;
  font-size: 20px;
}

.balances-table td.balance-currency-col {
  padding: 2px 5px 2px 4px;
  text-align: left;
  font-size: 20px;
}

.balance-section-row {
  cursor: pointer;
}

.balance-section-row td {
  font-weight: 700;
}

.balance-section-row td:first-child {
  padding-left: 12px;
}

.balance-detail-row td {
  font-size: 0.95rem;
}

.balance-detail-row td:first-child {
  padding-left: 28px;
}

.balance-section-row td:first-child,
.balance-account-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.balance-account-name {
  opacity: 0.9;
}

.balance-amount-col {
  width: 130px;
  min-width: 130px;
  max-width: 130px;
  white-space: nowrap;
}

.balance-currency-col {
  width: 42px;
  min-width: 42px;
  max-width: 42px;
  white-space: nowrap;
  font-weight: 500;
}

.balances-table .amount-pos,
.balances-table .amount-neg {
  padding: 3px 0px;
}

.balances-table td.balance-account-amount {
  font-size: 15px;
}

.balances-table td.balance-account-currency {
  font-size: 15px;
}

.balance-detail-row:hover td {
  cursor: default;
  font-weight: 700;
}

.balances-table .balance-section-available td.balance-amount-col {
  font-size: 18px;
  font-weight: 600;
}

.balances-table .balance-section-total td.balance-amount-col {
  font-size: 17px;
  font-weight: 400;
}

.balances-table .balance-section-debt td.balance-amount-col {
  font-size: 16px;
  font-weight: 400;
}

.balances-table .balance-section-available td.balance-currency-col {
  font-size: 18px;
  font-weight: 600;
}

.balances-table .balance-section-total td.balance-currency-col {
  font-size: 17px;
  font-weight: 400;
}

.balances-table .balance-section-debt td.balance-currency-col {
  font-size: 16px;
  font-weight: 400;
}

/* ROČNÍ PŘEHLED PO MĚSÍCÍCH */
.monthly-overview-box .monthly-topbar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 12px;
}

.monthly-currency {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 5px;
}

.monthly-overview-box .balances-monthly {
  width: 100%;
  cursor: default;
  padding: 5px;
  border-collapse: separate;
  border-spacing: 0px 5px;
  margin-top: -5px;
}

.monthly-overview-box .balances-monthly td {
  vertical-align: middle;
}

.monthly-overview-box .month-row-top td,
.monthly-overview-box .month-row-bottom td {
  padding-top: 1px;
  padding-bottom: 1px;
}

.month-row-bottom{
  font-size: 18px;
}

.monthly-overview-box .month-row-top.is-last-month td[rowspan],
.monthly-overview-box .month-row-bottom.is-last-month td {
  border-bottom: none;
}

.monthly-overview-box .balances-gap {
  width: 14px;
  min-width: 14px;
  padding: 0;
  background: transparent;
}

.balances-amtInc, .balances-amtExp{
	text-align: center;
	border-radius: 20px;
	transition: all 0.5s ease;
	}

.balances-monthyear{
	font-weight:600;
	}

/* IE graf */
.ie-topbar{
  display:flex;
  gap:12px;
  align-items:flex-start;
  justify-content:space-between;
  margin:7px 3px -15px;
  flex-wrap:nowrap;
}

.ie-currency{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.ie-nav{
  display:flex;
  gap:2px;
  align-items:center;
  justify-content:flex-start;
  white-space:nowrap;
  margin-top:0;
}

.ie-nav-btn{
  font-size: 10px;
  width: 30px;
  padding-left: 9px; 
  margin: 0px 5px 0px 5px;
}

#iePrevMonth:disabled,
#ieNextMonth:disabled{
  opacity:.55;
  cursor:default;
}

.ie-period{
  font-size:.95rem;
  min-width:62px;
  text-align:center;
  font-weight:700;
}

.ie-chart-wrap{
  position:relative;
  height:120px;
  margin-top:8px;
  margin-left:-5px;
}

.ie-summary{
  margin-top:5px;
  height:20px;
}

.ie-sum-row{
  display:flex;
  justify-content:space-between;
  gap:1px;
  flex-wrap:nowrap;
  flex-direction:row;
  margin-bottom:-5px;
  cursor: default;
}

.ie-sum-col{flex:1}

.ie-sum-left,
.ie-sum-right{
  text-align:center;
  height:25px;
  align-content:center;
  transition:all .5s ease;
}

.ie-sum-pct{font-style:italic;font-size:13px}

/* Opakované platby */

.recurrings-list{
  display:flex;
  flex-direction:column;
  gap:4px;
  margin:5px 2px 0 2px;
}

.recurrings-row{
  cursor:pointer;
  display:grid;
  grid-template-columns:100px 1fr auto;
  gap:10px;
  align-items:center;
  padding:2px 10px;
  border:1px solid;
  border-radius:10px;
  transition:all .5s ease;
}

.recurrings-row.is-overdue{animation: opacityPulse 0.5s ease-in-out infinite alternate;}

.recurrings-date-main{font-weight:600;white-space:nowrap}
.recurrings-date-sub{font-size: 13px;white-space:nowrap;font-style: italic;}
.recurrings-title{font-weight:600}
.recurrings-sub{font-size:12px;opacity:.7;margin-top:2px}
.recurrings-amt{font-weight:700;white-space:nowrap}
.recurrings-empty{opacity:.75;padding:10px 0;text-align:center;font-size:15px}

/* Pole částky - nový záznam */
#tranAmount{
  text-align:center;
  font-weight:bold;
  font-size:1.5rem;
  letter-spacing:1px;
  padding:3px;
}

/* Pole částky - převod */
#transferAmount{
  text-align:center;
  font-weight:bold;
  font-size:1.5rem;
  letter-spacing:1px;
  padding:5px;
  height: 43px;
}

.amount-field{
  display:flex;
  align-items:center;
  gap:6px;
  margin:10px 0;
}

.amount-field input{
  flex:1;
  padding:8px;
  border-radius:6px;
  font-size:1rem;
  box-sizing:border-box;
}

.amount-field span{
  font-weight:500;
  min-width:35px;
  text-align:right;
}

/* Skupiny polí vedle sebe */
.row-group{
  display:flex;
  flex-direction:row;
  justify-content:space-between;
}

.row-group input,
.row-group select{
  flex:1;
  min-width:0;
  box-sizing:border-box;
  text-align:left;
}

/* Typ transakce (Příjem / Výdaj) */
.type-group{
  display:flex;
  justify-content:center;
  gap:20px;
  margin:10px 0 20px;
}

.type-group input[type="radio"]{display:none}

.type-option{
  display:inline-block;
  padding:8px 20px;
  border:2px solid transparent;
  border-radius:8px;
  cursor:pointer;
  user-select:none;
  transition:all .25s ease;
  font-weight:500;
  box-shadow:0 2px 4px rgba(0,0,0,0.05);
}

.type-option:hover{
  transform:scale(1.03);
  opacity:.9;
}

#typeIncome:checked + .type-option{
  background-color:#4caf50;
  border-color:#4caf50;
  font-weight:600;
  box-shadow:0 0 8px rgba(76,175,80,0.4);
}

#typeExpense:checked + .type-option{
  background-color:#e53935;
  border-color:#e53935;
  font-weight:600;
  box-shadow:0 0 8px rgba(229,57,53,0.4);
}

/* Mazání transakce */
.delete-row td.delete-cell{
  border-top:none;
  padding:0;
  height:40px;
  font-size:30px;
}

.delete-buttons{
text-align: center;
margin-top: -7px;
}

/* Efekt potvrzení na tlačítku */
button.success{transition:background-color 1s ease}

/* Graf vývoje celého majetku */

.wealth-chart-wrap{
  position:relative;
  width:100%;
  height:320px;
  margin-left:-10px;
  margin-top: -5px;
  cursor: crosshair;
}

.wealth-summary{
  display:flex;
  cursor: default;
  justify-content:space-around;
  gap:5px;
  flex-wrap:wrap;
  margin-bottom:-5px;
  padding:3px 0px 3px 0px;
  border-top: solid 1px;
  transition: all 0.3s ease;
  font-size: 15px;
}

.wealth-summary-row{
  display:flex;
  gap:5px;
  align-items:center;
}

.box-header-button{
margin: 1px 0 0 0;
padding: 0 10px;
float: right;
font-size: 13px;
}

.dashboard-favs-wrap {
  margin-bottom: 12px;
  display: none;
  justify-items: center;
}

.dashboard-favs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.dashboard-fav-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid;
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  transition: 0.2s ease;
}

.dashboard-fav-item:active {
  transform: scale(0.96);
}

.dashboard-fav-item img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  pointer-events: none;
}

.dashboard-fav-item.is-disabled {
  cursor: not-allowed;
  opacity: 0.45;
  filter: grayscale(100%);
}

.dashboard-fav-item.is-disabled:hover {
  transform: none;
}

.top-exp-box {
  overflow: hidden;
}

.top-exp-content {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 14px;
  padding: 0 14px 0px 14px;
  align-items: start;
  min-width: 0;
  margin-top: 25px;
}

.top-exp-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.top-exp-item {
  border: 1px solid;
  border-radius: 10px;
  overflow: hidden;
  min-width: 0;
}

.top-exp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  min-width: 0;
  transition: all 0.4s ease;
}

.top-exp-rank {
  min-width: 26px;
  font-weight: 700;
  flex: 0 0 auto;
}

.top-exp-name {
  flex: 1 1 auto;
  font-weight: 600;
  word-break: break-word;
  min-width: 0;
  transition: all 0.4s ease;
}

.top-exp-amount {
  white-space: nowrap;
  font-weight: 700;
  flex: 0 0 auto;
}

.top-exp-sublist {
  display: none;
  border-top: 1px solid;
  padding: 8px 12px 10px 12px;
}

.top-exp-item.open .top-exp-sublist {
  display: block;
}

.top-exp-subrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0;
  font-size: 14px;
  min-width: 0;
}

.top-exp-subname {
  min-width: 0;
  word-break: break-word;
}

.top-exp-subamount {
  white-space: nowrap;
  font-weight: 600;
  flex: 0 0 auto;
}

.top-exp-empty {
  padding: 12px;
  text-align: center;
}

.top-exp-chart-wrap {
  position: relative;
  min-height: 260px;
  min-width: 0;
  width: 100%;
  overflow: hidden;
}

.top-exp-chart-wrap canvas {
  display: block;
  width: 100% !important;
  max-width: 100%;
}

@media (max-width: 1550px) and (min-width: 1101px) {
  .top-exp-content {
    grid-template-columns: 1fr;
  }

  .top-exp-chart-wrap {
    min-height: 220px;
  }
}

@media (max-width: 1100px) and (min-width: 601px) {
  .top-exp-content {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  }

  .top-exp-chart-wrap {
    min-height: 260px;
  }
}

@media (max-width: 600px) {
  .top-exp-content {
    grid-template-columns: 1fr;
  }

  .top-exp-chart-wrap {
    min-height: 220px;
  }
}
.dash-score-box {
  padding: 16px;
}

.dash-score-toggle {
  width: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
}

.dash-score-toggle:hover,
.dash-score-toggle:focus {
  outline: none;
}

.dash-score-toggle:focus-visible {
  border-radius: 14px;
}

.dash-score-value {
  display: block;
  font-size: 44px;
  font-weight: 750;
  line-height: 1.1;
  text-align: center;
  letter-spacing: -0.04em;
  margin: 4px 0 12px;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.dash-score-value:hover {
  opacity: 1;
}

.dash-score-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.35s ease, background-color 0.25s ease;
}

.dash-score-metrics {
  margin-top: 14px;
  padding-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  text-align: center;
  cursor: default;
}

.dash-score-metric-panel {
  padding: 10px;
  border-radius: 12px;
  opacity: 0.8;
  transition: opacity 0.3s ease, font-weight 0.3s ease;
}

.dash-score-metric-panel:hover {
  opacity: 1;
  font-weight: 500;
}

.dash-score-metric-name {
  font-size: 13px;
  line-height: 1.25;
  margin-bottom: 5px;
}

.dash-score-metric-value {
  font-size: 18px;
  line-height: 1.1;
  font-weight: 750;
  margin-bottom: 8px;
}

.dash-score-metric-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.35s ease, background-color 0.25s ease;
}

.dash-score-error {
  margin-top: 12px;
  padding: 9px 10px;
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
  border-radius: 12px;
}

@media (max-width: 520px) {
  .dash-score-metrics {
    grid-template-columns: 1fr;
  }

  .dash-score-metric-panel {
    padding: 9px 10px 8px;
  }

  .dash-score-metric-name {
    margin-bottom: 4px;
  }

  .dash-score-metric-value {
    font-size: 17px;
    margin-bottom: 7px;
  }

}



.amount-field-with-calc {
  display:flex;
  align-items:center;
  gap:8px;
}

.amount-field-with-calc input {
  flex:1;
  min-width:0;
  border:0;
  outline:none;
}

.amount-calc-img {
  width:32px;
  height:32px;
  display:block;
  object-fit:contain;
  cursor:pointer;
  transition:all 0.3s ease;
  opacity:0.7;
  flex:0 0 32px;
  position:relative;
  z-index:3;
}

.amount-calc-img:hover {
  opacity: 1;
}

.calc-input {
  padding:12px;
  margin-bottom:12px;
  font-size:1.5rem;
  text-align:right;
}

.amount-calc-preview {
  min-height:22px;
  margin:-4px 0 12px;
  text-align:right;
  font-size:0.95rem;
}

.amount-calc-grid {
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:8px;
}

.calc-btn {
  min-height:42px;
  border:0;
  border-radius:9px;
  font-weight:600;
  cursor:pointer;
  transition:all 0.3s ease;
}

.amount-calc-use {grid-column:span 2;}

/* Ušetřeno tento měsíc */
.dash-saved-month {
  padding: 5px 0 0;
  display: flex;
  flex-direction: column;
  font-size: 25px;
  gap: 0;
}

.dash-saved-empty {
  text-align: center;
  font-size: 15px;
}

.dash-saved-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 12px;
  padding: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dash-saved-row:last-child {
  border-bottom: 0;
}

.dash-saved-amount {
  font-weight: 700;
  line-height: 1.2;
}

.dash-saved-currency {
  font-weight: 600;
  white-space: nowrap;
}

.dash-saved-detail {
  display: none;
  padding: 8px 0 0;
}

.dash-saved-detail.show {
  display: flex;
  justify-content: center;
}

.dash-saved-detail-table {
  width: auto;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.dash-saved-detail-table td {
  padding: 5px 8px;
  white-space: nowrap;
}

.dash-saved-detail-table td:first-child {
  text-align: right;
  min-width: 70px;
}

.dash-saved-detail-table td:last-child {
  text-align: right;
  min-width: 95px;
  font-weight: 600;
  padding-left: 12px;
}

.dash-saved-error {
  padding: 12px 16px 16px;
}

.category-progressive-group {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: center;
  width: 100%;
}

.category-progressive-group.has-category {grid-template-columns: 1fr 2fr;}
.category-progressive-group.has-subcategory {grid-template-columns: repeat(3, minmax(0, 1fr));}
.category-progressive-group .category-step-hidden {display: none !important;}
.category-progressive-group .default-select {width: 100%;min-width: 0;}

.new-transaction-footer{
    display: grid;
    gap: 15px;
    align-items: center;
	grid-template-columns: 1fr 0.2fr 0.5fr;
}

.modal-recent-transactions {
  margin: 10px 10px 0 10px;
  padding: 0px 10px;
  border: 1px solid;
  border-radius: 14px;
}

.modal-recent-transactions-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.modal-recent-transactions-table th,
.modal-recent-transactions-table td {
  padding: 6px 5px;
  border-bottom: 1px solid;
  text-align: left;
  vertical-align: middle;
}

@media (max-width: 520px) {
.modal-recent-transactions-table th,
.modal-recent-transactions-table td {
  padding: 3px 5px;
}
}


.modal-recent-transactions-table th {
  font-weight: 700;
  white-space: nowrap;
}

.modal-recent-transactions-table td:last-child,
.modal-recent-transactions-table th:last-child {
  text-align: right;
  white-space: nowrap;
}

.modal-recent-transactions-empty {
  text-align: center !important;
  padding: 10px 5px !important;
}

#transferFrom,
#transferTo {
  display: none;
}

.transfer-amount-field{
	display:flex;
	align-items:center;
	width:100%;
    gap:6px;
    margin:0;
}

.transfer-amount-field input{flex:1;min-width:0;}
.transfer-currency-label{font-size:1.5rem;}
	
.transfer-dateamount{
  display: flex;
  margin-bottom: 15px;
  gap: 20px;
}

@media (max-width: 500px) {
 .transfer-dateamount{
    gap: 5px;
  }
}
  
  
.transfer-account-button-row {
  display: grid;
  gap: 10px;
  width: 100%;
  justify-content: stretch;
  margin-bottom: 15px;
}

.transfer-account-button-section {
  display: grid;
  gap: 6px;
  width: 100%;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.transfer-account-buttons {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  justify-content: center;
}

.transfer-account-buttons .default-button {
  padding: 0 15px;
  min-height: 28px;
  font-size: 0.9rem;
}

.transfer-arrow-down {
  text-align: center;
  font-size: 1.2rem;
  line-height: 1;
}

.transfer-transaction-footer{
    display: grid;
    gap: 15px;
    align-items: center;
	grid-template-columns: 1fr 0.5fr;
}


.recent-transfer-row,
.recent-transaction-row{
transition: all 0.3s ease;
}

.recent-transfer-row:hover,
.recent-transaction-row:hover{
font-weight: 600;
}


.confirm-button{
    flex:1; 
	height: 60px;
	align-self: stretch;
    font-size: 1.4rem;
    display: block;
}

.confirm-button-div{
    display:flex; 
    align-items:center; 
    justify-content:space-between; 
    width:100%;
}

.transfer-summary-info {
  display: none;
  margin: 8px 0 0;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 400;
}

.transfer-summary-info strong {
  font-weight: 700;
}
