/* Layout polish for laptop, tablet and phone. Brand stays navy and gold. */
.skip-link{position:absolute;left:12px;top:-48px;z-index:80;background:#071529;color:#fff;padding:10px 14px;border-radius:8px;font-weight:800}
.skip-link:focus{top:10px}
.main .muted,.section .muted{color:#3d494e}
.eyebrow{color:#5c4308}

body{overflow-x:clip}
.main .wrap,.main .narrow,.main .section{width:100%;max-width:100%}
img,svg,video{max-width:100%;height:auto}
.navin{gap:12px 18px}
.links{flex-wrap:wrap;min-width:0}
.links a{white-space:nowrap}

.side-label{display:flex;align-items:center;gap:8px;padding:14px 12px 4px;color:#f3d48a;font-weight:800;font-size:12px;letter-spacing:.04em}
.side-group a{padding-left:18px}

a.kpi{display:block;color:inherit;text-decoration:none}
a.kpi.active,a.kpi:hover{border-color:#d5a947;box-shadow:inset 0 0 0 2px #d5a947}
.filterbar{margin-top:14px}

.item{align-items:center}
.item small{display:block;margin-top:4px;color:var(--muted,#657174)}
.item>.btn,.item>a.btn,.item>form{align-self:center;height:auto;width:auto}
.btn.tiny,a.btn.tiny,button.btn.tiny{white-space:nowrap;width:auto;max-width:none;height:auto;align-self:center}
.tablewrap{overflow-x:auto;max-width:100%}
.table th,.table td{overflow-wrap:normal;word-break:normal}
.nowrap,.table .pill,.table .profile-status{white-space:nowrap}
.table th.profile-status,.table td.profile-status{min-width:8.5rem;width:8.5rem}
.table td:last-child,.table th:last-child{white-space:nowrap;width:1%}
.actions form,.actions .btn{align-self:center}

@media(min-width:951px){
  .app{grid-template-columns:268px minmax(0,1fr)}
  .sidebar{position:sticky;top:76px;align-self:start;max-height:calc(100vh - 88px);overflow:auto}
}

@media(max-width:950px){
  .navin{flex-wrap:nowrap;align-items:center;height:auto;padding:10px 0}
  .menu{display:block!important}
  .links{display:none}
  .links.open{display:flex;position:absolute;left:0;right:0;top:72px;z-index:40;background:#07111a;flex-direction:column;align-items:stretch;padding:12px 18px 16px;gap:10px}
  .app{grid-template-columns:minmax(0,1fr)}
  /* The full sidebar stays behind the menu. Links that already have an unread count stay on the page, so the badge is not trapped in a hidden panel. */
  .sidebar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;overflow:visible;max-height:none;padding:0 0 12px;background:transparent}
  .sidebar .sidebrand,.sidebar > a:not(:has(.menu-new-count)),.sidebar .side-label,.sidebar .side-group:not(:has(.menu-new-count)),.sidebar a:not(:has(.menu-new-count)){display:none}
  .sidebar .side-group:has(.menu-new-count){display:contents}
  .sidebar a:has(.menu-new-count){display:inline-flex;align-items:center;gap:8px;width:auto;background:#071529;color:#f6f1e4;border-radius:999px;padding:8px 12px}
  .sidebar.open{display:block;position:relative;z-index:30;overflow:auto;max-height:70vh;padding:12px 12px 16px;background:#071529}
  .sidebar.open .sidebrand,.sidebar.open .side-label,.sidebar.open .side-group,.sidebar.open > a,.sidebar.open a{display:flex}
  .sidebar.open .side-group{display:block}
  .sidebar.open a{width:auto;background:transparent;border-radius:0;padding:10px 12px;color:#f6f1e4}
  .sidebrand{display:block}
  .sidebar a{white-space:normal}
  .main{padding:20px 16px;min-width:0}
  .main>.success,.main>.notice,.main>.error{position:static;margin:0 0 16px}
  .kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .hero{min-height:0}
  .hero h1{font-size:clamp(32px,8vw,52px)}
  .footergrid,.cards4,.cards3{grid-template-columns:1fr 1fr}
}

@media(max-width:768px){
  .table th:first-child,.table td:first-child{position:sticky;left:0;background:#fff;z-index:1;box-shadow:4px 0 8px rgba(7,21,41,.06)}
  .wrap{width:min(1180px,calc(100% - 28px))}
  .formgrid,.detailgrid,.grid.two,.grid.three,.cards4,.cards3,.footergrid{grid-template-columns:minmax(0,1fr)}
  .panelhead{flex-direction:column;align-items:flex-start;gap:12px}
  .panelhead .actions,.main .actions{width:100%}
  input,select,textarea{font-size:16px}
  .table{min-width:640px}
}

.footage-link-form{margin:.45rem 0 .15rem}
.footage-link-form label{display:block;font-weight:800;color:#071529}
.footage-link-form .actions{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap;margin-top:.35rem}
.footage-link-form input[type=url]{flex:1 1 16rem;min-width:0;padding:.65rem .75rem;border:1px solid #d5a947;border-radius:8px;background:#fff;color:#071529}
.footage-link-form .small{display:block;margin:.45rem 0 0;color:#5c5342}

@media(max-width:390px){
  .kpis,.footergrid,.cards4,.cards3{grid-template-columns:1fr}
  .main,.panel,.formcard,.card{padding:16px}
  .dash-title,h1{font-size:clamp(28px,9vw,40px);overflow-wrap:anywhere}
  .btn{width:100%}
  .btn.tiny,a.btn.tiny,button.btn.tiny,.links a,.sidebar a,.item>.btn,.item>a.btn{width:auto}
  .brandwords{letter-spacing:.06em}
  .brand img{width:40px;height:40px}
}
