/* ====================================================
   Core Style
   Copyright (c) 2025 IoT Secure
   ==================================================== */

/* =============================
 * 1) Design Tokens (root only)
 * ============================= */
 :root{
  /* Text */
  --ink:             #0f172a;  /* primary text */
  --ink-muted:       #64748b;  /* secondary text */
  --ink-invert:      #ffffff;  /* text on dark */
  --db-key:          #AAAAAA;  /* database key */

  /* Surfaces */
  --page:            #f8f9fb;  /* page background */
  --surface:         #ffffff;  /* generic surface */
  --surface-muted:   #e9edf2;  /* bars, subtle cards */
  --impersonate-bar: #008060;

  /* Borders & lines */
  --border:          #e5e7eb;
  --divider:         #e7ecf3;
  --divider-dk:      #4D5D75; 

  /* Lables */
  --lbl-ux:          #008060;
  --lbl-ux-txt:      #E8F5E9;
  --lbl-tbd:         #ffea00;
  
  /* States */
  --ok:              #28a745;
  --ok-bg:           #e6f4ea;
  --warn:            #ffea00;
  --warn-bg:         #fffbe6;
  --error:           #dc3545;
  --error-bg:        #fdeaea;
  --info:            #007bff;
  --info-bg:         #e7f3ff;
  --xinfo:           #666666;
  --xinfo-bg:        #EEEEEE;

  /* Spacing */
  --space-1:         8px;
  --space-2:         12px;
  --space-3:         16px;
  --space-4:         24px;
  --space-5:         36px;

  /* Radii */
  --r-xs:            2px;
  --r-sm:            4px;
  --r-md:            6px;
  --r-lg:            8px;
  --r-xl:            10px;

  /* Shadows */
  --shadow-1:        0 1px 2px rgba(15,23,42,.06);
  --shadow-2:        0 4px 12px rgba(15,23,42,.10);

  /* Focus */
  --focus-ring:      0 0 0 3px rgba(37,99,235,.25);

  /* Nav (integrated menu tokens) */
  --nav-h:           70px;
  --nav-top-h:       64px;
  --nav-bg:          var(--brand-bg);
  --nav-ink:         var(--ink-invert);
  --nav-hover:       #14528F;
  --nav-hover-bg:    #00183A;

  --dd-bg:           var(--surface);
  --dd-border:       #cccccc;
  --dd-shadow:       0 8px 12px rgba(0,0,0,.10);
  --dd-hover:        #f0f0f0;

  --logo-max-h:      40px;

  --tooltip-bg:      #004080;
  --tooltip-ink:     var(--ink-invert);
  --tooltip-w:       60px;
  --tooltip-offset:  -35px;

  --pad-x:           20px;
  --pad-y:           21px;

  /* Table Stages */
  --stg1-bg:          #BFE5C7;
  --stg2-bg:          #E5F5E9;
  --stg3-bg:          #ECF7EE;
  --stg4-bg:          #F2FAF4;
  --stg5-bg:          #F9FCF9;
  --stg6-bg:          #FFFFFF;

  /* Log Streaming */
  --log-out:          #00FF00;
  --log-out-bg:       #1e232d;
  --log-out-bd:       #030304;

  /* (Added to consolidate page-local tokens) */
  --bd:               #d0d6e0;
  --muted:            #6b7280;
  --muted-bg:         #eef2f7;
}

/* =================
 * 2) Base / Reset
 * ================= */
*,
*::before,
*::after{ box-sizing: border-box; }

html{ -webkit-text-size-adjust: 100%; }
body{
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Open Sans", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  background: var(--page);
  color: var(--ink);
  overflow-x: hidden;
  max-width: 100vw;
}
a{ color: inherit; text-decoration: none; }
img{ max-width: 100%; height: auto; display: block; }

/* =============
 * 3) Layout
 * ============= */
.page-wrap{
  width: 100%;
  margin: var(--space-4) auto;
  padding: 0 var(--space-3);
}
@media (min-width: 768px){
  .page-wrap{ padding: 0 var(--space-5); }
}

/* Long tables / Grid.js containers */
.grid-wrap{
  width: 100%;
  margin: 0 auto var(--space-4) auto;
  padding: 0;
  overflow-x: auto;
}

/* ==========================
 * 4) Cards & Sections
 * ========================== */
.card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-1);
  padding: var(--space-3);
  margin: 0 0 var(--space-4) 0;
}
@media (min-width: 768px){
  .card{ padding: var(--space-4); }
}

.section_title{
  margin: var(--space-3) 0;
  color: var(--brand-accent);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
}

/* ================
 * 5) Navigation
 * ================ */
/* Shell (brand row) */
.topnav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--nav-bg);
  height: var(--nav-h);
  padding: 0 10px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  padding-left: 10px;
  padding-right: 24px;
}
.logo img {
  display: block;
  height: auto;
  width: auto;
  max-width: 100%;
  max-height: var(--logo-max-h, 46px);
  object-fit: contain;
}

/* Primary nav container */
.nav-menu {
  position: relative;
  background: var(--nav-bg);
  width: 100%;
  z-index: 100;
}

/* One UL for both desktop & mobile */
.nav-list,
.nav-menu > ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  height: var(--nav-h);
  gap: 2px;
}

/* Top-level items */
.nav-list > li,
.nav-menu > ul > li {
  position: relative;
  display: flex;
  align-items: center;
}
.nav-list > li > a,
.nav-menu > ul > li > a {
  display: flex;
  align-items: center;
  color: var(--nav-ink);
  padding: var(--pad-y) var(--pad-x);
  white-space: nowrap;
  font-weight: 600;
}
.nav-list > li:hover,
.nav-list > li:focus-within,
.nav-menu > ul > li:hover,
.nav-menu > ul > li:focus-within {
  background: var(--nav-hover-bg);
}

