:root { color-scheme: light; --bg:#f4f6f8; --panel:#fff; --text:#17202a; --muted:#657786; --line:#dce2e8; --accent:#1769aa; --good:#176b3a; }
* { box-sizing:border-box; }
body { margin:0; font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; background:var(--bg); color:var(--text); }
a { color:var(--accent); text-decoration:none; }
a:hover { text-decoration:underline; }
.topbar { min-height:64px; display:flex; align-items:center; justify-content:space-between; gap:24px; padding:0 28px; background:#111827; color:#fff; }
.brand a { color:#fff; font-size:20px; font-weight:700; }
.topbar nav { display:flex; align-items:center; gap:18px; }
.topbar nav a, .link-button { color:#e5e7eb; }
.inline-form { display:inline; margin:0; }
.link-button { border:0; background:none; font:inherit; cursor:pointer; padding:0; }
.container { max-width:1600px; margin:0 auto; padding:28px; }
h1 { margin:0 0 8px; }
h2 { margin-top:0; }
.cards { display:grid; grid-template-columns:repeat(4,minmax(180px,1fr)); gap:16px; margin:22px 0; }
.cards.compact .card { min-height:90px; }
.card, .panel, .login-card { background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:20px; box-shadow:0 1px 2px rgba(0,0,0,.04); }
.metric { display:block; font-size:34px; font-weight:750; margin-bottom:6px; }
.label { display:block; color:var(--muted); font-size:13px; margin-bottom:8px; text-transform:uppercase; letter-spacing:.04em; }
.grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.page-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:18px; }
.filters { display:flex; flex-wrap:wrap; gap:10px; padding:14px; margin:16px 0; background:#fff; border:1px solid var(--line); border-radius:10px; }
input, select { min-height:40px; padding:8px 11px; border:1px solid #b9c2cc; border-radius:6px; background:#fff; font:inherit; }
input[type=search] { min-width:320px; flex:1; }
.button { display:inline-flex; align-items:center; justify-content:center; min-height:40px; padding:8px 14px; border:1px solid #aeb8c2; border-radius:6px; background:#fff; color:var(--text); cursor:pointer; font:inherit; }
.button.primary { background:var(--accent); border-color:var(--accent); color:#fff; }
.table-wrap { overflow:auto; background:#fff; border:1px solid var(--line); border-radius:10px; }
table { border-collapse:collapse; width:100%; font-size:14px; }
th, td { padding:11px 12px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; }
th { background:#f8fafc; white-space:nowrap; color:#405064; }
tr:last-child td { border-bottom:0; }
.mono { font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,monospace; font-size:12px; }
.path-cell { max-width:500px; overflow-wrap:anywhere; }
.badge { display:inline-block; border-radius:999px; padding:4px 8px; font-size:12px; font-weight:650; }
.badge.good { background:#dcfce7; color:var(--good); }
.badge.muted { background:#e5e7eb; color:#4b5563; }
.pagination { display:flex; justify-content:center; gap:18px; align-items:center; margin:20px 0; }
.login-card { max-width:420px; margin:80px auto; }
.login-card form { display:grid; gap:10px; }
.alert { padding:10px; background:#fee2e2; color:#991b1b; border-radius:6px; margin-bottom:14px; }
@media (max-width:1000px) { .cards { grid-template-columns:1fr 1fr; } .grid-2 { grid-template-columns:1fr; } .topbar { align-items:flex-start; flex-direction:column; padding:18px; } .topbar nav { flex-wrap:wrap; } }
@media (max-width:600px) { .cards { grid-template-columns:1fr; } .container { padding:16px; } input[type=search] { min-width:100%; } }
.muted { color:var(--muted); }
.notice { padding:12px 14px; margin:0 0 16px; background:#e8f1fb; border:1px solid #bad3ee; border-radius:7px; }
.notice.success { background:#dcfce7; border-color:#a7e8bd; }
.notice.error, .field-error { color:#991b1b; }
.notice.warning, .alert.warning { background:#fff7d6; color:#6b4f00; }
.setup-wrap { max-width:820px; margin:20px auto; }
.form-grid { display:grid; gap:14px; }
.form-grid h2 { margin:18px 0 0; padding-top:18px; border-top:1px solid var(--line); }
.form-grid h2:first-of-type { margin-top:0; padding-top:0; border-top:0; }
.form-row { display:grid; gap:6px; }
.form-row input:not([type=checkbox]), .form-row select { width:100%; }
.checkbox-row { grid-template-columns:auto 1fr; align-items:center; }
.checkbox-row label { order:2; }
.checkbox-row input { order:1; }
.field-error { font-size:13px; }
.settings-nav { display:flex; gap:10px; flex-wrap:wrap; margin:0 0 18px; }
.button-row { display:flex; gap:10px; flex-wrap:wrap; }
.button.danger { border-color:#b91c1c; color:#b91c1c; }
.secret-display { padding:16px; background:#111827; color:#f9fafb; border-radius:7px; overflow:auto; white-space:pre-wrap; overflow-wrap:anywhere; }
small { color:var(--muted); }

.badge.warning-badge { background:#fff7d6; color:#6b4f00; }
.badge.bad { background:#fee2e2; color:#991b1b; }
.compact-button { min-height:32px; padding:5px 9px; font-size:12px; white-space:nowrap; }

/* Bulk remediation and table layout improvements */
.section-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:12px; }
.section-heading h2 { margin-bottom:4px; }
.bulk-remediation-form { margin:0; }
.bulk-action-bar { display:flex; align-items:center; justify-content:flex-end; gap:16px; padding:10px 12px; margin:0 0 10px; background:#fff; border:1px solid var(--line); border-radius:8px; }
.select-cell { width:42px; text-align:center; vertical-align:middle; }
.select-cell input[type=checkbox] { min-height:auto; width:16px; height:16px; margin:0; }
.sort-link { color:#405064; font-weight:650; white-space:nowrap; }
.sort-link:hover { text-decoration:none; color:var(--accent); }
.sort-indicator { margin-left:5px; font-size:10px; }
.applications-table { table-layout:fixed; min-width:1180px; }
.applications-table .col-select { width:42px; }
.applications-table .col-app { width:10%; }
.applications-table .col-version { width:6%; }
.applications-table .col-device { width:10%; }
.applications-table .col-user { width:10%; }
.applications-table .col-os { width:7%; }
.applications-table .col-bundle { width:16%; }
.applications-table .col-path { width:23%; }
.applications-table .col-status { width:8%; }
.applications-table .col-last-seen { width:10%; }
.applications-table th, .applications-table td { padding:10px 9px; }
.applications-table .bundle-cell, .applications-table .path-cell { overflow-wrap:anywhere; word-break:normal; }
.applications-table .date-cell { white-space:normal; }
.device-apps-table .path-cell { min-width:280px; }
@media (min-width:1280px) {
    .applications-table-wrap { overflow-x:hidden; }
}
