
/* =========================================================
   WHRO SIGN RC3
   Richer, higher-contrast visual system
   ========================================================= */

:root{
  --rc3-navy:#003b5c;
  --rc3-navy-deep:#002d46;
  --rc3-blue:#005f86;
  --rc3-blue-bright:#0079a5;
  --rc3-gold:#f2cd00;

  --rc3-ink:#172832;
  --rc3-muted:#596b74;
  --rc3-soft-muted:#75868e;

  --rc3-bg:#e8eef1;
  --rc3-bg-warm:#f1f3f2;
  --rc3-surface:#ffffff;
  --rc3-surface-soft:#f6f7f6;

  --rc3-line:#c7d2d7;
  --rc3-line-strong:#aebdc4;

  --rc3-success:#187453;
  --rc3-success-soft:#e3f3eb;
  --rc3-warning:#8d6910;
  --rc3-danger:#a9362e;

  --rc3-shadow-sm:0 3px 10px rgba(20,45,57,.09);
  --rc3-shadow:0 12px 32px rgba(17,44,57,.12);
  --rc3-shadow-lg:0 24px 65px rgba(12,37,49,.17);
}


/* ---------- Overall application ---------- */

body,
.whro-unified,
.portal7,
.s2-body{
  color:var(--rc3-ink);
}