/* Icons */
.nav-icon { height: 20px; width: auto; vertical-align: middle; }

/* Dropdowns (desktop) */
.nav-list li ul,
.nav-menu li ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--dd-bg);
  border: 1px solid var(--dd-border);
  box-shadow: var(--dd-shadow);
  z-index: 1000;
}
.nav-list li:hover > ul,
.nav-menu li:hover > ul { display: block; }
.nav-list li ul li a,
.nav-menu li ul li a {
  display: block;
  padding: 12px 16px;
  color: var(--nav-bg);
  font-weight: 400;
  white-space: nowrap;
}
.nav-list li ul li a:hover,
.nav-list li ul li a:focus,
.nav-menu li ul li a:hover,
.nav-menu li ul li a:focus { background: var(--dd-hover); }

/* Icon-only items: tooltip */
.navitem--icon { position: relative; display: flex; align-items: center; }
.navitem--icon .nav-tooltip {
  position: absolute;
  bottom: var(--tooltip-offset);
  left: 50%;
  transform: translateX(-50%);
  width: var(--tooltip-w);
  padding: 4px 8px;
  border-radius: var(--r-sm);
  background: var(--tooltip-bg);
  color: var(--tooltip-ink);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  z-index: 1000;
  visibility: hidden;
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
}
.navitem--icon .nav-tooltip::after {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent var(--tooltip-bg) transparent;
}
.navitem--icon:hover .nav-tooltip,
.navitem--icon:focus-within .nav-tooltip {
  visibility: visible;
  opacity: 1;
}

/* Accessibility */
.nav-menu a:focus-visible { outline: 2px solid #80b3ff; outline-offset: 2px; }

/* ========== Mobile Drawer (768px) ========== */
.nav-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  color: #fff;
  width: 44px;
  height: 44px;
  margin-left: auto;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle svg { width: 26px; height: 26px; display: block; }

/* Drawer behavior */
@media (max-width: 768px) {
  .topnav-shell { height: auto; padding: 6px 10px; flex-wrap: nowrap; }
  .logo { padding-right: 12px; }
  :root { --logo-max-h: 42px; }

  .nav-toggle { display: flex; }
  .nav-menu { width: auto; }

  .nav-list,
  .nav-menu > ul {
    position: absolute;
    left: 0; right: 0;
    top: var(--nav-h);
    display: block;
    height: auto;
    background: var(--dd-bg);
    border-bottom: 1px solid var(--dd-border);
    box-shadow: var(--dd-shadow);
    max-height: 0;
    overflow: hidden;
    transition: max-height .2s ease;
  }

  .nav-menu.is-open .nav-list,
  .nav-menu.is-open > ul {
    max-height: 80vh;
    overflow: auto;
  }

  .nav-list > li,
  .nav-menu > ul > li { display: block; }
  .nav-list > li > a,
  .nav-menu > ul > li > a {
    color: var(--nav-bg);
    padding: 12px 16px;
    display: block;
    font-size: 14px;
  }

  .nav-list li ul,
  .nav-menu li ul {
    position: static;
    display: none;
    border: 0;
    box-shadow: none;
    background: transparent;
    padding-left: 10px;
  }
  .nav-list li:hover > ul,
  .nav-menu li:hover > ul { display: none; }
  .nav-list li.open > ul,
  .nav-menu li.open > ul { display: block; }
}

/* Smallest tweak */
@media (max-width: 480px) {
  .nav-list > li > a,
  .nav-menu > ul > li > a { padding: 12px; }
}

/* ======================
 * 6) Bars / Notices
 * ====================== */
.subscription-bar-eval{
  background: var(--warn); color: #000;
  text-align: center; padding: 6px 0; font-size: 12px;
  border-bottom: 1px solid var(--divider);
}
.subscription-bar-internal{
  background: var(--info-bg); color: #000;
  text-align: center; padding: 6px 0; font-size: 14px;
  font-size: 14px; color: var(--ink);
  border-bottom: 1px solid var(--divider);
}
.impersonate-bar{
  background-color: var(--impersonate-bar);
  color: var(--ink-invert);
  text-align: center;
  padding: 6px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--divider);
}
.platform-tools-bar{
  background: var(--warn); color: #000;
  text-align: center; padding: 6px 0; font-size: 14px;
  border-bottom: 1px solid var(--divider);
}
.session-left{ flex: 1; text-align: left; }
.session-center{ flex: 1; text-align: center; }
.session-right{ flex: 1; text-align: right; }

.toast.error{ color: var(--error); padding: 8px 12px; }
.toast.success{ color: var(--ok); padding: 8px 12px; }

/* ===============
 * 7) Buttons
 * =============== */
 .btn {
  display: inline-block;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-weight: 500;
  cursor: pointer;
}
.btn:hover {
  background: var(--btn-bg-hover);
}
.btn.secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--divider-dk);
  font-weight: 500;
  font-size: 14px;
  padding: 8px 16px;
  margin: 0;
  width: auto;
  min-width: 80px;
}
.btn.secondary:hover {
  background: var(--surface-muted);
}

/* Full-width secondary buttons for specific contexts */
.btn.secondary.full-width {
  width: 100%;
  margin-top: 12px;
}

