:root{
  --topbar:#1e2b44;
  --sidebar:#f5f6f8;
  --sidebar-border:#dde3eb;
  --primary:#3164f4;
  --page-bg:linear-gradient(180deg,#f7f9fc 0%,#eef2f7 100%);
  --card-border:rgba(15,23,42,.06);
  --card-shadow:0 10px 26px rgba(15,23,42,.05);
  --radius:18px;
}
html{-webkit-text-size-adjust:100%;}
body{background:var(--page-bg);font-size:16px;line-height:1.6;color:#243041;}
a{text-decoration:none;}
.topbar{background:var(--topbar);color:#fff;border-bottom:1px solid rgba(255,255,255,.08);}
.topbar .brand{font-weight:700;letter-spacing:.02em;}
.admin-shell{display:flex;min-height:calc(100vh - 56px);}
.admin-sidebar{width:240px;flex:0 0 240px;background:var(--sidebar);border-right:1px solid var(--sidebar-border);overflow:auto;}
.admin-sidebar .section-title{font-size:.9rem;color:#778399;font-weight:700;padding:14px 16px 6px;}
.admin-sidebar .nav-link{margin:2px 10px;border-radius:12px;color:#233046;font-weight:500;}
.admin-sidebar .nav-link:hover{background:#eaf0ff;color:#2249c7;}
.admin-sidebar .nav-link.active{background:var(--primary);color:#fff;}
.admin-sidebar .nav-link.text-danger{color:#ce3149 !important;}
.admin-content{min-width:0;flex:1;}
.page-toolbar{position:sticky;top:56px;z-index:1020;background:rgba(255,255,255,.88);backdrop-filter:blur(8px);border-bottom:1px solid rgba(15,23,42,.06);}
.page-toolbar .btn{border-radius:12px;}
.content-wrap{padding:18px 20px 26px;}
.card{border-radius:var(--radius);border:1px solid var(--card-border);box-shadow:var(--card-shadow);}
.stat-card{min-height:112px;}
.stat-card .stat-value{font-size:2rem;font-weight:800;color:#172236;line-height:1.1;}
.muted-label{color:#7a859a;font-size:.95rem;}
.table-card .table th{font-size:.92rem;color:#53607a;background:#f8fafc;position:sticky;top:0;z-index:1;white-space:nowrap;}
.table-card .table td{vertical-align:middle;white-space:nowrap;}
.badge-soft{background:#eef4ff;color:#2e56d3;border:1px solid #dbe6ff;}
.file-chip{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;border:1px solid #d9e4ff;background:#f5f8ff;color:#274cc7;font-size:.85rem;font-weight:600;}
.file-chip.missing{border-color:#e6e8ee;background:#f9fafb;color:#7a859a;}
.preview-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:14px;}
.preview-grid .preview-card{border:1px solid #e7edf5;border-radius:16px;padding:12px;background:#fff;}
.preview-grid img{width:100%;height:160px;object-fit:cover;border-radius:12px;background:#f2f5f8;}
.public-shell{min-height:100vh;background:radial-gradient(1100px 500px at 8% 0%, rgba(49,100,244,.16) 0%, rgba(49,100,244,0) 62%),linear-gradient(180deg,#f7f9fc 0%,#eef2f7 100%);}
.public-topbar{background:rgba(30,43,68,.96);color:#fff;border-bottom:1px solid rgba(255,255,255,.08);}
.public-card{border-radius:22px;border:1px solid rgba(15,23,42,.06);background:rgba(255,255,255,.97);box-shadow:0 22px 40px rgba(15,23,42,.08);}
.form-section{border:1px solid #e8edf4;border-radius:18px;padding:18px;background:#fbfcfe;}
.form-section h2{font-size:1.1rem;margin-bottom:14px;}
.form-label{font-weight:600;color:#39465c;}
.form-text{color:#768399;}
.form-check-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:8px 14px;}
.availability-table th,.availability-table td{text-align:center;vertical-align:middle;}
.availability-table input{transform:scale(1.15);}
.login-page{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:32px;background:radial-gradient(900px 420px at 10% 0%, rgba(49,100,244,.18) 0%, rgba(49,100,244,0) 65%),linear-gradient(180deg,#f7f9fc 0%,#eef2f7 100%);}
.login-card{width:min(460px,100%);border-radius:22px;border:1px solid rgba(15,23,42,.08);background:rgba(255,255,255,.98);box-shadow:0 22px 44px rgba(15,23,42,.10);padding:26px;}
.table-responsive{overflow:auto;}
.sticky-actions{position:sticky;bottom:0;background:rgba(255,255,255,.95);backdrop-filter:blur(8px);padding-top:12px;}
.submit-actions-bottom{position:static;background:transparent;backdrop-filter:none;padding-top:12px;margin-top:6px;border-top:1px solid #e8edf4;}
.public-card .submit-actions-bottom{padding-bottom:4px;}
@media (max-width: 991.98px){
  .admin-shell{display:block;}
  .admin-sidebar{position:fixed;left:0;top:56px;bottom:0;z-index:1030;transform:translateX(-104%);transition:transform .18s ease;box-shadow:0 18px 40px rgba(15,23,42,.18);}
  .admin-sidebar.open{transform:translateX(0);}
  .admin-backdrop{display:none;position:fixed;inset:56px 0 0 0;background:rgba(0,0,0,.18);z-index:1025;}
  .admin-backdrop.show{display:block;}
  .content-wrap{padding:16px 14px 22px;}
}

.label-required{color:#b42318;font-weight:800;}
.required-badge,.optional-badge{display:inline-flex;align-items:center;justify-content:center;min-width:44px;padding:2px 8px;border-radius:999px;font-size:.74rem;line-height:1.3;font-weight:800;vertical-align:middle;margin-left:6px;}
.required-badge{background:#fee4e2;color:#b42318;border:1px solid #fecdca;}
.optional-badge{background:#eef2f6;color:#526074;border:1px solid #d9e2ec;}
.required-alert{background:#fff7ed;border-color:#fed7aa !important;color:#9a3412;}
.attachment-item .form-control[required],
.form-section input[required],
.form-section select[required],
.form-section textarea[required]{border-color:#f5b2aa;box-shadow:0 0 0 .08rem rgba(180,35,24,.06);}
.form-section .form-control:invalid:focus,
.form-section .form-select:invalid:focus,
.form-section textarea:invalid:focus{box-shadow:0 0 0 .2rem rgba(217,45,32,.12);border-color:#d92d20;}

.viewer-open{overflow:hidden;}
.viewer-overlay{position:fixed;inset:0;z-index:2000;display:flex;align-items:center;justify-content:center;}
.viewer-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.72);backdrop-filter:blur(2px);}
.viewer-shell{position:relative;z-index:1;width:min(1180px,calc(100vw - 32px));height:min(88vh,860px);background:#0f172a;border:1px solid rgba(255,255,255,.12);border-radius:24px;box-shadow:0 32px 60px rgba(0,0,0,.42);overflow:hidden;display:flex;flex-direction:column;}
.viewer-close{position:absolute;top:10px;right:14px;z-index:3;border:0;background:rgba(255,255,255,.14);color:#fff;border-radius:999px;width:42px;height:42px;font-size:1.8rem;line-height:1;}
.viewer-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 64px 10px 18px;color:#fff;min-height:60px;}
.viewer-title{font-weight:700;max-width:min(70vw,760px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.viewer-counter{font-size:.92rem;color:rgba(255,255,255,.74);}
.viewer-toolbar{padding:0 18px 12px;display:flex;gap:8px;flex-wrap:wrap;}
.viewer-stage{position:relative;flex:1;display:flex;align-items:center;justify-content:center;padding:12px 18px 18px;min-height:0;overflow:hidden;}
.viewer-content{position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:100%;overflow:hidden;}
.viewer-image{max-width:100%;max-height:100%;touch-action:none;user-select:none;cursor:grab;transform-origin:center center;will-change:transform;}
.viewer-image:active{cursor:grabbing;}
.viewer-frame{width:100%;height:100%;border:0;border-radius:16px;background:#fff;}
.viewer-fallback{display:flex;align-items:center;justify-content:center;width:min(520px,100%);min-height:220px;padding:28px;border-radius:18px;background:#fff;text-align:center;}
.viewer-nav{position:absolute;top:50%;transform:translateY(-50%);z-index:2;border:0;width:52px;height:52px;border-radius:999px;background:rgba(255,255,255,.14);color:#fff;font-size:2rem;line-height:1;display:flex;align-items:center;justify-content:center;}
.viewer-nav:disabled{opacity:.35;cursor:not-allowed;}
.viewer-prev{left:14px;}
.viewer-next{right:14px;}
@media (max-width: 768px){
  .viewer-shell{width:calc(100vw - 14px);height:min(92vh,92vh);border-radius:18px;}
  .viewer-header{padding-right:54px;}
  .viewer-toolbar{padding-right:14px;}
  .viewer-nav{width:42px;height:42px;font-size:1.7rem;}
  .viewer-prev{left:8px;}
  .viewer-next{right:8px;}
}

.review-badge-xl{display:inline-flex;align-items:center;gap:8px;padding:10px 16px;border-radius:999px;font-size:1rem;font-weight:800;}
.status-banner{border-radius:18px;padding:14px 18px;border:1px solid transparent;margin-bottom:18px;}
.status-banner strong{display:block;font-size:1.05rem;margin-bottom:4px;}
.status-banner-success{background:#ecfdf3;border-color:#abefc6;color:#067647;}
.status-banner-warning{background:#fff7ed;border-color:#fed7aa;color:#9a3412;}
.status-banner-info{background:#eff8ff;border-color:#b2ddff;color:#175cd3;}
.status-banner-danger{background:#fef3f2;border-color:#fecdca;color:#b42318;}
.status-banner-muted{background:#f8fafc;border-color:#e2e8f0;color:#475467;}
.row-review-done td{background:#f1fcf5 !important;}
.row-needs-supplement td{background:#fff7ed !important;}
.row-resubmitted td{background:#eef7ff !important;}
.row-review-rejected td{background:#fef2f2 !important;}
.bulk-action-bar{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-bottom:12px;}
.bulk-action-bar .form-check{margin-bottom:0;}
.rich-editor{border:1px solid #dbe4f0;border-radius:16px;background:#fff;overflow:hidden;}
.rich-editor-toolbar{display:flex;flex-wrap:wrap;gap:8px;padding:10px;border-bottom:1px solid #e7edf5;background:#f8fafc;}
.rich-editor-toolbar .btn,.rich-editor-toolbar select,.rich-editor-toolbar input[type=color]{border-radius:10px;}
.rich-editor-visual,.rich-editor-source{min-height:240px;padding:14px;border:0;outline:none;width:100%;background:#fff;}
.rich-editor-source{font-family:ui-monospace,SFMono-Regular,monospace;display:none;resize:vertical;min-height:240px;}
.rich-editor.source-mode .rich-editor-source{display:block;}
.rich-editor.source-mode .rich-editor-visual{display:none;}
.rich-editor-visual p{margin-bottom:.75rem;}
.mail-tabs .nav-link{border-radius:999px;padding:.55rem 1rem;font-weight:700;color:#475467;}
.mail-tabs .nav-link.active{background:#1d4ed8;color:#fff;}
.timeline{position:relative;padding-left:20px;}
.timeline:before{content:'';position:absolute;left:7px;top:8px;bottom:8px;width:2px;background:#dbe4f0;}
.timeline-item{position:relative;padding-left:18px;margin-bottom:14px;}
.timeline-item:before{content:'';position:absolute;left:-1px;top:7px;width:10px;height:10px;border-radius:999px;background:#2563eb;box-shadow:0 0 0 4px #eaf1ff;}
.timeline-card{border:1px solid #e7edf5;border-radius:14px;background:#fff;padding:12px 14px;}
.sync-log-list{display:flex;flex-direction:column;gap:10px;}
.sync-log-item{display:flex;gap:12px;align-items:flex-start;border:1px solid #e7edf5;border-radius:14px;background:#fff;padding:12px 14px;}
.sync-log-time{width:120px;flex:0 0 120px;color:#667085;font-size:.88rem;line-height:1.35;}
.sync-log-body{min-width:0;flex:1;}
.sync-log-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;}
.muted-block{color:#667085;font-size:.92rem;}
.mailer-recipient-box{max-height:180px;overflow:auto;border:1px solid #e7edf5;border-radius:14px;padding:10px 12px;background:#fff;}

/* v3.3 UI refresh */
body{min-height:100vh;overflow-x:hidden;}
.topbar{position:sticky;top:0;z-index:1040;}
.admin-shell{display:flex;min-height:calc(100vh - 72px);}
.admin-shell.sidebar-collapsed .admin-sidebar{width:0;flex-basis:0;overflow:hidden;border-right:none;}
.admin-shell.sidebar-collapsed .admin-sidebar *{opacity:0;pointer-events:none;}
.admin-shell.sidebar-collapsed .admin-content{width:100%;}
.admin-sidebar{position:sticky;top:72px;height:calc(100vh - 72px);transition:width .18s ease, flex-basis .18s ease;}
.admin-content{display:flex;flex-direction:column;min-width:0;}
.content-wrap{flex:1;}
.sidebar-pin-toggle{border-radius:14px;font-weight:700;}
.admin-user-toggle{display:inline-flex;align-items:center;gap:.65rem;padding:.35rem .6rem;border:0;background:transparent;color:#fff;font-weight:700;}
.admin-user-toggle:hover,.admin-user-toggle:focus{background:rgba(255,255,255,.08);color:#fff;}
.admin-avatar,.public-user-avatar{width:34px;height:34px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#8bb3ff,#4e77ff);color:#fff;font-weight:800;box-shadow:0 6px 14px rgba(49,100,244,.28);}
.admin-user-menu{min-width:220px;border-radius:16px;border:1px solid rgba(15,23,42,.08);}
.public-topbar{position:sticky;top:0;z-index:1030;}
.public-topbar-right .small{max-width:420px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.public-login-btn{min-width:72px;border-radius:14px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;}
.form-control,.form-select,.form-check-input{border:1.4px solid #cfd8e4;box-shadow:none;background:#fff;}
.form-control:focus,.form-select:focus{border-color:#4d78ff;box-shadow:0 0 0 .18rem rgba(49,100,244,.14);}
.mail-panel .form-control,.mail-panel .form-select{border-width:1.5px;}
.mail-panel .form-label{font-weight:700;color:#334155;}
.mail-panel .tab-content{padding-top:.25rem;}
.rich-editor{border:1.5px solid #cfd8e4;border-radius:16px;overflow:hidden;background:#fff;}
.rich-editor-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:10px 12px;border-bottom:1px solid #e7edf5;background:#f8fafc;position:sticky;top:0;z-index:2;}
.rich-editor-toolbar .btn{padding:.35rem .52rem;border-radius:10px;border-color:#d4dce8;background:#fff;line-height:1.1;min-width:36px;}
.rich-editor-toolbar .btn-outline-dark{background:#111827;color:#fff;border-color:#111827;}
.rich-editor-toolbar .form-select,.rich-editor-toolbar input[type=color]{height:36px;min-width:44px;border-radius:10px;}
.rich-editor-visual{min-height:220px;padding:14px 16px;outline:none;}
.rich-editor-source{display:none;border:0;min-height:220px;width:100%;padding:14px 16px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;}
.rich-editor.source-mode .rich-editor-source{display:block;}
.rich-editor.source-mode .rich-editor-visual{display:none;}
.bulk-action-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:-6px 0 12px;}
.bulk-action-controls{display:flex;align-items:center;gap:12px;flex-wrap:wrap;}
.bulk-select-area,.row-check-col,.row-check{display:none;}
.bulk-mode .bulk-select-area,.bulk-mode .row-check-col,.bulk-mode .row-check{display:inline-flex;}
.bulk-mode .row-check-col{display:table-cell;width:44px;}
.bulk-mode .row-check{display:inline-block;}
.bulk-mode .row-check-cell{display:table-cell;}
.table-card.fill-space{min-height:420px;}
.mail-history-card,.log-list-card{min-height:420px;}
.mail-history-list .mail-history-item,.sync-log-item,.timeline-card{border:1px solid #e7edf5;border-radius:14px;padding:12px 14px;background:#fff;}
.mail-history-list,.sync-log-list,.timeline{display:grid;gap:10px;}
.timeline-item{position:relative;padding-left:18px;}
.timeline-item:before{content:'';position:absolute;left:0;top:18px;bottom:-18px;width:2px;background:#dbe4f6;}
.timeline-item:after{content:'';position:absolute;left:-5px;top:16px;width:12px;height:12px;border-radius:50%;background:#3164f4;box-shadow:0 0 0 4px #eef4ff;}
.timeline-item:last-child:before{display:none;}
.sync-log-item,.mail-history-item{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;}
.sync-log-time,.mail-history-time{min-width:120px;color:#64748b;font-size:.9rem;}
.input-outline-strong .form-control,.input-outline-strong .form-select{border:1.8px solid #b8c7db;background:#fff;}
.input-outline-strong .form-control::placeholder{color:#97a4b7;}
.login-card{min-height:560px;padding:34px 30px;display:flex;flex-direction:column;justify-content:center;}
.captcha-box{display:flex;align-items:center;gap:10px;}
.captcha-image{min-width:118px;padding:10px 16px;border-radius:12px;border:1px solid #dbe4f6;background:#f7faff;font-size:2rem;letter-spacing:.18em;font-style:italic;text-decoration:line-through;text-align:center;user-select:none;}
.top-login-btn-wrap{text-align:center;}
.fixed-card-grow{min-height:calc(100vh - 260px);}
.public-card .entry-title{border:2px solid #22c55e;border-radius:18px;padding:20px;}
.page-banner{border-radius:16px;padding:12px 14px;margin-bottom:16px;font-weight:700;}
.page-banner.review-ok{background:#ecfdf3;color:#166534;border:1px solid #bbf7d0;}
.page-banner.need-supplement{background:#fff7ed;color:#b45309;border:1px solid #fed7aa;}
.public-topbar .container,.topbar .container-fluid{max-width:none;}
.content-wrap .page-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;}
.public-home-shortcut{display:inline-flex;align-items:center;justify-content:center;min-width:92px;padding:.5rem .9rem;border-radius:14px;border:1px solid rgba(255,255,255,.35);color:#fff;font-weight:700;}
.public-home-shortcut:hover{background:rgba(255,255,255,.08);color:#fff;}
.submission-status-need-supplement{background:#fff7ed !important;}
.submission-status-reviewed{background:#f0fdf4 !important;}
.submission-status-pending{background:#f8fafc !important;}
.submission-status-rejected{background:#fef2f2 !important;}
@media (max-width:991.98px){
  .admin-sidebar{position:fixed;top:72px;height:calc(100vh - 72px);background:#f7f8fa;}
  .admin-shell.sidebar-collapsed .admin-sidebar{width:240px;flex-basis:240px;}
  .admin-user-toggle span:last-child{display:none;}
}


/* v3.4 layout and visual tweaks */
body.admin-body{overflow:hidden;}
.admin-body .admin-shell{height:calc(100vh - 72px);min-height:calc(100vh - 72px);}
.admin-body .admin-sidebar{position:fixed;left:0;top:72px;bottom:0;height:auto;overflow:auto;}
.admin-body .admin-content{margin-left:240px;height:calc(100vh - 72px);overflow:auto;}
.admin-body .admin-shell.sidebar-collapsed .admin-content{margin-left:0;}
.admin-body .content-wrap{min-height:calc(100vh - 150px);}
.admin-body .page-toolbar{position:sticky;top:0;z-index:1020;}
.admin-body .topbar{position:sticky;top:0;z-index:1050;}
.admin-body .admin-sidebar .sticky-top{position:sticky;top:0;z-index:3;}
.admin-shell.sidebar-collapsed .admin-sidebar{transform:translateX(-101%);} 
.page-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;}
.input-outline-strong .form-control,.input-outline-strong .form-select,.input-outline-strong textarea{border:1.8px solid #aebfd6;border-radius:12px;}
.input-outline-strong .form-control:focus,.input-outline-strong .form-select:focus,.input-outline-strong textarea:focus{border-color:#3164f4;box-shadow:0 0 0 .18rem rgba(49,100,244,.14);}
.public-shell .public-topbar{position:sticky;top:0;z-index:1040;}
.public-shell .public-topbar .container{padding-left:20px;padding-right:20px;}
.public-topbar-right{margin-left:auto;}
.public-card.fixed-card-grow{min-height:420px;display:flex;flex-direction:column;justify-content:center;}
.login-page .login-card{min-height:620px;}
.top-login-btn-wrap{display:flex;justify-content:center;align-items:center;min-width:92px;}
.public-login-btn{min-width:74px;text-align:center;}
.rich-editor{border:1.6px solid #b9c8db;border-radius:14px;overflow:hidden;background:#fff;}
.rich-editor-toolbar{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:8px 10px;border-bottom:1px solid #e7edf5;background:#f8fafc;position:sticky;top:0;z-index:2;}
.rich-editor-toolbar .btn{padding:.32rem .48rem;border-radius:8px;border-color:#d4dce8;background:#fff;line-height:1.05;min-width:34px;font-size:.92rem;}
.rich-editor-toolbar .btn-outline-dark{background:#111827;color:#fff;border-color:#111827;}
.rich-editor-toolbar .form-select,.rich-editor-toolbar input[type=color]{height:34px;min-width:42px;border-radius:8px;font-size:.92rem;}
.rich-editor-visual,.rich-editor-source{min-height:180px;max-height:280px;overflow:auto;}
.bulk-action-bar{justify-content:flex-start;align-items:center;}
.bulk-action-bar .help{color:#667085;font-size:.92rem;}
.bulk-top-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.bulk-mode .bulk-select-area{display:inline-flex !important;}
.bulk-select-area{display:none !important;}
.row-check-col,.row-check-cell,.row-check{display:none;}
.bulk-mode .row-check-col,.bulk-mode .row-check-cell{display:table-cell !important;}
.bulk-mode .row-check{display:inline-block !important;}
.table-card.fill-space{min-height:520px;}
.fixed-section-tall{min-height:520px;}
.workflow-tabs-shell{display:grid;grid-template-columns:1fr;gap:14px;}
.workflow-wide-panel .tab-content{min-height:330px;}
.mail-history-card,.log-list-card{min-height:520px;}
.sync-log-list,.timeline{max-height:420px;overflow:auto;padding-right:6px;}
.topbar .container-fluid{padding-left:10px;padding-right:10px;}
.public-home-shortcut{border-radius:8px;padding:.45rem .7rem;}
.public-user-avatar,.admin-avatar{width:36px;height:36px;}
.public-topbar .admin-user-toggle,.topbar .admin-user-toggle{padding:.3rem .55rem;border-radius:999px;background:rgba(255,255,255,.04);} 
.public-topbar .admin-user-toggle:hover,.topbar .admin-user-toggle:hover{background:rgba(255,255,255,.1);} 
@media (max-width:991.98px){
 body.admin-body{overflow:auto;}
 .admin-body .admin-content{margin-left:0;height:auto;overflow:visible;}
 .admin-body .admin-sidebar{position:fixed;}
 .admin-shell.sidebar-collapsed .admin-sidebar{transform:translateX(-104%);width:240px;flex-basis:240px;}
}


/* v3.5 ui extensions */
.profile-avatar-lg{width:64px;height:64px;border-radius:50%;object-fit:cover;border:3px solid #eef2ff;}
.profile-avatar-lg.fallback,.list-avatar.fallback{display:flex;align-items:center;justify-content:center;background:#eaf0ff;color:#315ef6;font-weight:700;}
.list-avatar{width:36px;height:36px;border-radius:50%;object-fit:cover;}
.variable-help-list{display:flex;flex-wrap:wrap;gap:.5rem 1rem;}
.variable-help-item{display:inline-flex;gap:.35rem;align-items:center;padding:.25rem .5rem;background:#f8fafc;border:1px solid #e5e7eb;border-radius:999px;}
.template-live-preview{min-height:260px;border:1px solid #dbe3f0;border-radius:14px;padding:1rem;background:#fff;overflow:auto;}
.template-live-preview .preview-subject{font-weight:700;margin-bottom:.75rem;color:#111827;}
.template-live-preview .preview-body{line-height:1.7;color:#374151;}
.foreign-note{display:inline-block;padding:.15rem .45rem;border-radius:999px;background:#eef6ff;color:#2563eb;font-size:.75rem;font-weight:600;}

.admin-avatar-image{width:36px;height:36px;border-radius:50%;object-fit:cover;border:2px solid rgba(255,255,255,.28);box-shadow:0 6px 14px rgba(49,100,244,.28);}
.required-legend{background:#f7fbff;border:1px dashed #c7d6f7;border-radius:14px;padding:12px 14px;color:#4b5b7c;}
.required-legend .legend-chip{display:inline-flex;align-items:center;gap:6px;margin-right:14px;margin-bottom:8px;}
.required-legend .sample{display:inline-block;padding:2px 8px;border-radius:999px;font-size:12px;font-weight:700;}
.required-legend .sample.optional{background:#dbeafe;color:#1d4ed8;}
.required-legend .sample.required{background:#ffe4e6;color:#be123c;}
.required-legend .sample.must{background:#fce7f3;color:#be185d;}
.required-legend .sample.disabled{background:#e5e7eb;color:#6b7280;}
.required-legend .sample.foreign{background:#fff7ed;color:#c2410c;}


.submission-status-legend{display:flex;align-items:flex-start;justify-content:flex-end;gap:12px;flex-wrap:wrap;margin:-4px 0 14px;}
.submission-status-legend__title{font-weight:800;color:#334155;padding-top:6px;}
.submission-status-legend__list{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;}
.legend-pill{display:inline-flex;align-items:center;gap:8px;padding:7px 12px;border-radius:999px;border:1px solid #d8e2f0;background:#fff;color:#334155;font-size:.92rem;font-weight:700;}
.legend-swatch{width:14px;height:14px;border-radius:999px;border:1px solid rgba(15,23,42,.10);display:inline-block;flex:0 0 14px;}
.legend-reviewed .legend-swatch{background:#f1fcf5;}
.legend-supplement .legend-swatch{background:#fff7ed;}
.legend-resubmitted .legend-swatch{background:#eef7ff;}
.legend-pending .legend-swatch{background:#f8fafc;}
.legend-rejected .legend-swatch{background:#fef2f2;}
@media (max-width: 991.98px){
  .submission-status-legend{justify-content:flex-start;}
  .submission-status-legend__title,.submission-status-legend__list{width:100%;justify-content:flex-start;}
}


/* v3.7.2 mobile-safe legend fix */
.submission-status-legend{display:flex;align-items:flex-start;justify-content:flex-end;gap:12px;flex-wrap:wrap;margin:-4px 0 14px;}
.submission-status-legend__title{font-weight:800;color:#334155;padding-top:6px;}
.submission-status-legend__list{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;}
.legend-pill{display:inline-flex !important;align-items:center !important;gap:8px !important;padding:7px 12px !important;border-radius:999px !important;border:1px solid #d8e2f0 !important;background:#fff !important;color:#334155 !important;font-size:.92rem !important;font-weight:700 !important;line-height:1.2 !important;white-space:nowrap;}
.legend-pill span:last-child{display:inline-block;}
.legend-swatch{width:14px !important;height:14px !important;border-radius:999px !important;border:1px solid rgba(15,23,42,.10) !important;display:inline-block !important;flex:0 0 14px !important;}
.legend-reviewed{background:#f0fdf4 !important;border-color:#bbf7d0 !important;}
.legend-supplement{background:#fff7ed !important;border-color:#fed7aa !important;}
.legend-resubmitted{background:#eff6ff !important;border-color:#bfdbfe !important;}
.legend-pending{background:#f8fafc !important;border-color:#e2e8f0 !important;}
.legend-rejected{background:#fef2f2 !important;border-color:#fecaca !important;}
@media (max-width: 767.98px){
  .submission-status-legend{justify-content:flex-start !important;gap:10px !important;margin:8px 0 14px !important;}
  .submission-status-legend__title{width:100%;padding-top:0 !important;}
  .submission-status-legend__list{width:100%;justify-content:flex-start !important;gap:6px !important;}
  .legend-pill{font-size:.82rem !important;padding:6px 10px !important;}
  .legend-swatch{width:12px !important;height:12px !important;flex-basis:12px !important;}
}
