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

:root {
  --bg-color: #f7f9fc;
  --bg-gradient: radial-gradient(circle at top left, #f3f6fa 0%, #ebf0f7 100%);
  --panel-bg: rgba(255, 255, 255, 0.75);
  --panel-blur: blur(20px);
  --panel-border: 1px solid rgba(255, 255, 255, 0.5);
  
  --line-color: rgba(0, 30, 80, 0.06);
  --line-strong: rgba(0, 30, 80, 0.12);
  
  --text-main: #111827;
  --text-muted: #64748b;
  
  --accent-base: 74, 111, 255;
  --accent-color: rgb(var(--accent-base));
  --accent-soft: rgba(var(--accent-base), 0.1);
  --accent-glow: rgba(var(--accent-base), 0.3);
  
  --ok-color: #10b981;
  --ok-soft: rgba(16, 185, 129, 0.1);
  --warn-color: #f59e0b;
  --warn-soft: rgba(245, 158, 11, 0.1);
  --danger-color: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.1);
  
  --shadow-sm: 0 4px 12px rgba(17, 24, 39, 0.03);
  --shadow-md: 0 8px 30px rgba(17, 24, 39, 0.05);
  --shadow-lg: 0 16px 40px rgba(17, 24, 39, 0.08);
  --shadow-float: 0 20px 40px rgba(var(--accent-base), 0.12), 0 10px 10px rgba(17, 24, 39, 0.04);
  
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --space-scale: 1;

  --trans: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

body[data-theme="daybreak"] {
  --bg-color: #0b0d10;
  --bg-gradient: radial-gradient(circle at 50% 0%, #151a24 0%, #0b0d10 100%);
  --panel-bg: rgba(18, 22, 29, 0.6);
  --panel-border: 1px solid rgba(255, 255, 255, 0.04);
  
  --line-color: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(255, 255, 255, 0.1);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  
  --accent-base: 79, 218, 203;
  --accent-color: rgb(var(--accent-base));
  --accent-soft: rgba(var(--accent-base), 0.12);
  --accent-glow: rgba(var(--accent-base), 0.25);
  
  --ok-color: #2dd4bf;
  --ok-soft: rgba(45, 212, 191, 0.12);
  --warn-color: #fbbf24;
  --warn-soft: rgba(251, 191, 36, 0.12);
  --danger-color: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.12);
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-float: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(var(--accent-base), 0.15);
}

body.startup-blocked {
  overflow: hidden;
}

body.auth-blocked {
  overflow: hidden;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg-color);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 10px; }

.svg-icon {
  width: 1.25em; height: 1.25em;
  stroke-width: 2.2; stroke: currentColor; fill: none;
  stroke-linecap: round; stroke-linejoin: round;
  display: inline-block; vertical-align: middle;
}

.app {
  min-height: 100vh; display: grid; grid-template-columns: 240px 1fr;
  gap: 32px; padding: 24px 32px; max-width: 1800px; margin: 0 auto;
}

.app.app-startup-blocked {
  visibility: hidden;
  pointer-events: none;
}

.app.auth-blocked {
  visibility: hidden;
  pointer-events: none;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background:
    radial-gradient(circle at 18% 12%, rgba(var(--accent-base), 0.14), transparent 30%),
    linear-gradient(135deg, rgba(247, 249, 252, 0.96), rgba(232, 238, 247, 0.96));
  backdrop-filter: blur(12px);
}

.auth-gate-inner {
  width: min(430px, 100%);
}

.auth-card {
  display: grid;
  gap: 15px;
  border-radius: 12px;
  padding: 24px;
  color: #17202a;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(15, 23, 42, 0.10);
  box-shadow: 0 18px 42px rgba(23, 32, 42, 0.12);
}

.auth-card h1 {
  margin: 0;
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.auth-card p {
  margin: 0;
  color: #667085;
  line-height: 1.55;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.auth-brand > div {
  min-width: 0;
}

.auth-logo {
  width: 118px;
  height: auto;
  flex: 0 0 auto;
  object-fit: contain;
  opacity: 0.88;
}

.auth-eyebrow {
  margin: 0 0 4px;
  color: #18a7a2;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-copy {
  padding-top: 2px;
}

.auth-field {
  display: grid;
  gap: 8px;
  color: #344054;
  font-size: 0.85rem;
  font-weight: 800;
}

.auth-field input {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.13);
  border-radius: 10px;
  background: #fff;
  color: #17202a;
  outline: none;
  padding: 12px 13px;
  font: inherit;
  transition: var(--trans);
}

.auth-field input:focus {
  border-color: #18a7a2;
  box-shadow: 0 0 0 4px rgba(24, 167, 162, 0.14);
}

.auth-submit {
  min-height: 46px;
  margin-top: 4px;
}

.auth-error,
.auth-pending-box {
  border-radius: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(220, 38, 38, 0.20);
  background: rgba(254, 226, 226, 0.86);
  color: #991b1b;
}

.auth-pending-box {
  display: grid;
  gap: 4px;
  border-color: rgba(217, 119, 6, 0.22);
  background: rgba(254, 243, 199, 0.92);
  color: #92400e;
}

.startup-gate {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background:
    radial-gradient(circle at top, rgba(var(--accent-base), 0.12), transparent 42%),
    rgba(5, 10, 20, 0.82);
  backdrop-filter: blur(18px);
}

.startup-gate.visible {
  display: flex;
}

.startup-gate-inner {
  width: min(880px, 100%);
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(13, 18, 29, 0.96), rgba(8, 12, 20, 0.98));
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
  padding: 34px 34px 28px;
  color: #f8fafc;
}

.startup-brand {
  font-family: 'Outfit', sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.startup-kicker {
  margin-top: 6px;
  color: rgba(226, 232, 240, 0.72);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.startup-title {
  margin-top: 18px;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.03em;
  max-width: 13ch;
}

.startup-copy {
  margin-top: 12px;
  max-width: 68ch;
  color: rgba(226, 232, 240, 0.76);
  line-height: 1.6;
}

.startup-module-list {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.startup-module-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.startup-module-copy {
  min-width: 0;
}

.startup-module-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #f8fafc;
}

.startup-module-message {
  margin-top: 4px;
  color: rgba(226, 232, 240, 0.72);
  font-size: 0.84rem;
  line-height: 1.45;
}

.startup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.sidebar {
  display: flex; flex-direction: column; gap: 28px;
  position: sticky; top: 32px; height: calc(100vh - 64px); z-index: 10;
}

.brand { display: flex; flex-direction: column; align-items: flex-start; padding: 8px 0 16px; border-bottom: 1px solid var(--line-color); }
.brand-logo { max-width: 160px; height: auto; transition: opacity 0.3s ease; }
.brand-logo[style*="display: none"] + .brand-fallback { display: block !important; }
.brand-fallback { display: none; font-family: 'Outfit', sans-serif; font-size: 1.4rem; font-weight: 800; letter-spacing: -0.03em; }
.brand-fallback .mark { color: var(--accent-color); margin-right: 4px; }
.brand-sub { margin-top: 4px; font-size: 0.75rem; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }

.client-card { background: transparent; padding: 0 12px; }
.small-label { font-size: 0.70rem; color: var(--text-muted); margin-bottom: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }

.search-wrap { position: relative; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-muted); }
.search { width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: rgba(255,255,255,0.05); color: var(--text-main); font-size: 0.85rem; padding: 12px 12px 12px 38px; outline: none; transition: var(--trans); }
.search:focus { border-color: var(--accent-color); box-shadow: 0 0 0 3px var(--accent-soft); }

.suggestions { margin-top: 8px; border: var(--panel-border); border-radius: var(--radius-sm); background: var(--panel-bg); backdrop-filter: var(--panel-blur); max-height: 180px; overflow: auto; display: none; box-shadow: var(--shadow-md); position: absolute; width: 100%; z-index: 20; }
.suggestions.open { display: block; }
.s-item { width: 100%; border: 0; background: transparent; text-align: left; padding: 10px 12px; font-size: 0.85rem; cursor: pointer; color: var(--text-main); border-bottom: 1px solid var(--line-color); transition: var(--trans); }
.s-item:hover { background: var(--accent-soft); color: var(--accent-color); }

.active-client { margin-top: 12px; border: 1px solid var(--accent-soft); background: var(--accent-soft); color: var(--accent-color); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 0.8rem; font-weight: 600; }
.clear-client { margin-top: 8px; width: 100%; border: 1px dashed var(--line-strong); background: transparent; color: var(--text-muted); border-radius: var(--radius-sm); font-size: 0.8rem; font-weight: 600; padding: 8px; cursor: pointer; transition: var(--trans); }
.clear-client:hover { color: var(--danger-color); border-color: var(--danger-soft); background: var(--danger-soft); }

.nav { display: flex; flex-direction: column; gap: 8px; flex-grow: 1; padding: 0 12px; }
.nav-btn { border: 0; background: transparent; border-radius: var(--radius-md); text-align: left; padding: 12px 14px; display: flex; align-items: center; gap: 14px; color: var(--text-muted); font-size: 0.95rem; font-weight: 500; cursor: pointer; transition: all 0.2s ease; position: relative; }
.nav-icon { display: flex; align-items: center; justify-content: center; opacity: 0.6; transition: all 0.2s ease; }
.nav-btn:hover { background: rgba(0, 0, 0, 0.04); color: var(--text-main); }
.nav-btn:hover .nav-icon { opacity: 1; }
.nav-btn.active { background: var(--panel-bg); color: var(--accent-color); font-weight: 700; box-shadow: var(--shadow-sm); border: 1px solid var(--line-color); }
.nav-btn.active .nav-icon { color: var(--accent-color); opacity: 1; }
body[data-theme="daybreak"] .nav-btn:hover { background: rgba(255, 255, 255, 0.05); }

.sidebar-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line-color); display: grid; gap: 4px; font-size: 0.75rem; color: var(--text-muted); font-family: 'Azeret Mono', monospace; }