/* Login page secondary button variant */
.btn.secondary.login-secondary {
  background: white;
  color: #374151;
  border: 1px solid #d1d5db;
  font-weight: 400;
  font-size: 14px;
  padding: 8px 16px;
  margin: 8px 0 0 0;
  width: 100%;
  min-width: auto;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.btn.secondary.login-secondary:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  color: #111827;
}
.btn.chart {
  background: var(--surface);
  color: var(--btn-outline);
  font-weight: 500;
  border-color: var(--border);
  height:30px;
}
.btn.danger {
  background: var(--error);
  color: var(--ink-invert);
}
.btn.debug {
  background: var(--surface);
  border-color: var(--border);
  color: var(--btn-outline);
  padding: 3px 10px;
  line-height: 1.5;
  text-decoration: none;
  cursor: pointer;
}


/* =============
 * 8) Forms
 * ============= */
.form-row{
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 10px 16px;
  align-items: center;
  margin-bottom: 10px;
}
@media (max-width: 767.98px){
  .form-row{ grid-template-columns: 1fr; }
}
.form-label{ font-weight: 600; color: #334155; font-size: 14px; }

.input-wrapper{ display: inline-flex; align-items: stretch; position: relative; max-width: 460px; width: 100%; }

.form-input{
  padding: 10px 12px;
  font-size: 14px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  outline: none;
  background: var(--surface);
}

.form-select{
  padding: 10px 12px;
  font-size: 14px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  outline: none;
  background: var(--surface);
  appearance: auto;
}
.form-input:focus,
.form-select:focus{ box-shadow: var(--focus-ring); border-color: var(--brand-accent-2); }
.form-input[readonly]{ background: var(--surface-muted); }

.info-icon{
  display: flex; align-items: center; justify-content: center;
  padding: 0 12px; border: 1px solid var(--border); border-left: none;
  border-radius: 0 var(--r-sm) var(--r-sm) 0; background: #f5f5f5;
  cursor: pointer;
}
.info-icon::before{
  content: "i"; display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%; border: 1px solid #444;
  font-size: 13px; font-weight: 600; color: #222; line-height: 1; text-align: center;
}
.tooltip{
  visibility: hidden; opacity: 0; position: absolute; left: 100%; margin-left: 8px;
  padding: 10px; width: 260px; border-radius: var(--r-sm); font-size: 13px; line-height: 1.4;
  transition: opacity .2s; z-index: 10; background: #eef6ff; border: 1px solid #b6d4fe; color: #0a3d62;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.info-icon:hover + .tooltip{ visibility: visible; opacity: 1; }

.form-actions{
  margin-top: 18px;
  display: flex; gap: 10px; justify-content: flex-end;
}

/* Toggle */
.dd-switch {
  --h: 20px;
  --w: 40px;
  position: relative;
  width: var(--w);
  height: var(--h);
  display: inline-block;
  cursor: pointer;
}
.dd-switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2; /* sits above for clicks */
}
.dd-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(var(--h) - 6px);
  height: calc(var(--h) - 6px);
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-1);
  transition: left 0.18s ease;
  z-index: 3;
}
.dd-switch input:checked + .dd-knob {
  left: calc(var(--w) - var(--h) + 4px);
}
.dd-switch input:checked ~ .dd-switch-bg {
  background: #22c55e; /* success green */
}
.dd-switch-bg {
  position: absolute;
  inset: 0;
  border-radius: var(--h);
  background: #d1d5db; /* default gray */
  border: 1px solid var(--divider);
  transition: background-color 0.2s ease;
  z-index: 1;
}

/* ==============================
 * 9) Tables / Grid.js polish
 * ============================== */
.tbl{ width: 100%; border-collapse: collapse; }
.tbl th, .tbl td{ border: 1px solid var(--border); padding: 8px; text-align: left; }
.tbl th{ background: var(--brand-accent); color: var(--ink-invert); }

.gridjs-search{ margin-bottom: 10px !important; }
.gridjs-search input[type="search"]{
  border: 1px solid var(--divider) !important;
  border-radius: 8px !important;
  padding: 8px 10px !important;
  box-shadow: inset 0 1px 0 rgba(0,0,0,.02);
}
.gridjs-table{ border: 1px solid var(--divider); }
thead .gridjs-th{
  position: sticky; top: 0; z-index: 2;
  background: linear-gradient(#ffffff, #f9fbff);
  color: var(--ink);
  border-bottom: 1px solid var(--divider);
  text-transform: uppercase;
  font-size: 12px; letter-spacing: .4px;
}
.gridjs-tr{ border-bottom: 1px solid var(--divider); }
.gridjs-tbody .gridjs-td{ background: var(--surface); }
.gridjs-pagination{ margin-top: 12px !important; }

/* =========================
 * 10) Banners / Alerts
 * ========================= */
.top-banner{
  position: fixed;
  top: 0;                     /* at very top of viewport */
  left: 0;                   /* full width - covers navigation on desktop */
  right: 0;
  z-index: 1200;
  padding: 6px 0;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
  /* Remove the initial transform that hides the banner */
  transition: transform 0.3s ease; /* Smooth slide animation */
  background: #fff;            /* ensure contrast */
  border-bottom: 1px solid #e4e8f0;
}
.top-banner.success{ background: var(--ok); color: var(--ink-invert); border-bottom: 1px solid var(--ok-bg); }
.top-banner.error{   background: var(--error); color: var(--ink-invert); border-bottom: 1px solid var(--error-bg); }

.alert{ 
  margin-bottom: 16px; 
  padding: 16px 20px; 
  border-radius: 12px; 
  font-size: 14px; 
  line-height: 1.5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.alert.error{ 
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%); 
  color: #991b1b; 
  border: 1px solid #fca5a5; 
  position: relative;
}
.alert.error::before {
  content: "";
  position: absolute;
  top: 16px;
  left: 20px;
  font-size: 18px;
  font-weight: bold;
}
.alert.error strong {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 600;
}
.alert.error a {
  color: #dc2626;
  font-weight: 500;
  text-decoration: underline;
}
.alert.error a:hover {
  color: #991b1b;
}
.alert.success{ background: var(--ok-bg); color: var(--ok); border: 1px solid var(--ok); }

/* ===============
 * 11) Footer
 * =============== */
.footer{
  margin-top: 40px;
  font-size: 12px;
  color: #666666;
  text-align: center;
}
.footer a{ color: var(--brand-accent-2); text-decoration: underline; }

/* ====================
 * 12) Small helpers
 * ==================== */
.subtle{ color: var(--ink-muted); font-size: 13px; }
.hidden{ display: none !important; }
.icon-text{ display: inline-flex; align-items: center; gap: 6px; }

/* ==========================
 * 13) Login (kept minimal)
 * ========================== */
.login-hero{
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: linear-gradient(180deg, var(--cLight) 0%, var(--cMid) 60%, var(--cDark) 100%);
}

.login-wrapper{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 520px;
}

.login-box{
  background: var(--surface);
  color: var(--ink);
  padding: 32px 24px;
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-2);
  width: 100%;
  max-width: 460px;
  text-align: center;
}

