/* =====================================================================
   FIBER COMMAND CENTER - OTDR TRACE ANALYZER
   Palette and surfaces taken from the supplied specification.

   Every rule is scoped through .fcc-otdr, written three times to raise
   specificity, and marked !important. This is not stylistic: the host sheet
   app-neu-light.css carries "body.arb-portal-light [role=\"dialog\"]" and a
   wide set of colour rules at !important with specificity (0,2,1). The root
   here is a role="dialog", so a single class (0,1,0) loses and the panel gets
   repainted light. Tripling the class gives (0,3,0) and wins cleanly without
   touching the host sheet or dropping the dialog semantics.
   ===================================================================== */
.fcc-otdr.fcc-otdr.fcc-otdr {
  --fcc-bg:#030817; --fcc-surface:#06152c; --fcc-glass:#0a2140;
  --fcc-cyan:#00e5ff; --fcc-violet:#c13cff; --fcc-green:#23f36b;
  --fcc-amber:#ffc53d; --fcc-text:#f5f8ff; --fcc-dim:#a6c9e8;
  --fcc-border:#1766c2;
  --fcc-rail:110px;
}

/* ---- shell ---- */
.fcc-otdr.fcc-otdr.fcc-otdr {
  position:fixed; inset:0; z-index:2147482500; display:none;
  background:
    radial-gradient(120% 80% at 85% -10%, rgba(193,60,255,.18), transparent 55%),
    radial-gradient(90% 70% at 0% 110%, rgba(23,102,194,.22), transparent 60%),
    var(--fcc-bg) !important;
  color:var(--fcc-text) !important;
  font-family:"Inter","Segoe UI",system-ui,-apple-system,sans-serif;
  overflow:hidden;
}
.fcc-otdr.fcc-otdr.fcc-otdr.is-open { display:grid !important; grid-template-rows:auto 1fr; }
.fcc-otdr.fcc-otdr.fcc-otdr *, .fcc-otdr.fcc-otdr.fcc-otdr *::before, .fcc-otdr.fcc-otdr.fcc-otdr *::after { box-sizing:border-box; }