.whro-studio-page,
.whro-signing-page,
.portal7{
  background:
    radial-gradient(circle at 92% 0,rgba(0,95,134,.09),transparent 28%),
    linear-gradient(180deg,#edf2f4 0,#e5ecef 100%) !important;
}


/* ---------- Main WHRO shell ---------- */

.whro-shell-header{
  background:linear-gradient(135deg,var(--rc3-navy-deep),var(--rc3-navy) 58%,#00587a) !important;
  border:0 !important;
  box-shadow:0 6px 24px rgba(0,35,53,.22);
  color:#fff;
}

.whro-shell-header-inner{
  min-height:78px;
}

.whro-shell-brand img{
  background:#fff;
  border-radius:6px;
  padding:3px;
}

.whro-shell-brand-rule{
  background:rgba(255,255,255,.28) !important;
}

.whro-shell-product strong{
  color:#fff !important;
  font-weight:850;
}

.whro-shell-product small{
  color:#bcd3dc !important;
}

.whro-shell-nav a{
  color:#d7e5ea !important;
  border-radius:9px;
  transition:background .15s ease,color .15s ease,transform .15s ease;
}

.whro-shell-nav a:hover{
  background:rgba(255,255,255,.09) !important;
  color:#fff !important;
}

.whro-shell-nav a.active{
  background:rgba(255,255,255,.13) !important;
  color:#fff !important;
  box-shadow:inset 0 -3px 0 var(--rc3-gold);
}

.whro-shell-nav-icon{
  color:#d8e9ef;
}

.whro-shell-account{
  color:#fff;
}

.whro-shell-usercopy strong{
  color:#fff !important;
}

.whro-shell-usercopy small{
  color:#b5cbd4 !important;
}

.whro-shell-avatar{
  background:#fff !important;
  color:var(--rc3-navy) !important;
  box-shadow:0 3px 10px rgba(0,0,0,.18);
}

.whro-shell-trust{
  background:rgba(12,93,74,.32) !important;
  border-color:rgba(164,225,204,.28) !important;
  color:#d7f0e7 !important;
}

.whro-shell-trust-dot{
  background:#55c795 !important;
  box-shadow:0 0 0 4px rgba(85,199,149,.15);
}

.whro-shell-theme,
.whro-shell-logout{
  color:#e8f1f4 !important;
  border-color:rgba(255,255,255,.22) !important;
  background:rgba(255,255,255,.06) !important;
}

.whro-shell-theme:hover,
.whro-shell-logout:hover{
  background:rgba(255,255,255,.13) !important;
}

.whro-shell-accent{
  height:5px !important;
  background:var(--rc3-gold) !important;
}

.whro-shell-accent span{
  display:block;
  width:32%;
  height:100%;
  background:#0081ad;
}


/* ---------- Main content ---------- */

.whro-shell-main{
  width:min(1500px,calc(100% - 48px));
  margin-left:auto;
  margin-right:auto;
}

.studio-page-head,
.p8-document-hero,
.upload8-hero{
  margin-top:10px;
}

.studio-page-head h1,
.p8-document-titleblock h1,
.upload8-hero h1{
  color:#122f3b !important;
  letter-spacing:-.04em;
  font-weight:850;
}

.studio-page-head p,
.p8-document-subtitle,
.upload8-hero p{
  color:var(--rc3-muted) !important;
  line-height:1.55;
}

.eyebrow,
.portal7-kicker,
.p8-card-kicker{
  color:var(--rc3-blue) !important;
  font-weight:900 !important;
  letter-spacing:.13em !important;
}


/* ---------- Surfaces / cards ---------- */

.surface,
.p8-card,
.studio-library,
.metric-strip article,
.admin-panel,
.admin-health-card,
.admin-form-card,
.portal7-auth-card{
  background:var(--rc3-surface) !important;
  border:1px solid var(--rc3-line) !important;
  box-shadow:var(--rc3-shadow-sm) !important;
}

.surface:hover,
.metric-strip article:hover{
  border-color:#aebfc7 !important;
}

.metric-strip article{
  border-top:4px solid var(--rc3-navy) !important;
}

.metric-strip article:nth-child(2){
  border-top-color:var(--rc3-blue) !important;
}

.metric-strip article:nth-child(3){
  border-top-color:var(--rc3-gold) !important;
}

.metric-strip article span{
  color:#657780 !important;
  font-weight:800;
}

.metric-strip article strong{
  color:#153642 !important;
}

.metric-strip article small{
  color:#798991 !important;
}


/* ---------- Buttons ---------- */

.cta,
.portal7-btn-primary,
.studio-send-primary,
.s2-adopt,
.s2-finish{
  background:linear-gradient(180deg,#087ca7,#00577b) !important;
  border-color:#004d6d !important;
  color:#fff !important;
  box-shadow:0 7px 17px rgba(0,79,113,.21) !important;
}

.cta:hover,
.portal7-btn-primary:hover,
.studio-send-primary:hover,
.s2-adopt:hover,
.s2-finish:not(:disabled):hover{
  background:linear-gradient(180deg,#006f97,#004765) !important;
  transform:translateY(-1px);
  box-shadow:0 10px 22px rgba(0,65,92,.25) !important;
}

.cta span,
.portal7-btn-primary span{
  color:var(--rc3-gold);
}

.secondary,
.secondary-button,
.portal7-btn-secondary,
.studio-link-button:not(.cta){
  background:#fff !important;
  color:#284956 !important;
  border:1px solid #bbc9cf !important;
}

.secondary:hover,
.secondary-button:hover,
.portal7-btn-secondary:hover{
  background:#f2f6f7 !important;
  border-color:#8da5af !important;
}


/* ---------- Inputs ---------- */

input,
select,
textarea{
  border-color:#b8c7cd !important;
}

input:focus,
select:focus,
textarea:focus{
  border-color:#00749e !important;
  box-shadow:0 0 0 3px rgba(0,116,158,.13) !important;
}

.studio-search,
.studio-filterbar select{
  background:#fff !important;
}


/* ---------- Document table ---------- */

.studio-library{
  overflow:hidden;
}

.studio-filterbar{
  background:#f4f6f6 !important;
  border-bottom:1px solid var(--rc3-line) !important;
}

.studio-table-head{
  background:#e5ebee !important;
  color:#50656e !important;
  border-color:#cbd6da !important;
}

.studio-table-row{
  background:#fff !important;
  border-color:#dfe6e9 !important;
  transition:background .14s ease,transform .14s ease;
}

.studio-table-row:hover{
  background:#f0f6f8 !important;
}

.studio-doc-cell strong,
.studio-table-row strong{
  color:#213e49 !important;
}

.studio-table-row small{
  color:#71838b !important;
}

.studio-file-icon{
  background:#e6f0f4 !important;
  color:#005d82 !important;
  border:1px solid #cbdde4;
}

.studio-row-arrow{
  color:#006d97 !important;
}


/* ---------- Status ---------- */

.studio-status.completed,
.portal7-status-completed{
  color:#176a50 !important;
  background:#e2f2ea !important;
  border-color:#bbddce !important;
}

.studio-status.sent,
.portal7-status-sent{
  color:#74570c !important;
  background:#fff5cc !important;
  border-color:#ead57b !important;
}

.studio-status.viewed,
.portal7-status-viewed{
  color:#005d80 !important;
  background:#e0eff5 !important;
  border-color:#b9d6e1 !important;
}

.studio-status.draft,
.portal7-status-draft{
  color:#55666e !important;
  background:#edf1f2 !important;
  border-color:#ced8dc !important;
}


/* ---------- Document detail ---------- */

.p8-status-strip{
  background:#eef6f3 !important;
  border:1px solid #c7ded5 !important;
  box-shadow:var(--rc3-shadow-sm);
}

.p8-detail-grid .p8-card{
  border-radius:14px !important;
}

.p8-meta-list > div,
.p8-recipient-row{
  border-color:#dce4e7 !important;
}

.p8-hash code{
  background:#eef2f3;
  color:#34505b;
}


/* ---------- Timeline ---------- */

.p8-timeline{
  border-left-color:#b9cbd2 !important;
}

.p8-event-dot{
  background:var(--rc3-blue) !important;
  box-shadow:0 0 0 4px #e1edf1;
}


/* ---------- Authentication ---------- */

.portal7-auth-shell{
  gap:40px !important;
}

.portal7-auth-brand{
  background:
    radial-gradient(circle at 80% 15%,rgba(242,205,0,.16),transparent 25%),
    linear-gradient(145deg,#00334f,#005b7d) !important;
  color:#fff !important;
  border-radius:22px !important;
  box-shadow:var(--rc3-shadow-lg) !important;
}

.portal7-auth-brand .portal7-kicker{
  color:#f5dc54 !important;
}

.portal7-auth-brand h1{
  color:#fff !important;
}

.portal7-auth-brand p{
  color:#d3e3e9 !important;
}

.portal7-trust-list span{
  color:#e5f1f4 !important;
}

.portal7-auth-card{
  border-radius:18px !important;
  box-shadow:var(--rc3-shadow) !important;
}


/* ---------- Admin ---------- */

.admin-subnav{
  background:#dfe7ea !important;
  border:1px solid #c4d0d5 !important;
}

.admin-subnav a{
  color:#405965 !important;
}

.admin-subnav a.active{
  background:var(--rc3-navy) !important;
  color:#fff !important;
}

.admin-table-head{
  background:#e4eaed !important;
  color:#52666f !important;
}

.admin-table-row{
  border-color:#dce4e7 !important;
}

.admin-health-card{
  border-top:4px solid var(--rc3-blue) !important;
}


/* ---------- Signer ---------- */

.s2-body{
  background:
    radial-gradient(circle at 90% 0,rgba(0,95,134,.08),transparent 25%),
    linear-gradient(180deg,#eaf0f2,#dce5e9) !important;
}

.s2-topbar{
  background:linear-gradient(135deg,#003850,#005a79) !important;
  color:#fff !important;
  border-bottom:0 !important;
  box-shadow:0 7px 23px rgba(0,35,50,.21);
}

.s2-brand strong{
  color:#fff !important;
}

.s2-brand>span{
  background:rgba(255,255,255,.25) !important;
}

.s2-brand:after{
  color:#c2d6de !important;
}

.s2-signer strong{
  color:#fff !important;
}

.s2-signer small{
  color:#c1d2d8 !important;
}

.s2-docbar{
  background:#f8faf9 !important;
}

.s2-viewer-card,
.s2-assistant{
  border-color:#bfcdd3 !important;
  box-shadow:0 16px 42px rgba(13,43,56,.14) !important;
}

.s2-viewer{
  background:linear-gradient(180deg,#aebdc4,#9fadb4) !important;
}

.s2-viewer-toolbar{
  background:linear-gradient(180deg,#263b45,#192c34) !important;
}

.s2-task-card,
.s2-help-card,
.s2-trust-card,
.s2-finish-card{
  border-color:#cbd7dc !important;
  box-shadow:0 4px 13px rgba(20,55,69,.06) !important;
}


/* ---------- Sender signed-document preview ---------- */

.sender-preview{
  background:linear-gradient(180deg,#e9eff2,#dce5e9) !important;
}

.sender-preview-head{
  background:linear-gradient(135deg,#003b5c,#005a7c) !important;
  border:0 !important;
  color:#fff;
  box-shadow:0 6px 22px rgba(0,44,65,.18);
}

.sender-preview-head strong{
  color:#fff !important;
}

.sender-preview-head small{
  color:#c9dce3 !important;
}

.sender-preview-actions a{
  background:rgba(255,255,255,.1) !important;
  border-color:rgba(255,255,255,.28) !important;
  color:#fff !important;
}

.sender-preview-actions a.primary{
  background:var(--rc3-gold) !important;
  border-color:var(--rc3-gold) !important;
  color:#17343f !important;
}

.sender-pdf-shell{
  border-color:#9eafb6 !important;
  box-shadow:0 22px 58px rgba(12,40,52,.18) !important;
}

.sender-pdf-stage{
  background:linear-gradient(180deg,#aebbc1,#98a8af) !important;
}


/* ---------- Footer ---------- */

.whro-shell-footer{
  background:#d8e1e5 !important;
  border-top:1px solid #bdcbd1 !important;
  color:#536a74 !important;
}

.whro-shell-footer strong{
  color:#294752 !important;
}


/* ---------- Mobile ---------- */

@media(max-width:900px){

  .whro-shell-main{
    width:calc(100% - 22px);
  }

  .whro-shell-header-inner{
    min-height:68px;
  }

  .studio-page-head{
    gap:18px;
  }
}

@media(max-width:720px){

  .whro-shell-header{
    box-shadow:0 4px 15px rgba(0,35,53,.2);
  }

  .whro-shell-main{
    width:calc(100% - 14px);
  }

  .studio-page-head h1{
    font-size:2rem !important;
  }

  .metric-strip{
    gap:8px !important;
  }

  .metric-strip article{
    border-top-width:3px !important;
  }

  .studio-library{
    border-radius:11px !important;
  }

  .portal7-auth-brand{
    border-radius:15px !important;
  }
}


/* ---------- Dark mode remains genuinely dark ---------- */

html[data-theme="dark"] body,
html[data-theme="dark"] .whro-studio-page,
html[data-theme="dark"] .whro-signing-page{
  background:#0d161b !important;
  color:#e6eff2 !important;
}

html[data-theme="dark"] .surface,
html[data-theme="dark"] .p8-card,
html[data-theme="dark"] .studio-library,
html[data-theme="dark"] .metric-strip article,
html[data-theme="dark"] .portal7-auth-card{
  background:#162228 !important;
  border-color:#314149 !important;
  color:#e7f0f3 !important;
}

html[data-theme="dark"] .studio-table-row{
  background:#162228 !important;
  border-color:#293940 !important;
}

html[data-theme="dark"] .studio-table-row:hover{
  background:#1d2d34 !important;
}

html[data-theme="dark"] .studio-table-head,
html[data-theme="dark"] .studio-filterbar{
  background:#111c21 !important;
  border-color:#304149 !important;
}

html[data-theme="dark"] .studio-table-row strong,
html[data-theme="dark"] .studio-doc-cell strong{
  color:#e6eff2 !important;
}

html[data-theme="dark"] .studio-table-row small{
  color:#94a7af !important;
}