.login-box .logo{
  display: block;
  margin: 0 auto 12px auto;
  width: 100%;
  max-width: 260px;
  height: auto;
}

.login-box input[type="text"],
.login-box input[type="password"]{
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  font-size: 16px;
  line-height: 1.2;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  outline: none;
}
.login-box input[type="text"]:focus,
.login-box input[type="password"]:focus{
  border-color: var(--brand-accent-2);
  box-shadow: var(--focus-ring);
}

.login-box input[type="submit"]{
  width: 100%;
  padding: 12px;
  margin-top: 12px;
  background: linear-gradient(135deg, var(--btn-bg) 0%, #0d9488 100%);
  color: var(--btn-ink);
  border: 1px solid var(--divider);
  border-radius: var(--r-sm);
  font-weight: 500;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(15, 118, 110, 0.2);
}
.login-box input[type="submit"]:hover{ 
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.3);
}
.login-box input[type="submit"]:active{
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(15, 118, 110, 0.2);
}

/* Signup invitation styling */
.signup-invitation {
  margin-top: 32px;
  margin-bottom: 24px;
}

.signup-invitation p {
  color: var(--ink);
  margin: 0;
  line-height: 1.5;
}

.signup-invitation a {
  color: var(--brand-bg);
  text-decoration: underline;
  transition: color 0.2s ease;
}

.signup-invitation a:hover {
  color: var(--brand-accent);
  text-decoration: underline;
}

.notice{
  font-size: 14px;
  color: var(--ink);
  background: var(--surface-muted);
  border: 1px solid var(--divider);
  border-radius: var(--r-md);
  padding: 16px;              /* fixed from 16-px */
  margin-bottom: 20px;
  width: 100%;
  max-width: 460px;
  text-align: center;
}

.login-wrapper .footer{
  margin-top: 10px;
  font-size: 14px;
  color: var(--surface);
  text-align: center;
}
.login-wrapper .footer a{ color: #93c5fd; }

/* One breakpoint polish */
@media (min-width: 768px){
  .login-hero{ padding: 48px 24px; }
  .login-wrapper{ max-width: 560px; }
  .login-box{ padding: 40px 36px; }
  .login-box .logo{ max-width: 360px; }
}

/* =====================
 * 14) RSS Column
 * ===================== */
.rss-col {
  flex: 0 0 300px;
  max-width: 320px;
}
.rss-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 8px 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--brand-bg);
  color: var(--ink-invert);
}
.rss-head .badge {
  background: var(--info-bg);
  border:1px solid var(--ink);
  color: var(--ink);
  padding: 2px 8px;
  border-radius: 4px;
}
.rss-list{
  list-style:none; margin:12px 0 0 0; padding:0;
}

/* ===========================
 * 15) Zero Trust Eval CTA
 * =========================== */
.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  background: var(--ok-bg);
  border: 1px solid var(--ok-bg);
}
.cta a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ok);
  color: var(--ink-invert);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
}

/* =========================================================
 * 16) APPLIANCE INFO, CPU & GEO (scoped to detail pages)
 * ========================================================= */

/* --- Scoped fixes for "Your Appliance" layout --- */
.appliance-media{
  display:flex; align-items:flex-start; gap:24px; flex-wrap:wrap;
}

