/* ---------- Base ---------- */

html,
body{
  height:100%;
}

:root{
  --viewport-debug-gap: 0px;
  --fit-gap: 24px;
}

body{
  background:#f2f2f2;
  font-family:Arial,sans-serif;
  margin:0;
  padding:0;
}

a{
  color:#004080;
  text-decoration:none;
}

a:hover{
  color:#004080;
}

/* ---------- Layout ---------- */

.container{
  background:#fff;
  border-radius:8px;
  box-shadow:0 0 15px rgba(0,0,0,0.1);
  margin:20px auto;
  max-width:600px;
  padding:10px;
}

.container.container-wide{
  max-width:1200px;
}

.bank-statements-manage .container.container-wide{
  max-width:1500px;
}

.fit-viewport{
  height:100vh;
  overflow:hidden;
  box-sizing:border-box;
  padding:var(--fit-gap);
  padding-top:calc(var(--fit-gap) + var(--viewport-debug-gap));
}

.fit-viewport .container.container-wide{
  display:flex;
  flex-direction:column;
  height:calc(100vh - (2 * var(--fit-gap)) - var(--viewport-debug-gap));
  margin:0 auto;
  padding:8px 8px 12px;
}

body.dashboard.fit-viewport{
  padding:0;
  overflow:auto;
}

.fit-viewport .container.container-wide > .flex{
  flex:1;
  min-height:0;
}

.fit-viewport .left,
.fit-viewport .right{
  height:100%;
}

.fit-viewport.person-manage .left{
  overflow:hidden;
}

