:root { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif; color: #202637; background: #f5f6ff; font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 95% 0%, #dff4fb 0, transparent 50%), radial-gradient(ellipse at 10% 60%, #eee5ff 0, transparent 50%); }
[hidden] { display: none !important; }
button, input, select { font: inherit; }
button { min-height: 42px; padding: 10px 16px; border: 1px solid #dce0ee; border-radius: 13px; color: inherit; background: #fff; cursor: pointer; }
button:hover:not(:disabled) { border-color: #9270eb; background: #f8f5ff; }
button:disabled, fieldset:disabled button { opacity: .5; cursor: default; }
:focus-visible { outline: 3px solid #8050e3; outline-offset: 3px; }
button.primary { color: #fff; background: #202637; border-color: #202637; box-shadow: 0 8px 18px #2026371c; }
button.primary:hover:not(:disabled) { background: #393151; }
button.danger { color: #a62b47; }
input, select { width: 100%; min-height: 44px; border: 1px solid #dce0ee; border-radius: 12px; padding: 10px 12px; background: #ffffffd9; color: inherit; }
input::placeholder { color: #717b93; }
label { display: grid; gap: 8px; font-size: 13px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.glass { border: 1px solid #fff; border-radius: 24px; background: #ffffffb5; box-shadow: 0 12px 35px #36385d08; }
.brand { margin: 16px 24px; display: flex; align-items: center; gap: 12px; padding: 14px 22px; }
.brand-mark { width: 34px; height: 34px; flex-shrink: 0; }
.studio-logo { position: relative; display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; overflow: hidden; cursor: pointer; border: 1px solid rgba(255,255,255,1); border-radius: 12.5%; background: rgba(255,255,255,.6); box-shadow: 0 10px 40px -10px rgba(0,0,0,.05); backdrop-filter: blur(24px); transition: transform .5s ease-out, box-shadow .5s ease-out, border-color .5s ease-out; }
.studio-logo:hover { transform: translateY(-4.166667%); border-color: rgba(139,92,246,.3); box-shadow: 0 25px 50px -12px rgba(139,92,246,.15), 0 0 30px rgba(6,182,212,.1); }
.studio-logo svg { position: relative; z-index: 2; width: 100%; height: 100%; overflow: visible; padding: 8.333333%; }
.studio-logo-aurora { position: absolute; z-index: 1; width: 58.333333%; height: 58.333333%; border-radius: 999px; background: linear-gradient(45deg, rgba(103,232,249,.3), rgba(192,132,252,.3)); filter: blur(24px); animation: studio-logo-aurora 6s ease-in-out infinite; }
.studio-logo-corner { position: absolute; z-index: 3; width: 4.166667%; height: 4.166667%; border-color: #cbd5e1; border-style: solid; border-width: 0; }
.studio-logo-corner-tl { top: 6.25%; left: 6.25%; border-top-width: 1px; border-left-width: 1px; border-top-left-radius: 2px; }
.studio-logo-corner-tr { top: 6.25%; right: 6.25%; border-top-width: 1px; border-right-width: 1px; border-top-right-radius: 2px; }
.studio-logo-corner-bl { bottom: 6.25%; left: 6.25%; border-bottom-width: 1px; border-left-width: 1px; border-bottom-left-radius: 2px; }
.studio-logo-corner-br { right: 6.25%; bottom: 6.25%; border-right-width: 1px; border-bottom-width: 1px; border-bottom-right-radius: 2px; }
.studio-logo-draw { stroke-dasharray: 200; animation: studio-logo-draw 3s cubic-bezier(.4,0,.2,1) infinite; }
.studio-logo-node { transform-origin: center; animation: studio-logo-pulse 2s ease-in-out infinite; }
.studio-logo-node-delay { animation-delay: 1s; }
@keyframes studio-logo-aurora { 0%, 100% { transform: scale(1); opacity: .5; } 50% { transform: scale(1.15); opacity: .8; } }
@keyframes studio-logo-draw { 0% { stroke-dashoffset: 200; opacity: 0; } 20% { opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 1; } }
@keyframes studio-logo-pulse { 0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px rgba(139,92,246,.4)); } 50% { transform: scale(1.3); filter: drop-shadow(0 0 10px rgba(6,182,212,.8)); } }
@media (prefers-reduced-motion: reduce) {
  .studio-logo { transition: none; }
  .studio-logo-aurora, .studio-logo-draw, .studio-logo-node { animation: none; }
  .studio-logo-draw { stroke-dashoffset: 0; }
}
.brand strong { font-size: 13px; }
.brand small { display: block; margin-top: 4px; font-size: 11px; color: #717b93; letter-spacing: 1px; }
.brand button { margin-left: auto; }
main { max-width: 1300px; margin: 42px auto; padding: 0 24px; }
h1 { font-size: clamp(28px, 3vw, 40px); margin: 10px 0 12px; letter-spacing: -1px; }
h2 { margin: 0 0 8px; font-size: 21px; }
p { line-height: 1.7; }
.eyebrow { font-size: 11px; letter-spacing: 2px; color: #8554dd; font-weight: 700; }
.muted, footer { color: #657089; font-size: 13px; }
.login-layout { display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: 9%; max-width: 980px; margin: 85px auto; }
.intro > p:not(.eyebrow) { color: #657089; }
.intro-note { padding: 22px; margin-top: 30px; }
.intro-note p { margin-bottom: 0; font-size: 14px; }
.login-card { padding: 32px; display: grid; gap: 22px; }
.login-card p { margin: 0; }
.page-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.button-group { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 24px 0; }
.stat { padding: 18px 22px; }
.stat b { display: block; margin-top: 8px; font-size: 28px; }
.stat small { color: #657089; }
.work-area { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 20px; }
nav { padding: 12px; align-self: start; display: grid; gap: 8px; }
nav button { text-align: left; border-color: transparent; background: transparent; }
nav button[aria-current="page"] { color: #fff; background: #202637; }
.content { padding: 24px; min-width: 0; }
.content-header p { margin-top: 8px; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0; }
.filters label { flex: 1 1 150px; }
.filters label:first-child { flex-basis: 240px; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th { text-align: left; padding: 12px 8px; font-weight: 500; color: #657089; }
td { border-top: 1px solid #e8eaf3; padding: 18px 8px; vertical-align: top; overflow-wrap: anywhere; }
td small { display: block; color: #657089; margin-top: 6px; }
td select { width: auto; max-width: 150px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.row-actions button { font-size: 12px; min-height: 36px; padding: 7px 10px; }
.badge { display: inline-block; padding: 4px 9px; border-radius: 9px; font-size: 12px; background: #eff0f5; white-space: nowrap; }
.badge.active, .badge.approved { color: #08795e; background: #dff8ec; }
.badge.pending { color: #8b6111; background: #fff1d2; }
.empty { padding: 40px 12px; text-align: center; color: #657089; }
.device-card, .audit-card { border-top: 1px solid #e8eaf3; padding: 18px 0; }
.device-card h3 { margin: 0 0 8px; font-size: 15px; overflow-wrap: anywhere; }
.device-card p, .audit-card p { margin: 6px 0; font-size: 13px; overflow-wrap: anywhere; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 20px; }
#message { border-radius: 14px; padding: 14px 18px; border: 1px solid #b7e6d5; background: #edfbf5; font-size: 14px; overflow-wrap: anywhere; }
#message.error { background: #fff0f2; border-color: #efbec7; color: #952c46; }
footer { text-align: center; padding: 24px; }
.connection { max-width: 700px; margin: 60px auto; padding: 32px; }
dialog { border: 1px solid #e4dafa; border-radius: 24px; max-width: min(500px, 92vw); padding: 28px; color: #202637; }
dialog::backdrop { background: #20263770; }
dialog p { white-space: pre-line; overflow-wrap: anywhere; }
dialog .button-group { justify-content: flex-end; }
@media (max-width: 1000px) { .work-area { grid-template-columns: 1fr; } nav { display: flex; flex-wrap: wrap; } nav button { flex: 1 1 auto; text-align: center; } .content { padding: 20px; } }
@media (max-width: 720px) {
  .brand { margin: 10px 12px; padding: 12px; } main { padding: 0 14px; margin: 24px auto; }
  .login-layout { display: block; margin: 30px auto; } .intro { margin-bottom: 24px; } .intro-note { display: none; } .login-card { padding: 24px; }
  .page-header { display: block; } .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; } .stat { padding: 14px; }
  table, tbody, tr, td { display: block; } thead { display: none; } tr { border-top: 1px solid #e0e3ef; padding: 14px 0; } td { border: 0; padding: 7px 0; }
  td::before { content: attr(data-label); color: #657089; display: block; font-size: 11px; margin-bottom: 6px; }
  .content { padding: 18px; } .filters { gap: 10px; } .row-actions button { flex-grow: 1; }
  .brand strong { font-size: 11px; } .brand small { font-size: 10px; } .brand button { padding: 8px; }
}