.main { display: flex; flex-direction: column; gap: 24px; min-width: 0; }

.top { background: transparent; padding: 12px 0 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; border-bottom: 1px solid var(--line-color); margin-bottom: 24px; }
.top h2 { margin: 0; font-size: 2rem; font-family: 'Outfit', sans-serif; font-weight: 800; letter-spacing: -0.04em; background: linear-gradient(90deg, var(--text-main), var(--text-muted)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.top p { margin: 4px 0 0; color: var(--text-muted); font-size: 0.95rem; }

.top-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.tag { border-radius: 99px; background: var(--bg-color); border: 1px solid var(--line-strong); color: var(--text-main); font-size: 0.8rem; padding: 6px 14px; font-weight: 600; display: inline-flex; align-items: center; }
.visual-pill { background: var(--panel-bg); backdrop-filter: blur(5px); box-shadow: var(--shadow-sm); }

.btn { border: 0; border-radius: var(--radius-sm); padding: 10px 16px; font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: var(--trans); display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-soft { background: var(--bg-color); border: 1px solid var(--line-strong); color: var(--text-main); }
.btn-soft:hover { border-color: var(--text-muted); }
.btn-main { background: var(--accent-color); color: #fff; box-shadow: 0 4px 12px var(--accent-glow); }
.btn-main:hover { box-shadow: var(--shadow-float); filter: brightness(1.1); }
.btn-danger { background: var(--danger-soft); color: var(--danger-color); border: 1px solid transparent; }
.btn-danger:hover { background: var(--danger-color); color: #fff; box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3); }

.icon-btn { padding: 10px; border-radius: var(--radius-sm); }

.view { display: none; animation: fadeIn 0.3s ease-out; }
.view.active { display: flex; flex-direction: column; gap: 24px; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.kpi { background: var(--panel-bg); backdrop-filter: var(--panel-blur); -webkit-backdrop-filter: var(--panel-blur); border: var(--panel-border); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-md); position: relative; transition: var(--trans); cursor: pointer; overflow: hidden; }
.kpi::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--accent-color), transparent); opacity: 0.5; transition: var(--trans); }
.kpi:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.kpi:hover::before { opacity: 1; }
.overview-kpi-grid { margin-top: 18px; }
.overview-hero { display:flex; justify-content:space-between; align-items:flex-start; gap:18px; padding:22px 24px; border-radius:22px; border:1px solid rgba(15,23,42,0.08); background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(240,249,255,0.92)); box-shadow: 0 18px 48px rgba(15,23,42,0.05); }
.overview-eyebrow { color: var(--accent-color); font-size: 0.74rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.overview-title { margin-top: 6px; font-size: 1.6rem; line-height: 1.1; font-weight: 900; color: var(--text-main); font-family: 'Quicksand', sans-serif; }
.overview-copy { margin-top: 10px; max-width: 760px; color: var(--text-muted); font-size: 0.95rem; line-height: 1.55; }
.overview-hero-side { display:flex; flex-wrap:wrap; gap:8px; align-items:center; justify-content:flex-end; }
.overview-kpi { position: relative; overflow: hidden; }
.overview-kpi::before { content:""; position:absolute; inset:0 auto 0 0; width:4px; border-radius:999px; opacity:0.92; }
.overview-kpi.router::before { background:#0ea5e9; }
.overview-kpi.incidents::before { background:#ef4444; }
.overview-kpi.pbx::before { background:#10b981; }
.overview-kpi.phones::before { background:#8b5cf6; }
.overview-panel { border-radius: 20px; }
.overview-action-list { display:grid; gap:12px; margin-top:8px; }
.overview-action-card { text-align:left; width:100%; border:1px solid rgba(15,23,42,0.08); background: rgba(248,250,252,0.88); border-radius:18px; padding:16px 18px; cursor:pointer; transition: var(--trans); }
.overview-action-card:hover { transform: translateY(-1px); box-shadow: 0 12px 32px rgba(15,23,42,0.08); border-color: rgba(var(--accent-base), 0.18); background: rgba(255,255,255,0.98); }
.overview-action-title { font-size: 0.98rem; font-weight: 800; color: var(--text-main); }
.overview-action-copy { margin-top: 6px; color: var(--text-muted); font-size: 0.87rem; line-height: 1.5; }
.overview-action-meta { margin-top: 12px; display:flex; justify-content:flex-end; }
.overview-router-list { display:grid; gap:10px; }
.overview-router-row { width:100%; display:flex; justify-content:space-between; align-items:center; gap:12px; text-align:left; border:1px solid rgba(15,23,42,0.08); background: rgba(255,255,255,0.96); border-radius:16px; padding:14px 16px; cursor:pointer; transition: var(--trans); }
.overview-router-row:hover { border-color: rgba(var(--accent-base), 0.18); box-shadow: 0 10px 26px rgba(15,23,42,0.06); }

.kpi-label { color: var(--text-muted); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.kpi-value { margin-top: 8px; font-size: 2.4rem; font-weight: 800; font-family: 'Outfit', sans-serif; letter-spacing: -0.03em; color: var(--text-main); line-height: 1; }
.kpi-mini { margin-top: 12px; color: var(--text-muted); font-size: 0.8rem; display: flex; gap: 8px; }

.spark { width: 100%; height: 32px; margin-top: 12px; color: var(--accent-color); filter: drop-shadow(0 4px 6px var(--accent-glow)); stroke-linecap: round; }

.overview-grid, .routers-grid, .entity-layout { display: grid; gap: 16px; grid-template-columns: 1.2fr 0.8fr; }
.mini-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.op-grid, .trunk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.panel { background: var(--panel-bg); backdrop-filter: var(--panel-blur); border: var(--panel-border); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-md); }
.panel h4 { margin: 0 0 16px; font-size: 1.1rem; font-family: 'Outfit', sans-serif; font-weight: 700; color: var(--text-main); }

.admin-user-list,
.audit-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.admin-grid {
  margin-top: 18px;
}

.admin-glpi-panel {
  display: grid;
  gap: 14px;
}

.admin-glpi-search {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.admin-glpi-search input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--text-main);
  padding: 13px 15px;
  font: inherit;
  outline: none;
  transition: var(--trans);
}

.admin-glpi-search input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.admin-glpi-results {
  display: grid;
  gap: 10px;
  max-height: 430px;
  overflow: auto;
  padding-right: 4px;
}

.admin-glpi-user,
.admin-user-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  padding: 14px;
}

.admin-glpi-user {
  background:
    linear-gradient(90deg, rgba(var(--accent-base), 0.08), transparent 42%),
    rgba(255, 255, 255, 0.07);
}

.admin-user-meta,
.admin-user-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.audit-row {
  display: grid;
  grid-template-columns: 150px minmax(120px, 1fr) minmax(120px, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line-color);
  border-radius: 14px;
  padding: 10px 12px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.84rem;
}

.audit-row strong {
  color: var(--text-main);
}

.row { background: var(--bg-color); border: 1px solid var(--line-color); border-radius: var(--radius-md); padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; transition: var(--trans); }
.row:hover { border-color: var(--line-strong); background: var(--panel-bg); box-shadow: var(--shadow-sm); transform: translateX(2px); }
.row-t { font-size: 0.95rem; font-weight: 600; color: var(--text-main); }
.row-s { margin-top: 4px; color: var(--text-muted); font-size: 0.8rem; }

.pill { border-radius: 99px; font-size: 0.75rem; font-weight: 700; padding: 4px 10px; text-transform: uppercase; letter-spacing: 0.05em; display: inline-block; }
.pill.ok { color: var(--ok-color); background: var(--ok-soft); }
.pill.warn { color: var(--warn-color); background: var(--warn-soft); }
.pill.bad { color: var(--danger-color); background: var(--danger-soft); }
.pill.dnd { color: #fff; background: var(--danger-color); box-shadow: 0 4px 12px var(--danger-soft); }

.jump { border: 1px solid var(--accent-color); background: transparent; color: var(--accent-color); border-radius: 99px; font-size: 0.75rem; font-weight: 700; padding: 6px 12px; cursor: pointer; transition: var(--trans); }
.jump:hover { background: var(--accent-color); color: #fff; box-shadow: 0 4px 12px var(--accent-glow); }

.list { border: var(--panel-border); border-radius: var(--radius-lg); overflow: hidden; background: var(--panel-bg); box-shadow: var(--shadow-md); }
.r-item { padding: 16px; border-bottom: 1px solid var(--line-color); display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer; transition: var(--trans); }
.r-item:last-child { border-bottom: 0; }
.r-item:hover { background: var(--bg-color); }
.r-item.active { background: var(--accent-soft); border-left: 3px solid var(--accent-color); }
.r-name { font-size: 0.95rem; font-weight: 600; color: var(--text-main); }
.r-zone { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

.r-state { font-size: 0.85rem; font-weight: 500; color: var(--text-muted); display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.fiber { background: var(--ok-color); box-shadow: 0 0 0 4px var(--ok-soft); }
.dot.backup { background: var(--warn-color); box-shadow: 0 0 0 4px var(--warn-soft); }
.dot.down { background: var(--danger-color); box-shadow: 0 0 0 4px var(--danger-soft); animation: pulse-red 2s infinite cubic-bezier(0.4, 0, 0.6, 1); }
.r-state.down { color: var(--danger-color); font-weight: 600; }

@keyframes pulse-red { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0px var(--danger-soft); } 50% { opacity: .7; box-shadow: 0 0 0 6px var(--danger-soft); } }

.detail { background: var(--panel-bg); backdrop-filter: var(--panel-blur); border: var(--panel-border); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-md); }
.d-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px dashed var(--line-strong); }
.d-title { font-size: 1.25rem; font-family: 'Outfit', sans-serif; font-weight: 700; color: var(--text-main); }
.d-sub { margin-top: 4px; font-size: 0.85rem; color: var(--text-muted); }

.if-row { background: var(--bg-color); border: 1px solid var(--line-color); border-radius: var(--radius-md); padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.if-name { font-size: 0.95rem; font-weight: 600; color: var(--text-main); }
.if-meta { margin-top: 4px; font-size: 0.8rem; color: var(--text-muted); }

.switch { width: 44px; height: 24px; border: 0; border-radius: 99px; background: var(--line-strong); position: relative; cursor: pointer; transition: background 0.3s ease; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #ffffff; box-shadow: 0 2px 4px rgba(0,0,0,0.2); transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.switch.on { background: var(--ok-color); box-shadow: 0 0 12px var(--ok-soft); }
.switch.on::after { transform: translateX(20px); }

.inline-actions { margin-top: 12px; display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.empty { border: 2px dashed var(--line-strong); border-radius: var(--radius-md); background: rgba(0,0,0,0.02); color: var(--text-muted); font-size: 0.9rem; padding: 24px; text-align: center; }

.mini { background: var(--bg-color); border: 1px solid var(--line-color); border-radius: var(--radius-md); padding: 16px; }
.mini-l { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; }
.mini-v { margin-top: 8px; font-size: 1.4rem; font-weight: 800; font-family: 'Outfit'; color: var(--text-main); }

.op-list, .entity-list { display: grid; gap: 8px; max-height: 280px; overflow: auto; padding-right: 4px; }
.op-list::-webkit-scrollbar, .entity-list::-webkit-scrollbar { width: 4px; }

.op-item { border: 1px solid var(--line-color); background: var(--bg-color); border-radius: var(--radius-sm); padding: 12px; font-size: 0.85rem; }
.op-item b { display: block; color: var(--text-main); margin-bottom: 4px; font-weight: 600; }

.entity-btn { text-align: left; border: 1px solid var(--line-color); background: var(--bg-color); border-radius: var(--radius-sm); padding: 12px; cursor: pointer; color: var(--text-main); font-size: 0.9rem; font-weight: 500; transition: var(--trans); }
.entity-btn:hover { border-color: var(--accent-soft); background: var(--panel-bg); }
.entity-btn.active { border-color: var(--accent-color); background: var(--accent-soft); font-weight: 600; }

.entity-actions, .pbx-sections, .member-actions, .trunk-actions { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; }

.seg-btn { border: 1px solid var(--line-strong); background: var(--panel-bg); color: var(--text-muted); border-radius: 99px; padding: 8px 16px; font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: var(--trans); }
.seg-btn:hover { background: var(--bg-color); color: var(--text-main); }
.seg-btn.active { border-color: transparent; background: var(--accent-color); color: #fff; box-shadow: 0 4px 12px var(--accent-glow); }

.member-picker { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; }

.field { display: grid; gap: 6px; }
.field label { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--bg-color); color: var(--text-main); font-size: 0.9rem; padding: 10px 14px; outline: none; transition: var(--trans); font-family: inherit; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent-color); background: var(--panel-bg); box-shadow: 0 0 0 3px var(--accent-soft); }
.field select[multiple] { min-height: 180px; }
.field.check { align-content: center; grid-template-columns: auto 1fr; gap: 12px; border: 1px solid var(--line-color); border-radius: var(--radius-sm); padding: 12px; cursor: pointer; background: var(--bg-color); }
.field.check label { margin: 0; font-size: 0.9rem; color: var(--text-main); cursor: pointer; }

.yeastar-layout { display: grid; gap: 18px; align-items: start; }
.yeastar-content, .yeastar-view-shell { min-width: 0; }
.yeastar-topbar { display: grid; gap: 10px; margin-bottom: 18px; padding: 12px; border-radius: 16px; background: rgba(255,255,255,0.92); border: 1px solid rgba(15,23,42,0.08); box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04); }
.yeastar-topbar-group { display: grid; gap: 8px; }
.yeastar-topbar-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.yeastar-topbar-items { display: flex; gap: 8px; flex-wrap: wrap; }
.yeastar-topbar-item { border: 1px solid rgba(15,23,42,0.08); background: rgba(248,250,252,0.92); color: var(--text-muted); border-radius: 10px; padding: 9px 12px; font-size: 0.84rem; font-weight: 700; cursor: pointer; transition: var(--trans); }
.yeastar-topbar-item:hover { color: var(--text-main); border-color: rgba(var(--accent-base), 0.14); background: rgba(var(--accent-base), 0.05); }
.yeastar-topbar-item.active { color: var(--accent-color); border-color: rgba(var(--accent-base), 0.26); background: rgba(var(--accent-base), 0.09); box-shadow: inset 0 0 0 1px rgba(var(--accent-base), 0.08); }
.yeastar-view-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.yeastar-view-head h5 { margin: 6px 0 4px; font-size: 1.45rem; font-family: 'Outfit', sans-serif; font-weight: 800; letter-spacing: 0; color: var(--text-main); }
.yeastar-view-head p { color: var(--text-muted); font-size: 0.92rem; max-width: 860px; }
.yeastar-breadcrumb { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.yeastar-toolbar-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.yeastar-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.yeastar-metric { background: rgba(255,255,255,0.92); border: 1px solid rgba(15,23,42,0.08); border-radius: 14px; padding: 16px 18px; box-shadow: 0 8px 26px rgba(15, 23, 42, 0.04); }
.yeastar-metric-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.yeastar-metric-value { margin-top: 8px; font-size: 1.55rem; font-weight: 800; color: var(--text-main); font-family: 'Outfit', sans-serif; }
.yeastar-metric-hint { margin-top: 6px; font-size: 0.8rem; color: var(--text-muted); }

.yeastar-workgrid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr); gap: 18px; align-items: start; }
.yeastar-workgrid.list-only { grid-template-columns: 1fr; }
.yeastar-workgrid.editor-open { grid-template-columns: 360px minmax(0, 1fr); }
.yeastar-browser, .yeastar-editor { background: rgba(255,255,255,0.94); border: 1px solid rgba(15,23,42,0.08); border-radius: 16px; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05); padding: 18px; min-width: 0; }
.yeastar-editor.solo { padding: 20px; }
.yeastar-editor-expanded { padding: 22px; }
.yeastar-browser-head, .yeastar-editor-head, .yeastar-advanced-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.yeastar-browser-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.yeastar-browser-actions input { width: 250px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg-color); color: var(--text-main); font-size: 0.9rem; padding: 10px 12px; }

.yeastar-table-shell { overflow: auto; border: 1px solid rgba(15,23,42,0.08); border-radius: 12px; background: #fff; }
.yeastar-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 680px; }
.yeastar-table.compact { min-width: 560px; }
.yeastar-table thead th { text-align: left; padding: 12px 14px; font-size: 0.74rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.07em; border-bottom: 1px solid rgba(15,23,42,0.08); background: rgba(248, 250, 252, 0.95); position: sticky; top: 0; z-index: 1; }
.yeastar-table tbody td { padding: 12px 14px; border-bottom: 1px solid rgba(15,23,42,0.06); color: var(--text-main); }
.yeastar-table tbody tr { cursor: pointer; transition: background 0.18s ease, box-shadow 0.18s ease; }
.yeastar-table tbody tr:hover { background: rgba(var(--accent-base), 0.05); }
.yeastar-table tbody tr.is-selected { background: rgba(var(--accent-base), 0.09); box-shadow: inset 2px 0 0 var(--accent-color); }
.yeastar-table tbody tr:last-child td { border-bottom: 0; }

.yeastar-editor-body { display: grid; gap: 16px; }
.yeastar-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.yeastar-form-grid.schema-grid .field.span-2 { grid-column: 1 / -1; }
.yeastar-toggle-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.yeastar-section-card { border: 1px solid rgba(15,23,42,0.08); border-radius: 14px; padding: 16px; background: rgba(248, 250, 252, 0.72); }
.yeastar-section-title { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; margin-bottom: 12px; }
.yeastar-editor-breadcrumb { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.yeastar-editor-toolbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid rgba(15,23,42,0.08); }
.yeastar-editor-tabs { display: flex; gap: 8px; flex-wrap: wrap; padding: 4px 0 8px; }
.yeastar-editor-tab { border: 1px solid rgba(15,23,42,0.08); background: rgba(248,250,252,0.9); color: var(--text-muted); border-radius: 10px; padding: 9px 12px; font-size: 0.86rem; font-weight: 700; cursor: pointer; transition: var(--trans); }
.yeastar-editor-tab.active { color: var(--accent-color); border-color: rgba(var(--accent-base), 0.24); background: rgba(var(--accent-base), 0.08); box-shadow: inset 0 0 0 1px rgba(var(--accent-base), 0.08); }
.yeastar-tab-panel { display: none; gap: 14px; }
.yeastar-tab-panel.active { display: grid; }
.yeastar-callout { border-radius: 12px; padding: 12px 14px; border: 1px solid rgba(15,23,42,0.08); }
.yeastar-callout.warn { background: rgba(245, 158, 11, 0.08); border-color: rgba(245, 158, 11, 0.18); color: #92400e; }
.yeastar-check-cell { width: 36px; }
.yeastar-ops-cell { white-space: nowrap; }
.field-help { margin-top: 6px; font-size: 0.78rem; color: var(--text-muted); }
.empty.compact { padding: 12px; min-height: 0; }
.yeastar-kv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.yeastar-kv-card { border: 1px solid rgba(15,23,42,0.08); border-radius: 12px; background: rgba(255,255,255,0.82); padding: 12px; }
.yeastar-kv-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; margin-bottom: 6px; }
.yeastar-kv-value { font-size: 0.88rem; color: var(--text-main); word-break: break-word; }
.yeastar-row-editor { display: grid; gap: 10px; }

.yeastar-member-picker { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: center; }
.yeastar-member-picker-actions { display: grid; gap: 10px; }
.yeastar-member-picker .btn { min-width: 42px; }

.yeastar-destination-block { border: 1px solid rgba(15,23,42,0.08); border-radius: 14px; padding: 14px; background: rgba(248,250,252,0.72); }
.yeastar-destination-title { margin-bottom: 10px; font-size: 0.82rem; color: var(--text-main); font-weight: 700; }
.yeastar-destination-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

.yeastar-advanced { border-top: 1px dashed rgba(15,23,42,0.12); margin-top: 18px; padding-top: 18px; }
.yeastar-dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.yeastar-dashboard-grid.three { grid-template-columns: 0.9fr 0.9fr 1.2fr; }
.yeastar-embed-card { background: rgba(255,255,255,0.94); border: 1px solid rgba(15,23,42,0.08); border-radius: 18px; padding: 14px; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05); }
.yeastar-embed-toolbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.yeastar-embed-shell { position: relative; min-height: 90vh; border-radius: 16px; overflow: hidden; border: 1px solid rgba(15,23,42,0.08); background: linear-gradient(180deg, rgba(248,250,252,0.92), rgba(226,232,240,0.82)); }
.yeastar-embed-frame { display: block; width: 100%; min-height: 90vh; border: 0; background: #fff; }
.yeastar-embed-overlay { position: absolute; inset: 0; display: grid; place-content: center; gap: 8px; text-align: center; background: rgba(248,250,252,0.72); backdrop-filter: blur(6px); padding: 24px; }
.locutions-embed-card { background: rgba(255,255,255,0.94); border: 1px solid rgba(15,23,42,0.08); border-radius: 18px; padding: 16px; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05); }
.locutions-embed-shell { min-height: 86vh; border-radius: 16px; overflow: hidden; border: 1px solid rgba(15,23,42,0.08); background: linear-gradient(180deg, rgba(248,250,252,0.95), rgba(226,232,240,0.86)); }
.locutions-embed-frame { display: block; width: 100%; min-height: 86vh; border: 0; background: #f8fafc; }
.router-capability-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.router-operator-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.router-operator-card { background: rgba(255,255,255,0.88); border: 1px solid rgba(15,23,42,0.08); border-radius: 16px; padding: 14px 16px; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04); }
.router-operator-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.router-operator-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; color: var(--text-muted); font-size: 0.78rem; }
.router-operator-meta span { padding: 6px 10px; border-radius: 999px; background: rgba(15,23,42,0.04); border: 1px solid rgba(15,23,42,0.06); }
.router-inline-note { margin-bottom: 16px; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(15,23,42,0.08); background: rgba(248,250,252,0.72); color: var(--text-muted); font-size: 0.84rem; }
.router-embed-card { background: rgba(255,255,255,0.94); border: 1px solid rgba(15,23,42,0.08); border-radius: 18px; padding: 18px; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05); }
.router-embed-toolbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.router-embed-shell { position: relative; min-height: 76vh; border-radius: 16px; overflow: hidden; border: 1px solid rgba(15,23,42,0.08); background: linear-gradient(180deg, rgba(11,17,31,0.96), rgba(20,30,48,0.88)); }
.router-embed-frame { display: block; width: 100%; min-height: 76vh; border: 0; background: #060b14; }
.router-embed-overlay { position: absolute; inset: 0; display: grid; place-content: center; gap: 8px; text-align: center; background: rgba(6,11,20,0.74); color: #e2e8f0; backdrop-filter: blur(6px); padding: 24px; }
.router-quick-card .empty { min-height: 0; }
.router-real-page { margin-top: 16px; }
.router-real-shell { display: grid; gap: 14px; }
.router-real-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; border-radius: 18px; border: 1px solid rgba(15,23,42,0.08); background: rgba(255,255,255,0.94); padding: 18px 20px; box-shadow: 0 10px 30px rgba(15,23,42,0.05); }
.router-real-head-compact { align-items: center; }
.router-real-title { font-size: 0.95rem; font-weight: 800; color: var(--text-main); }
.router-real-toolbar { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; align-items: center; }
.router-real-picker { display: grid; gap: 6px; min-width: 240px; }
.router-real-picker span { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
.router-real-picker select { appearance: none; border-radius: 12px; border: 1px solid rgba(15,23,42,0.12); background: rgba(248,250,252,0.94); color: var(--text-main); padding: 11px 12px; font: inherit; min-width: 0; }
.router-install-banner { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-radius: 18px; border: 1px solid rgba(245, 158, 11, 0.2); background: linear-gradient(180deg, rgba(255,251,235,0.98), rgba(254,243,199,0.92)); padding: 16px 18px; }
.router-install-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.router-subtabs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.router-examples-card { display: grid; gap: 14px; }
.router-example-meta { display: flex; flex-wrap: wrap; gap: 10px; color: var(--text-muted); font-size: 0.82rem; }
.router-example-dashboard { display: grid; gap: 16px; }
.router-example-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.router-example-kpis article { border: 1px solid rgba(15,23,42,0.08); border-radius: 18px; background: linear-gradient(145deg, rgba(255,255,255,0.96), rgba(241,245,249,0.84)); padding: 14px 16px; box-shadow: 0 12px 32px rgba(15,23,42,0.06); }
.router-example-kpis article.warn { border-color: rgba(217,119,6,0.28); background: linear-gradient(145deg, rgba(255,251,235,0.98), rgba(254,243,199,0.8)); }
.router-example-kpis strong { display: block; font-size: 1.35rem; line-height: 1; color: var(--text-main); }
.router-example-kpis span { display: block; margin-top: 5px; color: var(--text-muted); font-size: 0.76rem; font-weight: 800; letter-spacing: 0.02em; text-transform: uppercase; }
.router-example-section-title { color: var(--text-muted); font-size: 0.76rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; margin: 2px 0 9px; }
.router-board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.router-board-card { position: relative; display: grid; gap: 8px; min-height: 142px; text-align: left; border: 1px solid rgba(15,23,42,0.09); border-radius: 22px; background: radial-gradient(circle at top right, rgba(var(--accent-base),0.13), transparent 44%), linear-gradient(150deg, rgba(255,255,255,0.96), rgba(248,250,252,0.82)); color: var(--text-main); padding: 16px; cursor: pointer; box-shadow: 0 14px 36px rgba(15,23,42,0.07); transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.router-board-card:hover { transform: translateY(-2px); border-color: rgba(var(--accent-base),0.32); box-shadow: 0 18px 42px rgba(15,23,42,0.11); }
.router-board-card.active { border-color: rgba(var(--accent-base),0.62); box-shadow: 0 0 0 3px rgba(var(--accent-base),0.13), 0 18px 44px rgba(15,23,42,0.12); }
.router-board-card.needs-firmware { background: radial-gradient(circle at top right, rgba(245,158,11,0.2), transparent 45%), linear-gradient(150deg, rgba(255,255,255,0.98), rgba(255,251,235,0.88)); }
.router-board-count { font-size: 1.45rem; line-height: 1; font-weight: 900; color: var(--text-main); }
.router-board-name { font-size: 0.96rem; font-weight: 900; overflow-wrap: anywhere; }
.router-board-meta { color: var(--text-muted); font-size: 0.78rem; font-weight: 700; }
.router-board-alert,
.router-board-ok { justify-self: start; align-self: end; border-radius: 999px; padding: 5px 9px; font-size: 0.7rem; font-weight: 900; }
.router-board-alert { color: #92400e; background: rgba(245,158,11,0.16); border: 1px solid rgba(217,119,6,0.24); }
.router-board-ok { color: #166534; background: rgba(34,197,94,0.13); border: 1px solid rgba(22,163,74,0.2); }
.router-version-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.router-version-card { display: grid; gap: 6px; text-align: left; border: 1px solid rgba(15,23,42,0.08); border-radius: 18px; background: rgba(255,255,255,0.88); color: var(--text-main); padding: 13px 14px; cursor: pointer; transition: transform .16s ease, border-color .16s ease, background .16s ease; }
.router-version-card:hover { transform: translateY(-1px); border-color: rgba(var(--accent-base),0.28); }
.router-version-card.active { border-color: rgba(var(--accent-base),0.58); background: rgba(var(--accent-base),0.09); box-shadow: inset 0 -3px 0 rgba(var(--accent-base),0.5); }
.router-version-card.needs-firmware { background: rgba(255,251,235,0.92); border-color: rgba(217,119,6,0.22); }
.router-version-name { font-weight: 900; overflow-wrap: anywhere; }
.router-version-total,
.router-version-meta { color: var(--text-muted); font-size: 0.76rem; font-weight: 750; }
.router-example-grid { display: grid; gap: 12px; }
.router-example-group { border: 1px solid var(--line-color); border-radius: 18px; background: rgba(255,255,255,0.72); padding: 14px; display: grid; gap: 12px; }
.router-example-group-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.router-example-count { min-width: 116px; margin: 0; }
.router-example-count select { min-width: 76px; }
.router-example-list { display: grid; gap: 8px; }
.router-example-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; border: 1px solid var(--line-color); border-radius: 14px; background: var(--bg-color); padding: 10px 12px; }
.router-example-row.needs-firmware { border-color: rgba(217,119,6,0.24); background: rgba(255,251,235,0.88); }
.router-example-stage { border: 1px solid rgba(15,23,42,0.08); border-radius: 20px; background: rgba(255,255,255,0.72); padding: 14px; display: grid; gap: 12px; }
.router-example-stage-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.router-firmware-panel { border: 1px solid rgba(217,119,6,0.2); border-radius: 20px; background: linear-gradient(145deg, rgba(255,251,235,0.98), rgba(254,243,199,0.72)); padding: 14px; display: grid; gap: 12px; }
.router-firmware-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.router-firmware-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; }
.router-firmware-list { display: grid; gap: 8px; }
.settings-firmware-list { margin-top: 10px; }
.router-firmware-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px solid rgba(217,119,6,0.18); border-radius: 14px; background: rgba(255,255,255,0.76); padding: 10px 12px; }
.router-example-errors { border: 1px solid var(--line-color); border-radius: 14px; padding: 10px 12px; color: var(--text-muted); }
.router-example-errors summary { cursor: pointer; font-weight: 700; color: var(--text-main); }
.router-example-error-list { display: grid; gap: 8px; margin-top: 10px; }
.router-unified-page { display: grid; gap: 16px; }
.router-monitor-card { overflow: hidden; }
.router-monitor-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.zabbix-summary-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.zabbix-meta-chip { padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,0.94); border: 1px solid rgba(15,23,42,0.08); color: var(--text-muted); font-size: 0.75rem; font-weight: 700; max-width: 100%; overflow-wrap: anywhere; word-break: break-word; }
.zabbix-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.zabbix-summary-card { border: 1px solid rgba(15,23,42,0.08); border-radius: 16px; background: rgba(248,250,252,0.78); padding: 16px; min-width: 0; display: grid; align-content: start; gap: 6px; min-height: 148px; }
.zabbix-summary-card.up { background: linear-gradient(180deg, rgba(16,185,129,0.12), rgba(255,255,255,0.95)); border-color: rgba(16,185,129,0.18); }
.zabbix-summary-card.down { background: linear-gradient(180deg, rgba(239,68,68,0.10), rgba(255,255,255,0.95)); border-color: rgba(239,68,68,0.2); }
.zabbix-summary-card.degraded { background: linear-gradient(180deg, rgba(245,158,11,0.12), rgba(255,255,255,0.95)); border-color: rgba(245,158,11,0.2); }
.zabbix-summary-card.unknown { background: linear-gradient(180deg, rgba(148,163,184,0.12), rgba(255,255,255,0.95)); border-color: rgba(148,163,184,0.2); }
.zabbix-summary-card.fiber .zabbix-summary-label,
.zabbix-summary-card.icmp .zabbix-summary-label { color: #0f766e; }
.zabbix-summary-card.backup .zabbix-summary-label { color: #b45309; }
.zabbix-summary-card.latency .zabbix-summary-label { color: #0369a1; }
.zabbix-summary-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; margin-bottom: 8px; }
.zabbix-summary-value { font-size: 1.06rem; font-weight: 800; color: var(--text-main); line-height: 1.35; overflow-wrap: anywhere; word-break: break-word; }
.zabbix-summary-value.bad { color: var(--danger-color); }
.zabbix-summary-meta-inline { margin-top: 10px; font-size: 0.78rem; color: var(--text-muted); line-height: 1.52; overflow-wrap: anywhere; word-break: break-word; }
.zabbix-detail-shell { display: grid; gap: 14px; margin-top: 16px; padding-top: 16px; border-top: 1px dashed rgba(15,23,42,0.12); }
.zabbix-detail-topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.zabbix-detail-label { font-size: 0.82rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.zabbix-range-switch { display: flex; flex-wrap: wrap; gap: 8px; }
.zabbix-range-btn { border: 1px solid rgba(15,23,42,0.08); background: rgba(248,250,252,0.92); color: var(--text-muted); border-radius: 10px; padding: 8px 12px; font-size: 0.82rem; font-weight: 700; cursor: pointer; transition: var(--trans); }
.zabbix-range-btn.active { color: var(--accent-color); border-color: rgba(var(--accent-base), 0.26); background: rgba(var(--accent-base), 0.08); box-shadow: inset 0 0 0 1px rgba(var(--accent-base), 0.08); }
.zabbix-problem-list { display: grid; gap: 10px; }
.zabbix-problem-row { display: flex; gap: 10px; align-items: flex-start; border: 1px solid rgba(15,23,42,0.08); border-radius: 14px; background: rgba(248,250,252,0.72); padding: 12px 14px; }
.zabbix-problem-copy { min-width: 0; display: grid; gap: 4px; }
.zabbix-metric-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.zabbix-metric-chip { padding: 7px 10px; border-radius: 999px; border: 1px solid rgba(15,23,42,0.08); background: rgba(255,255,255,0.92); color: var(--text-main); font-size: 0.76rem; font-weight: 700; }
.zabbix-metric-chip.primary { border-color: rgba(14,165,233,0.18); background: rgba(14,165,233,0.08); }
.zabbix-metric-chip.backup { border-color: rgba(245,158,11,0.2); background: rgba(245,158,11,0.08); }
.zabbix-series-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.zabbix-series-card { border: 1px solid rgba(15,23,42,0.08); border-radius: 16px; background: rgba(255,255,255,0.96); padding: 16px; box-shadow: 0 8px 24px rgba(15,23,42,0.04); min-width: 0; }
.zabbix-series-card.backup { border-color: rgba(245,158,11,0.18); background: linear-gradient(180deg, rgba(255,251,235,0.95), rgba(255,255,255,0.98)); }
.zabbix-series-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.zabbix-series-head .row-t,
.zabbix-series-head .row-s,
.zabbix-problem-copy .row-t,
.zabbix-problem-copy .row-s { overflow-wrap: anywhere; word-break: break-word; }
.zabbix-series-unit { font-size: 0.78rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.zabbix-series-chart-shell { border-radius: 14px; overflow: hidden; border: 1px solid rgba(15,23,42,0.06); background: linear-gradient(180deg, rgba(var(--accent-base), 0.06), rgba(248,250,252,0.84)); }
.zabbix-series-chart-canvas { width: 100%; height: 188px; }
.zabbix-series-chart-fallback { padding: 0; }
.zabbix-series-chart { width: 100%; height: 140px; display: block; border-radius: 14px; background: linear-gradient(180deg, rgba(var(--accent-base), 0.08), rgba(248,250,252,0.84)); border: 1px solid rgba(15,23,42,0.06); }
.zabbix-series-area { fill: rgba(var(--accent-base), 0.12); }
.zabbix-series-line { fill: none; stroke: var(--accent-color); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.zabbix-series-scale { margin-top: 8px; display: flex; justify-content: space-between; gap: 8px; font-size: 0.76rem; color: var(--text-muted); font-weight: 600; }
.port-opening-shell { display: grid; gap: 14px; }
.port-opening-form-card, .port-opening-list-card { border: 1px solid rgba(15,23,42,0.08); border-radius: 18px; background: rgba(255,255,255,0.96); box-shadow: 0 10px 30px rgba(15,23,42,0.05); padding: 18px; }
.port-opening-form-head, .port-opening-list-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 14px; }
.port-opening-form-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(180px, 1fr)); gap: 12px; margin-bottom: 14px; }
.port-opening-form-grid .field { margin: 0; }
.port-opening-form-grid input, .port-opening-form-grid select { width: 100%; border-radius: 12px; border: 1px solid rgba(15,23,42,0.12); background: rgba(248,250,252,0.92); color: var(--text-main); padding: 11px 12px; font: inherit; }
.port-opening-row { display: flex; justify-content: space-between; gap: 18px; border: 1px solid rgba(15,23,42,0.08); border-radius: 16px; background: rgba(248,250,252,0.76); padding: 14px 15px; margin-bottom: 10px; transition: var(--trans); }
.port-opening-row:last-child { margin-bottom: 0; }
.port-opening-row.is-fresh { border-color: rgba(16,185,129,0.26); background: linear-gradient(180deg, rgba(236,253,245,0.96), rgba(240,253,250,0.9)); box-shadow: 0 10px 24px rgba(16,185,129,0.08); }
.port-opening-row.is-disabled { opacity: 0.92; background: rgba(248,250,252,0.6); }
.port-opening-main { min-width: 0; display: grid; gap: 6px; }
.port-opening-link { font-weight: 700; color: var(--text-main); word-break: break-all; }
.port-opening-link a { color: inherit; text-decoration: none; }
.port-opening-link a:hover { text-decoration: underline; }
.port-opening-linkbox { border: 1px solid rgba(15,23,42,0.08); border-radius: 12px; background: rgba(255,255,255,0.96); padding: 10px 12px; font-weight: 700; color: var(--text-main); word-break: break-all; }
.port-opening-linkbox a { color: inherit; text-decoration: none; }
.port-opening-linkbox a:hover { text-decoration: underline; }
.port-opening-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.port-opening-tag { padding: 6px 10px; border-radius: 999px; border: 1px solid rgba(15,23,42,0.08); background: rgba(255,255,255,0.92); color: var(--text-muted); font-size: 0.76rem; font-weight: 700; }
.port-opening-meta, .port-opening-expiry { font-size: 0.82rem; color: var(--text-muted); }
.port-opening-side { display: grid; justify-items: end; gap: 8px; min-width: 220px; }
.port-opening-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.phone-access-wrap { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; align-items: center; max-width: 420px; }
.phone-access-wrap select { min-width: 92px; border-radius: 10px; border: 1px solid rgba(15,23,42,0.12); background: rgba(255,255,255,0.96); color: var(--text-main); padding: 8px 10px; font: inherit; }
.phone-access-wrap .row-s { width: 100%; margin-top: 0; text-align: right; word-break: break-word; }
.phone-bulk-toolbar { display: grid; gap: 12px; border-color: rgba(var(--accent-base), 0.18); background: linear-gradient(135deg, rgba(var(--accent-base), 0.08), rgba(255,255,255,0.94)); }
.phone-bulk-actions { justify-content: flex-start; }
.phone-bulk-firmware-panel { display: grid; gap: 10px; border: 1px solid rgba(var(--accent-base), 0.16); border-radius: 18px; background: rgba(255,255,255,0.86); padding: 12px; }
.phone-bulk-firmware-head, .phone-bulk-fw-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.phone-bulk-fw-row { border: 1px solid rgba(15,23,42,0.08); border-radius: 14px; background: rgba(248,250,252,0.82); padding: 10px 12px; }
.phone-bulk-fw-control select { min-width: 260px; max-width: 100%; border-radius: 12px; border: 1px solid rgba(15,23,42,0.12); background: rgba(255,255,255,0.96); color: var(--text-main); padding: 9px 11px; font: inherit; }
.phone-device-card { position: relative; display: grid; gap: 10px; border: 1px solid rgba(15,23,42,0.08); border-radius: 16px; background: rgba(255,255,255,0.92); padding: 13px 14px 14px; margin-top: 8px; cursor: pointer; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease; }
.phone-device-card:hover { border-color: rgba(var(--accent-base), 0.22); box-shadow: 0 10px 26px rgba(15,23,42,0.07); transform: translateY(-1px); }
.phone-device-card:focus-visible { outline: 3px solid rgba(var(--accent-base), 0.26); outline-offset: 2px; }
.phone-device-card.is-selected { border-color: rgba(var(--accent-base), 0.58); background: linear-gradient(180deg, rgba(var(--accent-base), 0.10), rgba(255,255,255,0.96)); box-shadow: 0 14px 34px rgba(var(--accent-base), 0.13); }
.phone-device-card.is-selected::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 6px; height: 3px; border-radius: 999px; background: var(--accent-color); }
.phone-device-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.phone-device-main { min-width: 0; display: grid; gap: 4px; }
.phone-device-pills { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 6px; max-width: 48%; }
.phone-device-actions { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 7px; padding-top: 8px; border-top: 1px solid rgba(15,23,42,0.07); cursor: default; }
.phone-device-actions select { max-width: min(280px, 100%); }
.pbx-page-shell { display: grid; gap: 10px; }
.pbx-sections-compact { margin-top: 0; padding: 12px; border-radius: 16px; background: rgba(255,255,255,0.92); border: 1px solid rgba(15,23,42,0.08); box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04); }
.pbx-stage-embed .yeastar-view-shell { margin-top: 0; }
.yeastar-embed-topbar { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-bottom: 10px; }

body[data-theme="daybreak"] .panel,
body[data-theme="daybreak"] .detail,
body[data-theme="daybreak"] .overview-hero,
body[data-theme="daybreak"] .overview-action-card,
body[data-theme="daybreak"] .overview-router-row,
body[data-theme="daybreak"] .yeastar-topbar,
body[data-theme="daybreak"] .yeastar-metric,
body[data-theme="daybreak"] .yeastar-browser,
body[data-theme="daybreak"] .yeastar-editor,
body[data-theme="daybreak"] .yeastar-embed-card,
body[data-theme="daybreak"] .locutions-embed-card,
body[data-theme="daybreak"] .router-operator-card,
body[data-theme="daybreak"] .router-embed-card,
body[data-theme="daybreak"] .router-real-head,
body[data-theme="daybreak"] .router-example-group,
body[data-theme="daybreak"] .router-example-stage,
body[data-theme="daybreak"] .router-firmware-panel,
body[data-theme="daybreak"] .port-opening-form-card,
body[data-theme="daybreak"] .port-opening-list-card,
body[data-theme="daybreak"] .pbx-sections-compact,
body[data-theme="daybreak"] .phone-bulk-toolbar,
body[data-theme="daybreak"] .phone-bulk-firmware-panel,
body[data-theme="daybreak"] .phone-device-card,
body[data-theme="daybreak"] .zabbix-series-card {
  background: rgba(15, 23, 42, 0.82);
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.34);
}

