/* Yusr V11.10 — internal UI hardening, media geometry, paid revision states */

/* Balanced desktop canvas: keep the sidebar compensation from V11.9, but reduce
   the feeling of content stretching from edge to edge on wide monitors. */
@media (min-width:1181px){
  body.dashboard-mode .dash-content-inner{max-width:1460px!important;width:calc(100% - 56px)!important}
}
@media (min-width:921px) and (max-width:1180px){
  body.dashboard-mode .dash-content-inner{width:calc(100% - 38px)!important}
}

/* One visual language for internal page headers. */
body.dashboard-mode .section-head{
  display:flex;align-items:center;justify-content:space-between;gap:18px;
  padding:18px 20px;margin:0 0 18px;background:#fff;border:1px solid var(--line);
  border-radius:20px;box-shadow:0 8px 28px rgba(11,31,58,.035)
}
body.dashboard-mode .section-head h2{margin:0;color:var(--navy);font-size:25px;line-height:1.35}
body.dashboard-mode .section-head p{margin:6px 0 0;color:var(--muted);font-size:12.5px;line-height:1.8}
body.dashboard-mode .section-head>.btn,body.dashboard-mode .section-head>div+.btn{flex:0 0 auto}
body.dashboard-mode .dash-page-intro{margin-bottom:18px}
body.dashboard-mode .dash-page-intro h1{font-size:31px}

/* Cards should flow according to available working width instead of fixed breakpoints. */
@media (min-width:921px){
  body.dashboard-mode .entity-grid{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(390px,1fr))!important;gap:16px!important}
}
body.dashboard-mode .entity-card{overflow:hidden;border-radius:22px;border-color:#e3eaf0;box-shadow:0 10px 34px rgba(11,31,58,.045)}
body.dashboard-mode .entity-card:hover{box-shadow:0 17px 42px rgba(11,31,58,.075)}
body.dashboard-mode .entity-card .entity-head,body.dashboard-mode .entity-card .entity-body,body.dashboard-mode .entity-card .entity-footer{min-width:0}
body.dashboard-mode .entity-card .entity-title{word-break:normal;overflow-wrap:anywhere;line-height:1.45}
body.dashboard-mode .entity-card .muted{overflow-wrap:anywhere}
body.dashboard-mode .entity-footer{gap:10px;flex-wrap:wrap}
body.dashboard-mode .entity-footer .actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}

/* Unified media frame. It deliberately uses contain so portrait, square, FHD and
   very wide images remain fully visible instead of being cropped. */
.v1110-card-media,.v119-card-media,.v119-opportunity-media{
  width:100%;aspect-ratio:16/9;height:auto!important;min-height:150px;max-height:240px;
  margin:0 0 15px!important;border-radius:16px;overflow:hidden;display:grid;place-items:center;
  background:linear-gradient(135deg,#edf4f7,#f8fbfc);border:1px solid #e3ebef
}
.v1110-card-media img,.v119-card-media img,.v119-opportunity-media img,
body.dashboard-mode .course-card>img,body.dashboard-mode .entity-card>img{
  width:100%!important;height:100%!important;max-width:100%!important;margin:0!important;
  object-fit:contain!important;object-position:center center!important;background:transparent!important
}
.v119-detail-media,.v116-learning-cover{
  width:100%;aspect-ratio:16/9;height:auto!important;max-height:520px;display:grid;place-items:center;
  border-radius:22px;overflow:hidden;background:linear-gradient(135deg,#edf4f7,#f9fbfc);border:1px solid #e3ebef
}
.v119-detail-media img,.v116-learning-cover img{width:100%;height:100%;object-fit:contain!important;object-position:center}
.v1110-media-empty{aspect-ratio:16/9;display:grid;place-items:center;background:#f5f8fa;color:#9aa8b5;border:1px dashed #d8e2e8;border-radius:16px;font-size:11px;margin-bottom:15px}
.v1110-current-media{margin-top:10px;max-width:460px;border:1px solid #dde7ec;border-radius:15px;padding:8px;background:#f8fbfc}
.v1110-current-media img{display:block;width:100%;aspect-ratio:16/9;object-fit:contain;border-radius:11px;background:#eef4f7}
.v1110-current-media small{display:block;padding:7px 3px 1px;color:var(--muted);font-size:10.5px;line-height:1.65}
.v119-upload-preview{max-width:460px}
.v119-upload-preview img{height:auto!important;aspect-ratio:16/9;object-fit:contain!important;background:#eef4f7}

/* Paid-once revision states. */
.v1110-paid-revision{padding:12px 14px;border-radius:14px;border:1px solid #caeadc;background:#f1fbf6;color:#17664f;font-size:12px;line-height:1.8;margin:10px 0}
.v1110-review-revision{padding:12px 14px;border-radius:14px;border:1px solid #d7e6f1;background:#f3f8fc;color:#285876;font-size:12px;line-height:1.8;margin:10px 0}
.v1110-paid-badge{display:inline-flex;align-items:center;gap:6px;padding:7px 10px;border-radius:999px;background:#edf9f4;color:#157258;border:1px solid #d0ecdf;font-size:10.5px;font-weight:800}

/* Forms and panels: predictable internal rhythm. */
body.dashboard-mode .dash-panel{border-radius:22px}
body.dashboard-mode .v116-learning-form{border-radius:24px;overflow:hidden}
body.dashboard-mode .v116-learning-form .form-page-head{background:linear-gradient(135deg,#fbfdfd,#f3f9fa);border-bottom:1px solid #e5edf1}
body.dashboard-mode .v116-learning-form fieldset.form-section{border-bottom:1px solid #edf1f4}
body.dashboard-mode .v116-learning-form fieldset.form-section:last-of-type{border-bottom:0}
body.dashboard-mode .v116-learning-form legend{font-size:15px;color:var(--navy);font-weight:800}
body.dashboard-mode input,body.dashboard-mode select,body.dashboard-mode textarea{border-color:#dce6eb;background:#fff}
body.dashboard-mode input:focus,body.dashboard-mode select:focus,body.dashboard-mode textarea:focus{border-color:#66bbb8;box-shadow:0 0 0 4px rgba(17,145,140,.08)}

@media(max-width:920px){
  body.dashboard-mode .section-head{align-items:stretch;flex-direction:column;padding:16px}
  body.dashboard-mode .section-head>.btn{width:100%;justify-content:center}
  body.dashboard-mode .entity-grid{grid-template-columns:1fr!important}
  .v1110-card-media,.v119-card-media,.v119-opportunity-media{max-height:none}
}

/* Public learning cards use the same no-crop rule. */
.public-mode .course-card>img,.public-mode .course-card img{
  width:100%;height:auto!important;aspect-ratio:16/9;object-fit:contain!important;object-position:center!important;
  background:linear-gradient(135deg,#edf4f7,#f8fbfc)
}
