/* Yusr V11.9 — desktop dashboard geometry, internal UI consistency, public media */

/* The V11.8 rule centered .dash-content and unintentionally replaced the
   sidebar offset on desktop. Keep the content area explicitly beside the
   fixed sidebar and center only the inner working canvas. */
@media (min-width:1181px){
  body.dashboard-mode .dash-content{
    width:calc(100% - 286px)!important;
    max-width:none!important;
    margin-right:286px!important;
    margin-left:0!important;
    padding-top:76px!important;
    min-width:0!important;
  }
  body.dashboard-mode .dash-topbar{right:286px!important;left:0!important}
  body.dashboard-mode .dash-flashes{right:310px!important;left:24px!important}
  body.dashboard-mode .dash-content-inner{
    width:calc(100% - 48px)!important;
    max-width:1510px!important;
    margin:0 auto!important;
    padding:30px 0 58px!important;
    min-width:0!important;
  }
}
@media (min-width:921px) and (max-width:1180px){
  body.dashboard-mode .dash-content{
    width:calc(100% - 252px)!important;
    max-width:none!important;
    margin-right:252px!important;
    margin-left:0!important;
    padding-top:76px!important;
    min-width:0!important;
  }
  body.dashboard-mode .dash-topbar{right:252px!important;left:0!important}
  body.dashboard-mode .dash-flashes{right:276px!important;left:20px!important}
  body.dashboard-mode .dash-content-inner{
    width:calc(100% - 34px)!important;
    max-width:1510px!important;
    margin:0 auto!important;
    padding:26px 0 52px!important;
    min-width:0!important;
  }
}
@media (max-width:920px){
  body.dashboard-mode .dash-content{width:100%!important;max-width:none!important;margin:0!important}
}

body.dashboard-mode{overflow-x:hidden}
body.dashboard-mode .app-dashboard,
body.dashboard-mode .dash-layout,
body.dashboard-mode .dash-content,
body.dashboard-mode .dash-content-inner,
body.dashboard-mode .dash-content-inner>*{box-sizing:border-box;min-width:0}
body.dashboard-mode .dash-content-inner>*{max-width:100%}
body.dashboard-mode .dash-page-intro,
body.dashboard-mode .section-head,
body.dashboard-mode .dash-panel,
body.dashboard-mode .dash-hero,
body.dashboard-mode .card,
body.dashboard-mode .entity-card,
body.dashboard-mode .modern-form,
body.dashboard-mode .form-section{min-width:0;max-width:100%;box-sizing:border-box}
body.dashboard-mode .dash-page-intro h1,
body.dashboard-mode .section-head h1,
body.dashboard-mode .section-head h2,
body.dashboard-mode .dash-hero h2,
body.dashboard-mode .entity-title{overflow-wrap:anywhere}
body.dashboard-mode .dash-page-intro h1{letter-spacing:0;line-height:1.45}
body.dashboard-mode .dash-page-intro p{line-height:1.8}
body.dashboard-mode .dash-hero{width:100%;padding:28px 30px}
body.dashboard-mode .dash-hero p{max-width:900px;line-height:1.9}
body.dashboard-mode .dash-panel-head{align-items:flex-start}
body.dashboard-mode .section-head{align-items:flex-start}
body.dashboard-mode .entity-grid{align-items:stretch}
body.dashboard-mode .entity-card{height:100%}
body.dashboard-mode .entity-card .actions{max-width:100%}
body.dashboard-mode .entity-card form{min-width:0}
body.dashboard-mode .modern-form,
body.dashboard-mode .v116-learning-form{width:min(100%,1180px);margin-inline:auto}
body.dashboard-mode .modern-form .form-page-head,
body.dashboard-mode .v116-learning-form .form-page-head{padding:24px 26px 20px;margin:0}
body.dashboard-mode .modern-form>.form-section,
body.dashboard-mode .v116-learning-form>.form-section{padding:22px 26px}
body.dashboard-mode .form-sticky-actions{padding-inline:26px}
body.dashboard-mode input,
body.dashboard-mode select,
body.dashboard-mode textarea{max-width:100%;box-sizing:border-box}
body.dashboard-mode textarea{resize:vertical}

/* Stable desktop card density. */
@media (min-width:1380px){
  body.dashboard-mode .entity-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (min-width:921px) and (max-width:1379px){
  body.dashboard-mode .entity-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Uploaded media: a single visual treatment across courses, programs and jobs. */
.v119-card-media{height:170px;margin:-19px -19px 16px;overflow:hidden;background:#eef4f7}
.v119-card-media img,.v119-detail-media img,.v119-opportunity-media img{display:block;width:100%;height:100%;object-fit:cover}
.v119-detail-media{height:330px;border-radius:24px;overflow:hidden;box-shadow:var(--shadow-sm);margin-bottom:16px;background:#eef4f7}
.v119-opportunity-media{height:158px;margin:-18px -18px 16px;overflow:hidden;background:#eef4f7;position:relative}
.v7-opportunity-card:has(.v119-opportunity-media){overflow:hidden}
.v7-opportunity-card:has(.v119-opportunity-media) .v119-opportunity-media{margin:-18px -18px 16px}

/* Existing course/program cards get deterministic media geometry as well. */
body.dashboard-mode .course-card>img,
body.dashboard-mode .entity-card>img{display:block;width:calc(100% + 38px);max-width:none;height:170px;object-fit:cover;margin:-19px -19px 16px;background:#eef4f7}
body.dashboard-mode .course-card .card-inner{padding-top:4px}

/* Image picker preview — visible before submit, so users know the file was read. */
.v119-upload-preview{margin-top:10px;border:1px solid #dfe7ec;border-radius:14px;overflow:hidden;background:#f6f9fb;max-width:420px}
.v119-upload-preview img{display:block;width:100%;height:180px;object-fit:cover}
.v119-upload-preview small{display:block;padding:8px 10px;color:var(--muted);font-size:10.5px}

/* Consistent Arabic rhythm on internal pages. */
body.dashboard-mode .badge,body.dashboard-mode .skill,body.dashboard-mode .btn{line-height:1.45}
body.dashboard-mode label{line-height:1.6}
body.dashboard-mode .entity-subtitle,body.dashboard-mode .field-hint{line-height:1.7}

@media(max-width:820px){
  body.dashboard-mode .modern-form,
  body.dashboard-mode .v116-learning-form{width:100%}
  body.dashboard-mode .modern-form .form-page-head,
  body.dashboard-mode .v116-learning-form .form-page-head,
  body.dashboard-mode .modern-form>.form-section,
  body.dashboard-mode .v116-learning-form>.form-section{padding:18px}
  body.dashboard-mode .form-sticky-actions{padding-inline:18px}
  .v119-detail-media{height:230px;border-radius:18px}
  .v119-card-media{height:150px}
  .v119-opportunity-media{height:145px}
}