body[data-theme="daybreak"] .phone-bulk-fw-row {
  background: rgba(30, 41, 59, 0.72);
  border-color: rgba(148, 163, 184, 0.18);
}

body[data-theme="daybreak"] .phone-device-card.is-selected {
  background: linear-gradient(180deg, rgba(var(--accent-base), 0.22), rgba(15, 23, 42, 0.9));
  border-color: rgba(var(--accent-base), 0.58);
}

body[data-theme="daybreak"] .row,
body[data-theme="daybreak"] .mini,
body[data-theme="daybreak"] .router-inline-note,
body[data-theme="daybreak"] .router-example-kpis article,
body[data-theme="daybreak"] .router-board-card,
body[data-theme="daybreak"] .router-version-card,
body[data-theme="daybreak"] .zabbix-summary-card,
body[data-theme="daybreak"] .zabbix-problem-row,
body[data-theme="daybreak"] .port-opening-row,
body[data-theme="daybreak"] .router-example-row,
body[data-theme="daybreak"] .router-firmware-row,
body[data-theme="daybreak"] .router-example-errors,
body[data-theme="daybreak"] .yeastar-topbar-item,
body[data-theme="daybreak"] .yeastar-editor-tab,
body[data-theme="daybreak"] .yeastar-kv-card,
body[data-theme="daybreak"] .yeastar-destination-block {
  background: rgba(30, 41, 59, 0.72);
  border-color: rgba(148, 163, 184, 0.16);
}

