/* V13: quick follow menu + compact form/dashboard */

/* Remove the three direct red quick filters; they now live inside needs-follow-up. */
#offersQuickFilters [data-v6-quick="license_review"],
#offersQuickFilters [data-v6-quick="ad_needs_number"],
#offersQuickFilters [data-v6-quick="board_review"]{display:none!important}

/* Keep only the actual deficiencies on each offer row. */
#offersBody .offer-attention-chip{display:none!important}
#offersBody .inspection-auto-reasons{margin-top:4px}

/* Needs-follow-up popover */
.attention-filter-host{position:relative;display:inline-flex;align-items:center}
.attention-filter-chevron{font-size:11px;line-height:1;margin-inline-start:1px;transition:transform .15s ease}
.quick-filter[aria-expanded="true"] .attention-filter-chevron{transform:rotate(180deg)}
.attention-filter-popover{position:absolute;z-index:80;top:calc(100% + 8px);inset-inline-start:0;width:230px;background:#fff;border:1px solid #E8B8B8;border-radius:12px;padding:9px;box-shadow:0 14px 34px rgba(82,28,28,.16);color:#5A3333;text-align:right;white-space:normal}
.attention-filter-popover:before{content:"";position:absolute;top:-6px;inset-inline-start:24px;width:10px;height:10px;background:#fff;border-top:1px solid #E8B8B8;border-inline-start:1px solid #E8B8B8;transform:rotate(45deg)}
.attention-popover-title{font-size:12px;font-weight:900;color:#A61B1B;padding:2px 3px 7px;border-bottom:1px solid #F3DEDE;margin-bottom:4px}
.attention-popover-row,.attention-popover-total{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 5px;font-size:11px}
.attention-popover-row+ .attention-popover-row{border-top:1px solid #F7EAEA}
.attention-popover-row b{display:inline-flex;min-width:24px;height:24px;align-items:center;justify-content:center;border-radius:999px;background:#FFF0F0;color:#A61B1B;border:1px solid #F0B9B9;font-size:10px}
.attention-popover-total{margin-top:4px;padding-top:8px;border-top:1px solid #E8DADA;font-weight:900;color:#7D2525}
.attention-popover-total b{font-size:12px}

/* Compact offer entry screen on desktop while preserving mobile layout. */
@media(min-width:1061px){
  #formView .topbar{margin-bottom:10px}
  #formView .topbar h1{font-size:23px}
  #formView .sub{font-size:11px;margin-top:2px}
  #formView .form-panel{padding:12px 14px}
  #formView .form-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:9px 10px}
  #formView .field label{font-size:11px;margin-bottom:4px}
  #formView input,#formView select,#formView textarea{min-height:36px;padding:6px 9px;border-radius:8px;font-size:12px}
  #formView textarea{min-height:76px}
  #formView .form-section-title{font-size:12px;padding:5px 0 3px;margin-top:1px}
  #formView .form-actions{margin-top:11px;padding-top:10px}
  #formView .form-actions .btn{min-height:36px;padding:7px 12px}
  #formView .auto-inspection-box{min-height:52px;padding:7px 9px;border-radius:9px;gap:4px}
  #formView .auto-inspection-box .auto-inspection-head{font-size:11px}
  #formView .auto-inspection-box .auto-inspection-reasons{font-size:10px;gap:4px}
  #formView .private-attachments{padding:10px!important;border-radius:10px!important}
}

/* Compact dashboard cards on desktop. */
@media(min-width:1061px){
  #dashboardView .topbar{margin-bottom:10px}
  #dashboardView .topbar h1{font-size:23px}
  #dashboardView .sub{font-size:11px;margin-top:2px}
  #dashboardView .dashboard-summary{gap:7px;margin-bottom:9px}
  #dashboardView .summary-chip{padding:9px 11px;border-radius:11px}
  #dashboardView .summary-chip .k{font-size:10px}
  #dashboardView .summary-chip .v{font-size:19px;margin-top:1px}
  #dashboardView .dash-section{padding:10px 11px;margin-bottom:9px;border-radius:12px}
  #dashboardView .dash-title{font-size:13px;margin-bottom:7px}
  #dashboardView .metric-grid{grid-template-columns:repeat(6,minmax(105px,1fr));gap:7px}
  #dashboardView .metric-card{padding:8px 9px;border-radius:9px;min-height:60px}
  #dashboardView .metric-card .label{font-size:10.5px;line-height:1.35}
  #dashboardView .metric-card .value{font-size:21px;margin-top:2px}
  #dashboardView>.panel{padding:10px 11px;margin-bottom:9px;border-radius:12px}
  #dashboardView .panel-head{margin-bottom:7px}
}

/* Dashboard hover: dark brand emphasis on pointer devices only. */
@media(hover:hover) and (pointer:fine){
  #dashboardView .summary-chip,
  #dashboardView .metric-card{
    transition:background .18s ease,border-color .18s ease,box-shadow .18s ease,transform .18s ease,color .18s ease;
  }
  #dashboardView .summary-chip:hover,
  #dashboardView .metric-card:hover{
    background:linear-gradient(135deg,#15646B,#198D9A)!important;
    border-color:#15646B!important;
    box-shadow:0 10px 24px rgba(21,100,107,.22)!important;
    transform:translateY(-2px);
  }
  #dashboardView .summary-chip:hover .k,
  #dashboardView .metric-card:hover .label{
    color:#DDF4F3!important;
  }
  #dashboardView .summary-chip:hover .v,
  #dashboardView .metric-card:hover .value{
    color:#FFFFFF!important;
  }
}

@media(max-width:760px){
  .attention-filter-popover{position:fixed;top:auto;bottom:86px;right:12px;left:12px;width:auto;max-width:none;border-radius:14px}
  .attention-filter-popover:before{display:none}
}
