/* ============================================================
   Logicalis Operations Portal — enterprise design system
   Mirrors the NIMS dark/light theme system.
   ============================================================ */
:root {
  --accent:    #4f8ef7;
  --accent2:   #7c5cfc;
  --accent3:   #00d4a8;
  --danger:    #f7596a;
  --warn:      #f7a832;
  --success:   #34d497;
  --radius:    12px;
  --radius-lg: 18px;
  --font:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono:      'JetBrains Mono', Consolas, monospace;
  --nav-h:     60px;
  --lop-topbar-h: 62px;
  --lop-sidebar-w: 238px;
}

/* ── DARK theme (default) ─────────────────────────────────── */
body.theme-dark {
  --bg-deep:       #05080f;
  --bg-panel:      rgba(13,17,38,.82);
  --bg-card:       rgba(255,255,255,.045);
  --bg-card-hov:   rgba(255,255,255,.08);
  --bg-input:      #0b0f1e;
  --border:        rgba(255,255,255,.09);
  --border-bright: rgba(255,255,255,.20);
  --text:          #e8eaf2;
  --text-muted:    #8b93b4;
  --text-dim:      #5a6286;
  background:      #05080f;
  color:          #e8eaf2;
}

/* ── LIGHT theme ──────────────────────────────────────────── */
body.theme-light {
  --bg-deep:       #eef2f9;
  --bg-panel:      rgba(255,255,255,.92);
  --bg-card:       #ffffff;
  --bg-card-hov:   #ffffff;
  --bg-input:      #f5f8fd;
  --border:        rgba(15,23,42,.10);
  --border-bright: rgba(15,23,42,.20);
  --text:          #111827;
  --text-muted:    #4b5563;
  --text-dim:      #94a3b8;
  background:      #eef2f9;
  color:          #111827;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  background-color: var(--bg-deep);
  color: var(--text);
  min-height: 100vh;
  transition: background .3s, color .3s;
}
body.theme-dark {
  background-image: radial-gradient(1100px 560px at 82% -12%, rgba(79,142,247,.12) 0, transparent 60%),
                    radial-gradient(900px 500px at 10% 0%, rgba(124,92,252,.10) 0, transparent 55%);
  background-attachment: fixed;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: #79a9f9; }

/* ── Topbar (fixed, centered title — NIMS style) ──────────── */
#lop-topbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--lop-topbar-h); z-index: 100;
  background: var(--bg-panel); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 22px;
}
.tb-left { display: flex; align-items: center; gap: 12px; }
.tb-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.tb-center {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  text-align: center; white-space: nowrap; pointer-events: none; line-height: 1;
}
.tc-main { font-size: 18px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--text); }
.tc-main em {
  font-style: normal;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.tc-sub { margin-top: 4px; font-size: 9px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--text-muted); }

.lop-brand { display: flex; align-items: center; gap: 11px; white-space: nowrap; }
.lop-logo-img { height: 34px; width: auto; object-fit: contain; }
/* Theme-aware transparent logo: show light-ink art on dark theme, dark-ink on light */
.logo-theme-dark  { display: none; }
.logo-theme-light { display: inline-block; }
body.theme-dark .logo-theme-dark  { display: inline-block; }
body.theme-dark .logo-theme-light { display: none; }

.lop-sidebar-toggle {
  background: none; border: none; color: var(--text-muted); font-size: 17px; cursor: pointer;
  width: 36px; height: 36px; border-radius: 8px; display: none;
  align-items: center; justify-content: center; transition: .15s;
}
.lop-sidebar-toggle:hover { background: var(--bg-card); color: var(--text); }

/* ── Sidebar (left vertical nav — NIMS style) ─────────────── */
#lop-sidebar {
  position: fixed; top: var(--lop-topbar-h); left: 0; bottom: 0;
  width: var(--lop-sidebar-w); z-index: 90;
  background: var(--bg-panel); backdrop-filter: blur(22px);
  border-right: 1px solid var(--border);
  padding: 14px 0; display: flex; flex-direction: column; gap: 1px;
  overflow-y: auto; transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.nav-section-label {
  padding: 14px 18px 5px; font-size: 9.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.2px; color: var(--text-dim);
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 16px; margin: 1px 10px; border-radius: 9px;
  font-size: 13.5px; font-weight: 500; color: var(--text-muted);
  text-decoration: none; transition: .15s; white-space: nowrap; position: relative;
}
.nav-item i { width: 18px; text-align: center; font-size: 14px; }
.nav-item:hover { background: var(--bg-card); color: var(--text); }
.nav-item.active {
  background: linear-gradient(135deg, rgba(79,142,247,.16), rgba(124,92,252,.08));
  color: var(--accent); border: 1px solid rgba(79,142,247,.22);
}
.nav-item.active::before {
  content: ''; position: absolute; left: -10px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; background: var(--accent); border-radius: 0 2px 2px 0;
}
.sidebar-footer { margin-top: auto; padding: 16px; border-top: 1px solid var(--border); }
.sidebar-footer-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-dim); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); display: inline-block; box-shadow: 0 0 7px var(--success); margin-right: 2px; }