body[data-theme="daybreak"] .router-board-card.active,
body[data-theme="daybreak"] .router-version-card.active {
  border-color: rgba(var(--accent-base), 0.62);
  background: linear-gradient(180deg, rgba(var(--accent-base), 0.2), rgba(15, 23, 42, 0.88));
}

body[data-theme="daybreak"] .router-board-card.needs-firmware,
body[data-theme="daybreak"] .router-version-card.needs-firmware,
body[data-theme="daybreak"] .router-example-row.needs-firmware,
body[data-theme="daybreak"] .router-example-kpis article.warn {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.2), rgba(15, 23, 42, 0.88));
  border-color: rgba(245, 158, 11, 0.34);
}

body[data-theme="daybreak"] .router-board-alert {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.34);
}

body[data-theme="daybreak"] .router-board-ok {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.28);
}

body[data-theme="daybreak"] .row:hover,
body[data-theme="daybreak"] .overview-action-card:hover,
body[data-theme="daybreak"] .overview-router-row:hover {
  background: rgba(51, 65, 85, 0.82);
  border-color: rgba(var(--accent-base), 0.32);
}

body[data-theme="daybreak"] .field input,
body[data-theme="daybreak"] .field select,
body[data-theme="daybreak"] .field textarea,
body[data-theme="daybreak"] .router-real-picker select,
body[data-theme="daybreak"] .port-opening-form-grid input,
body[data-theme="daybreak"] .port-opening-form-grid select,
body[data-theme="daybreak"] .phone-access-wrap select {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(148, 163, 184, 0.24);
  color: var(--text-main);
}

