@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Nunito+Sans:wght@300;400;600;700;800&display=swap');

:root {
  --teal: #1B8A6B; --teal-light: #e8f7f3;
  --blue: #1B5FC1; --blue-light: #e8f0fb;
  --navy: #04152D; --navy-mid: #0a2647;
  --gold: #F4A621; --gold-light: #fff8ec; --gold-dark: #d48c10;
  --red: #e53e3e; --red-light: #fff0f0;
  --purple: #7c3aed; --purple-light: #f3eeff;
  --pink: #e91e8c; --pink-light: #fce8f4;
  --orange: #f97316; --green: #16a34a; --green-light: #e8f5ee;
  --cyan: #0891b2; --radius: 12px;
  --shadow: 0 2px 16px rgba(4,21,45,.08);
  --shadow-lg: 0 8px 40px rgba(4,21,45,.15);
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Nunito Sans', sans-serif; }
@keyframes fadeIn { from { opacity:0; transform:translateY(10px) } to { opacity:1; transform:translateY(0) } }

/* ── ADMIN SHELL ── */
.dce-admin-wrap { max-width: 1400px; }
.dce-page-header { display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:24px; padding-bottom:18px; border-bottom:2px solid #f0f4f8; }
.dce-page-title { font-family:'Outfit',sans-serif; font-size:24px; font-weight:800; color:var(--navy); margin:0; }
.dce-page-sub { font-size:13px; color:#64748b; margin-top:4px; }
.dce-header-actions { display:flex; gap:10px; align-items:center; }

/* ── STAT CARDS ── */
.dce-stats-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(175px,1fr)); gap:16px; margin-bottom:24px; }
.dce-stat-card { background:white; border-radius:var(--radius); padding:18px 16px; cursor:pointer; transition:all .25s; border:2px solid transparent; box-shadow:var(--shadow); }
.dce-stat-card:hover { transform:translateY(-3px); box-shadow:var(--shadow-lg); }
.dce-stat-icon { font-size:24px; margin-bottom:10px; }
.dce-stat-num { font-family:'Outfit',sans-serif; font-size:28px; font-weight:800; line-height:1; }
.dce-stat-label { font-size:11px; font-weight:700; color:#64748b; margin-top:4px; text-transform:uppercase; letter-spacing:.5px; }
.dce-teal  { color:var(--teal); }   .dce-blue   { color:var(--blue); }
.dce-gold  { color:var(--gold-dark); } .dce-red  { color:var(--red); }
.dce-purple{ color:var(--purple); } .dce-pink   { color:var(--pink); }
.dce-orange{ color:var(--orange); } .dce-green  { color:var(--green); }
.dce-cyan  { color:var(--cyan); }   .dce-navy   { color:var(--navy); }

/* ── CARDS ── */
.dce-card { background:white; border-radius:var(--radius); padding:22px; box-shadow:var(--shadow); margin-bottom:20px; }
.dce-card-title { font-family:'Outfit',sans-serif; font-size:15px; font-weight:700; color:var(--navy); margin-bottom:16px; display:flex; align-items:center; gap:8px; }
.dce-grid-2col { display:grid; grid-template-columns:1fr 1fr; gap:20px; }

/* ── BUTTONS ── */
.dce-btn { padding:9px 18px; border-radius:9px; font-family:'Outfit',sans-serif; font-size:13px; font-weight:700; cursor:pointer; border:none; transition:all .2s; display:inline-flex; align-items:center; gap:6px; text-decoration:none; white-space:nowrap; }
.dce-btn-primary { background:linear-gradient(135deg,var(--teal),var(--blue)); color:white; box-shadow:0 4px 12px rgba(27,138,107,.25); }
.dce-btn-primary:hover { opacity:.9; transform:translateY(-1px); color:white; }
.dce-btn-secondary { background:#f0f4f8; color:var(--navy); border:2px solid #e5e7eb; }
.dce-btn-secondary:hover { border-color:var(--teal); color:var(--teal); }
.dce-btn-gold { background:linear-gradient(135deg,var(--gold),#f97316); color:white; }
.dce-btn-sm { padding:6px 12px; font-size:11px; }

/* ── TABLE ── */
.dce-table-scroll { overflow-x:auto; }
.dce-table { width:100%; border-collapse:collapse; }
.dce-table th { font-family:'Outfit',sans-serif; font-size:11px; font-weight:700; color:#64748b; text-transform:uppercase; letter-spacing:.5px; padding:11px 14px; text-align:left; background:#f8fafc; border-bottom:2px solid #f0f4f8; }
.dce-table td { padding:11px 14px; font-size:13px; border-bottom:1px solid #f0f4f8; vertical-align:middle; }
.dce-table tr:last-child td { border-bottom:none; }
.dce-table tr:hover td { background:#fafbfd; }
.dce-td-name { font-weight:700; color:var(--navy); font-size:13px; }
.dce-td-id { font-size:11px; color:#64748b; font-weight:600; font-family:'Outfit',sans-serif; }

/* ── BADGES ── */
.badge { display:inline-flex; align-items:center; padding:3px 9px; border-radius:20px; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.3px; }
.badge-green  { background:#dcfce7; color:#16a34a; }  .badge-blue   { background:#dbeafe; color:#1d4ed8; }
.badge-gold   { background:#fef3c7; color:#d97706; }  .badge-red    { background:#fee2e2; color:#dc2626; }
.badge-purple { background:#ede9fe; color:#7c3aed; }  .badge-teal   { background:var(--teal-light); color:var(--teal); }
.badge-grey   { background:#f1f5f9; color:#64748b; }  .badge-orange { background:#ffedd5; color:#ea580c; }
.badge-cyan   { background:#e0f5fa; color:var(--cyan); } .badge-navy { background:#e0e7f0; color:var(--navy); }

/* ── FORM ELEMENTS ── */
.dce-form-group { margin-bottom:16px; }
.dce-form-label { font-size:11px; font-weight:800; color:#374151; letter-spacing:.5px; text-transform:uppercase; display:block; margin-bottom:7px; }
.dce-form-input { width:100%; padding:10px 14px; border:2px solid #e5e7eb; border-radius:10px; font-family:'Nunito Sans',sans-serif; font-size:14px; outline:none; transition:border-color .2s; background:white; color:#1a2840; }
.dce-form-input:focus { border-color:var(--teal); box-shadow:0 0 0 3px rgba(27,138,107,.1); }
.dce-form-grid { display:grid; gap:14px; }
.dce-grid-2 { grid-template-columns:1fr 1fr; }
.dce-grid-3 { grid-template-columns:1fr 1fr 1fr; }
.dce-full { grid-column:1/-1; }
.dce-radio-group { display:flex; gap:10px; flex-wrap:wrap; }
.dce-radio-opt { display:flex; align-items:center; gap:8px; padding:9px 14px; border:2px solid #e5e7eb; border-radius:10px; cursor:pointer; transition:all .2s; font-size:13px; font-weight:600; color:#374151; }
.dce-radio-opt:hover { border-color:var(--teal); }
.dce-radio-opt.selected { border-color:var(--teal); background:var(--teal-light); color:var(--teal); }
.dce-status-select { padding:5px 8px; border:2px solid #e5e7eb; border-radius:8px; font-size:12px; outline:none; margin-right:6px; cursor:pointer; }
.dce-status-select:focus { border-color:var(--teal); }

/* ── ALERTS ── */
.dce-alert { padding:13px 16px; border-radius:10px; font-size:13px; line-height:1.6; margin-bottom:14px; }
.dce-alert-info    { background:var(--teal-light); border-left:4px solid var(--teal); }
.dce-alert-warning { background:var(--gold-light);  border-left:4px solid var(--gold); }
.dce-alert-error   { background:var(--red-light);   border-left:4px solid var(--red); }

/* ── MODAL ── */
.dce-modal-overlay { position:fixed; inset:0; background:rgba(4,21,45,.55); backdrop-filter:blur(4px); z-index:99999; display:flex; align-items:center; justify-content:center; padding:20px; }
.dce-modal-overlay.dce-hidden { display:none; }
.dce-modal { background:white; border-radius:20px; width:min(780px,95vw); max-height:90vh; overflow-y:auto; padding:28px; animation:fadeIn .25s ease; }
.dce-modal-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; padding-bottom:16px; border-bottom:2px solid #f0f4f8; }
.dce-modal-title { font-family:'Outfit',sans-serif; font-size:18px; font-weight:800; color:var(--navy); }
.dce-modal-close { width:34px; height:34px; border-radius:9px; background:#f0f4f8; border:none; cursor:pointer; font-size:20px; color:#64748b; display:flex; align-items:center; justify-content:center; line-height:1; }
.dce-modal-close:hover { background:#fee2e2; color:var(--red); }

/* ── TOAST ── */
.dce-toast { position:fixed; bottom:28px; right:28px; padding:14px 22px; border-radius:12px; font-family:'Outfit',sans-serif; font-weight:700; font-size:14px; z-index:999999; transform:translateY(80px); opacity:0; transition:all .3s cubic-bezier(.34,1.56,.64,1); max-width:380px; pointer-events:none; }
.dce-toast.dce-toast-show { transform:translateY(0); opacity:1; }
.dce-toast-success { background:var(--navy); color:white; box-shadow:0 8px 30px rgba(4,21,45,.3); }
.dce-toast-error   { background:var(--red);   color:white; }

/* ── AGENT LEVEL BADGE ── */
.dce-agent-level { display:inline-flex; align-items:center; gap:5px; padding:4px 12px; border-radius:20px; font-size:11px; font-weight:800; text-transform:uppercase; }
.level-gold     { background:#fef3c7; color:#d97706; }
.level-silver   { background:#f1f5f9; color:#64748b; }
.level-platinum { background:#ede9fe; color:#7c3aed; }
.level-bronze   { background:#fff7ed; color:#ea580c; }

/* ── LOGIN PAGE ── */
.dce-portal-login-wrap { display:flex; min-height:100vh; background:var(--teal); font-family:'Nunito Sans',sans-serif; }
.dce-lp-left { width:42%; min-height:100vh; background:linear-gradient(160deg,#0d6b53 0%,var(--teal) 40%,#1a7ab8 100%); display:flex; flex-direction:column; padding:44px 50px; position:relative; overflow:hidden; }
.dce-lp-left::before { content:''; position:absolute; bottom:-80px; right:-80px; width:400px; height:400px; background:rgba(255,255,255,.05); border-radius:50%; pointer-events:none; }
.dce-lp-logo { margin-bottom:40px; position:relative; z-index:1; }
.dce-lp-logo img { height:60px; filter:brightness(1.1); }
.dce-lp-headline { font-family:'Outfit',sans-serif; font-size:42px; font-weight:900; color:white; line-height:1.1; margin-bottom:20px; position:relative; z-index:1; }
.dce-lp-headline span { color:var(--gold); }
.dce-lp-sub { font-size:15px; color:rgba(255,255,255,.82); line-height:1.7; margin-bottom:36px; position:relative; z-index:1; max-width:360px; }
.dce-lp-features { display:flex; flex-direction:column; gap:14px; position:relative; z-index:1; }
.dce-lp-feat { display:flex; align-items:center; gap:12px; color:rgba(255,255,255,.9); font-size:14px; font-weight:600; }
.dce-lp-feat-icon { width:40px; height:40px; background:rgba(255,255,255,.15); border-radius:11px; display:flex; align-items:center; justify-content:center; font-size:18px; flex-shrink:0; backdrop-filter:blur(4px); }
.dce-lp-wave { position:absolute; right:-2px; top:0; bottom:0; width:100px; z-index:3; pointer-events:none; }
.dce-lp-right { flex:1; background:white; display:flex; align-items:center; justify-content:center; padding:40px; clip-path:polygon(60px 0, 100% 0, 100% 100%, 60px 100%, 0 50%); }
.dce-lp-form { width:380px; max-width:100%; }
.dce-lp-form-title { font-family:'Outfit',sans-serif; font-size:24px; font-weight:800; color:var(--navy); margin-bottom:4px; }
.dce-lp-form-sub { font-size:13px; color:#64748b; margin-bottom:28px; }
.dce-role-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-bottom:22px; }
.dce-role-card { border:2px solid #e5e7eb; border-radius:11px; padding:12px 10px; text-align:center; cursor:pointer; transition:all .2s; }
.dce-role-card:hover { border-color:var(--teal); }
.dce-role-card.active { border-color:var(--teal); background:var(--teal-light); }
.dce-rc-icon { font-size:22px; margin-bottom:5px; }
.dce-rc-label { font-family:'Outfit',sans-serif; font-size:12px; font-weight:700; color:#374151; }
.dce-role-card.active .dce-rc-label { color:var(--teal); }
.dce-lp-field { margin-bottom:14px; }
.dce-lp-field label { font-size:11px; font-weight:800; color:#374151; letter-spacing:.5px; text-transform:uppercase; display:block; margin-bottom:6px; }
.dce-lp-field input { width:100%; padding:11px 14px; border:2px solid #e5e7eb; border-radius:10px; font-family:'Nunito Sans',sans-serif; font-size:14px; outline:none; transition:all .2s; color:#1a2840; }
.dce-lp-field input:focus { border-color:var(--teal); box-shadow:0 0 0 3px rgba(27,138,107,.1); }
.dce-lp-signin-btn { width:100%; padding:13px; background:linear-gradient(135deg,var(--teal),var(--blue)); border:none; border-radius:11px; color:white; font-family:'Outfit',sans-serif; font-size:15px; font-weight:800; cursor:pointer; transition:all .2s; }
.dce-lp-signin-btn:hover { opacity:.9; transform:translateY(-1px); }
.dce-lp-divider { display:flex; align-items:center; gap:12px; margin:18px 0; color:#9ca3af; font-size:12px; }
.dce-lp-divider::before, .dce-lp-divider::after { content:''; flex:1; height:1px; background:#e5e7eb; }
.dce-lp-apply-btn { width:100%; padding:12px; background:white; border:2px solid var(--teal); border-radius:11px; color:var(--teal); font-family:'Outfit',sans-serif; font-size:14px; font-weight:800; text-align:center; display:block; text-decoration:none; transition:all .2s; }
.dce-lp-apply-btn:hover { background:var(--teal); color:white; }
.dce-login-msg { padding:12px 16px; border-radius:9px; font-size:13px; font-weight:600; margin-top:12px; }
.dce-login-success { background:var(--teal-light); color:var(--teal); }
.dce-login-error   { background:var(--red-light);   color:var(--red); }

/* ── CLIENT / AGENT / PARTNER PORTAL ── */
.dce-client-portal { min-height:100vh; background:#f0f4f8; font-family:'Nunito Sans',sans-serif; }
.dce-cp-header { background:linear-gradient(135deg,var(--navy),#0d3b6e); padding:16px 28px; display:flex; align-items:center; gap:16px; }
.dce-cp-logo { height:44px; }
.dce-cp-header-info { flex:1; }
.dce-cp-title { font-family:'Outfit',sans-serif; font-weight:800; color:white; font-size:16px; }
.dce-cp-sub { font-size:12px; color:rgba(255,255,255,.5); margin-top:2px; }
.dce-cp-header-right { display:flex; align-items:center; gap:10px; flex-shrink:0; }
.dce-cp-client-id { font-family:'Outfit',sans-serif; font-size:12px; font-weight:700; color:var(--gold); background:rgba(244,166,33,.15); padding:4px 12px; border-radius:20px; }
.dce-cp-nav { background:white; border-bottom:2px solid #f0f4f8; padding:0 24px; display:flex; gap:2px; overflow-x:auto; }
.dce-cp-nav-btn { padding:14px 18px; border:none; background:none; font-family:'Outfit',sans-serif; font-size:13px; font-weight:700; color:#64748b; cursor:pointer; border-bottom:3px solid transparent; transition:all .2s; white-space:nowrap; }
.dce-cp-nav-btn:hover { color:var(--teal); }
.dce-cp-nav-btn.active { color:var(--teal); border-bottom-color:var(--teal); }
.dce-nav-badge { background:var(--red); color:white; font-size:10px; font-weight:800; padding:1px 6px; border-radius:20px; margin-left:4px; }
.dce-cp-body { padding:24px; max-width:1200px; margin:0 auto; }
.dce-cp-tab { display:none; }
.dce-cp-tab.active { display:block; animation:fadeIn .3s ease; }

/* ── APPLICATION FORM ── */
#dce-app-form-wrap, .dce-app-form-wrap { font-family:'Nunito Sans',sans-serif; }
.af-header { background:linear-gradient(135deg,var(--navy),#0d3b6e); padding:16px 32px; display:flex; align-items:center; gap:16px; }
.af-header img { height:44px; }
.af-header-title { font-family:'Outfit',sans-serif; font-weight:800; color:white; font-size:16px; }
.af-header-sub { font-size:11px; color:rgba(255,255,255,.5); margin-top:2px; }
.af-progress { background:white; border-bottom:2px solid #f0f4f8; padding:0 20px; overflow-x:auto; }
.af-steps { display:flex; min-width:max-content; }
.af-step { display:flex; align-items:center; padding:13px 14px 11px; gap:8px; border-bottom:3px solid transparent; cursor:pointer; transition:all .2s; white-space:nowrap; }
.af-step.done   { border-bottom-color:var(--teal); }
.af-step.active { border-bottom-color:var(--teal); }
.af-step-num { width:26px; height:26px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-family:'Outfit',sans-serif; font-size:11px; font-weight:800; flex-shrink:0; transition:all .2s; }
.af-step.done .af-step-num   { background:var(--teal); color:white; }
.af-step.active .af-step-num { background:var(--teal); color:white; box-shadow:0 0 0 3px rgba(27,138,107,.2); }
.af-step.pending .af-step-num { background:#f0f4f8; color:#9ca3af; }
.af-step-label { font-family:'Outfit',sans-serif; font-size:11px; font-weight:700; color:#64748b; }
.af-step.active .af-step-label, .af-step.done .af-step-label { color:var(--teal); }
.af-body { padding:28px; max-width:860px; margin:0 auto; background:#f0f4f8; min-height:420px; }
.q-panel { background:white; border-radius:14px; padding:28px; box-shadow:0 2px 12px rgba(4,21,45,.06); }
.q-section-tag { font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:1.5px; color:var(--teal); margin-bottom:8px; }
.q-title { font-family:'Outfit',sans-serif; font-size:22px; font-weight:800; color:var(--navy); margin-bottom:6px; line-height:1.3; }
.q-hint { font-size:13px; color:#64748b; margin-bottom:20px; line-height:1.6; }
.gov-radio-list { display:flex; flex-direction:column; gap:10px; margin-bottom:18px; }
.gov-radio { display:flex; align-items:center; gap:14px; padding:13px 16px; border:2px solid #d1d5db; border-radius:10px; cursor:pointer; transition:all .2s; background:white; }
.gov-radio:hover { border-color:var(--teal); }
.gov-radio.selected { border-color:var(--teal); background:var(--teal-light); }
.gov-radio input[type="radio"] { width:20px; height:20px; accent-color:var(--teal); flex-shrink:0; cursor:pointer; }
.gov-radio-label { font-size:15px; font-weight:600; color:#1a2840; }
.gov-radio-hint  { font-size:12px; color:#64748b; margin-top:2px; }
.conditional-reveal { margin-left:34px; padding:18px; border-left:4px solid var(--teal); background:#f8fbf9; border-radius:0 10px 10px 0; margin-bottom:10px; display:none; }
.conditional-reveal.show { display:block; animation:fadeIn .3s ease; }
.gf-group   { margin-bottom:20px; }
.gf-label   { font-family:'Outfit',sans-serif; font-size:14px; font-weight:700; color:#1a2840; display:block; margin-bottom:5px; }
.gf-hint    { font-size:12px; color:#64748b; margin-bottom:8px; display:block; }
.gf-input   { width:100%; padding:11px 14px; border:2px solid #b1b4b6; border-radius:8px; font-family:'Nunito Sans',sans-serif; font-size:15px; outline:none; transition:border-color .2s; color:#1a2840; background:white; }
.gf-input:focus { border-color:var(--teal); outline:3px solid rgba(27,138,107,.12); }
.gf-textarea  { min-height:100px; resize:vertical; }
.gf-inline    { display:grid; grid-template-columns:1fr 1fr;       gap:16px; }
.gf-inline-3  { display:grid; grid-template-columns:1fr 1fr 1fr;   gap:14px; }
.gf-inline-4  { display:grid; grid-template-columns:1fr 1fr 1fr 1fr; gap:12px; }
.af-actions   { display:flex; align-items:center; justify-content:space-between; margin-top:24px; padding-top:18px; border-top:2px solid #f0f4f8; }
.af-btn-continue { background:linear-gradient(135deg,var(--teal),var(--blue)); color:white; border:none; padding:13px 28px; border-radius:10px; font-family:'Outfit',sans-serif; font-size:14px; font-weight:800; cursor:pointer; transition:all .2s; }
.af-btn-continue:hover { opacity:.9; }
.af-btn-back { background:white; color:#374151; border:2px solid #e5e7eb; padding:11px 22px; border-radius:10px; font-family:'Outfit',sans-serif; font-size:13px; font-weight:700; cursor:pointer; }
.af-btn-back:hover { border-color:var(--teal); color:var(--teal); }
.repeater-item { border:2px solid #e5e7eb; border-radius:12px; padding:18px; margin-bottom:12px; background:#fafbfd; }
.repeater-item-title { font-family:'Outfit',sans-serif; font-weight:800; font-size:14px; color:var(--navy); margin-bottom:14px; display:flex; align-items:center; justify-content:space-between; }
.remove-btn   { background:none; border:none; cursor:pointer; color:#dc2626; font-size:18px; padding:0; }
.add-more-btn { width:100%; padding:11px; border:2px dashed #d1d5db; background:white; border-radius:10px; font-family:'Outfit',sans-serif; font-weight:700; font-size:13px; color:#64748b; cursor:pointer; transition:all .2s; }
.add-more-btn:hover { border-color:var(--teal); color:var(--teal); }
.alert-box         { padding:14px 18px; border-radius:10px; margin-bottom:18px; display:flex; gap:12px; font-size:13px; line-height:1.6; }
.alert-box.warning { background:#fffbeb; border-left:4px solid var(--gold); }
.alert-box.info    { background:var(--teal-light); border-left:4px solid var(--teal); }
.alert-bold        { font-weight:900; font-size:14px; display:block; margin-bottom:4px; }
.review-row    { display:flex; padding:11px 0; border-bottom:1px solid #f0f4f8; gap:16px; }
.review-key    { font-size:13px; font-weight:700; color:#64748b; width:200px; flex-shrink:0; }
.review-val    { font-size:13px; color:#1a2840; flex:1; }
.review-change { font-size:12px; color:var(--teal); font-weight:700; cursor:pointer; text-decoration:underline; flex-shrink:0; }
.doc-upload-row { display:flex; align-items:center; gap:12px; padding:12px; border:2px solid #f0f4f8; border-radius:10px; margin-bottom:8px; background:white; }
.doc-upload-row .doc-icon { font-size:20px; flex-shrink:0; }
.doc-upload-row .doc-name { font-weight:700; font-size:13px; color:#374151; flex:1; }
.doc-status.req { color:#dc2626; font-size:11px; font-weight:700; }
.doc-status.opt { color:#9ca3af; font-size:11px; }
.doc-status.ok  { color:#16a34a; font-size:11px; font-weight:700; }
.doc-unavail-input { border:none; border-bottom:2px solid #e5e7eb; background:none; padding:4px 0; font-size:12px; color:#64748b; outline:none; width:140px; }

/* ── CLIENT PORTAL EXTRAS ── */
.dce-timeline          { position:relative; padding-left:22px; margin-top:12px; }
.dce-tl-item           { position:relative; padding-bottom:12px; }
.dce-tl-dot            { position:absolute; left:-22px; top:4px; width:12px; height:12px; border-radius:50%; background:#e5e7eb; transition:all .2s; }
.dce-tl-item.done .dce-tl-dot   { background:var(--green); }
.dce-tl-item.active .dce-tl-dot { background:var(--teal); box-shadow:0 0 0 3px rgba(27,138,107,.2); }
.dce-tl-text { font-size:13px; font-weight:600; color:#374151; }
.dce-tl-item.done .dce-tl-text   { color:#9ca3af; text-decoration:line-through; }
.dce-tl-item.active .dce-tl-text { color:var(--teal); font-weight:800; }
.dce-app-card          { background:linear-gradient(135deg,var(--teal-light),var(--blue-light)); border-radius:12px; padding:18px; }
.dce-doc-req           { display:flex; align-items:center; gap:12px; padding:12px 14px; border:2px solid #f0f4f8; border-radius:10px; margin-bottom:8px; background:white; }
.dce-doc-req.fulfilled { border-color:var(--green-light); }
.dce-doc-req-label     { font-size:13px; font-weight:700; flex:1; }
.dce-chat-messages { min-height:200px; max-height:320px; overflow-y:auto; padding:16px; background:#fafbfd; border:2px solid #f0f4f8; border-radius:12px; display:flex; flex-direction:column; gap:10px; margin-bottom:12px; }
.dce-msg               { max-width:75%; }
.dce-msg-mine          { align-self:flex-end; }
.dce-msg-bubble        { padding:10px 14px; border-radius:14px; font-size:13px; line-height:1.5; }
.dce-msg:not(.dce-msg-mine) .dce-msg-bubble { background:white; border:1px solid #e5e7eb; color:#374151; border-bottom-left-radius:4px; }
.dce-msg-mine .dce-msg-bubble { background:linear-gradient(135deg,var(--teal),var(--blue)); color:white; border-bottom-right-radius:4px; }
.dce-msg-meta          { font-size:11px; color:#9ca3af; margin-top:4px; }
.dce-msg-mine .dce-msg-meta { text-align:right; }
.dce-chat-input        { display:flex; gap:8px; }
.dce-chat-input input  { flex:1; border:2px solid #e5e7eb; border-radius:10px; padding:9px 14px; font-family:'Nunito Sans',sans-serif; font-size:13px; outline:none; }
.dce-chat-input input:focus { border-color:var(--teal); }
.dce-invoice-card { border:2px solid #f0f4f8; border-radius:12px; padding:14px 16px; display:flex; align-items:center; gap:14px; margin-bottom:10px; background:white; }
.dce-broadcast-item { border-left:4px solid var(--teal); padding:14px 16px; margin-bottom:12px; background:#f8fbf9; border-radius:0 10px 10px 0; }
.dce-broadcast-date  { font-size:11px; color:#9ca3af; margin-bottom:4px; }
.dce-broadcast-title { font-family:'Outfit',sans-serif; font-weight:800; font-size:15px; color:var(--navy); margin-bottom:6px; }
.dce-broadcast-body  { font-size:13px; color:#374151; }

/* ── SUCCESS SCREEN ── */
.dce-success-screen { min-height:100vh; background:linear-gradient(135deg,var(--navy),#0d3b6e); display:flex; align-items:center; justify-content:center; padding:40px; }
.dce-success-card   { background:white; border-radius:24px; padding:52px 44px; max-width:540px; width:100%; text-align:center; box-shadow:0 24px 80px rgba(0,0,0,.3); animation:fadeIn .5s ease; }
.dce-success-icon   { font-size:64px; margin-bottom:16px; }
.dce-success-title  { font-family:'Outfit',sans-serif; font-size:28px; font-weight:900; color:var(--navy); margin-bottom:8px; }
.dce-success-id     { font-family:'Outfit',sans-serif; font-size:26px; font-weight:800; color:var(--teal); margin:14px 0; background:var(--teal-light); padding:12px 24px; border-radius:12px; display:inline-block; }
.dce-success-msg    { font-size:14px; color:#64748b; line-height:1.8; }
.dce-success-actions { display:flex; gap:12px; justify-content:center; margin-top:28px; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .dce-lp-left   { display:none; }
  .dce-lp-right  { clip-path:none; padding:32px 24px; }
  .dce-grid-2col, .dce-form-grid.dce-grid-2, .gf-inline, .gf-inline-3, .gf-inline-4 { grid-template-columns:1fr; }
  .dce-stats-grid { grid-template-columns:repeat(2,1fr); }
  .dce-cp-header  { flex-wrap:wrap; gap:10px; }
  .af-body        { padding:16px; }
  .q-panel        { padding:20px; }
  .q-title        { font-size:18px; }
  .dce-table th, .dce-table td { padding:8px 10px; font-size:12px; }
}
@media (max-width: 500px) {
  .dce-stats-grid { grid-template-columns:1fr 1fr; }
  .dce-lp-form    { width:100%; }
  .dce-role-grid  { grid-template-columns:1fr 1fr; }
}

/* ── V2 ADDITIONS ── */
.dce-fullpage-body { margin:0; padding:0; background:#f0f4f8; overflow-x:hidden; }
#dce-fullpage-wrap { min-height:100vh; }
body.admin-bar #dce-fullpage-wrap { padding-top:32px; }

/* Full-width portal — no WP margins */
.dce-portal-login-wrap { min-height:100vh; min-height:calc(var(--vh,1vh)*100); }
.dce-client-portal { min-height:100vh; }

/* Colourful stat cards with accent borders */
.dce-stat-card { border-left:4px solid transparent; }
.dce-stat-card.dce-teal   { border-left-color:var(--teal); }
.dce-stat-card.dce-blue   { border-left-color:var(--blue); }
.dce-stat-card.dce-gold   { border-left-color:var(--gold); }
.dce-stat-card.dce-green  { border-left-color:var(--green); }
.dce-stat-card.dce-red    { border-left-color:var(--red); }
.dce-stat-card.dce-purple { border-left-color:var(--purple); }
.dce-stat-card.dce-orange { border-left-color:var(--orange); }
.dce-stat-card.dce-pink   { border-left-color:var(--pink); }
.dce-stat-card.dce-navy   { border-left-color:var(--navy); }
.dce-stat-card.dce-cyan   { border-left-color:var(--cyan); }
.dce-stat-card.dce-gold   { border-left-color:var(--gold-dark); }

/* Admin page data row */
.review-row { display:flex; padding:11px 0; border-bottom:1px solid #f0f4f8; gap:16px; align-items:flex-start; }
.review-key { font-size:13px; font-weight:700; color:#64748b; width:180px; flex-shrink:0; }
.review-val { font-size:13px; color:#1a2840; flex:1; }

/* Blue-light var */
:root { --blue-light:#dbeafe; }

/* ═══════════════ V3 — NOTIFICATIONS ═══════════════ */
.dce-notif-bell-wrap{position:relative;display:inline-block;}
.dce-notif-bell{background:none;border:none;cursor:pointer;font-size:22px;position:relative;padding:6px 8px;color:rgba(255,255,255,.8);transition:color .2s;}
.dce-notif-bell:hover{color:white;}
.dce-notif-count{position:absolute;top:2px;right:2px;background:var(--red);color:white;font-size:10px;font-weight:800;width:18px;height:18px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-family:'Outfit',sans-serif;}
.dce-notif-count.hidden{display:none;}
.dce-notif-dropdown{position:absolute;right:0;top:calc(100% + 8px);width:360px;background:white;border-radius:16px;box-shadow:0 20px 60px rgba(4,21,45,.2);z-index:9999;display:none;overflow:hidden;}
.dce-notif-dropdown.open{display:block;animation:fadeIn .2s ease;}
.dce-notif-header{padding:16px 18px;border-bottom:1px solid #f0f4f8;display:flex;align-items:center;justify-content:space-between;}
.dce-notif-header h4{font-family:'Outfit',sans-serif;font-weight:800;font-size:15px;color:var(--navy);}
.dce-notif-list{max-height:380px;overflow-y:auto;}
.dce-notif-item{display:flex;gap:12px;padding:14px 18px;border-bottom:1px solid #f8fafc;cursor:pointer;transition:background .2s;}
.dce-notif-item:hover{background:#f8fafc;}
.dce-notif-item.unread{background:linear-gradient(135deg,rgba(27,138,107,.04),rgba(27,95,193,.04));border-left:3px solid var(--teal);}
.dce-notif-icon{font-size:20px;flex-shrink:0;width:36px;height:36px;display:flex;align-items:center;justify-content:center;background:#f0f4f8;border-radius:10px;}
.dce-notif-content{flex:1;}
.dce-notif-title{font-weight:700;font-size:13px;color:var(--navy);margin-bottom:2px;}
.dce-notif-msg{font-size:12px;color:#64748b;line-height:1.5;}
.dce-notif-time{font-size:10px;color:#9ca3af;margin-top:4px;}
.dce-notif-footer{padding:12px;text-align:center;border-top:1px solid #f0f4f8;}
.dce-notif-footer button{background:none;border:none;color:var(--teal);font-weight:700;font-size:12px;cursor:pointer;}

/* ═══════════════ V3 — KANBAN BOARD ═══════════════ */
.dce-kanban{display:flex;gap:16px;overflow-x:auto;padding-bottom:16px;min-height:500px;}
.dce-kanban-col{min-width:240px;max-width:260px;background:#f8fafc;border-radius:14px;padding:12px;flex-shrink:0;}
.dce-kanban-col-title{font-family:'Outfit',sans-serif;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:1px;margin-bottom:12px;display:flex;align-items:center;justify-content:space-between;padding:0 4px;}
.dce-kanban-count{background:rgba(0,0,0,.08);border-radius:20px;padding:2px 8px;font-size:11px;}
.dce-kanban-card{background:white;border-radius:10px;padding:12px;margin-bottom:8px;box-shadow:0 2px 8px rgba(4,21,45,.06);cursor:pointer;transition:all .2s;border-left:3px solid transparent;}
.dce-kanban-card:hover{transform:translateY(-2px);box-shadow:0 6px 20px rgba(4,21,45,.1);}
.dce-kanban-card-id{font-size:10px;color:#9ca3af;font-weight:700;margin-bottom:4px;font-family:'Outfit',sans-serif;}
.dce-kanban-card-name{font-size:13px;font-weight:700;color:var(--navy);margin-bottom:4px;}
.dce-kanban-card-country{font-size:11px;color:#64748b;}
.dce-kanban-card-meta{display:flex;justify-content:space-between;align-items:center;margin-top:8px;}

/* ═══════════════ V3 — TASKS ═══════════════ */
.dce-task-item{display:flex;align-items:flex-start;gap:12px;padding:14px;border:2px solid #f0f4f8;border-radius:10px;margin-bottom:8px;background:white;transition:all .2s;}
.dce-task-item:hover{border-color:var(--teal);}
.dce-task-check{width:20px;height:20px;border:2px solid #d1d5db;border-radius:6px;flex-shrink:0;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s;margin-top:2px;}
.dce-task-check.done{background:var(--teal);border-color:var(--teal);color:white;font-size:12px;}
.dce-task-body{flex:1;}
.dce-task-title{font-weight:700;font-size:14px;color:var(--navy);}
.dce-task-title.done{text-decoration:line-through;color:#9ca3af;}
.dce-task-meta{font-size:11px;color:#9ca3af;margin-top:4px;display:flex;gap:10px;}
.dce-priority-high{color:var(--red);}
.dce-priority-medium{color:var(--gold-dark);}
.dce-priority-low{color:var(--teal);}

/* ═══════════════ V3 — SEARCH ═══════════════ */
.dce-global-search{position:relative;}
.dce-global-search input{width:240px;padding:8px 14px 8px 36px;border:2px solid rgba(255,255,255,.2);border-radius:20px;background:rgba(255,255,255,.1);color:white;font-size:13px;outline:none;font-family:'Nunito Sans',sans-serif;transition:all .3s;}
.dce-global-search input::placeholder{color:rgba(255,255,255,.4);}
.dce-global-search input:focus{width:300px;background:rgba(255,255,255,.15);border-color:rgba(255,255,255,.4);}
.dce-global-search .search-icon{position:absolute;left:12px;top:50%;transform:translateY(-50%);font-size:14px;opacity:.5;}
.dce-search-results{position:absolute;top:calc(100% + 8px);left:0;right:0;min-width:360px;background:white;border-radius:14px;box-shadow:0 20px 60px rgba(4,21,45,.2);z-index:9999;display:none;overflow:hidden;}
.dce-search-results.open{display:block;}
.dce-search-result-item{display:flex;align-items:center;gap:12px;padding:12px 16px;cursor:pointer;transition:background .2s;border-bottom:1px solid #f8fafc;}
.dce-search-result-item:hover{background:#f8fafc;}
.dce-search-result-type{font-size:10px;text-transform:uppercase;letter-spacing:1px;font-weight:800;color:#9ca3af;}
.dce-search-result-name{font-size:14px;font-weight:700;color:var(--navy);}

/* ═══════════════ V3 — CHARTS ═══════════════ */
.dce-chart-wrap{position:relative;height:260px;width:100%;}
.dce-mini-chart{height:160px;}

/* ═══════════════ V3 — STATUS TIMELINE ═══════════════ */
.dce-status-timeline{padding:8px 0;}
.dce-stl-item{display:flex;gap:14px;margin-bottom:16px;position:relative;}
.dce-stl-item::before{content:'';position:absolute;left:15px;top:28px;bottom:-16px;width:2px;background:#f0f4f8;}
.dce-stl-item:last-child::before{display:none;}
.dce-stl-dot{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:14px;flex-shrink:0;border:3px solid white;box-shadow:0 2px 8px rgba(0,0,0,.1);}
.dce-stl-dot.green{background:#dcfce7;color:#16a34a;}
.dce-stl-dot.teal{background:var(--teal-light);color:var(--teal);}
.dce-stl-dot.gold{background:#fef3c7;color:#d97706;}
.dce-stl-dot.grey{background:#f1f5f9;color:#94a3b8;}
.dce-stl-content{flex:1;padding-top:4px;}
.dce-stl-title{font-weight:700;font-size:13px;color:var(--navy);}
.dce-stl-detail{font-size:11px;color:#64748b;margin-top:2px;}
.dce-stl-date{font-size:10px;color:#9ca3af;margin-top:2px;}

/* ═══════════════ V3 — PROGRESS BAR ═══════════════ */
.dce-progress-bar{height:8px;background:#f0f4f8;border-radius:20px;overflow:hidden;margin-bottom:6px;}
.dce-progress-fill{height:100%;border-radius:20px;background:linear-gradient(90deg,var(--teal),var(--blue));transition:width .6s ease;}

/* ═══════════════ V3 — AVATAR ═══════════════ */
.dce-avatar{width:40px;height:40px;border-radius:50%;object-fit:cover;flex-shrink:0;}
.dce-avatar-placeholder{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-family:'Outfit',sans-serif;font-weight:800;font-size:16px;color:white;flex-shrink:0;}

/* ═══════════════ V3 — EMPTY STATE ═══════════════ */
.dce-empty-state{text-align:center;padding:52px 24px;}
.dce-empty-state .empty-icon{font-size:56px;margin-bottom:16px;opacity:.6;}
.dce-empty-state h3{font-family:'Outfit',sans-serif;font-weight:800;font-size:18px;color:var(--navy);margin-bottom:8px;}
.dce-empty-state p{font-size:14px;color:#9ca3af;margin-bottom:20px;}

/* ═══════════════ V3 — FILTER BAR ═══════════════ */
.dce-filter-bar{display:flex;align-items:center;gap:10px;margin-bottom:18px;flex-wrap:wrap;}
.dce-filter-bar input,.dce-filter-bar select{padding:8px 14px;border:2px solid #e5e7eb;border-radius:8px;font-size:13px;outline:none;font-family:'Nunito Sans',sans-serif;}
.dce-filter-bar input:focus,.dce-filter-bar select:focus{border-color:var(--teal);}
.dce-filter-pill{padding:6px 14px;border-radius:20px;font-size:12px;font-weight:700;font-family:'Outfit',sans-serif;cursor:pointer;border:2px solid #e5e7eb;background:white;color:#374151;transition:all .2s;}
.dce-filter-pill.active,.dce-filter-pill:hover{border-color:var(--teal);background:var(--teal-light);color:var(--teal);}

/* ═══════════════ V3 — PORTAL LOADING ═══════════════ */
.dce-skeleton{background:linear-gradient(90deg,#f0f4f8 25%,#e8edf2 50%,#f0f4f8 75%);background-size:400% 100%;animation:skeleton-shimmer 1.5s ease infinite;border-radius:8px;}
@keyframes skeleton-shimmer{0%{background-position:100% 0}100%{background-position:-100% 0}}
.dce-loading-overlay{position:fixed;inset:0;background:rgba(4,21,45,.6);z-index:99999;display:flex;align-items:center;justify-content:center;}
.dce-loading-spinner{width:48px;height:48px;border:4px solid rgba(255,255,255,.2);border-top-color:var(--teal);border-radius:50%;animation:spin .8s linear infinite;}
@keyframes spin{to{transform:rotate(360deg)}}

/* ═══════════════ V3 — RESPONSIVE ADMIN ═══════════════ */
@media(max-width:1200px){.dce-grid-2col{grid-template-columns:1fr;}}
@media(max-width:768px){
  .dce-stats-grid{grid-template-columns:repeat(2,1fr)!important;}
  .dce-filter-bar{flex-direction:column;align-items:stretch;}
  .dce-kanban{min-height:auto;}
  .dce-global-search input{width:180px;}
  .dce-global-search input:focus{width:220px;}
}

/* ═══════ V4 FINAL ADDITIONS ═══════ */

/* ── Admin page header with search ── */
.dce-search-wrap { position:relative; }
#dce-search-results { display:none; position:absolute; top:calc(100% + 6px); left:0; min-width:360px; background:white; border-radius:14px; box-shadow:0 20px 60px rgba(4,21,45,.18); z-index:9999; overflow:hidden; }

/* ── Full width stat grid variant ── */
.dce-stats-grid-4 { grid-template-columns:repeat(4,1fr); }
.dce-stats-grid-5 { grid-template-columns:repeat(5,1fr); }

/* ── Portal login page ── */
.dce-portal-login-wrap { display:flex; min-height:100vh; font-family:'Nunito Sans',sans-serif; }
.dce-lp-left { flex:0 0 420px; background:linear-gradient(160deg,var(--navy) 0%,#0a2647 50%,#1B5FC1 100%); padding:48px 40px; display:flex; flex-direction:column; position:relative; overflow:hidden; }
.dce-lp-wave { position:absolute; right:-1px; top:0; height:100%; width:60px; fill:white; }
.dce-lp-logo img { height:48px; margin-bottom:36px; }
.dce-lp-headline { font-family:'Outfit',sans-serif; font-size:clamp(30px,3vw,42px); font-weight:900; color:white; line-height:1.08; margin-bottom:20px; }
.dce-lp-headline span { color:var(--gold); }
.dce-lp-sub { color:rgba(255,255,255,.65); font-size:14px; line-height:1.7; margin-bottom:32px; }
.dce-lp-features { display:flex; flex-direction:column; gap:12px; }
.dce-lp-feat { display:flex; align-items:center; gap:12px; color:rgba(255,255,255,.75); font-size:13px; font-weight:600; }
.dce-lp-feat-icon { font-size:18px; }
.dce-lp-right { flex:1; display:flex; align-items:center; justify-content:center; padding:40px; background:#f8fafc; }
.dce-lp-form { background:white; border-radius:20px; padding:40px; width:100%; max-width:460px; box-shadow:0 8px 40px rgba(4,21,45,.08); }
.dce-lp-form-title { font-family:'Outfit',sans-serif; font-weight:800; font-size:24px; color:var(--navy); margin-bottom:4px; }
.dce-lp-form-sub { color:#64748b; font-size:13px; margin-bottom:24px; }
.dce-role-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-bottom:24px; }
.dce-role-card { border:2px solid #e5e7eb; border-radius:12px; padding:12px 8px; text-align:center; cursor:pointer; transition:all .2s; }
.dce-role-card.active, .dce-role-card:hover { border-color:var(--teal); background:var(--teal-light); }
.dce-rc-icon { font-size:22px; margin-bottom:4px; }
.dce-rc-label { font-size:11px; font-weight:700; color:var(--navy); font-family:'Outfit',sans-serif; }
.dce-lp-field { margin-bottom:16px; }
.dce-lp-field label { display:block; font-size:12px; font-weight:700; color:#374151; margin-bottom:6px; }
.dce-lp-field input { width:100%; padding:12px 14px; border:2px solid #e5e7eb; border-radius:10px; font-size:14px; font-family:'Nunito Sans',sans-serif; outline:none; transition:border-color .2s; box-sizing:border-box; }
.dce-lp-field input:focus { border-color:var(--teal); }
.dce-lp-signin-btn { width:100%; padding:14px; background:linear-gradient(135deg,var(--teal),var(--blue)); color:white; border:none; border-radius:12px; font-family:'Outfit',sans-serif; font-size:16px; font-weight:800; cursor:pointer; transition:opacity .2s; margin-bottom:12px; }
.dce-lp-signin-btn:hover { opacity:.92; }
.dce-lp-signin-btn:disabled { opacity:.6; cursor:not-allowed; }
.dce-login-msg { padding:10px 14px; border-radius:8px; font-size:13px; font-weight:600; margin-bottom:12px; }
.dce-login-error { background:#fee2e2; color:#dc2626; }
.dce-login-success { background:#dcfce7; color:#16a34a; }
.dce-lp-divider { text-align:center; color:#9ca3af; font-size:12px; margin:12px 0; position:relative; }
.dce-lp-divider::before,.dce-lp-divider::after { content:''; position:absolute; top:50%; width:42%; height:1px; background:#e5e7eb; }
.dce-lp-divider::before { left:0; } .dce-lp-divider::after { right:0; }
.dce-lp-apply-btn { display:block; width:100%; padding:13px; border:2px solid var(--teal); color:var(--teal); border-radius:12px; text-align:center; font-family:'Outfit',sans-serif; font-size:14px; font-weight:800; text-decoration:none; box-sizing:border-box; transition:all .2s; }
.dce-lp-apply-btn:hover { background:var(--teal); color:white; }

/* ── Client portal header ── */
.dce-cp-header { display:flex; align-items:center; gap:16px; padding:16px 24px; position:sticky; top:0; z-index:100; box-shadow:0 2px 16px rgba(4,21,45,.2); }
.dce-cp-logo { height:44px; flex-shrink:0; }
.dce-cp-header-info { flex:1; }
.dce-cp-title { font-family:'Outfit',sans-serif; font-weight:800; color:white; font-size:16px; }
.dce-cp-sub { color:rgba(255,255,255,.6); font-size:12px; }
.dce-cp-client-id { background:rgba(255,255,255,.15); color:white; padding:4px 12px; border-radius:20px; font-size:12px; font-weight:700; font-family:'Outfit',sans-serif; }
.dce-cp-header-right { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.dce-nav-badge { display:inline-flex; align-items:center; justify-content:center; width:18px; height:18px; background:var(--teal); color:white; border-radius:50%; font-size:10px; font-weight:800; margin-left:4px; }

/* ── Agent level badges ── */
.dce-agent-level { padding:3px 10px; border-radius:20px; font-size:11px; font-weight:800; font-family:'Outfit',sans-serif; }
.level-bronze { background:#ffedd5; color:#ea580c; }
.level-silver { background:#f1f5f9; color:#475569; }
.level-gold   { background:#fef3c7; color:#d97706; }
.level-platinum { background:#ede9fe; color:#7c3aed; }

/* ── Application timeline ── */
.dce-timeline { display:flex; gap:0; padding:12px 0; overflow-x:auto; }
.dce-tl-item { display:flex; flex-direction:column; align-items:center; min-width:80px; position:relative; }
.dce-tl-item:not(:last-child)::after { content:''; position:absolute; top:10px; left:50%; right:-50%; height:2px; background:#e5e7eb; z-index:0; }
.dce-tl-dot { width:22px; height:22px; border-radius:50%; border:3px solid white; box-shadow:0 0 0 2px #e5e7eb; background:#e5e7eb; z-index:1; flex-shrink:0; transition:all .3s; }
.dce-tl-item.done .dce-tl-dot { background:var(--teal); box-shadow:0 0 0 2px var(--teal); }
.dce-tl-item.active .dce-tl-dot { background:var(--gold); box-shadow:0 0 0 2px var(--gold); animation:pulse 2s infinite; }
.dce-tl-item.done::after,.dce-tl-item.active::after { background:var(--teal); }
.dce-tl-text { font-size:10px; text-align:center; margin-top:6px; color:#64748b; font-weight:600; max-width:72px; }
.dce-tl-item.active .dce-tl-text { color:var(--navy); font-weight:800; }
@keyframes pulse { 0%,100%{box-shadow:0 0 0 2px var(--gold);} 50%{box-shadow:0 0 0 5px rgba(244,166,33,.3);} }

/* ── Messaging ── */
.dce-chat-messages { min-height:200px; max-height:360px; overflow-y:auto; padding:16px; background:#f8fafc; border-radius:12px; display:flex; flex-direction:column; gap:12px; margin-bottom:14px; }
.dce-msg { max-width:76%; }
.dce-msg-mine { align-self:flex-end; }
.dce-msg-bubble { background:white; border:2px solid #f0f4f8; border-radius:14px 14px 4px 14px; padding:12px 16px; font-size:13px; line-height:1.6; color:#1a2840; }
.dce-msg-mine .dce-msg-bubble { background:linear-gradient(135deg,var(--teal),var(--blue)); color:white; border:none; border-radius:14px 14px 14px 4px; }
.dce-msg-meta { font-size:10px; color:#9ca3af; margin-top:4px; padding:0 4px; }
.dce-chat-input { display:flex; gap:8px; }
.dce-chat-input input { flex:1; padding:10px 14px; border:2px solid #e5e7eb; border-radius:10px; font-size:14px; font-family:'Nunito Sans',sans-serif; outline:none; }
.dce-chat-input input:focus { border-color:var(--teal); }

/* ── Invoice card ── */
.dce-invoice-card { display:flex; align-items:center; gap:16px; padding:16px; border:2px solid #f0f4f8; border-radius:14px; margin-bottom:10px; background:white; transition:all .2s; }
.dce-invoice-card:hover { border-color:var(--teal); }

/* ── Broadcast item ── */
.dce-broadcast-item { padding:16px; background:#f8fafc; border-radius:12px; margin-bottom:10px; border-left:4px solid var(--blue); }
.dce-broadcast-date { font-size:11px; color:#9ca3af; margin-bottom:4px; font-weight:700; text-transform:uppercase; letter-spacing:.5px; }
.dce-broadcast-title { font-family:'Outfit',sans-serif; font-weight:800; font-size:15px; color:var(--navy); margin-bottom:8px; }
.dce-broadcast-body { font-size:13px; color:#374151; line-height:1.7; }

/* ── Application wizard (12-step form) ── */
.af-header { background:linear-gradient(135deg,var(--navy),#0a2647); padding:20px 28px; display:flex; align-items:center; gap:16px; }
.af-header-title { font-family:'Outfit',sans-serif; font-weight:800; color:white; font-size:16px; }
.af-header-sub { color:rgba(255,255,255,.5); font-size:12px; }
.af-progress { background:#f0f4f8; padding:16px 28px; border-bottom:1px solid #e5e7eb; overflow-x:auto; }
.af-steps { display:flex; gap:0; min-width:max-content; }
.af-step { display:flex; flex-direction:column; align-items:center; min-width:88px; cursor:pointer; padding:0 4px; position:relative; }
.af-step:not(:last-child)::after { content:''; position:absolute; right:0; top:14px; width:50%; height:2px; background:#e5e7eb; }
.af-step.done::after,.af-step.active::after { background:var(--teal); }
.af-step-dot { width:28px; height:28px; border-radius:50%; background:#e5e7eb; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:800; color:#64748b; margin-bottom:6px; transition:all .3s; z-index:1; }
.af-step.active .af-step-dot { background:var(--teal); color:white; box-shadow:0 0 0 4px rgba(27,138,107,.2); }
.af-step.done .af-step-dot { background:var(--teal); color:white; }
.af-step-label { font-size:10px; text-align:center; color:#64748b; font-weight:600; font-family:'Outfit',sans-serif; }
.af-step.active .af-step-label { color:var(--teal); font-weight:800; }
.af-body { display:flex; min-height:calc(100vh - 200px); }
.af-sidebar { width:56px; background:var(--navy); flex-shrink:0; }
.af-content { flex:1; padding:32px 40px; max-width:720px; }
.af-section { display:none; }
.af-section.active { display:block; animation:fadeInUp .3s ease; }
@keyframes fadeInUp { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }
.af-section-title { font-family:'Outfit',sans-serif; font-weight:800; font-size:22px; color:var(--navy); margin-bottom:6px; }
.af-section-sub { color:#64748b; font-size:14px; margin-bottom:28px; }
.af-footer { padding:20px 40px; background:white; border-top:2px solid #f0f4f8; display:flex; justify-content:space-between; align-items:center; gap:12px; position:sticky; bottom:0; }
.af-footer-info { font-size:12px; color:#9ca3af; }

/* ── Responsive portal ── */
@media(max-width:900px){
  .dce-portal-login-wrap { flex-direction:column; }
  .dce-lp-left { flex:0 0 auto; padding:32px 28px; }
  .dce-lp-wave { display:none; }
  .af-content { padding:24px 20px; }
  .af-footer { padding:16px 20px; }
}
@media(max-width:640px){
  .dce-cp-header { flex-wrap:wrap; }
  .dce-cp-header-right { width:100%; justify-content:flex-end; }
  .dce-stats-grid { grid-template-columns:repeat(2,1fr) !important; }
  .dce-lp-right { padding:24px 20px; }
  .dce-lp-form { padding:28px 20px; }
  .dce-role-grid { grid-template-columns:repeat(2,1fr); }
}

/* ══ V4.1 ADMIN STYLES ════════════════════════════════════════════ */

/* -- CSS Variables -- */
:root {
  --teal: #1B8A6B; --teal-light: #e8f7f3;
  --blue: #1B5FC1; --navy: #04152D;
  --gold: #F4A621; --red: #dc2626;
  --green: #16a34a; --purple: #7c3aed;
  --orange: #ea580c; --cyan: #0891b2;
  --pink: #db2777;
}

/* -- Admin wrap -- */
.dce-admin-wrap { padding: 20px; font-family: 'Nunito Sans', sans-serif; }
.wrap.dce-admin-wrap { background: #f0f4f8; min-height: 100vh; padding: 20px; }

/* -- Page header -- */
.dce-page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; gap: 16px; flex-wrap: wrap; }
.dce-page-title { font-family: 'Outfit', sans-serif; font-weight: 900; font-size: 26px; color: var(--navy); margin: 0; }
.dce-page-sub { color: #64748b; font-size: 13px; margin: 4px 0 0; }
.dce-header-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* -- Cards -- */
.dce-card { background: white; border-radius: 16px; padding: 20px; margin-bottom: 16px; box-shadow: 0 2px 12px rgba(4,21,45,.06); }
.dce-card-title { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 15px; color: var(--navy); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.dce-grid-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dce-form-grid { display: grid; gap: 14px; }
.dce-grid-2 { grid-template-columns: 1fr 1fr; }
.dce-form-group { display: flex; flex-direction: column; gap: 5px; }
.dce-form-group.dce-full { grid-column: 1 / -1; }
.dce-form-label { font-size: 12px; font-weight: 700; color: #374151; }
.dce-form-input { padding: 10px 13px; border: 2px solid #e5e7eb; border-radius: 10px; font-size: 14px; font-family: 'Nunito Sans', sans-serif; outline: none; transition: border-color .2s; width: 100%; box-sizing: border-box; }
.dce-form-input:focus { border-color: var(--teal); }

/* -- Buttons -- */
.dce-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 8px; font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 13px; cursor: pointer; border: none; text-decoration: none; transition: all .2s; white-space: nowrap; }
.dce-btn-primary { background: linear-gradient(135deg, var(--teal), var(--blue)); color: white; }
.dce-btn-primary:hover { opacity: .9; color: white; }
.dce-btn-secondary { background: #f0f4f8; color: var(--navy); border: 2px solid #e5e7eb; }
.dce-btn-secondary:hover { border-color: var(--teal); color: var(--teal); background: var(--teal-light); }
.dce-btn-sm { padding: 5px 11px; font-size: 12px; border-radius: 6px; }

/* -- Tables -- */
.dce-table-scroll { overflow-x: auto; }
.dce-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dce-table th { text-align: left; padding: 10px 14px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; color: #64748b; border-bottom: 2px solid #f0f4f8; white-space: nowrap; }
.dce-table td { padding: 12px 14px; border-bottom: 1px solid #f8fafc; vertical-align: middle; }
.dce-table tr:last-child td { border-bottom: none; }
.dce-table tr:hover td { background: #fafcff; }
.dce-td-name { font-weight: 700; color: var(--navy); font-size: 13px; }
.dce-td-id { font-size: 11px; color: #9ca3af; font-weight: 700; margin-top: 2px; }

/* -- Filter bar -- */
.dce-filter-bar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }

/* -- Badges -- */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 800; font-family: 'Outfit', sans-serif; white-space: nowrap; }
.badge-green { background: #dcfce7; color: #16a34a; }
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-gold { background: #fef3c7; color: #d97706; }
.badge-red { background: #fee2e2; color: #dc2626; }
.badge-purple { background: #ede9fe; color: #7c3aed; }
.badge-teal { background: var(--teal-light); color: var(--teal); }
.badge-grey { background: #f1f5f9; color: #64748b; }
.badge-orange { background: #ffedd5; color: #ea580c; }

/* -- Stat cards -- */
.dce-stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); gap: 12px; margin-bottom: 16px; }
.dce-stat-card { background: white; border-radius: 14px; padding: 16px; text-align: center; cursor: pointer; transition: transform .2s, box-shadow .2s; box-shadow: 0 2px 10px rgba(4,21,45,.06); }
.dce-stat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(4,21,45,.1); }
.dce-stat-icon { font-size: 24px; margin-bottom: 8px; }
.dce-stat-num { font-family: 'Outfit', sans-serif; font-weight: 900; font-size: 22px; color: var(--navy); margin-bottom: 4px; }
.dce-stat-label { font-size: 11px; color: #64748b; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.dce-stat-card.dce-teal .dce-stat-num { color: var(--teal); }
.dce-stat-card.dce-blue .dce-stat-num { color: var(--blue); }
.dce-stat-card.dce-green .dce-stat-num { color: var(--green); }
.dce-stat-card.dce-red .dce-stat-num { color: var(--red); }
.dce-stat-card.dce-gold .dce-stat-num { color: var(--gold); }
.dce-stat-card.dce-orange .dce-stat-num { color: var(--orange); }
.dce-stat-card.dce-purple .dce-stat-num { color: var(--purple); }
.dce-stat-card.dce-navy .dce-stat-num { color: var(--navy); }

/* -- Status select -- */
.dce-status-select { padding: 5px 8px; border: 1.5px solid #e5e7eb; border-radius: 6px; font-size: 12px; font-family: 'Nunito Sans', sans-serif; cursor: pointer; }

/* -- Modal -- */
.dce-modal-overlay { position: fixed; inset: 0; background: rgba(4,21,45,.5); z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(4px); }
.dce-modal-overlay.dce-hidden { display: none !important; }
.dce-modal { background: white; border-radius: 20px; width: 100%; max-width: 700px; max-height: 88vh; display: flex; flex-direction: column; box-shadow: 0 24px 80px rgba(4,21,45,.25); }
.dce-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 2px solid #f0f4f8; flex-shrink: 0; }
.dce-modal-title { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 18px; color: var(--navy); }
.dce-modal-close { background: #f0f4f8; border: none; width: 32px; height: 32px; border-radius: 50%; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #64748b; transition: all .2s; }
.dce-modal-close:hover { background: #fee2e2; color: #dc2626; }
#dce-modal-body { padding: 20px 24px; overflow-y: auto; flex: 1; }

/* -- Alert -- */
.dce-alert { padding: 12px 16px; border-radius: 10px; font-size: 13px; line-height: 1.5; }
.dce-alert-info { background: #dbeafe; color: #1d4ed8; border-left: 4px solid #1B5FC1; }
.dce-alert-warning { background: #fef3c7; color: #d97706; border-left: 4px solid var(--gold); }
.dce-alert-success { background: #dcfce7; color: #16a34a; border-left: 4px solid var(--green); }

/* -- Toast -- */
.dce-toast { position: fixed; bottom: 28px; right: 28px; padding: 14px 22px; border-radius: 12px; font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 14px; z-index: 999999; transform: translateY(80px); opacity: 0; transition: all .3s cubic-bezier(.34,1.56,.64,1); max-width: 380px; pointer-events: none; }
.dce-toast.dce-toast-show { transform: translateY(0); opacity: 1; }
.dce-toast-success { background: var(--navy); color: white; box-shadow: 0 8px 30px rgba(4,21,45,.3); }
.dce-toast-error { background: var(--red); color: white; box-shadow: 0 8px 30px rgba(220,38,38,.3); }

/* -- Chat messages -- */
.dce-chat-messages { min-height: 120px; padding: 14px; background: #f8fafc; border-radius: 12px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.dce-msg { max-width: 78%; }
.dce-msg-mine { align-self: flex-end; }
.dce-msg-bubble { background: white; border: 2px solid #f0f4f8; border-radius: 14px 14px 4px 14px; padding: 10px 14px; font-size: 13px; line-height: 1.6; color: #1a2840; }
.dce-msg-mine .dce-msg-bubble { background: linear-gradient(135deg, var(--teal), var(--blue)); color: white; border: none; border-radius: 14px 14px 14px 4px; }
.dce-msg-meta { font-size: 10px; color: #9ca3af; margin-top: 4px; padding: 0 4px; }

/* -- Portal page -- */
.dce-portal-page { margin: 0; padding: 0; }

/* -- Review rows -- */
.review-row { display: flex; padding: 8px 0; border-bottom: 1px solid #f8fafc; gap: 12px; }
.review-key { font-size: 12px; font-weight: 700; color: #64748b; width: 140px; flex-shrink: 0; }
.review-val { font-size: 13px; color: #1a2840; }

/* -- Responsive -- */
@media(max-width: 900px) {
  .dce-grid-2col { grid-template-columns: 1fr; }
  .dce-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dce-modal { max-width: 100%; }
}

/* ═══ MOBILE RESPONSIVE — Full App-Like Experience ═══ */
@media(max-width: 768px) {
  /* Admin panels */
  .dce-grid-2col { grid-template-columns: 1fr !important; }
  .dce-stats-grid { grid-template-columns: repeat(2,1fr) !important; }
  .dce-page-header { flex-direction: column; align-items: flex-start; }
  .dce-header-actions { flex-wrap: wrap; gap: 6px; }
  .dce-table th, .dce-table td { padding: 8px; font-size: 12px; }
  .dce-modal { max-width: 100%; margin: 0; border-radius: 16px 16px 0 0; position: fixed; bottom: 0; }
  .dce-modal-overlay { align-items: flex-end; padding: 0; }
  .dce-form-grid.dce-grid-2 { grid-template-columns: 1fr !important; }
  .dce-form-group.dce-full { grid-column: 1; }

  /* Client portal sidebar → bottom nav on mobile */
  #cpx-sb {
    position: fixed !important;
    bottom: 0; left: 0; right: 0;
    top: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: auto !important;
    flex-direction: row;
    background: #04152D;
    z-index: 1000;
    border-top: 2px solid rgba(255,255,255,.1);
    overflow: visible;
  }
  #cpx-sb .cpx-sb-top,
  #cpx-sb .cpx-profile-block,
  #cpx-sb .cpx-sb-foot { display: none !important; }
  #cpx-sb .cpx-nav {
    display: flex;
    flex-direction: row;
    padding: 0;
    overflow-x: auto;
    width: 100%;
    justify-content: space-around;
    scrollbar-width: none;
  }
  #cpx-sb .cpx-nav::-webkit-scrollbar { display: none; }
  #cpx-sb .cpx-nb {
    flex-direction: column;
    gap: 2px;
    padding: 8px 4px;
    min-width: 56px;
    border-left: none !important;
    border-top: 3px solid transparent;
    border-radius: 0;
    font-size: 9px;
    text-align: center;
    justify-content: center;
    margin: 0;
  }
  #cpx-sb .cpx-nb-a {
    border-top: 3px solid #1B8A6B !important;
    background: rgba(255,255,255,.05) !important;
  }
  #cpx-sb .cpx-nb-ic { font-size: 20px; }
  #cpx-sb .cpx-nb-tx { font-size: 9px; display: block; }
  #cpx-sb .cpx-badge { top: 2px; right: 2px; font-size: 8px; padding: 1px 4px; }

  /* Main content with bottom nav padding */
  #cpx-main {
    max-width: 100vw !important;
    padding: 16px 12px 80px !important;
    overflow-x: hidden;
  }

  /* Stats cards */
  .cpx-stats-row { grid-template-columns: repeat(2,1fr) !important; gap: 8px; }
  .cpx-sc { padding: 12px; }
  .cpx-sc-ic { font-size: 20px; }
  .cpx-sc-n { font-size: 16px; }

  /* Hero status flow */
  .cpx-hero { padding: 16px; }
  .cpx-hero-top { flex-direction: column; }
  .cpx-flow { gap: 0; padding: 8px 0; }
  .cpx-fn { min-width: 60px; }
  .cpx-fn-dot { width: 24px; height: 24px; font-size: 9px; }
  .cpx-fn-lbl { font-size: 7px; max-width: 56px; }
  .cpx-fline { min-width: 6px; height: 2px; }

  /* Messages compose */
  .cpx-compose-toolbar { flex-wrap: wrap; }
  .cpx-thread { max-height: 280px; }

  /* Tables */
  .cpx-tbl { font-size: 12px; }
  .cpx-tbl th, .cpx-tbl td { padding: 8px; }

  /* Profile grid */
  .cpx-pf-grid { grid-template-columns: 1fr !important; }
  .cpx-pf-field { grid-column: 1 !important; }

  /* Modals */
  #cpx-detail-modal { padding: 0; align-items: flex-end; }
  #cpx-dm-box { border-radius: 20px 20px 0 0; max-height: 92vh; }

  /* Form overlay */
  #cpx-form-overlay { padding-bottom: 80px; }

  /* H1 sizing */
  .cpx-h1 { font-size: 20px; }
}

@media(max-width: 480px) {
  .cpx-stats-row { grid-template-columns: repeat(2,1fr) !important; }
  .cpx-hero-h2 { font-size: 16px; }
  #cpx-main { padding: 12px 10px 80px !important; }
}

/* ═══ RICH MESSAGE BOX — Admin ═══ */
.rmb-wrap { border: 2px solid #f0f4f8; border-radius: 14px; overflow: hidden; background: white; }
.rmb-top-bar { display: flex; gap: 10px; padding: 10px 12px; background: #f8fafc; border-bottom: 1px solid #f0f4f8; flex-wrap: wrap; }
.rmb-cc-wrap { flex: 1; min-width: 200px; }
.rmb-cc-dropdown { display: none; position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: white; border-radius: 10px; box-shadow: 0 8px 24px rgba(4,21,45,.15); z-index: 200; max-height: 220px; overflow-y: auto; border: 1px solid #f0f4f8; }
.rmb-cc-opt { padding: 10px 14px; cursor: pointer; border-bottom: 1px solid #f8fafc; font-size: 13px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rmb-cc-opt:hover { background: #f0fdf9; }
.rmb-role-tag { background: #e8f7f3; color: #1B8A6B; padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 700; }
.rmb-cc-tag { background: #dbeafe; color: #1B5FC1; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; cursor: default; }
.rmb-cc-tag span { cursor: pointer; opacity: .7; font-size: 14px; line-height: 1; }
.rmb-cc-tag span:hover { opacity: 1; color: #dc2626; }
.rmb-toolbar { display: flex; align-items: center; gap: 4px; padding: 7px 12px; background: #f8fafc; border-bottom: 1px solid #f0f4f8; }
.rmb-toolbar button { background: white; border: 1px solid #e5e7eb; padding: 5px 10px; border-radius: 6px; cursor: pointer; font-size: 13px; transition: all .15s; color: #374151; }
.rmb-toolbar button:hover { border-color: #1B8A6B; color: #1B8A6B; background: #f0fdf9; }
.rmb-attach-btn { background: white; border: 1px solid #e5e7eb; padding: 5px 12px; border-radius: 6px; cursor: pointer; font-size: 12px; font-weight: 600; color: #374151; transition: all .15s; }
.rmb-attach-btn:hover { border-color: #1B8A6B; color: #1B8A6B; }
.rmb-editor { min-height: 120px; max-height: 280px; overflow-y: auto; padding: 14px 16px; font-size: 14px; line-height: 1.8; outline: none; color: #04152D; font-family: 'Nunito Sans', sans-serif; }
.rmb-editor:empty:before { content: attr(data-placeholder); color: #9ca3af; pointer-events: none; }
.rmb-attach-prev { padding: 8px 14px; font-size: 12px; color: #64748b; background: #f8fafc; border-top: 1px solid #f0f4f8; display: flex; align-items: center; gap: 8px; }
.rmb-footer { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: #f8fafc; border-top: 2px solid #f0f4f8; }
.rmb-thread { display: flex; flex-direction: column; gap: 12px; padding: 16px; background: #f8fafc; border-radius: 10px; max-height: 320px; overflow-y: auto; margin-bottom: 12px; }
.rmb-msg { display: flex; gap: 10px; align-items: flex-start; }
.rmb-msg-mine { flex-direction: row-reverse; }
.rmb-av { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: white; flex-shrink: 0; font-family: 'Outfit', sans-serif; }
.rmb-av-admin { background: linear-gradient(135deg,#1B8A6B,#1B5FC1); }
.rmb-av-client { background: linear-gradient(135deg,#F59E0B,#EF4444); }
.rmb-bubble { max-width: 76%; }
.rmb-bubble-inner { background: white; border: 2px solid #f0f4f8; border-radius: 14px 14px 14px 3px; padding: 10px 14px; font-size: 13px; line-height: 1.7; }
.rmb-msg-mine .rmb-bubble-inner { background: linear-gradient(135deg,#1B8A6B,#1B5FC1); color: white; border: none; border-radius: 14px 14px 3px 14px; }
.rmb-meta { font-size: 10px; color: #9ca3af; margin-top: 4px; padding: 0 4px; }
