/* Hotel Kimininga Accounting Video Polish V29
   Fixes issues seen in the user video: blank-looking account rows, low contrast, oversized modal table, and awkward scrolling/actions. */

/* Safer accounting work window sizing */
.myob-tab-page.active{
  background:#ffffff !important;
  color:#0f172a !important;
  left:24px !important;
  right:24px !important;
  top:18px !important;
  bottom:18px !important;
  max-width:none !important;
  max-height:calc(100vh - 36px) !important;
  overflow:auto !important;
  padding:18px 20px 20px !important;
  border-radius:24px !important;
}
.myob-tab-page.active::before{
  background:rgba(15,23,42,.38) !important;
}
.myob-window-close{
  position:sticky !important;
  top:0 !important;
  float:right !important;
  margin:0 0 8px 12px !important;
  width:42px !important;
  height:42px !important;
  min-width:42px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  background:linear-gradient(135deg,#ef4444,#f97316) !important;
  color:#ffffff !important;
  z-index:100 !important;
}

/* Tighter, clearer accounting sections */
.myob-tab-page.active .myob-section{
  background:#ffffff !important;
  color:#0f172a !important;
  border:1px solid #cbdff5 !important;
  border-radius:18px !important;
  padding:18px !important;
  box-shadow:0 10px 30px rgba(15,23,42,.08) !important;
}
.myob-tab-page.active .myob-section-head{
  margin-bottom:14px !important;
  padding-bottom:10px !important;
  border-bottom:1px solid #dbeafe !important;
}
.myob-tab-page.active h1,
.myob-tab-page.active h2,
.myob-tab-page.active h3,
.myob-tab-page.active h4{
  color:#082f49 !important;
  opacity:1 !important;
  text-shadow:none !important;
}
.myob-tab-page.active p,
.myob-tab-page.active .muted,
.myob-tab-page.active small{
  color:#475569 !important;
  opacity:1 !important;
}

/* Compact form area so Chart of Accounts fits better */
.myob-tab-page.active .myob-form-grid,
.myob-tab-page.active .myob-form-grid.compact,
.myob-tab-page.active .journal-line-grid{
  display:grid !important;
  grid-template-columns:repeat(4,minmax(160px,1fr)) !important;
  gap:10px !important;
  align-items:end !important;
}
.myob-tab-page.active label{
  color:#1e293b !important;
  font-size:12px !important;
  font-weight:900 !important;
  letter-spacing:.04em !important;
  text-transform:uppercase !important;
}
.myob-tab-page.active input,
.myob-tab-page.active select,
.myob-tab-page.active textarea{
  min-height:36px !important;
  height:38px !important;
  padding:8px 12px !important;
  border-radius:10px !important;
  background:#ffffff !important;
  color:#0f172a !important;
  border:1px solid #b7d2ef !important;
  font-weight:700 !important;
}
.myob-tab-page.active textarea{height:auto !important;min-height:58px !important;}
.myob-tab-page.active .form-actions{
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:8px !important;
}
.myob-tab-page.active .form-actions button{
  min-height:38px !important;
  border-radius:12px !important;
}

/* Table readability and remove ghost/oversized rows */
.myob-tab-page.active .table-card,
.myob-tab-page.active .myob-section .table-card,
.myob-tab-page.active table{
  background:#ffffff !important;
}
.myob-tab-page.active .myob-section > table,
.myob-tab-page.active .myob-section table,
.myob-tab-page.active table{
  margin-top:12px !important;
  border-collapse:separate !important;
  border-spacing:0 !important;
  border:1px solid #b9d4f1 !important;
  border-radius:14px !important;
  overflow:hidden !important;
  table-layout:fixed !important;
}
.myob-tab-page.active thead th,
.myob-tab-page.active table thead th{
  background:#0b376b !important;
  color:#ffe45c !important;
  opacity:1 !important;
  font-size:12px !important;
  line-height:1.2 !important;
  padding:10px 12px !important;
  text-shadow:none !important;
  white-space:nowrap !important;
}
.myob-tab-page.active tbody tr,
.myob-tab-page.active table tbody tr{
  height:auto !important;
  min-height:0 !important;
  background:#ffffff !important;
}
.myob-tab-page.active tbody tr:nth-child(even),
.myob-tab-page.active table tbody tr:nth-child(even){
  background:#f1f8ff !important;
}
.myob-tab-page.active tbody td,
.myob-tab-page.active table tbody td{
  background:inherit !important;
  color:#0f172a !important;
  opacity:1 !important;
  visibility:visible !important;
  font-size:13px !important;
  font-weight:800 !important;
  line-height:1.25 !important;
  padding:10px 12px !important;
  min-height:0 !important;
  height:auto !important;
  vertical-align:middle !important;
  border-bottom:1px solid #dbeafe !important;
  text-shadow:none !important;
  overflow-wrap:anywhere !important;
}
.myob-tab-page.active tbody td *,
.myob-tab-page.active table tbody td *{
  color:inherit !important;
  opacity:1 !important;
  visibility:visible !important;
  text-shadow:none !important;
}
.myob-tab-page.active tbody tr:hover td{
  background:#e8f5ff !important;
  color:#071733 !important;
}

/* Keep row actions neat and usable */
.myob-tab-page.active td .actions,
.myob-tab-page.active .actions{
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  flex-wrap:wrap !important;
}
.myob-tab-page.active .mini-btn{
  min-height:34px !important;
  padding:8px 12px !important;
  border-radius:10px !important;
  background:#eff6ff !important;
  color:#075bbb !important;
  border:1px solid #bfdbfe !important;
  font-weight:900 !important;
  box-shadow:0 4px 14px rgba(37,99,235,.08) !important;
}
.myob-tab-page.active .mini-btn.danger,
.myob-tab-page.active button.danger{
  background:#fff1f2 !important;
  color:#be123c !important;
  border:1px solid #fecdd3 !important;
}
.myob-tab-page.active .success-btn{
  background:linear-gradient(135deg,#059669,#22c55e) !important;
  color:#ffffff !important;
  font-weight:950 !important;
}

/* Hide empty ghost rows if old database contains blank accounting items */
.myob-tab-page.active tr:has(td:empty):not(:has(button)){
  display:none !important;
}

/* Smaller screens */
@media(max-width:1000px){
  .myob-tab-page.active{left:8px!important;right:8px!important;top:8px!important;bottom:8px!important;padding:12px!important;}
  .myob-tab-page.active .myob-form-grid,
  .myob-tab-page.active .myob-form-grid.compact,
  .myob-tab-page.active .journal-line-grid{grid-template-columns:1fr 1fr!important;}
  .myob-tab-page.active table{font-size:12px!important;}
}
@media(max-width:640px){
  .myob-tab-page.active .myob-form-grid,
  .myob-tab-page.active .myob-form-grid.compact,
  .myob-tab-page.active .journal-line-grid{grid-template-columns:1fr!important;}
}