body[data-theme="daybreak"] .yeastar-table-shell,
body[data-theme="daybreak"] .zabbix-meta-chip,
body[data-theme="daybreak"] .zabbix-metric-chip,
body[data-theme="daybreak"] .port-opening-linkbox,
body[data-theme="daybreak"] .port-opening-tag {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(148, 163, 184, 0.18);
  color: var(--text-main);
}

body[data-theme="daybreak"] .yeastar-table thead th {
  background: rgba(30, 41, 59, 0.96);
  border-color: rgba(148, 163, 184, 0.18);
}

body[data-theme="daybreak"] .yeastar-table tbody td,
body[data-theme="daybreak"] .yeastar-editor-toolbar {
  border-color: rgba(148, 163, 184, 0.14);
}

body[data-theme="daybreak"] .yeastar-section-card {
  background: rgba(30, 41, 59, 0.64);
  border-color: rgba(148, 163, 184, 0.16);
}

body[data-theme="daybreak"] .yeastar-callout.warn {
  background: rgba(113, 63, 18, 0.28);
  border-color: rgba(251, 191, 36, 0.42);
  color: #fde68a;
}

body[data-theme="daybreak"] .zabbix-summary-card.up { background: linear-gradient(180deg, rgba(45,212,191,0.18), rgba(15,23,42,0.86)); }
body[data-theme="daybreak"] .zabbix-summary-card.down { background: linear-gradient(180deg, rgba(248,113,113,0.18), rgba(15,23,42,0.86)); }
body[data-theme="daybreak"] .zabbix-summary-card.degraded { background: linear-gradient(180deg, rgba(251,191,36,0.18), rgba(15,23,42,0.86)); }
body[data-theme="daybreak"] .zabbix-summary-card.unknown { background: linear-gradient(180deg, rgba(148,163,184,0.18), rgba(15,23,42,0.86)); }
body[data-theme="daybreak"] .zabbix-series-card.backup { background: linear-gradient(180deg, rgba(251,191,36,0.16), rgba(15,23,42,0.86)); }
body[data-theme="daybreak"] .zabbix-series-chart,
body[data-theme="daybreak"] .zabbix-series-chart-shell,
body[data-theme="daybreak"] .yeastar-embed-shell,
body[data-theme="daybreak"] .locutions-embed-shell {
  background: linear-gradient(180deg, rgba(30,41,59,0.96), rgba(15,23,42,0.9));
  border-color: rgba(148, 163, 184, 0.16);
}
body[data-theme="daybreak"] .yeastar-embed-overlay { background: rgba(15,23,42,0.72); }

