:root {
  color-scheme: dark;
  --bg: #050b14;
  --surface: #0b1627;
  --surface-2: #101e32;
  --surface-3: #16263d;
  --line: #21344e;
  --line-soft: #15253a;
  --text: #f3f7ff;
  --muted: #8da2bf;
  --blue: #3584ff;
  --blue-2: #65a8ff;
  --green: #26d99a;
  --yellow: #f5c451;
  --red: #ff6878;
  --radius: 15px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background:
    linear-gradient(rgba(24, 48, 77, .13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 48, 77, .13) 1px, transparent 1px),
    var(--bg);
  background-size: 44px 44px;
  color: var(--text);
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }
a { color: var(--blue-2); }
.hidden { display: none !important; }
.boot { min-height: 100vh; display: grid; place-content: center; gap: 18px; justify-items: center; color: var(--muted); }
.spinner { width: 26px; height: 26px; border: 3px solid var(--line); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(430px, 100%); padding: 34px; background: rgba(10, 22, 38, .96); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 28px 80px #0009; }
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; background: linear-gradient(145deg, #2f80ff, #165bd8); box-shadow: 0 10px 35px #1c6ff955; font-weight: 900; }
.login-card .brand-mark { margin-bottom: 22px; }
.login-card h1 { margin: 0 0 8px; font-size: 28px; }
.login-card p { color: var(--muted); margin: 0 0 25px; line-height: 1.6; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 248px; background: rgba(6, 16, 29, .97); border-right: 1px solid var(--line); z-index: 20; display: flex; flex-direction: column; }
.brand { min-height: 78px; display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line-soft); }
.brand-copy strong { display: block; font-size: 13px; letter-spacing: .13em; text-transform: uppercase; }
.brand-copy small { color: var(--muted); }
.nav-title { padding: 26px 20px 10px; color: #58718f; text-transform: uppercase; letter-spacing: .22em; font-size: 10px; }
.nav { padding: 0 10px; display: grid; gap: 4px; }
.nav button { border: 0; background: transparent; color: #aabbd0; display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 13px; border-radius: 11px; cursor: pointer; text-align: left; }
.nav button:hover { background: #10213a; color: white; }
.nav button.active { background: #12315b; color: #ddecff; }
.nav-icon { width: 20px; text-align: center; font-size: 16px; }
.sidebar-user { margin-top: auto; padding: 17px 18px; border-top: 1px solid var(--line-soft); color: var(--muted); }
.sidebar-user strong { color: #dce9fb; display: block; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user small { text-transform: capitalize; }
.sidebar-user button { margin-top: 11px; width: 100%; }

.topbar { position: sticky; top: 0; z-index: 10; margin-left: 248px; height: 66px; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; background: rgba(5, 11, 20, .9); backdrop-filter: blur(15px); border-bottom: 1px solid var(--line-soft); }
.server-line { display: flex; gap: 12px; align-items: center; min-width: 0; }
.server-line strong { display: block; }
.server-line small { color: var(--muted); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.connection { display: inline-flex; gap: 7px; align-items: center; color: #9dc9ba; border: 1px solid #23483f; border-radius: 999px; padding: 6px 11px; font-size: 11px; letter-spacing: .08em; }
.dot { width: 8px; height: 8px; background: var(--green); border-radius: 50%; box-shadow: 0 0 10px #26d99a88; display: inline-block; }
.mobile-menu { display: none; }
.main { margin-left: 248px; padding: 32px; max-width: 1700px; }

.page-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.eyebrow { color: #63a9ff; letter-spacing: .22em; text-transform: uppercase; font-size: 11px; margin-bottom: 10px; }
h1, h2, h3 { letter-spacing: -.025em; }
.page-head h1 { font-size: clamp(27px, 3vw, 38px); margin: 0 0 7px; }
.page-head p { margin: 0; color: var(--muted); line-height: 1.55; }
.button-row { display: flex; gap: 9px; flex-wrap: wrap; }
.btn { border: 1px solid var(--line); background: #101d2f; color: #e5eefb; border-radius: 10px; padding: 9px 13px; cursor: pointer; font-weight: 650; transition: .16s ease; }
.btn:hover { transform: translateY(-1px); border-color: #3e6088; background: #152942; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: white; }
.btn.primary:hover { background: #4a91ff; }
.btn.danger { color: #ff9ba6; border-color: #57313c; background: #26151c; }
.btn.danger:hover { background: #351822; border-color: #82404e; }
.btn.ghost { background: transparent; }
.btn.small { padding: 6px 9px; border-radius: 8px; font-size: 12px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.icon-btn { width: 38px; height: 38px; padding: 0; display: grid; place-items: center; }

.notice { padding: 14px 16px; border: 1px solid #274260; background: #0c1c30; border-radius: 12px; color: #b9cce3; line-height: 1.55; }
.notice.warning { border-color: #594a29; background: #211b0e; color: #e7cd8f; }
.notice.danger { border-color: #64323c; background: #29151b; color: #ffabb4; }
.notice.success { border-color: #285849; background: #0d251e; color: #94e5c8; }
.notice + .notice { margin-top: 10px; }
.error-page { max-width: 720px; margin: 80px auto; text-align: center; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.metric, .panel, .service-card { background: linear-gradient(145deg, rgba(15, 30, 50, .98), rgba(9, 21, 36, .98)); border: 1px solid var(--line); border-radius: var(--radius); }
.metric { min-height: 196px; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.metric-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); }
.metric-icon { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid #28415e; border-radius: 12px; color: var(--blue-2); background: #0c192b; }
.metric-live { color: #617a98; font: 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .2em; }
.metric-body { display: grid; grid-template-columns: minmax(0, 1fr) 132px; gap: 12px; align-items: end; margin-top: 13px; }
.metric-label { color: var(--muted); font-size: 14px; margin-bottom: 4px; }
.metric-value { font-size: 28px; font-weight: 800; letter-spacing: -.04em; }
.metric-sub { color: #6f87a4; font-size: 12px; margin-top: 5px; }
.sparkline { width: 132px; height: 46px; overflow: visible; }
.sparkline polygon { fill: rgba(53, 132, 255, .11); }
.sparkline polyline { fill: none; stroke: #5ca2ff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.sparkline.cyan polygon { fill: rgba(32, 207, 224, .1); }
.sparkline.cyan polyline { stroke: #38d9ea; }
.sparkline.green polygon { fill: rgba(38, 217, 154, .1); }
.sparkline.green polyline { stroke: #26d99a; }
.sparkline.purple polygon { fill: rgba(164, 119, 255, .11); }
.sparkline.purple polyline { stroke: #a477ff; }
.meter { height: 5px; border-radius: 99px; overflow: hidden; background: #1d2e44; margin-top: 16px; }
.meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), #6cb4ff); }
.meter.green span { background: var(--green); }
.meter.cyan span { background: #38d9ea; }
.meter.purple span { background: #a477ff; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(310px, .9fr); gap: 18px; margin-top: 18px; }
.panel { padding: 20px; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 16px; }
.panel-head h2, .panel-head h3 { margin: 0; }
.panel-head small { color: var(--muted); }
.service-line { display: grid; grid-template-columns: minmax(160px, 1fr) 100px 105px auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.service-line:first-of-type { border-top: 0; }
.service-name { min-width: 0; }
.service-name strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.service-name small { color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 7px; color: #aabed6; font-size: 13px; }
.status.offline .dot { background: #60738a; box-shadow: none; }
.status.starting .dot { background: var(--yellow); box-shadow: 0 0 10px #f5c45166; }

.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 5px; border: 1px solid var(--line); border-radius: 13px; background: #081321; margin-bottom: 18px; }
.tabs button { border: 0; white-space: nowrap; background: transparent; color: var(--muted); padding: 8px 13px; border-radius: 9px; cursor: pointer; }
.tabs button.active { background: #16345c; color: white; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 15px; }
.service-card { padding: 18px; min-width: 0; }
.service-card.clickable { cursor: pointer; }
.service-card.clickable:hover, .service-card.clickable:focus-visible { border-color: rgba(68, 144, 255, .55); box-shadow: 0 12px 34px rgba(0, 0, 0, .22); outline: none; }
.service-card-top { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.service-card h3 { margin: 0; font-size: 17px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.service-card p { color: var(--muted); font-size: 12px; margin: 5px 0 0; }
.service-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; border-top: 1px solid var(--line-soft); margin-top: 16px; padding-top: 14px; }
.service-meta span { color: #617a98; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; display: block; }
.service-meta strong { font-size: 13px; margin-top: 3px; display: block; }
.service-actions { margin-top: 14px; display: flex; gap: 7px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; border: 1px solid #2d4563; border-radius: 999px; padding: 4px 8px; color: #9db4d0; font-size: 11px; white-space: nowrap; }
.badge.yellow { color: #f5d77c; border-color: #5a4b21; }
.address-list { display: grid; gap: 9px; }
.address-list > div { display: grid; gap: 5px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #081523; }
.address-list span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; }
.address-list a { overflow-wrap: anywhere; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 13px; }
table { width: 100%; border-collapse: collapse; min-width: 680px; }
th, td { text-align: left; padding: 12px 13px; border-bottom: 1px solid var(--line-soft); font-size: 13px; vertical-align: middle; }
th { color: #8ca2be; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; background: #0b1728; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #10203966; }
tbody tr.selected td { background: #17355d99; }
.file-select { width: 42px; min-width: 42px; text-align: center; }
.file-select input { width: 17px; height: 17px; accent-color: var(--blue); cursor: pointer; }
.file-name { display: flex; align-items: center; gap: 9px; min-width: 240px; }
.file-name button { border: 0; background: transparent; padding: 0; color: #dfeaff; cursor: pointer; text-align: left; }
.file-name small { color: var(--muted); }
.file-table { table-layout: fixed; min-width: 820px; }
.file-table .file-select { width: 42px; }
.file-table th:nth-last-child(3), .file-table td:nth-last-child(3) { width: 105px; }
.file-table th:nth-last-child(2), .file-table td:nth-last-child(2) { width: 170px; }
.file-table th:last-child, .file-table td:last-child { width: 300px; }
.file-table .file-name { min-width: 0; max-width: 100%; }
.file-table .file-name > button,
.file-table .file-name > span:last-child,
.file-table .file-name > strong { display: block; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.breadcrumb { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; color: var(--muted); margin: 0 0 15px; }
.breadcrumb button { border: 0; background: none; color: var(--blue-2); cursor: pointer; padding: 2px; }
.drop-zone { padding: 20px; border: 1px dashed #375477; border-radius: 12px; color: var(--muted); text-align: center; margin-bottom: 15px; background: #091728; transition: border-color .15s, background .15s; }
.drop-zone strong { color: #dce9fb; }
.drop-zone.drag { border-color: var(--blue); background: #102c50; }
.drop-zone.busy { opacity: .75; }
.upload-status { display: grid; gap: 4px; margin-bottom: 15px; }
.upload-status small { color: var(--muted); }
.upload-status-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.upload-status-head > div:first-child { display: grid; gap: 4px; min-width: 0; }
.file-search-bar { display: flex; align-items: center; gap: 10px; margin: 0 0 15px; }
.file-search-bar label { flex: 1; display: flex; align-items: center; gap: 9px; min-width: 0; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #081523; color: var(--muted); }
.file-search-bar input { width: 100%; min-width: 0; border: 0; background: transparent; padding: 11px 0; color: var(--text); outline: 0; }
.search-controls { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 10px; margin-bottom: 12px; }
.search-results { display: grid; gap: 8px; max-height: 58vh; overflow: auto; margin-top: 12px; padding-right: 3px; }
.search-result { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 11px; align-items: center; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; background: #081523; }
.search-result-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: #122743; color: var(--blue-2); }
.search-result strong, .search-result small { display: block; overflow-wrap: anywhere; }
.search-result small { margin-top: 3px; color: var(--muted); }
.small-spinner { width: 16px; height: 16px; border-width: 2px; vertical-align: middle; }
.progress { height: 7px; border-radius: 99px; overflow: hidden; background: #1c2f49; margin-top: 10px; }
.progress span { display: block; height: 100%; background: var(--blue); transition: width .15s; }
.selection-bar { position: sticky; bottom: 10px; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 14px; width: max-content; max-width: calc(100% - 24px); margin: 14px auto 0; padding: 10px 12px; border: 1px solid #35577e; border-radius: 12px; background: #0a1829f2; box-shadow: 0 14px 36px #0008; backdrop-filter: blur(12px); }
.selection-bar[hidden] { display: none; }
.selection-bar strong { color: #cfe1f8; font-size: 12px; white-space: nowrap; }
.project-preview { position: relative; min-height: 360px; max-height: 62vh; display: grid; place-items: center; margin: 14px 0; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: #03070d; }
.project-preview img { display: block; max-width: 100%; max-height: 60vh; object-fit: contain; }
.project-preview.media audio, .project-preview.media video { width: min(100%, 960px); max-height: 60vh; }
.project-preview-frame { width: 100%; min-height: 62vh; margin: 14px 0; border: 1px solid var(--line); border-radius: 12px; background: white; }
.binary-preview { max-height: 52vh; color: #c7d6e8; }

.media-grid { display: grid; grid-template-columns: repeat(3, minmax(250px, 1fr)); gap: 15px; }
.media-card { position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); background: #0a1727; transition: border-color .15s, box-shadow .15s; }
.media-card.selected { border-color: #4a91ee; box-shadow: 0 0 0 2px #2e7dff33; }
.media-preview { position: relative; aspect-ratio: 16/9; background: #03070d; display: grid; place-items: center; }
.media-preview video, .media-preview audio { width: 100%; max-height: 100%; }
.media-preview audio { padding: 20px; }
.media-fallback { padding: 25px; text-align: center; color: var(--muted); }
.media-info { padding: 14px; }
.media-info strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-info small { display: block; color: var(--muted); margin: 5px 0 12px; }
.media-selection-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: #0a1727; }
.media-selection-tools .check { border: 0; padding: 0; }
.media-selection-tools small { color: var(--muted); }
.media-select-box { position: absolute; z-index: 4; top: 10px; left: 10px; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #426188; border-radius: 9px; background: #071322e8; box-shadow: 0 5px 18px #0009; cursor: pointer; }
.media-select-box input { width: 18px; height: 18px; accent-color: var(--blue); cursor: pointer; }
.media-seek-controls { position: absolute; z-index: 3; top: 10px; right: 10px; display: flex; gap: 6px; padding: 5px; border: 1px solid #344d6d; border-radius: 10px; background: #02070ddd; box-shadow: 0 5px 18px #0008; }
.media-seek-controls .btn { min-height: 29px; padding: 5px 8px; background: #10213a; }

.folder-picker { min-height: 260px; }
.folder-picker-list { display: grid; gap: 8px; max-height: 50vh; overflow: auto; margin-top: 14px; padding-right: 3px; }
.folder-choice { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 9px; align-items: center; width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #081523; color: #dce9fb; text-align: left; cursor: pointer; }
.folder-choice:hover { border-color: #416a99; background: #102039; }
.folder-choice span { color: var(--blue-2); font-size: 20px; }
.folder-choice small { color: var(--muted); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { color: #aebed1; font-size: 12px; font-weight: 650; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #2a405d; background: #0c192b; color: white; border-radius: 10px; padding: 10px 11px; outline: none; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px #2e7dff22; }
.field textarea { min-height: 100px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.field small { color: var(--muted); line-height: 1.45; }
.check-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.check { display: flex; gap: 9px; align-items: start; padding: 9px; border: 1px solid var(--line-soft); border-radius: 9px; color: #b6c6d9; font-size: 12px; }
.check input { margin-top: 2px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: #000b; display: grid; place-items: center; padding: 20px; }
.modal-backdrop.stacked { z-index: 120; }
.modal { width: min(720px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: #0b182a; border: 1px solid #2b415e; border-radius: 17px; box-shadow: 0 30px 100px #000; }
.modal.wide { width: min(1280px, 100%); }
.modal-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 17px 20px; background: #0b182aee; backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 20px; }
.modal-body { padding: 20px; }
.modal-foot { display: flex; justify-content: end; gap: 9px; padding: 15px 20px; border-top: 1px solid var(--line); }
.logs { white-space: pre-wrap; word-break: break-word; background: #02070d; color: #b8e2c7; border: 1px solid #1f3544; border-radius: 11px; padding: 14px; max-height: 340px; overflow: auto; font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; direction: ltr; text-align: left; }
.console-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 15px; align-items: stretch; }
.console-main, .server-info { border: 1px solid var(--line); border-radius: 13px; background: #081523; padding: 16px; min-width: 0; }
.service-console { min-height: 330px; max-height: 460px; }
.info-list { display: grid; gap: 0; margin: 0; }
.info-list > div { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-top: 1px solid var(--line-soft); align-items: center; }
.info-list > div:first-child { border-top: 0; }
.info-list dt { color: #6f87a4; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; }
.info-list dd { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: #dce9fb; font-size: 12px; }
.service-metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 15px; }
.service-metric-grid .metric { min-height: 170px; padding: 16px; }
.service-metric-grid .metric-body { grid-template-columns: minmax(0, 1fr) 90px; }
.service-metric-grid .sparkline { width: 90px; }
.service-metric-grid .metric-value { font-size: 22px; }
.terminal { min-height: 430px; }
.terminal-command { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; margin-top: 12px; }
.terminal-command input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.empty { padding: 45px 20px; text-align: center; color: var(--muted); border: 1px dashed #2c4666; border-radius: 13px; }
.toast { position: fixed; z-index: 200; right: 22px; bottom: 22px; max-width: min(420px, calc(100vw - 44px)); padding: 13px 16px; background: #14263d; border: 1px solid #375677; border-radius: 11px; box-shadow: 0 14px 50px #0009; opacity: 0; pointer-events: none; transform: translateY(12px); transition: .2s; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: #341921; border-color: #7e3d4a; color: #ffc0c6; }
.toast.success { background: #102c24; border-color: #326d5a; color: #aef2d7; }

.remote-lock-card { width: min(680px, 100%); margin: 8vh auto 0; display: grid; gap: 20px; padding: 28px; border: 1px solid #31547b; border-radius: 20px; background: radial-gradient(circle at 90% 5%, #14345c 0, transparent 38%), linear-gradient(145deg, #0f2036, #081523); box-shadow: 0 25px 90px #0008; }
.remote-lock-card h2 { margin: 0 0 7px; }
.remote-lock-card p { margin: 0; color: var(--muted); line-height: 1.6; }
.remote-lock-icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 17px; border: 1px solid #3b6592; background: #102b4b; color: #7db8ff; font-size: 27px; }
.remote-hero-grid { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 15px; margin-top: 18px; }
.remote-control-card { min-height: 245px; display: flex; flex-direction: column; align-items: flex-start; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(15, 31, 52, .98), rgba(7, 19, 33, .98)); }
.remote-control-card h2 { margin: 14px 0 7px; font-size: 19px; }
.remote-control-card p { flex: 1; margin: 0 0 15px; color: var(--muted); line-height: 1.55; font-size: 13px; }
.remote-control-card small { display: block; margin-top: 11px; color: #718aa8; line-height: 1.45; }
.remote-card-icon { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid #31557d; border-radius: 12px; background: #0b213b; color: #75b2ff; font-size: 19px; }
.remote-desktop-frame { width: 100%; height: min(72vh, 820px); margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; background: #02060b; }
.link-button { border: 0; padding: 0; background: transparent; color: var(--blue-2); cursor: pointer; font: inherit; text-decoration: underline; }

@media (max-width: 1200px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid, .media-grid { grid-template-columns: repeat(2, minmax(250px, 1fr)); }
  .remote-hero-grid { grid-template-columns: repeat(2, minmax(240px, 1fr)); }
}
@media (max-width: 820px) {
  .sidebar { transform: translateX(-101%); transition: transform .2s; box-shadow: 12px 0 60px #000b; }
  .sidebar.open { transform: translateX(0); }
  .topbar, .main { margin-left: 0; }
  .topbar { padding: 0 16px; }
  .main { padding: 22px 16px; }
  .mobile-menu { display: grid; }
  .connection { display: none; }
  .two-col { grid-template-columns: 1fr; }
  .console-layout { grid-template-columns: 1fr; }
  .page-head { align-items: start; flex-direction: column; }
  .remote-hero-grid { grid-template-columns: 1fr; }
}
@media (max-width: 580px) {
  .metric-grid, .service-metric-grid, .card-grid, .media-grid, .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .metric { min-height: 150px; }
  .service-line { grid-template-columns: 1fr auto; }
  .service-line > :nth-child(2), .service-line > :nth-child(3) { display: none; }
  .check-grid { grid-template-columns: 1fr; }
  .selection-bar { width: 100%; max-width: 100%; align-items: stretch; flex-direction: column; }
  .upload-status-head, .file-search-bar { align-items: stretch; flex-direction: column; }
  .search-controls { grid-template-columns: 1fr; }
  .search-result { grid-template-columns: 30px minmax(0, 1fr); }
  .search-result .button-row { grid-column: 1 / -1; }
  .login-card { padding: 25px; }
}

.remote-full-window { padding: 0; }
.remote-full-window > .modal { width: 100%; height: 100dvh; max-height: none; border: 0; border-radius: 0; display: flex; flex-direction: column; }
.remote-full-window .modal-head, .remote-full-window .modal-foot { flex-shrink: 0; }
.remote-full-window .modal-body { flex: 1; min-height: 0; padding: 0; display: flex; }
.remote-full-window .notice { display: none; }
.remote-full-window .remote-desktop-frame { flex: 1; height: 100%; min-height: 0; margin: 0; border: 0; border-radius: 0; }