/* ── Main area (offset by topbar + sidebar) ───────────────── */
.lop-main-wrap { margin-left: var(--lop-sidebar-w); padding-top: var(--lop-topbar-h); min-height: 100vh; }
.lop-page-content { padding: 26px 30px 60px; }
.lop-sidebar-overlay { display: none; position: fixed; inset: var(--lop-topbar-h) 0 0 0; background: rgba(0,0,0,.5); z-index: 85; }

.theme-toggle-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px; border-radius: 20px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-muted); font-family: var(--font);
  font-size: 12px; font-weight: 600; cursor: pointer; transition: .15s; white-space: nowrap;
}
.theme-toggle-btn:hover { background: var(--bg-card-hov); color: var(--text); border-color: var(--border-bright); }

.lop-user-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 5px; border-radius: 24px;
  background: var(--bg-card); border: 1px solid var(--border);
  font-size: 12px; font-weight: 600; color: var(--text-muted); white-space: nowrap;
}
.lop-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff;
}
.role-tag { font-size: 10px; padding: 2px 7px; border-radius: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.role-tag.admin    { background: rgba(79,142,247,.15); color: var(--accent);  border: 1px solid rgba(79,142,247,.25); }
.role-tag.engineer { background: rgba(124,92,252,.15); color: var(--accent2); border: 1px solid rgba(124,92,252,.25); }
.role-tag.customer { background: rgba(52,212,151,.12); color: var(--success); border: 1px solid rgba(52,212,151,.25); }
.lop-btn-ghost {
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text-muted);
  padding: 8px 12px; border-radius: 20px; cursor: pointer; font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px; transition: .15s;
}
.lop-btn-ghost:hover { border-color: var(--accent); color: var(--text); }

/* ── Layout ───────────────────────────────────────────────── */
.lop-container { max-width: 1280px; margin: 0 auto; padding: 26px 22px 60px; }
.lop-page-head { margin-bottom: 22px; }
.lop-page-head h1 { font-size: 1.55rem; margin: 0 0 4px; font-weight: 800; }
.lop-page-head p { color: var(--text-muted); margin: 0; }

/* ── Hero ─────────────────────────────────────────────────── */
.lop-hero {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px 28px; margin-bottom: 24px;
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
}
.lop-hero h1 { margin: 0 0 6px; font-size: 1.5rem; font-weight: 800; }
.lop-hero .sub { color: var(--text-muted); font-size: .95rem; }
.lop-hero .clock { font-variant-numeric: tabular-nums; font-size: .85rem; color: var(--text-dim); margin-top: 6px; font-family: var(--mono); }

/* ── Status pill ──────────────────────────────────────────── */
.status-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px; border-radius: 999px; font-size: .8rem; font-weight: 700;
  border: 1px solid var(--border); background: var(--bg-card);
}
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text-dim); }
.s-up .status-dot, .s-operational .status-dot { background: var(--success); box-shadow: 0 0 8px var(--success); }
.s-degraded .status-dot { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.s-down .status-dot, .s-partial-outage .status-dot { background: var(--danger); box-shadow: 0 0 8px var(--danger); }
.s-unconfigured .status-dot, .s-unknown .status-dot { background: var(--text-dim); }
.s-up, .s-operational { color: var(--success); }
.s-degraded { color: var(--warn); }
.s-down, .s-partial-outage { color: var(--danger); }

/* ── Grid ─────────────────────────────────────────────────── */
.lop-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .lop-grid { grid-template-columns: 1fr; } }
.section-title { font-size: .76rem; text-transform: uppercase; letter-spacing: .09em; color: var(--text-dim); font-weight: 700; margin: 4px 0 14px; }