body[data-theme="daybreak"] [style*="fffbeb"],
body[data-theme="daybreak"] [style*="fff7ed"] {
  background: rgba(113, 63, 18, 0.28) !important;
  border-color: rgba(251, 191, 36, 0.42) !important;
  color: #fde68a !important;
}

body[data-theme="daybreak"] [style*="fff5f5"] {
  background: rgba(127, 29, 29, 0.32) !important;
  border-color: rgba(248, 113, 113, 0.42) !important;
  color: #fecaca !important;
}

.internal-comms-panel {
  display: grid;
  gap: 14px;
}

.internal-comms-head,
.internal-message-head,
.internal-message-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.internal-message-list {
  display: grid;
  gap: 10px;
}

.internal-message-card {
  border: 1px solid rgba(var(--accent-base), 0.14);
  border-radius: var(--radius-md);
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-sm);
}

.internal-message-card.priority-alta {
  border-color: rgba(248, 113, 113, 0.42);
  box-shadow: inset 3px 0 0 rgba(248, 113, 113, 0.88);
}

.internal-message-card.priority-media {
  border-color: rgba(251, 191, 36, 0.34);
  box-shadow: inset 3px 0 0 rgba(251, 191, 36, 0.82);
}

.internal-message-card.priority-baja {
  border-color: rgba(148, 163, 184, 0.24);
  box-shadow: inset 3px 0 0 rgba(148, 163, 184, 0.62);
}