.fit-viewport.bank-statements-manage .right{
  overflow:hidden;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.fit-viewport.bank-statements-manage .right .transactions-box{
  flex:1;
  min-height:0;
  display:flex;
  flex-direction:column;
}

.fit-viewport.bank-statements-manage .right .transactions-scroll{
  flex:1;
  min-height:0;
  overflow:auto;
  background:#fff;
  border:1px solid #ccc;
}

.fit-viewport.bank-statements-manage .right .transactions-tools{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin:4px 0 2px 0;
}

.fit-viewport.bank-statements-manage .right .transactions-tools .filter-count{
  margin-left:auto;
  color:#666;
  font-size:0.85em;
}

.fit-viewport.bank-statements-manage .right .transactions-hint{
  font-size:0.85em;
  color:#666;
  margin:0 0 6px 0;
}

.flash-msg{
  padding:8px 10px;
  border:1px solid #ccc;
  background:#f7f7f7;
  margin:6px 0;
}

.flash-msg.ok{
  border-color:#2e7d32;
  background:#e8f5e9;
}

.flash-msg.err{
  border-color:#c62828;
  background:#ffebee;
}

.fit-viewport.contact-manage .left{
  overflow:hidden;
}

.fit-viewport.contact-manage .left .box{
  overflow:hidden;
}

.fit-viewport h1{
  margin:0 0 6px 0;
  font-size:1.3em;
}

.fit-viewport .box{
  margin:6px 0;
  padding:8px;
}

.fit-viewport .box-nav{
  margin:6px 0;
  padding:6px;
}

.fit-viewport .left .box{
  display:flex;
  flex-direction:column;
  height:100%;
}

.fit-viewport .left,
.fit-viewport .right{
  min-height:0;
}

.fit-viewport .left{
  overflow:hidden;
}

.fit-viewport .left .box{
  overflow:hidden;
}

.fit-viewport .left .list-scroll{
  flex:1;
  min-height:0;
  max-height:none;
  overflow:auto;
}

.list-filter{
  display:flex;
  align-items:center;
  gap:8px;
  padding:6px 8px;
  margin:0 0 6px 0;
  background:#f3f5f8;
  border:1px solid #e0e6ef;
  border-radius:8px;
  font-size:0.9em;
}

.list-filter .filter-text{
  font-weight:600;
}

.list-filter .filter-count{
  color:#666;
}

.btn-xs{
  padding:2px 6px;
  line-height:1;
  margin:0;
  width:auto;
}

.flex{
  display:flex;
  gap:10px;
  align-items:flex-start;
}

.totals-row{
  gap:8px;
  margin:0;
}

.totals-row + table{
  margin-top:0 !important;
}

.box.totals-box{
  margin:0;
  padding:6px 10px;
}

.totals-box h3{
  margin:0 0 4px 0;
  font-size:1em;
}

.totals-box p{
  margin:0;
}

.left{
  border-right:0;
  width:30%;
  padding:0;
  overflow:visible;
  max-height:none;
}

.right{
  width:70%;
  padding:0;
}

/* ---------- Boxes ---------- */

.box{
  background:#f9f9f9;
  border-radius:8px;
  margin:10px 0;
  padding:10px;
  position:relative;
}

.box-nav{
  align-items:center;
  background:#f9f9f9;
  border-radius:8px;
  display:flex;
  gap:6px;
  margin:10px 0;
  padding:10px;
}

.box-actions{
  display:flex;
  justify-content:flex-end;
  gap:6px;
  margin-top:10px;
}

.detail-row{
  display:flex;
  align-items:center;
  gap:10px;
  margin:0 0 8px 0;
  min-height:26px;
}

.detail-row .detail-label{
  min-width:140px;
}

.detail-row .detail-value{
  flex:1;
}

.detail-row .detail-actions{
  margin-left:auto;
}

.contact-manage .detail-row .btn{
  margin:0;
  padding:4px 8px;
  line-height:1;
}

/* ---------- Headings ---------- */

h1{
  font-size:1.5em;
  margin:0 0 10px 0;
}

h3{
  color:#004080;
  font-size:1.1em;
  font-weight:bold;
  margin:0 0 10px 0;
}

.box-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

/* ---------- Buttons ---------- */

.btn{
  background:#004080;
  border:1px solid transparent;
  border-radius:5px;
  color:#fff;
  cursor:pointer;
  display:inline-block;
  font-family:inherit;
  line-height:1;
  margin:4px;
  padding:6px 10px;
  text-decoration:none;
  user-select:none;
  white-space:nowrap;
}

/* ---------- Icon Buttons ---------- */

.icon-btn{
  appearance:none;
  align-items:center;
  background:#eef3fb;
  border:1px solid #c5d6eb;
  border-radius:6px;
  box-sizing:border-box;
  color:#004080;
  cursor:pointer;
  display:inline-flex;
  height:32px;
  justify-content:center;
  line-height:1;
  margin:0;
  padding:0;
  text-decoration:none;
  user-select:none;
  width:32px;
  min-width:32px;
  min-height:32px;
  flex:0 0 32px;
  font-size:0;
}

.icon-btn::before{
  content:"";
  display:block;
  width:16px;
  height:16px;
  background-color:currentColor;
  -webkit-mask:var(--icon-mask) no-repeat center / contain;
  mask:var(--icon-mask) no-repeat center / contain;
}

.icon-btn:hover{
  filter:brightness(0.96);
}

.icon-btn:active{
  transform:translateY(1px);
}

.icon-btn:focus,
.icon-btn:focus-visible{
  outline:2px solid #cce0ff;
  outline-offset:2px;
}

.icon-btn--edit{
  background:#e3edff;
  border-color:#8fb1e6;
  color:#0b4aa0;
  --icon-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zm2.92 2.83H5v-.92l8.06-8.06.92.92-8.06 8.06zM20.71 7.04a1 1 0 0 0 0-1.41l-2.34-2.34a1 1 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z'/%3E%3C/svg%3E");
}

.icon-btn--save{
  background:#e3edff;
  border-color:#8fb1e6;
  color:#0b4aa0;
  --icon-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V7l-4-4zM12 19a3 3 0 1 1 0-6 3 3 0 0 1 0 6zm3-10H5V5h10v4z'/%3E%3C/svg%3E");
}

.icon-btn--cancel{
  background:#f3f3f3;
  border-color:#d0d0d0;
  color:#666;
  --icon-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18.3 5.71 12 12l6.3 6.29-1.41 1.42L10.59 13.4 4.29 19.71 2.88 18.29 9.17 12 2.88 5.71 4.29 4.29 10.59 10.6l6.3-6.3z'/%3E%3C/svg%3E");
}

.icon-btn--delete{
  background:#fde7ea;
  border-color:#f1a1b0;
  color:#b00020;
  --icon-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 7h12l-1 14H7L6 7zm3-3h6l1 2H8l1-2z'/%3E%3C/svg%3E");
}

.icon-btn--add{
  background:#e3f6ea;
  border-color:#9bd7b1;
  color:#0a6b2f;
  --icon-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 11H13V5h-2v6H5v2h6v6h2v-6h6z'/%3E%3C/svg%3E");
}

.icon-btn--back{
  background:#e3edff;
  border-color:#8fb1e6;
  color:#004080;
  --icon-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H19z'/%3E%3C/svg%3E");
}

.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0, 0, 0, 0);
  white-space:nowrap;
  border:0;
}

