:root{
  --primary:#ffe000;
  --secondary:#111111;
  --accent:#ffffff;
  --muted:#f5f5f5;
  --line:#e8e8e8;
  --text:#151515;
}

*{box-sizing:border-box}

body{
  margin:0;
  font-family:Inter,Arial,sans-serif;
  color:var(--text);
  background:#111;
}

a{text-decoration:none;color:inherit}

/* BUTTONS */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border:0;
  border-radius:14px;
  padding:13px 20px;
  background:var(--primary);
  color:#111;
  font-weight:800;
  cursor:pointer;
  min-height:46px;
}

.btn:hover{filter:brightness(.98)}
.btn.secondary{background:#fff;color:#111;border:1px solid #e8e8e8}
.btn.dark{background:#222;color:#fff}
.small-btn{padding:8px 12px;min-height:34px;font-size:13px}
.danger-btn{background:#8b0000!important;color:#fff!important}

/* LOGIN */
.login-screen{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:#111;
}

.login-box{
  width:min(430px,92vw);
  background:rgba(0,0,0,.82);
  border:1px solid rgba(255,255,255,.16);
  border-radius:24px;
  padding:30px;
  color:#fff;
  box-shadow:0 22px 65px rgba(0,0,0,.28);
}

.login-box img{
  max-width:310px;
  width:90%;
  display:block;
  margin:0 auto 22px;
}

.login-title{text-align:center;margin:0 0 22px;color:#fff}

/* FORMS */
.field{margin-bottom:14px}

.field label{
  display:block;
  font-weight:800;
  margin-bottom:8px;
  color:#151515;
}

.field input,
.field textarea,
.field select{
  width:100%;
  min-height:46px;
  border:1px solid #dcdcdc;
  border-radius:14px;
  padding:12px;
  background:#fff;
  color:#151515;
  font-size:15px;
  outline:none;
}

.field textarea{
  min-height:120px;
  resize:vertical;
  line-height:1.45;
}

.field input:focus,
.field textarea:focus,
.field select:focus{
  border-color:var(--primary);
  box-shadow:0 0 0 4px rgba(255,224,0,.22);
  background:#fffef2;
}

.login-box .field label{color:#fff}
.login-box .field input,
.login-box .field textarea,
.login-box .field select{
  border:1px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.08);
  color:#fff;
}

.small{color:#555;font-size:14px;line-height:1.45}
.muted{color:#777}

.help-tip{
  position:relative;
  display:inline-flex;
  vertical-align:middle;
  margin-left:4px;
  outline:none;
}
.help-tip-mark{
  display:inline-grid;
  width:18px;
  height:18px;
  place-items:center;
  border:1px solid #b9b9b9;
  border-radius:50%;
  background:#fff;
  color:#555;
  font-size:12px;
  font-style:normal;
  font-weight:800;
  line-height:1;
  cursor:help;
}
.help-tip-content{
  position:absolute;
  z-index:80;
  left:0;
  bottom:calc(100% + 9px);
  width:min(310px,80vw);
  padding:11px 13px;
  border-radius:8px;
  background:#171717;
  color:#fff;
  box-shadow:0 10px 28px rgba(0,0,0,.22);
  font-size:12px;
  font-weight:500;
  line-height:1.5;
  opacity:0;
  pointer-events:none;
  transform:translate(0,4px);
  transition:opacity .15s ease,transform .15s ease;
}
.help-tip:hover .help-tip-content,
.help-tip:focus .help-tip-content,
.help-tip:focus-within .help-tip-content{
  opacity:1;
  transform:translate(0,0);
}
.help-tip:focus .help-tip-mark{border-color:var(--pwg-red);box-shadow:0 0 0 3px rgba(200,16,46,.12)}

.glossary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.glossary-item{padding:18px;border:1px solid #e3e3e3;border-radius:10px;background:#fff}
.glossary-item h2{margin:0 0 8px;font-size:17px}
.glossary-item p{margin:0;color:#626262;line-height:1.6}
@media(max-width:760px){.glossary-grid{grid-template-columns:1fr}}

.error,
.success,
.notice{
  padding:12px;
  border-radius:12px;
  margin-bottom:14px;
}

.error{background:#ffdede;color:#151515}
.success{background:#ddffde;color:#151515}
.notice{background:#fff8cc;color:#151515;border:1px solid #ffe680}

/* TOPBAR */
.topbar{
  background:#111;
  color:#fff;
  padding:14px 24px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  position:sticky;
  top:0;
  z-index:50;
  border-bottom:1px solid rgba(255,255,255,.08);
}

.topbar-left{
  display:flex;
  align-items:center;
  gap:14px;
}

.topbar img{height:42px;width:auto}
.topbar a{color:#fff}
.topbar-right{display:flex;align-items:center;gap:8px}
.topbar-sep{opacity:.55}

.menu-toggle{
  display:none;
  width:42px;
  height:42px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:12px;
  background:rgba(255,255,255,.06);
  color:#fff;
  font-size:22px;
  line-height:1;
  cursor:pointer;
}

/* ADMIN / CLIENT LAYOUT */
.layout,
.client-layout{
  display:grid;
  grid-template-columns:240px 1fr;
  min-height:calc(100vh - 70px);
  background:#f4f4f4;
}

.side,
.client-side{
  background:#fff;
  padding:20px;
  border-right:1px solid var(--line);
}

.side a,
.client-side a{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px;
  border-radius:12px;
  margin-bottom:6px;
  font-weight:650;
  color:#222;
}

.side a .nav-ico,
.client-side a .nav-ico{
  width:24px;
  height:24px;
  flex:0 0 24px;
  display:inline-grid;
  place-items:center;
  border-radius:8px;
  background:#f2f2f2;
  font-size:14px;
}

.side a.active,
.side a:hover,
.client-side a.active,
.client-side a:hover{
  background:var(--primary);
  color:#111;
}

.side a.active .nav-ico,
.side a:hover .nav-ico,
.client-side a.active .nav-ico,
.client-side a:hover .nav-ico{
  background:rgba(0,0,0,.12);
}

.main,
.client-main{
  padding:28px;
  background:#f4f4f4;
  min-height:calc(100vh - 70px);
}

.page-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin-bottom:18px;
}

.page-head h1{margin:0;font-size:34px}
.page-head p{margin:6px 0 0;color:#777;font-size:16px}

/* CARDS / GRID */
.card{
  background:#fff;
  border:1px solid #ececec;
  border-radius:18px;
  padding:20px;
  margin-bottom:18px;
  box-shadow:0 8px 25px rgba(0,0,0,.04);
}

.card h3{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:0;
}

.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:16px}
.grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.grid-4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}

.stat-card{
  display:flex;
  align-items:center;
  gap:14px;
}

.stat-card strong{
  display:block;
  font-size:30px;
  line-height:1;
}

.stat-card span:not(.stat-ico){
  color:#777;
  font-size:14px;
}

.stat-ico{
  width:48px;
  height:48px;
  border-radius:16px;
  display:grid;
  place-items:center;
  background:var(--primary);
  color:#111;
  font-weight:900;
  font-size:22px;
}

/* TABLES */
.table{
  width:100%;
  border-collapse:collapse;
  background:#fff;
  border-radius:16px;
  overflow:hidden;
}

.table td,
.table th{
  padding:12px;
  border-bottom:1px solid #eee;
  text-align:left;
  vertical-align:top;
}

.compact-table th,
.compact-table td{
  padding:10px;
  font-size:14px;
}

.actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
  margin-top:14px;
}

.badge{
  display:inline-flex;
  padding:5px 9px;
  border-radius:999px;
  background:#e8e8e8;
  font-size:12px;
  font-weight:800;
}

.badge.warning{background:#fff1b8;color:#765700}
.badge.danger{background:#ffd7d7;color:#9b0000}

/* FILES */
.file-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
  gap:18px;
}

.file-card{
  position:relative;
  background:#fff;
  border-radius:20px;
  overflow:hidden;
  box-shadow:0 10px 28px rgba(0,0,0,.06);
}

.file-card-body{padding:18px}

.file-card h3{
  color:#151515;
  font-size:22px;
  margin:14px 0 8px;
}

.file-card p{color:#222}
.file-card .muted{color:#666;font-weight:600}
.file-card .small{color:#555;line-height:1.35}

.file-preview{
  height:190px;
  background:#222;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  position:relative;
}

.file-preview img,
.file-preview video{
  width:100%;
  height:100%;
  object-fit:cover;
}

.file-preview iframe{
  width:100%;
  height:250px;
  border:0;
  pointer-events:none;
  background:#fff;
}

.file-preview.is-generic{
  flex-direction:column;
  color:#fff;
  background:#303030;
}

.file-preview.is-pdf{background:#e7e7e7}

.file-ext-big{
  font-size:44px;
  font-weight:900;
  color:var(--primary);
}

.file-ext-caption{
  color:#ccc;
  font-size:13px;
}

.file-meta{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  margin-bottom:10px;
}

.folder-badge{
  background:#e6f0ff;
  color:#1b4d89;
}

.file-select-check{
  position:absolute;
  top:12px;
  left:12px;
  z-index:5;
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:7px 10px;
  border-radius:999px;
  background:rgba(0,0,0,.72);
  color:#fff;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
}

.file-select-check input{accent-color:var(--primary)}

.copy-field{
  width:100%;
  padding:10px;
  border:1px solid #ddd;
  border-radius:10px;
  margin-bottom:8px;
  background:#fff;
  color:#111;
}

.bulk-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin:0 0 16px;
  padding:14px;
  border:1px solid #eee;
  border-radius:16px;
  background:#fff;
}

.bulk-download-form{display:none}

.checkbox-line{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-bottom:16px;
  font-weight:700;
}

/* DROPZONE */
.drop-zone{
  min-height:180px;
  border:2px dashed #d8d8d8;
  border-radius:22px;
  background:#fafafa;
  display:flex!important;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:28px;
  cursor:pointer;
  transition:.18s ease;
  text-align:center;
}

.drop-zone:hover,
.drop-zone.is-dragover{
  border-color:var(--primary);
  background:#fffbe6;
}

.drop-zone input{display:none}

.drop-zone-title{
  font-size:24px;
  font-weight:900;
  color:#151515;
}

.drop-zone-subtitle{
  margin-top:6px;
  color:#777;
  font-weight:600;
}

.selected-files{
  display:grid;
  gap:8px;
  margin-top:12px;
}

.selected-file-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  border-radius:12px;
  background:#fff;
  border:1px solid #e6e6e6;
}

/* VIEW TOGGLES */
.view-toggle-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin:0 0 18px;
  padding:12px 14px;
  border:1px solid #ececec;
  border-radius:16px;
  background:#fff;
  box-shadow:0 8px 25px rgba(0,0,0,.035);
}

.view-toggle-left,
.view-toggle-right{
  display:inline-flex;
  align-items:center;
  gap:8px;
}

.view-toggle-left span,
.view-toggle-right label{
  color:#777;
  font-weight:800;
  font-size:13px;
}

.view-toggle-left button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  width:auto;
  min-width:44px;
  min-height:38px;
  padding:8px 12px;
  border:1px solid #ddd;
  border-radius:12px;
  background:#f8f8f8;
  color:#151515;
  font-weight:900;
  cursor:pointer;
}

.view-toggle-left button svg{
  width:17px;
  height:17px;
  flex:0 0 17px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.view-toggle-left button span{
  color:inherit;
  font-size:12px;
  font-weight:850;
}

.view-toggle-left button:hover,
.view-toggle-left button.active{
  background:var(--primary);
  border-color:var(--primary);
  color:#111;
}

.view-toggle-right select{
  min-height:38px;
  border:1px solid #ddd;
  border-radius:12px;
  background:#fff;
  color:#151515;
  padding:8px 34px 8px 10px;
  font-weight:700;
}

/* SHARE PUBLIC */
.share-screen{
  min-height:100vh;
  background:#111;
  padding:26px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.share-box{
  width:min(980px,96vw);
  background:rgba(0,0,0,.82);
  border:1px solid rgba(255,255,255,.14);
  border-radius:28px;
  overflow:hidden;
  box-shadow:0 28px 80px rgba(0,0,0,.32);
  color:#fff;
}

.share-logo{
  max-width:300px;
  width:70%;
  height:auto;
  display:block;
  margin:30px auto 22px;
}

.share-content{
  padding:26px 34px 34px;
  text-align:center;
}

.share-content .muted{color:rgba(255,255,255,.72)}

/* CLIENT ARCHIVE */
.client-archive-summary{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(210px,1fr));
  gap:16px;
  margin-bottom:18px;
}

.client-archive-search{
  display:grid;
  grid-template-columns:1.3fr 1fr 1fr auto;
  gap:14px;
  align-items:end;
  padding:18px;
  background:#fff;
  border:1px solid #ececec;
  border-radius:20px;
  box-shadow:0 8px 25px rgba(0,0,0,.035);
  margin-bottom:12px;
}

.archive-filter-actions{
  display:flex;
  gap:8px;
  align-items:center;
  padding-bottom:14px;
}

.client-folder-section{margin-bottom:18px}

.client-folder-title{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:16px 18px;
  border:1px solid #e8e8e8;
  border-radius:18px;
  background:#fff;
  color:#151515;
  font-size:19px;
  font-weight:900;
  cursor:pointer;
  box-shadow:0 8px 25px rgba(0,0,0,.035);
}

.client-folder-title small{
  color:#777;
  font-size:13px;
  font-weight:800;
}

.client-folder-content{padding-top:14px}
.client-folder-section.is-collapsed .client-folder-content{display:none}

.empty-folder-note{
  padding:18px;
  border:1px dashed #d8d8d8;
  border-radius:16px;
  background:#fff;
  color:#777;
  font-weight:700;
}

/* SIMPLE MOVE */
.quick-move-box{
  margin:14px 0;
  padding:12px;
  border:1px solid #e8e8e8;
  border-radius:14px;
  background:#fafafa;
}

.quick-move-box strong{
  display:block;
  margin-bottom:8px;
  color:#151515;
  font-size:14px;
}

.quick-move-form{
  display:grid;
  grid-template-columns:1fr auto;
  gap:8px;
  align-items:center;
}

.quick-move-form select{
  width:100%;
  min-height:38px;
  border:1px solid #ddd;
  border-radius:12px;
  padding:8px 10px;
  background:#fff;
  color:#151515;
  font-weight:700;
}

/* ACTIVITIES MODULE */
.activity-form-card{border-left:6px solid var(--primary)}

.activity-total-box{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin:14px 0;
  padding:16px;
  border-radius:16px;
  background:#111;
  color:#fff;
}

.activity-total-box span{
  color:rgba(255,255,255,.68);
  font-weight:800;
}

.activity-total-box strong{
  color:var(--primary);
  font-size:30px;
  line-height:1;
}

.activity-summary-big{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}

.activity-summary-big div{
  padding:18px;
  border:1px solid #eee;
  border-radius:18px;
  background:#fafafa;
}

.activity-summary-big span{
  display:block;
  color:#777;
  font-weight:800;
  margin-bottom:8px;
}

.activity-summary-big strong{
  display:block;
  font-size:30px;
  color:#151515;
}

/* UPLOAD PROGRESS */
.upload-progress-box{
  display:none;
  margin-top:18px;
  padding:18px;
  border-radius:18px;
  border:1px solid rgba(255,224,0,.36);
  background:#111;
  color:#fff;
  box-shadow:0 18px 45px rgba(0,0,0,.18);
}

.upload-progress-box.is-visible{display:block}
.upload-progress-title{font-size:20px;font-weight:900;margin-bottom:6px}
.upload-progress-message{color:rgba(255,255,255,.76);line-height:1.45;margin-bottom:14px}

.upload-progress-track{
  width:100%;
  height:16px;
  overflow:hidden;
  border-radius:999px;
  background:rgba(255,255,255,.12);
}

.upload-progress-track span{
  display:block;
  width:0;
  height:100%;
  border-radius:999px;
  background:var(--primary);
  transition:width .16s ease;
}

.upload-progress-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-top:10px;
}

.upload-progress-percent{
  font-size:26px;
  color:var(--primary);
}

.upload-progress-size{
  color:rgba(255,255,255,.72);
  text-align:right;
  font-weight:700;
}

/* RESPONSIVE */
@media(max-width:900px){
  .layout,
  .client-layout{
    display:block;
    min-height:calc(100vh - 67px);
  }

  .menu-toggle{
    display:inline-flex;
    align-items:center;
    justify-content:center;
  }

  .side,
  .client-side{
    display:none;
    position:fixed;
    top:67px;
    left:0;
    right:0;
    z-index:40;
    padding:12px 16px 18px;
    border-right:0;
    border-bottom:1px solid var(--line);
    box-shadow:0 18px 45px rgba(0,0,0,.16);
  }

  body.nav-open .side,
  body.nav-open .client-side{
    display:block;
  }

  .main,
  .client-main{
    padding:20px 16px;
    min-height:calc(100vh - 67px);
  }

  .grid-2,
  .grid-3,
  .grid-4{
    grid-template-columns:1fr;
  }

  .page-head{display:block}
  .table{display:block;overflow-x:auto}
  .client-archive-search{grid-template-columns:1fr}
  .archive-filter-actions{padding-bottom:0}
  .activity-summary-big{grid-template-columns:1fr}
}

@media(max-width:700px){
  .file-grid{grid-template-columns:1fr}
  .login-box{padding:24px}
  .topbar img{height:34px}
  .topbar-right{font-size:14px}
  .bulk-toolbar{align-items:flex-start;flex-direction:column}
  .view-toggle-bar{display:block}
  .view-toggle-right{margin-top:10px}
  .quick-move-form{grid-template-columns:1fr}
  .upload-progress-meta{display:block}
  .upload-progress-size{display:block;text-align:left;margin-top:4px}
}

/* PWG CLOUD ADMIN DESIGN SYSTEM
   Scoped to the back-office layout so client and public pages keep their theme. */
:root{
  --pwg-red:#ffe000;
  --pwg-black:#111111;
  --pwg-gray-50:#fafafa;
  --pwg-gray-100:#f4f4f4;
  --pwg-gray-200:#e5e5e5;
  --pwg-gray-600:#666666;
  --pwg-radius:14px;
  --pwg-shadow:0 8px 24px rgba(0,0,0,.06);
}

.layout:not(.client-layout){
  --primary:var(--pwg-red);
  --secondary:var(--pwg-black);
  --accent:#ffffff;
  background:var(--pwg-gray-100);
}

body:has(> .layout:not(.client-layout)) > .topbar{
  background:var(--pwg-black);
  border-bottom:3px solid var(--pwg-red);
  box-shadow:0 4px 16px rgba(0,0,0,.12);
}

.side{
  background:#ffffff;
  border-right:1px solid var(--pwg-gray-200);
}

.side a{
  color:var(--pwg-black);
  border-left:3px solid transparent;
}

.side a:hover{
  color:var(--pwg-red);
  background:var(--pwg-gray-50);
  border-left-color:var(--pwg-red);
}

.side a.active{
  color:#ffffff;
  background:var(--pwg-red);
  border-left-color:var(--pwg-black);
}

.main{
  color:var(--pwg-black);
  background:var(--pwg-gray-100);
  line-height:1.55;
}

.main h1,
.main h2,
.main h3,
.main h4{
  color:var(--pwg-black);
  letter-spacing:-.015em;
}

.main a:not(.btn):not(.action-icon){
  color:var(--pwg-red);
}

.main a:not(.btn):not(.action-icon):hover{
  color:var(--pwg-black);
}

/* Buttons */
.main .btn,
.main .btn.primary{
  color:#ffffff !important;
  background:var(--pwg-red) !important;
  border:1px solid var(--pwg-red) !important;
  border-radius:9px;
  box-shadow:none !important;
  transition:background-color .18s ease,border-color .18s ease,color .18s ease,transform .18s ease;
}

.main .btn:hover,
.main .btn.primary:hover{
  color:#ffffff !important;
  background:var(--pwg-black) !important;
  border-color:var(--pwg-black) !important;
}

.main .btn.secondary{
  color:var(--pwg-red) !important;
  background:#ffffff !important;
  border-color:var(--pwg-red) !important;
}

.main .btn.secondary:hover{
  color:#ffffff !important;
  background:var(--pwg-red) !important;
  border-color:var(--pwg-red) !important;
}

.main .btn.dark,
.main .btn.danger,
.main .danger-btn,
.main .btn.warning{
  color:#ffffff !important;
  background:var(--pwg-black) !important;
  border-color:var(--pwg-black) !important;
}

.main .btn.dark:hover,
.main .btn.danger:hover,
.main .danger-btn:hover,
.main .btn.warning:hover{
  color:#ffffff !important;
  background:var(--pwg-red) !important;
  border-color:var(--pwg-red) !important;
}

/* Cards and quick actions */
.main .card,
.main .archive-stat,
.main .file-card,
.main .archive-row,
.main .view-toggle-bar,
.main .bulk-toolbar,
.main .activity-form-card,
.main .activity-total-box{
  background:#ffffff;
  border:1px solid var(--pwg-gray-200);
  border-radius:var(--pwg-radius);
  box-shadow:var(--pwg-shadow);
}

.main .card,
.main .archive-stat{
  border-top:3px solid var(--pwg-red);
}

.main .archive-quick-band{
  color:var(--pwg-black) !important;
  background:#ffffff !important;
  border:1px solid var(--pwg-gray-200) !important;
  border-left:5px solid var(--pwg-red) !important;
  border-radius:var(--pwg-radius) !important;
  box-shadow:var(--pwg-shadow) !important;
}

.main .archive-quick-band-title{
  color:var(--pwg-black) !important;
}

/* Tables and selectable document rows */
.main .table{
  background:#ffffff;
  border:1px solid var(--pwg-gray-200);
  border-radius:var(--pwg-radius);
  box-shadow:var(--pwg-shadow);
}

.main .table thead th,
.main .table > tbody > tr:first-child > th,
.main .table > tr:first-child > th{
  color:#ffffff;
  background:var(--pwg-black);
  border-color:var(--pwg-black);
}

.main .table tbody tr:hover td,
.main .table tbody tr:hover th{
  background:var(--pwg-gray-50);
}

.main .archive-row:has(.bulk-file-check:checked),
.main .file-card:has(.bulk-file-check:checked),
.main .table tr.is-selected{
  border-left:4px solid var(--pwg-red);
}

/* Forms */
.main input,
.main textarea,
.main select{
  border-color:#cfcfcf;
  border-radius:9px;
  background-color:#ffffff;
}

.main input:focus,
.main textarea:focus,
.main select:focus,
.main .field input:focus,
.main .field textarea:focus,
.main .field select:focus{
  border-color:var(--pwg-red) !important;
  outline:0;
  box-shadow:0 0 0 3px rgba(200,16,46,.14) !important;
  background:#ffffff;
}

.main input[type="checkbox"],
.main input[type="radio"]{
  accent-color:var(--pwg-red);
}

.main .drop-zone:hover,
.main .drop-zone:focus-within,
.main .drop-zone.is-dragover{
  border-color:var(--pwg-red);
  background:var(--pwg-gray-50);
}

/* Reduced badge palette */
.main .badge{
  color:#ffffff;
  background:var(--pwg-red);
  border:1px solid var(--pwg-red);
}

.main .badge.warning,
.main .folder-badge{
  color:var(--pwg-red);
  background:#ffffff;
  border:1px solid var(--pwg-red);
}

.main .badge.danger,
.main .share-status-expired,
.main .share-status-revoked{
  color:#ffffff;
  background:var(--pwg-black);
  border:1px solid var(--pwg-red);
}

.main .table .badge.danger{
  color:var(--pwg-gray-600);
  background:var(--pwg-gray-200);
  border-color:var(--pwg-gray-200);
}

.main .share-status-active{
  color:#ffffff;
  background:var(--pwg-red);
  border-color:var(--pwg-red);
}

/* Alerts */
.main .success,
.main .notice,
.main .error{
  padding:14px 18px;
  border-radius:10px;
  font-weight:600;
  box-shadow:none;
}

/* SUCCESSO */
.main .success{
  color:#166534;
  background:#dcfce7;
  border:1px solid #86efac;
  border-left:6px solid #16a34a;
}

/* AVVISO */
.main .notice{
  color:#92400e;
  background:#fef3c7;
  border:1px solid #fcd34d;
  border-left:6px solid #f59e0b;
}

/* ERRORE */
.main .error{
  color:#991b1b;
  background:#fee2e2;
  border:1px solid #fca5a5;
  border-left:6px solid #dc2626;
}

/* Archive controls and accents */
.main .view-toggle-left button.active,
.main .view-toggle-left button[aria-pressed="true"]{
  color:#ffffff;
  background:var(--pwg-red);
  border-color:var(--pwg-red);
}

.main .view-toggle-left button:hover{
  color:var(--pwg-red);
  border-color:var(--pwg-red);
}

.main .view-toggle-left button.active:hover,
.main .view-toggle-left button[aria-pressed="true"]:hover{
  color:#ffffff;
  background:var(--pwg-red);
  border-color:var(--pwg-red);
}

.main .stat-ico,
.main .archive-row-icon,
.main .file-ext-big,
.main .upload-progress-percent,
.main .activity-total-box strong{
  color:var(--pwg-red);
}

.main .upload-progress-bar > span{
  background:var(--pwg-red);
}

.main .notify-badge{
  color:#ffffff;
  background:var(--pwg-red);
}

@media(max-width:900px){
  .side{
    background:#ffffff;
    border-bottom:3px solid var(--pwg-red);
  }
}

/* PREMIUM ADMIN NAVIGATION */
.layout:not(.client-layout){
  grid-template-columns:252px minmax(0,1fr);
}

body:has(> .layout:not(.client-layout)) > .topbar{
  min-height:68px;
  padding:11px 24px;
  border-bottom:1px solid #2b2b2b;
  box-shadow:none;
}

body:has(> .layout:not(.client-layout)) > .topbar .topbar-right{
  gap:14px;
}

body:has(> .layout:not(.client-layout)) > .topbar .notify-link{
  position:relative;
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  border:1px solid #3a3a3a;
  border-radius:10px;
}

body:has(> .layout:not(.client-layout)) > .topbar .notify-link:hover{
  border-color:var(--pwg-red);
  background:#1c1c1c;
}

body:has(> .layout:not(.client-layout)) > .topbar .notify-link svg{
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.topbar-user{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:#ffffff;
  font-size:13px;
  font-weight:750;
}

.topbar-user-mark{
  display:grid;
  place-items:center;
  width:30px;
  height:30px;
  border-radius:50%;
  color:var(--pwg-red);
  background:#ffffff;
  font-size:9px;
}

.topbar-menu{
  padding-left:14px;
  border-left:1px solid #3a3a3a;
  color:#c9c9c9!important;
  font-size:12px;
  font-weight:700;
}

.topbar-menu:hover{color:#ffffff!important}

.side{
  padding:24px 16px 30px;
}

.side .nav-group{
  margin-top:24px;
}

.side .nav-group-label{
  display:block;
  margin:0 12px 8px;
  color:#929292;
  font-size:10px;
  font-weight:850;
  letter-spacing:.13em;
  text-transform:uppercase;
}

.side a{
  position:relative;
  min-height:42px;
  margin-bottom:3px;
  padding:9px 12px;
  border-left:3px solid transparent;
  border-radius:9px;
  color:#4b4b4b;
  font-size:13px;
  font-weight:700;
}

.side a .nav-ico{
  width:25px;
  height:25px;
  flex-basis:25px;
  color:#6c6c6c;
  background:transparent;
  border:1px solid transparent;
  border-radius:7px;
  font-size:15px;
}

.side a:hover{
  color:var(--pwg-black);
  background:var(--pwg-gray-50);
  border-left-color:#d6d6d6;
}

.side a.active{
  color:var(--pwg-black);
  background:#f6f6f6;
  border-left-color:var(--pwg-red);
}

.side a.active .nav-ico,
.side a:hover .nav-ico{
  color:var(--pwg-red);
  background:#ffffff;
  border-color:var(--pwg-gray-200);
}

.main{
  padding:34px;
}

@media(max-width:900px){
  .layout:not(.client-layout){display:block}
  .side{padding:16px}
  .side .nav-group{margin-top:16px}
  .main{padding:22px 16px}
  .topbar-user{display:none}
}

/* ADMIN DASHBOARD */
.dashboard-page{
  width:100%;
  max-width:1680px;
  margin:0 auto;
}

.dashboard-page .card{
  margin-bottom:0;
  border-top:1px solid var(--pwg-gray-200);
  border-radius:12px;
  box-shadow:0 5px 18px rgba(17,17,17,.045);
}

.dashboard-hero{
  display:flex;
  align-items:center;
  min-height:190px;
  margin-bottom:24px;
  padding:36px 40px;
  border:1px solid var(--pwg-gray-200);
  border-left:4px solid var(--pwg-red);
  border-radius:12px;
  background:#ffffff;
  box-shadow:0 5px 18px rgba(17,17,17,.045);
}

.dashboard-hero h1{
  margin:0;
  color:var(--pwg-black);
  font-size:clamp(30px,3vw,42px);
  line-height:1.12;
  letter-spacing:-.035em;
}

.dashboard-hero p{
  margin:10px 0 22px;
  color:var(--pwg-gray-600);
  font-size:16px;
}

.dashboard-hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.dashboard-hero-actions .btn{
  min-height:44px;
  padding:0 19px;
}

.dashboard-alert{margin-bottom:20px}

.dashboard-kpis{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:12px;
  margin-bottom:24px;
}

.dashboard-kpi{
  display:grid;
  grid-template-columns:42px minmax(0,1fr);
  grid-template-rows:auto auto;
  column-gap:14px;
  align-items:center;
  min-width:0;
  min-height:126px;
  padding:19px;
  color:var(--pwg-black)!important;
  text-decoration:none;
  transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease;
}

a.dashboard-kpi:hover{
  transform:translateY(-2px);
  border-color:#d2d2d2;
  box-shadow:0 9px 22px rgba(17,17,17,.065);
}

.dashboard-kpi-icon{
  grid-row:1 / 3;
  display:grid;
  place-items:center;
  width:42px;
  height:42px;
  border:1px solid #f0d2d8;
  border-radius:10px;
  color:var(--pwg-red);
  background:#fff5f6;
  font-size:18px;
  font-weight:850;
}

.dashboard-kpi strong{
  align-self:end;
  overflow:hidden;
  font-size:31px;
  line-height:1;
  letter-spacing:-.035em;
  text-overflow:ellipsis;
}

.dashboard-kpi > span:last-child{
  align-self:start;
  margin-top:6px;
  color:var(--pwg-gray-600);
  font-size:13px;
  font-weight:700;
}

.dashboard-operations{
  display:grid;
  grid-template-columns:minmax(0,1.85fr) minmax(300px,1fr);
  gap:18px;
  align-items:start;
  margin-bottom:18px;
}

.dashboard-side-column{
  display:grid;
  gap:18px;
  min-width:0;
}

.dashboard-section{
  min-width:0;
  padding:22px;
}

.dashboard-section .card-head{
  margin-bottom:16px;
}

.dashboard-section .card-head h2,
.dashboard-section-heading h2{
  margin:0;
  font-size:19px;
}

.dashboard-activity{
  position:relative;
  display:grid;
}

.dashboard-activity:before{
  content:"";
  position:absolute;
  top:22px;
  bottom:22px;
  left:18px;
  width:1px;
  background:var(--pwg-gray-200);
}

.dashboard-activity-item{
  position:relative;
  display:grid;
  grid-template-columns:38px minmax(0,1fr) auto;
  gap:13px;
  align-items:start;
  padding:13px 8px;
  border-radius:10px;
}

.dashboard-activity-item:hover{background:var(--pwg-gray-50)}

.dashboard-activity-icon{
  position:relative;
  z-index:1;
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  border:1px solid #ecd3d7;
  border-radius:50%;
  color:var(--pwg-red);
  background:#ffffff;
  font-weight:900;
}

.dashboard-activity-content strong,
.dashboard-activity-content span{
  display:block;
}

.dashboard-activity-content strong{font-size:14px}
.dashboard-activity-content span{
  margin-top:2px;
  color:var(--pwg-gray-600);
  font-size:12px;
}

.dashboard-activity-date{
  padding-top:2px;
  color:var(--pwg-gray-600);
  font-size:11px;
  white-space:nowrap;
}

.dashboard-share-stats{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
}

.dashboard-share-stats div{
  padding:14px 10px;
  border:1px solid var(--pwg-gray-200);
  border-radius:10px;
  background:var(--pwg-gray-50);
  text-align:center;
}

.dashboard-share-stats span,
.dashboard-share-stats strong{
  display:block;
}

.dashboard-share-stats span{
  color:var(--pwg-gray-600);
  font-size:11px;
}

.dashboard-share-stats strong{
  margin-top:5px;
  color:var(--pwg-black);
  font-size:24px;
}

.dashboard-client-list{display:grid}

.dashboard-client-item{
  display:grid;
  grid-template-columns:38px minmax(0,1fr);
  gap:11px;
  align-items:center;
  padding:10px 0;
  border-bottom:1px solid var(--pwg-gray-200);
  color:var(--pwg-black)!important;
  text-decoration:none;
}

.dashboard-client-item:last-child{border-bottom:0}

.dashboard-client-avatar{
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  border-radius:10px;
  color:var(--pwg-red);
  background:#fff5f6;
  font-size:13px;
  font-weight:850;
}

.dashboard-client-item strong,
.dashboard-client-item small{
  display:block;
}

.dashboard-client-item small{
  margin-top:2px;
  color:var(--pwg-gray-600);
  font-size:11px;
}

.dashboard-table-wrap{overflow-x:auto}

.dashboard-table{
  min-width:680px;
  border:0!important;
  box-shadow:none!important;
}

.dashboard-page .dashboard-table thead th{
  color:#555555;
  background:var(--pwg-gray-50);
  border-color:var(--pwg-gray-200);
  white-space:nowrap;
}

.dashboard-page .dashboard-table td{
  padding-top:15px;
  padding-bottom:15px;
  vertical-align:middle;
}

.dashboard-icon-column{width:54px}

.dashboard-page .sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

.dashboard-file-icon{
  display:grid;
  place-items:center;
  width:32px;
  height:36px;
  border:1px solid #f0d2d8;
  border-radius:7px;
  color:var(--pwg-red);
  background:#fff5f6;
  font-weight:900;
}

.dashboard-section-heading{
  margin:28px 0 13px;
}

.dashboard-quick-links{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:14px;
}

.dashboard-quick-link{
  display:flex;
  min-height:132px;
  padding:20px;
  flex-direction:column;
  align-items:flex-start;
  color:var(--pwg-black)!important;
  text-decoration:none;
  transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease;
}

.dashboard-quick-link:hover{
  transform:translateY(-2px);
  border-color:#d2d2d2;
  box-shadow:0 9px 22px rgba(17,17,17,.065);
}

.dashboard-quick-link-icon{
  display:grid;
  place-items:center;
  width:40px;
  height:40px;
  margin-bottom:14px;
  border:1px solid #f0d2d8;
  border-radius:10px;
  color:var(--pwg-red);
  background:#fff5f6;
  font-weight:900;
}

.dashboard-quick-link strong,
.dashboard-quick-link span{display:block}

.dashboard-quick-link span:last-child{
  margin-top:3px;
  color:var(--pwg-gray-600);
  font-size:12px;
}

@media(max-width:1250px){
  .dashboard-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}
  .dashboard-operations{grid-template-columns:minmax(0,1.5fr) minmax(280px,1fr)}
  .dashboard-quick-links{grid-template-columns:repeat(3,minmax(0,1fr))}
}

@media(max-width:900px){
  .dashboard-operations{grid-template-columns:1fr}
}

@media(max-width:680px){
  .dashboard-hero{min-height:0;padding:28px 22px}
  .dashboard-hero-actions{display:grid}
  .dashboard-hero-actions .btn{width:100%;justify-content:center}
  .dashboard-kpis{grid-template-columns:1fr}
  .dashboard-activity-item{grid-template-columns:38px minmax(0,1fr)}
  .dashboard-activity-date{grid-column:2}
  .dashboard-quick-links{grid-template-columns:1fr}
}

/* SPRINT 16.2 — ADMIN SHELL AND DASHBOARD REBUILD */
body:has(> .layout:not(.client-layout)){
  background:var(--pwg-gray-100);
}

body:has(> .layout:not(.client-layout)) > .topbar{
  position:sticky;
  z-index:40;
  top:0;
  min-height:70px;
  margin-left:220px;
  padding:12px 28px;
  color:var(--pwg-black);
  background:#ffffff;
  border-bottom:1px solid var(--pwg-gray-200);
  box-shadow:none;
}

body:has(> .layout:not(.client-layout)) > .topbar .topbar-left,
body:has(> .layout:not(.client-layout)) > .topbar .topbar-right{
  display:flex;
  align-items:center;
}

body:has(> .layout:not(.client-layout)) > .topbar .menu-toggle{
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  color:var(--pwg-black);
  background:#ffffff;
  border:1px solid var(--pwg-gray-200);
  border-radius:10px;
  font-size:18px;
}

.topbar-title{
  color:var(--pwg-black);
  font-size:14px;
  font-weight:800;
}

body:has(> .layout:not(.client-layout)) > .topbar .notify-link{
  color:var(--pwg-black);
  background:#ffffff;
  border-color:var(--pwg-gray-200);
}

body:has(> .layout:not(.client-layout)) > .topbar .notify-link:hover{
  color:var(--pwg-red);
  background:var(--pwg-gray-50);
}

body:has(> .layout:not(.client-layout)) > .topbar .topbar-user{
  color:var(--pwg-black);
}

body:has(> .layout:not(.client-layout)) > .topbar .topbar-user-mark{
  color:#ffffff;
  background:var(--pwg-red);
}

body:has(> .layout:not(.client-layout)) > .topbar .topbar-menu{
  color:var(--pwg-gray-600)!important;
  border-left-color:var(--pwg-gray-200);
}

body:has(> .layout:not(.client-layout)) > .topbar .topbar-menu:hover{
  color:var(--pwg-red)!important;
}

.layout:not(.client-layout){
  display:block;
  min-height:calc(100vh - 70px);
  background:var(--pwg-gray-100);
}

.layout:not(.client-layout) > .side{
  position:fixed;
  z-index:50;
  inset:0 auto 0 0;
  display:flex;
  width:220px;
  padding:0 14px 20px;
  flex-direction:column;
  overflow-y:auto;
  color:#ffffff;
  background:#181818;
  border-right:0;
}

.side .side-brand{
  display:flex;
  min-height:70px;
  margin:0 -2px 12px;
  padding:14px 12px;
  border:0;
  border-bottom:1px solid #303030;
  border-radius:0;
  background:transparent;
}

.side .side-brand:hover{
  background:transparent;
  border-left-color:transparent;
}

.side-brand img{
  display:block;
  width:100%;
  max-width:175px;
  height:auto;
  max-height:none;
  object-fit:contain;
  filter:none;
  opacity:1;
}

.side-navigation{flex:1}

.client-identity{display:inline-grid;flex:0 0 auto;width:38px;height:38px;overflow:hidden;place-items:center;border:1px solid #ffe000;border-radius:50%;background:#111;color:#ffe000;font-size:12px;font-weight:950;line-height:1}.client-identity img{display:block;width:100%;height:100%;object-fit:cover}.client-identity-small{width:28px;height:28px;border-radius:50%;font-size:9px}.client-identity-large{width:64px;height:64px;border-radius:50%;font-size:18px}.topbar-user{display:inline-flex;align-items:center;gap:8px}.client-detail-title,.client-profile-identity{display:flex;align-items:center;gap:14px}.client-detail-title h1,.client-profile-identity h2{margin:0}

.side .nav-group{margin-top:20px}

.side .nav-group-label{
  margin:0 12px 8px;
  color:#777777;
}

.side-navigation > a,
.side .nav-group a{
  min-height:40px;
  margin-bottom:3px;
  padding:8px 10px;
  color:#c7c7c7;
  background:transparent;
  border-left:3px solid transparent;
  border-radius:8px;
}

.side-navigation > a:hover,
.side .nav-group a:hover{
  color:#ffffff;
  background:#242424;
  border-left-color:#555555;
}

.side-navigation > a.active,
.side .nav-group a.active{
  color:#ffffff;
  background:#242424;
  border-left-color:var(--pwg-red);
}

.side-navigation > a .nav-ico,
.side .nav-group a .nav-ico,
.side-navigation > a:hover .nav-ico,
.side .nav-group a:hover .nav-ico,
.side-navigation > a.active .nav-ico,
.side .nav-group a.active .nav-ico{
  color:#b7b7b7;
  background:transparent;
  border-color:transparent;
}

.side-navigation > a.active .nav-ico,
.side .nav-group a.active .nav-ico{color:var(--pwg-red)}

.side-footer{
  display:grid;
  gap:2px;
  margin:20px 10px 0;
  padding-top:16px;
  border-top:1px solid #303030;
}

.side-footer strong{font-size:12px}
.side-footer span{
  color:#777777;
  font-size:10px;
}

.layout:not(.client-layout) > .main{
  min-width:0;
  margin-left:220px;
  padding:28px;
  background:var(--pwg-gray-100);
}

.dashboard-page{max-width:1720px}

.dashboard-page .card{
  border-top:1px solid var(--pwg-gray-200);
  border-radius:13px;
  box-shadow:0 4px 16px rgba(17,17,17,.04);
}

.dashboard-hero{
  display:grid;
  grid-template-columns:minmax(0,1.45fr) minmax(280px,.75fr);
  min-height:230px;
  margin-bottom:20px;
  padding:30px 38px;
  border-left:1px solid var(--pwg-gray-200);
}

.dashboard-eyebrow{
  margin:0 0 9px!important;
  color:var(--pwg-red)!important;
  font-size:13px!important;
  font-weight:850;
}

.dashboard-hero h1{
  max-width:720px;
  font-size:clamp(30px,3vw,42px);
}

.dashboard-hero-content > p:not(.dashboard-eyebrow){
  max-width:650px;
  margin:10px 0 20px;
  font-size:14px;
}

.dashboard-illustration{
  display:flex;
  align-items:center;
  justify-content:center;
}

.dashboard-illustration svg{
  display:block;
  width:min(100%,360px);
  height:auto;
}

.dashboard-kpis{
  gap:10px;
  margin-bottom:18px;
}

.dashboard-kpi{
  display:flex;
  min-height:132px;
  padding:16px;
  gap:12px;
  align-items:flex-start;
}

.dashboard-kpi-icon{
  flex:0 0 38px;
  width:38px;
  height:38px;
  border-radius:50%;
}

.dashboard-kpi-icon-warning{
  color:#bf6a00;
  background:#fff7e8;
  border-color:#f0dec0;
}

.dashboard-kpi-icon-muted{
  color:#777777;
  background:#f3f3f3;
  border-color:#dddddd;
}

.dashboard-kpi-copy{
  display:block;
  min-width:0;
}

.dashboard-kpi-copy strong,
.dashboard-kpi-copy b,
.dashboard-kpi-copy small{
  display:block;
}

.dashboard-kpi-copy strong{
  margin-bottom:8px;
  font-size:29px;
  line-height:1;
}

.dashboard-kpi-copy b{
  color:var(--pwg-black);
  font-size:12px;
  line-height:1.25;
}

.dashboard-kpi-copy small{
  margin-top:3px;
  color:var(--pwg-gray-600);
  font-size:10px;
  line-height:1.3;
}

.dashboard-main-grid{
  display:grid;
  grid-template-columns:minmax(260px,.85fr) minmax(260px,.85fr) minmax(480px,1.6fr);
  gap:16px;
  align-items:start;
}

.dashboard-main-grid .dashboard-section{padding:19px}

.dashboard-main-grid .card-head{
  min-height:26px;
  margin-bottom:12px;
}

.dashboard-main-grid .card-head h2{font-size:16px}

.dashboard-activity:before{display:none}

.dashboard-activity-item{
  grid-template-columns:32px minmax(0,1fr);
  gap:10px;
  padding:9px 0;
  border-bottom:1px solid var(--pwg-gray-200);
  border-radius:0;
}

.dashboard-activity-item:last-child{border-bottom:0}
.dashboard-activity-item:hover{background:transparent}

.dashboard-activity-icon{
  width:32px;
  height:32px;
}

.dashboard-activity-content strong{font-size:12px}
.dashboard-activity-content span{font-size:10px}

.dashboard-activity-date{
  grid-column:2;
  margin-top:-2px;
  font-size:10px;
}

.dashboard-share-bars{
  display:grid;
  gap:19px;
  padding:8px 0 4px;
}

.dashboard-share-bar > div{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-bottom:7px;
  font-size:12px;
}

.dashboard-share-bar progress{
  display:block;
  width:100%;
  height:8px;
  overflow:hidden;
  border:0;
  border-radius:999px;
  background:#eeeeee;
}

.dashboard-share-bar progress::-webkit-progress-bar{
  background:#eeeeee;
  border-radius:999px;
}

.dashboard-share-bar progress::-webkit-progress-value{
  border-radius:999px;
  background:var(--share-bar-color);
}

.dashboard-share-bar progress::-moz-progress-bar{
  border-radius:999px;
  background:var(--share-bar-color);
}

.dashboard-share-bar.is-active{--share-bar-color:var(--pwg-red)}
.dashboard-share-bar.is-expiring{--share-bar-color:#d98212}
.dashboard-share-bar.is-expired{--share-bar-color:#9a9a9a}

.dashboard-table{
  min-width:620px;
  font-size:11px;
}

.dashboard-page .dashboard-table th,
.dashboard-page .dashboard-table td{
  padding:9px 7px;
}

.dashboard-document{
  display:flex;
  min-width:130px;
  gap:8px;
  align-items:center;
}

.dashboard-file-icon{
  flex:0 0 28px;
  width:28px;
  height:31px;
  font-size:11px;
}

.dashboard-row-action{
  display:grid;
  place-items:center;
  width:29px;
  height:29px;
  color:var(--pwg-gray-600)!important;
  border-radius:8px;
  letter-spacing:1px;
}

.dashboard-row-action:hover{background:var(--pwg-gray-100)}

.dashboard-clients-card{grid-column:1}
.dashboard-links-card{grid-column:2 / 4}

.dashboard-client-item{
  grid-template-columns:34px minmax(0,1fr) auto;
  padding:8px 0;
}

.dashboard-client-avatar{
  width:34px;
  height:34px;
}

.dashboard-client-copy{min-width:0}
.dashboard-client-copy strong{font-size:12px}

.dashboard-client-status{
  padding:4px 7px;
  color:#666666;
  background:#eeeeee;
  border-radius:999px;
  font-size:9px;
  font-weight:800;
}

.dashboard-client-status.is-active{
  color:#9f0d25;
  background:#fdecef;
}

.dashboard-links-card .dashboard-quick-links{
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:9px;
}

.dashboard-links-card .dashboard-quick-link{
  display:flex;
  min-height:100px;
  padding:13px;
  flex-direction:column;
  border:1px solid var(--pwg-gray-200);
  border-radius:10px;
  background:var(--pwg-gray-50);
}

.dashboard-links-card .dashboard-quick-link-icon{
  width:34px;
  height:34px;
  margin-bottom:10px;
}

.dashboard-links-card .dashboard-quick-link strong,
.dashboard-links-card .dashboard-quick-link small{
  display:block;
}

.dashboard-links-card .dashboard-quick-link strong{
  font-size:11px;
  line-height:1.25;
}

.dashboard-links-card .dashboard-quick-link small{
  margin-top:3px;
  color:var(--pwg-gray-600);
  font-size:9px;
  line-height:1.3;
}

@media(max-width:1250px){
  .dashboard-main-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .dashboard-documents-card,
  .dashboard-links-card{grid-column:1 / 3}
  .dashboard-clients-card{grid-column:auto}
}

@media(max-width:900px){
  body:has(> .layout:not(.client-layout)) > .topbar{margin-left:0}
  .layout:not(.client-layout) > .main{margin-left:0}
  .layout:not(.client-layout) > .side{
    transform:translateX(-100%);
    transition:transform .2s ease;
  }
  body.nav-open .layout:not(.client-layout) > .side{
    transform:translateX(0);
  }
  .dashboard-hero{
    grid-template-columns:minmax(0,1fr) minmax(220px,.65fr);
  }
}

@media(max-width:680px){
  .topbar-title{display:none}
  .dashboard-hero{display:block}
  .dashboard-illustration{display:none}
  .dashboard-main-grid{grid-template-columns:1fr}
  .dashboard-documents-card,
  .dashboard-clients-card,
  .dashboard-links-card{grid-column:auto}
  .dashboard-links-card .dashboard-quick-links{grid-template-columns:1fr}
}

/* SPRINT 16.3 — COMPONENT POLISH */
.topbar{
  padding-right:22px;
  padding-left:22px;
}

.topbar-right{gap:8px}
.topbar-user{margin-left:2px}
.topbar-menu{display:flex;gap:5px;align-items:center;margin-left:0;padding-left:12px}
.topbar-menu svg,
.notify-link svg{
  width:16px;
  height:16px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.side .side-brand{margin-bottom:10px}
.side-brand img{max-width:175px;max-height:none}
.side .nav-group{margin-top:13px}
.side .nav-group-label{margin-bottom:5px}

.side-navigation > a,
.side .nav-group a{
  margin-bottom:2px;
  border-left-width:2px;
  font-size:13px;
  transition:color .16s ease,background-color .16s ease,border-color .16s ease;
}

.side-navigation .nav-ico{
  display:grid;
  flex:0 0 22px;
  width:22px;
  place-items:center;
}

.side-navigation .nav-ico svg{
  width:15px;
  height:15px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.dashboard-hero{grid-template-columns:minmax(0,1.4fr) minmax(300px,.72fr);column-gap:16px}
.dashboard-illustration svg{width:min(110%,396px)}
.dashboard-hero-actions .primary,
.dashboard-hero-actions .secondary{min-height:42px}

.dashboard-kpi{min-height:122px;padding:16px}
.dashboard-kpi-icon{flex-basis:42px;width:42px;height:42px}
.dashboard-kpi-icon svg{
  width:22px;
  height:22px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.dashboard-kpi-copy strong{font-size:32px}
.dashboard-kpi-copy b{color:#242424;font-size:13px}
.dashboard-kpi-copy small{color:#666;font-size:11px}

.dashboard-activity-icon svg,
.dashboard-file-icon svg{
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.dashboard-section,
.filter-card,
.search-card,
.share-panel{
  border-color:#e5e5e5;
  border-top-color:#e5e5e5;
  border-radius:12px;
  box-shadow:0 3px 12px rgba(17,17,17,.035);
}

.dashboard-section,
.filter-card,
.search-card{padding:18px}

.dashboard-main-grid .card-head{min-height:28px;margin-bottom:10px}

.dashboard-table-wrap,
.shares-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}

.dashboard-table th,
.shares-table-wrap th{
  padding:9px 10px;
  color:#5c5c5c;
  background:#fafafa;
  font-size:11px;
  font-weight:700;
}

.dashboard-table td,
.shares-table-wrap td{padding:9px 10px}

.dashboard-client-status,
.folder-badge,
.shares-table-wrap .badge{padding:3px 7px;font-size:9px}

.dashboard-row-action,
.share-row-actions .small-btn,
.archive-row-actions .small-btn{min-width:28px;min-height:28px;padding:4px 7px}

.filter-card .field input,
.filter-card .field select,
.search-form input,
.search-form select,
.shares-filters input,
.shares-filters select,
.archive-quick-band input,
.archive-quick-band select{min-height:40px;padding-right:12px;padding-left:12px}

.filter-card .field label,
.search-form label,
.shares-filters label{font-size:13px}

.dashboard-links-card .dashboard-quick-link{
  transition:border-color .18s ease,background-color .18s ease,box-shadow .18s ease,transform .18s ease;
}
.dashboard-links-card .dashboard-quick-link:hover{
  transform:translateY(-1px);
  border-color:#d7d7d7;
  background:#fff;
  box-shadow:0 7px 18px rgba(17,17,17,.05);
}
.dashboard-links-card .dashboard-quick-link-icon svg{
  width:21px;
  height:21px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.dashboard-links-card .dashboard-quick-link strong{font-size:14px}
.dashboard-links-card .dashboard-quick-link small{font-size:12px}

/* KAIDESK BRAND PALETTE: PWG structure, original yellow accent. */
.side a.active,
.main .btn,
.main .btn.primary,
.main .badge,
.main .share-status-active,
.main .view-toggle-left button.active,
.main .view-toggle-left button[aria-pressed="true"],
.main .btn.secondary,
.main .badge.warning,
.main .folder-badge{
  color:#111111 !important;
}

.side-navigation > a.active,
.side .nav-group a.active{
  color:#111111 !important;
  background:var(--pwg-red) !important;
  border-left-color:var(--pwg-red) !important;
}

.side-navigation > a.active .nav-ico,
.side .nav-group a.active .nav-ico{
  color:#111111 !important;
}

.bulk-selection-count{
  color:#666;
  font-size:13px;
  font-weight:700;
}

.archive-row.is-selected,
.file-card.is-selected{
  outline:2px solid var(--pwg-red);
  outline-offset:1px;
}

.admin-file-upload-progress[hidden]{display:none!important}
.admin-file-upload-progress{
  position:fixed;
  z-index:10001;
  left:50%;
  bottom:28px;
  width:min(580px,calc(100vw - 32px));
  transform:translateX(-50%);
  padding:20px;
  color:#fff;
  background:#111;
  border:2px solid #ffe000;
  border-radius:16px;
  box-shadow:0 24px 70px rgba(0,0,0,.42);
}
.admin-file-upload-progress-title{margin-bottom:5px;font-size:20px;font-weight:900}
.admin-file-upload-progress-text{margin-bottom:14px;color:#ddd}
.admin-file-upload-progress-track{height:16px;overflow:hidden;background:#333;border-radius:999px}
.admin-file-upload-progress-track span{display:block;width:0;height:100%;background:#ffe000;border-radius:999px;transition:width .12s linear}
.admin-file-upload-progress-meta{display:flex;justify-content:space-between;gap:15px;margin-top:10px;align-items:center}
.admin-file-upload-progress-meta strong{color:#ffe000;font-size:27px}
.admin-file-upload-progress-meta span{color:#ddd;font-weight:700}
.admin-file-upload-progress small{display:block;margin-top:8px;color:#aaa}
body.admin-file-uploading::after{content:"";position:fixed;z-index:10000;inset:0;background:rgba(0,0,0,.38)}

/* Selettore globale con ricerca e autocompletamento. */
.kp-client-combobox{position:relative;width:100%}.kp-client-native-select{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;white-space:nowrap!important;opacity:0!important;pointer-events:none!important}.kp-client-combobox-input{width:100%;padding-right:42px!important;background:#fff!important}.kp-client-combobox-input:focus{border-color:#ffe000!important;box-shadow:0 0 0 3px rgba(255,224,0,.16);outline:none}.kp-client-combobox-toggle{position:absolute;z-index:2;top:50%;right:5px;width:34px;height:34px;padding:0;transform:translateY(-50%);border:0;border-radius:9px;background:#111;color:#ffe000;font-size:19px;font-weight:900;cursor:pointer}.kp-client-combobox-menu{position:absolute;z-index:500;top:calc(100% + 6px);left:0;right:0;max-height:280px;overflow:auto;padding:6px;border:1px solid #ddd;border-top:3px solid #ffe000;border-radius:12px;background:#fff;box-shadow:0 18px 45px rgba(0,0,0,.18)}.kp-client-combobox-menu[hidden]{display:none!important}.kp-client-combobox-option{display:block;width:100%;padding:10px 11px;border:0;border-radius:8px;background:#fff;color:#111;text-align:left;font:inherit;font-weight:750;cursor:pointer}.kp-client-combobox-option:hover,.kp-client-combobox-option.is-active{background:#111;color:#ffe000}.kp-client-combobox-empty{padding:12px;color:#777;font-size:13px;text-align:center}

.view-toggle-right .kp-search-combobox,.client-sort-clean .kp-search-combobox{width:230px;min-width:190px}.view-toggle-right .kp-client-combobox-input,.client-sort-clean .kp-client-combobox-input{min-height:40px;height:40px;padding:8px 42px 8px 12px!important;border:1px solid #ddd!important;border-radius:12px!important;color:#151515!important;font-size:13px;font-weight:750}.view-toggle-right .kp-client-combobox-toggle,.client-sort-clean .kp-client-combobox-toggle{width:32px;height:32px;right:4px;border-radius:9px}.view-toggle-right .kp-client-combobox-menu,.client-sort-clean .kp-client-combobox-menu{min-width:230px;left:auto}.view-toggle-right .kp-client-combobox-menu{right:0}@media(max-width:600px){.view-toggle-right .kp-search-combobox,.client-sort-clean .kp-search-combobox{width:100%;min-width:0}.view-toggle-right,.client-sort-clean{width:100%}}

.admin-folder-browser{margin:18px 0}
.admin-folder-browser-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.admin-folder-browser-head h3,.admin-folder-browser-head p{margin:0}.admin-folder-browser-head p{margin-top:4px;color:#777}
.admin-folder-breadcrumbs{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:16px 0 12px;font-size:13px;font-weight:800}
.admin-folder-breadcrumbs a{color:#111!important;text-decoration:none}.admin-folder-breadcrumbs span{color:#999}
.admin-folder-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:10px}
.admin-folder-entry{display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:11px;padding:13px;color:#111!important;background:#fafafa;border:1px solid #e5e5e5;border-radius:12px;text-decoration:none!important}
.admin-folder-entry:hover{background:#fff;border-color:#ffe000;box-shadow:0 7px 18px rgba(17,17,17,.06)}
.admin-folder-entry-icon{display:grid;width:44px;height:44px;place-items:center;color:#111;background:#ffe000;border-radius:11px}
.admin-folder-entry strong,.admin-folder-entry small{display:block}.admin-folder-entry small{margin-top:3px;color:#777;font-size:12px;font-weight:600}.admin-folder-entry b{font-size:20px}

.client-archive-shell .client-folder-tabs a.active,
.client-archive-shell .client-folder-tabs a.active:hover,
.client-archive-shell .client-folder-tabs a.active:focus,
.client-archive-shell .client-view-buttons button.active,
.client-archive-shell .client-view-buttons button:hover{
  color:#111!important;
}
.client-archive-shell .client-folder-tabs a.active svg,
.client-archive-shell .client-view-buttons button.active svg,
.client-archive-shell .client-view-buttons button:hover svg{stroke:#111!important}
.client-archive-shell .stat-card .stat-ico,.client-archive-shell .stat-card .stat-ico svg{color:#111!important;stroke:#111!important}
.client-archive-shell .client-file-ext{color:#111!important}
.client-archive-shell .client-folder-entry:hover{border-color:#ffe000!important}
.client-archive-shell .client-folder-entry-icon{color:#111!important;background:#fff7b3!important}
.client-archive-shell .client-folder-entry-action{color:#7a6a00!important}

@media(max-width:700px){.admin-folder-browser-head{display:block}.admin-folder-browser-head .btn{margin-top:12px}.admin-folder-grid{grid-template-columns:1fr}}

/* KAIDESK BUTTON CONTRAST
   Azioni normali: giallo/nero. Stato attivo o hover: nero/bianco. */
.main .btn,
.main .btn.primary,
.main .btn.secondary{
  color:#111111 !important;
  background:#ffe000 !important;
  border-color:#ffe000 !important;
}

.main .btn:hover,
.main .btn.primary:hover,
.main .btn.secondary:hover,
.main .btn:focus-visible,
.main .btn.primary:focus-visible,
.main .btn.secondary:focus-visible{
  color:#ffffff !important;
  background:#111111 !important;
  border-color:#111111 !important;
}

.client-archive-shell .client-folder-tabs a{
  color:#111111 !important;
  background:#ffe000 !important;
  border-color:#ffe000 !important;
}

.client-archive-shell .client-folder-tabs a.active,
.client-archive-shell .client-folder-tabs a.active:hover,
.client-archive-shell .client-folder-tabs a.active:focus{
  color:#ffe000 !important;
  background:#111111 !important;
  border-color:#111111 !important;
}

.client-archive-shell .client-folder-tabs a:not(.active):hover,
.client-archive-shell .client-folder-tabs a:not(.active):focus-visible{
  color:#ffffff !important;
  background:#111111 !important;
  border-color:#111111 !important;
}

.client-archive-shell .client-folder-tabs a.active svg{
  color:#ffe000 !important;
  stroke:#ffe000 !important;
}

.client-archive-shell .client-folder-tabs a:not(.active):hover svg,
.client-archive-shell .client-folder-tabs a:not(.active):focus-visible svg{
  color:#ffffff !important;
  stroke:#ffffff !important;
}

.client-archive-shell .client-view-buttons button,
.main .view-toggle-left button{
  color:#111111 !important;
  background:#ffe000 !important;
  border-color:#ffe000 !important;
}

.client-archive-shell .client-view-buttons button.active,
.main .view-toggle-left button.active,
.main .view-toggle-left button[aria-pressed="true"]{
  color:#ffe000 !important;
  background:#111111 !important;
  border-color:#111111 !important;
}

.client-archive-shell .client-view-buttons button:not(.active):hover,
.client-archive-shell .client-view-buttons button:not(.active):focus-visible,
.main .view-toggle-left button:not(.active):not([aria-pressed="true"]):hover,
.main .view-toggle-left button:not(.active):not([aria-pressed="true"]):focus-visible{
  color:#ffffff !important;
  background:#111111 !important;
  border-color:#111111 !important;
}

.client-archive-shell .client-view-buttons button.active svg,
.main .view-toggle-left button.active svg,
.main .view-toggle-left button[aria-pressed="true"] svg{
  color:#ffe000 !important;
  stroke:#ffe000 !important;
}

.client-archive-shell .client-view-buttons button:not(.active):hover svg,
.client-archive-shell .client-view-buttons button:not(.active):focus-visible svg,
.main .view-toggle-left button:not(.active):not([aria-pressed="true"]):hover svg,
.main .view-toggle-left button:not(.active):not([aria-pressed="true"]):focus-visible svg{
  color:#ffffff !important;
  stroke:#ffffff !important;
}

/* Palette unificata degli stati delle lavorazioni grafiche */
.graphic-status,.work-status{border:1px solid transparent!important;color:#111!important;text-shadow:none!important}
.graphic-status.draft,.work-status.draft{border-color:#a7a7a7!important;background:#f1f1f1!important;color:#555!important}
.graphic-status.in_review,.work-status.in_review,.graphic-status.pending,.work-status.pending{border-color:#e3c400!important;background:#fff7b8!important;color:#5c5000!important}
.graphic-status.changes_requested,.work-status.changes_requested{border-color:#df6b3d!important;background:#fff0e9!important;color:#9a3218!important}
.graphic-status.approved,.work-status.approved{border-color:#27925a!important;background:#e8f7ef!important;color:#17683e!important}
.graphic-status.in_production,.work-status.in_production{border-color:#3478bf!important;background:#eaf4ff!important;color:#205c99!important}
.graphic-status.delivered,.work-status.delivered{border-color:#7356b6!important;background:#f0ebff!important;color:#543493!important}
.graphic-status.to_invoice,.work-status.to_invoice{border-color:#df8a20!important;background:#fff2df!important;color:#8a5007!important}
.graphic-status.invoiced,.work-status.invoiced{border-color:#167044!important;background:#dff3e9!important;color:#0e5633!important}
.graphic-status.closed,.work-status.closed{border-color:#555!important;background:#333!important;color:#fff!important}
.graphic-status.archived,.work-status.archived,.graphic-status.superseded,.work-status.superseded{border-color:#777!important;background:#e7e7e7!important;color:#555!important}