/* ── Solution cards ───────────────────────────────────────── */
.solution-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(252px, 1fr)); gap: 18px; }
.solution-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 20px; position: relative; overflow: hidden; display: flex; flex-direction: column;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.solution-card:hover { transform: translateY(-3px); border-color: var(--border-bright); box-shadow: 0 14px 38px rgba(0,0,0,.28); }
.solution-card .accent-bar { position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.solution-card .card-head { display: flex; align-items: center; gap: 13px; margin-bottom: 12px; }
.solution-card .card-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 1.35rem; flex-shrink: 0; }
.solution-card h3 { margin: 0; font-size: 1.05rem; font-weight: 700; }
.solution-card .ver { color: var(--text-dim); font-size: .76rem; }
.solution-card .desc { color: var(--text-muted); font-size: .87rem; line-height: 1.5; flex: 1; margin-bottom: 16px; }
.solution-card .card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.launch-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; border: none;
  padding: 9px 16px; border-radius: 10px; font-weight: 600; font-size: .85rem; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
}
.launch-btn:hover { filter: brightness(1.08); color: #fff; }

/* ── Panels ───────────────────────────────────────────────── */
.panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 20px; overflow-x: auto; }
.panel h2 { font-size: 1rem; margin: 0 0 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.panel h2 i { color: var(--accent); }

.announce { padding: 12px 0; border-bottom: 1px solid var(--border); }
.announce:last-child { border-bottom: none; }
.announce .a-title { font-weight: 600; font-size: .92rem; }
.announce .a-meta { color: var(--text-dim); font-size: .76rem; margin-top: 3px; }
.announce .a-body { color: var(--text-muted); font-size: .86rem; margin-top: 5px; }

.quick-actions { display: flex; flex-direction: column; gap: 9px; }
.quick-action { display: flex; align-items: center; gap: 11px; padding: 11px 13px; background: var(--bg-input); border: 1px solid var(--border); border-radius: 10px; color: var(--text); font-size: .88rem; transition: border-color .15s; }
.quick-action:hover { border-color: var(--accent); color: var(--text); }
.quick-action i { color: var(--accent); width: 16px; text-align: center; }

.placeholder-chart { height: 120px; border: 1px dashed var(--border); border-radius: 10px; display: grid; place-items: center; color: var(--text-dim); font-size: .82rem; gap: 8px; }

/* ── Auth pages ───────────────────────────────────────────── */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: 100%; max-width: 410px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; padding: 34px 30px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.auth-logo { display: flex; justify-content: center; margin-bottom: 18px; }
.auth-logo img { height: 54px; width: auto; object-fit: contain; }
.auth-card h1 { text-align: center; font-size: 1.3rem; margin: 6px 0 2px; font-weight: 800; }
.auth-card h1 em { font-style: normal; background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.auth-card .tagline { text-align: center; color: var(--text-muted); font-size: .86rem; margin-bottom: 24px; }
.auth-foot { text-align: center; margin-top: 18px; font-size: .76rem; color: var(--text-dim); }

/* Microsoft SSO button + divider (login page) */
.btn-ms-sso {
  width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 11px 14px; border-radius: 10px; border: 1px solid var(--border-bright);
  background: var(--bg-input); color: var(--text); font-weight: 600; font-size: .92rem;
  transition: border-color .15s, background .15s;
}
.btn-ms-sso:hover { border-color: var(--accent); color: var(--text); background: var(--bg-card-hov); }
.auth-divider {
  display: flex; align-items: center; gap: 12px; margin: 18px 0;
  color: var(--text-dim); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em;
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: .82rem; color: var(--text-muted); margin-bottom: 6px; font-weight: 600; }
.form-control { width: 100%; padding: 11px 13px; background: var(--bg-input); border: 1px solid var(--border); border-radius: 10px; color: var(--text); font-size: .92rem; transition: border-color .15s; font-family: var(--font); }
.form-control:focus { outline: none; border-color: var(--accent); }
.form-check { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--text-muted); margin-bottom: 18px; }
.btn-primary-block { width: 100%; padding: 12px; border: none; border-radius: 10px; cursor: pointer; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; font-weight: 700; font-size: .95rem; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-primary-block:hover { filter: brightness(1.08); }
.captcha-row { display: flex; gap: 12px; align-items: center; }
.captcha-row img { border-radius: 9px; border: 1px solid var(--border); }

/* ── Flash messages ───────────────────────────────────────── */
.flash-stack { margin-bottom: 18px; display: flex; flex-direction: column; gap: 10px; }
.flash { padding: 12px 15px; border-radius: 10px; font-size: .88rem; border: 1px solid var(--border); display: flex; align-items: center; gap: 10px; background: var(--bg-card); }
.flash.success { background: rgba(52,212,151,.1); border-color: rgba(52,212,151,.4); color: #29b582; }
.flash.error   { background: rgba(247,89,106,.1); border-color: rgba(247,89,106,.4); color: #e0454f; }
.flash.warning { background: rgba(247,168,50,.1); border-color: rgba(247,168,50,.4); color: #d98a18; }
.flash.info    { background: rgba(79,142,247,.1); border-color: rgba(79,142,247,.4); color: var(--accent); }

/* ── Tables ───────────────────────────────────────────────── */
.lop-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.lop-table th, .lop-table td { padding: 11px 13px; text-align: left; border-bottom: 1px solid var(--border); }
.lop-table th { color: var(--text-dim); font-weight: 700; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; }
.lop-table tr:hover td { background: var(--bg-card-hov); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .73rem; font-weight: 700; background: var(--bg-input); border: 1px solid var(--border); color: var(--text-muted); }
.badge.admin { color: var(--accent); border-color: rgba(79,142,247,.4); }
.badge.ok { color: var(--success); border-color: rgba(52,212,151,.4); }
.badge.off { color: var(--danger); border-color: rgba(247,89,106,.4); }
.btn-sm { padding: 6px 11px; font-size: .8rem; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-input); color: var(--text); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.btn-sm:hover { border-color: var(--accent); }
.btn-sm.danger:hover { border-color: var(--danger); color: var(--danger); }

/* ── Admin ────────────────────────────────────────────────── */
.admin-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; margin-bottom: 26px; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 20px; }
.stat-card .n { font-size: 1.9rem; font-weight: 800; }
.stat-card .l { color: var(--text-muted); font-size: .84rem; margin-top: 2px; display: flex; align-items: center; gap: 7px; }
.stat-card .l i { color: var(--accent); }

.log-view { background: var(--bg-input); border: 1px solid var(--border); border-radius: 10px; padding: 14px; font-family: var(--mono); font-size: .78rem; line-height: 1.55; color: var(--text-muted); max-height: 70vh; overflow: auto; white-space: pre-wrap; }
.tab-row { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.tab-link { padding: 8px 14px; border-radius: 10px; background: var(--bg-card); border: 1px solid var(--border); color: var(--text-muted); font-size: .85rem; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; }
.tab-link.active, .tab-link:hover { color: var(--accent); border-color: rgba(79,142,247,.3); background: rgba(79,142,247,.08); }

dialog.lop-modal { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); border-radius: 16px; padding: 0; width: min(560px, 92vw); box-shadow: 0 24px 70px rgba(0,0,0,.5); }
dialog.lop-modal::backdrop { background: rgba(4,7,15,.6); backdrop-filter: blur(2px); }
.modal-head { padding: 18px 22px; border-bottom: 1px solid var(--border); font-weight: 700; }
.modal-body { padding: 20px 22px; }
.modal-foot { padding: 16px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.error-page { min-height: 80vh; display: grid; place-items: center; text-align: center; }
.error-page .code { font-size: 5rem; font-weight: 800; background: linear-gradient(135deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.error-page h2 { margin: 8px 0; }
.error-page p { color: var(--text-muted); }

/* ── Uptime history bar (status-page style) ───────────────── */
.uptime-bar { display: flex; gap: 2px; height: 34px; align-items: stretch; }
.ub-seg { flex: 1 1 0; min-width: 2px; border-radius: 2px; background: var(--border); transition: opacity .15s; }
.ub-seg:hover { opacity: .65; }
.ub-up { background: var(--success); }
.ub-down { background: var(--danger); }
.ub-degraded { background: var(--warn); }
.ub-none { background: var(--border); }

/* ============================================================
   Responsive system — phone · tablet · laptop · desktop · TV/4K
   Breakpoints: 420 · 520 · 560 · 720 · 760 · 920 · 2000 · 2600
   ============================================================ */

/* Content is centred and width-capped so ultra-wide monitors and TVs
   don't stretch cards edge-to-edge. */
.lop-page-content { max-width: 1760px; margin: 0 auto; }

/* Modals must never exceed the viewport (long forms on landscape phones). */
dialog.lop-modal { max-height: 92vh; overflow-y: auto; }

/* ── Large desktop / TV (≥ 2000px) ────────────────────────── */
@media (min-width: 2000px) {
  html { font-size: 17px; }                 /* rem-based text scales up */
  :root { --lop-sidebar-w: 268px; --lop-topbar-h: 70px; }
  .lop-page-content { max-width: 2000px; padding: 34px 44px 70px; }
  .tc-main { font-size: 21px; }
  .tc-sub { font-size: 10px; }
  .lop-logo-img { height: 40px; }
  .nav-item { font-size: 15px; padding: 12px 18px; }
  .solution-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
  .admin-cards { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
}
/* ── 4K TV (≥ 2600px): comfortable viewing from a distance ── */
@media (min-width: 2600px) {
  html { font-size: 19px; }
  :root { --lop-sidebar-w: 300px; --lop-topbar-h: 78px; }
  .lop-page-content { max-width: 2360px; }
  .tc-main { font-size: 24px; }
  .lop-logo-img { height: 46px; }
  .solution-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
}

/* ── Tablet / narrow laptop (≤ 920px): sidebar becomes a drawer ── */
@media (max-width: 920px) {
  .lop-sidebar-toggle { display: flex; }
  #lop-sidebar { transform: translateX(-100%); }
  body.sidebar-open #lop-sidebar { transform: translateX(0); }
  body.sidebar-open .lop-sidebar-overlay { display: block; }
  .lop-main-wrap { margin-left: 0; }
  .lop-user-name { display: none; }
  .theme-toggle-btn span, .lop-btn-ghost span { display: none; }
  /* Mobile: hide the wide logo wordmark and show the title inline next to the
     hamburger (matches the solution apps). Flowing it inline — not absolutely
     centered — guarantees it never overlaps the right-hand icons.
     ID-scoped so it beats the theme-swap rules (body.theme-dark .logo-*). */
  #lop-topbar .lop-logo-img { display: none; }
  .tb-center { position: static; transform: none; text-align: left; }
  .tc-sub { display: none; }
  .tc-main { font-size: 15px; letter-spacing: .3px; }
  #lop-topbar { padding: 0 16px; }
  .lop-btn-ghost { padding: 8px 10px; }   /* icon-only sign-out */
}

/* ── Large phone / small tablet (≤ 760px) ─────────────────── */
@media (max-width: 760px) {
  /* Keep columns readable when the table scrolls inside its panel. */
  .panel .lop-table { min-width: 620px; }
  .lop-hero { padding: 18px 20px; }
  .lop-hero h1 { font-size: 1.25rem; }
  .lop-page-head h1 { font-size: 1.3rem; }
  .log-view { font-size: .72rem; }
}

/* ── Phone (≤ 560px) ──────────────────────────────────────── */
@media (max-width: 560px) {
  .grid-2 { grid-template-columns: 1fr; }   /* modal forms single-column */
  .solution-grid { grid-template-columns: 1fr; }
  .captcha-row { flex-wrap: wrap; }
}
@media (max-width: 520px) {
  .lop-user-badge .role-tag { display: none; }
  .lop-page-content { padding: 18px 14px 50px; }
  #lop-topbar { padding: 0 12px; }
  .tb-right { gap: 7px; }
  .lop-user-badge { padding: 3px 6px 3px 4px; }
  /* 16px inputs stop iOS Safari auto-zooming on focus */
  .form-control { font-size: 16px; }
  /* Denser uptime bar so 96 slots fit a phone without page scroll */
  .uptime-bar { gap: 1px; height: 28px; }
  .ub-seg { min-width: 1px; border-radius: 1px; }
  .modal-body, .modal-head, .modal-foot { padding-left: 16px; padding-right: 16px; }
}

/* ── Small phone (≤ 420px) ────────────────────────────────── */
@media (max-width: 420px) {
  .auth-card { padding: 26px 18px; }
  .auth-logo img { height: 46px; }
  .lop-logo-img { height: 28px; }
  .lop-hero { padding: 16px; }
  .stat-card .n { font-size: 1.5rem; }
  .error-page .code { font-size: 3.4rem; }
  .lop-page-head h1 { font-size: 1.18rem; }
  .tab-link { padding: 7px 11px; font-size: .8rem; }
}

/* image icons for solutions (e.g. MyPA robot) */
.solution-card .card-icon .sol-img{width:40px;height:40px;object-fit:contain;border-radius:10px}
.nav-item .sol-img{width:18px;height:18px;object-fit:contain;vertical-align:middle}
.badge .sol-img{width:16px;height:16px;object-fit:contain;vertical-align:-3px}
