:root {
    color-scheme: dark;
    --bg: #080808;
    --bg-soft: #0d0d0d;
    --panel: #131313;
    --panel-2: #181818;
    --line: #292929;
    --line-soft: rgba(255, 255, 255, .07);
    --text: #f5f5f5;
    --muted: #858585;
    --accent: #f6a313;
    --accent-2: #dc7d00;
    --danger: #ef5264;
    --warning: #f6a313;
    --shadow: 0 16px 48px rgba(0, 0, 0, .3);
    --radius: 8px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 92% 0, rgba(246, 163, 19, .045), transparent 28rem), var(--bg); color: var(--text); font: 14px/1.48 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid #ffd27d; outline-offset: 3px; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 218px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 22px 13px 17px; border-right: 1px solid var(--line-soft); background: rgba(10, 10, 10, .97); backdrop-filter: blur(20px); display: flex; flex-direction: column; z-index: 20; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 11px 26px; }
.brand-mark { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 7px; color: #160d00; font-weight: 900; font-size: 20px; background: linear-gradient(135deg, #ffc250, var(--accent-2)); box-shadow: 0 10px 25px rgba(246, 163, 19, .13); }
.brand-mark.large { width: 58px; height: 58px; border-radius: 18px; margin: 0 auto 20px; font-size: 27px; }
.brand strong { display: block; letter-spacing: .05em; font-size: 15px; }
.brand small { display: block; color: var(--muted); font-size: 10px; letter-spacing: .15em; }
nav { display: grid; gap: 5px; }
nav a { color: #aebfc6; border: 1px solid transparent; border-radius: 12px; padding: 11px 13px; display: flex; align-items: center; gap: 12px; font-weight: 600; transition: .18s ease; }
nav a:hover { color: var(--text); background: rgba(255, 255, 255, .035); }
nav a.active { color: #1c1000; background: linear-gradient(135deg, #f6b83f, #e98b08); box-shadow: 0 10px 24px rgba(246, 163, 19, .1); }
.nav-icon { width: 22px; text-align: center; font-size: 19px; }
.sidebar-foot { margin-top: auto; padding: 17px 12px 4px; border-top: 1px solid var(--line-soft); color: #b6c7ce; font-size: 13px; }
.sidebar-foot small { display: block; color: #687f89; margin-top: 5px; }
.status-dot { width: 8px; height: 8px; display: inline-block; margin-right: 7px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 0 5px rgba(53, 216, 170, .1); }
.content { min-width: 0; padding: 22px clamp(18px, 2.5vw, 38px) 55px; }
.topbar { display: flex; align-items: center; gap: 14px; justify-content: space-between; margin-bottom: 19px; padding-bottom: 15px; border-bottom: 1px solid var(--line-soft); }
.topbar h1 { margin: 0; font-size: clamp(23px, 2.5vw, 28px); line-height: 1.15; letter-spacing: -.035em; }
.eyebrow { margin: 0 0 3px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.admin-chip { padding: 9px 14px; border: 1px solid var(--line); background: var(--panel); color: #c3d2d8; border-radius: 999px; font-size: 13px; }
.menu-toggle { display: none; width: 42px; height: 42px; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.hero { min-height: 190px; padding: clamp(28px, 5vw, 48px); border: 1px solid rgba(78, 230, 184, .2); border-radius: 26px; background: radial-gradient(circle at 82% 28%, rgba(71, 240, 190, .18), transparent 23rem), linear-gradient(130deg, #0d2630, #092029); box-shadow: var(--shadow); display: flex; justify-content: space-between; align-items: center; overflow: hidden; }
.hero h2 { margin: 0; font-size: clamp(30px, 5vw, 52px); letter-spacing: -.05em; }
.hero p:not(.eyebrow) { max-width: 650px; margin: 9px 0 0; color: #a7bdc5; font-size: 16px; }
.hero-badge { border: 1px solid rgba(76, 240, 191, .32); background: rgba(5, 28, 22, .5); color: #70ecc7; border-radius: 999px; padding: 9px 14px; font-weight: 800; letter-spacing: .12em; font-size: 11px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 17px 0; }
.stats article { min-height: 118px; padding: 21px 23px; border: 1px solid var(--line); border-radius: 17px; background: linear-gradient(145deg, rgba(17, 40, 52, .92), rgba(10, 27, 36, .92)); }
.stats span { color: var(--muted); font-size: 13px; }
.stats strong { display: block; margin-top: 10px; font-size: 31px; line-height: 1; }
.grid { display: grid; gap: 17px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.form-list { grid-template-columns: minmax(300px, .72fr) minmax(450px, 1.28fr); align-items: start; }
.card { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(150deg, #151515, #101010); box-shadow: 0 10px 34px rgba(0, 0, 0, .16); }
.card.narrow { max-width: 960px; }
.card h3 { margin: 0 0 7px; font-size: 21px; letter-spacing: -.02em; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; margin-bottom: 18px; }
.muted { color: var(--muted); }
.stack { display: grid; gap: 15px; }
.stack.compact { gap: 11px; }
label { display: grid; gap: 7px; color: #c4d2d7; font-size: 13px; font-weight: 650; }
input, select, textarea { width: 100%; color: var(--text); background: #0b0b0b; border: 1px solid #303030; border-radius: 6px; outline: none; padding: 10px 12px; transition: border-color .16s, box-shadow .16s; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(246, 163, 19, .1); }
textarea { resize: vertical; min-height: 110px; }
input[type=file] { padding: 8px; }
input[type=file]::file-selector-button { margin-right: 11px; padding: 7px 12px; border: 0; border-radius: 8px; background: #1e3c47; color: var(--text); }
.check { display: flex; align-items: center; gap: 9px; }
.check input { width: 17px; height: 17px; accent-color: var(--accent-2); }
.button { min-height: 39px; padding: 9px 15px; border: 1px solid transparent; border-radius: 6px; color: var(--text); font-weight: 750; cursor: pointer; }
.button.primary { color: #211300; background: linear-gradient(135deg, #ffc047, #ed920c); }
.button.primary:hover { filter: brightness(1.06); }
.button.ghost { background: transparent; border-color: var(--line); color: #bfd0d6; }
.logout-form { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line-soft); }
.pill { display: inline-flex; align-items: center; justify-content: center; padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; background: rgba(135, 159, 169, .08); color: #9fb4bc; font-size: 11px; font-weight: 750; white-space: nowrap; }
button.pill { cursor: pointer; }
.pill.success { border-color: rgba(53, 216, 170, .25); color: #5be2bc; background: rgba(53, 216, 170, .08); }
.pill.warning { border-color: rgba(255, 199, 102, .28); color: var(--warning); background: rgba(255, 199, 102, .08); }
.pill.danger { border-color: rgba(255, 102, 123, .26); color: var(--danger); background: rgba(255, 102, 123, .08); }
.endpoint { display: grid; gap: 5px; padding: 13px 0; border-top: 1px solid var(--line-soft); }
.endpoint span { color: var(--muted); font-size: 12px; }
code { color: #e8a536; font: 12px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; word-break: break-all; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 15px; }
.steps li { display: flex; gap: 13px; align-items: flex-start; }
.steps li > span { flex: 0 0 31px; width: 31px; height: 31px; display: grid; place-items: center; border-radius: 10px; background: rgba(53, 216, 170, .1); color: var(--accent); font-weight: 800; }
.steps p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.list { display: grid; }
.list-row { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 15px 0; border-top: 1px solid var(--line-soft); }
.list-row:first-child { border-top: 0; }
.list-row small, td small { display: block; margin-top: 3px; color: var(--muted); }
.message-row { align-items: flex-start; }
.message-row p { margin: 5px 0; color: #a8bbc3; }
.row-actions { display: flex; gap: 7px; align-items: center; }
.icon-button { width: 31px; height: 31px; padding: 0; border-radius: 9px; border: 1px solid var(--line); background: transparent; color: #a9bbc2; font-size: 20px; cursor: pointer; }
.icon-button.danger { border-color: rgba(255, 102, 123, .25); color: var(--danger); background: rgba(255, 102, 123, .06); }
.empty { padding: 33px 18px; border: 1px dashed #2a4651; border-radius: 14px; text-align: center; color: var(--muted); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { color: #7e98a3; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; text-align: left; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
th:last-child, td:last-child { text-align: right; }
.public-link { margin-top: 19px; padding-top: 17px; border-top: 1px solid var(--line-soft); display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; }
.public-link a { color: var(--accent); font-weight: 700; }
.switch-row { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: #091922; }
.switch-row span small { display: block; color: var(--muted); font-weight: 400; }
.switch-row input { width: 43px; height: 23px; accent-color: var(--accent-2); }
.timeline { display: grid; gap: 2px; }
.timeline > div { display: flex; gap: 12px; }
.timeline > div > span { width: 9px; height: 9px; margin-top: 8px; border: 2px solid var(--accent); border-radius: 50%; }
.timeline p { margin: 0; padding-bottom: 12px; }
.timeline small { display: block; color: var(--muted); }
.alert { margin: 0 0 18px; padding: 13px 15px; border-radius: 12px; border: 1px solid var(--line); }
.alert.success { color: #7eebcb; border-color: rgba(53, 216, 170, .24); background: rgba(53, 216, 170, .08); }
.alert.error { color: #ff95a4; border-color: rgba(255, 102, 123, .26); background: rgba(255, 102, 123, .08); }
.text-danger { color: var(--danger) !important; }
.form-hint { margin: -5px 0 0; color: #78939e; font-size: 12px; }
.button:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.button-link { display: inline-grid; place-items: center; text-align: center; }
.row-actions.wrap { flex-wrap: wrap; justify-content: flex-end; }
.vpn-source-row { align-items: flex-start; }
.vpn-source-row.selected { margin-inline: -10px; padding-inline: 10px; border-radius: 11px; background: rgba(53, 216, 170, .055); box-shadow: inset 3px 0 var(--accent); }
.vpn-source-row > div:first-child { min-width: 0; }
.vpn-source-row small { overflow-wrap: anywhere; }
.vpn-provider-guide { padding: 15px 17px; border: 1px solid rgba(53, 216, 170, .2); border-radius: 13px; background: rgba(53, 216, 170, .055); }
.vpn-provider-guide strong { display: block; margin-bottom: 7px; color: #d9f8ee; }
.vpn-provider-guide ol { margin: 0 0 9px; padding-left: 20px; color: #9db5be; font-size: 12px; }
.vpn-provider-guide li + li { margin-top: 4px; }
.vpn-provider-guide a { color: var(--accent); font-size: 12px; font-weight: 750; }
.vpn-upload-box { padding: 15px; border: 1px dashed #31515e; border-radius: 13px; background: rgba(4, 16, 23, .45); }
.vpn-upload-box .form-hint { margin-top: 8px; }
.cron-box { margin-top: 22px; padding: 17px; border: 1px solid var(--line-soft); border-radius: 13px; background: #081922; }
.cron-box p { margin: 5px 0 9px; color: var(--muted); font-size: 12px; }
.cron-box code { display: block; padding: 10px; border-radius: 9px; background: #06131a; user-select: all; }
.cron-box small { display: block; margin-top: 8px; color: #718b96; }
.vpn-locations-card { margin-top: 17px; }
.location-tools { display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; gap: 9px; }
.vpn-location-scroll { max-height: 285px; overflow-y: auto; overscroll-behavior: contain; padding: 4px 8px 4px 2px; border: 1px solid var(--line-soft); border-radius: 12px; scrollbar-color: #2e5a68 #07151d; }
.vpn-location-item { grid-template-columns: 20px minmax(180px, 1fr) minmax(180px, .7fr); align-items: center; gap: 11px; min-height: 55px; padding: 9px 11px; border-bottom: 1px solid var(--line-soft); border-radius: 9px; }
.vpn-location-item:hover { background: rgba(255,255,255,.025); }
.vpn-location-item[hidden] { display: none; }
.vpn-location-item input { width: 17px; height: 17px; accent-color: var(--accent-2); }
.vpn-location-item small { color: #718994; overflow-wrap: anywhere; }
.vpn-manual-card { margin-top: 17px; }
.vpn-manual-card > summary { cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; list-style: none; }
.vpn-manual-card > summary::-webkit-details-marker { display: none; }
.vpn-manual-card > summary strong { display: block; font-size: 18px; }
.details-content { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line-soft); }

.auth-page, .public-page { min-height: 100vh; padding: 26px; display: grid; place-items: center; background: radial-gradient(circle at 48% -12%, rgba(246, 163, 19, .095), transparent 34rem), #080808; }
.auth-page { grid-template-rows: minmax(0, 1fr) auto; gap: 18px; overflow-x: hidden; }
.auth-stage { position: relative; isolation: isolate; width: min(860px, 100%); display: grid; grid-template-columns: minmax(225px, 30%) minmax(0, 70%); align-items: stretch; overflow: hidden; border: 1px solid rgba(246, 163, 19, .32); border-radius: 27px; background: linear-gradient(145deg, rgba(29, 27, 23, .82), rgba(11, 11, 11, .95)); box-shadow: 0 28px 88px rgba(0, 0, 0, .6), inset 0 1px rgba(255, 220, 157, .1); backdrop-filter: blur(18px); }
.auth-stage::before { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: inherit; background: linear-gradient(126deg, rgba(255,255,255,.09), transparent 19%, transparent 68%, rgba(255,177,43,.035)); clip-path: polygon(0 0, 54% 0, 31% 100%, 0 100%); opacity: .48; }
.auth-stage::after { content: ""; position: absolute; inset: 1px; z-index: 3; pointer-events: none; border-radius: 26px; box-shadow: inset 0 0 32px rgba(255, 188, 69, .025); }
.auth-visual { position: relative; min-height: 455px; overflow: hidden; border-right: 1px solid rgba(246, 163, 19, .17); background: radial-gradient(circle at 50% 43%, rgba(246, 163, 19, .08), transparent 12rem), linear-gradient(160deg, rgba(28, 23, 15, .92), rgba(11, 11, 11, .96) 72%); }
.auth-visual::before { content: ""; position: absolute; inset: 0; opacity: .19; background-image: radial-gradient(circle, rgba(255, 197, 97, .34) 0 1px, transparent 1.4px); background-size: 19px 19px; mask-image: linear-gradient(to bottom, black, transparent 84%); }
.auth-visual::after { content: ""; position: absolute; left: 19%; right: 19%; bottom: 38px; height: 5px; border-radius: 50%; background: rgba(247, 167, 28, .4); box-shadow: 0 0 25px 9px rgba(246, 163, 19, .2); filter: blur(2px); animation: floor-light-enter 1.2s ease 1.25s both, floor-light-pulse 6s ease-in-out 2.45s infinite; }
.login-lamp { position: absolute; z-index: 2; top: 0; left: 50%; width: 118px; height: 142px; transform: translateX(-50%); transform-origin: 50% 0; animation: lamp-enter .85s cubic-bezier(.2,.78,.25,1) .65s both, lamp-breathe 7s ease-in-out 1.5s infinite; }
.lamp-cord { position: absolute; top: 0; left: calc(50% - 1px); width: 2px; height: 54px; background: linear-gradient(#18130d, #9d6414); box-shadow: 0 0 4px rgba(246, 163, 19, .22); }
.lamp-shade { position: absolute; top: 51px; left: 27px; width: 64px; height: 45px; clip-path: polygon(36% 0, 64% 0, 100% 100%, 0 100%); background: linear-gradient(145deg, #f3bc59, #7c4707 88%); filter: drop-shadow(0 8px 13px rgba(246, 163, 19, .24)); }
.lamp-shade::before { content: ""; position: absolute; inset: 1px; clip-path: inherit; background: linear-gradient(145deg, rgba(255,255,255,.22), transparent 45%); }
.lamp-bulb { position: absolute; top: 87px; left: 42px; width: 34px; height: 10px; border-radius: 50%; background: #fff2bd; box-shadow: 0 0 19px 8px rgba(255, 184, 47, .58); }
.lamp-glow { position: absolute; z-index: 1; top: 88px; left: 50%; width: 235px; height: 306px; opacity: .7; pointer-events: none; transform: translateX(-50%); clip-path: polygon(44% 0, 56% 0, 100% 100%, 0 100%); background: linear-gradient(to bottom, rgba(255, 195, 84, .3), rgba(246, 163, 19, .1) 56%, transparent 100%); filter: blur(3px); animation: light-enter 1.25s ease 1s both, glow-pulse 6s ease-in-out 2.25s infinite; }
.login-mascot { position: absolute; z-index: 2; left: 50%; bottom: 55px; width: 126px; height: 126px; transform: translateX(-50%); transform-origin: 50% 58%; filter: drop-shadow(0 18px 24px rgba(246, 163, 19, .2)); animation: mascot-enter 1.25s cubic-bezier(.16,.86,.25,1) 2.85s both, mascot-float 5.6s ease-in-out 4.1s infinite; }
.mascot-ring { position: absolute; inset: 8px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(from 215deg, #754005, #ffc557 18%, #8b510b 42%, #f6a313 63%, #5b3204 83%, #754005); box-shadow: inset 0 0 0 2px rgba(255, 231, 183, .3), inset 0 0 18px rgba(255, 189, 70, .38), 0 0 24px rgba(246, 163, 19, .28); animation: mascot-tilt 8s ease-in-out 4.1s infinite; }
.mascot-ring::before { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(255, 229, 178, .34); border-radius: inherit; box-shadow: inset 0 0 15px rgba(255, 174, 36, .25); }
.mascot-face { position: relative; width: 88px; height: 88px; overflow: hidden; border: 2px solid rgba(255, 214, 138, .5); border-radius: 50%; background: radial-gradient(circle at 50% 62%, #34240f 0, #18130d 58%, #070707 100%); box-shadow: inset 0 -13px 23px rgba(0,0,0,.6), inset 0 5px 14px rgba(255, 195, 87, .13), 0 0 13px rgba(255, 173, 29, .26); }
.mascot-gloss { position: absolute; z-index: 0; top: 5px; left: 13px; width: 53px; height: 25px; border-radius: 50%; background: linear-gradient(155deg, rgba(255,255,255,.24), rgba(255,255,255,0)); transform: rotate(-16deg); filter: blur(.3px); }
.mascot-side { position: absolute; z-index: -1; top: 43px; width: 22px; height: 42px; border: 2px solid rgba(255, 207, 119, .48); background: linear-gradient(135deg, #d88309, #4c2a04); box-shadow: inset 0 0 7px rgba(255, 213, 129, .32), 0 0 13px rgba(246, 163, 19, .25); }
.mascot-side i { position: absolute; top: 10px; width: 8px; height: 19px; border-radius: 8px; background: linear-gradient(#ffe1a0, #9e5d09); opacity: .7; }
.mascot-side-left { left: 0; border-radius: 15px 6px 6px 15px; transform: rotate(-8deg); }
.mascot-side-left i { left: 5px; }
.mascot-side-right { right: 0; border-radius: 6px 15px 15px 6px; transform: rotate(8deg); }
.mascot-side-right i { right: 5px; }
.mascot-eye { position: absolute; z-index: 2; top: 27px; width: 22px; height: 25px; overflow: hidden; border-radius: 52% 52% 48% 48%; background: radial-gradient(circle at 48% 35%, #fffdf3, #ffd991 70%, #b66a08 100%); box-shadow: 0 0 10px rgba(255, 213, 131, .62); transform-origin: center; animation: mascot-blink 6.4s ease-in-out 4.1s infinite; }
.mascot-eye-left { left: 19px; }
.mascot-eye-right { right: 19px; }
.mascot-eye i { position: absolute; top: 8px; left: 8px; width: 7px; height: 9px; border-radius: 50%; background: #2a1806; box-shadow: inset 1px 1px rgba(255,255,255,.45); animation: mascot-gaze 8.6s ease-in-out 4.1s infinite; }
.mascot-eye i::after { content: ""; position: absolute; top: 1px; left: 1px; width: 2px; height: 2px; border-radius: 50%; background: white; }
.mascot-smile { position: absolute; z-index: 2; left: 27px; bottom: 18px; width: 34px; height: 16px; border-bottom: 3px solid #ffe5a8; border-radius: 0 0 50% 50%; filter: drop-shadow(0 0 4px rgba(255, 208, 119, .35)); animation: mascot-smile 5.6s ease-in-out 4.1s infinite; }
.mascot-cheek { position: absolute; z-index: 1; bottom: 25px; width: 10px; height: 5px; border-radius: 50%; background: rgba(246, 163, 19, .22); filter: blur(1px); }
.mascot-cheek-left { left: 13px; }
.mascot-cheek-right { right: 13px; }
.mascot-shadow { position: absolute; z-index: 1; left: 50%; bottom: 35px; width: 112px; height: 10px; border-radius: 50%; background: rgba(246, 163, 19, .34); box-shadow: 0 0 22px 8px rgba(246, 163, 19, .16); filter: blur(3px); transform: translateX(-50%); animation: mascot-shadow-enter 1.1s ease 3s both, mascot-shadow 5.6s ease-in-out 4.1s infinite; }
.auth-card, .public-card { width: min(440px, 100%); padding: 35px; border: 1px solid var(--line); border-radius: 10px; text-align: center; background: rgba(18, 18, 18, .98); box-shadow: var(--shadow); }
.auth-login-card { position: relative; z-index: 2; align-self: center; width: 100%; padding: 44px 56px 47px; border: 0; text-align: left; background: transparent; box-shadow: none; animation: login-panel-enter 1.2s cubic-bezier(.18,.82,.27,1) 5.2s both; }
.auth-wordmark { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; animation: login-content-enter .58s ease 5.65s both; }
.auth-wordmark .brand-mark { flex: 0 0 auto; }
.auth-wordmark strong { display: block; letter-spacing: .05em; font-size: 14px; }
.auth-wordmark small { display: block; margin-top: 1px; color: var(--muted); font-size: 9px; letter-spacing: .14em; }
.auth-login-card h1 { margin: 0; font-size: 27px; letter-spacing: -.03em; animation: login-content-enter .62s ease 5.9s both; }
.auth-login-card .muted { margin: 7px 0 25px; animation: login-content-enter .62s ease 6.08s both; }
.auth-login-card .alert { text-align: left; animation: login-content-enter .58s ease 6.25s both; }
.auth-login-card form label { animation: login-field-enter .58s ease both; }
.auth-login-card form label:nth-of-type(1) { animation-delay: 6.42s; }
.auth-login-card form label:nth-of-type(2) { animation-delay: 6.82s; }
.auth-login-card form .button { animation: login-field-enter .58s ease 7.22s both; }
.auth-login-card input { min-height: 46px; background: rgba(5, 5, 5, .72); }
.auth-login-card .button { min-height: 47px; margin-top: 7px; box-shadow: 0 13px 28px rgba(216, 123, 0, .16); }
.auth-card.wide { width: min(570px, 100%); }
.auth-card h1, .public-card h1 { margin: 0; font-size: 27px; letter-spacing: -.03em; }
.auth-card .muted, .public-card .muted { margin: 7px 0 25px; }
.auth-card form, .public-card form { text-align: left; }
.auth-card .button, .public-card .button { width: 100%; margin-top: 4px; }
.setup-checks { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-soft); display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 16px; color: #8faaa3; font-size: 12px; }
.panel-support-footer { margin-top: 34px; padding: 16px 10px 2px; border-top: 1px solid var(--line-soft); color: #9d9d9d; font-size: 13px; text-align: center; }
.auth-page > .panel-support-footer { width: min(860px, 100%); margin-top: 0; padding-top: 16px; animation: login-footer-enter .58s ease 7.55s both; }
.panel-support-footer a { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 34px; padding: 5px 9px; border-radius: 9px; transition: color .16s ease, background .16s ease; }
.panel-support-footer a:hover { color: #f4bd5b; background: rgba(246, 163, 19, .055); }
.panel-support-footer img { flex: 0 0 auto; width: 20px; height: 20px; }
.panel-support-footer strong { color: #f3b64d; }

@keyframes lamp-breathe { 0%, 100% { transform: translateX(-50%) rotate(-.7deg); } 50% { transform: translateX(-50%) rotate(.8deg); } }
@keyframes glow-pulse { 0%, 100% { opacity: .62; } 50% { opacity: .82; } }
@keyframes lamp-enter { 0% { opacity: 0; transform: translateX(-50%) translateY(-30px) scale(.82); filter: blur(4px); } 100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); filter: blur(0); } }
@keyframes light-enter { 0% { opacity: 0; transform: translateX(-50%) scaleY(.15); transform-origin: 50% 0; } 100% { opacity: .7; transform: translateX(-50%) scaleY(1); transform-origin: 50% 0; } }
@keyframes floor-light-enter { 0% { opacity: 0; transform: scaleX(.28); } 100% { opacity: 1; transform: scaleX(1); } }
@keyframes floor-light-pulse { 0%, 100% { opacity: .78; transform: scaleX(.92); } 50% { opacity: 1; transform: scaleX(1); } }
@keyframes mascot-enter { 0% { opacity: 0; transform: translateX(-50%) translateY(30px) scale(.42) rotate(-7deg); filter: blur(5px) drop-shadow(0 3px 4px rgba(246,163,19,.08)); } 62% { opacity: 1; transform: translateX(-50%) translateY(-7px) scale(1.05) rotate(1.4deg); filter: blur(0) drop-shadow(0 18px 24px rgba(246,163,19,.22)); } 100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1) rotate(-1deg); filter: blur(0) drop-shadow(0 18px 24px rgba(246,163,19,.2)); } }
@keyframes mascot-shadow-enter { 0% { opacity: 0; transform: translateX(-50%) scaleX(.25); } 100% { opacity: .72; transform: translateX(-50%) scaleX(1); } }
@keyframes mascot-float { 0%, 100% { transform: translateX(-50%) translateY(0) rotate(-1deg); } 28% { transform: translateX(-50%) translateY(-7px) rotate(.8deg); } 58% { transform: translateX(-50%) translateY(-3px) rotate(1.5deg); } 78% { transform: translateX(-50%) translateY(-9px) rotate(-.4deg); } }
@keyframes mascot-tilt { 0%, 100% { transform: rotate(0); } 34% { transform: rotate(-2.2deg); } 68% { transform: rotate(2deg); } }
@keyframes mascot-blink { 0%, 31%, 34%, 67%, 70%, 100% { transform: scaleY(1); } 32.2%, 68.2% { transform: scaleY(.08); } }
@keyframes mascot-gaze { 0%, 17%, 100% { transform: translate(0, 0); } 25%, 42% { transform: translate(3px, 1px); } 50%, 67% { transform: translate(-3px, 0); } 76%, 88% { transform: translate(1px, -2px); } }
@keyframes mascot-smile { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(.88) translateY(-1px); } }
@keyframes mascot-shadow { 0%, 100% { opacity: .72; transform: translateX(-50%) scaleX(1); } 28% { opacity: .43; transform: translateX(-50%) scaleX(.76); } 58% { opacity: .57; transform: translateX(-50%) scaleX(.88); } 78% { opacity: .36; transform: translateX(-50%) scaleX(.7); } }
@keyframes login-panel-enter { 0% { opacity: 0; visibility: hidden; pointer-events: none; transform: translateX(52px); filter: blur(5px); } 1% { visibility: visible; } 100% { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(0); filter: blur(0); } }
@keyframes login-content-enter { 0% { opacity: 0; transform: translateY(12px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes login-field-enter { 0% { opacity: 0; transform: translateX(24px); } 100% { opacity: 1; transform: translateX(0); } }
@keyframes login-footer-enter { 0% { opacity: 0; transform: translateY(9px); } 100% { opacity: 1; transform: translateY(0); } }

/* Compact Appifynow control layout inspired by broadcast-service consoles. */
.service-title { margin: 2px 0 10px; }
.service-title .breadcrumb { margin: 0; color: #6f6f6f; font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.service-title h2 { margin: 0; display: flex; align-items: center; gap: 9px; font-size: 21px; }
.title-icon { color: var(--accent); font-size: 17px; }
.services-card { margin-bottom: 12px; padding: 0; overflow: hidden; }
.section-tabs { display: flex; gap: 2px; padding: 0 12px; border-bottom: 1px solid var(--line-soft); overflow-x: auto; }
.section-tabs a { position: relative; display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; padding: 13px 12px 11px; color: #8c8c8c; font-size: 12px; font-weight: 700; border-radius: 0; background: none; }
.section-tabs a:hover { color: #dedede; background: rgba(255,255,255,.025); }
.section-tabs a.active { color: var(--accent); background: none; box-shadow: inset 0 -2px var(--accent); }
.section-tabs a span { min-width: 18px; height: 18px; padding: 0 5px; display: inline-grid; place-items: center; border: 1px solid #303030; border-radius: 999px; color: #9a9a9a; font-size: 9px; }
.service-metrics { display: flex; flex-wrap: wrap; gap: 6px; padding: 11px 14px; }
.service-metrics > span { display: inline-flex; align-items: center; gap: 8px; padding: 6px 9px; border: 1px solid #262626; border-radius: 5px; color: #818181; font-size: 11px; }
.service-metrics strong { color: #e6e6e6; font-size: 11px; }
.table-card { margin-bottom: 12px; }
.table-card .card-head { margin-bottom: 10px; }
.table-card h3 { font-size: 16px; }
.table-card tbody tr { transition: background .14s ease; }
.table-card tbody tr:hover { background: rgba(246, 163, 19, .035); }
.table-card tbody tr:last-child td { border-bottom: 0; }
.table-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 -3px 8px; }
.table-tools input { width: min(310px, 100%); min-height: 33px; padding: 7px 10px; font-size: 11px; }
.clients-table { min-width: 1160px; }
.clients-table td { font-size: 12px; }
.clients-table td:nth-child(5) code { display: block; max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-mac { display: block; white-space: nowrap; word-break: normal; font-weight: 800; }
.device-mac.legacy-id { max-width: 210px; overflow: hidden; text-overflow: ellipsis; color: #8e7650; }
.compact-actions { justify-content: flex-end; white-space: nowrap; }
.compact-actions form { margin: 0; }
.icon-button.assign { border-color: rgba(246, 163, 19, .32); color: var(--accent); background: rgba(246, 163, 19, .07); font-size: 15px; }
.icon-button.message { border-color: rgba(84, 193, 255, .32); color: #73cbff; background: rgba(84, 193, 255, .07); font-size: 15px; }
.icon-button.diagnostics { border-color: rgba(174, 118, 255, .34); color: #c59cff; background: rgba(174, 118, 255, .08); font-size: 13px; }
.icon-button.features { border-color: rgba(46, 201, 132, .3); color: #62dfa5; background: rgba(46, 201, 132, .07); font-size: 14px; }
.icon-button.epg-refresh { border-color: rgba(80, 214, 235, .32); color: #70e2f1; background: rgba(80, 214, 235, .07); font-size: 16px; }
.icon-button.restore { border-color: rgba(46, 201, 132, .28); color: #49d99a; background: rgba(46, 201, 132, .06); }
.activation-card { max-width: 920px; }
.add-service-card { margin-bottom: 12px; }
.add-service-card .details-content { margin-top: 15px; padding-top: 15px; }
.compact-button { width: max-content; min-width: 150px; }
.compact-grid { margin-top: 12px; align-items: start; }
.action-card > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.action-card > summary::-webkit-details-marker { display: none; }
.action-card > summary span { display: grid; gap: 3px; }

.message-dialog { width: min(680px, calc(100% - 30px)); max-height: calc(100vh - 40px); padding: 0; border: 1px solid #343434; border-radius: 17px; color: var(--text); background: #111; box-shadow: 0 28px 90px rgba(0,0,0,.72); }
.message-dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(3px); }
.message-dialog-form { padding: 22px; overflow-y: auto; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.dialog-head h3 { margin: 0; font-size: 23px; }
.message-recipient { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid rgba(84,193,255,.22); border-radius: 11px; background: rgba(84,193,255,.06); }
.message-recipient span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.message-recipient strong { overflow-wrap: anywhere; color: #bfe8ff; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; }
.diagnostics-dialog { width: min(760px, calc(100% - 30px)); }
.features-dialog { width: min(720px, calc(100% - 30px)); }
.feature-switches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.feature-switches .switch-row { min-height: 70px; margin: 0; }
.diagnostics-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 0; }
.diagnostics-grid > div { min-width: 0; padding: 12px 14px; border: 1px solid #292929; border-radius: 10px; background: #0c0c0c; }
.diagnostics-grid dt { margin-bottom: 5px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.diagnostics-grid dd { margin: 0; color: #e6e6e6; font-size: 12px; overflow-wrap: anywhere; }
.diagnostics-grid .diagnostic-error { grid-column: 1 / -1; }
.diagnostics-grid .diagnostic-error dd { color: #ffbd69; }
.announcement-list { display: grid; gap: 4px; }
.announcement-row { gap: 18px; }
.announcement-copy { min-width: 0; flex: 1; }
.announcement-title { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.announcement-meta { display: flex; flex-wrap: wrap; gap: 6px 13px; margin-top: 9px; color: var(--muted); font-size: 11px; }
.announcement-meta span { display: inline-flex; gap: 4px; }
.announcement-meta b { color: #b8c8ce; overflow-wrap: anywhere; }
.action-card > summary small { color: var(--accent); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.action-card > summary strong { font-size: 16px; }
.action-card > summary b { padding: 7px 10px; border-radius: 5px; background: var(--accent); color: #211300; font-size: 11px; white-space: nowrap; }
.action-button { min-height: 29px; padding: 5px 9px; border: 1px solid #343434; border-radius: 5px; background: #1a1a1a; color: #cfcfcf; font-size: 11px; font-weight: 700; cursor: pointer; }
.action-button.restore { color: #ffb537; border-color: rgba(246, 163, 19, .35); background: rgba(246, 163, 19, .06); }
.stats { gap: 10px; margin: 12px 0; }
.stats article { min-height: 92px; padding: 15px 17px; border-radius: 7px; background: linear-gradient(145deg, #171717, #111); }
.stats strong { margin-top: 7px; font-size: 25px; }
.hero { min-height: 155px; padding: 30px; border-radius: 8px; border-color: rgba(246, 163, 19, .18); background: radial-gradient(circle at 82% 28%, rgba(246, 163, 19, .11), transparent 23rem), linear-gradient(130deg, #17140e, #101010); }
.hero-badge { border-color: rgba(246, 163, 19, .3); background: rgba(34, 20, 0, .48); color: #ffb83e; }
.pill.success { border-color: rgba(46, 201, 132, .24); color: #49d99a; background: rgba(46, 201, 132, .07); }
.status-dot { background: var(--accent); box-shadow: 0 0 0 4px rgba(246, 163, 19, .08); }
.endpoint span, .form-hint, .timeline small { color: #777; }
.vpn-source-row.selected { background: rgba(246, 163, 19, .045); box-shadow: inset 3px 0 var(--accent); }
.vpn-provider-guide { border-color: rgba(246, 163, 19, .18); background: rgba(246, 163, 19, .04); }
.cron-box, .switch-row { background: #0d0d0d; }
.cron-box code { background: #090909; }
.alert.success { color: #f7b94e; border-color: rgba(246, 163, 19, .25); background: rgba(246, 163, 19, .07); }
@media (max-width: 1180px) {
    .compact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: fixed; left: -240px; width: 218px; transition: left .2s ease; box-shadow: 25px 0 60px rgba(0,0,0,.35); }
    body.menu-open .sidebar { left: 0; }
    .menu-toggle { display: inline-grid; place-items: center; }
    .topbar { justify-content: flex-start; }
    .top-actions { margin-left: auto; }
    .grid.form-list, .grid.two { grid-template-columns: 1fr; }
    .auth-login-card { padding-inline: 44px; }
}

@media (max-width: 760px) {
    .auth-page { align-content: start; }
    .auth-stage { min-height: 0; grid-template-columns: 1fr; border-radius: 23px; }
    .auth-stage::before { opacity: .3; clip-path: polygon(0 0, 100% 0, 58% 56%, 0 72%); }
    .auth-visual { min-height: 188px; border-right: 0; border-bottom: 1px solid rgba(246, 163, 19, .15); }
    .auth-visual::after { left: 35%; right: 35%; bottom: 18px; }
    .login-lamp { width: 90px; height: 105px; animation: lamp-enter .85s cubic-bezier(.2,.78,.25,1) .65s both, lamp-breathe-mobile 7s ease-in-out 1.5s infinite; }
    .lamp-cord { height: 30px; }
    .lamp-shade { top: 28px; left: 21px; width: 48px; height: 34px; }
    .lamp-bulb { top: 56px; left: 32px; width: 26px; height: 8px; }
    .lamp-glow { top: 57px; width: 180px; height: 116px; }
    .login-mascot { bottom: 16px; transform: translateX(-50%) scale(.62); animation: mascot-enter-mobile 1.25s cubic-bezier(.16,.86,.25,1) 2.85s both, mascot-float-mobile 5.6s ease-in-out 4.1s infinite; }
    .mascot-shadow { bottom: 17px; width: 84px; animation: mascot-shadow-enter-mobile 1.1s ease 3s both, mascot-shadow-mobile 5.6s ease-in-out 4.1s infinite; }
    .auth-login-card { width: 100%; padding: 32px 27px 36px; }
    .auth-wordmark { margin-bottom: 24px; }
}

@media (max-width: 680px) {
    .content { padding: 22px 15px 50px; }
    .admin-chip { display: none; }
    .hero { min-height: 170px; align-items: flex-start; flex-direction: column; gap: 22px; }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats article { min-height: 100px; padding: 17px; }
    .card { padding: 20px; }
    .auth-page, .public-page { padding: 14px; }
    .auth-card, .public-card { padding: 28px 21px; }
    .location-tools { grid-template-columns: 1fr 1fr; }
    .location-tools input { grid-column: 1 / -1; }
    .vpn-location-item { grid-template-columns: 20px 1fr; }
    .vpn-location-item small { display: none; }
    .diagnostics-grid { grid-template-columns: 1fr; }
    .diagnostics-grid .diagnostic-error { grid-column: auto; }
    .feature-switches { grid-template-columns: 1fr; }
    .panel-support-footer { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; }
    .auth-visual::after, .login-lamp, .lamp-glow, .login-mascot, .mascot-ring, .mascot-eye, .mascot-eye i, .mascot-smile, .mascot-shadow, .auth-login-card, .auth-wordmark, .auth-login-card h1, .auth-login-card .muted, .auth-login-card .alert, .auth-login-card form label, .auth-login-card form .button, .auth-page > .panel-support-footer { animation: none !important; }
}

@keyframes lamp-breathe-mobile { 0%, 100% { transform: translateX(-50%) rotate(-.6deg); } 50% { transform: translateX(-50%) rotate(.7deg); } }
@keyframes mascot-enter-mobile { 0% { opacity: 0; transform: translateX(-50%) translateY(24px) scale(.28) rotate(-7deg); filter: blur(5px) drop-shadow(0 3px 4px rgba(246,163,19,.08)); } 62% { opacity: 1; transform: translateX(-50%) translateY(-5px) scale(.65) rotate(1.4deg); filter: blur(0) drop-shadow(0 18px 24px rgba(246,163,19,.22)); } 100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(.62) rotate(-1deg); filter: blur(0) drop-shadow(0 18px 24px rgba(246,163,19,.2)); } }
@keyframes mascot-shadow-enter-mobile { 0% { opacity: 0; transform: translateX(-50%) scaleX(.18); } 100% { opacity: .65; transform: translateX(-50%) scaleX(.72); } }
@keyframes mascot-float-mobile { 0%, 100% { transform: translateX(-50%) scale(.62) translateY(0) rotate(-1deg); } 34% { transform: translateX(-50%) scale(.62) translateY(-7px) rotate(1deg); } 72% { transform: translateX(-50%) scale(.62) translateY(-3px) rotate(-.4deg); } }
@keyframes mascot-shadow-mobile { 0%, 100% { opacity: .65; transform: translateX(-50%) scaleX(.72); } 34% { opacity: .35; transform: translateX(-50%) scaleX(.54); } 72% { opacity: .48; transform: translateX(-50%) scaleX(.63); } }