button.btn{
  font:inherit;
  line-height:1;
}

td.action{
  text-align:right;
}

td.action .action-buttons{
  align-items:center;
  display:flex;
  flex-direction:row;
  gap:6px;
  justify-content:flex-end;
  flex-wrap:nowrap;
}

td.action .action-buttons .icon-btn{
  margin:0;
}

td.action .action-buttons form{
  margin:0;
}

.btn:hover{
  background:#cce0ff;
  color:#000;
}

.btn:active{
  transform:translateY(1px);
}

.btn:focus,
.btn:focus-visible{
  outline:2px solid #cce0ff;
  outline-offset:2px;
}

/* ---------- Forms ---------- */

label{
  display:block;
  font-weight:bold;
  margin-top:10px;
}

input,
select{
  border:1px solid #ccc;
  border-radius:5px;
  box-sizing:border-box;
  font-family:inherit;
  font-size:0.9em;
  margin:6px 0 12px;
  padding:6px;
  width:100%;
}

/* ---------- Lists ---------- */

ul{
  list-style:none;
  margin:0;
  padding:0;
}

li{
  margin:12px 0;
}

li.selected{
  background:#cce0ff;
  border-radius:5px;
  font-weight:bold;
  padding:6px;
}

.left a{
  display:block;
}

/* Scroll nur für Listenbereich, Header bleibt sichtbar */
.list-scroll{
  max-height:80vh;
  overflow-y:auto;
}

/* ---------- Tables ---------- */

table{
  border-collapse: separate;
  border-spacing: 0;
  font-family: inherit;
  margin-top:10px;
  table-layout:fixed;
  width:100%;
  border:1px solid #d9d9d9;
  border-radius:8px;
  overflow:hidden;
  background:#fff;
}

td,
th{
  border-bottom:1px solid #e6e6e6;
  border-right:1px solid #e6e6e6;
  overflow:hidden;
  padding:6px 8px;
  text-align:left;
  text-overflow:ellipsis;
  vertical-align:middle;
  white-space:nowrap;
}

table th:last-child,
table td:last-child{
  border-right:0;
}

table tr:last-child td{
  border-bottom:0;
}

td.action,
th.action{
  width:26%;
}

td.bank,
th.bank{
  width:35%;
}

td.iban,
th.iban{
  width:35%;
}

td.recipient-text,
th.recipient-text{
  width:45%;
}

td.recipient-text input{
  width:100%;
}

table input{
  margin:0;
}

table td{
  vertical-align:middle;
}

/* Bank-Statements Tabelle: kleiner + Datum/Betrag schmal */
.transactions-table { 
  font-family: inherit;
  font-size: .85em; 
  table-layout: fixed;
  width: 100%;
  margin-top:0;
  border-collapse: separate;
  border-spacing: 0;
}

.transactions-table thead th{
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}

.transactions-table th.sortable{
  cursor: pointer;
  user-select: none;
}

.transactions-table th.sortable .sort-indicator{
  margin-left: 6px;
  font-size: 0.8em;
  color: #777;
}

.transactions-table th.sortable[data-sort-dir="asc"] .sort-indicator::before{
  content: "▲";
}

.transactions-table th.sortable[data-sort-dir="desc"] .sort-indicator::before{
  content: "▼";
}

.transactions-table th,
.transactions-table td{
  border:0;
  border-right:1px solid #ccc;
  border-bottom:1px solid #ccc;
}

.transactions-table th:last-child,
.transactions-table td:last-child{
  border-right:0;
}

.transactions-table tbody tr:last-child td{
  border-bottom:0;
}

.transactions-table th:nth-child(1),
.transactions-table td:nth-child(1) { width: 80px; } /* Datum */

.transactions-table td:nth-child(2) { width: auto; padding: 0; } /* Typ */
.transactions-table th:nth-child(2) { width: 220px; }

.transactions-table th:nth-child(3),
.transactions-table td:nth-child(3) { width: 170px; } /* IBAN */

.transactions-table th:nth-child(4),
.transactions-table td:nth-child(4) { width: 80px; text-align: right; } /* Betrag */

.transactions-table th:nth-child(5),
.transactions-table td:nth-child(5) { width: 150px; } /* Zuordnung */

.transactions-table th:nth-child(6),
.transactions-table td:nth-child(6) { width: 220px; } /* Auftraggeber */


.td-assignment {
  text-align: right !important;
}

.assignment-cell {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 24px;
  width: 100%;
  flex-wrap: nowrap;
}

