:root {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --surface-blue: #eff6ff;
    --text: #172033;
    --text-soft: #64748b;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;
    --primary: #1d4ed8;
    --primary-hover: #1e40af;
    --primary-soft: #dbeafe;
    --success: #15803d;
    --success-soft: #dcfce7;
    --warning: #a16207;
    --warning-soft: #fef3c7;
    --danger: #b42318;
    --danger-hover: #8f1c14;
    --danger-soft: #fee2e2;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
    --shadow: 0 12px 35px rgba(15, 23, 42, .07);
    --radius-sm: 9px;
    --radius: 15px;
    --radius-lg: 20px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 12% 0%, rgba(37, 99, 235, .07), transparent 28rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; }
.ui-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Shared Mercury header fallback */
.mercury-fallback-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1440px, calc(100% - 32px));
    min-height: 82px;
    margin: 14px auto 0;
    padding: 10px 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.mercury-logo-link img { display: block; width: auto; }
.mercury-app-label { display: grid; gap: 2px; text-align: right; color: var(--text-soft); }
.mercury-app-label strong { color: var(--text); font-size: 16px; }

/* Application navigation / menu.php */
.app-navigation-shell {
    width: min(1440px, calc(100% - 32px));
    margin: 12px auto 0;
    padding: 11px 14px;
    background: #e0f0f7;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(16px);
}
.app-navigation-heading { display: none; align-items: center; justify-content: space-between; gap: 12px; }
.app-navigation-content { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.app-navigation-content nav { min-width: 0; }
.app-identity { display: flex; align-items: center; gap: 10px; color: var(--text); }
.app-identity-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #1e3a8a);
    border-radius: 11px;
}
.app-identity span:last-child { display: grid; line-height: 1.2; }
.app-identity small { color: var(--text-soft); font-size: 11px; font-weight: 600; }
.user-menu { display: flex; align-items: center; gap: 9px; padding-left: 15px; border-left: 1px solid var(--border); }
.user-avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: #fff;
    background: linear-gradient(135deg, #0f766e, #115e59);
    border-radius: 50%;
    font-weight: 800;
}
.user-summary { display: grid; min-width: 112px; line-height: 1.25; }
.user-summary strong { overflow: hidden; max-width: 170px; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.user-summary small { color: var(--text-soft); font-size: 11px; }
.mobile-menu-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    margin: 0;
    padding: 0 12px;
    color: var(--text);
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 10px;
}

/* Main layout */
.app-main {
    width: min(1440px, calc(100% - 32px));
    min-height: 50vh;
    margin: 22px auto 36px;
}
.login-shell { width: min(470px, calc(100% - 32px)); min-height: 55vh; margin: 38px auto; }
.app-main > h1,
.page-heading h1 {
    margin: 0;
    color: var(--text);
    font-size: clamp(25px, 3vw, 34px);
    line-height: 1.15;
    letter-spacing: -.035em;
}
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin: 0 0 20px; }
.page-heading p { max-width: 760px; margin: 7px 0 0; color: var(--text-soft); }
.page-heading-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.compact-heading { align-items: center; margin-bottom: 13px; }
.compact-heading h2 { margin-bottom: 0; }
.compact-heading p { margin-top: 3px; font-size: 12px; }
.app-main > h1 { margin-bottom: 20px; }
h2 { margin: 0 0 14px; color: var(--text); font-size: 18px; letter-spacing: -.015em; }
h3 { color: var(--text); font-size: 15px; }