.internal-message-body {
  margin: 10px 0;
  color: var(--text-main);
  line-height: 1.55;
  white-space: pre-wrap;
  font-weight: 600;
}

.internal-message-foot {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.internal-message-form {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(120px, 0.7fr) minmax(180px, 1fr);
  gap: 10px;
}

.internal-message-form textarea {
  grid-column: 1 / -1;
  min-height: 82px;
  resize: vertical;
}

.internal-message-form button {
  justify-self: end;
  grid-column: 1 / -1;
}

.internal-message-form input,
.internal-message-form select,
.internal-message-form textarea {
  width: 100%;
  border: var(--panel-border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--text-main);
  padding: 10px 12px;
  font: inherit;
}

.firmware-pill.ok {
  border-color: rgba(34, 197, 94, 0.42);
}

.firmware-pill.bad {
  border-color: rgba(248, 113, 113, 0.52);
}

body[data-theme="daybreak"] .internal-message-card {
  background: rgba(30, 41, 59, 0.72);
  border-color: rgba(148, 163, 184, 0.18);
}

body[data-theme="daybreak"] .internal-message-form input,
body[data-theme="daybreak"] .internal-message-form select,
body[data-theme="daybreak"] .internal-message-form textarea,
body[data-theme="daybreak"] .admin-glpi-search input {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(148, 163, 184, 0.24);
  color: var(--text-main);
}

.status { margin-top: auto; padding: 16px; border-radius: var(--radius-md); background: var(--panel-bg); border: var(--panel-border); font-size: 0.85rem; color: var(--text-muted); font-family: 'Azeret Mono', monospace; }
.status.error { color: var(--danger-color); border-color: var(--danger-soft); background: var(--danger-soft); }

.toasts { position: fixed; top: 24px; right: 24px; display: grid; gap: 12px; max-width: 360px; z-index: 9999; }
.toast { color: #fff; border-radius: var(--radius-md); padding: 12px 16px; font-size: 0.9rem; font-weight: 500; font-family: 'Inter'; box-shadow: var(--shadow-float); animation: slideIn 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); display: flex; align-items: center; gap: 10px; }
.toast.ok { background: var(--ok-color); }
.toast.error { background: var(--danger-color); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

@media (max-width: 1260px) {
  .app { grid-template-columns: 1fr; padding: 16px; gap: 16px; }
  .sidebar { position: static; height: auto; }
  .kpi-grid, .mini-grid, .trunk-grid, .op-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-grid, .routers-grid, .entity-layout { grid-template-columns: 1fr; }
  .yeastar-layout, .yeastar-workgrid, .yeastar-dashboard-grid.three, .yeastar-workgrid.editor-open, .yeastar-workgrid.list-only { grid-template-columns: 1fr; }
  .router-example-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-user-card, .admin-glpi-user { grid-template-columns: 1fr; align-items: flex-start; }
  .admin-user-meta, .admin-user-actions { justify-content: flex-start; }
}

@media (max-width: 760px) {
  .kpi-grid, .mini-grid, .trunk-grid, .op-grid { grid-template-columns: 1fr; }
  .top { flex-direction: column; align-items: flex-start; }
  .top-actions { width: 100%; justify-content: flex-start; overflow-x: auto; padding-bottom: 8px; }
  .yeastar-metrics, .yeastar-form-grid, .yeastar-toggle-grid, .yeastar-destination-grid, .yeastar-dashboard-grid, .yeastar-member-picker, .yeastar-kv-grid { grid-template-columns: 1fr; }
  .yeastar-view-head, .yeastar-browser-head, .yeastar-editor-head, .yeastar-advanced-head { flex-direction: column; align-items: flex-start; }
  .yeastar-browser-actions { width: 100%; }
  .yeastar-browser-actions input { width: 100%; }
  .yeastar-editor-toolbar { flex-direction: column; align-items: flex-start; }
  .yeastar-embed-toolbar { flex-direction: column; align-items: flex-start; }
  .router-operator-grid { grid-template-columns: 1fr; }
  .router-embed-toolbar { flex-direction: column; align-items: flex-start; }
  .router-real-head, .router-install-banner, .yeastar-embed-topbar, .zabbix-detail-topbar { flex-direction: column; align-items: flex-start; }
  .router-real-toolbar { width: 100%; justify-content: flex-start; }
  .router-real-picker { width: 100%; min-width: 0; }
  .router-real-picker select { width: 100%; }
  .router-example-kpis,
  .router-board-grid,
  .router-version-grid { grid-template-columns: 1fr; }
  .router-example-stage-head,
  .router-firmware-head,
  .router-example-row,
  .router-firmware-row { flex-direction: column; align-items: flex-start; }
  .router-example-count,
  .router-example-count select { width: 100%; min-width: 0; }
  .port-opening-form-head, .port-opening-list-head, .port-opening-row, .zabbix-problem-row, .zabbix-series-head { flex-direction: column; align-items: flex-start; }
  .port-opening-form-grid { grid-template-columns: 1fr; }
  .port-opening-side { min-width: 0; width: 100%; justify-items: start; }
  .port-opening-actions { justify-content: flex-start; }
  .zabbix-summary-grid, .zabbix-series-grid { grid-template-columns: 1fr; }
  .phone-access-wrap { justify-content: flex-start; max-width: none; }
  .phone-access-wrap .row-s { text-align: left; }
  .phone-device-top, .phone-bulk-firmware-head, .phone-bulk-fw-row { flex-direction: column; align-items: flex-start; }
  .phone-device-pills { justify-content: flex-start; max-width: none; }
  .phone-device-actions { justify-content: flex-start; }
  .phone-bulk-fw-control, .phone-bulk-fw-control select { width: 100%; min-width: 0; }
  .internal-message-form { grid-template-columns: 1fr; }
  .internal-message-form button { justify-self: stretch; }
  .admin-glpi-search { grid-template-columns: 1fr; }
  .audit-row { grid-template-columns: 1fr; }
  .yeastar-embed-shell, .yeastar-embed-frame, .locutions-embed-shell, .locutions-embed-frame { min-height: 78vh; }
  .router-embed-shell, .router-embed-frame { min-height: 68vh; }
}
