:root{--bg:#f5f7fb;--card:#fff;--ink:#111827;--muted:#667085;--line:#e4e7ec;--purple:#6d3df5;--purple2:#8b5cf6;--red:#c62828;--green:#15803d;--shadow:0 10px 30px rgba(17,24,39,.08)}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:14px}.wrap{max-width:1460px;margin:auto;padding:22px}.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:18px}.eyebrow{display:block;color:var(--purple);font-weight:900;font-size:11px;letter-spacing:.12em}.page-head h1{margin:4px 0 4px;font-size:28px}.page-head p{margin:0;color:var(--muted)}.head-actions,.form-actions,.actions{display:flex;gap:8px;flex-wrap:wrap}.btn,.icon-btn{border:1px solid var(--line);background:#fff;color:var(--ink);border-radius:10px;padding:9px 13px;font-weight:800;cursor:pointer}.btn:hover{background:#f9fafb}.btn.primary{background:linear-gradient(135deg,var(--purple),var(--purple2));border-color:transparent;color:white}.btn.danger{color:var(--red);border-color:#fecaca;background:#fff7f7}.icon-btn{width:38px;height:38px;padding:0;border-radius:50%;font-size:20px}.kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}.kpis article{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:16px;box-shadow:var(--shadow)}.kpis small{display:block;color:var(--muted);font-weight:700}.kpis strong{display:block;font-size:26px;margin-top:4px}.panel,.toolbar,.status-box{background:var(--card);border:1px solid var(--line);border-radius:16px}.panel{padding:18px;margin-bottom:16px}.panel-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:15px}.panel-head h2{margin:0 0 3px}.panel-head p{margin:0;color:var(--muted)}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.field{display:flex;flex-direction:column;gap:6px}.field.full,.check.full,.progress.full,.form-actions.full,.selected-photos.full{grid-column:1/-1}.field span{font-size:12px;color:var(--muted);font-weight:800}.field input,.field textarea,.field select,.toolbar input,.toolbar select{width:100%;border:1px solid var(--line);background:#fff;border-radius:10px;padding:10px 11px;color:var(--ink);font:inherit}.field textarea{resize:vertical}.field small{color:var(--muted)}.check{display:flex;align-items:center;gap:8px;font-weight:800;padding-top:22px}.check input{width:18px;height:18px}.selected-photos{display:grid;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:8px}.selected-photos .sel{border:1px solid var(--line);border-radius:12px;padding:8px;background:#fafafa;min-width:0}.selected-photos img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:8px;background:#eee}.selected-photos small{display:block;margin-top:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.progress>div:first-child{display:flex;justify-content:space-between}.track{height:8px;background:#eceff3;border-radius:999px;overflow:hidden;margin-top:6px}.track i{display:block;height:100%;width:0;background:var(--purple);transition:width .15s}.toolbar{display:grid;grid-template-columns:minmax(260px,1fr) 180px 160px auto;gap:10px;padding:12px;margin-bottom:12px;align-items:center}.toolbar span{color:var(--muted);font-weight:800;white-space:nowrap}.status-box{padding:12px 14px;color:var(--muted);margin-bottom:12px}.status-box.ok{color:var(--green);border-color:#bbf7d0;background:#f0fdf4}.status-box.bad{color:var(--red);border-color:#fecaca;background:#fff7f7}.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(275px,1fr));gap:14px}.post-card{background:var(--card);border:1px solid var(--line);border-radius:16px;overflow:hidden;box-shadow:var(--shadow)}.thumb{position:relative;background:#eef0f4;aspect-ratio:4/3;overflow:hidden}.thumb img{width:100%;height:100%;object-fit:cover}.pill{position:absolute;top:10px;left:10px;background:#dcfce7;color:#166534;border-radius:999px;padding:5px 8px;font-size:10px;font-weight:900}.pill.inactive{background:#fee2e2;color:#991b1b}.photo-count{position:absolute;bottom:10px;right:10px;background:rgba(0,0,0,.72);color:white;border-radius:999px;padding:5px 8px;font-size:11px;font-weight:800}.card-body{padding:13px}.card-body h3{margin:0 0 5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.meta{display:flex;gap:6px;color:var(--muted);font-size:12px;flex-wrap:wrap}.card-body p{color:#475467;line-height:1.45;height:42px;overflow:hidden;margin:9px 0 12px}.dialog{width:min(760px,calc(100vw - 28px));border:0;border-radius:18px;padding:0;box-shadow:0 30px 80px rgba(0,0,0,.28)}.dialog::backdrop{background:rgba(15,23,42,.55)}.dialog-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;padding:14px 16px;border-bottom:1px solid var(--line)}.dialog-head strong{display:block;font-size:17px}.dialog-head small{color:var(--muted)}.dialog-body{padding:16px}.preview-main{background:#111;display:grid;place-items:center;min-height:320px}.preview-main img{max-width:100%;max-height:65vh;object-fit:contain}.preview-strip{display:flex;gap:7px;overflow:auto;padding:10px}.preview-strip button{border:2px solid transparent;border-radius:10px;padding:0;background:#eee;flex:0 0 72px;overflow:hidden;cursor:pointer}.preview-strip button.active{border-color:var(--purple)}.preview-strip img{width:72px;height:72px;object-fit:cover}.caption-box{white-space:pre-wrap;padding:12px 16px;border-top:1px solid var(--line);color:#475467}.toast{position:fixed;right:18px;bottom:18px;background:#111827;color:#fff;border-radius:12px;padding:11px 14px;box-shadow:var(--shadow);z-index:100}.toast.bad{background:#991b1b}@media(max-width:760px){.wrap{padding:12px}.page-head{flex-direction:column}.kpis{grid-template-columns:repeat(2,1fr)}.form-grid{grid-template-columns:1fr}.field.full,.check.full,.progress.full,.form-actions.full,.selected-photos.full{grid-column:1}.toolbar{grid-template-columns:1fr}.grid{grid-template-columns:1fr}.check{padding-top:4px}}

/* SHIVSHAHI ADMIN MOBILE UI V5 - Photo Library presentation only */
@media(max-width:640px){
  html,body{min-height:100%;background:#f6f7fb;overscroll-behavior-y:contain}
  body{font-size:12px;-webkit-tap-highlight-color:transparent}
  .wrap{width:100%;max-width:520px;margin:0 auto;padding:8px 8px 20px}
  .page-head{display:grid;gap:9px;margin-bottom:9px;padding:11px;background:linear-gradient(135deg,#fff,#faf8ff);border:1px solid var(--line);border-radius:14px;box-shadow:0 4px 14px rgba(17,24,39,.04)}
  .eyebrow{font-size:9px}.page-head h1{font-size:18px;line-height:1.15;margin:3px 0}.page-head p{font-size:10.5px;line-height:1.4}
  .head-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;width:100%}.head-actions .btn{width:100%}
  .btn{min-height:41px;padding:0 10px;border-radius:11px;font-size:11.5px;touch-action:manipulation}.icon-btn{width:36px;height:36px}
  .kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-bottom:9px}.kpis article{padding:10px;border-radius:12px;box-shadow:0 4px 12px rgba(17,24,39,.035)}.kpis small{font-size:9.5px}.kpis strong{font-size:19px;margin-top:2px}
  .panel{padding:10px;border-radius:13px;margin-bottom:9px}.panel-head{gap:7px;margin-bottom:9px}.panel-head h2{font-size:14px}.panel-head p{font-size:10px;line-height:1.4}
  .form-grid{grid-template-columns:1fr;gap:9px}.field.full,.check.full,.progress.full,.form-actions.full,.selected-photos.full{grid-column:1}.field{gap:5px}.field span{font-size:10.5px}.field input,.field textarea,.field select,.toolbar input,.toolbar select{min-height:41px;font-size:16px!important;padding:9px 10px;border-radius:10px}.field textarea{min-height:90px}.field small{font-size:9.5px;line-height:1.35}.check{padding-top:2px;font-size:10.5px;line-height:1.35}
  .selected-photos{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.selected-photos .sel{padding:5px;border-radius:10px}.selected-photos img{border-radius:7px}.selected-photos small{font-size:8.5px}
  .form-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;width:100%}.form-actions .btn{width:100%}
  .toolbar{grid-template-columns:1fr 1fr;gap:7px;padding:9px;margin-bottom:8px;border-radius:12px}.toolbar input{grid-column:1/-1}.toolbar span{grid-column:1/-1;font-size:9.5px}.status-box{padding:9px 10px;border-radius:10px;font-size:10.5px;margin-bottom:8px}
  .grid{grid-template-columns:1fr;gap:8px}.post-card{border-radius:13px;box-shadow:0 4px 14px rgba(17,24,39,.04)}.thumb{aspect-ratio:16/10}.pill,.photo-count{font-size:9px;padding:4px 7px}.card-body{padding:10px}.card-body h3{font-size:13px}.meta{font-size:10px}.card-body p{font-size:10.5px;line-height:1.4;height:auto;max-height:44px;margin:7px 0 9px}.actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.actions .btn{width:100%;min-height:36px;font-size:10px;padding:0 7px}
  .v2-report-panel{margin-top:10px!important}.v2-report-kpis{margin-bottom:8px}.v2-report-grid{grid-template-columns:1fr!important;gap:9px!important}.v2-report-grid h3{font-size:12px;margin:7px 0}.v2-table-wrap{max-height:320px!important;-webkit-overflow-scrolling:touch}.v2-table{min-width:560px;font-size:10px!important}.v2-table th,.v2-table td{padding:7px!important}
  .dialog{position:fixed;left:6px;right:6px;top:auto;bottom:calc(6px + env(safe-area-inset-bottom));width:auto;max-width:508px;max-height:91dvh;margin:auto;border-radius:18px 18px 11px 11px}.dialog-head{padding:11px 12px}.dialog-head strong{font-size:14px}.dialog-head small{font-size:9.5px}.dialog-body{padding:10px}.preview-main{min-height:220px}.preview-main img{max-height:54dvh}.preview-strip{padding:8px}.preview-strip button,.preview-strip img{width:58px;height:58px}.preview-strip button{flex-basis:58px}.caption-box{padding:10px;font-size:10.5px}
  .toast{left:8px;right:8px;bottom:calc(8px + env(safe-area-inset-bottom));font-size:10.5px;border-radius:11px}
}
@media(max-width:365px){.selected-photos{grid-template-columns:repeat(2,minmax(0,1fr))}.head-actions{grid-template-columns:1fr 1fr}}

/* V7 mobile/laptop app UI - scroll and zero hidden actions. */
html,body{height:auto!important;min-height:100%!important;overflow-x:hidden!important;overflow-y:auto!important;overscroll-behavior-y:auto!important;-webkit-overflow-scrolling:touch;scroll-behavior:auto!important}
body{touch-action:pan-y pinch-zoom!important}
.wrap{width:100%!important;max-width:600px!important;height:auto!important;min-height:100%!important;overflow:visible!important;margin:0 auto!important;padding:8px 8px 28px!important}
.page-head,.panel,.toolbar,.post-card,.status-box{max-width:100%!important;overflow:visible!important}
.head-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%!important;gap:7px!important}
.head-actions .btn{width:100%!important;min-width:0!important}
.btn{min-height:41px!important;white-space:normal!important;line-height:1.2!important}
.form-grid{grid-template-columns:1fr!important;gap:9px!important}
.field.full,.check.full,.progress.full,.form-actions.full,.selected-photos.full{grid-column:1!important}
.field input,.field select,.field textarea,.toolbar input,.toolbar select{width:100%!important;max-width:100%!important;min-width:0!important;font-size:16px!important}
.form-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;width:100%!important}
.form-actions .btn{width:100%!important;min-width:0!important}
.toolbar{grid-template-columns:1fr 1fr!important;gap:7px!important}
.toolbar input:first-child{grid-column:1/-1!important}
.toolbar span{grid-column:1/-1!important;white-space:normal!important}
.grid{grid-template-columns:1fr!important;gap:8px!important}
.actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;width:100%!important}
.actions .btn,.actions button{width:100%!important;min-width:0!important;min-height:38px!important;font-size:10.5px!important;white-space:normal!important}
.card-body p{height:auto!important;max-height:none!important;overflow:visible!important}
.v2-table-wrap{max-width:100%!important;overflow-x:auto!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch!important}
.dialog[open]{display:flex!important;flex-direction:column!important;left:6px!important;right:6px!important;top:6px!important;bottom:calc(6px + env(safe-area-inset-bottom))!important;width:auto!important;max-width:588px!important;max-height:calc(100dvh - 12px - env(safe-area-inset-bottom))!important;margin:auto!important;overflow:hidden!important}
.dialog-head{flex:0 0 auto!important}
.dialog-body{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch!important}
.caption-box{max-height:none!important;overflow:visible!important}
@media(max-width:370px){.head-actions,.form-actions,.actions,.toolbar{grid-template-columns:1fr!important}.toolbar>*{grid-column:1!important}.selected-photos{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* =====================================================================
   SHIVSHAHI ADMIN V18 - PHOTO MASTER LIBRARY COMPACT MOBILE/LAPTOP UI
   CSS only: no upload/edit/delete/report/API logic changed.
   ===================================================================== */
html,body{
  height:auto!important;
  min-height:100%!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  scroll-behavior:auto!important;
  -webkit-overflow-scrolling:touch!important;
}
body{
  touch-action:pan-y pinch-zoom!important;
  background:#f6f7fb!important;
  font-size:12px!important;
  -webkit-tap-highlight-color:transparent!important;
}
.wrap{
  width:100%!important;
  max-width:600px!important;
  margin:0 auto!important;
  padding:8px 8px 24px!important;
  overflow:visible!important;
}

/* Header + first actions immediately visible. */
.page-head{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:8px!important;
  margin:0 0 8px!important;
  padding:11px!important;
  border:1px solid var(--line)!important;
  border-radius:13px!important;
  background:linear-gradient(135deg,#fff,#faf8ff)!important;
  box-shadow:0 3px 12px rgba(17,24,39,.035)!important;
}
.page-head>div:first-child{min-width:0!important}
.eyebrow{font-size:8.5px!important;line-height:1.2!important}
.page-head h1{font-size:18px!important;line-height:1.15!important;margin:2px 0 3px!important}
.page-head p{font-size:10px!important;line-height:1.35!important;margin:0!important;overflow-wrap:anywhere!important}
.head-actions{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:7px!important;
  width:100%!important;
  margin:0!important;
}
.head-actions .btn{width:100%!important;min-width:0!important}

.btn{
  min-height:39px!important;
  padding:0 9px!important;
  border-radius:10px!important;
  font-size:10.5px!important;
  white-space:normal!important;
  line-height:1.2!important;
  touch-action:manipulation!important;
}
.icon-btn{width:36px!important;height:36px!important;min-width:36px!important;border-radius:10px!important}

/* Summary: useful first-screen information without vertical waste. */
.kpis{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:7px!important;
  margin:0 0 8px!important;
}
.kpis article{
  min-width:0!important;
  padding:9px 10px!important;
  border-radius:11px!important;
  box-shadow:0 3px 10px rgba(17,24,39,.03)!important;
}
.kpis small{font-size:9px!important;line-height:1.25!important}
.kpis strong{font-size:18px!important;line-height:1.1!important;margin-top:2px!important;overflow-wrap:anywhere!important}

/* Upload/Edit remains familiar, but every field stays reachable. */
.panel{
  padding:10px!important;
  border-radius:12px!important;
  margin:0 0 8px!important;
  max-width:100%!important;
  overflow:visible!important;
  box-shadow:0 3px 12px rgba(17,24,39,.035)!important;
}
.panel-head{gap:7px!important;margin-bottom:8px!important;align-items:flex-start!important}
.panel-head>div:first-child{min-width:0!important}
.panel-head h2{font-size:14px!important;line-height:1.2!important;margin:0 0 2px!important}
.panel-head p{font-size:9.5px!important;line-height:1.35!important;margin:0!important;overflow-wrap:anywhere!important}
.form-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
.field,.check{min-width:0!important}
.field.full,.check.full,.progress.full,.form-actions.full,.selected-photos.full{grid-column:1/-1!important}
.field{gap:4px!important}
.field span{font-size:10px!important;line-height:1.25!important}
.field small{font-size:9px!important;line-height:1.3!important;overflow-wrap:anywhere!important}
.field input,.field select,.field textarea,.toolbar input,.toolbar select{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  min-height:40px!important;
  padding:8px 9px!important;
  border-radius:9px!important;
  font-size:16px!important;
}
.field textarea{min-height:82px!important;resize:vertical!important}
.check{padding-top:2px!important;font-size:10px!important;line-height:1.35!important;align-items:flex-start!important}
.check input{flex:0 0 18px!important;width:18px!important;height:18px!important}
.form-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:7px!important;width:100%!important}
.form-actions .btn{width:100%!important;min-width:0!important}
.progress{padding:8px!important;border-radius:9px!important}

/* Selected photos: compact, touch-safe grid. */
.selected-photos{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:6px!important;
  width:100%!important;
}
.selected-photos>*{min-width:0!important}
.selected-photos img{max-width:100%!important;height:auto!important;border-radius:8px!important}
.selected-photos small{font-size:8.5px!important;overflow-wrap:anywhere!important}

/* Search/filter section: no hidden field, no clipping. */
.toolbar{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:7px!important;
  padding:9px!important;
  margin:0 0 8px!important;
  border-radius:11px!important;
  align-items:stretch!important;
  max-width:100%!important;
  overflow:visible!important;
}
.toolbar input[type="search"],.toolbar input:first-child{grid-column:1/-1!important}
.toolbar span{grid-column:1/-1!important;font-size:9.5px!important;line-height:1.3!important;white-space:normal!important}
.status-box{padding:8px 9px!important;border-radius:9px!important;font-size:9.5px!important;line-height:1.35!important;margin-bottom:8px!important}

/* Posts: two compact cards on laptop/app shell, one on phone. */
.grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:7px!important;
}
.post-card{
  min-width:0!important;
  max-width:100%!important;
  border-radius:11px!important;
  overflow:hidden!important;
  box-shadow:0 3px 12px rgba(17,24,39,.035)!important;
}
.thumb{aspect-ratio:4/3!important;min-height:0!important}
.thumb img{width:100%!important;height:100%!important;object-fit:cover!important}
.pill,.photo-count{font-size:8px!important;padding:4px 6px!important}
.pill{top:6px!important;left:6px!important}.photo-count{right:6px!important;bottom:6px!important}
.card-body{padding:8px!important;min-width:0!important}
.card-body h3{
  font-size:11.5px!important;
  line-height:1.25!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  overflow-wrap:anywhere!important;
  margin:0 0 4px!important;
}
.meta{font-size:8.5px!important;line-height:1.25!important;gap:4px!important}
.card-body p{
  font-size:9.2px!important;
  line-height:1.35!important;
  height:auto!important;
  min-height:0!important;
  max-height:42px!important;
  margin:5px 0 7px!important;
  overflow:hidden!important;
}
.actions{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:5px!important;
  width:100%!important;
}
.actions .btn,.actions button{
  width:100%!important;
  min-width:0!important;
  min-height:35px!important;
  padding:4px 5px!important;
  font-size:9.5px!important;
  line-height:1.15!important;
  white-space:normal!important;
}

/* Marketing report remains intact; only make wide tables deliberate and usable. */
.v2-report-panel{margin-top:8px!important}
.v2-report-kpis{margin-bottom:8px!important}
.v2-report-grid{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
.v2-report-grid>div{min-width:0!important}
.v2-report-grid h3{font-size:11.5px!important;line-height:1.2!important;margin:5px 0 7px!important}
.v2-table-wrap{
  width:100%!important;
  max-width:100%!important;
  max-height:300px!important;
  overflow:auto!important;
  -webkit-overflow-scrolling:touch!important;
  scrollbar-width:thin!important;
}
.v2-table{min-width:560px!important;font-size:9.5px!important}
.v2-table th,.v2-table td{padding:7px!important;vertical-align:top!important}

/* Preview/Edit dialogs: every control stays on-screen and scrollable. */
.dialog[open]{
  display:flex!important;
  flex-direction:column!important;
  position:fixed!important;
  left:6px!important;
  right:6px!important;
  top:6px!important;
  bottom:calc(6px + env(safe-area-inset-bottom))!important;
  width:auto!important;
  max-width:588px!important;
  max-height:calc(100dvh - 12px - env(safe-area-inset-bottom))!important;
  margin:auto!important;
  padding:0!important;
  overflow:hidden!important;
  border-radius:16px!important;
}
.dialog-head{flex:0 0 auto!important;padding:10px 11px!important}
.dialog-head strong{font-size:13px!important}.dialog-head small{font-size:9px!important}
.dialog-body{flex:1 1 auto!important;min-height:0!important;padding:9px!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch!important}
.preview-dialog{overflow:hidden!important}
.preview-main{flex:0 1 auto!important;min-height:190px!important;max-height:54dvh!important}
.preview-main img{width:auto!important;max-width:100%!important;max-height:54dvh!important;object-fit:contain!important}
.preview-strip{flex:0 0 auto!important;padding:7px!important;gap:6px!important;overflow-x:auto!important}
.preview-strip button{flex:0 0 54px!important;width:54px!important;height:54px!important}
.preview-strip img{width:54px!important;height:54px!important}
.caption-box{flex:0 0 auto!important;max-height:120px!important;overflow-y:auto!important;padding:9px!important;font-size:10px!important;line-height:1.4!important}
.toast{left:8px!important;right:8px!important;bottom:calc(8px + env(safe-area-inset-bottom))!important;max-width:none!important;font-size:10px!important;border-radius:10px!important}

@media(max-width:430px){
  .wrap{padding:7px 7px 20px!important}
  .form-grid{grid-template-columns:1fr!important}
  .field.full,.check.full,.progress.full,.form-actions.full,.selected-photos.full{grid-column:1!important}
  .selected-photos{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .grid{grid-template-columns:1fr!important}
  .thumb{aspect-ratio:16/10!important;max-height:230px!important}
  .card-body h3{font-size:12px!important}.card-body p{font-size:9.8px!important;max-height:none!important}
  .actions .btn,.actions button{font-size:10px!important;min-height:37px!important}
}
@media(max-width:360px){
  .head-actions,.form-actions,.toolbar,.actions{grid-template-columns:1fr!important}
  .toolbar>*{grid-column:1!important}
  .selected-photos{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .kpis{grid-template-columns:1fr 1fr!important}
}

/* V20 EXACT USER REQUEST: ALWAYS 4 PHOTOS/POST CARDS IN ONE ROW */
.grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:6px!important;
}
.post-card{min-width:0!important;overflow:hidden!important;border-radius:10px!important}
.post-card .thumb{aspect-ratio:1/1!important;min-height:0!important}
.post-card .card-body{padding:6px!important;min-width:0!important}
.post-card .card-body h3{font-size:10px!important;line-height:1.2!important;white-space:normal!important;overflow-wrap:anywhere!important}
.post-card .meta{font-size:7.5px!important;gap:2px!important}
.post-card .card-body p{font-size:8px!important;line-height:1.25!important;margin:4px 0 5px!important;min-height:0!important;max-height:30px!important;overflow:hidden!important}
.post-card .actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:3px!important}
.post-card .actions .btn{min-width:0!important;width:100%!important;min-height:28px!important;padding:0 2px!important;font-size:7.5px!important;white-space:normal!important;line-height:1.05!important}
@media(max-width:520px){
  .grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:4px!important}
  .post-card .card-body{padding:4px!important}
  .post-card .card-body h3{font-size:8.5px!important}
  .post-card .meta{font-size:6.5px!important}
  .post-card .card-body p{font-size:7px!important;max-height:18px!important}
  .post-card .actions{grid-template-columns:1fr!important;gap:2px!important}
  .post-card .actions .btn{min-height:25px!important;font-size:7px!important}
}


/* V22 staff media mode: Reels/Photo remain fully manageable without Owner password. */
body.staff-media-mode::after{content:'STAFF · MEDIA ACCESS';position:fixed;right:8px;bottom:8px;z-index:9999;padding:5px 8px;border-radius:999px;background:#eef4ff;border:1px solid #b2ccff;color:#1849a9;font:900 8px/1 system-ui;box-shadow:0 3px 12px rgba(15,23,42,.10)}
body.owner-mode::after{content:'OWNER MODE';position:fixed;right:8px;bottom:8px;z-index:9999;padding:5px 8px;border-radius:999px;background:#ecfdf3;border:1px solid #abefc6;color:#067647;font:900 8px/1 system-ui;box-shadow:0 3px 12px rgba(15,23,42,.10)}

/* ============================================================
   SHIVSHAHI PHOTO MASTER LIBRARY v3.1 — safe, iframe-local polish
   Only photo library page markup uses these classes.
   ============================================================ */
[hidden],.btn[hidden],.progress[hidden],.load-more-wrap [hidden]{display:none!important}
button:disabled{cursor:not-allowed!important;opacity:.6}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:2px solid #7440e8;outline-offset:2px}
.photo-upload-v3{border:1px solid #e4dcf9!important;background:linear-gradient(180deg,#fcfaff,#fff 90px)!important;scroll-margin-top:12px}
.photo-upload-v3 .panel-head{align-items:center!important}
.photo-upload-v3 .panel-head h2{font-size:18px!important;margin:3px 0 2px!important}
.photo-upload-v3 .form-grid{gap:12px!important}
.photo-upload-v3 .upload-primary{display:flex;flex-direction:column;gap:13px;min-width:0}
.photo-upload-v3 .field>span{color:#344054!important;font-size:12px!important;font-weight:750!important}
.photo-upload-v3 .field input,.photo-upload-v3 .field textarea,.photo-upload-v3 .field select{font-size:14px!important;min-height:44px!important;border-radius:11px!important}
.photo-upload-v3 .field textarea{resize:vertical}
.required-mark{font-weight:800;color:#bc2632}
.photo-upload-v3 .upload-file-area{display:flex;align-items:center;flex-direction:column;justify-content:center;gap:7px;min-height:145px;background:#faf7ff;border:1.5px dashed #b9a7ed;border-radius:15px;padding:14px;text-align:center;transition:background .12s,border-color .12s}
.photo-upload-v3 .upload-file-area.dragover{background:#ede5ff;border-color:#673de5}
.photo-upload-v3 .upload-file-area strong{color:#26203b;font-size:13px}
.photo-upload-v3 .upload-file-area small{color:#6f6488;font-size:11px}
.photo-upload-v3 .upload-file-icon{display:grid;place-items:center;width:37px;height:37px;border-radius:11px;background:#eee7ff;color:#6e36d8;font-size:23px}
.photo-upload-v3 .upload-file-area .btn{min-height:37px!important}
.visually-hidden{position:absolute!important;height:1px!important;width:1px!important;padding:0!important;margin:-1px!important;border:0!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important}
.selection-header{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:6px;color:#51446f}
.selection-header>strong{font-size:12px}
.selection-header>span{font-size:10.5px;color:#667085}
.photo-upload-v3 .selected-photos{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(130px,1fr))!important;gap:9px!important}
.photo-upload-v3 .selected-photos .sel{background:#fff!important;border:1px solid #e5e0ed!important;border-radius:13px!important;min-width:0!important;padding:6px!important;box-shadow:0 2px 8px rgba(20,12,48,.04)}
.photo-upload-v3 .selected-photos .sel.is-cover{border-color:#8452e8!important;box-shadow:0 0 0 1px rgba(132,82,232,.2)}
.sel-preview{position:relative;overflow:hidden;border-radius:9px;background:#f3f3f5}
.photo-upload-v3 .selected-photos img{display:block;width:100%!important;aspect-ratio:4/5!important;height:auto!important;object-fit:cover!important;object-position:center top;border-radius:9px!important}
.sel-number,.sel-cover-badge{position:absolute;top:5px;background:rgba(20,19,25,.8);color:#fff;border-radius:5px;font-size:9px;font-weight:800;padding:3px 5px}
.sel-number{left:5px}.sel-cover-badge{right:5px;background:#6840df}
.sel-name{margin-top:5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;font-weight:700;color:#171924}
.photo-upload-v3 .selected-photos .sel-info{font-size:9px!important;margin:3px 0 6px!important;color:#667085;display:block;white-space:normal!important;line-height:1.25}
.sel-controls{display:flex;gap:4px;margin-top:4px;min-width:0}
.sel-controls button{flex:1;min-width:0;min-height:27px;border:1px solid #e6e4ef;border-radius:7px;background:#faf9ff;color:#553a8c;font-size:10px;font-weight:750;cursor:pointer;padding:3px}
.sel-controls button.remove{background:#fff5f5;color:#b42318;border-color:#ffddd9}
.sel-controls button[aria-pressed="true"]{background:#efe7ff;border-color:#b99cf8;color:#582fc2}
.selection-warning,.upload-error{padding:11px 12px;border-radius:10px;border:1px solid #fecaca;color:#9f1239;background:#fff1f2;font-size:12px;line-height:1.45}
.photo-upload-v3 .upload-more{border:1px solid #e6e1ee;background:#fff;border-radius:12px;overflow:hidden}
.photo-upload-v3 .upload-more summary{cursor:pointer;padding:13px 14px;font-weight:800;color:#5536a1;display:flex;justify-content:space-between;gap:12px;font-size:13px}
.photo-upload-v3 .upload-more summary small{font-weight:500;color:#667085}
.photo-upload-v3 .upload-more[open] summary{border-bottom:1px solid #eee8f7;background:#faf9ff}
.photo-upload-v3 .more-fields{padding:12px!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}
.photo-upload-v3 .upload-footer{display:grid;gap:10px;margin-top:0}
.photo-upload-v3 .upload-footer .check{padding-top:0!important}
.photo-upload-v3 .form-actions{display:flex!important;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:8px}
.photo-upload-v3 .form-actions .btn{flex:1 1 120px;max-width:260px}
.photo-upload-v3 .progress{border:1px solid #ded6f4;border-radius:10px;padding:10px;background:#faf7ff}
.photo-upload-v3 .progress .track{height:9px}
.toolbar.toolbar-v3{display:grid!important;grid-template-columns:minmax(170px,1fr) minmax(130px,.6fr) minmax(125px,.6fr) minmax(130px,.6fr) auto!important;align-items:center;gap:8px!important}
.toolbar-v3 .search-wrap{position:relative;min-width:0;display:flex;align-items:center}
.toolbar-v3 .search-wrap>span{position:absolute;left:11px;color:#7f6d9e;font-size:18px}
.toolbar-v3 .search-wrap input{padding-left:33px!important;width:100%;min-width:0}
.toolbar-v3 select{min-width:0!important}
.toolbar-v3 input,.toolbar-v3 select{height:41px!important;font-size:12px!important}
.toolbar-v3 #resultCount{color:#6b667b;font-size:10.5px!important}
/* Four real photo post cards per row at any iframe size, including 360px. */
body .grid.photo-grid-v3{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:9px!important;min-width:0}
.grid.photo-grid-v3 .post-card{min-width:0!important;border-radius:12px!important;overflow:hidden!important;box-shadow:0 4px 13px rgba(24,19,42,.055)!important}
.grid.photo-grid-v3 .post-card .thumb{aspect-ratio:4/5!important;max-height:none!important;min-height:0!important;position:relative!important;overflow:hidden}
.grid.photo-grid-v3 .post-card .thumb-open{all:unset;display:block;cursor:pointer;position:absolute;inset:0;width:100%;height:100%}
.grid.photo-grid-v3 .post-card .thumb-open img{height:100%;width:100%;display:block;object-fit:cover;object-position:center top}
.grid.photo-grid-v3 .post-card .empty-cover{display:grid;place-items:center;width:100%;height:100%;color:#a593c2;font-size:26px}
.grid.photo-grid-v3 .post-card .pill{top:5px;left:5px;padding:3px 5px;font-size:8px;letter-spacing:0;line-height:1.2;max-width:calc(100% - 36px)}
.grid.photo-grid-v3 .post-card .photo-count{bottom:5px;right:5px;font-size:9px;padding:4px 5px;line-height:1}
.grid.photo-grid-v3 .post-card .card-menu-trigger{position:absolute;right:5px;top:5px;border:1px solid rgba(255,255,255,.6);background:rgba(22,20,33,.8);color:white;width:23px;height:23px;border-radius:7px;display:grid;place-items:center;font-size:18px;line-height:1;cursor:pointer;padding:0}
.grid.photo-grid-v3 .post-card .card-body{padding:8px!important;min-width:0!important}
.grid.photo-grid-v3 .post-card .card-body h3{font-size:12px!important;line-height:1.25!important;min-height:30px!important;max-height:32px!important;display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;margin:0 0 5px!important}
.grid.photo-grid-v3 .post-card .meta{font-size:9.5px!important;gap:5px!important;line-height:1.3;display:flex!important;justify-content:space-between}
.grid.photo-grid-v3 .post-card .card-body p{display:none!important}
.grid.photo-grid-v3 .post-card .card-preview-link{font-size:10px!important;border:0;background:transparent;padding:8px 0 0!important;cursor:pointer;font-weight:800;color:#653bcc;white-space:nowrap}
.grid.photo-grid-v3 .grid-empty{grid-column:1/-1}
.card-actions-menu{position:fixed;z-index:1200;width:210px;display:grid;gap:2px;padding:6px;background:#fff;border:1px solid #e3dfe9;border-radius:12px;box-shadow:0 15px 35px rgba(28,18,47,.2)}
.card-actions-menu button{font-size:12px;padding:11px;border:0;border-radius:8px;background:#fff;cursor:pointer;text-align:left;color:#28213c}
.card-actions-menu button:hover{background:#f3ecff}
.card-actions-menu button.danger{color:#bd2132}
.card-actions-menu[hidden]{display:none!important}
.load-more-wrap{display:flex;justify-content:center;padding:12px 0 4px}
.load-more-wrap .btn{min-width:190px}
.crop-dialog[open]{display:flex!important;flex-direction:column;max-width:550px!important;max-height:calc(100dvh - 16px)!important;overflow:hidden!important;border-radius:17px!important}
.crop-dialog .crop-body{display:flex;flex-direction:column;min-height:0;gap:9px;padding:12px;overflow:auto;-webkit-overflow-scrolling:touch}
.crop-dialog .crop-controls{width:100%}
.crop-dialog .crop-controls select{width:100%;min-height:40px;border-radius:9px;border:1px solid #e4e1eb;padding:8px;background:#fff;font-size:14px}
.crop-dialog .crop-canvas-wrap{display:grid;place-items:center;min-height:180px;max-height:55dvh;background:#222027;border-radius:12px;overflow:hidden;padding:6px}
.crop-dialog #cropCanvas{display:block;max-width:100%;max-height:calc(55dvh - 12px);width:auto;height:auto;touch-action:none;cursor:grab;border-radius:4px}
.crop-dialog #cropCanvas:active{cursor:grabbing}
.crop-dialog .crop-help{margin:0;text-align:center;font-size:11px;color:#667085}
.crop-dialog .crop-zoom{display:flex;align-items:center;gap:10px;color:#343049;font-size:12px;font-weight:750}
.crop-dialog .crop-zoom input{flex:1;min-width:0;accent-color:#7440e8}
.crop-dialog .crop-zoom output{min-width:42px;text-align:right}
.crop-dialog .crop-actions{display:flex!important;justify-content:space-between;gap:6px}
.crop-dialog .crop-actions button{flex:1;min-width:0}
@media(max-width:960px){
  .toolbar.toolbar-v3{grid-template-columns:1fr 1fr!important}
  .toolbar-v3 .search-wrap{grid-column:1/-1!important}
  .toolbar-v3 #sortFilter{grid-column:1/2!important}
  .toolbar-v3 #resultCount{grid-column:2/3!important;text-align:right}
}
@media(max-width:640px){
  body .grid.photo-grid-v3{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:5px!important}
  .grid.photo-grid-v3 .post-card .card-body{padding:5px!important}
  .grid.photo-grid-v3 .post-card .card-body h3{font-size:9.5px!important;min-height:25px!important;max-height:26px!important}
  .grid.photo-grid-v3 .post-card .meta{font-size:8px!important;display:block!important}
  .grid.photo-grid-v3 .post-card .meta>span:last-child{display:none}
  .grid.photo-grid-v3 .post-card .card-preview-link{display:none}
  .grid.photo-grid-v3 .post-card .pill{font-size:7px;padding:2px 4px;top:4px;left:4px}
  .grid.photo-grid-v3 .post-card .photo-count{font-size:7.5px;padding:3px 4px}
  .grid.photo-grid-v3 .post-card .photo-count-word{display:none}
  .grid.photo-grid-v3 .post-card .card-menu-trigger{width:22px;height:22px;top:3px;right:3px}
  .photo-upload-v3 .upload-primary{gap:9px}
  .photo-upload-v3 .selected-photos{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}
  .photo-upload-v3 .more-fields{grid-template-columns:1fr!important}
  .toolbar.toolbar-v3{grid-template-columns:1fr 1fr!important;gap:6px!important}
  .toolbar.toolbar-v3 input,.toolbar.toolbar-v3 select{min-height:39px!important;font-size:12px!important}
  .toolbar-v3 #resultCount{text-align:right;font-size:10px!important}
  .crop-dialog[open]{left:5px!important;right:5px!important;top:5px!important;bottom:calc(5px + env(safe-area-inset-bottom))!important;width:auto!important;max-height:calc(100dvh - 10px - env(safe-area-inset-bottom))!important}
}
@media(max-width:380px){
  body .grid.photo-grid-v3{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:4px!important}
  .grid.photo-grid-v3 .post-card .card-body h3{font-size:8.5px!important;line-height:1.2!important}
  .photo-upload-v3 .upload-more summary small{display:none}
}
.photo-upload-v3 .sel-quality-warning{display:block!important;margin:2px 0 4px!important;padding:3px 5px;border-radius:5px;font-size:9px!important;white-space:normal!important;background:#fff7ed;color:#ad5a12;font-weight:800}

/* Scoped Photo/Reel Marketing Posting Report UI; no nested report scrolling */
[hidden]{display:none!important}
.mp-tabs{display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:5px;margin:0 0 11px;background:#ecebf3;border:1px solid #e5e1ed;border-radius:13px}
.mp-tab{min-width:0;border:0;background:transparent;border-radius:10px;padding:12px 10px;color:#595469;font:inherit;font-size:12px;font-weight:800;cursor:pointer;overflow-wrap:anywhere}
.mp-tab.is-active{background:#fff;color:#673de6;box-shadow:0 2px 7px rgba(38,20,88,.11)}
.mp-report{display:block;overflow:visible!important;max-height:none!important;height:auto!important;min-width:0;padding:14px!important;box-shadow:0 4px 16px rgba(24,22,45,.04)}
.mp-report .mp-report-head{display:flex;justify-content:space-between;align-items:flex-start;flex-wrap:wrap;gap:8px;margin-bottom:12px}
.mp-report .mp-report-head h2{margin:0 0 4px;font-size:19px;line-height:1.15}
.mp-report .mp-report-head p{margin:0;color:#667085;font-size:11.5px}
.mp-report .mp-report-filters{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-bottom:9px;min-width:0}
.mp-report .mp-report-filters label{display:grid;gap:4px;min-width:0;color:#50536a;font-weight:750;font-size:11px}
.mp-report select,.mp-report input{width:100%;min-width:0;min-height:40px;padding:8px 10px;background:#fff;color:#202333;border:1px solid #dddce8;border-radius:10px;font-family:inherit;font-size:13px}
.mp-report .mp-date-range{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:9px}
.mp-report .mp-date-range[hidden]{display:none!important}
.mp-report .mp-stats{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;margin:11px 0 8px}
.mp-report .mp-stat{padding:10px 7px;background:#f9f8fd;border:1px solid #eae6f5;border-radius:11px;min-width:0}
.mp-report .mp-stat small{display:block;font-weight:700;color:#606379;font-size:10px;line-height:1.3}
.mp-report .mp-stat strong{display:block;margin-top:3px;color:#1e2030;font-size:21px;line-height:1.15}
.mp-report .mp-stat.mp-posted{background:#f3fcf6;border-color:#c9e9d3}
.mp-report .mp-stat.mp-pending{background:#fff9f0;border-color:#f5e2bf}
.mp-report .mp-report-info{background:#f5f4ff;border:1px solid #e5defb;border-radius:9px;color:#594e76;padding:9px 10px;font-size:11px;line-height:1.5;margin:8px 0}
.mp-report .mp-report-status{font-size:11px;color:#667085;line-height:1.45;margin:7px 0 14px}
.mp-report .mp-section{margin:14px 0 0;min-width:0}
.mp-report .mp-section-head{display:flex;flex-wrap:wrap;gap:7px;align-items:center;justify-content:space-between;margin:0 0 7px}
.mp-report .mp-section-head h3{font-size:14px;margin:0;color:#252339}
.mp-report .mp-section-head small{font-size:10px;color:#818196}
.mp-report .mp-export{padding:7px 10px!important;min-height:34px!important;font-size:11px!important;background:#fff;border:1px solid #ded7ee;color:#5e36c1;border-radius:9px;white-space:nowrap}
.mp-report .mp-entries{display:grid;gap:7px;min-width:0;max-height:none!important;overflow:visible!important}
.mp-report .mp-entry{display:block;min-width:0;border:1px solid #e4e5ed;border-radius:11px;background:#fff;overflow:hidden}
.mp-report .mp-entry summary{cursor:pointer;list-style:none;padding:11px;display:flex;align-items:center;justify-content:space-between;gap:9px;flex-wrap:wrap;min-width:0}
.mp-report .mp-entry summary::-webkit-details-marker{display:none}
.mp-report .mp-entry[open]{border-color:#d6c5f7;background:#fcfbff}
.mp-report .mp-entry-name{display:grid;gap:3px;min-width:0;flex:1 1 160px}
.mp-report .mp-entry-name strong{font-size:12px;line-height:1.35;overflow-wrap:anywhere;color:#22243a}
.mp-report .mp-entry-name small{font-size:10px;color:#74768a;line-height:1.25}
.mp-report .mp-entry-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;flex:1 1 150px}
.mp-report .mp-entry-stats span{display:grid;gap:3px;min-width:0;padding:6px;background:#f8f8fb;border-radius:7px;text-align:center}
.mp-report .mp-entry-stats span b{font-size:9px;color:#74768a;font-weight:650}
.mp-report .mp-entry-stats span strong{font-size:13px;color:#2e3146}
.mp-report .mp-entry-details{display:flex;flex-wrap:wrap;gap:10px;padding:11px;border-top:1px solid #ece8f4;font-size:11px;color:#56566c}
.mp-report .mp-empty{margin:0;padding:12px;border:1px dashed #e4e5ed;border-radius:10px;color:#73758b;background:#fafbff;font-size:12px}
.mp-report .mp-report-note{margin:12px 0 0;color:#828398;font-size:10px;line-height:1.4}
@media(max-width:650px){
 .mp-tabs{margin:0 0 8px;gap:5px;padding:4px}.mp-tab{padding:10px 6px;font-size:11px}
 .mp-report{padding:10px!important;border-radius:12px!important}.mp-report .mp-report-head h2{font-size:15px}
 .mp-report .mp-stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
 .mp-report .mp-stat{padding:8px 7px}.mp-report .mp-stat strong{font-size:18px}
 .mp-report .mp-report-filters{grid-template-columns:1fr 1fr;gap:6px}
 .mp-report .mp-entry summary{gap:8px;padding:9px;display:block}
 .mp-report .mp-entry-name{margin:0 0 7px}
 .mp-report .mp-entry-stats{width:100%}
}
@media(max-width:365px){.mp-report .mp-report-filters{grid-template-columns:1fr}.mp-report .mp-date-range{grid-template-columns:1fr}.mp-report .mp-date-range{grid-column:1}}
/* Hide redundant floating mode chip only while the report tab is open; it covered figures. */
body.mp-report-open.staff-media-mode::after,body.mp-report-open.owner-mode::after{display:none!important}
/* Photo uploader: details go beneath the entire form instead of occupying a right-side column. */
.photo-upload-v3 #uploadForm.form-grid{display:flex!important;flex-direction:column!important;grid-template-columns:none!important;gap:12px!important;align-items:stretch!important}
.photo-upload-v3 #uploadForm > .upload-primary,
.photo-upload-v3 #uploadForm > .upload-more,
.photo-upload-v3 #uploadForm > .upload-footer{display:block;flex:none;max-width:100%;min-width:0;width:100%;grid-column:1/-1!important}
.photo-upload-v3 #uploadForm > .upload-primary{display:flex;flex-direction:column;gap:12px}
.photo-upload-v3 #uploadForm > .upload-more{display:block;border-radius:12px;min-height:0!important;height:auto!important}
.photo-upload-v3 #uploadForm > .upload-more:not([open]){height:auto!important}
.photo-upload-v3 #uploadForm > .upload-more .more-fields{display:grid!important;width:100%;grid-template-columns:repeat(2,minmax(0,1fr))!important}
.photo-upload-v3 #uploadForm > .upload-footer{display:grid;gap:9px}
.photo-upload-v3 #uploadForm .upload-file-area{width:100%;min-width:0}
.photo-upload-v3 #uploadForm textarea{width:100%}
@media(max-width:650px){.photo-upload-v3 #uploadForm > .upload-more .more-fields{grid-template-columns:1fr!important}}




/* =============================================================
  SHIVSHAHI ONLINE | LIBRARY PREMIUM POLISH 2026.10.09
  Visual styles only. Original IDs, API calls and handlers untouched.
  This module lives inside its own admin iframe.
  ============================================================= */
:root {
  --bg:#f7f3fc;
  --panel:#ffffff;
  --card:#ffffff;
  --ink:#2b1247;
  --text:#2b1247;
  --muted:#756880;
  --purple:#7c4fc4;
  --purple2:#9368d4;
  --purple-deep:#542b8a;
  --gold:#c89b2b;
  --line:#e7dff0;
  --shadow:0 10px 25px rgba(43,18,71,.065),0 2px 7px rgba(43,18,71,.025);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI","Noto Sans Devanagari",sans-serif;
  color-scheme:light;
}
html,body{
  background:linear-gradient(180deg,#fcfaff 0%,#f7f3fc 64%,#f2ebfa 100%)!important;
  color:#2b1247;
  min-width:0;
}
body{-webkit-tap-highlight-color:transparent}
body :is(button,input,select,textarea){font-family:inherit}
body :is(button,summary){touch-action:manipulation}
body :is(button,input,select,textarea,summary):focus-visible{
  outline:2px solid #7c4fc4!important;
  outline-offset:2px!important;
}
.wrap{min-width:0!important;padding:12px 12px 32px!important}
:is(.hero,.page-head){
  position:relative;
  min-width:0;
  border:1px solid #e5daf0!important;
  border-radius:20px!important;
  background:linear-gradient(132deg,#fff 0%,#fdfbff 66%,#f8f2fe 100%)!important;
  box-shadow:0 13px 31px rgba(43,18,71,.078),0 2px 7px rgba(43,18,71,.028)!important;
  padding:17px 16px!important;
  gap:11px!important;
  margin-bottom:12px!important;
}
:is(.hero,.page-head):before{
  content:"";
  position:absolute;
  top:0;
  left:18px;
  right:18px;
  height:2px;
  background:linear-gradient(90deg,transparent,#d4b05c,#9875d0,transparent);
  border-radius:5px;
  pointer-events:none;
}
.eyebrow{
  color:#5b2b87!important;
  font-size:9px!important;
  letter-spacing:.23em!important;
  font-weight:850!important;
  text-transform:uppercase;
}
:is(.hero,.page-head) h1{
  font-family:Georgia,"Times New Roman",serif!important;
  color:#2b1247!important;
  font-size:clamp(24px,4.9vw,29px)!important;
  font-weight:750!important;
  line-height:1.08!important;
  letter-spacing:-.032em!important;
  margin:5px 0 5px!important;
}
:is(.hero,.page-head) p{
  color:#786a86!important;
  font-size:11.5px!important;
  line-height:1.55!important;
  max-width:48ch;
  margin:0!important;
}
:is(.hero-actions,.head-actions){gap:8px!important}
.btn{
  border:1px solid #e6ddef!important;
  border-radius:12px!important;
  background:linear-gradient(180deg,#fff,#fbf8fe)!important;
  box-shadow:0 2px 5px rgba(43,18,71,.025);
  color:#4d3668!important;
  min-height:42px!important;
  font-size:11.5px!important;
  font-weight:800!important;
  letter-spacing:0!important;
  line-height:1.35!important;
  transition:background .15s ease,box-shadow .15s ease,border-color .15s ease;
}
.btn:hover:not(:disabled){background:#f3ecfa!important;border-color:#c9b2e2!important;box-shadow:0 5px 13px rgba(73,37,110,.08)}
.btn.primary{
  color:#fff!important;
  border-color:#7043b1!important;
  background:linear-gradient(112deg,#9265d4 0%,#7c4fc4 48%,#542b8a 100%)!important;
  box-shadow:0 8px 16px rgba(84,43,138,.17)!important;
}
.btn.primary:hover:not(:disabled){
  background:linear-gradient(112deg,#8054c5 0%,#7042b8 48%,#4b257f 100%)!important;
  border-color:#644094!important;
  box-shadow:0 9px 19px rgba(84,43,138,.23)!important;
}
.btn.danger{background:#fff7f9!important;color:#b12c47!important;border-color:#efccd4!important}
.btn:disabled{cursor:not-allowed;opacity:.58;box-shadow:none!important}
.icon-btn{
  display:grid;
  place-items:center;
  flex:0 0 auto;
  width:37px!important;
  height:37px!important;
  padding:0!important;
  border:1px solid #e8def0!important;
  border-radius:12px!important;
  background:#f7f1fc!important;
  color:#5d3a82!important;
  line-height:1!important;
  font-size:21px!important;
}
:is(.mp-tabs,.library-tabs,.entry-tabs){
  display:grid;
  min-width:0;
  gap:6px!important;
  padding:5px!important;
  margin:0 0 12px!important;
  border:1px solid #e7dbf1!important;
  border-radius:15px!important;
  background:linear-gradient(180deg,#f2eaf9,#eee4f7)!important;
}
:is(.mp-tab,.library-tab,.entry-tab){
  min-width:0;
  min-height:42px!important;
  border-radius:11px!important;
  border:1px solid transparent!important;
  background:transparent!important;
  color:#62526f!important;
  font-weight:800!important;
  font-size:11.5px!important;
  line-height:1.2;
  text-align:center;
  box-shadow:none!important;
}
:is(.mp-tab.is-active,.library-tab.active,.entry-tab.active){
  color:#fff!important;
  border-color:rgba(84,43,138,.16)!important;
  background:linear-gradient(117deg,#9165d2,#7c4fc4 55%,#613598)!important;
  box-shadow:0 5px 13px rgba(84,43,138,.13)!important;
}
.kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important;margin:0 0 12px!important}
.kpis article,
.report-kpis article{
  position:relative;
  min-width:0;
  border:1px solid #e9e2f1!important;
  border-radius:15px!important;
  background:linear-gradient(140deg,#fff 0%,#fdfbff 100%)!important;
  box-shadow:0 5px 17px rgba(43,18,71,.05)!important;
  padding:13px 14px!important;
}
.kpis article:before{
  content:"";
  position:absolute;
  top:12px;
  bottom:12px;
  left:0;
  border-left:3px solid #c5a7e5;
  border-radius:0 3px 3px 0;
}
.kpis article:nth-child(2):before{border-color:#9ecfb1}
.kpis article:nth-child(3):before{border-color:#d7b96e}
.kpis article:nth-child(4):before{border-color:#baa7d7}
.kpis small,.report-kpis small{
  display:block;
  color:#796b87!important;
  font-size:10.5px!important;
  font-weight:720!important;
  line-height:1.3;
}
.kpis strong,.report-kpis strong{
  display:block;
  color:#2b1247!important;
  font-weight:850!important;
  font-size:clamp(21px,5.1vw,26px)!important;
  letter-spacing:-.03em;
  line-height:1.1!important;
  margin-top:6px!important;
  overflow-wrap:anywhere;
}
:is(.card,.panel){
  min-width:0;
  border:1px solid #eae2f2!important;
  border-radius:16px!important;
  background:#fff!important;
  box-shadow:0 7px 21px rgba(43,18,71,.045)!important;
}
:is(.card-head,.panel-head) h2,
.mp-report h2,
.report-panel h2{
  color:#2b1247!important;
  font-size:16px!important;
  letter-spacing:-.018em;
  line-height:1.25;
}
:is(.card-head,.panel-head) p,
.mp-report-head p,
.report-panel p{
  color:#796e86!important;
  font-size:11px!important;
  line-height:1.5!important;
}
:is(.upload-panel,.add-panel){
  border-color:#decfea!important;
  background:linear-gradient(180deg,#fff,#fffdff)!important;
  box-shadow:0 11px 25px rgba(69,34,105,.07)!important;
}
:is(.field,.field-group){min-width:0}
.field span,
.field > label,
.field-group > label{
  color:#453154!important;
  font-weight:800!important;
  font-size:11.5px!important;
  line-height:1.3!important;
}
.field small{color:#83788c!important;font-size:10.5px!important;line-height:1.45!important}
:is(.field input,.field textarea,.field select,.toolbar input,.toolbar select,.mp-report select,.mp-report input){
  min-width:0;
  border-radius:12px!important;
  border:1px solid #e3d8eb!important;
  background:linear-gradient(180deg,#fff,#fcf9fe)!important;
  color:#2b1247!important;
  box-shadow:0 1px 0 rgba(255,255,255,.9) inset;
  font-size:15px!important;
}
:is(.field input,.field textarea,.field select,.toolbar input,.toolbar select,.mp-report select,.mp-report input):focus{
  border-color:#9672ce!important;
  box-shadow:0 0 0 3px rgba(124,79,196,.10)!important;
  outline:0;
}
:is(input,textarea)::placeholder{color:#968ba3!important;opacity:1}
:is(.toolbar,.toolbar-v3){
  min-width:0;
  padding:11px!important;
  margin:0 0 11px!important;
  background:linear-gradient(135deg,#fff,#fbf8ff)!important;
  border:1px solid #e9e0f1!important;
  border-radius:15px!important;
  box-shadow:0 3px 11px rgba(43,18,71,.028);
}
:is(.toolbar,.toolbar-v3) :is(input,select){width:100%;min-height:42px!important}
:is(.status-box,.mp-report-info,.mp-report .mp-report-info){
  border-radius:12px!important;
  border-color:#e1d7ed!important;
  background:#f7f2fc!important;
  color:#645276!important;
  font-size:11px!important;
  line-height:1.5!important;
}
:is(.status-box.ok,.status-box.ready){background:#effbf3!important;color:#237148!important;border-color:#cce8d7!important}
:is(.status-box.bad,.status-box.error){background:#fff4f5!important;color:#ac364b!important;border-color:#f0d3d8!important}
:is(.reel-card,.post-card,.link-card){
  min-width:0!important;
  border:1px solid #e7def0!important;
  border-radius:14px!important;
  background:#fff!important;
  box-shadow:0 4px 13px rgba(43,18,71,.055)!important;
  transition:box-shadow .15s ease,border-color .15s ease;
}
:is(.reel-card,.post-card,.link-card):hover{
  border-color:#cdb9e5!important;
  box-shadow:0 9px 22px rgba(84,43,138,.105)!important;
}
:is(.reel-card,.post-card,.link-card) h3{
  color:#312040!important;
  font-weight:850!important;
  letter-spacing:-.015em;
}
:is(.reel-card,.post-card,.link-card) :is(.thumb,.tile-cover){
  background-color:#eadff3;
}
:is(.reel-card,.post-card,.link-card) .meta{color:#807388!important}
:is(.dialog){
  max-width:calc(100vw - 12px)!important;
  border:1px solid #e5d9ee!important;
  border-radius:19px!important;
  background:#fff!important;
  color:#2b1247!important;
  box-shadow:0 28px 68px rgba(30,12,53,.23)!important;
}
dialog::backdrop{background:rgba(35,19,57,.42)!important;backdrop-filter:blur(2px)}
.dialog-head{
  background:linear-gradient(125deg,#fff,#faf5ff)!important;
  border-bottom:1px solid #eee4f4!important;
  color:#342044!important;
}
.dialog-head strong{color:#2b1247!important;font-size:15px!important}
.dialog-head small{color:#7d6f8a!important}
:is(.form-actions,.dialog-actions){gap:8px!important}
:is(.check,.check-emphasis) input[type=checkbox]{accent-color:#7c4fc4}
:is(.mp-report,.report-panel){
  border:1px solid #e6dcf0!important;
  background:#fff!important;
  border-radius:16px!important;
  box-shadow:0 7px 20px rgba(43,18,71,.045)!important;
}
.mp-report .mp-stat{
  border:1px solid #e6dff0!important;
  border-radius:12px!important;
  background:#faf7fe!important;
  box-shadow:0 2px 5px rgba(43,18,71,.02);
}
.mp-report .mp-stat strong{color:#2b1247!important}
.mp-report .mp-entry{
  border-color:#e5def0!important;
  border-radius:12px!important;
  box-shadow:0 2px 8px rgba(43,18,71,.028);
}
.mp-report .mp-entry[open]{background:#fdfbff!important;border-color:#cfb9e7!important}
.mp-report .mp-entry-stats span{background:#f7f2fc!important;border-radius:9px!important}
.mp-report .mp-entry-stats span strong{color:#43235e!important}
.mp-report .mp-export{min-height:38px!important;color:#613598!important;border:1px solid #e1d3ee!important}
:where(.upload-more,.advanced-options){border:1px solid #e7dbf1!important;border-radius:13px!important;background:#fbf8fe!important}
:where(.upload-more,.advanced-options) summary{color:#5d358e!important;font-weight:830!important}
:where(.upload-more,.advanced-options)[open]{background:#fff!important;border-color:#cdb8e4!important}
@media(max-width:480px){
  :is(.hero,.page-head){padding:14px 13px!important}
  :is(.hero,.page-head) h1{font-size:23px!important}
  .kpis{gap:7px!important}
  .kpis article{padding:11px 12px!important}
  .kpis strong{font-size:21px!important}
  :is(.mp-report,.report-panel){padding:11px!important}
  :is(.mp-tab,.library-tab,.entry-tab){font-size:11px!important;padding:9px 6px!important}
}
@media(prefers-reduced-motion:reduce){
  :is(.btn,.reel-card,.post-card,.link-card){transition:none!important}
}



/* Photos: 4-up posting cards and full-width existing upload/crop controls. */
.wrap{max-width:600px!important}
.photo-grid-v3,.grid.photo-grid-v3{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:7px!important;
  align-items:start!important;
}
.post-card{overflow:visible!important}
.post-card .thumb{border-radius:13px 13px 0 0!important;overflow:hidden}
.post-card .card-body{min-width:0!important;padding:8px!important}
.post-card .card-body h3{font-size:10.5px!important;line-height:1.25!important}
.post-card .card-body .meta{font-size:9px!important}
.photo-upload-v3 .form-grid,.photo-upload-v3 .upload-primary,.photo-upload-v3 .upload-footer{min-width:0}
.photo-upload-v3 .upload-more,.photo-upload-v3 .more-fields{width:100%;max-width:100%}
.upload-file-area{
  border:1px dashed #cdb7e4!important;
  border-radius:15px!important;
  background:linear-gradient(130deg,#fdfaff,#f7f0fe)!important;
}
.upload-file-icon{background:#eee3f8!important;color:#673ba4!important}
.selected-photos .sel{border:1px solid #e6dcf0!important;border-radius:12px!important;background:#fff!important}
.selected-photos .sel-cover-badge{background:linear-gradient(115deg,#8b60d0,#613598)!important}
.progress,.progress .track{border-radius:12px!important}
.progress .track>i{background:linear-gradient(90deg,#9971d8,#633b98)!important}
.card-actions-menu{border:1px solid #e7dced!important;border-radius:14px!important;box-shadow:0 17px 36px rgba(34,14,62,.18)!important}
.crop-dialog .crop-canvas-wrap,.crop-canvas-wrap{border-radius:13px!important}
.mp-report .mp-stat.mp-posted{background:#f0fbf3!important;border-color:#c9e8d2!important}
.mp-report .mp-stat.mp-pending{background:#fff9ee!important;border-color:#f0e2ba!important}
@media(max-width:480px){
  .post-card .photo-count-word{display:none!important}
  .post-card .photo-count{right:5px!important;bottom:5px!important;padding:3px 6px!important;white-space:nowrap!important;font-size:9px!important}
}
@media(max-width:360px){
  .photo-grid-v3,.grid.photo-grid-v3{gap:4px!important}
  .post-card .card-body{padding:6px!important}
  .post-card .card-body h3{font-size:9.5px!important}
}
