:root {
  --bg: #06090e;
  --panel: #0d131c;
  --panel-2: #111a26;
  --line: #202c3a;
  --text: #edf4fb;
  --muted: #8291a3;
  --green: #48e3a2;
  --red: #ff6b78;
  --blue: #62a8ff;
  --amber: #ffc867;
  --shadow: 0 24px 80px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--text); background: radial-gradient(circle at 12% -8%, rgba(72,227,162,.13), transparent 34rem), radial-gradient(circle at 96% 0%, rgba(98,168,255,.11), transparent 32rem), var(--bg); font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input { font: inherit; }
.shell { width: min(1280px, calc(100% - 32px)); margin: 0 auto; padding: 36px 0 64px; }
.topbar, .brand-lockup, .top-actions, .gateway, .identity, .status, .share-line, .danger-row, .client-brand { display: flex; align-items: center; }
.topbar { justify-content: space-between; gap: 22px; margin-bottom: 25px; }
.brand-lockup { gap: 14px; }
.brand-mark { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; color: #06110d; background: linear-gradient(135deg, var(--green), #8cf1c7); box-shadow: 0 16px 40px rgba(72,227,162,.18); font-size: 30px; font-weight: 900; }
.brand-mark.small { width: 44px; height: 44px; border-radius: 14px; font-size: 21px; }
.eyebrow { color: var(--green); font-size: 11px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
h1 { margin: 3px 0 1px; font-size: clamp(27px, 4vw, 40px); letter-spacing: -.045em; line-height: 1.05; }
h2 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.subtitle, .card-head p, .side > p, .client-action p { color: var(--muted); margin: 3px 0 0; }
.top-actions { gap: 10px; }
.gateway { gap: 9px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; background: rgba(13,19,28,.8); color: #c7d2df; white-space: nowrap; }
.pulse, .status-dot { width: 8px; height: 8px; border-radius: 50%; }
.pulse { background: var(--green); box-shadow: 0 0 0 5px rgba(72,227,162,.1); }
.stats, .client-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 17px; }
.stat, .card { border: 1px solid var(--line); background: linear-gradient(155deg, rgba(17,26,38,.97), rgba(9,14,22,.98)); box-shadow: var(--shadow); }
.stat { border-radius: 17px; padding: 17px 19px; }
.stat-label { color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.stat-value { margin-top: 4px; font-size: 25px; font-weight: 780; letter-spacing: -.035em; }
.stat-value.smaller { font-size: 21px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 335px; gap: 17px; align-items: start; }
.card { border-radius: 20px; overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.refresh, .footnote, .client-footnote { color: var(--muted); font-size: 11px; }
.refresh { display: inline-flex; align-items: center; gap: 7px; }
.pulse.tiny { width: 6px; height: 6px; box-shadow: 0 0 0 3px rgba(72,227,162,.08); }
.user-row { border-bottom: 1px solid var(--line); transition: background .2s; }
.user-row:last-child { border-bottom: 0; }
.user-row.highlight { background: rgba(72,227,162,.055); }
.user-summary { display: grid; grid-template-columns: minmax(175px, 1.25fr) 125px repeat(4, minmax(95px, .72fr)) 76px; gap: 12px; align-items: center; padding: 16px 19px; }
.identity { gap: 10px; min-width: 0; }
.avatar { display: grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; border-radius: 11px; color: #07110d; background: linear-gradient(135deg, var(--green), #8cf1c7); font-weight: 850; }
.name { font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ip { color: var(--muted); font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; }
.status { gap: 7px; font-weight: 750; font-size: 12px; white-space: nowrap; }
.online { color: var(--green); } .online .status-dot { background: var(--green); box-shadow: 0 0 0 4px rgba(72,227,162,.1); }
.offline { color: var(--muted); } .offline .status-dot { background: #536173; }
.disabled { color: var(--red); } .disabled .status-dot { background: var(--red); }
.metric { min-width: 0; }
.metric span, .detail-stack span { display: block; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.metric strong { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quota-progress { display: block; width: calc(100% - 38px); height: 5px; margin: -4px 19px 12px; overflow: hidden; border: 0; border-radius: 999px; background: #1c2734; accent-color: var(--blue); }
.quota-progress::-webkit-progress-bar { background: #1c2734; border-radius: 999px; }.quota-progress::-webkit-progress-value { background: linear-gradient(90deg, var(--blue), var(--green)); border-radius: 999px; }
.quota-progress.large { width: 100%; height: 8px; margin: 0 0 16px; }
.manage-panel { padding: 18px 19px 20px; background: rgba(5,9,14,.45); border-top: 1px solid var(--line); }
.manage-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 22px; }
.detail-stack { display: grid; gap: 14px; }
.detail-stack strong { display: block; margin-top: 3px; }
.detail-stack small { display: block; color: var(--muted); }
.share-line { gap: 7px; margin-top: 5px; }
.share-line input { min-width: 0; }
.side { padding: 20px; }
.side > p { margin-bottom: 18px; font-size: 13px; }
label { display: block; color: #c9d4df; font-size: 11px; font-weight: 760; margin: 12px 0 7px; }
input[type=text], input[type=password], input[type=number] { width: 100%; border: 1px solid #2a3748; border-radius: 11px; padding: 11px 12px; color: var(--text); background: #080d14; outline: none; }
input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(98,168,255,.1); }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.checkbox { display: flex; align-items: center; gap: 8px; color: var(--muted); margin: 12px 0; }
.button { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 11px; padding: 11px 13px; cursor: pointer; text-decoration: none; font-weight: 800; color: var(--text); white-space: nowrap; }
.button:hover { filter: brightness(1.07); }
.button.primary { width: 100%; margin-top: 15px; color: #06110d; background: linear-gradient(135deg, var(--green), #83f0c2); }
.button.secondary { width: 100%; background: #1a6be0; }
.button.ghost { border: 1px solid #2b3949; background: #111925; color: #d9e3ed; }
.button.compact { padding: 8px 10px; font-size: 11px; }
.button.warning { color: #1b1300; background: var(--amber); }.button.success-button { color: #06110d; background: var(--green); }.button.danger { background: rgba(255,107,120,.12); border: 1px solid rgba(255,107,120,.36); color: #ffadb5; }
.danger-row { justify-content: flex-end; gap: 8px; margin-top: 17px; padding-top: 16px; border-top: 1px solid var(--line); }
.notice { margin-bottom: 16px; padding: 13px 15px; border: 1px solid; border-radius: 13px; }.notice.error { color: #ffc4ca; background: rgba(255,107,120,.08); border-color: rgba(255,107,120,.3); }.notice.success { color: #bcf8de; background: rgba(72,227,162,.08); border-color: rgba(72,227,162,.3); }
.automation-note { margin-top: 17px; padding: 13px; border: 1px solid rgba(98,168,255,.2); border-radius: 12px; background: rgba(98,168,255,.06); }.automation-note span { color: var(--blue); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }.automation-note p { color: var(--muted); margin: 4px 0 0; font-size: 12px; }
.footnote { margin: 15px 19px 18px; }
.login-body { display: grid; place-items: center; padding: 24px; }
.login-shell { width: min(930px, 100%); display: grid; grid-template-columns: 1.15fr .85fr; gap: 20px; align-items: stretch; }
.login-brand { padding: 54px 44px; border: 1px solid var(--line); border-radius: 25px; background: linear-gradient(145deg, rgba(14,22,32,.95), rgba(7,11,17,.92)); box-shadow: var(--shadow); }.login-brand .eyebrow { margin-top: 30px; }.login-brand h1 { font-size: clamp(38px, 6vw, 62px); }.login-brand h1 span { color: var(--green); }.login-brand p { max-width: 480px; color: var(--muted); font-size: 16px; }
.login-card { padding: 38px 31px; border: 1px solid var(--line); border-radius: 25px; background: var(--panel); box-shadow: var(--shadow); }.login-card h2 { margin-top: 28px; font-size: 27px; }.login-card > p { color: var(--muted); margin: 5px 0 19px; }.login-card .button { margin-top: 20px; }
.secure-pill { display: inline-flex; align-items: center; gap: 8px; color: #b9c7d5; font-size: 11px; }
.client-body { padding: 28px 16px 60px; }.client-shell { width: min(820px, 100%); margin: 0 auto; }.client-brand { gap: 12px; margin-bottom: 22px; }.client-brand h1 { font-size: 25px; }.client-hero { display: flex; justify-content: space-between; align-items: center; padding: 26px; margin-bottom: 14px; }.client-hero h2 { font-size: 34px; margin-bottom: 9px; }.kicker { color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 4px; }.client-ip { color: var(--muted); font: 14px ui-monospace, monospace; }.client-stats { grid-template-columns: repeat(3, 1fr); }.client-action { padding: 23px; margin-bottom: 14px; }.platforms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 17px; }.platform { display: block; padding: 14px; border: 1px solid #2a3748; border-radius: 12px; color: var(--text); text-decoration: none; background: #0a1018; }.platform:hover { border-color: var(--blue); }.platform strong, .platform span { display: block; }.platform span { color: var(--muted); font-size: 11px; margin-top: 3px; }.download-button { margin-top: 17px; }.unavailable { display: block; color: var(--amber); margin-top: 16px; }.client-footnote { text-align: center; margin-top: 20px; }
@media (max-width: 1100px) { .user-summary { grid-template-columns: minmax(170px, 1.3fr) 110px repeat(2, 1fr) 75px; }.user-summary .metric:nth-of-type(3), .user-summary .metric:nth-of-type(4) { display: none; } }
@media (max-width: 870px) { .layout, .login-shell { grid-template-columns: 1fr; }.stats { grid-template-columns: 1fr 1fr; }.topbar { align-items: flex-start; }.top-actions { flex-direction: column; align-items: flex-end; }.user-summary { grid-template-columns: 1fr 110px 75px; }.user-summary .metric { display: none; }.manage-grid { grid-template-columns: 1fr; }.login-brand { padding: 34px 28px; }.login-brand h1 { font-size: 42px; } }
@media (max-width: 560px) { .shell { width: min(100% - 18px, 1280px); padding-top: 20px; }.topbar { flex-direction: column; }.top-actions { width: 100%; flex-direction: row; justify-content: space-between; }.gateway { font-size: 11px; }.stats, .client-stats { grid-template-columns: 1fr 1fr; }.user-summary { grid-template-columns: 1fr auto; }.user-summary .status { display: none; }.field-pair, .platforms { grid-template-columns: 1fr; }.danger-row { align-items: stretch; flex-direction: column; }.danger-row form, .danger-row .button { width: 100%; }.client-hero { align-items: flex-start; flex-direction: column; gap: 14px; }.client-stats .stat:last-child { grid-column: 1 / -1; }.login-body { padding: 10px; }.login-brand { display: none; }.login-card { padding: 28px 21px; } }

/* Felmaden visual system v3 */
.shell, .client-shell, .login-shell { position: relative; z-index: 2; }
.motion-scene { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: radial-gradient(circle at 50% 120%, rgba(72,227,162,.05), transparent 45%); }
.motion-scene.subtle { opacity: .58; }
.motion-grid { position: absolute; inset: 0; opacity: .24; background-image: linear-gradient(rgba(130,180,220,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(130,180,220,.055) 1px, transparent 1px); background-size: 54px 54px; -webkit-mask-image: radial-gradient(circle at 50% 35%, #000 5%, transparent 72%); mask-image: radial-gradient(circle at 50% 35%, #000 5%, transparent 72%); }
.orb { position: absolute; border-radius: 50%; filter: blur(75px); opacity: .18; will-change: transform; }
.orb-a { width: 390px; height: 390px; left: -120px; top: 12%; background: #35efaa; }
.orb-b { width: 470px; height: 470px; right: -170px; top: -100px; background: #3e8dff; }
.orb-c { width: 310px; height: 310px; left: 44%; bottom: -170px; background: #725bff; }
.reveal-item { opacity: 1; }
.button i { margin-right: 8px; font-size: 17px; }

.client-body { background: #05080d; padding-top: 34px; }
.client-shell { width: min(1040px, 100%); }
.client-brand { min-height: 58px; }
.client-brand .encrypted-pill { margin-left: auto; }
.encrypted-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid rgba(72,227,162,.25); border-radius: 999px; color: #baf7dd; background: rgba(72,227,162,.07); font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.encrypted-pill i { font-size: 16px; color: var(--green); }
.client-hero { position: relative; min-height: 190px; overflow: hidden; background: linear-gradient(130deg, rgba(20,34,48,.98), rgba(8,13,21,.97)); }
.client-hero::after { content: ""; position: absolute; width: 280px; height: 280px; right: -90px; top: -115px; border: 1px solid rgba(72,227,162,.15); border-radius: 50%; box-shadow: 0 0 0 36px rgba(72,227,162,.025), 0 0 0 74px rgba(98,168,255,.025); }
.client-hero > * { position: relative; z-index: 1; }
.profile-address { min-width: 185px; padding: 14px 16px; border: 1px solid rgba(151,176,202,.15); border-radius: 14px; background: rgba(5,9,14,.48); text-align: right; }
.profile-address span, .server-latency span { display: block; color: var(--muted); font-size: 10px; font-weight: 780; letter-spacing: .08em; text-transform: uppercase; }
.profile-address strong { display: block; margin-top: 4px; font: 14px ui-monospace, SFMono-Regular, Menlo, monospace; }
.client-stats { grid-template-columns: repeat(5, 1fr); gap: 10px; }
.client-stats .stat { min-height: 96px; padding: 15px 16px; }
.traffic-stat { display: flex; align-items: center; gap: 12px; }
.stat-icon, .title-icon, .server-signal { display: grid; place-items: center; flex: 0 0 auto; }
.stat-icon { width: 38px; height: 38px; border-radius: 12px; font-size: 20px; }
.traffic-stat.upload .stat-icon { color: var(--green); background: rgba(72,227,162,.1); }
.traffic-stat.download .stat-icon { color: var(--blue); background: rgba(98,168,255,.11); }

.server-health { margin-bottom: 14px; padding: 23px; overflow: visible; }
.section-title { display: flex; align-items: center; gap: 13px; }
.section-title > div:last-child { min-width: 0; }
.section-title > div > p:not(.kicker):not(.step-label) { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.title-icon { width: 43px; height: 43px; border: 1px solid rgba(98,168,255,.2); border-radius: 13px; color: var(--blue); background: rgba(98,168,255,.08); font-size: 21px; }
.server-grid { display: grid; gap: 9px; margin-top: 18px; }
.server-tile { display: grid; grid-template-columns: auto minmax(0,1fr) 100px 86px; align-items: center; gap: 14px; padding: 14px 15px; border: 1px solid var(--line); border-radius: 15px; background: rgba(6,11,17,.62); transition: border-color .2s, transform .2s; }
.server-tile:hover { transform: translateY(-1px); border-color: #34465a; }
.server-tile.online { border-color: rgba(72,227,162,.2); background: linear-gradient(90deg, rgba(72,227,162,.055), rgba(6,11,17,.62) 35%); }
.server-signal { width: 40px; height: 40px; border-radius: 12px; color: var(--muted); background: rgba(130,145,163,.09); font-size: 20px; }
.online .server-signal, .server-tile.online .server-signal { color: var(--green); background: rgba(72,227,162,.1); }
.server-main strong, .server-main span { display: block; }
.server-main strong { font-size: 14px; }
.server-main span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.server-main span i { margin-right: 5px; }
.server-latency strong { display: block; margin-top: 2px; font-size: 13px; }
.server-state { display: flex; align-items: center; justify-content: flex-end; gap: 7px; font-size: 12px; font-weight: 800; }
.server-tile.online .server-state { color: var(--green); }
.server-tile.offline .server-state { color: var(--muted); }

.client-actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.client-actions-grid .client-action { margin: 0; }
.compact-title { align-items: flex-start; }
.step-label { margin: 0 0 2px; color: var(--green); font-size: 10px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.platforms { grid-template-columns: repeat(3, 1fr); }
.platform { position: relative; min-width: 0; transition: transform .2s, border-color .2s, background .2s; }
.platform:hover { transform: translateY(-2px); background: #0d1621; }
.platform > i { display: block; margin-bottom: 13px; color: var(--blue); font-size: 22px; }
.config-action { display: flex; flex-direction: column; justify-content: space-between; }
.download-button { gap: 4px; }
.qr-wrap { display: flex; align-items: center; gap: 20px; margin: 20px 0 3px; }
.qr-column { flex: 0 0 auto; text-align: center; }
.qr-frame { display: block; padding: 8px; border-radius: 16px; background: #fff; box-shadow: 0 12px 35px rgba(0,0,0,.28), 0 0 0 1px rgba(255,255,255,.13); }
.qr-frame img { display: block; width: 250px; height: 250px; image-rendering: pixelated; }
.qr-full-link { display: inline-block; margin-top: 8px; color: var(--blue); font-size: 11px; font-weight: 750; text-decoration: none; }
.qr-full-link:hover { text-decoration: underline; }
.import-guides { display: grid; gap: 18px; }
.scan-label { display: flex; align-items: flex-start; gap: 10px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.scan-label > i { margin-top: 2px; color: var(--green); font-size: 22px; }
.scan-label span, .scan-label strong { display: block; }
.scan-label strong { margin-bottom: 3px; color: var(--text); font-size: 12px; }
.client-footnote i { margin-right: 5px; color: var(--green); }

.admin-servers { margin-top: 17px; }
.admin-servers .card-head h2 i { margin-right: 7px; color: var(--blue); }
.admin-server-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr); }
.admin-server-list { padding: 16px 18px; border-right: 1px solid var(--line); }
.admin-server-row { display: grid; grid-template-columns: auto minmax(0,1fr) 90px 88px auto; align-items: center; gap: 12px; padding: 11px; border-bottom: 1px solid var(--line); }
.admin-server-row:last-child { border-bottom: 0; }
.admin-server-row .server-signal { width: 36px; height: 36px; font-size: 17px; }
.server-form { padding: 18px 20px 21px; }
.server-form h3 { margin: 0 0 5px; font-size: 15px; }
.server-address-fields { display: grid; grid-template-columns: minmax(0,1fr) 92px; gap: 10px; }
.server-form .button { width: 100%; margin-top: 15px; }
.icon-button { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #2b3949; border-radius: 10px; color: var(--muted); background: transparent; cursor: pointer; }
.icon-button.danger:hover { color: var(--red); border-color: rgba(255,107,120,.4); background: rgba(255,107,120,.08); }
.empty-state { padding: 20px; color: var(--muted); text-align: center; }

@media (max-width: 980px) {
  .client-stats { grid-template-columns: repeat(3, 1fr); }
  .client-stats .stat:nth-last-child(-n+2) { grid-column: span 1; }
  .client-actions-grid, .admin-server-layout { grid-template-columns: 1fr; }
  .admin-server-list { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 620px) {
  .client-brand .encrypted-pill { display: none; }
  .client-hero { min-height: 0; }
  .profile-address { width: 100%; text-align: left; }
  .client-stats { grid-template-columns: 1fr 1fr; }
  .client-stats .stat:last-child { grid-column: 1 / -1; }
  .server-tile { grid-template-columns: auto 1fr auto; gap: 10px; }
  .server-tile .server-latency { grid-column: 2; }
  .server-tile .server-state { grid-column: 3; grid-row: 1 / span 2; }
  .platforms { grid-template-columns: 1fr; }
  .qr-wrap { align-items: center; flex-direction: column; text-align: center; }
  .qr-frame img { width: min(270px, 72vw); height: auto; }
  .import-guides { max-width: 310px; text-align: left; }
  .admin-server-row { grid-template-columns: auto 1fr auto; }
  .admin-server-row .server-latency { grid-column: 2; }
  .admin-server-row .status { grid-column: 3; grid-row: 1; }
  .admin-server-row form { grid-column: 3; grid-row: 2; justify-self: end; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .orb { display: none; }
}
