/* V654 DESKTOP ONLY: inner pages match approved V653 home compact/readable style. Mobile untouched. */
@media (min-width: 769px){
  :root{
    --zv-d-font: 14px;
    --zv-d-title: 20px;
    --zv-d-subtitle: 16px;
    --zv-d-text: #0f172a;
    --zv-d-muted: #475569;
    --zv-d-border: #d9e3f0;
    --zv-d-soft: #f8fbff;
    --zv-d-shadow: 0 10px 24px rgba(15,23,42,.07);
  }
  html,body{font-size:var(--zv-d-font)!important;color:var(--zv-d-text)!important;background:#f4f8fc!important;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;}
  body,button,input,select,textarea,table{font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif!important;}

  /* Page containers */
  .wrap,.container,.main,.page,.content,.page-wrap,.main-wrap,.zv-page-wrap{
    max-width: none!important;
  }
  .wrap,.container,.content,.page-wrap,.zv-page-wrap{
    padding: 14px 18px!important;
  }

  /* Cards / panels like desktop home */
  .card,.box,.panel,.section,.form-card,.list-card,.settings-card,.report-card,.table-card,
  .invoice-card,.purchase-card,.quotation-card,.return-card,.stock-card,.party-card,
  .expense-card,.salary-card,.ledger-card,.white-card{
    border:1px solid var(--zv-d-border)!important;
    border-radius:16px!important;
    background:linear-gradient(180deg,#fff,#fbfdff)!important;
    box-shadow:var(--zv-d-shadow)!important;
  }
  .card,.box,.panel,.section,.form-card,.list-card,.settings-card,.report-card,.table-card{
    padding:16px!important;
  }

  /* Headings simple, readable, not over-bold */
  h1{font-size:22px!important;line-height:1.22!important;font-weight:800!important;letter-spacing:-.02em!important;color:#0f172a!important;margin:0 0 12px!important;}
  h2,.page-title{font-size:20px!important;line-height:1.25!important;font-weight:800!important;color:#0f172a!important;margin:0 0 12px!important;}
  h3,.section-title,.card-title{font-size:17px!important;line-height:1.25!important;font-weight:750!important;color:#111827!important;margin:0 0 10px!important;}
  h4,h5{font-size:15px!important;font-weight:700!important;color:#111827!important;}
  p,.hint,.muted,small,.sub,.subtitle,.desc{color:var(--zv-d-muted)!important;line-height:1.35!important;}

  /* Inputs / controls */
  input,select,textarea,.input,.form-control{
    font-size:14px!important;
    min-height:38px!important;
    padding:8px 10px!important;
    border-radius:10px!important;
    border:1px solid #cfdbea!important;
    background:#fff!important;
    color:#0f172a!important;
    box-shadow:none!important;
  }
  textarea{min-height:72px!important;}
  label{font-size:13px!important;font-weight:650!important;color:#334155!important;margin-bottom:5px!important;}

  /* Buttons match home compact style */
  button,.btn,a.btn,.button,.action-btn,input[type="submit"],input[type="button"]{
    font-size:14px!important;
    font-weight:700!important;
    line-height:1.2!important;
    padding:9px 14px!important;
    min-height:38px!important;
    border-radius:11px!important;
    white-space:normal!important;
  }
  .btn-sm,.small-btn{font-size:13px!important;padding:7px 10px!important;min-height:32px!important;}

  /* Back/Home equal compact row */
  .top-actions,.back-home-row,.nav-row,.zv-back-home-row{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:10px!important;
    align-items:center!important;
  }
  .top-actions a,.top-actions button,.back-home-row a,.back-home-row button,.nav-row a,.nav-row button,.zv-back-home-row a,.zv-back-home-row button{
    width:100%!important;text-align:center!important;
  }

  /* Tables/lists compact readable */
  table{font-size:13px!important;border-collapse:separate!important;border-spacing:0!important;}
  th{font-size:12.5px!important;font-weight:800!important;color:#334155!important;background:#f1f5fb!important;padding:9px 8px!important;line-height:1.2!important;}
  td{font-size:13px!important;color:#111827!important;padding:8px!important;line-height:1.25!important;}
  .table-responsive,.table-wrap{border-radius:14px!important;border:1px solid var(--zv-d-border)!important;background:#fff!important;}

  /* Grid pages and module cards */
  .grid,.cards,.modules-grid,.settings-grid,.list-grid{gap:12px!important;}
  .tile,.module,.module-card,.menu-card,.quick-card,.dash-card{
    border-radius:15px!important;
    border:1px solid #dbe6f2!important;
    box-shadow:0 8px 20px rgba(15,23,42,.055)!important;
  }
  .tile,.module,.module-card,.menu-card,.quick-card{padding:14px!important;}
  .tile b,.module b,.module-card b,.menu-card b{font-size:15px!important;font-weight:750!important;}
  .tile small,.module small,.module-card small,.menu-card small{font-size:12.5px!important;color:#476176!important;}

  /* Invoice / purchase / quotation item grids: compact but no mobile change */
  .invoice-table input,.invoice-table select,.items-table input,.items-table select,
  #items input,#items select,#invoiceItems input,#invoiceItems select{
    font-size:13px!important;
    min-height:34px!important;
    padding:6px 8px!important;
    border-radius:8px!important;
  }
  .invoice-table th,.items-table th,#items th,#invoiceItems th{font-size:12px!important;padding:7px 6px!important;}
  .invoice-table td,.items-table td,#items td,#invoiceItems td{font-size:12.8px!important;padding:6px!important;}

  /* Prevent cut text in settings/buttons */
  .settings-card button,.settings-card a,.settings-grid button,.settings-grid a,
  .card a,.card button{overflow:visible!important;text-overflow:clip!important;}
  .settings-grid,.settings-card .grid{grid-auto-rows:auto!important;}

  /* Desktop readability colors: lighten strong gradients only inside content cards */
  .panel-header,.section-header,.card-header,.group-head{
    border-radius:0!important;
    font-size:15px!important;
    font-weight:750!important;
  }

  /* Performance: avoid transition flicker on desktop inner pages */
  *{transition-property:background-color,border-color,color,box-shadow!important;transition-duration:.12s!important;}
  input,select,textarea,button,a{transition-duration:.08s!important;}
}

/* V655 DESKTOP ONLY: make all desktop text normal like approved dashboard button text; mobile untouched. */
@media (min-width: 769px){
  :root{
    --zv-d-font:13px!important;
    --zv-d-title:17px!important;
    --zv-d-subtitle:14px!important;
    --zv-d-weight:500!important;
    --zv-d-weight-strong:650!important;
  }
  body, body *{
    letter-spacing:0!important;
    text-shadow:none!important;
  }
  body,button,input,select,textarea,table,th,td,a,span,div,p,label,small{
    font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif!important;
  }
  body :where(p,span,div,a,label,small,td,th,input,select,textarea,button,.btn,.action-btn,.links a,.qa div,.qa small,.card,.box,.panel,.section,.form-card,.menu-card,.module-card,.tile,.stat,.stat b,.stat span){
    font-weight:var(--zv-d-weight)!important;
    color:#0f172a!important;
  }
  body :where(b,strong,h1,h2,h3,h4,h5,h6,.page-title,.section-title,.card-title,.group summary,.qa>div,.tile b,.module b,.menu-card b,.module-card b){
    font-weight:var(--zv-d-weight-strong)!important;
  }
  body :where(h1){font-size:18px!important;font-weight:650!important;line-height:1.22!important;}
  body :where(h2,.page-title){font-size:17px!important;font-weight:650!important;line-height:1.23!important;}
  body :where(h3,.section-title,.card-title){font-size:15px!important;font-weight:620!important;line-height:1.25!important;}
  body :where(h4,h5,h6){font-size:14px!important;font-weight:600!important;}
  body :where(.links a,.group .links a,.settings-grid a,.settings-grid button,.card a,.card button){
    font-size:13px!important;
    font-weight:500!important;
    line-height:1.18!important;
    color:#0f172a!important;
  }
  body :where(button,.btn,a.btn,.button,.action-btn,input[type="submit"],input[type="button"]){
    font-size:13px!important;
    font-weight:550!important;
    min-height:36px!important;
    padding:8px 12px!important;
  }
  body :where(input,select,textarea,.input,.form-control){
    font-size:13px!important;
    font-weight:500!important;
    min-height:36px!important;
    padding:7px 10px!important;
  }
  body :where(label){font-size:12px!important;font-weight:550!important;color:#334155!important;}
  body :where(table,th,td){font-size:12.5px!important;font-weight:500!important;}
  body :where(th){font-weight:600!important;background:#f7fbff!important;color:#1f2937!important;}

  /* Desktop dashboard quick cards: same text alignment, consistent left content, no bold-heavy look */
  .quick .qa{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:13px!important;
    text-align:left!important;
    overflow:hidden!important;
  }
  .quick .qa .ico{flex:0 0 34px!important;margin:0!important;}
  .quick .qa>div,
  .quick .qa .cash-title{
    flex:1 1 auto!important;
    min-width:0!important;
    text-align:left!important;
    font-size:13px!important;
    font-weight:600!important;
    line-height:1.16!important;
    color:#0f172a!important;
    display:block!important;
  }
  .quick .qa small{
    display:block!important;
    text-align:left!important;
    font-size:11px!important;
    font-weight:450!important;
    line-height:1.15!important;
    margin-top:3px!important;
    color:#2563eb!important;
    white-space:normal!important;
  }
  .quick .qa .cash-mini-totals,
  .quick .qa .expense-mini-totals{display:none!important;}

  /* Keep hero dark text white only where needed */
  .hero-main h1,.hero-main h1 *, .hero-main .hero-features, .hero-main .hero-features *{color:#fff!important;}
  .group summary,.group summary *{color:#fff!important;}
}