.appliance-figure{ margin:0; text-align:center; }
.app-img{
  display:block; height:auto; max-width:200px;
  border-radius:12px; box-shadow: var(--shadow-2, 0 1px 3px rgba(0,0,0,.08));
  border:1px solid var(--border, #E5E7EB); background:#fff;
}
.app-caption{
  margin-top:8px; font-weight:600; color: var(--ink, #0F172A);
}

/* two-column definition list; collapses nicely on small screens */
.kv-grid{
  display:grid; grid-template-columns: 160px 1fr;
  column-gap:20px; row-gap:10px; margin:0; align-content:start;
}
.kv-grid dt{
  margin:0; color: var(--muted-ink, #6B7280); font-weight:600;
}
.kv-grid dd{ margin:0; color: var(--ink, #0F172A); }

@media (max-width: 640px){
  .kv-grid{ grid-template-columns: 1fr; }
}

/* Grid shells */
.grid{ display:grid; gap: var(--space-4); }
.two-col{ grid-template-columns: 1fr; }
@media (min-width: 768px){
  .two-col{ grid-template-columns: 1fr 1fr; align-items: stretch; }
}

/* Make cards naturally equal height inside .grid */
.grid > .card{ height: 100%; display: flex; flex-direction: column; }

/* Media layout (image + content) */
.media{
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-3);
  align-items: start;
}
@media (max-width: 480px){
  .media{ grid-template-columns: 1fr; }
}

/* Appliance image (override variant) */
.app-img{
  display: block;
  width: clamp(96px, 22vw, 140px);
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-1);
}

/* Definition-list key/value (no extra classes in markup) */
.kv{
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 6px 10px;
  align-items: start;
  margin: 0;
}
.kv dt{
  color: var(--ink-muted);
  font-weight: 600;
}
.kv dd{
  margin: 0;
  font-weight: 600;
  color: var(--ink);
}
@media (max-width: 480px){
  .kv{ grid-template-columns: 1fr; }
}

/* CPU chart area */
.card-fill{ flex: 1; display: flex; flex-direction: column; }
.cpu-chart{ width: 100%; height: 210px; }
.cpu-note{ margin-top: 8px; font-size: 13px; color: #6b7280; text-align: center; }

/* Geo bits */
.geo-flag{
  width: 24px; height: 24px;
  vertical-align: middle; margin-left: 6px; border: 0;
}
.map{
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 100%; max-width: 420px; height: auto;
}

/* =======================================================================
 * 17) Device pages  Filter & Config (cards + collapsible + form grids)
 * ======================================================================= */
.controls-row{
  display:grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
}
@media (min-width: 900px){
  .controls-row{ grid-template-columns: 1fr 1fr; }
}
.controls-spacer{ height: var(--space-4); }

.card--tight{ padding: var(--space-3); }
.card--tight .card__body{ padding-top: var(--space-3); }

.card--no-margin{ margin-bottom: 0; }

/* =========================================================
 * Layout Patterns - Reusable CSS Classes
 * ========================================================= */

/* Two-column layout patterns */
.layout-two-column {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.layout-two-column--2-1 {
  /* 2/3 left, 1/3 right - specific styling handled by child classes */
}

.layout-two-column--2-1 .layout-column--left {
  flex: 2;
  min-width: 300px;
}

.layout-two-column--2-1 .layout-column--right {
  flex: 1;
  min-width: 250px;
}

/* Grid tables without card styling */
.grid-table--no-card {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.grid-table--no-card .gridjs-wrapper {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.grid-table--no-card .gridjs-container {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.grid-table--no-card .gridjs-table {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

/* Responsive behavior for two-column layouts */
@media (max-width: 768px) {
  .layout-two-column {
    flex-direction: column !important;
    gap: 15px !important;
  }
  
  .layout-two-column .layout-column--left,
  .layout-two-column .layout-column--right {
    flex: none !important;
    min-width: auto !important;
    width: 100% !important;
  }
}

.collapsible .card__head{
  all: unset;
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;
  cursor:pointer;
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--divider);
}
.card__title{
  display:flex; align-items:center; gap:10px;
  font-weight:700; color: var(--brand-accent);
  font-size: 18px; line-height:1.2;
}
.card__icon{ display:block; }

.collapsible .chev{ transition: transform .18s ease; }
.collapsible .card__head[aria-expanded="true"] .chev{ transform: rotate(180deg); }
.collapsible .card__body[hidden]{ display:none !important; }

.form-grid{
  display:grid;
  gap: var(--space-3);
  grid-template-columns: 1fr 1fr auto;
  align-items:end;
}
@media (max-width: 800px){
  .form-grid{ grid-template-columns: 1fr; }
}

.form-grid--config{
  grid-template-columns: 1fr 1fr auto;
}
@media (max-width: 800px){
  .form-grid--config{ grid-template-columns: 1fr; }
}

.field{ display:flex; flex-direction:column; gap:6px; }
.form-label--sm{ font-size:13px; color: var(--ink-muted); }

.actions{ display:flex; gap:10px; }
.actions--end{ justify-content:flex-end; }

.chip-row{ margin-top: 8px; display:flex; flex-wrap:wrap; gap:8px; }

.switch{ display:flex; align-items:center; gap:10px; font-size:14px; color: var(--ink); }
.switch input{ width:18px; height:18px; }

.select-wrap{ position:relative; }
.select-wrap .form-select{
  padding-right: 28px;
  -webkit-appearance: none; appearance: none;
  background-color: var(--surface);
}
.select-wrap::after{
  content:"";
  position:absolute; right:10px; top:50%; transform: translateY(-50%);
  width: 14px; height: 14px; pointer-events:none;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24"><path fill="%2364758b" d="M7 10l5 5 5-5z"/></svg>') no-repeat center / 14px 14px;
}

.form-grid .form-select,
.form-grid .btn{ height: 36px; }

.card--tight .form-grid,
.card--tight .chip-row{ font-size:14px; }

/* -----------------------------------------------------------------
 * 17A) Generic Filter Card (dd-controls) used across multiple pages
 * ----------------------------------------------------------------- */
.dd-controls {
  display: grid;
  gap: var(--space-4);
}
@media (min-width: 768px) {
  .dd-controls {
    grid-template-columns: 1fr;
  }
}

.dd-collapsible > .dd-head{
  display:flex; align-items:center; gap:10px;
  padding: 0 14px 10px; border-bottom:1px solid var(--divider);
  cursor:pointer; user-select:none;
}
.dd-title{ font-weight:700; font-size:18px; color: var(--ink); }
.dd-head svg{ width:18px; height:18px; display:block; color: var(--brand-accent); }
.dd-caret{ margin-left:auto; transition: transform .2s ease; }
.dd-collapsible[aria-expanded="false"] .dd-caret{ transform: rotate(-90deg); }
.dd-body{ padding: 14px; }
.dd-row{ display:grid; grid-template-columns: 220px 1fr auto; align-items:center; gap:12px; margin: 12px 0; }
@media (max-width: 720px){
  .dd-row{ grid-template-columns: 1fr; }
  .dd-right { justify-self: start; }
}
.dd-select{ position: relative; max-width: 560px; }
.dd-select select{
  width:100%; padding:10px 36px 10px 12px; font-size:14px;
  border:1px solid var(--border); border-radius: var(--r-sm); background: var(--surface);
  appearance: none; outline: none;
}
.dd-select svg{ position:absolute; right:10px; top:50%; transform: translateY(-50%); width:16px; height:16px; color:#6b7280; pointer-events:none; }
.dd-chips{ display:flex; flex-wrap:wrap; gap:8px; margin-top: 6px; }
.dd-chip{ background:#eff6ff; border:1px solid #c7ddff; color:#0a3d62; padding:4px 8px; border-radius:999px; font-size:12px; }
.dd-chip button{ border:0; background:transparent; margin-left:6px; cursor:pointer; }

/* ===============================
 * 18) Dashboard headings / misc
 * =============================== */
.dashboard-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin: 12px 0 10px; }
.dashboard-title { font-size:22px; font-weight:700; color: var(--ink); }
.trend-card { padding:0; }
.trend-body { padding: var(--space-3); }

/* ==========================================
 * 19) Sprite icons & link styling (reusable)
 * ========================================== */
.svg-ico {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
  fill: currentColor;
  stroke: currentColor;
  flex-shrink: 0;
}

.svg-ico.size-14 { width: 14px; height: 14px; }
.svg-ico.size-16 { width: 16px; height: 16px; }
.svg-ico.size-18 { width: 18px; height: 18px; }
.svg-ico.size-20 { width: 20px; height: 20px; }
.svg-ico.size-22 { width: 22px; height: 22px; }
.svg-ico.size-24 { width: 24px; height: 24px; }
.svg-ico.size-26 { width: 26px; height: 26px; }

/* Action link: center icon + text and underline */
a.link-edit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

a.link-edit .svg-ico { display: block; }


/* Status badges */
.badge-enabled {
  background: var(--ok-bg);
  color: var(--ok);
  border: 1px solid var(--ok);
  padding: 4px 8px;
  border-radius: 4px;
}
.badge-disabled {
  background: var(--xinfo-bg);
  color: var(--xinfo);
  border: 1px solid var(--xinfo);
  padding: 4px 8px;
  border-radius: 4px;
}


/* DHCP Lease Status badges */
.badge-bound {
  background: var(--ok-bg);
  color: var(--ok);
  border: 1px solid var(--ok);
  padding: 4px 8px;
  border-radius: 4px;
}
.badge-conflict {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid var(--error);
  padding: 4px 8px;
  border-radius: 4px;
}
.badge-offered {
  background: var(--info-bg);
  color: var(--info);
  border: 1px solid var(--info);
  padding: 4px 8px;
  border-radius: 4px;
}
.badge-waiting {
  color: var(--ink);
  padding: 4px 8px;
  border-radius: 4px;
}

/* =========================================================
 * 20) DHCP Server Manage (scoped page components)
 * ========================================================= */

/* Header (simple, no cards) */
.hdr-row{ display:flex; gap:34px; align-items:flex-end; flex-wrap:wrap; margin-bottom:8px; }
.hdr-block{ min-width:240px; }
.hdr-eyebrow{ font-size:12px; letter-spacing:.06em; text-transform:uppercase; color:#6b7280; }
.hdr-label{ font-size:22px; font-weight:600; color:#0f172a; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* Tools bar */
.tools-bar{ display:flex; justify-content:flex-end; margin:8px 0 12px; }
.tools-bar .actions{ display:flex; align-items:center; gap:16px; color:#374151; }
.tools-bar .actions .updated strong{ color:#111827; }
.tools-bar .actions a{ display:inline-flex; align-items:center; gap:6px; text-decoration:underline; }

/* KPI tiles (left accent strip with icon) */
.kpi-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin:8px 0 18px; }

.kpi-card{
  position:relative;
  display:flex;
  align-items:center;
  gap:10px;
  border:1px solid var(--bd);
  border-radius:10px;
  background:#ffffff;
  padding:10px 12px 10px 98px; /* room for strip + icon */
}
.kpi-card::before{
  content:"";
  position:absolute; left:0; top:0; bottom:0;
  width:80px;
  background:var(--kpi-accent);
  border-top-left-radius:10px;
  border-bottom-left-radius:10px;
}
.kpi-total{ --kpi-accent:linear-gradient(90deg,#0E4475 0%,#3E6991 100%); }
.kpi-used { --kpi-accent:linear-gradient(90deg,#E38B42 0%,#E9A268 100%); }
.kpi-free { --kpi-accent:linear-gradient(90deg,#6BAF73 0%,#89BF8F 100%); }

.kpi-ico{
  position:absolute; left:0; top:0; bottom:0;
  width:80px; display:grid; place-items:center;
  color:#ffffff; pointer-events:none;
}
.kpi-ico svg{ width:34px; height:34px; display:block; opacity:.95; }

.kpi-body{ display:grid; gap:2px; }
.kpi-body .label{ color:#6b7280; font-weight:600; }
.kpi-body .val{ font-size:30px; font-weight:600; }

/* Cards & layout shell */
.detail-card{
  border:1px solid var(--bd);
  border-radius:10px;
  background:#ffffff;
  box-shadow:0 1px 3px rgba(0,0,0,.04);
  margin-bottom:16px;
}
.detail-card-head{
  padding:10px 14px;
  font-weight:600;
  border-bottom:1px solid var(--bd);
  background:#f0f4f8;
  display:flex; align-items:center; justify-content:space-between; gap:10px;
}
.detail-card-body{ padding:12px 14px; }

.main-grid{ display:grid; grid-template-columns:1.2fr .8fr; gap:16px; }
@media (max-width:1100px){ .main-grid{ grid-template-columns:1fr; } }

/* Filterable dropdowns */
.fd{ position:relative; width:100%; }
.fd-toggle{
  width:100%; text-align:left; cursor:pointer;
  padding:10px 36px 10px 12px; font-size:14px;
  border:1px solid var(--bd); border-radius:8px; background:#fff;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.fd-toggle .caret{
  position:absolute; right:12px; top:50%; transform:translateY(-50%);
  width:16px; height:16px; color:#6b7280;
}
.fd-menu{
  position:absolute; z-index:20; left:0; right:0;
  background:#fff; border:1px solid var(--bd); border-radius:8px;
  margin-top:4px; padding:8px; display:none; max-height:260px; overflow:auto;
  box-shadow:0 10px 24px rgba(15,23,42,.08);
}
.fd-menu.open{ display:block; }
.fd-search{ width:100%; margin-bottom:8px; }
.fd-list{ list-style:none; padding:0; margin:0; }
.fd-list li{ padding:8px; cursor:pointer; border-radius:6px; }
.fd-list li:hover{ background:#f3f6ff; }

/* Ranges builder */
.ranges-wrap{ margin-top:6px; }
.ranges-input{ display:flex; gap:8px; align-items:center; }
.ranges-input .form-input{ flex:1; }
.ranges-list{ margin-top:8px; border:1px solid var(--bd); border-radius:8px; }
.ranges-row{
  display:flex; align-items:center; justify-content:space-between;
  padding:8px 10px; border-top:1px solid var(--bd);
}
.ranges-row:first-child{ border-top:0; }
.ranges-row code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  background:#f8fafc; padding:2px 6px; border-radius:6px;
}
.ranges-row button{ border:0; background:transparent; color:#b91c1c; cursor:pointer; }

/* Charts */
.gauge{ height:260px; }
.gauge-meta{ text-align:center; margin-top:6px; color:#6b7280; font-weight:600; }

/* Log streaming */
.log-card .detail-card-head{ padding:10px 14px; }
.status-chip{
  display:inline-flex; align-items:center; gap:8px;
  background:#f0f4f8; color:#111827;
  padding:4px 8px; border-radius:999px; font-weight:600;
  border:1px solid #C0C3C6;
}
.status-dot{ width:10px; height:10px; border-radius:999px; background:#9ca3af; box-shadow:0 0 0 2px #fff inset; }
.status-running{ background:#22c55e; }
.log-controls{ display:flex; align-items:center; gap:8px; }
.log-btn{ background:#fff; border:1px solid var(--bd); padding:6px 12px; border-radius:8px; cursor:pointer; }
.log-btn:hover{ background:#f9fafb; }
.log-wrap{ display:none; }
.log-wrap.open{ display:block; }
.log-io{ display:flex; flex-direction:column; gap:10px; }
.log-output{
  color:var(--log-out); background:var(--log-out-bg); border:1px solid var(--log-out-bd);
  border-radius:8px; padding:10px 12px; font:14px/1.3 ui-monospace, Menlo, Consolas, monospace;
  max-height:360px; overflow:auto; white-space:pre-wrap;
}
.log-footnote{ color:#6b7280; font-size:12px; margin-top:6px; }

/* =========================================================
 * DHCP Servers Filter Controls (matches devices.php layout)
 * ========================================================= */

/* Controls bar (matches devices.php layout) */
.controls-bar{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin:12px 0; }
.controls-bar .label{ font-weight:600; color: var(--ink-muted); font-size:14px; }
.controls-bar .dd-select{ max-width:160px; }
.controls-bar .dd-select select{ min-width:120px; }

/* Filter controls (left side) */
.filter-controls{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; }

/* Table controls (right side) */
.table-controls{ display:flex; align-items:center; gap:12px; }

/* Filter chips */
.filter-chips{ display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
.filter-chip{ 
  background:#eff6ff; 
  border:1px solid #c7ddff; 
  color:#0a3d62; 
  padding:4px 8px; 
  border-radius:999px; 
  font-size:12px; 
  display:flex; 
  align-items:center; 
  gap:6px; 
}
.filter-chip button{ 
  border:0; 
  background:transparent; 
  cursor:pointer; 
  color:#0a3d62; 
  font-weight:bold; 
  padding:0; 
  width:16px; 
  height:16px; 
  display:flex; 
  align-items:center; 
  justify-content:center; 
}
.filter-chip button:hover{ color:#dc2626; }

.pool-lines { white-space: pre-line; line-height: 1.35; }

/* =========================================================
 * Registration Page Styles
 * ========================================================= */

/* Registration page specific body styles */
body.registration-page {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f8fafc;
}

.registration-container {
  display: flex;
  min-height: 100vh;
}

.form-section {
  flex: 1;
  background: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px;
  position: relative;
}

.brand-section {
  flex: 0 0 40%;
  background: linear-gradient(180deg, var(--cLight) 0%, var(--cMid) 60%, var(--cDark) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px;
  color: white;
}

.register-logo {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.register-logo img {
  width: 250px !important;
  height: auto !important;
  max-height: 60px !important;
  object-fit: contain !important;
}

.form-content {
  max-width: 400px;
  width: 100%;
}

.form-title {
  font-size: 32px;
  font-weight: 700;
  color: #111827;
  text-align: center;
  margin-bottom: 30px;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.form-subtitle {
  font-size: 18px;
  font-weight: 500;
  color: #000000;
  text-align: center;
  margin-bottom: 32px;
  line-height: 1.4;
  white-space: nowrap;
  display: block;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  max-width: none;
}

.form-group {
  margin-bottom: 6px !important;
}

.registration-page .form-content {
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  border: none;
}

/* Registration page specific form input styles */
.registration-page .form-input {
  width: 100%;
  max-width: 400px;
  padding: 14px 16px;
  border: 2px solid #e5e7eb;
  border-radius: var(--r-sm);
  font-size: 16px;
  font-weight: 400;
  transition: all 0.2s ease;
  box-sizing: border-box;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.registration-page .form-input:focus {
  outline: none;
  border-color: var(--brand-bg);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.1), 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.registration-page .form-input:hover:not(:focus) {
  border-color: #d1d5db;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.registration-page .form-input.error {
  border-color: var(--error);
}

.error-message {
  color: var(--error);
  font-size: 14px;
  margin-top: 4px;
}

/* Registration page specific button styles */
.registration-page .btn {
  width: 100%;
  max-width: 400px;
  padding: 14px 16px;
  margin-top: 0px;
  background: linear-gradient(135deg, var(--btn-bg) 0%, #0d9488 100%);
  color: var(--btn-ink);
  border: 0;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(15, 118, 110, 0.2);
  position: relative;
  overflow: hidden;
}

.registration-page .btn:hover {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.3);
}

.registration-page .btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(15, 118, 110, 0.2);
}

/* Registration page login link styling */
.registration-page .login-link {
  text-align: center;
  margin-top: 24px;
  font-size: 15px;
  color: #6b7280;
}

.registration-page .login-link a {
  color: var(--brand-bg);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.registration-page .login-link a:hover {
  color: #0d9488;
  text-decoration: underline;
}

.registration-page .btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.registration-page .btn-discount {
  background: var(--surface) !important;
  color: var(--ink) !important;
  border: 1px solid var(--divider-dk) !important;
  font-weight: 500 !important;
  transform: none !important;
  box-shadow: none !important;
  padding: 14px 16px !important; /* Match form-input padding */
  height: auto !important; /* Allow natural height based on padding */
}

.registration-page .btn-discount:hover {
  background: var(--surface-muted) !important;
  transform: none !important;
  box-shadow: none !important;
}

.login-link {
  text-align: center;
  margin-top: 24px;
  color: #6b7280;
}

.login-link a {
  text-decoration: underline;
  font-weight: 600;
}

.login-link a:hover {
  color: var(--brand-accent);
}

.brand-title {
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
}

.brand-logos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 50px 45px;
  max-width: 700px;
  margin: 0 auto;
}

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
}

.brand-logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.7;
}


@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
  .registration-container {
    flex-direction: column;
  }
  
  .brand-section {
    flex: 0 0 auto;
    min-height: 200px;
  }
  
  .brand-logos {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  .register-logo {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    margin-bottom: 20px !important;
    justify-content: center !important;
  }
  
  .register-logo img {
    width: 150px !important;
    max-height: 50px !important;
  }
  
  .form-content {
    margin-top: 0;
  }
}

@media (max-width: 480px) {
  .register-logo img {
    width: 120px !important;
    max-height: 40px !important;
  }
}

/* ==========================================
 * JSON Editor Styles
 * ========================================== */
.json-editor-container {
  width: 100%;
  height: calc(90vh - 180px);
  display: flex;
  flex-direction: column;
}

.json-editor-main {
  display: flex;
  flex: 1;
  min-height: 0;
  border-radius: 8px;
  overflow: hidden;
  gap: 1px;
}

.json-editor-panel-header {
  padding: 8px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-weight: 500;
  color: var(--ink-muted);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
}

.json-editor-panel-content {
  flex: 1;
  min-height: 0;
  position: relative;
}

/* Ensure JSONEditor takes full height */
.json-editor-panel-content > div {
  height: 100% !important;
}

/* JSONEditor specific styling */
.jsoneditor {
  height: 100% !important;
  border: none !important;
}

.jsoneditor-outer {
  height: 100% !important;
}

.jsoneditor-menu {
  border-bottom: 1px solid var(--border) !important;
}

.jsoneditor-content {
  height: calc(100% - 40px) !important;
}

.json-editor-divider {
  width: 1px;
  background: var(--border);
  flex-shrink: 0;
}

.json-editor-status {
  padding: 8px 16px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 8px;
}

.json-editor-status.error {
  background: #f8d7da;
  color: #721c24;
  border-color: #f5c6cb;
}

.json-editor-status.success {
  background: #d4edda;
  color: #155724;
  border-color: #c3e6cb;
}

.json-editor-status.warning {
  background: #fff3cd;
  color: #856404;
  border-color: #ffeaa7;
}

/* JSON Editor Responsive design */
@media (max-width: 768px) {
  .json-editor-main {
    flex-direction: column;
  }
  
  .json-editor-divider {
    width: 100%;
    height: 1px;
  }
}

/* ==========================================
 * CAPTCHA & VERIFICATION STYLES
 * ========================================== */

/* CAPTCHA Container */
.captcha-container {
  margin: 20px 0;
  padding: 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  text-align: center;
}

/* CAPTCHA Input Field */
.captcha-input {
  width: 200px;
  margin: 8px 0;
}

/* Loading States */
.loading {
  display: none;
  text-align: center;
  margin: 16px 0;
}

/* Spinner Animation */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid var(--brand-accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