.assignment-cell > span {
  flex-grow: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 5px;
  text-align: left;
}

.match-form {
  display: inline-flex;
  margin-left: 5px;
  flex-shrink: 0;
}

.btn-match {
  padding: 2px 4px !important;
  font-size: 0.85em !important;
  line-height: 1 !important;
  margin: 0 !important;
  vertical-align: middle;
  width:auto;
}

.cat-clickable,
.cat-clickable-iban {
  cursor: pointer;
  position: relative;
  transition: background 0.2s;
}
.transaction-row[data-cat-id="0"] {
  cursor: pointer;
}
.cat-clickable:hover,
.cat-clickable-iban:hover,
.transaction-row[data-cat-id="0"]:hover {
  background: rgba(0, 64, 128, 0.05);
}
.booking-text-cell,
.counterparty-cell,
.td-assignment{
  cursor:pointer;
}

/* Modal for Categorization */
#cat-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 3000;
  justify-content: center;
  align-items: center;
}
#cat-modal {
  background: #fff;
  border-radius: 8px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  overflow: hidden;
}
#cat-modal .modal-header {
  background: #004080;
  color: #fff;
  padding: 10px 15px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#cat-modal .modal-header .close-modal {
  cursor: pointer;
  font-size: 1.5em;
  line-height: 1;
}
#cat-modal ul {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 400px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
}
#cat-modal li {
  padding: 8px 10px;
  border: 1px solid #eee;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 6px;
}
#cat-modal li:hover {
  background: #f5f5f5;
}
#cat-modal .color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Modal for Assignments */
.assign-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 3000;
  justify-content: center;
  align-items: center;
}
.assign-modal {
  background: #fff;
  border-radius: 8px;
  width: 90%;
  max-width: 520px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  overflow: hidden;
}
.assign-modal .modal-header {
  background: #004080;
  color: #fff;
  padding: 10px 15px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.assign-modal .modal-header .close-modal {
  cursor: pointer;
  font-size: 1.5em;
  line-height: 1;
}
.assign-modal .modal-body {
  padding: 10px 15px;
  border-bottom: 1px solid #eee;
}
.assign-modal .assign-filter {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
}
.assign-modal ul {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 420px;
  overflow-y: auto;
}
.assign-modal li {
  padding: 10px 15px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
}
.assign-modal li:hover {
  background: #f5f5f5;
}
.assign-modal li.empty {
  cursor: default;
  color: #666;
}
.modal-text{
  white-space:pre-wrap;
  max-height:320px;
  overflow:auto;
  color:#333;
  font-size:0.95em;
}

/* ---------- Helpers ---------- */

.actions{
  display:flex;
  justify-content:flex-end;
  gap:6px;
  margin-top:20px;
}

.error{
  color:red;
  font-weight:bold;
}

.badge{
  border-radius:12px;
  display:inline-block;
  font-size:0.85em;
  font-weight:bold;
  padding:2px 8px;
}
.badge.ok{ background:#d4edda; color:#155724; }
.badge.warn{ background:#f8d7da; color:#721c24; }

.cat-cell {
  cursor: pointer;
}

.cat-badge {
  border-radius: 4px;
  color: #fff;
  display: inline-block;
  font-size: 0.85em;
  padding: 2px 6px;
  white-space: nowrap;
}

/* Status-Punkt/Fragezeichen für Kategorien */
.cat-status {
  display: inline-block;
  text-align: center;
  border-radius: 50%;
  font-weight: bold;
  cursor: help;
}
.cat-status.missing {
  background: none;
}
.cat-status.exists {
  border: 1px solid rgba(0,0,0,0.1);
}


.transactions-table tr:hover {
  background-color: #f5f5f5;
}

.cat-badge[style*="background:#ccc"] {
  color: #333;
}
.badge.info{ background:#d1ecf1; color:#0c5460; }
.auto-badge{
  font-size:0.75em;
  padding:2px 6px;
  margin-left:6px;
}

.btn-small{
  font-size:0.8em;
  padding:2px 6px;
  margin:0 2px;
  width:auto;
}

.message{
  margin-top:10px;
  padding:8px 10px;
  border-radius:6px;
  background:#eef2f7;
  color:#243447;
  font-weight:600;
}

/* Finance manage spacing overrides */
.flex.totals-row{
  gap:8px;
  margin:0 0 20px 0 !important;
}
.fit-viewport .container.container-wide > .flex.totals-row{
  flex:0 0 auto;
  min-height:0;
}
.box.totals-box{
  margin:4px 0 !important;
  padding:4px 8px !important;
}
.totals-row .totals-box h3{
  margin:0 0 2px 0 !important;
  font-size:1em;
}
.totals-row .totals-box p{
  margin:0 !important;
  line-height:1.2;
}
.flex.totals-row + table{
  margin-top:0 !important;
}
.message.ok{ background:#d4edda; color:#155724; }
.message.error{ background:#f8d7da; color:#721c24; }
.message.info{ background:#d1ecf1; color:#0c5460; }

.progress-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:6px;
}
/* =========================================================
   Dashboard (moved from inline <style> in dashboard.php)
   ========================================================= */

/* Dashboard header */
header{
  background:#004080;
  color:#fff;
  padding:20px;
  display:flex;
  justify-content:space-between;
  align-items:center;
}

header h1{
  margin:0;
}

.user-profile{
  background:#003366;
  color:#fff;
  padding:10px 15px;
  border-radius:5px;
  text-align:right;
}

.user-profile b{
  display:block;
}

.user-profile .logout-form{
  margin:0;
}

/* Logout button inside user-profile (avoid conflict with global .btn) */
.user-profile .logout-btn{
  display:inline-block;
  margin-top:5px;
  padding:5px 10px;
  background:#cc0000;
  color:#fff;
  text-decoration:none;
  border:0;
  border-radius:3px;
  transition:background 0.2s;
  cursor:pointer;
}

.user-profile .logout-btn:hover{
  background:#ff3333;
}

/* Dashboard grid container
   NOTE: dashboard uses <div class="container"> -> we override only there via body class hook below.
   If you don't want to add a body class, keep this as-is but it will affect all pages.
*/
body.dashboard .container{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(300px, 1fr));
  gap:30px;
  padding:40px;
  max-width:1200px;
  margin:0 auto;
  background:transparent;
  box-shadow:none;
  border-radius:0;
}

/* Dashboard cards */
.card{
  background:#fff;
  border-radius:10px;
  box-shadow:0 0 15px rgba(0,0,0,0.1);
  padding:30px;
  text-align:center;
  transition:transform 0.2s;
}

.card:hover{
  transform:translateY(-5px);
}

.card h2{
  color:#004080;
  margin-top:0;
}

/* =========================================================
   Nice scrollbar for left lists (optional but recommended)
   Apply by adding class="nice-scroll" to the scrolling element.
   ========================================================= */
.nice-scroll{
  scrollbar-gutter: stable;
  scrollbar-width: thin;                 /* Firefox */
  scrollbar-color: #c5d6eb transparent;  /* Firefox */
}

.nice-scroll::-webkit-scrollbar{
  width:10px;                            /* Chrome/Edge/Safari */
}

.nice-scroll::-webkit-scrollbar-track{
  background:transparent;
}

.nice-scroll::-webkit-scrollbar-thumb{
  background-color:#c5d6eb;
  border-radius:999px;
  border:3px solid transparent;
  background-clip:content-box;
}

.nice-scroll::-webkit-scrollbar-thumb:hover{
  background-color:#9fb9dd;
}

/* ---------- Compact Forms (Create/Edit pages) ---------- */
.form-compact label{
  margin-top:6px;
}

.form-compact input,
.form-compact select{
  margin:3px 0 8px;
  padding:6px;
}

.form-compact .actions{
  margin-top:12px;
}

.form-compact .btn{
  margin:2px 4px 2px 0;
}

.form-inline{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}

.form-inline input[type="text"],
.form-inline input[type="date"]{
  padding:6px;
}

.form-inline .checkbox{
  display:flex;
  align-items:center;
  gap:6px;
}

/* Modal */
.modal-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal{
  background: #fff;
  color: #111;
  width: 90%;
  max-width: 520px;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}
.modal-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.modal-header h3{
  margin: 0;
}
.modal-body p{
  margin: 0;
}
.modal-actions{
  margin-top: 14px;
  display:flex;
  justify-content:flex-end;
  gap:6px;
}
.checkbox{
  display:inline-flex;
  align-items:center;
  gap:6px;
}
.modal .form-row{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  align-items:flex-end;
  margin-bottom: 10px;
}
.modal .form-row .field{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width: 160px;
}
.cash-purpose-row{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  align-items:center;
}
.cash-purpose-row .label{
  font-weight:600;
}
.modal-error{
  color: #b00020;
}
.modal-success{
  color: #0a6b2f;
}
.btn-ghost{
  background: transparent;
  color: #333;
  border: 1px solid #ccc;
  width:auto;
}