.card {
    margin-bottom: 16px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.card:hover { border-color: #d8e0eb; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.stat-card { position: relative; overflow: hidden; min-height: 128px; }
.stat-card::after { content: ""; position: absolute; right: -28px; bottom: -38px; width: 110px; height: 110px; border-radius: 50%; background: var(--primary-soft); opacity: .55; }
.stat-card-icon { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 15px; color: var(--primary); background: var(--primary-soft); border-radius: 11px; }
.stat-card.success .stat-card-icon { color: var(--success); background: var(--success-soft); }
.stat-card.danger-stat .stat-card-icon { color: var(--danger); background: var(--danger-soft); }
.stat { position: relative; z-index: 1; font-size: 32px; font-weight: 800; line-height: 1; letter-spacing: -.04em; }
.stat-label { margin-top: 6px; color: var(--text-soft); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }

/* Forms */
label { display: block; margin-top: 11px; color: #334155; font-size: 12px; font-weight: 750; }
input, select, textarea {
    width: 100%;
    min-height: 42px;
    margin-top: 5px;
    padding: 9px 11px;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    outline: none;
    font: inherit;
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
input:hover, select:hover, textarea:hover { border-color: #94a3b8; }
input:focus, select:focus, textarea:focus { border-color: #3b82f6; box-shadow: 0 0 0 4px rgba(59, 130, 246, .13); }
input:disabled, select:disabled, textarea:disabled { color: #94a3b8; background: #f1f5f9; cursor: not-allowed; }
textarea { min-height: 92px; resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: 17px; min-height: 17px; margin: 0; accent-color: var(--primary); }
.checkbox-label { display: flex; align-items: center; gap: 8px; }
.field-help { display: block; margin-top: 5px; color: var(--text-soft); font-size: 11px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 18px; align-items: start; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field-span-2 { grid-column: span 2; }
.field-span-full { grid-column: 1 / -1; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }

/* Buttons */
button, .button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    margin-top: 13px;
    padding: 0 15px;
    color: #fff;
    background: var(--primary);
    border: 1px solid transparent;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(29, 78, 216, .14);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
    transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease, border-color .16s ease;
}
button:hover, .button:hover, .btn:hover { color: #fff; background: var(--primary-hover); box-shadow: 0 7px 16px rgba(29, 78, 216, .2); transform: translateY(-1px); }
button:active, .button:active, .btn:active { transform: translateY(0); }
button:focus-visible, .btn:focus-visible, .button:focus-visible { outline: 3px solid rgba(59, 130, 246, .28); outline-offset: 2px; }
.btn-secondary, button.secondary, .button.secondary { color: #334155; background: #fff; border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.btn-secondary:hover, button.secondary:hover, .button.secondary:hover { color: var(--text); background: #f1f5f9; border-color: #94a3b8; box-shadow: var(--shadow-sm); }
.btn-danger, button.danger-button { color: #fff; background: var(--danger); box-shadow: 0 4px 10px rgba(180, 35, 24, .14); }
.btn-danger:hover, button.danger-button:hover { background: var(--danger-hover); box-shadow: 0 7px 16px rgba(180, 35, 24, .19); }
.btn-ghost { color: #475569; background: transparent; border-color: transparent; box-shadow: none; }
.btn-ghost:hover { color: var(--primary); background: var(--surface-blue); box-shadow: none; }
.btn-sm, button.compact { min-height: 34px; margin-top: 0; padding: 0 11px; border-radius: 8px; font-size: 12px; }
.link-button {
    min-height: 34px;
    margin: 0;
    padding: 0 11px;
    color: #1d4ed8;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    box-shadow: none;
    font-size: 12px;
}
.link-button:hover { color: #fff; background: var(--primary); border-color: var(--primary); box-shadow: none; }
.link-button.danger { color: var(--danger); background: #fff5f5; border-color: #fecaca; }
.link-button.danger:hover { color: #fff; background: var(--danger); border-color: var(--danger); }
.form-actions button, .form-actions .btn { margin-top: 0; }

/* Liste: bară de căutare/paginare și antete sortabile */
.list-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin: 12px 0; }
.list-search-input { min-width: 220px; flex: 1 1 220px; margin: 0; }
.list-pagesize-label { display: flex; align-items: center; gap: 7px; margin-left: auto; font-size: 12.5px; color: #64748b; white-space: nowrap; }
.list-pagesize-label select { margin: 0; padding: 6px 9px; }
.list-toolbar .btn { margin-top: 0; }
.list-hide-disabled { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #64748b; white-space: nowrap; margin: 0; }
.sort-link { color: inherit; text-decoration: none; }
.sort-link:hover { color: var(--primary); }
.sort-link.active { color: var(--primary); }
.list-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; font-size: 12.5px; color: #64748b; }
.list-pagination-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.list-pagination-links a, .list-pagination-links span { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 8px; text-decoration: none; color: var(--text); }
.list-pagination-links a:hover { background: var(--surface-soft); }
.list-pagination-links .current { background: var(--primary); color: #fff; font-weight: 700; }
.list-pagination-links .disabled { color: #cbd5e1; }
.list-pagination-links .ellipsis { color: #cbd5e1; min-width: auto; }

/* Tables */
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
.app-main table { width: 100%; border-collapse: collapse; background: var(--surface); }
.app-main th, .app-main td { padding: 12px 13px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.app-main th { color: #64748b; background: var(--surface-soft); font-size: 10px; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; white-space: nowrap; }
.app-main tbody tr:last-child > td { border-bottom: 0; }
.app-main tbody tr:not(.inline-editor-row):hover > td { background: #fbfdff; }
.table-link { display: inline-flex; align-items: center; font-weight: 800; white-space: nowrap; }
.truncate-error { display: block; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.actions-cell { min-width: 185px; }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.row-actions form, .action-form { margin: 0; }
.inline-editor-row td { padding: 0 !important; background: #f8faff !important; }
.inline-editor { padding: 18px; border-left: 4px solid var(--primary); }
.inline-editor h3 { margin: 0 0 8px; }
[hidden] { display: none !important; }

/* Disclosure cards */
.collapsible-card { padding: 0; overflow: hidden; }
.card-summary {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 17px 20px;
    color: var(--text);
    cursor: pointer;
    font-size: 15px;
    font-weight: 800;
    list-style: none;
    user-select: none;
}
.card-summary::-webkit-details-marker { display: none; }
.card-summary::before { content: "+"; display: grid; place-items: center; width: 25px; height: 25px; color: var(--primary); background: var(--primary-soft); border-radius: 8px; font-size: 18px; line-height: 1; }
.collapsible-card[open] .card-summary::before { content: "−"; }
.collapsible-card[open] .card-summary { border-bottom: 1px solid var(--border); }
.collapsible-content { padding: 5px 20px 20px; }
details summary { cursor: pointer; color: var(--primary); font-weight: 700; }

/* Status, helper text and messages */
.muted { color: var(--text-soft); }
.small { font-size: 11px; }
.danger { color: var(--danger); }
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 24px;
    padding: 2px 8px;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}
.badge.online, .badge.success { color: #166534; background: var(--success-soft); border-color: #bbf7d0; }
.badge.offline, .badge.disabled, .badge.cancelled { color: #475569; background: #f1f5f9; }
.badge.discovered, .badge.pending_agent, .badge.queued { color: #854d0e; background: var(--warning-soft); border-color: #fde68a; }
.badge.failed { color: #991b1b; background: var(--danger-soft); border-color: #fecaca; }
.badge.running, .badge.downloading, .badge.sent { color: #1e40af; background: var(--primary-soft); border-color: #bfdbfe; }
.badge.reboot_required { color: #6b21a8; background: #f3e8ff; border-color: #e9d5ff; }
.badge.partial { color: #854d0e; background: var(--warning-soft); border-color: #fde68a; }
.badge.completed { color: #166534; background: var(--success-soft); border-color: #bbf7d0; }
.badge.completed_with_errors { color: #991b1b; background: var(--danger-soft); border-color: #fecaca; }
.badge.completed_with_warnings { color: #854d0e; background: var(--warning-soft); border-color: #fde68a; }
.badge.draft { color: #475569; background: #f1f5f9; }
.flash-stack { display: grid; gap: 9px; margin-bottom: 16px; }
.flash { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; color: #166534; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 12px; box-shadow: var(--shadow-sm); }
.flash.error { color: #991b1b; background: #fff7f7; border-color: #fecaca; }
.flash-icon { display: grid; place-items: center; flex: 0 0 auto; width: 24px; height: 24px; }
.flash-close { min-width: 28px; min-height: 28px; margin: -3px -5px -3px auto; padding: 0; color: currentColor; background: transparent; border: 0; box-shadow: none; opacity: .65; }
.flash-close:hover { color: currentColor; background: rgba(0, 0, 0, .05); box-shadow: none; opacity: 1; }

/* Page-specific utility components */
.member-details summary { font-weight: 700; }
.member-list { min-width: 190px; margin-top: 8px; }
.member-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; }
.member-row form { margin: 0; }
.filter-grid { display: grid; grid-template-columns: repeat(5, minmax(130px, 1fr)); gap: 12px; align-items: end; }
.filter-grid label { margin-top: 0; }
.device-filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 11px; align-items: end; margin: 14px 0; padding: 14px; background: var(--surface-soft); border: 1px solid var(--border); border-radius: 12px; }
.device-filter-grid > div:first-child { grid-column: span 2; }
.device-filter-grid label { margin-top: 0; }
.device-filter-grid input, .device-filter-grid select { margin: 0; }
.device-filter-grid .filter-actions { align-self: end; min-width: max-content; }
.device-filter-grid .filter-actions .button { margin-top: 0; }
.agent-fleet-grid, .device-detail-stats { margin-bottom: 4px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
/* Implicit stivuite pe o coloană: fiecare card e exact cât conținutul lui.
   .settings-grid-2col e pentru perechi cu înălțimi apropiate, unde punerea
   pe același rând chiar economisește înălțimea paginii fără gol vizibil mare
   (ex. Versiune curentă / Versiuni raportate). Nu o folosi pentru perechi cu
   diferențe mari de conținut (ex. Încarcă release / Trimite actualizare) —
   acolo golul din cardul scurt ar fi mare, indiferent de aliniere. */
.settings-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.settings-grid.settings-grid-2col { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: stretch; }
.settings-grid .card { margin: 0; }
.settings-summary { display: grid; grid-template-columns: minmax(160px, auto) 1fr; gap: 7px 16px; margin: 14px 0; padding: 12px 14px; background: var(--surface-soft); border: 1px solid var(--border); border-radius: 12px; }
.settings-summary dt { color: var(--text-soft); font-weight: 700; }
.settings-summary dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.agent-update-grid { margin-top: 16px; }
.agent-update-device-list { max-height: 420px; }
.agent-update-toolbar { margin-top: 12px; }
.rustdesk-config-panel { min-width: 0; margin: 8px 0 0; padding: 16px; background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 13px; }
.rustdesk-config-panel legend { padding: 0 8px; color: #075985; font-weight: 850; }
.rustdesk-config-panel .flash { margin-bottom: 0; }
.device-metadata { gap: 8px 14px; }
.device-metadata dt { color: var(--text-soft); }
.compact-alert { display: block; margin: 16px 0 0; }
.filter-actions { display: flex; align-items: center; gap: 7px; }
.filter-actions .button { margin-top: 13px; }
.hash-code { display: inline-block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-result-cell { min-width: 300px; max-width: 520px; }
.log-summary { max-width: 500px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 7px; }
.job-metadata { display: grid; grid-template-columns: max-content 1fr; gap: 4px 10px; margin: 10px 0; }
.job-metadata dt { font-weight: 800; }
.job-metadata dd { margin: 0; overflow-wrap: anywhere; }
.role-form { min-width: 230px; }
.role-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.role-options label { display: flex; align-items: center; gap: 7px; margin: 0; padding: 8px 9px; background: var(--surface-soft); border: 1px solid var(--border); border-radius: 8px; font-weight: 650; }
.role-options label > span { min-width: 0; }
.role-help { display: block; margin-top: 3px; font-weight: 400; line-height: 1.35; }
.selection-item-meta { display: flex; align-items: flex-end; justify-content: center; gap: 4px; flex-direction: column; text-align: right; }
.target-selector-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.target-panel { min-width: 0; margin: 0; padding: 14px; background: var(--surface-soft); border: 1px solid var(--border); border-radius: 12px; }
.target-panel legend { padding: 0 7px; color: var(--text); font-size: 13px; font-weight: 800; }
.target-panel-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.target-panel-header input { margin: 0; }
.selection-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 7px; margin-bottom: 9px; }
.selection-toolbar-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.selection-toolbar .btn { min-height: 30px; padding: 0 9px; }
.selection-count { color: var(--text-soft); font-size: 11px; font-weight: 750; }
.selection-list { display: grid; align-content: start; max-height: 315px; overflow: auto; background: #fff; border: 1px solid var(--border); border-radius: 10px; }
.selection-item { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 9px; min-height: 43px; margin: 0; padding: 8px 10px; border-bottom: 1px solid #edf2f7; cursor: pointer; font-size: 12px; font-weight: 700; }
.selection-item:last-child { border-bottom: 0; }
.selection-item:hover { background: var(--surface-blue); }
.selection-item:has(input:checked) { background: #eaf3ff; }
.selection-item.is-already-member { color: #64748b; background: #f8fafc; cursor: not-allowed; opacity: .72; }
.selection-item small { color: var(--text-soft); font-weight: 600; }
.selection-item-main { display: grid; min-width: 0; gap: 2px; }
.selection-item-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-group-memberships { overflow: hidden; color: var(--text-soft); text-overflow: ellipsis; white-space: nowrap; font-size: 10px; font-weight: 600; }
.selection-empty { margin: 0; padding: 14px; color: var(--text-soft); font-size: 12px; }
.selection-validation { grid-column: 1 / -1; margin: 10px 0 0; }
.membership-group-field { max-width: 720px; }
.group-membership-panel { margin-top: 10px; }
.deployment-targets { display: flex; flex-wrap: wrap; gap: 5px; max-width: 360px; }
.target-chip { display: inline-flex; align-items: center; max-width: 230px; padding: 3px 7px; color: #334155; background: #f1f5f9; border: 1px solid var(--border); border-radius: 7px; font-size: 10px; font-weight: 750; }
.target-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resolved-target-count { display: block; margin-top: 5px; color: var(--text-soft); font-size: 10px; font-weight: 700; }
code { padding: 2px 6px; color: #334155; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 6px; font-family: "SFMono-Regular", Consolas, monospace; font-size: .9em; }
pre { max-width: 100%; overflow: auto; padding: 12px; color: #334155; background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.55 "SFMono-Regular", Consolas, monospace; }

/* Login */
.login-card { overflow: hidden; padding: 0; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.login-card-header { padding: 25px; color: #fff; background: linear-gradient(135deg, #1d4ed8, #172554); }
.login-card-header .ui-icon { width: 28px; height: 28px; }
.login-card-header h1 { margin: 14px 0 4px; color: #fff; font-size: 26px; }
.login-card-header p { margin: 0; color: #dbeafe; }
.login-card-body { padding: 24px; }
.login-card-body button { width: 100%; }

/* Footer */
.app-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto 22px;
    padding: 15px 18px;
    color: var(--text-soft);
    border-top: 1px solid var(--border);
    font-size: 11px;
}
.app-footer > div { display: flex; align-items: center; gap: 8px; }
.app-footer strong { color: #334155; }
.footer-dot { width: 4px; height: 4px; background: #94a3b8; border-radius: 50%; }

@media (max-width: 1120px) {
    .app-navigation-heading { display: flex; }
    .app-navigation-content { display: none; margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--border); }
    .app-navigation-content.is-open { display: grid; }
    ul.tabs.deploy-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    li.tab-app > a.nonSelected, li.tab-app > a.tabSelected-app { width: 100%; }
    .user-menu { padding: 11px 0 0; border-left: 0; border-top: 1px solid var(--border); }
    .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .shared-head-adapter, .mercury-fallback-header, .app-navigation-shell, .app-main, .app-footer { width: min(100% - 20px, 1440px); }
    .shared-head-adapter table.h2 td { padding: 0 10px !important; }
    .mercury-fallback-header { min-height: 68px; padding: 8px 13px; }
    .mercury-app-label span { display: none; }
    .app-main { margin-top: 15px; }
    .card { padding: 15px; border-radius: 13px; }
    .form-grid, .form-grid-3, .filter-grid, .device-filter-grid, .target-selector-grid, .detail-grid, .settings-grid, .settings-grid.settings-grid-2col { grid-template-columns: 1fr; }
    .device-filter-grid > div:first-child { grid-column: auto; }
    .field-span-2, .field-span-full { grid-column: 1; }
    .page-heading { display: grid; }
    .page-heading-actions { width: 100%; }
    ul.tabs.deploy-tabs { grid-template-columns: 1fr; }
    .user-summary { flex: 1; }
    .app-footer { display: grid; }
    .app-footer-meta { flex-wrap: wrap; }
}
