/* SecuHut Portal UI (Ops + Client) */

:root{
  --bg: #0b1220;
  --panel: rgba(255,255,255,0.06);
  --panel-2: rgba(255,255,255,0.04);
  --border: rgba(255,255,255,0.10);
  --text: #e5e7eb;
  --muted: #94a3b8;

  --accent: #22c55e;
  --accent-2: #16a34a;

  --card-radius: 18px;
  --shadow: 0 10px 26px rgba(0,0,0,0.22);

  --sidebar-w: 290px;
}

html[data-theme="light"]{
  --bg: #f3f7fb;
  --panel: rgba(255,255,255,0.94);
  --panel-2: rgba(255,255,255,0.82);
  --border: rgba(15,23,42,0.10);
  --text: #0f172a;
  --muted: #475569;
  --accent: #16a34a;
  --accent-2: #15803d;
  --shadow: 0 10px 24px rgba(15,23,42,0.10);
  --surface-1: rgba(255,255,255,0.92);
  --surface-2: rgba(248,250,252,0.96);
  --surface-3: rgba(226,232,240,0.48);
  --surface-4: rgba(15,23,42,0.04);
  --surface-5: rgba(15,23,42,0.08);
  --surface-6: rgba(255,255,255,0.72);
  --inverse-surface: rgba(255,255,255,0.88);
  --inverse-border: rgba(15,23,42,0.08);
  --inverse-text: #0f172a;
  --btn-secondary-bg: rgba(15,23,42,0.06);
  --btn-secondary-bg-hover: rgba(15,23,42,0.10);
  --btn-secondary-border: rgba(15,23,42,0.14);
  --btn-secondary-text: #0f172a;
  --btn-danger-bg: rgba(220,38,38,0.12);
  --btn-danger-border: rgba(220,38,38,0.20);
  --btn-danger-text: #991b1b;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 800px at 20% 10%, rgba(34,197,94,0.10), transparent 60%),
              radial-gradient(900px 700px at 70% 0%, rgba(59,130,246,0.08), transparent 55%),
              var(--bg);
}
html[data-theme="light"] body{
  background: radial-gradient(1200px 800px at 20% 10%, rgba(34,197,94,0.08), transparent 60%),
              radial-gradient(900px 700px at 70% 0%, rgba(59,130,246,0.07), transparent 55%),
              var(--bg);
}
html[data-theme="light"] .sidebar{
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(241,245,249,0.94));
  border-right-color: rgba(15,23,42,0.08);
  box-shadow: inset -1px 0 0 rgba(255,255,255,0.55);
}
html[data-theme="light"] .brand{
  background: rgba(15,23,42,0.04);
  border-color: rgba(15,23,42,0.08);
}
html[data-theme="light"] .brand-release{
  color: #64748b;
}
html[data-theme="light"] .sidebar a{
  color: #334155;
}
html[data-theme="light"] .sidebar a:hover{
  color: #0f172a;
  background: rgba(15,23,42,0.05);
  border-color: rgba(15,23,42,0.08);
}
html[data-theme="light"] .sidebar a.active{
  color: #14532d;
  background: rgba(34,197,94,0.14);
  border-color: rgba(34,197,94,0.22);
  box-shadow: 0 8px 18px rgba(34,197,94,0.10);
}
html[data-theme="light"] .sidefoot{
  color: #64748b;
  border-top-color: rgba(15,23,42,0.08);
}
html[data-theme="light"] .sidefoot a{
  color: #0f766e;
}
html[data-theme="light"] .topbar{
  background: rgba(255,255,255,0.74);
  border-bottom-color: rgba(15,23,42,0.08);
}
html[data-theme="light"] .card{
  background: var(--surface-1);
  border-color: rgba(15,23,42,0.08);
}
html[data-theme="light"] .card.soft,
html[data-theme="light"] .stat,
html[data-theme="light"] .info-item,
html[data-theme="light"] .chart-card,
html[data-theme="light"] .flash,
html[data-theme="light"] .auth-card{
  background: var(--surface-2);
  border-color: rgba(15,23,42,0.08);
}
html[data-theme="light"] .soft-note{
  color: #1d4ed8;
  background: rgba(59,130,246,0.10);
  border-color: rgba(59,130,246,0.20);
}
html[data-theme="light"] .badge{
  background: rgba(15,23,42,0.05);
  border-color: rgba(15,23,42,0.10);
  color: #0f172a;
}
html[data-theme="light"] .badge.green,
html[data-theme="light"] .badge.ok,
html[data-theme="light"] .pill{
  background: rgba(34,197,94,0.12);
  border-color: rgba(34,197,94,0.20);
  color: #166534;
}
html[data-theme="light"] .badge.red{
  color: #991b1b;
}
html[data-theme="light"] .badge.warn{
  color: #92400e;
}
html[data-theme="light"] .badge.blue{
  color: #1d4ed8;
}
html[data-theme="light"] .badge.gray{
  color: #334155;
}
html[data-theme="light"] .table-wrap{
  border-color: rgba(15,23,42,0.08);
  background: rgba(255,255,255,0.82);
}
html[data-theme="light"] .table th,
html[data-theme="light"] .table td{
  border-bottom-color: rgba(15,23,42,0.08);
}
html[data-theme="light"] .table th{
  color: #475569;
  background: rgba(226,232,240,0.62);
}
html[data-theme="light"] .table tr:hover td{
  background: rgba(15,23,42,0.03);
}
html[data-theme="light"] .detail-modal__header{
  border-bottom-color: rgba(15,23,42,0.08);
}
html[data-theme="light"] .detail-modal__body{
  background: rgba(248,250,252,0.82);
}
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea{
  background: rgba(255,255,255,0.92);
  border-color: rgba(15,23,42,0.12);
  color: #0f172a;
}
html[data-theme="light"] select{
  background-color: rgba(255,255,255,0.92);
}
html[data-theme="light"] select option{
  background: #ffffff;
  color: #0f172a;
}
html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder{
  color: #64748b;
}
html[data-theme="light"] .tab{
  color: #334155;
  border-color: rgba(15,23,42,0.08);
  background: rgba(255,255,255,0.78);
}
html[data-theme="light"] .tab.active{
  color: #166534;
  background: rgba(34,197,94,0.12);
  border-color: rgba(34,197,94,0.22);
}
html[data-theme="light"] .hr,
html[data-theme="light"] .footer{
  border-top-color: rgba(15,23,42,0.08);
}
html[data-theme="light"] .footer{
  color: #64748b;
  background: rgba(255,255,255,0.62);
}
[dir="rtl"] body{
  font-family: "Tajawal", Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Layout */
.shell{
  display:flex;
  min-height:100vh;
  width:100%;
}

.sidebar{
  width: var(--sidebar-w);
  min-height: 100vh;
  padding: 18px 16px;
  background: rgba(2,6,23,0.72);
  border-right: 1px solid var(--border);
  position: sticky;
  top: 0;
  align-self:flex-start;
  backdrop-filter: blur(10px);
}

.main{
  flex:1;
  min-width: 0;
  display:flex;
  flex-direction:column;
}

.content{
  padding: 22px 22px 10px;
}

.container{
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
}

.embedded-detail-body{
  min-height: 100%;
}

.embedded-detail-content{
  padding: 22px 0 30px;
}

.embedded-detail-container{
  width: min(1180px, calc(100% - 32px));
}

/* Typography */
.h1{ font-size: 40px; line-height: 1.1; font-weight: 800; margin: 0; }
.h2{ font-size: 20px; font-weight: 800; margin: 0; }
.kicker{ color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.small{ color: var(--muted); font-size: 13px; }
.muted{ color: var(--muted); }

/* Sidebar branding + nav */
.brand{
  display:flex;
  gap: 10px;
  align-items:center;
  padding: 10px 10px 14px;
  border-radius: 14px;
  margin-bottom: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}
.brand .logo{
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display:grid;
  place-items:center;
  background: rgba(34,197,94,0.12);
  border: 1px solid rgba(34,197,94,0.18);
}
.brand strong{ display:block; font-size: 16px; }
.brand .muted{ font-size: 12px; margin-top:2px; }
.brand-release{
  margin-top: 4px;
  font-size: 11px;
  color: rgba(148,163,184,0.92);
  letter-spacing: .02em;
}

.nav,
.navlinks{
  display:flex;
  flex-direction:column;
  gap: 6px;
  margin-top: 10px;
}
.sidebar a{
  text-decoration:none;
  color: rgba(226,232,240,0.78);
  padding: 11px 12px;
  border-radius: 14px;
  display:flex;
  align-items:center;
  gap: 10px;
  border: 1px solid transparent;
}
.sidebar a:hover{
  color: #fff;
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.08);
}
.sidebar a.active{
  color: #fff;
  background: rgba(34,197,94,0.12);
  border-color: rgba(34,197,94,0.20);
  box-shadow: 0 10px 20px rgba(0,0,0,0.18);
}

.sidefoot{
  margin-top: 18px;
  padding: 14px 10px;
  color: rgba(148,163,184,0.92);
  font-size: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.sidefoot a{ color: rgba(147,197,253,0.95); }

/* Topbar (if used) */
.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 12px;
  padding: 14px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(2,6,23,0.35);
  backdrop-filter: blur(10px);
}
.topbar-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.right{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.notify-menu{
  position:relative;
}
.notify-menu summary{
  list-style:none;
}
.notify-menu summary::-webkit-details-marker{
  display:none;
}
.notify-button{
  position:relative;
  min-width:36px;
  justify-content:center;
  color:#fef3c7;
  border-color:rgba(245,158,11,0.30);
  background:rgba(245,158,11,0.12);
}
.notify-count{
  position:absolute;
  top:-8px;
  right:-8px;
  min-width:20px;
  height:20px;
  padding:0 6px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:11px;
  font-weight:800;
  color:#fff;
  background:#dc2626;
  border:1px solid rgba(255,255,255,0.70);
}
.notify-panel{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  z-index:50;
  width:min(280px, calc(100vw - 32px));
  padding:10px;
  border:1px solid var(--border);
  border-radius:8px;
  background:rgba(15,23,42,0.96);
  box-shadow:0 18px 44px rgba(0,0,0,0.30);
}
html[data-theme="light"] .notify-panel{
  background:rgba(255,255,255,0.98);
  border-color:rgba(15,23,42,0.10);
  box-shadow:0 18px 38px rgba(15,23,42,0.16);
}
.notify-title{
  color:var(--muted);
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:0;
  margin:2px 4px 8px;
}
.notify-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px;
  border-radius:8px;
  color:var(--text);
  text-decoration:none;
}
.notify-row:hover{
  background:rgba(255,255,255,0.08);
}
html[data-theme="light"] .notify-row:hover{
  background:rgba(15,23,42,0.06);
}
.notify-row strong{
  min-width:28px;
  text-align:center;
  padding:3px 8px;
  border-radius:999px;
  color:#fecaca;
  background:rgba(220,38,38,0.16);
}
[dir="rtl"] .notify-panel{
  right:auto;
  left:0;
}
[dir="rtl"] .notify-count{
  right:auto;
  left:-8px;
}
[dir="rtl"] .row,
[dir="rtl"] .topbar-inner,
[dir="rtl"] .title,
[dir="rtl"] .between{
  flex-direction: row-reverse;
}

/* Cards */
.card{
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--card-radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.card.soft{
  background: rgba(255,255,255,0.04);
}

.title{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap: 10px;
  flex-wrap: wrap;
}
.stack{ display:flex; flex-direction:column; gap: 14px; }
.compact-stack{ gap: 8px; }

/* Rows / helpers */
.row{ display:flex; align-items:center; gap: 12px; }
.between{ justify-content: space-between; }
.wrap{ flex-wrap: wrap; }
.grow{ flex:1; }
.spacer{ height: 10px; }

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  text-decoration:none;
  font-weight: 800;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid transparent;
  cursor:pointer;
  user-select:none;
  white-space: nowrap;
}
.btn.primary{
  background: var(--accent);
  color: #06210f;
  border-color: rgba(34,197,94,0.35);
}
.btn.primary:hover{ filter: brightness(0.98); background: var(--accent-2); }
.btn.secondary{
  background: var(--btn-secondary-bg, rgba(255,255,255,0.06));
  color: var(--btn-secondary-text, #e5e7eb);
  border-color: var(--btn-secondary-border, rgba(255,255,255,0.10));
}
.btn.secondary:hover{ background: var(--btn-secondary-bg-hover, rgba(255,255,255,0.08)); }
.btn.sm{ padding: 8px 12px; border-radius: 14px; font-weight: 800; font-size: 13px; }
.btn.link{
  padding: 0;
  border: 0;
  background: transparent;
  color: #93c5fd;
  font-weight: 700;
}
.btn.danger,
.danger{
  background: var(--btn-danger-bg, rgba(239,68,68,0.14));
  color: var(--btn-danger-text, #fecaca);
  border-color: var(--btn-danger-border, rgba(239,68,68,0.28));
}
.btn.block{
  width: 100%;
}
.icon-btn{
  min-width: 42px;
  padding-inline: 12px;
}

/* Pills / badges */
.pill{
  display:inline-flex;
  align-items:center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(34,197,94,0.12);
  border: 1px solid rgba(34,197,94,0.20);
  color: #d1fae5;
}
.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.10);
  color: #e5e7eb;
}
.badge.dot::before{
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.9;
}
.badge.green,
.badge.ok{
  background: rgba(34,197,94,0.12);
  border-color: rgba(34,197,94,0.20);
  color: #d1fae5;
}
.badge.red{
  background: rgba(239,68,68,0.12);
  border-color: rgba(239,68,68,0.20);
  color: #fecaca;
}
.badge.warn{
  background: rgba(245,158,11,0.14);
  border-color: rgba(245,158,11,0.24);
  color: #fde68a;
}
.badge.blue{
  background: rgba(59,130,246,0.14);
  border-color: rgba(59,130,246,0.24);
  color: #bfdbfe;
}
.badge.gray{
  background: rgba(148,163,184,0.14);
  border-color: rgba(148,163,184,0.20);
  color: #e2e8f0;
}

/* Grids (RESPONSIVE) */
.grid{
  display:grid;
  gap: 14px;
}
.grid.cols4{
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.grid.cols3{
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid.cols2{
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.span-all{
  grid-column: 1 / -1;
}

/* Stat cards (used by components/stats.html) */
.stat{
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--card-radius);
  padding: 14px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.stat-row{
  align-items: flex-start;
  flex-wrap: wrap;
}
.stat-copy{
  min-width: 0;
  flex: 1 1 220px;
}
.stat .label{ color: var(--muted); font-size: 12px; font-weight: 700; }
.stat .value{
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 900;
  margin-top: 6px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.stat .hint{ color: var(--muted); font-size: 12px; margin-top: 6px; }

/* Tables (RESPONSIVE) */
.table-wrap{
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}
.table{
  width: 100%;
  border-collapse: collapse;
  min-width: 720px; /* forces horizontal scroll on small screens */
}
.table th, .table td{
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  text-align:left;
  vertical-align: middle;
  overflow-wrap: normal;
  word-break: normal;
}
.clickable-row{
  cursor: pointer;
}
.clickable-row:hover td{
  background: rgba(255,255,255,0.04);
}
html[data-theme="light"] .clickable-row:hover td{
  background: rgba(15,23,42,0.04);
}
.table th{
  color: rgba(148,163,184,0.95);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 800;
  background: rgba(2,6,23,0.25);
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  min-width: 86px;
}
.table tr:hover td{
  background: rgba(255,255,255,0.03);
}
.table-enhanced .table-wrap{
  scroll-behavior: smooth;
}

.modal-open{
  overflow: hidden;
}
.detail-modal[hidden]{
  display: none;
}
.detail-modal{
  position: fixed;
  inset: 0;
  z-index: 1000;
}
.detail-modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.66);
  backdrop-filter: blur(4px);
}
.detail-modal__dialog{
  position: relative;
  width: min(1100px, calc(100vw - 32px));
  height: min(82vh, 900px);
  margin: 5vh auto;
  background: rgba(11,18,32,0.96);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 22px;
  box-shadow: 0 24px 80px rgba(2,6,23,0.45);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
html[data-theme="light"] .detail-modal__dialog{
  background: rgba(255,255,255,0.98);
}
.detail-modal__header{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.detail-modal__body{
  flex: 1;
  min-height: 0;
  background: rgba(255,255,255,0.02);
}
.detail-modal__frame{
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
}
@media (max-width: 900px){
  .detail-modal__dialog{
    width: calc(100vw - 18px);
    height: calc(100vh - 18px);
    margin: 9px auto;
    border-radius: 18px;
  }
  .detail-modal__header{
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Forms */
input, select, textarea{
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 14px;
  outline: none;
}
input:focus, select:focus, textarea:focus{
  border-color: rgba(34,197,94,0.35);
  box-shadow: 0 0 0 4px rgba(34,197,94,0.10);
}
select{
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: rgba(15,23,42,0.92);
}
select option{
  background: #0f172a;
  color: #e5e7eb;
}
.input{
  width: 100%;
}
.form-grid{
  display:grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.help{
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
}
.field{
  min-width: 0;
}
.field-span-2{
  grid-column: 1 / -1;
}
.form-section{
  margin-top: 12px;
}
.page-grid{
  align-items: start;
}
.check-row{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
}
.check-row input{
  width: auto;
  margin: 0;
}
.soft-note{
  color: #dbeafe;
  border-color: rgba(59,130,246,0.24);
  background: rgba(59,130,246,0.10);
}
.info-list{
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.info-item{
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  min-width: 0;
}
.chart-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.chart-card{
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
}
.bar-track{
  margin-top: 8px;
  height: 10px;
  border-radius: 999px;
  background: rgba(148,163,184,0.18);
  overflow: hidden;
}
.bar-fill{
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(34,197,94,0.95), rgba(59,130,246,0.9));
}
.flash{
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
}
.flash.ok{
  border-color: rgba(34,197,94,0.25);
  background: rgba(34,197,94,0.10);
}
.flash.warn{
  border-color: rgba(245,158,11,0.24);
  background: rgba(245,158,11,0.10);
}
.flash.err{
  border-color: rgba(239,68,68,0.24);
  background: rgba(239,68,68,0.10);
}
.flash.danger{
  border-color: rgba(239,68,68,0.24);
  background: rgba(239,68,68,0.10);
}
.tabs{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin: 14px 0;
}
.tab{
  display:inline-flex;
  align-items:center;
  padding: 9px 12px;
  border-radius: 14px;
  text-decoration:none;
  color: #cbd5e1;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
}
.tab.active{
  color: #fff;
  border-color: rgba(34,197,94,0.20);
  background: rgba(34,197,94,0.12);
}
.hr{
  border: 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  width: 100%;
}
.h3{
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
  margin: 0;
}
.meta{
  display:flex;
  align-items:center;
  gap:10px;
}
.mono{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.auth-shell{
  min-height: calc(100vh - 120px);
  display:grid;
  place-items:center;
}
.auth-card{
  width: min(520px, 100%);
  padding: 24px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(2,6,23,0.58);
  box-shadow: var(--shadow);
}
.auth-header{
  display:flex;
  align-items:center;
  gap:14px;
  margin-bottom: 18px;
}
.auth-body{
  margin-top: 12px;
}
.enterprise-auth-shell{
  padding: 32px 0;
}
.enterprise-auth-card{
  width: min(560px, 100%);
}
.enterprise-auth-header{
  align-items:flex-start;
}
.brand-mark{
  width:46px;
  height:46px;
  border-radius:8px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  color:#052e16;
  background:linear-gradient(135deg, #bbf7d0, #22c55e);
  border:1px solid rgba(255,255,255,0.18);
  font-weight:900;
}
.brand-mark.denied{
  color:#7f1d1d;
  background:linear-gradient(135deg, #fee2e2, #fca5a5);
}
.auth-title{
  font-size:34px;
  line-height:1.08;
}
.auth-links{
  gap:10px;
  align-items:flex-start;
}
.auth-footer{
  padding-top:14px;
  border-top:1px solid var(--border);
}
.workspace-shell{
  padding:32px 0;
}
.workspace-panel{
  width:min(860px, 100%);
  padding:24px;
  border:1px solid rgba(255,255,255,0.12);
  border-radius:14px;
  background:rgba(2,6,23,0.58);
  box-shadow:var(--shadow);
}
html[data-theme="light"] .workspace-panel{
  background:var(--surface-2);
  border-color:rgba(15,23,42,0.08);
}
.workspace-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
  margin-top:18px;
}
.workspace-card{
  display:flex;
  flex-direction:column;
  gap:10px;
  min-height:150px;
  padding:16px;
  border-radius:8px;
  border:1px solid var(--border);
  background:rgba(255,255,255,0.05);
  color:var(--text);
  text-decoration:none;
}
.workspace-card:hover,
.workspace-card:focus-visible{
  border-color:rgba(34,197,94,0.45);
  background:rgba(34,197,94,0.08);
  outline:none;
}
.workspace-card-label{
  font-size:18px;
  font-weight:900;
}
.workspace-actions{
  margin-top:18px;
}
.access-denied-panel{
  width:min(720px, 100%);
}
.access-denied-card{
  margin-top:18px;
  border-radius:8px;
}
.workspace-menu{
  position:relative;
}
.workspace-menu summary{
  list-style:none;
}
.workspace-menu summary::-webkit-details-marker{
  display:none;
}
.workspace-menu-panel{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  z-index:55;
  width:min(320px, calc(100vw - 32px));
  padding:12px;
  border:1px solid var(--border);
  border-radius:8px;
  background:rgba(15,23,42,0.96);
  box-shadow:0 18px 44px rgba(0,0,0,0.30);
}
html[data-theme="light"] .workspace-menu-panel{
  background:rgba(255,255,255,0.98);
  border-color:rgba(15,23,42,0.10);
  box-shadow:0 18px 38px rgba(15,23,42,0.16);
}
.workspace-menu-user{
  font-size:13px;
  font-weight:900;
  overflow-wrap:anywhere;
}
.workspace-menu-title{
  margin-top:10px;
  padding-top:10px;
  border-top:1px solid var(--border);
  color:var(--muted);
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:0;
}
.workspace-menu-row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:10px;
  margin-top:6px;
  border-radius:8px;
  color:var(--text);
  text-decoration:none;
}
.workspace-menu-row:hover,
.workspace-menu-row:focus-visible{
  background:rgba(34,197,94,0.10);
  outline:none;
}
.workspace-menu-row small{
  color:var(--muted);
  text-align:end;
}
[dir="rtl"] .workspace-menu-panel{
  right:auto;
  left:0;
}
.compact-form{
  gap: 8px;
}
.compact-input{
  min-width: 140px;
  padding: 8px 10px;
  border-radius: 12px;
}
.inline-form{
  display: inline-flex;
  margin: 0 8px 8px 0;
}

.dashboard-hero{
  align-items: flex-start;
}

.dashboard-hero-copy{
  flex: 1 1 340px;
  min-width: 0;
}

.dashboard-actions{
  flex: 0 1 auto;
  justify-content: flex-end;
}

.dashboard-card-head{
  flex: 1 1 260px;
  min-width: 0;
}

.dashboard-card-head .small,
.dashboard-hero-copy .small,
.dashboard-card-head .h2,
.dashboard-hero-copy .h1,
.info-item .small{
  overflow-wrap: anywhere;
}

.client-dashboard-split{
  gap: 22px;
  align-items: start;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.95fr);
}

/* Client workspace refinements: keep the information hierarchy readable at
   the audited 100% scale without changing operator workspace geometry. */
.client-ui .content > .container{
  max-width: 1240px;
}
.client-ui .grid,
.client-ui .card,
.client-ui .content,
.client-ui .container{
  min-width: 0;
}
.client-ui .card{
  overflow: hidden;
}
.client-ui .table-wrap{
  max-width: 100%;
}
.client-ui .grid.cols4{
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.client-ui .stat{
  min-height: 118px;
}
.client-ui .dashboard-actions{
  align-items: stretch;
}
.client-ui .dashboard-actions .btn{
  min-height: 44px;
}
.client-ui .table-wrap{
  scrollbar-color: rgba(148,163,184,.55) transparent;
}
.client-ui a:focus-visible,
.client-ui button:focus-visible,
.client-ui summary:focus-visible,
.client-ui input:focus-visible,
.client-ui select:focus-visible,
.client-ui textarea:focus-visible{
  outline: 3px solid rgba(34,197,94,.55);
  outline-offset: 2px;
}
[dir="rtl"] .client-ui .table th,
[dir="rtl"] .client-ui .table td{
  text-align: right;
}

.client-dashboard-split > .card{
  min-width: 0;
}

#recent-alerts-status{
  overflow-wrap: anywhere;
}

/* Footer */
.footer{
  margin-top:auto;
  padding: 16px 22px;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: rgba(148,163,184,0.92);
  font-size: 12px;
  background: rgba(2,6,23,0.25);
}
.footer-meta{
  align-items: center;
  gap: 8px;
}
.footer-about-button{
  font-size: 12px;
  white-space: nowrap;
}
.about-dialog{
  width: min(520px, calc(100vw - 32px));
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 0;
  color: var(--text);
  background: rgba(11,18,32,0.98);
  box-shadow: 0 24px 80px rgba(2,6,23,0.45);
}
.about-dialog::backdrop{
  background: rgba(2,6,23,0.66);
  backdrop-filter: blur(3px);
}
html[data-theme="light"] .about-dialog{
  background: rgba(255,255,255,0.98);
  border-color: rgba(15,23,42,0.12);
}
.about-dialog__body{
  padding: 18px;
}
.about-dialog__facts{
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 0;
}
.about-dialog__facts div{
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}
.about-dialog__facts dt{
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.about-dialog__facts dd{
  margin: 0;
  overflow-wrap: anywhere;
}

/* =========================
   RESPONSIVE BREAKPOINTS
   ========================= */
@media (max-width: 1100px){
  .grid.cols4{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cols3{ grid-template-columns: 1fr; }
  .grid.cols2{ grid-template-columns: 1fr; }
  .workspace-grid{ grid-template-columns: 1fr; }
  .chart-grid{ grid-template-columns: 1fr; }
  .client-dashboard-split{ grid-template-columns: 1fr; }
}

@media (max-width: 1400px){
  .dashboard-panels{
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px){
  :root{ --sidebar-w: 100%; }

  .shell{ flex-direction: column; }
  .sidebar{
    position: relative;
    min-height: unset;
    height: auto;
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  .nav,
  .navlinks{
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 8px;
  }
  .sidebar a{ white-space: nowrap; }

  .content{ padding: 16px 12px 10px; }
  .embedded-detail-content{ padding: 14px 0 24px; }
  .embedded-detail-container{ width: calc(100% - 18px); }
  .h1{ font-size: 32px; }

  .client-ui .sidebar{
    padding: 12px;
  }
  .client-ui .nav-section-label{
    display: none;
  }
  .client-ui .navlinks{
    gap: 8px;
    margin-top: 6px;
  }
  .client-ui .nav-section{
    display: contents;
  }
  .client-ui .sidebar a{
    padding: 10px 12px;
  }
  .client-ui .topbar{
    padding: 10px 12px;
  }
  .client-ui .topbar-inner{
    align-items: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 520px){
  .grid.cols4{ grid-template-columns: 1fr; }
  .grid.cols3{ grid-template-columns: 1fr; }
  .btn{ width: 100%; }
  .title{ flex-direction: column; }
  .form-grid{ grid-template-columns: 1fr; }
  .field-span-2{ grid-column: auto; }
  .span-all{ grid-column: auto; }
  .check-row{ width: 100%; }
  .dashboard-actions{
    width: 100%;
  }
  .client-ui .grid.cols4{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .client-ui .stat{
    padding: 12px;
    min-height: 104px;
  }
  .client-ui .stat .value{
    font-size: 22px;
  }
  .client-ui .dashboard-actions .btn{
    flex: 1 1 100%;
  }
  .client-ui .topbar .right{
    width: 100%;
  }
  .client-ui .topbar .right .btn{
    flex: 1 1 auto;
  }
}

/* ================================
   GLOBAL FONT SIZE TUNING
================================ */

h1 {
  font-size: 34px !important;
  line-height: 1.15 !important;
}

h2 {
  font-size: 22px !important;
}

.page-title {
  font-size: 32px !important;
}

@media (max-width: 900px) {
  h1 {
    font-size: 26px !important;
  }
}

/* Enterprise SOC / Connector Marketplace polish */
.section-gap{
  margin-top: 14px;
}
.page-hero{
  align-items: flex-start;
  gap: 16px;
}
.page-hero-copy{
  flex: 1 1 420px;
  min-width: 0;
}
.page-hero-copy .small{
  max-width: 900px;
  overflow-wrap: anywhere;
}
.page-actions{
  justify-content: flex-end;
  flex: 0 1 auto;
}
.ops-card{
  min-width: 0;
}
.ops-card .h2{
  line-height: 1.25;
}
.table-section{
  margin-top: 12px;
}
.status-note{
  line-height: 1.55;
}
.metric-grid .stat{
  min-height: 112px;
}
.connector-layout{
  align-items: start;
}
.connector-form-card{
  position: sticky;
  top: 18px;
}
.connector-form{
  margin-top: 12px;
  gap: 12px;
}
.connector-form label{
  display: inline-flex;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.connector-form .check-row{
  margin-top: 2px;
  margin-bottom: 0;
}
.connector-form .check-row input{
  width: auto;
}
.compact-form-grid{
  gap: 10px;
}
.secure-ref-note .mono{
  display: inline-flex;
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid rgba(148,163,184,0.18);
  background: rgba(15,23,42,0.20);
  direction: ltr;
  unicode-bidi: isolate;
}
html[data-theme="light"] .secure-ref-note .mono{
  background: rgba(15,23,42,0.05);
  border-color: rgba(15,23,42,0.10);
}
.api-doc-shell{
  padding: 24px;
  max-width: 1180px;
  margin: 0 auto;
}
.api-group-grid{
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
}
.api-group-grid .flash{
  min-height: 54px;
  display: flex;
  align-items: center;
  overflow-wrap: anywhere;
}
[dir="rtl"] .table th,
[dir="rtl"] .table td{
  text-align: right;
}
[dir="rtl"] .mono,
[dir="rtl"] code{
  direction: ltr;
  unicode-bidi: isolate;
}
@media (max-width: 1100px){
  .connector-form-card{
    position: static;
  }
  .api-group-grid{
    grid-template-columns: 1fr;
  }
}
@media (max-width: 520px){
  .page-actions{
    width: 100%;
  }
  .api-doc-shell{
    padding: 16px 12px;
  }
}

/* Feature discoverability and final QA polish */
.table-wrap{
  overflow: auto;
  max-width: 100%;
}
.table{
  table-layout: auto;
}
.table th{
  position: sticky;
  top: 0;
  z-index: 2;
  letter-spacing: 0;
}
.table td,
.table th{
  overflow-wrap: anywhere;
}
.table-empty-state{
  padding: 22px 16px !important;
  text-align: center !important;
}
.table-empty-state strong,
.table-empty-state span{
  display: block;
}
.table-empty-state span{
  margin-top: 4px;
  font-size: 12px;
}
.knowledge-search-form{
  align-items: end;
}
.knowledge-search-input{
  max-width: 620px;
}
.knowledge-results{
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.knowledge-card{
  overflow: hidden;
}
.knowledge-card.restricted{
  border-color: rgba(245,158,11,0.22);
}
.knowledge-card-head{
  align-items: flex-start;
  margin-bottom: 12px;
}
.knowledge-grid{
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 16px;
  align-items: start;
}
.knowledge-main p{
  margin: 4px 0 0;
  line-height: 1.55;
}
.knowledge-label{
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0;
}
.knowledge-list{
  margin: 8px 0 0;
  padding-left: 18px;
}
.knowledge-list li{
  margin: 4px 0;
}
[dir="rtl"] .knowledge-list{
  padding-left: 0;
  padding-right: 18px;
}
.knowledge-side{
  min-width: 0;
}
.knowledge-side a{
  color: #93c5fd;
}
.tag-list{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.tag-list a{
  text-decoration: none;
}
.knowledge-safety{
  margin-top: 4px;
}
.empty-state{
  text-align: center;
  padding: 26px;
}
.status-note,
.secure-ref-note{
  line-height: 1.5;
}
@media (max-width: 980px){
  .knowledge-grid{
    grid-template-columns: 1fr;
  }
  .knowledge-search-input{
    max-width: 100%;
  }
}

/* Operator workspace refinement */
.operator-ui{
  --sidebar-w: 274px;
  --card-radius: 8px;
}
html[data-theme="light"] body.operator-ui{
  background: #f5f7fb;
}
.operator-ui .container{
  max-width: 1500px;
}
.operator-ui .content{
  padding: 18px 20px 12px;
}
.operator-ui .stack,
.operator-ui .grid{
  gap: 12px;
}
.operator-ui .card,
.operator-ui .stat,
.operator-ui .flash,
.operator-ui .info-item,
.operator-ui .chart-card{
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(2,6,23,0.14);
}
.operator-ui .card{
  padding: 14px;
}
.operator-ui .card.flat{
  min-height: 92px;
  background: rgba(255,255,255,0.045);
  box-shadow: none;
}
html[data-theme="light"] .operator-ui .card.flat{
  background: rgba(255,255,255,0.88);
  border-color: rgba(15,23,42,0.08);
}
.operator-ui .card.soft,
.operator-ui .flash{
  box-shadow: none;
}
.operator-ui .h1{
  font-size: clamp(28px, 2vw, 34px);
  line-height: 1.12;
}
.operator-ui .h2{
  font-size: 18px;
  line-height: 1.25;
}
.operator-ui .small{
  line-height: 1.45;
}
.operator-ui .kicker{
  letter-spacing: 0;
}
.operator-ui .sidebar{
  padding: 14px 12px;
}
.operator-ui .brand{
  align-items: flex-start;
  border-radius: 8px;
  padding: 10px;
}
.operator-ui .brand .logo{
  width: 34px;
  height: 34px;
  border-radius: 8px;
  flex: 0 0 auto;
}
.operator-ui .brand strong{
  font-size: 14px;
  line-height: 1.2;
}
.operator-ui .brand-release{
  font-size: 10px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.operator-ui .navlinks{
  gap: 4px;
}
.operator-ui .sidebar a{
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.25;
}
.operator-ui .sidefoot{
  margin-top: 12px;
  padding: 10px;
}
.operator-ui .topbar{
  padding: 10px 20px;
}
.operator-ui .topbar-inner{
  gap: 10px;
}
.operator-ui .right{
  gap: 8px;
}
.operator-ui .btn{
  min-height: 36px;
  padding: 9px 12px;
  border-radius: 8px;
}
.operator-ui .btn.sm{
  min-height: 30px;
  padding: 6px 9px;
  border-radius: 8px;
  font-size: 12px;
}
.operator-ui .icon-btn{
  min-width: 34px;
  padding-inline: 9px;
}
.operator-ui .badge,
.operator-ui .pill{
  padding: 5px 8px;
  line-height: 1.2;
}
.operator-ui input,
.operator-ui select,
.operator-ui textarea{
  min-height: 38px;
  padding: 9px 11px;
  border-radius: 8px;
}
.operator-ui .compact-input{
  border-radius: 8px;
}
.operator-ui .form-grid,
.operator-ui .compact-form-grid{
  gap: 10px;
}
.operator-ui .tabs{
  gap: 8px;
  margin: 12px 0;
  padding-bottom: 4px;
  overflow-x: auto;
  flex-wrap: nowrap;
}
.operator-ui .tab{
  flex: 0 0 auto;
  padding: 8px 10px;
  border-radius: 8px;
  white-space: nowrap;
}
.operator-ui .page-hero{
  gap: 14px;
}
.operator-ui .page-actions{
  gap: 8px;
}
.operator-ui .metric-grid .card.flat{
  min-height: 104px;
}
.operator-ui .grid.cols4{
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}
.operator-ui .connector-layout{
  grid-template-columns: minmax(300px, 0.62fr) minmax(0, 1.38fr);
}
.operator-ui .grid.cols2:has(.table-enhanced):not(.connector-layout){
  grid-template-columns: 1fr;
}
.operator-ui .table-enhanced{
  min-width: 0;
}
.operator-ui .table-enhanced > .row:first-child{
  margin-bottom: 0 !important;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: rgba(255,255,255,0.035);
}
html[data-theme="light"] .operator-ui .table-enhanced > .row:first-child{
  background: rgba(248,250,252,0.86);
  border-color: rgba(15,23,42,0.08);
}
.operator-ui .table-enhanced > .row:first-child .small{
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.operator-ui .table-enhanced > .row:first-child + .table-wrap{
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
.operator-ui .table-wrap{
  border-radius: 8px;
  scrollbar-gutter: stable both-edges;
}
.operator-ui .table{
  min-width: max(940px, 100%);
  font-size: 13px;
}
.operator-ui .table th,
.operator-ui .table td{
  padding: 10px 12px;
  overflow-wrap: normal;
  word-break: normal;
}
.operator-ui .table th{
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  min-width: 92px;
  font-size: 11px;
  line-height: 1.25;
  vertical-align: bottom;
}
.operator-ui .table td{
  max-width: 360px;
  line-height: 1.42;
  vertical-align: top;
}
.operator-ui .table td .badge{
  white-space: nowrap;
}
.operator-ui .table td:has(.btn){
  min-width: 156px;
}
.operator-ui .table td .btn{
  min-height: 28px;
  margin: 2px 2px 2px 0;
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 12px;
}
.operator-ui .table td form{
  display: inline-flex;
  margin: 0;
}
.operator-ui .table-empty-state{
  padding: 18px 14px !important;
}
.operator-ui .empty-state{
  border-radius: 8px;
}
@media (max-width: 1280px){
  .operator-ui .connector-layout{
    grid-template-columns: 1fr;
  }
}
@media (max-width: 1100px){
  .operator-ui .grid.cols4{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 820px){
  .operator-ui{
    --sidebar-w: 100%;
  }
  .operator-ui .container{
    max-width: 100%;
  }
  .operator-ui .content{
    padding: 14px 12px 10px;
  }
  .operator-ui .sidebar{
    padding: 12px;
  }
}
@media (max-width: 520px){
  .operator-ui .grid.cols4{
    grid-template-columns: 1fr;
  }
  .operator-ui .tabs{
    margin-inline: -2px;
  }
}


/* Operator UI remediation */
.operator-ui .nav-section{
  display:flex;
  flex-direction:column;
  gap:4px;
  padding-top:8px;
}
.operator-ui .nav-section + .nav-section{
  margin-top:8px;
  border-top:1px solid rgba(148,163,184,0.14);
}
.operator-ui .nav-section-label{
  padding:8px 10px 3px;
  color:var(--muted);
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
}
.operator-ui .nav-item{
  justify-content:flex-start;
}
.operator-ui .nav-icon{
  width:22px;
  height:22px;
  flex:0 0 22px;
  display:grid;
  place-items:center;
  border-radius:6px;
  background:rgba(148,163,184,0.14);
  border:1px solid rgba(148,163,184,0.18);
  color:#dbeafe;
  font-size:11px;
  font-weight:900;
}
.operator-ui .sidebar a.active .nav-icon{
  background:rgba(34,197,94,0.20);
  border-color:rgba(34,197,94,0.30);
  color:#dcfce7;
}
.operator-ui .brand .logo{
  color:#dcfce7;
  font-size:12px;
  font-weight:900;
}
.operator-ui .language-toggle{
  min-width:74px;
}
.operator-ui .metric-muted{
  opacity:.72;
  background:rgba(148,163,184,0.055) !important;
  border-style:dashed;
}
.operator-ui .metric-muted .value{
  color:var(--muted);
}
.operator-ui .empty-state-mini,
.operator-ui .action-empty-state{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
}
.operator-ui .empty-state-icon{
  width:34px;
  height:34px;
  border-radius:8px;
  border:1px solid rgba(59,130,246,0.28);
  background:rgba(59,130,246,0.12);
  position:relative;
}
.operator-ui .empty-state-icon::before,
.operator-ui .empty-state-icon::after{
  content:"";
  position:absolute;
  background:#93c5fd;
  border-radius:99px;
}
.operator-ui .empty-state-icon::before{
  width:14px;
  height:2px;
  left:10px;
  top:16px;
}
.operator-ui .empty-state-icon::after{
  width:2px;
  height:14px;
  left:16px;
  top:10px;
}
.operator-ui .action-empty-state{
  min-height:220px;
  padding:24px 18px;
  border:1px dashed rgba(148,163,184,0.24);
  background:rgba(15,23,42,0.16);
  border-radius:8px;
  text-align:center;
}
.operator-ui .compact-empty-state{
  min-height:170px;
}
.operator-ui .summary-strip{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  margin:12px 0;
  padding:10px 12px;
  border-radius:8px;
  border:1px solid rgba(59,130,246,0.18);
  background:rgba(59,130,246,0.08);
}
.operator-ui .technical-details{
  margin-top:10px;
  padding:10px 12px;
  border-radius:8px;
  border:1px solid rgba(148,163,184,0.20);
  background:rgba(15,23,42,0.18);
}
.operator-ui .technical-details summary{
  cursor:pointer;
  font-weight:800;
  color:#bfdbfe;
}
.operator-ui .technical-details code{
  display:inline-block;
  margin:8px 8px 0 0;
  padding:5px 7px;
  border-radius:6px;
  border:1px solid rgba(148,163,184,0.22);
  background:rgba(2,6,23,0.32);
  color:#dbeafe;
  font-size:12px;
}
.operator-ui .compact-details{
  padding:8px 10px;
}
.operator-ui .bar-fill.bar-good{
  background:linear-gradient(90deg, rgba(34,197,94,0.95), rgba(16,185,129,0.9));
}
.operator-ui .bar-fill.bar-warn{
  background:linear-gradient(90deg, rgba(245,158,11,0.95), rgba(251,191,36,0.9));
}
.operator-ui .bar-fill.bar-bad{
  background:linear-gradient(90deg, rgba(239,68,68,0.95), rgba(245,158,11,0.9));
}
.operator-ui .security-warning{
  display:flex;
  align-items:center;
  gap:10px;
  border-left:4px solid rgba(239,68,68,0.92);
}
.operator-ui .security-warning-icon{
  width:24px;
  height:24px;
  display:grid;
  place-items:center;
  border-radius:6px;
  background:rgba(239,68,68,0.18);
  color:#fecaca;
  font-weight:900;
}
.operator-ui .security-warning span:nth-child(2){
  flex:1;
}
.operator-ui .ai-badge{
  text-transform:uppercase;
  letter-spacing:0;
}
.operator-ui .table tr:has(.row-inactive-marker){
  opacity:.58;
}
.operator-ui .table tr:has(.row-inactive-marker):hover{
  opacity:.86;
}
.operator-ui .operator-alert-row td{
  padding-top:7px;
  padding-bottom:7px;
  vertical-align:middle;
}
.operator-ui .operator-alert-row .compact-form{
  display:grid;
  grid-template-columns:minmax(112px, 132px) minmax(120px, 160px) minmax(140px, 1fr) auto;
  gap:6px;
  align-items:center;
  min-width:520px;
}
.operator-ui .operator-alert-row .compact-input{
  min-width:0;
  min-height:30px;
  padding:5px 8px;
  font-size:12px;
}
.operator-ui .operator-alert-row .btn{
  margin:0;
}
.operator-ui .tenant-tabs{
  position:relative;
  align-items:center;
}
.operator-ui .tabs-extra{
  display:contents;
}
.operator-ui .tab-more{
  display:none;
  position:relative;
}
.operator-ui .tab-more summary{
  list-style:none;
  cursor:pointer;
}
.operator-ui .tab-more summary::-webkit-details-marker{
  display:none;
}
.operator-ui .tab-more-menu{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  z-index:20;
  min-width:220px;
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:8px;
  border-radius:8px;
  border:1px solid var(--border);
  background:#0f172a;
  box-shadow:0 18px 40px rgba(0,0,0,.32);
}
[dir="rtl"] .operator-ui .tab-more-menu{
  right:auto;
  left:0;
}
.operator-ui .tab-more-menu .tab{
  justify-content:flex-start;
}
.operator-ui .profile-page,
.operator-ui .api-doc-container{
  max-width:1040px;
  margin-inline:auto;
}
.operator-ui .profile-page .grid.cols2{
  grid-template-columns:repeat(2, minmax(0, 1fr));
}
.operator-ui .info-row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:10px 0;
  border-bottom:1px solid rgba(148,163,184,0.14);
}
.operator-ui .info-row:last-child{
  border-bottom:0;
}
.operator-ui .timeline-list,
.operator-ui .preference-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:12px;
}
.operator-ui .timeline-item{
  display:flex;
  gap:10px;
  align-items:flex-start;
  padding:10px;
  border-radius:8px;
  background:rgba(148,163,184,0.08);
}
.operator-ui .timeline-dot{
  width:10px;
  height:10px;
  flex:0 0 10px;
  margin-top:5px;
  border-radius:999px;
  background:#22c55e;
  box-shadow:0 0 0 4px rgba(34,197,94,0.14);
}
.api-doc-page{
  min-height:100vh;
}
.api-doc-page .api-doc-shell{
  padding:28px 20px 36px;
}
html[data-theme="light"] .operator-ui .action-empty-state,
html[data-theme="light"] .operator-ui .technical-details{
  background:rgba(248,250,252,0.86);
}
html[data-theme="light"] .operator-ui .tab-more-menu{
  background:#ffffff;
}
html[data-theme="light"] .operator-ui .technical-details summary{
  color:#1d4ed8;
}
@media (max-width: 1180px){
  .operator-ui .tabs-extra{
    display:none;
  }
  .operator-ui .tab-more{
    display:block;
  }
}
@media (max-width: 900px){
  .operator-ui .profile-page .grid.cols2{
    grid-template-columns:1fr;
  }
  .operator-ui .operator-alert-row .compact-form{
    min-width:360px;
    grid-template-columns:1fr 1fr;
  }
}
@media (max-width: 560px){
  .operator-ui .security-warning{
    align-items:flex-start;
    flex-wrap:wrap;
  }
  .operator-ui .operator-alert-row .compact-form{
    min-width:260px;
    grid-template-columns:1fr;
  }
}

.operator-ui .status-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:12px;
}
.operator-ui .status-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  border:1px solid rgba(148,163,184,0.16);
  border-radius:8px;
  background:rgba(15,23,42,0.14);
}
.operator-ui .table td{
  min-width:88px;
}
.operator-ui .table td:first-child{
  min-width:130px;
}
.operator-ui .table td .mono,
.operator-ui .table td code{
  white-space:nowrap;
}
.operator-ui .stat .hint,
.operator-ui .stat .label{
  overflow-wrap:normal;
  word-break:normal;
}

/* Client workspace navigation */
.client-ui .nav-section{
  display:flex;
  flex-direction:column;
  gap:4px;
  padding-top:8px;
}
.client-ui .nav-section + .nav-section{
  margin-top:8px;
  border-top:1px solid rgba(148,163,184,0.14);
}
.client-ui .nav-section-label{
  padding:8px 10px 3px;
  color:var(--muted);
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
}
.client-ui .nav-item{
  justify-content:flex-start;
}
.client-ui .nav-icon{
  width:22px;
  height:22px;
  flex:0 0 22px;
  display:grid;
  place-items:center;
  border-radius:6px;
  background:rgba(148,163,184,0.14);
  border:1px solid rgba(148,163,184,0.18);
  color:#dbeafe;
  font-size:11px;
  font-weight:900;
}
.client-ui .sidebar a.active .nav-icon{
  background:rgba(34,197,94,0.20);
  border-color:rgba(34,197,94,0.30);
  color:#dcfce7;
}
.client-ui .brand .logo{
  color:#dcfce7;
  font-size:12px;
  font-weight:900;
}
.client-ui .language-toggle{
  min-width:74px;
}