/* ---- branded header ---- */
.fcc-otdr.fcc-otdr.fcc-otdr .fo-brand {
  position:relative; height:104px; display:flex; align-items:center; gap:16px;
  padding:0 22px; overflow:hidden;
  background:linear-gradient(100deg,#01030c 0%,#061634 45%,#1b0f45 78%,#2a1060 100%) !important;
  border-bottom:1px solid rgba(0,229,255,.22);
}
.fcc-otdr.fcc-otdr.fcc-otdr .fo-brand::after {
  content:""; position:absolute; right:0; top:0; bottom:0; width:46%;
  background:
    radial-gradient(60% 120% at 100% 0%, rgba(0,229,255,.38), transparent 60%),
    radial-gradient(70% 140% at 78% 20%, rgba(193,60,255,.34), transparent 62%),
    repeating-linear-gradient(118deg, rgba(0,229,255,.16) 0 2px, transparent 2px 9px);
  filter:blur(.4px); pointer-events:none;
}
.fcc-otdr.fcc-otdr.fcc-otdr .fo-shieldimg {
  height:76px; width:auto; flex:0 0 auto; object-fit:contain; display:block;
  filter:drop-shadow(0 0 16px rgba(0,180,255,.5));
}
@media (max-width:760px){ .fcc-otdr.fcc-otdr.fcc-otdr .fo-shieldimg { height:50px; } }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-shield {
  width:62px; height:66px; flex:0 0 62px; border-radius:12px;
  background:linear-gradient(160deg,#dfe8f5,#8ea4bd 38%,#44556d 62%,#223047);
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 0 18px rgba(0,229,255,.35), inset 0 1px 0 rgba(255,255,255,.5);
  clip-path:polygon(50% 0,100% 16%,100% 62%,50% 100%,0 62%,0 16%);
}
.fcc-otdr.fcc-otdr.fcc-otdr .fo-shield span { font-size:26px; filter:drop-shadow(0 0 6px rgba(255,140,40,.8)); }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-brandtext { position:relative; z-index:1; }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-brandname {
  font-size:30px; font-weight:800; font-style:italic; letter-spacing:.01em;
  line-height:1.05;
  background:linear-gradient(180deg,#ffffff,#cfe0f2 48%,#8fa6c0);
  -webkit-background-clip:text; background-clip:text; color:transparent !important;
  text-shadow:0 2px 10px rgba(0,0,0,.6);
}
.fcc-otdr.fcc-otdr.fcc-otdr .fo-brandname sup { font-size:11px; vertical-align:super; -webkit-text-fill-color:#cfe0f2; }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-brandsub {
  display:flex; align-items:center; gap:10px; margin-top:4px;
  font-size:12px; letter-spacing:.42em; color:var(--fcc-cyan) !important;
  text-shadow:0 0 12px rgba(0,229,255,.75);
}
.fcc-otdr.fcc-otdr.fcc-otdr .fo-brandsub i { flex:1 1 auto; height:1px; background:linear-gradient(90deg,rgba(0,229,255,.9),rgba(0,229,255,0)); }

/* ---- body: rail + workspace ---- */
.fcc-otdr.fcc-otdr.fcc-otdr .fo-body { display:grid; grid-template-columns:var(--fcc-rail) 1fr; min-height:0; }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-rail {
  position:relative; padding:14px 8px; overflow-y:auto;
  background:linear-gradient(180deg,#040c1e,#06152c) !important;
  border-right:1px solid rgba(23,102,194,.3);
}
.fcc-otdr.fcc-otdr.fcc-otdr .fo-rail::after {
  content:""; position:absolute; left:0; right:0; bottom:0; height:38%;
  background:radial-gradient(80% 90% at 10% 100%, rgba(23,102,194,.5), transparent 65%),
             radial-gradient(70% 80% at 60% 100%, rgba(193,60,255,.3), transparent 70%);
  pointer-events:none;
}
.fcc-otdr.fcc-otdr.fcc-otdr .fo-nav {
  position:relative; z-index:1; width:100%; display:flex; flex-direction:column;
  align-items:center; gap:4px; padding:11px 4px; margin-bottom:6px;
  background:transparent !important; border:1px solid transparent; border-radius:14px;
  color:var(--fcc-dim) !important; cursor:pointer; font:inherit; font-size:10.5px;
  transition:background .18s ease, border-color .18s ease, color .18s ease;
}
.fcc-otdr.fcc-otdr.fcc-otdr .fo-nav svg { width:22px; height:22px; stroke:currentColor; fill:none; stroke-width:1.7; }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-nav:hover { background:rgba(0,229,255,.08) !important; color:#d8f6ff !important; }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-nav.is-active {
  background:rgba(0,120,200,.34) !important; border-color:rgba(0,229,255,.75);
  color:#ffffff !important;
  box-shadow:0 0 18px rgba(0,229,255,.35), inset 0 0 14px rgba(0,229,255,.18);
}
.fcc-otdr.fcc-otdr.fcc-otdr .fo-nav.is-active svg { filter:drop-shadow(0 0 5px rgba(0,229,255,.9)); }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-nav:focus-visible { outline:2px solid var(--fcc-cyan); outline-offset:2px; }

.fcc-otdr.fcc-otdr.fcc-otdr .fo-work {
  min-width:0; min-height:0; overflow-y:auto; padding:14px 16px 16px;
  display:flex; flex-direction:column; gap:12px;
}

/* ---- glass panel ---- */
.fcc-otdr.fcc-otdr.fcc-otdr .fo-glass {
  background:linear-gradient(145deg, rgba(10,33,64,.96), rgba(3,8,23,.98)) !important;
  border:1px solid rgba(0,229,255,.3); border-radius:18px;
  box-shadow:0 0 22px rgba(0,229,255,.1), inset 0 1px 0 rgba(255,255,255,.07);
}

/* ---- workspace header ---- */
.fcc-otdr.fcc-otdr.fcc-otdr .fo-wshead { display:flex; align-items:center; gap:14px; padding:14px 16px; }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-wsicon {
  width:50px; height:50px; flex:0 0 50px; border-radius:13px;
  display:flex; align-items:center; justify-content:center;
  background:rgba(0,120,200,.26) !important; border:1px solid rgba(0,229,255,.6);
  box-shadow:0 0 16px rgba(0,229,255,.3);
}
.fcc-otdr.fcc-otdr.fcc-otdr .fo-wsicon svg { width:26px; height:26px; stroke:var(--fcc-cyan); fill:none; stroke-width:2; }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-wstitle { flex:1 1 auto; min-width:0; }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-wstitle b { display:block; font-size:22px; font-weight:700; color:var(--fcc-text) !important; }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-wstitle span { font-size:12.5px; color:var(--fcc-dim) !important; }

.fcc-otdr.fcc-otdr.fcc-otdr .fo-btn {
  display:inline-flex; align-items:center; gap:8px; padding:11px 18px;
  border-radius:12px; font:inherit; font-size:14px; font-weight:600; cursor:pointer;
  background:rgba(10,33,64,.9) !important; color:var(--fcc-text) !important;
  border:1px solid rgba(23,102,194,.6);
  transition:background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.fcc-otdr.fcc-otdr.fcc-otdr .fo-btn:hover { border-color:rgba(0,229,255,.7); box-shadow:0 0 14px rgba(0,229,255,.25); }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-btn:focus-visible { outline:2px solid var(--fcc-cyan); outline-offset:2px; }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-btn.is-open-sor {
  background:linear-gradient(135deg, rgba(90,30,190,.85), rgba(60,36,146,.9)) !important;
  border-color:rgba(193,60,255,.85);
  box-shadow:0 0 20px rgba(193,60,255,.4), inset 0 1px 0 rgba(255,255,255,.14);
}
.fcc-otdr.fcc-otdr.fcc-otdr .fo-btn.is-open-sor:hover { box-shadow:0 0 28px rgba(193,60,255,.6); }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-btn.is-round { width:42px; height:42px; padding:0; justify-content:center; border-radius:50%; }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-btn svg { width:17px; height:17px; stroke:currentColor; fill:none; stroke-width:2; }

/* ---- trace toolbar ---- */
.fcc-otdr.fcc-otdr.fcc-otdr .fo-tools { display:flex; gap:10px; flex-wrap:wrap; }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-tool {
  flex:1 1 150px; min-width:120px; padding:12px 14px; border-radius:12px;
  font:inherit; font-size:14px; font-weight:700; cursor:pointer; text-align:center;
  background:linear-gradient(160deg, rgba(10,33,64,.95), rgba(4,10,26,.97)) !important;
  color:var(--fcc-text) !important; border:1px solid rgba(23,102,194,.55);
  transition:border-color .18s ease, box-shadow .18s ease, color .18s ease;
}
.fcc-otdr.fcc-otdr.fcc-otdr .fo-tool:hover { border-color:rgba(0,229,255,.6); }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-tool.is-a {
  background:linear-gradient(160deg,#131209,#07060a) !important;
  border-color:var(--fcc-amber); color:var(--fcc-amber) !important;
  box-shadow:0 0 16px rgba(255,197,61,.35);
}
.fcc-otdr.fcc-otdr.fcc-otdr .fo-tool.is-b {
  background:linear-gradient(160deg, rgba(5,52,96,.95), rgba(3,22,48,.95)) !important;
  border-color:var(--fcc-cyan); color:var(--fcc-cyan) !important;
  box-shadow:0 0 18px rgba(0,229,255,.4);
}
.fcc-otdr.fcc-otdr.fcc-otdr .fo-tool.is-on { border-color:var(--fcc-cyan); box-shadow:0 0 18px rgba(0,229,255,.4); }

/* ---- chart ---- */
.fcc-otdr.fcc-otdr.fcc-otdr .fo-chartwrap {
  position:relative; padding:12px; border-radius:20px;
  background:linear-gradient(150deg, rgba(8,26,54,.96), rgba(2,7,20,.99)) !important;
  border:1px solid transparent;
  background-clip:padding-box;
  box-shadow:0 0 26px rgba(0,229,255,.12), inset 0 1px 0 rgba(255,255,255,.06);
}
.fcc-otdr.fcc-otdr.fcc-otdr .fo-chartwrap::before {
  content:""; position:absolute; inset:0; border-radius:20px; padding:1px;
  background:linear-gradient(120deg, rgba(0,229,255,.75), rgba(23,102,194,.25) 45%, rgba(193,60,255,.8));
  -webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite:xor; mask-composite:exclude; pointer-events:none;
}
.fcc-otdr.fcc-otdr.fcc-otdr .fo-canvas { display:block; width:100%; height:380px; touch-action:none; cursor:crosshair; border-radius:14px; }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-zoom { position:absolute; top:22px; right:24px; display:flex; gap:6px; z-index:2; }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-zoom button {
  width:34px; height:30px; border-radius:9px; cursor:pointer;
  background:rgba(4,16,36,.85) !important; border:1px solid rgba(0,229,255,.4);
  color:#d8f6ff !important; display:flex; align-items:center; justify-content:center;
}
.fcc-otdr.fcc-otdr.fcc-otdr .fo-zoom button:hover { border-color:var(--fcc-cyan); box-shadow:0 0 12px rgba(0,229,255,.35); }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-zoom svg { width:15px; height:15px; stroke:currentColor; fill:none; stroke-width:2; }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-legend { display:flex; gap:20px; padding:6px 10px 2px; font-size:12px; color:var(--fcc-dim) !important; }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-legend i { display:inline-block; width:22px; height:3px; border-radius:2px; margin-right:7px; vertical-align:middle; }

/* ---- metric cards ---- */
.fcc-otdr.fcc-otdr.fcc-otdr .fo-metrics { display:grid; grid-template-columns:repeat(5,1fr); gap:12px; }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-metric {
  position:relative; padding:14px 16px 16px; border-radius:16px; overflow:hidden;
  background:linear-gradient(150deg, rgba(10,33,64,.95), rgba(3,9,24,.98)) !important;
  border:1px solid rgba(23,102,194,.45);
}
.fcc-otdr.fcc-otdr.fcc-otdr .fo-metric::after { content:""; position:absolute; left:14px; right:14px; bottom:0; height:2px; border-radius:2px; background:var(--ac,#00e5ff); box-shadow:0 0 14px var(--ac,#00e5ff); }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-metric-h { display:flex; align-items:center; gap:8px; font-size:12.5px; color:var(--fcc-dim) !important; }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-metric-h b { font-size:15px; color:var(--ac,#00e5ff) !important; }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-metric-v { margin-top:8px; font-size:24px; font-weight:800; color:var(--fcc-text) !important; }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-metric-v em { font-style:normal; font-size:14px; font-weight:600; color:var(--fcc-dim) !important; margin-left:4px; }

/* ---- events + health ---- */
.fcc-otdr.fcc-otdr.fcc-otdr .fo-lower { display:grid; grid-template-columns:minmax(0,2.4fr) minmax(240px,1fr); gap:12px; }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-panel-h { display:flex; align-items:center; gap:9px; padding:13px 16px; font-size:14.5px; font-weight:700; color:var(--fcc-text) !important; }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-panel-h svg { width:19px; height:19px; stroke:var(--fcc-cyan); fill:none; stroke-width:2; }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-evhead, .fcc-otdr.fcc-otdr.fcc-otdr .fo-evrow {
  display:grid; grid-template-columns:30px 110px 84px 78px 80px 1fr; gap:8px; align-items:center;
}
.fcc-otdr.fcc-otdr.fcc-otdr .fo-evhead { padding:6px 16px; font-size:10.5px; letter-spacing:.06em; color:#7fa6cc !important; text-transform:uppercase; }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-evbody { max-height:230px; overflow-y:auto; padding:0 10px 10px; }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-evrow {
  width:100%; text-align:left; padding:11px 6px; margin:3px 0; border-radius:11px;
  background:rgba(8,24,52,.5) !important; border:1px solid transparent;
  color:var(--fcc-text) !important; font:inherit; font-size:13px; cursor:pointer;
  transition:background .18s ease, border-color .18s ease;
}
.fcc-otdr.fcc-otdr.fcc-otdr .fo-evrow:hover { background:rgba(12,44,90,.75) !important; }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-evrow.is-sel {
  background:rgba(10,52,104,.92) !important; border-color:var(--fcc-cyan);
  box-shadow:0 0 16px rgba(0,229,255,.22), inset 0 0 14px rgba(0,229,255,.12);
}
.fcc-otdr.fcc-otdr.fcc-otdr .fo-evrow .pip { display:inline-block; width:16px; height:9px; border-radius:3px; background:var(--fcc-green); box-shadow:0 0 8px rgba(35,243,107,.8); margin-right:7px; vertical-align:middle; }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-evempty { padding:18px 16px; font-size:12.5px; color:var(--fcc-dim) !important; }

.fcc-otdr.fcc-otdr.fcc-otdr .fo-health { display:flex; flex-direction:column; align-items:center; justify-content:center; padding:4px 16px 20px; }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-gauge { width:200px; height:200px; }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-gauge-v { font-size:38px; font-weight:800; fill:#ffffff; }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-gauge-s { font-size:15px; font-weight:700; letter-spacing:.08em; }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-health-note { margin-top:6px; font-size:11.5px; color:var(--fcc-dim) !important; text-align:center; max-width:230px; }

/* ---- status bar ---- */
.fcc-otdr.fcc-otdr.fcc-otdr .fo-status { display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:12px 16px; }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-stat { display:flex; align-items:center; gap:9px; padding-right:16px; border-right:1px solid rgba(23,102,194,.35); }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-stat:last-of-type { border-right:0; }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-stat svg { width:18px; height:18px; stroke:var(--fcc-cyan); fill:none; stroke-width:1.8; }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-stat-k { font-size:10px; letter-spacing:.07em; text-transform:uppercase; color:#7fa6cc !important; }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-stat-v { font-size:15px; font-weight:700; color:var(--fcc-text) !important; }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-file { margin-left:auto; display:flex; align-items:center; gap:9px; font-size:13px; color:var(--fcc-text) !important; }
.fcc-otdr.fcc-otdr.fcc-otdr .fo-file .ok { width:19px; height:19px; border-radius:50%; background:var(--fcc-green); color:#04210f !important; display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:900; box-shadow:0 0 12px rgba(35,243,107,.7); }

/* ---- responsive ---- */
@media (max-width:1100px) {
  .fcc-otdr.fcc-otdr.fcc-otdr .fo-metrics { grid-template-columns:repeat(3,1fr); }
  .fcc-otdr.fcc-otdr.fcc-otdr .fo-lower { grid-template-columns:minmax(0,1fr); }
}
@media (max-width:760px) {
  .fcc-otdr.fcc-otdr.fcc-otdr { --fcc-rail:72px; }
  .fcc-otdr.fcc-otdr.fcc-otdr .fo-brand { height:78px; padding:0 12px; }
  .fcc-otdr.fcc-otdr.fcc-otdr .fo-brandname { font-size:19px; }
  .fcc-otdr.fcc-otdr.fcc-otdr .fo-brandsub { letter-spacing:.22em; font-size:10px; }
  .fcc-otdr.fcc-otdr.fcc-otdr .fo-nav { font-size:9px; }
  .fcc-otdr.fcc-otdr.fcc-otdr .fo-metrics { grid-template-columns:repeat(2,1fr); }
  .fcc-otdr.fcc-otdr.fcc-otdr .fo-canvas { height:260px; }
  .fcc-otdr.fcc-otdr.fcc-otdr .fo-evhead { display:none; }
  .fcc-otdr.fcc-otdr.fcc-otdr .fo-evrow { grid-template-columns:26px 1fr 70px; }
  .fcc-otdr.fcc-otdr.fcc-otdr .fo-evrow .c4, .fcc-otdr.fcc-otdr.fcc-otdr .fo-evrow .c5 { display:none; }
  .fcc-otdr.fcc-otdr.fcc-otdr .fo-wstitle span { display:none; }
}
@media (prefers-reduced-motion:reduce) {
  .fcc-otdr.fcc-otdr.fcc-otdr *, .fcc-otdr.fcc-otdr.fcc-otdr *::before { transition:none !important; animation:none !important; }
}
