/* Guardian SSO – Main Stylesheet */
:root{--navy:#1a2b5c;--blue:#1e3a8a;--accent:#2563eb;--light:#e8f0fe;--muted:#64748b;--border:#e2e8f0;--success:#16a34a;--warning:#d97706;--danger:#dc2626;--bg:#f1f5f9;--sidebar:230px;--topbar:58px}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
body{font-family:'Segoe UI',system-ui,-apple-system,sans-serif;color:#1e293b}
a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}
.auth-body{background:linear-gradient(135deg,#f0f4ff 0%,#e8f0fe 100%);min-height:100vh;display:flex;flex-direction:column}
.auth-wrapper{flex:1;display:flex;flex-direction:column}
.auth-topbar{display:flex;justify-content:space-between;align-items:center;padding:1rem 1.5rem;background:#fff;border-bottom:1px solid var(--border)}
.auth-topbar-center{text-align:center;padding:2rem 1rem 0}
.auth-brand{font-weight:700;font-size:1.05rem;color:var(--blue)}
.auth-help{width:32px;height:32px;border:1.5px solid var(--border);border-radius:50%;display:flex;align-items:center;justify-content:center;color:var(--muted);font-size:.85rem}
.auth-center{flex:1;display:flex;align-items:center;justify-content:center;padding:2rem 1rem}
.auth-card{background:#fff;border-radius:16px;padding:2.5rem;width:100%;max-width:440px;box-shadow:0 4px 24px rgba(30,58,138,.08);border:1px solid var(--border)}
.auth-shield{font-size:2.5rem;text-align:center;padding:.75rem;background:var(--light);border-radius:14px;width:fit-content;margin:0 auto 1.25rem}
.auth-title{font-size:1.6rem;font-weight:700;color:#0f172a;margin-bottom:.25rem}
.auth-sub{color:var(--muted);font-size:.9rem;margin-bottom:1.75rem}
.auth-logo-wrap{display:flex;align-items:center;gap:.75rem;justify-content:center;margin-bottom:2rem}
.auth-logo-icon{font-size:1.75rem;background:var(--blue);color:#fff;width:48px;height:48px;border-radius:12px;display:flex;align-items:center;justify-content:center}
.auth-logo-text{font-size:1.4rem;font-weight:700;color:var(--blue)}
.auth-secure-badge{text-align:center;color:var(--muted);font-size:.8rem;margin:1rem 0}
.auth-footer{background:#fff;border-top:1px solid var(--border);padding:1rem 2rem;display:flex;justify-content:space-between;align-items:center;font-size:.75rem;color:var(--muted)}
.auth-footer-links a{color:var(--muted);margin-left:1rem}.auth-footer-links a:hover{color:var(--accent)}
.admin-body{background:var(--bg)}
.g-topbar{position:fixed;top:0;left:0;right:0;height:var(--topbar);background:#fff;border-bottom:1px solid var(--border);display:flex;align-items:center;padding:0 1.5rem;gap:1rem;z-index:100}
.g-brand{font-weight:700;font-size:1.05rem;color:var(--blue);display:flex;align-items:center;gap:.5rem;text-decoration:none}
.g-topbar-nav{display:flex;gap:.25rem;margin-left:1rem}
.g-topbar-nav a{font-size:.88rem;color:var(--muted);padding:.4rem .75rem;border-radius:6px;transition:.15s}
.g-topbar-nav a:hover{background:var(--light);color:var(--blue);text-decoration:none}
.g-topbar-search{flex:1;max-width:320px;margin-left:auto;position:relative}
.g-topbar-search input{width:100%;border:1.5px solid var(--border);border-radius:8px;padding:.4rem 1rem .4rem 2.25rem;font-size:.85rem;background:var(--bg)}
.g-search-icon{position:absolute;left:.65rem;top:50%;transform:translateY(-50%);color:var(--muted);pointer-events:none}
.g-topbar-actions{display:flex;align-items:center;gap:.5rem;margin-left:1rem}
.g-icon-btn{width:34px;height:34px;border:none;background:none;border-radius:8px;cursor:pointer;color:var(--muted);font-size:1.1rem;transition:.15s}
.g-icon-btn:hover{background:var(--light);color:var(--blue)}
.g-avatar{width:34px;height:34px;border-radius:50%;background:var(--blue);color:#fff;font-size:.75rem;font-weight:700;display:flex;align-items:center;justify-content:center;cursor:pointer}
.g-sidebar{position:fixed;top:var(--topbar);left:0;width:var(--sidebar);height:calc(100vh - var(--topbar));background:#fff;border-right:1px solid var(--border);padding:1.25rem .75rem;display:flex;flex-direction:column;z-index:90;overflow-y:auto;overflow-x:visible;transition:width .25s cubic-bezier(.4,0,.2,1)}
.g-sidebar-brand{display:flex;align-items:center;gap:.75rem;padding:.5rem .75rem 1.25rem;border-bottom:1px solid var(--border);margin-bottom:.75rem}
.g-sidebar-icon{font-size:1.4rem;background:var(--blue);color:#fff;width:36px;height:36px;border-radius:9px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.g-sidebar-title{font-weight:700;font-size:.88rem;color:#0f172a}
.g-sidebar-tier{font-size:.74rem;color:var(--muted)}
.g-sidebar-nav{display:flex;flex-direction:column;gap:.1rem;flex:1}
.g-sidebar-nav a{display:flex;align-items:center;gap:.65rem;padding:.6rem .75rem;border-radius:8px;color:var(--muted);font-size:.88rem;font-weight:500;transition:.15s}
.g-sidebar-nav a:hover{background:var(--light);color:var(--blue);text-decoration:none}
.g-sidebar-nav a.active{background:var(--light);color:var(--blue);font-weight:600}
.g-sidebar-cta{padding-top:1rem;display:flex;flex-direction:column;gap:.5rem}
.g-btn-new{background:var(--blue);color:#fff;border-radius:8px;padding:.65rem 1rem;font-size:.88rem;font-weight:600;text-align:center;transition:.2s;display:block}
.g-btn-new:hover{background:var(--navy);text-decoration:none;color:#fff}
.g-btn-logout{background:none;border:1.5px solid var(--border);border-radius:8px;padding:.55rem 1rem;font-size:.85rem;text-align:center;color:var(--muted);transition:.15s;display:block}
.g-btn-logout:hover{border-color:var(--danger);color:var(--danger);text-decoration:none}
.g-main{margin-left:var(--sidebar);margin-top:var(--topbar);padding:2rem 2.5rem;min-height:calc(100vh - var(--topbar));transition:margin-left .25s ease}
.g-footer{margin-left:var(--sidebar);background:#fff;border-top:1px solid var(--border);padding:.65rem 2.5rem;font-size:.75rem;color:var(--muted);transition:margin-left .25s ease;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:.5rem}
.g-footer a{color:var(--muted);margin-left:1rem}
.g-page-header{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:2rem}
.g-page-header h2{font-size:1.75rem;font-weight:700;color:#0f172a;margin-bottom:.2rem}
.g-page-header p{color:var(--muted);font-size:.9rem}
.g-stat-grid{display:grid;gap:1rem;margin-bottom:2rem}
.g-cols-3{grid-template-columns:repeat(3,1fr)}
.g-cols-4{grid-template-columns:repeat(4,1fr)}
.g-stat-card{background:#fff;border:1px solid var(--border);border-radius:12px;padding:1.25rem 1.5rem}
.g-stat-label{font-size:.78rem;color:var(--muted);font-weight:600;text-transform:uppercase;letter-spacing:.05em;margin-bottom:.5rem}
.g-stat-val{font-size:2rem;font-weight:700;color:#0f172a;line-height:1}
.g-stat-sub{font-size:.8rem;color:var(--muted);margin-top:.35rem}.g-stat-sub.ok{color:var(--success)}
.g-app-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem}
.g-app-card{background:#fff;border:1px solid var(--border);border-radius:12px;padding:1.5rem;transition:.2s;cursor:pointer}
.g-app-card:hover{box-shadow:0 4px 16px rgba(30,58,138,.1);border-color:#bfdbfe}
.g-app-inactive{opacity:.75}
.g-app-card-top{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:1rem}
.g-app-icon{width:44px;height:44px;border-radius:10px;background:var(--light);display:flex;align-items:center;justify-content:center;font-size:1.3rem}
.g-app-name{font-size:1rem;font-weight:700;color:#0f172a;margin-bottom:.35rem}
.g-app-desc{font-size:.83rem;color:var(--muted);line-height:1.5;margin-bottom:1rem}
.g-app-meta{border-top:1px solid var(--border);padding-top:1rem;display:grid;grid-template-columns:1fr 1fr;gap:.5rem}
.g-meta-label{font-size:.73rem;color:var(--muted);font-weight:600}
.g-meta-val{font-size:.82rem;color:#374151;font-family:monospace}
.g-app-actions{margin-top:1rem;border-top:1px solid var(--border);padding-top:.75rem}
.g-app-del-btn{background:none;border:1.5px solid #fca5a5;color:var(--danger);border-radius:6px;padding:.3rem .75rem;font-size:.82rem;cursor:pointer;transition:.15s}
.g-app-del-btn:hover{background:#fee2e2}
.g-app-add{border:2px dashed var(--border);background:none;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:200px;transition:.2s}
.g-app-add:hover{border-color:var(--accent);background:var(--light)}
.g-app-add-icon{width:44px;height:44px;border-radius:50%;background:var(--border);display:flex;align-items:center;justify-content:center;font-size:1.4rem;color:var(--muted);margin:0 auto .75rem;transition:.2s}
.g-app-add:hover .g-app-add-icon{background:var(--accent);color:#fff}
.g-app-add h3{font-size:.95rem;font-weight:600;margin-bottom:.25rem}
.g-app-add p{font-size:.8rem;color:var(--muted)}
.g-table-wrap{background:#fff;border:1px solid var(--border);border-radius:12px;overflow:hidden}
.g-table-info{padding:.6rem 1.25rem;font-size:.82rem;color:var(--muted);border-bottom:1px solid var(--border);background:var(--bg)}
.g-table{width:100%;border-collapse:collapse}
.g-table th{padding:.75rem 1rem;font-size:.78rem;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.04em;text-align:left;background:var(--bg);border-bottom:1px solid var(--border)}
.g-table td{padding:.9rem 1rem;border-bottom:1px solid var(--border);font-size:.88rem;vertical-align:middle}
.g-table tr:last-child td{border-bottom:none}
.g-table tbody tr:hover{background:#f8fafc}
.g-muted{color:var(--muted);font-size:.82rem}
.g-section-title{font-size:1rem;font-weight:700;color:#0f172a;margin-bottom:.75rem}
.g-pagination{padding:.75rem 1.25rem;background:var(--bg);border-top:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;font-size:.82rem;color:var(--muted);position:relative;z-index:1}
.g-pg-btn{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border:1px solid var(--border);background:#fff;border-radius:6px;color:#374151;cursor:pointer;margin-left:.35rem;text-decoration:none}
.g-pg-btn:hover{background:var(--light);border-color:var(--accent)}
.g-field{margin-bottom:1.1rem}
.g-label{display:block;font-weight:600;font-size:.84rem;color:#374151;margin-bottom:.35rem}
.g-label-upper{text-transform:uppercase;font-size:.75rem;letter-spacing:.05em}
.g-label-row{display:flex;justify-content:space-between;align-items:center;margin-bottom:.35rem}
.g-link-sm{font-size:.82rem;color:var(--accent)}
.g-input{width:100%;border:1.5px solid var(--border);border-radius:8px;padding:.65rem 1rem;font-size:.9rem;transition:.2s;font-family:inherit;background:#fff}
.g-input:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(37,99,235,.12);outline:none}
textarea.g-input{resize:vertical;min-height:80px}
select.g-input{cursor:pointer}
.g-input-eye{position:relative}
.g-input-eye .g-input{padding-right:2.75rem}
.g-eye-btn{position:absolute;right:.75rem;top:50%;transform:translateY(-50%);background:none;border:none;color:var(--muted);cursor:pointer;font-size:1rem}
.g-pw-bar{height:4px;border-radius:2px;background:var(--border);margin-top:.4rem;overflow:hidden}
.g-pw-bar div{height:100%;width:0;transition:width .3s;border-radius:2px}
.g-pw-hint{font-size:.78rem;color:var(--muted);margin-top:.25rem;min-height:1rem}
.g-checkbox-row{display:flex;align-items:center;gap:.5rem;font-size:.87rem;color:#374151;cursor:pointer;padding:.25rem 0}
.g-checkbox-row input{width:16px;height:16px;cursor:pointer}
.g-select{border:1.5px solid var(--border);border-radius:8px;padding:.55rem .75rem;font-size:.88rem;background:#fff;cursor:pointer}
.g-select:focus{border-color:var(--accent);outline:none}
.g-btn-primary{background:var(--blue);color:#fff;border:none;border-radius:8px;padding:.75rem 1.5rem;font-weight:600;font-size:.95rem;cursor:pointer;transition:.2s;text-decoration:none;display:inline-flex;align-items:center;gap:.4rem}
.g-btn-primary:hover{background:var(--navy);color:#fff;text-decoration:none;transform:translateY(-1px)}
.g-btn-full{width:100%;justify-content:center}
.g-btn-outline{background:#fff;border:1.5px solid var(--border);border-radius:8px;padding:.65rem 1.25rem;font-size:.88rem;font-weight:600;color:#374151;cursor:pointer;transition:.15s;display:inline-flex;align-items:center;gap:.4rem}
.g-btn-outline:hover{border-color:var(--accent);background:var(--light)}
.g-badge{font-size:.72rem;font-weight:600;padding:.25rem .65rem;border-radius:20px;display:inline-block}
.g-badge-ok{background:#dcfce7;color:#15803d}
.g-badge-warn{background:#fef9c3;color:#a16207}
.g-badge-danger{background:#fee2e2;color:#b91c1c}
.g-badge-muted{background:#f1f5f9;color:#64748b}
.g-role-badge{font-size:.72rem;font-weight:600;padding:.25rem .65rem;border-radius:6px;background:var(--light);color:var(--blue);text-transform:uppercase;letter-spacing:.03em;display:inline-block}
.g-role-superadmin{background:#f3e8ff;color:#7e22ce}
.g-role-admin{background:#dbeafe;color:#1d4ed8}
.g-role-employee{background:var(--light);color:var(--blue)}
.g-role-guest{background:#fef9c3;color:#92400e}
.g-status-dot{display:flex;align-items:center;gap:.4rem;font-size:.85rem;font-weight:500}
.g-dot-green{width:8px;height:8px;border-radius:50%;background:var(--success);display:inline-block}
.g-dot-red{width:8px;height:8px;border-radius:50%;background:var(--danger);display:inline-block}
.g-dot-gray{width:8px;height:8px;border-radius:50%;background:var(--muted);display:inline-block}
.g-dot-yellow{width:8px;height:8px;border-radius:50%;background:var(--warning);display:inline-block}
.g-alert{padding:.85rem 1.25rem;border-radius:8px;font-size:.88rem;margin-bottom:1rem}
.g-alert-success{background:#dcfce7;color:#15803d;border:1px solid #bbf7d0}
.g-alert-danger{background:#fee2e2;color:#b91c1c;border:1px solid #fca5a5}
.g-alert-warn{background:#fef9c3;color:#a16207;border:1px solid #fde68a}
.g-card{background:#fff;border:1px solid var(--border);border-radius:12px;padding:1.5rem}
.g-card-title{font-size:1.05rem;font-weight:700;color:#0f172a;margin-bottom:1rem;padding-bottom:.75rem;border-bottom:1px solid var(--border)}
.g-field-row{display:flex;align-items:center;padding:.6rem 0;border-bottom:1px solid var(--border);font-size:.88rem}
.g-field-row:last-child{border-bottom:none}
.g-field-label{width:160px;color:var(--muted);font-weight:600;font-size:.82rem;flex-shrink:0}
.g-user-cell{display:flex;align-items:center;gap:.75rem}
.g-avatar-sm{width:36px;height:36px;border-radius:50%;color:#fff;font-size:.76rem;font-weight:700;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.g-row-actions{display:flex;align-items:center;gap:.3rem}
.g-action-btn{width:30px;height:30px;border:none;background:none;border-radius:6px;cursor:pointer;font-size:.95rem;color:var(--muted);transition:.15s;display:flex;align-items:center;justify-content:center}
.g-action-btn:hover{background:var(--light);color:var(--blue)}
.g-action-danger:hover{background:#fee2e2;color:var(--danger)}
.g-filter-row{display:flex;gap:.75rem;margin-bottom:1.25rem;align-items:center}
.g-search-box{flex:1;position:relative}
.g-search-box span{position:absolute;left:.75rem;top:50%;transform:translateY(-50%);color:var(--muted);pointer-events:none}
.g-search-box input{width:100%;border:1.5px solid var(--border);border-radius:8px;padding:.55rem 1rem .55rem 2.25rem;font-size:.88rem;background:#fff}
.g-search-box input:focus{border-color:var(--accent);outline:none}
.g-modal-overlay{position:fixed;inset:0;background:rgba(15,23,42,.55);z-index:9000;display:flex;align-items:center;justify-content:center;padding:1rem}
.g-modal-box{background:#fff;border-radius:16px;padding:2rem;width:100%;max-width:480px;box-shadow:0 20px 60px rgba(0,0,0,.2);max-height:90vh;overflow-y:auto}
.g-modal-box h3{font-size:1.2rem;font-weight:700;margin-bottom:.25rem}
.g-modal-sub{color:var(--muted);font-size:.88rem;margin-bottom:1.5rem}
.g-modal-footer{display:flex;gap:.75rem;justify-content:flex-end;margin-top:1.5rem;padding-top:1rem;border-top:1px solid var(--border)}
.g-divider{border:none;border-top:1px solid var(--border);margin:1.5rem 0}
.g-switch-line{text-align:center;font-size:.88rem;color:var(--muted)}
.g-switch-line a{color:var(--accent);font-weight:600}
.g-link{color:var(--accent)}

/* ─── RESPONSIVE & COLLAPSIBLE SIDEBAR ──────────────────────── */

/* Hamburger button - hidden on desktop */
.g-menu-btn{display:none;width:38px;height:38px;border:none;background:none;
  border-radius:8px;cursor:pointer;color:var(--muted);font-size:1.3rem;
  align-items:center;justify-content:center;flex-shrink:0;transition:.15s}
.g-menu-btn:hover{background:var(--light);color:var(--blue)}

/* Sidebar overlay backdrop - mobile only */
.g-sidebar-backdrop{display:none;position:fixed;inset:0;background:rgba(15,23,42,.45);
  z-index:85;opacity:0;transition:opacity .25s}
.g-sidebar-backdrop.open{opacity:1}

/* Desktop collapse toggle */
.g-sidebar-toggle{display:flex;align-items:center;justify-content:center;
  width:28px;height:28px;border:1.5px solid var(--border);border-radius:6px;
  background:#fff;cursor:pointer;color:var(--muted);font-size:.85rem;
  position:absolute;right:-14px;top:1.5rem;z-index:91;transition:.2s}
.g-sidebar-toggle:hover{border-color:var(--accent);color:var(--accent);background:var(--light)}

/* Collapsed sidebar state */
.g-sidebar.collapsed{width:60px}
.g-sidebar.collapsed .g-sidebar-title,
.g-sidebar.collapsed .g-sidebar-tier,
.g-sidebar.collapsed .g-sidebar-nav a span:last-child,
.g-sidebar.collapsed .g-sidebar-cta .g-btn-new span,
.g-sidebar.collapsed .g-sidebar-cta .g-btn-logout span{display:none}
.g-sidebar.collapsed .g-sidebar-brand{justify-content:center;padding:.5rem .25rem 1.25rem}
.g-sidebar.collapsed .g-sidebar-brand .g-sidebar-icon{margin:0}
.g-sidebar.collapsed .g-sidebar-nav a{justify-content:center;padding:.6rem;gap:0}
.g-sidebar.collapsed .g-sidebar-nav a span:first-child{font-size:1.15rem}
.g-sidebar.collapsed .g-sidebar-cta{align-items:center}
.g-sidebar.collapsed .g-btn-new,
.g-sidebar.collapsed .g-btn-logout{width:38px;height:38px;padding:0;
  display:flex;align-items:center;justify-content:center;font-size:1rem;border-radius:8px}
.g-sidebar.collapsed + .g-sidebar-backdrop + main.g-main,
.g-sidebar.collapsed ~ main.g-main{margin-left:60px}
.g-sidebar.collapsed ~ .g-footer{margin-left:60px}
.g-sidebar.collapsed .g-sidebar-toggle{right:-14px}

/* Tooltip for collapsed state */
.g-sidebar.collapsed .g-sidebar-nav a{position:relative}
.g-sidebar.collapsed .g-sidebar-nav a:hover::after{
  content:attr(data-label);position:absolute;left:52px;top:50%;transform:translateY(-50%);
  background:#1e293b;color:#fff;font-size:.78rem;font-weight:500;
  padding:.3rem .75rem;border-radius:6px;white-space:nowrap;z-index:200;pointer-events:none}

/* Transition for sidebar width and main margin */
.g-main{transition:margin-left .25s cubic-bezier(.4,0,.2,1)}
.g-footer{transition:margin-left .25s cubic-bezier(.4,0,.2,1)}

/* ─── TABLET (≤1024px) ───────────────────────────────────────── */
@media (max-width:1024px){
  .g-topbar-nav{display:none}
  .g-topbar-search{max-width:220px}
  .g-cols-4{grid-template-columns:repeat(2,1fr)}
  .g-app-grid{grid-template-columns:repeat(2,1fr)}
}

/* ─── MOBILE (≤768px) ────────────────────────────────────────── */
@media (max-width:768px){
  :root{--sidebar:280px}

  /* Show hamburger, hide desktop toggle */
  .g-menu-btn{display:flex}
  .g-sidebar-toggle{display:none}
  .g-topbar-search{display:none}

  /* Sidebar slides in from left as overlay */
  .g-sidebar{
    left:-280px;top:0;height:100vh;
    transition:left .28s cubic-bezier(.4,0,.2,1);
    box-shadow:none;z-index:95}
  .g-sidebar.mobile-open{left:0;box-shadow:4px 0 24px rgba(15,23,42,.18)}
  .g-sidebar-backdrop{display:block}
  .g-sidebar-backdrop.open{display:block}

  /* Main takes full width */
  .g-main{margin-left:0 !important;padding:1.25rem 1rem}
  .g-footer{margin-left:0 !important;padding:.75rem 1rem}

  /* Topbar */
  .g-topbar{padding:0 1rem;gap:.5rem}
  .g-topbar-actions{margin-left:auto}

  /* Stat grids → single column */
  .g-cols-4,.g-cols-3{grid-template-columns:1fr 1fr}
  .g-app-grid{grid-template-columns:1fr}

  /* Tables → horizontally scrollable */
  .g-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
  .g-table{min-width:540px}

  /* Page header stacks */
  .g-page-header{flex-direction:column;gap:.75rem;align-items:flex-start}

  /* Filter row stacks */
  .g-filter-row{flex-wrap:wrap}
  .g-search-box{min-width:100%}

  /* Modal full-screen on mobile */
  .g-modal-overlay{padding:.5rem}
  .g-modal-box{max-width:100%;border-radius:16px;max-height:95vh}

  /* Auth card full-width */
  .auth-card{padding:1.75rem 1.25rem}
  .auth-center{padding:.75rem}

  /* Stat val smaller on mobile */
  .g-stat-val{font-size:1.5rem}

  /* Docs / standalone pages */
  .wrap{padding:1.5rem 1rem !important}
  .code-block{font-size:.72rem !important}
  .scope-grid{grid-template-columns:1fr !important}
  .ref-table{display:block;overflow-x:auto}

  /* Status page */
  .uptime-bars .bar{min-width:2px}
  .sla-card{flex-direction:column;gap:.75rem}

  /* Apps access modal user list */
  #accessList{max-height:260px}
}

/* ─── SMALL MOBILE (≤480px) ──────────────────────────────────── */
@media (max-width:480px){
  .g-cols-4,.g-cols-3{grid-template-columns:1fr}
  .form-grid,.fgrid{grid-template-columns:1fr !important}
  .fg.span2,.f-group.span2{grid-column:span 1 !important}
  .g-modal-footer{flex-direction:column}
  .g-modal-footer .g-btn-outline,.g-modal-footer .g-btn-primary{width:100%;justify-content:center}
  .btn-row{flex-wrap:wrap}
  .btn-row .btn{flex:1;justify-content:center;min-width:120px}
  .g-app-actions{flex-direction:column}
  .auth-title{font-size:1.35rem}
  .lang-tabs{gap:.25rem}
  .lang-tab{padding:.28rem .55rem;font-size:.72rem}
  .step{flex-direction:column;gap:.75rem}
  .step-num{width:28px;height:28px;font-size:.7rem}
  .endpoint-row{flex-direction:column;align-items:flex-start;gap:.35rem}
  .ep-label{min-width:auto}
  .hero-title{font-size:1.5rem}
}

/* ─── BRAND TEXT hide on very small screens ─────────────────── */
@media (max-width:380px){
  .g-brand-text{display:none}
  .g-brand{gap:0}
}

/* ─── Sidebar collapsed: adjust toggle arrow ─────────────────── */
  padding:1.25rem .75rem;display:flex;flex-direction:column;z-index:90;overflow-y:auto;
  overflow-x:hidden}
