/* Factwell Data — commercial refinement v2
   Visual-only layer loaded after commercial_polish.css. */

:root{
  --refine-navy:#102a44;
  --refine-navy-deep:#0a2034;
  --refine-gold:#bd9254;
  --refine-gold-pale:#f6ede0;
  --refine-surface:#ffffff;
  --refine-line:#e1e6ea;
  --refine-muted:#74808c;
  --refine-shadow:0 24px 70px rgba(15,39,64,.09),0 3px 14px rgba(15,39,64,.04);
}

::selection{background:rgba(189,146,84,.22);color:#0c2237}

body{
  background:
    radial-gradient(circle at 84% -2%,rgba(189,146,84,.085),transparent 25%),
    radial-gradient(circle at 18% 96%,rgba(77,121,154,.04),transparent 32%),
    linear-gradient(180deg,#f8f9fa 0%,#f3f5f7 34%,#f2f4f6 100%);
}

/* Brand refinements */
.brand-mark{position:relative;isolation:isolate}
.brand-mark::after{
  content:"";
  position:absolute;
  inset:4px;
  border:1px solid rgba(255,255,255,.2);
  border-radius:10px;
  pointer-events:none;
}
.brand strong{font-family:Georgia,"Times New Roman",serif;font-weight:600}

.topbar{border-bottom:1px solid rgba(218,224,230,.76)}
.topbar::after{
  content:"";
  position:absolute;
  inset:auto 0 -1px 0;
  height:1px;
  background:linear-gradient(90deg,transparent,rgba(189,146,84,.22),transparent);
  pointer-events:none;
}

/* Premium workspace hero */
.workspace-hero{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1.35fr) minmax(300px,.65fr);
  gap:34px;
  align-items:stretch;
  margin:0 0 30px;
  padding:34px 36px;
  overflow:hidden;
  border:1px solid #dfe5e9;
  border-radius:22px;
  background:
    radial-gradient(circle at 92% 4%,rgba(189,146,84,.18),transparent 27%),
    linear-gradient(140deg,#ffffff 0%,#fbfcfd 58%,#f8f5ef 100%);
  box-shadow:var(--refine-shadow);
}
.workspace-hero::before{
  content:"";
  position:absolute;
  width:220px;
  height:220px;
  right:-90px;
  bottom:-110px;
  border:1px solid rgba(189,146,84,.16);
  border-radius:50%;
  box-shadow:0 0 0 44px rgba(189,146,84,.045),0 0 0 88px rgba(189,146,84,.018);
  pointer-events:none;
}
.workspace-hero-copy,.workspace-hero-aside{position:relative;z-index:1}
.workspace-hero-copy{display:flex;flex-direction:column;justify-content:center;min-width:0}
.workspace-hero-copy h1{
  max-width:850px;
  margin:10px 0 12px;
  color:var(--refine-navy);
  font-family:Georgia,"Times New Roman",serif;
  font-size:clamp(38px,4vw,56px);
  font-weight:600;
  line-height:1.04;
  letter-spacing:-.048em;
}
.workspace-hero-copy p{max-width:760px;margin:0;color:#6f7b87;font-size:16px;line-height:1.72}
.workspace-hero-meta{display:flex;flex-wrap:wrap;gap:9px;margin-top:22px}
.workspace-meta-chip{
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:32px;
  padding:6px 10px;
  border:1px solid #e1e6e9;
  border-radius:999px;
  background:rgba(255,255,255,.76);
  color:#65717d;
  font-size:11px;
  font-weight:750;
  box-shadow:0 5px 16px rgba(15,39,64,.035);
}
.workspace-meta-chip::before{content:"";width:6px;height:6px;border-radius:50%;background:#bd9254;box-shadow:0 0 0 3px rgba(189,146,84,.1)}

.workspace-hero-aside{
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:22px;
  border:1px solid rgba(201,181,149,.52);
  border-radius:17px;
  background:rgba(255,255,255,.7);
  backdrop-filter:blur(10px);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9);
}
.workspace-hero-aside-label{margin-bottom:13px;color:#9a7440;font-size:10px;font-weight:850;letter-spacing:.14em;text-transform:uppercase}
.module-rail{display:grid;gap:9px}
.module-chip{
  display:grid;
  grid-template-columns:38px minmax(0,1fr);
  gap:12px;
  align-items:center;
  padding:11px 12px;
  border:1px solid #e5e9ec;
  border-radius:12px;
  background:rgba(255,255,255,.86);
}
.module-chip-index{
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  border-radius:11px;
  background:linear-gradient(145deg,#f8f0e5,#f2e4d1);
  color:#8f6835;
  font-family:Georgia,"Times New Roman",serif;
  font-size:15px;
  font-weight:700;
}
.module-chip strong{display:block;color:#24364a;font-size:12px;letter-spacing:.025em}
.module-chip small{display:block;margin-top:2px;color:#8a949e;font-size:10.5px;line-height:1.35}

/* Section headers */
.workspace-section-head{
  display:flex;
  justify-content:space-between;
  gap:22px;
  align-items:flex-end;
  margin:0 0 17px;
}
.workspace-section-head h2{margin:6px 0 0;color:var(--refine-navy);font-size:23px;letter-spacing:-.025em}
.workspace-section-head p{max-width:650px;margin:0;color:#7a8691;font-size:12.5px;line-height:1.6}

/* Richer organisation/project cards */
.card-grid{grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}
.organization-card,.project-card{
  position:relative;
  overflow:hidden;
  isolation:isolate;
}
.organization-card::after,.project-card::after{
  content:"";
  position:absolute;
  right:-36px;
  bottom:-50px;
  width:130px;
  height:130px;
  border:1px solid rgba(189,146,84,.12);
  border-radius:50%;
  z-index:-1;
  transition:transform .22s ease,border-color .22s ease;
}
.organization-card:hover::after,.project-card:hover::after{transform:scale(1.12);border-color:rgba(189,146,84,.22)}
.organization-card-top,.project-card-top{position:relative;z-index:1}
.organization-card h2,.project-card h2{position:relative;z-index:1;color:#1a3046}
.organization-card p,.project-card p{position:relative;z-index:1;max-width:320px;line-height:1.6}
.organization-card .card-link,.project-card .card-link{position:relative;z-index:1;margin-top:auto}
.card-supporting-meta{display:flex;flex-wrap:wrap;gap:7px;margin:14px 0 0}
.card-supporting-meta span{
  padding:5px 8px;
  border:1px solid #e6e9eb;
  border-radius:999px;
  background:#fafbfb;
  color:#818b94;
  font-size:9.5px;
  font-weight:750;
  letter-spacing:.035em;
  text-transform:uppercase;
}

/* Organisation overview */
.organization-identity{
  display:flex;
  align-items:center;
  gap:16px;
  margin-bottom:13px;
}
.organization-hero-mark{
  display:grid;
  place-items:center;
  flex:0 0 auto;
  width:54px;
  height:54px;
  border-radius:16px;
  background:linear-gradient(145deg,#173a59,#0f2943);
  color:#e4c695;
  font-family:Georgia,"Times New Roman",serif;
  font-size:24px;
  box-shadow:0 12px 28px rgba(15,39,64,.17),inset 0 1px 0 rgba(255,255,255,.11);
}
.organization-hero-title h1{margin:2px 0 0}
.organization-statline{display:flex;flex-wrap:wrap;gap:10px;margin-top:20px}
.organization-stat{
  min-width:118px;
  padding:10px 12px;
  border:1px solid #e4e8eb;
  border-radius:11px;
  background:rgba(255,255,255,.72);
}
.organization-stat strong{display:block;color:#26384a;font-size:16px;letter-spacing:-.02em}
.organization-stat span{display:block;margin-top:2px;color:#9099a2;font-size:9.5px;font-weight:750;letter-spacing:.07em;text-transform:uppercase}

/* Data-dense pages */
.table-wrap{overflow:auto;max-width:100%}
.data-table thead th{position:sticky;top:0;z-index:1}
.panel-heading-split{gap:24px}
.panel-heading-split>div:first-child{min-width:0}

/* More deliberate empty states */
.empty-state{
  position:relative;
  overflow:hidden;
  min-height:190px;
}
.empty-state::after{
  content:"";
  position:absolute;
  width:130px;
  height:130px;
  right:-45px;
  bottom:-60px;
  border:1px solid rgba(189,146,84,.13);
  border-radius:50%;
  pointer-events:none;
}
.empty-state.compact{min-height:auto}

/* Browser form polish */
input,select,button{font:inherit}
input[type="file"]::file-selector-button{
  margin-right:10px;
  padding:8px 11px;
  border:1px solid #d8dfe4;
  border-radius:8px;
  background:#fff;
  color:#3f5264;
  font-weight:700;
  cursor:pointer;
}
input[type="file"]::file-selector-button:hover{border-color:#c5b18e;background:#fdfbf8}

/* Auth card detail */
.login-form-wrap{position:relative;overflow:hidden}
.login-form-wrap::before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:3px;
  background:linear-gradient(90deg,#173653,#bd9254,#173653);
  opacity:.8;
}

/* Mobile refinement */
@media(max-width:980px){
  .workspace-hero{grid-template-columns:1fr;padding:30px}
  .workspace-hero-aside{max-width:none}
  .module-rail{grid-template-columns:repeat(3,minmax(0,1fr))}
  .module-chip{grid-template-columns:1fr;text-align:center}
  .module-chip-index{margin:auto}
}

@media(max-width:720px){
  .workspace-hero{padding:24px 20px;border-radius:18px}
  .workspace-hero-copy h1{font-size:36px}
  .workspace-section-head{align-items:flex-start;flex-direction:column}
  .module-rail{grid-template-columns:1fr}
  .module-chip{grid-template-columns:38px minmax(0,1fr);text-align:left}
  .module-chip-index{margin:0}
  .organization-identity{align-items:flex-start}
  .organization-statline{display:grid;grid-template-columns:1fr 1fr}
  .organization-stat{min-width:0}
}

@media(max-width:480px){
  .workspace-hero-copy h1{font-size:32px}
  .workspace-hero-meta{gap:7px}
  .workspace-meta-chip{font-size:10px}
  .organization-statline{grid-template-columns:1fr}
}
