/* ==========================================================================
   Expresso Nepomuceno — Design System
   Portal Público + HomeHub Admin Console
   ========================================================================== */

/* ── Tokens ──────────────────────────────────────────────────────────────── */
:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', monospace;

  --brand:        #0284c7;
  --brand-hover:  #0369a1;
  --brand-muted:  rgba(2, 132, 199, 0.14);
  --brand-border: rgba(2, 132, 199, 0.35);

  --success:      #10b981;
  --success-bg:   rgba(16, 185, 129, 0.12);
  --warning:      #f59e0b;
  --warning-bg:   rgba(245, 158, 11, 0.12);
  --danger:       #ef4444;
  --danger-bg:    rgba(239, 68, 68, 0.12);
  --info:         #6366f1;
  --info-bg:      rgba(99, 102, 241, 0.12);

  --r-xs:   4px;
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   16px;
  --r-xl:   20px;
  --r-2xl:  24px;
  --r-full: 9999px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast:   150ms;
  --t-smooth: 240ms;
}

/* ── Dark Theme ─────────────────────────────────────────────────────────── */
:root, [data-theme="dark"] {
  --bg-base:         #080e1a;
  --bg-page:         #0b1120;
  --bg-sidebar:      #0d1526;
  --bg-surface:      #111827;
  --bg-card:         #131e30;
  --bg-card-hover:   #1a2844;
  --bg-subtle:       rgba(255,255,255,0.04);
  --bg-input:        #0f172a;

  --border-base:     rgba(255,255,255,0.07);
  --border-card:     rgba(255,255,255,0.09);
  --border-hover:    rgba(2, 132, 199, 0.5);

  --text-1:   #f1f5f9;
  --text-2:   #94a3b8;
  --text-3:   #64748b;
  --text-4:   #475569;

  --shadow-sm:   0 1px 3px rgba(0,0,0,0.3);
  --shadow-card: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-hover:0 12px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(2,132,199,0.3);
  --shadow-modal:0 24px 60px rgba(0,0,0,0.7);
}

/* ── Light Theme ────────────────────────────────────────────────────────── */
[data-theme="light"] {
  --bg-base:         #f0f4f8;
  --bg-page:         #f8fafc;
  --bg-sidebar:      #ffffff;
  --bg-surface:      #ffffff;
  --bg-card:         #ffffff;
  --bg-card-hover:   #f8fafc;
  --bg-subtle:       #f1f5f9;
  --bg-input:        #ffffff;

  --border-base:     #e2e8f0;
  --border-card:     #e2e8f0;
  --border-hover:    #0284c7;

  --text-1:   #0f172a;
  --text-2:   #475569;
  --text-3:   #64748b;
  --text-4:   #94a3b8;

  --shadow-sm:   0 1px 3px rgba(0,0,0,0.06);
  --shadow-card: 0 1px 4px rgba(0,0,0,0.08);
  --shadow-hover:0 8px 24px rgba(15,23,42,0.12), 0 0 0 1px rgba(2,132,199,0.25);
  --shadow-modal:0 24px 60px rgba(0,0,0,0.2);
}

/* ── Base Reset ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  background: var(--bg-page);
  color: var(--text-1);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background var(--t-smooth) var(--ease-out), color var(--t-smooth) var(--ease-out);
}

a { color: inherit; text-decoration: none; }
button { font-family: var(--font-sans); cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: var(--font-sans); }
.hidden { display: none !important; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SHARED COMPONENTS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 9px 18px;
  border-radius: var(--r-sm); font-size: 0.84375rem; font-weight: 600;
  transition: all var(--t-fast) var(--ease-out); cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary   { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(2,132,199,0.35); }
.btn-outline   { background: var(--bg-subtle); border-color: var(--border-base); color: var(--text-1); }
.btn-outline:hover { background: var(--bg-card-hover); border-color: rgba(255,255,255,0.18); }
.btn-danger    { background: var(--danger-bg); border-color: rgba(239,68,68,0.3); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-full      { width: 100%; }
.btn-sm        { padding: 6px 12px; font-size: 0.78125rem; }
.btn-ssh       { color: var(--info); border-color: rgba(99,102,241,0.3); }
.btn-ssh:hover { background: var(--info); color: #fff; border-color: var(--info); }

/* Form Fields */
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-size: 0.8125rem; font-weight: 600; color: var(--text-2); }
.form-field input,
.form-field textarea,
.form-field select {
  background: var(--bg-input);
  border: 1px solid var(--border-base);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  color: var(--text-1);
  font-size: 0.875rem;
  outline: none;
  transition: border-color var(--t-fast);
  width: 100%;
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(2,132,199,0.14); }
.form-field textarea { resize: vertical; min-height: 80px; }
.form-field select { appearance: none; }

/* Auth Form */
.auth-form { display: flex; flex-direction: column; gap: 14px; width: 100%; }

/* Form Grid */
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Error Banner */
.error-banner {
  padding: 10px 14px; border-radius: var(--r-sm);
  background: var(--danger-bg); border: 1px solid rgba(239,68,68,0.25);
  color: #fca5a5; font-size: 0.84375rem;
}

/* Alert Banner */
.alert-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px; border-radius: var(--r-md);
  font-size: 0.875rem;
  margin-bottom: 20px;
}
.alert-warning { background: var(--warning-bg); border: 1px solid rgba(245,158,11,0.25); color: #fde68a; }
.alert-close { margin-left: auto; font-size: 1.25rem; background: none; border: none; color: inherit; cursor: pointer; opacity: 0.6; }
.alert-close:hover { opacity: 1; }

/* Status Chips */
.status-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--r-full);
  font-size: 0.71875rem; font-weight: 700;
}
.status-chip-green  { background: var(--success-bg); color: var(--success); }
.status-chip-amber  { background: var(--warning-bg); color: var(--warning); }
.status-chip-red    { background: var(--danger-bg);  color: var(--danger); }
.status-chip-blue   { background: var(--info-bg);    color: var(--info); }

/* Method Chips */
.method-chip {
  display: inline-block; padding: 2px 8px;
  border-radius: var(--r-xs); font-family: var(--font-mono);
  font-size: 0.6875rem; font-weight: 700;
}
.method-get    { background: rgba(16,185,129,0.12); color: #10b981; }
.method-post   { background: rgba(2,132,199,0.12);  color: #0284c7; }
.method-put    { background: rgba(245,158,11,0.12); color: #f59e0b; }
.method-delete { background: rgba(239,68,68,0.12);  color: #ef4444; }

/* Badges */
.badge-yes { color: var(--success); font-weight: 600; font-size: 0.84375rem; }
.badge-no  { color: var(--text-3);  font-size: 0.84375rem; }
.cat-pill {
  display: inline-block; padding: 3px 10px;
  background: var(--brand-muted); border: 1px solid var(--brand-border);
  border-radius: var(--r-full); font-size: 0.75rem; font-weight: 600; color: var(--brand);
}

/* Mono / Muted */
.mono-text { font-family: var(--font-mono); font-size: 0.8125rem; }
.text-muted { color: var(--text-3); }
.text-xs { font-size: 0.75rem; }

/* Data Table */
.table-wrap { width: 100%; overflow-x: auto; border-radius: var(--r-md); }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.84375rem; }
.data-table th {
  padding: 11px 16px; background: var(--bg-subtle);
  color: var(--text-2); font-weight: 600; font-size: 0.75rem;
  text-transform: uppercase; letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-base); white-space: nowrap;
  text-align: left;
}
.data-table td { padding: 13px 16px; border-bottom: 1px solid var(--border-base); vertical-align: middle; }
.data-table tbody tr:hover { background: var(--bg-subtle); }
.data-table tbody tr:last-child td { border-bottom: none; }
.td-loading { text-align: center; color: var(--text-3); padding: 36px !important; }
.td-empty { text-align: center; padding: 48px !important; }

/* Empty State Inline */
.empty-state-inline {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: var(--text-3); font-size: 0.9375rem;
}
.empty-state-inline > div:first-child { font-size: 2rem; }

/* Toggle Switch */
.toggle-group { display: flex; flex-direction: column; gap: 10px; padding: 12px 0; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; font-size: 0.875rem; }
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; background: var(--border-base);
  border-radius: var(--r-full); cursor: pointer; transition: background var(--t-fast);
}
.toggle-slider::before {
  content: ''; position: absolute; left: 3px; top: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; transition: transform var(--t-fast);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.toggle-switch input:checked + .toggle-slider { background: var(--brand); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal-box {
  background: var(--bg-surface); border: 1px solid var(--border-card);
  border-radius: var(--r-xl); width: 100%; max-width: 500px;
  box-shadow: var(--shadow-modal); display: flex; flex-direction: column; gap: 0;
  animation: modalIn 200ms var(--ease-out);
}
.modal-lg { max-width: 680px; }
@keyframes modalIn { from { opacity:0; transform:scale(0.96) translateY(8px); } to { opacity:1; transform:none; } }
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px; border-bottom: 1px solid var(--border-base);
}
.modal-head h3 { font-size: 1.0625rem; font-weight: 700; }
.modal-close { font-size: 1.5rem; color: var(--text-3); line-height: 1; padding: 4px; }
.modal-close:hover { color: var(--text-1); }
.modal-body { padding: 24px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; max-height: 70vh; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 16px 24px; border-top: 1px solid var(--border-base);
}

/* Toast */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: var(--r-md);
  font-size: 0.875rem; font-weight: 500;
  background: var(--bg-surface); border: 1px solid var(--border-card);
  box-shadow: var(--shadow-card); min-width: 260px;
  opacity: 0; transform: translateX(20px);
  transition: all 250ms var(--ease-out);
}
.toast-in  { opacity: 1; transform: none; }
.toast-out { opacity: 0; transform: translateX(20px); }
.toast-success { border-color: rgba(16,185,129,0.35); }
.toast-success .toast-icon { color: var(--success); }
.toast-error   { border-color: rgba(239,68,68,0.35); }
.toast-error .toast-icon   { color: var(--danger); }
.toast-info    { border-color: rgba(99,102,241,0.35); }
.toast-info .toast-icon    { color: var(--info); }

/* Notification Center */
.notif-wrapper { position: relative; }
.header-notif-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-base);
  border-radius: var(--r-full);
  color: var(--text-2);
  cursor: pointer;
  transition: all .15s ease;
}
.header-notif-btn:hover { border-color: var(--border-card); color: var(--text-1); background: var(--bg-surface); }
.notif-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--danger); color: #fff;
  font-size: 0.65rem; font-weight: 700;
  border-radius: 9px; padding: 0 4px;
  border: 2px solid var(--bg-base);
}
.notif-badge.hidden { display: none; }
.notif-center {
  position: absolute; top: calc(100% + 10px); right: 0;
  width: 360px; max-height: 480px;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--r-lg);
  box-shadow: 0 12px 40px rgba(0,0,0,.4);
  z-index: 1000;
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: notifIn .18s var(--ease-out);
}
.notif-center.hidden { display: none; }
@keyframes notifIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.notif-center-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-base);
  flex-shrink: 0;
}
.notif-center-header h3 { font-size: 0.9rem; font-weight: 700; color: var(--text-1); margin: 0; }
.notif-center-actions { display: flex; gap: 6px; }
.notif-action-btn {
  background: transparent; border: 1px solid var(--border-base);
  color: var(--text-2); font-size: 0.7rem; font-weight: 600;
  padding: 4px 8px; border-radius: var(--r-sm); cursor: pointer;
  transition: all .15s ease;
}
.notif-action-btn:hover { border-color: var(--border-card); color: var(--text-1); background: var(--bg-subtle); }
.notif-list {
  overflow-y: auto; max-height: 400px;
  padding: 4px 0;
}
.notif-empty {
  padding: 32px 16px; text-align: center;
  color: var(--text-3); font-size: 0.8rem;
}
.notif-item {
  display: flex; gap: 10px; padding: 10px 16px;
  border-bottom: 1px solid var(--border-base);
  transition: background .15s ease;
}
.notif-item:hover { background: var(--bg-subtle); }
.notif-item.unread { background: rgba(99,102,241,0.06); border-left: 3px solid var(--info); }
.notif-item.unread:hover { background: rgba(99,102,241,0.1); }
.notif-item-icon {
  flex-shrink: 0; width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: 0.85rem; font-weight: 700;
}
.notif-item.success .notif-item-icon { background: rgba(16,185,129,0.15); color: var(--success); }
.notif-item.error .notif-item-icon { background: rgba(239,68,68,0.15); color: var(--danger); }
.notif-item.info .notif-item-icon { background: rgba(99,102,241,0.15); color: var(--info); }
.notif-item-body { flex: 1; min-width: 0; }
.notif-item-title { font-size: 0.8rem; font-weight: 600; color: var(--text-1); margin-bottom: 2px; }
.notif-item-msg { font-size: 0.75rem; color: var(--text-2); line-height: 1.4; word-break: break-word; }
.notif-item-time { font-size: 0.65rem; color: var(--text-3); margin-top: 4px; font-family: var(--font-mono); }

/* SSH Options */
.ssh-option { background: var(--bg-subtle); border: 1px solid var(--border-base); border-radius: var(--r-md); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.highlight-ssh { border-color: var(--brand-border); background: var(--brand-muted); }
.ssh-option-header { display: flex; justify-content: space-between; align-items: center; }
.ssh-badge { font-size: 0.84375rem; font-weight: 700; color: var(--text-1); }
.status-dot-online { font-size: 0.75rem; color: var(--success); font-weight: 600; }
.code-row { display: flex; align-items: center; gap: 10px; background: var(--bg-input); border: 1px solid var(--border-base); border-radius: var(--r-sm); padding: 8px 14px; }
.code-row code { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--brand); flex: 1; word-break: break-all; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PUBLIC PORTAL STYLES (index.html)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

body.portal-body { min-height: 100vh; }
.portal-wrapper { max-width: 1240px; margin: 0 auto; padding: 24px 32px 64px; }

/* Portal Header */
.portal-header {
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px; padding: 14px 22px;
  background: rgba(13,21,38,0.75); backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid var(--border-base); border-radius: var(--r-2xl);
  box-shadow: var(--shadow-card); margin-bottom: 32px;
}
[data-theme="light"] .portal-header { background: rgba(255,255,255,0.85); }

.corporate-brand { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.brand-logo-icon {
  width: 42px; height: 42px; border-radius: var(--r-md);
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(2,132,199,0.3); transition: transform var(--t-smooth);
}
.corporate-brand:hover .brand-logo-icon { transform: scale(1.05); }
.brand-text-block { display: flex; flex-direction: column; }
.brand-company-name { font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); }
.brand-portal-title { font-size: 1.0625rem; font-weight: 800; letter-spacing: -0.02em; color: var(--text-1); }

.portal-header-right { display: flex; align-items: center; gap: 10px; }

.system-status-indicator {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 14px; border-radius: var(--r-full);
  background: var(--success-bg); border: 1px solid rgba(16,185,129,0.25);
  font-size: 0.78125rem; font-weight: 600; color: var(--success);
}
.status-dot-ping {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--success); box-shadow: 0 0 8px var(--success);
  animation: statusPing 2.2s infinite;
}
@keyframes statusPing { 0%,100%{opacity:1;transform:scale(1);} 50%{opacity:0.4;transform:scale(0.8);} }

.header-search-bar {
  display: flex; align-items: center;
  background: var(--bg-subtle); border: 1px solid var(--border-base);
  border-radius: var(--r-full); padding: 6px 14px; width: 260px;
  transition: all var(--t-smooth);
}
.header-search-bar:focus-within { width: 320px; border-color: var(--brand); background: var(--bg-surface); box-shadow: 0 0 0 3px rgba(2,132,199,0.12); }
.header-search-icon { color: var(--text-3); margin-right: 8px; flex-shrink: 0; }
.header-search-bar input { background: transparent; border: none; outline: none; color: var(--text-1); font-size: 0.8125rem; width: 100%; }
.header-search-bar input::placeholder { color: var(--text-3); }
.shortcut-kbd { font-family: var(--font-mono); font-size: 0.625rem; color: var(--text-3); background: var(--bg-card); border: 1px solid var(--border-base); padding: 1px 6px; border-radius: var(--r-xs); margin-left: 6px; }

.theme-toggle-btn, .admin-link-btn {
  width: 36px; height: 36px; border-radius: var(--r-full);
  background: var(--bg-subtle); border: 1px solid var(--border-base);
  color: var(--text-2); display: flex; align-items: center; justify-content: center;
  transition: all var(--t-fast);
}
.theme-toggle-btn:hover, .admin-link-btn:hover { color: var(--text-1); background: var(--brand-muted); border-color: var(--brand); }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

/* Portal Hero */
.portal-hero { padding: 16px 8px 36px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--brand); background: var(--brand-muted); border: 1px solid var(--brand-border);
  padding: 4px 12px; border-radius: var(--r-full); margin-bottom: 14px;
}
.hero-badge-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.portal-hero-title { font-size: 2.25rem; font-weight: 800; letter-spacing: -0.03em; color: var(--text-1); line-height: 1.15; margin-bottom: 8px; }
.portal-hero-description { font-size: 1.0625rem; color: var(--text-2); max-width: 680px; line-height: 1.55; }

/* Portal Nav */
.portal-nav-bar { margin-bottom: 36px; border-bottom: 1px solid var(--border-base); padding-bottom: 14px; }
.category-tabs-scroll { display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.category-tabs-scroll::-webkit-scrollbar { display: none; }
.cat-tab-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 16px; border-radius: var(--r-full);
  background: var(--bg-subtle); border: 1px solid var(--border-base);
  color: var(--text-2); font-size: 0.84375rem; font-weight: 600;
  white-space: nowrap; transition: all var(--t-fast);
}
.cat-tab-btn:hover { color: var(--text-1); background: var(--bg-card-hover); }
.cat-tab-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 4px 14px rgba(2,132,199,0.35); }
.cat-tab-count { font-size: 0.6875rem; font-family: var(--font-mono); background: rgba(0,0,0,0.15); padding: 2px 7px; border-radius: var(--r-full); }

/* Portal Sections */
.portal-section { margin-bottom: 48px; }
.section-title-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.section-heading-wrap { display: flex; align-items: center; gap: 10px; }
.section-badge-icon { font-size: 1.25rem; }
.section-main-heading { font-size: 1.1875rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text-1); }
.section-subtext { font-size: 0.84375rem; color: var(--text-3); }
.catalog-counter-pill { font-size: 0.71875rem; font-weight: 600; color: var(--text-3); background: var(--bg-subtle); border: 1px solid var(--border-base); padding: 4px 12px; border-radius: var(--r-full); }

/* Featured Cards */
.featured-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 22px; }
.featured-card {
  background: var(--bg-card); border: 1px solid var(--border-card);
  border-radius: var(--r-xl); padding: 28px;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: var(--shadow-card); transition: all var(--t-smooth);
}
.featured-card:hover { border-color: var(--border-hover); transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.featured-card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }
.featured-icon-box { width: 54px; height: 54px; border-radius: var(--r-lg); background: var(--bg-subtle); border: 1px solid var(--border-base); display: flex; align-items: center; justify-content: center; font-size: 1.75rem; }
.meta-status-group { display: inline-flex; align-items: center; gap: 6px; font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); background: var(--bg-subtle); border: 1px solid var(--border-base); padding: 5px 12px; border-radius: var(--r-full); }
.status-indicator-live { display: inline-flex; align-items: center; gap: 4px; color: var(--success); }
.status-dot-mini { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.featured-card-body h3 { font-size: 1.3125rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text-1); margin-bottom: 8px; }
.featured-card-body p { font-size: 0.9375rem; color: var(--text-2); line-height: 1.55; margin-bottom: 24px; }
.btn-access-app {
  display: inline-flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 12px 18px; border-radius: var(--r-md); background: var(--brand); color: #fff;
  font-size: 0.875rem; font-weight: 600; box-shadow: 0 4px 12px rgba(2,132,199,0.3);
  transition: all var(--t-fast);
}
.btn-access-app:hover { background: var(--brand-hover); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(2,132,199,0.45); }
.btn-access-arrow { transition: transform var(--t-fast); }
.btn-access-app:hover .btn-access-arrow { transform: translateX(4px); }

/* App Cards Grid */
.apps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.app-card { background: var(--bg-card); border: 1px solid var(--border-card); border-radius: var(--r-lg); padding: 22px; display: flex; flex-direction: column; justify-content: space-between; box-shadow: var(--shadow-card); transition: all var(--t-smooth); }
.app-card:hover { border-color: var(--border-hover); transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.app-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.app-icon-wrap { width: 44px; height: 44px; border-radius: var(--r-md); background: var(--bg-subtle); border: 1px solid var(--border-base); display: flex; align-items: center; justify-content: center; font-size: 1.35rem; }
.app-card-body h3 { font-size: 1.0625rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 6px; }
.app-card-body p { font-size: 0.875rem; color: var(--text-2); line-height: 1.5; margin-bottom: 18px; }
.btn-app-action { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 10px 16px; border-radius: var(--r-sm); background: var(--bg-subtle); border: 1px solid var(--border-base); color: var(--text-1); font-size: 0.84375rem; font-weight: 600; transition: all var(--t-fast); }
.btn-app-action:hover { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 4px 12px rgba(2,132,199,0.3); }

/* Skeleton Loader */
.skeleton-card { background: var(--bg-card); border: 1px solid var(--border-card); border-radius: var(--r-lg); padding: 22px; display: flex; flex-direction: column; gap: 12px; position: relative; overflow: hidden; }
.skeleton-shimmer { position: absolute; inset: 0; background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.04) 50%, transparent 100%); animation: shimmer 1.8s infinite; }
@keyframes shimmer { 0%{transform:translateX(-100%);} 100%{transform:translateX(100%);} }
.skeleton-box { background: var(--bg-subtle); border-radius: var(--r-sm); }
.sk-icon { width: 46px; height: 46px; border-radius: var(--r-md); }
.sk-badge { width: 90px; height: 22px; border-radius: var(--r-full); }
.sk-title { width: 65%; height: 20px; }
.sk-desc { width: 100%; height: 14px; }
.sk-desc-short { width: 50%; height: 14px; }
.sk-btn { width: 100%; height: 40px; margin-top: 6px; }

/* Empty State */
.empty-state-box { grid-column: 1/-1; text-align: center; padding: 56px 24px; background: var(--bg-card); border: 1px dashed var(--border-base); border-radius: var(--r-xl); }
.empty-state-icon { font-size: 2.5rem; margin-bottom: 12px; }
.empty-state-box h3 { font-size: 1.125rem; font-weight: 700; margin-bottom: 6px; }
.empty-state-box p { font-size: 0.875rem; color: var(--text-2); margin-bottom: 20px; }
.btn-clear-search { background: var(--brand-muted); border: 1px solid var(--brand-border); color: var(--brand); padding: 8px 18px; border-radius: var(--r-full); font-size: 0.84375rem; font-weight: 600; cursor: pointer; transition: all var(--t-fast); }
.btn-clear-search:hover { background: var(--brand); color: #fff; }

/* Portal Footer */
.portal-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; padding-top: 32px; border-top: 1px solid var(--border-base); color: var(--text-3); font-size: 0.8125rem; }
.footer-corporate-info { display: flex; align-items: center; gap: 8px; }
.footer-brand-name { font-weight: 600; color: var(--text-2); }
.footer-separator { color: var(--border-base); }
.footer-status-pill { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.footer-dot-green { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ADMIN APP STYLES
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

body.admin-body { min-height: 100vh; }

/* Auth Screen */
.auth-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(2,132,199,0.1) 0%, transparent 60%), var(--bg-page); }
.auth-card { width: 100%; max-width: 400px; background: var(--bg-surface); border: 1px solid var(--border-card); border-radius: var(--r-2xl); padding: 36px 30px; display: flex; flex-direction: column; align-items: center; gap: 20px; box-shadow: var(--shadow-modal); }
.auth-logo-mark { width: 56px; height: 56px; border-radius: var(--r-lg); background: linear-gradient(135deg, #0284c7, #1d4ed8); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 20px rgba(2,132,199,0.35); }
.auth-header { text-align: center; }
.auth-header h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; }
.auth-header p { color: var(--text-2); font-size: 0.875rem; margin-top: 4px; }
.auth-meta { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 0.75rem; color: var(--text-3); }
.link-subtle { color: var(--brand); font-weight: 600; }
.link-subtle:hover { text-decoration: underline; }

/* Admin App Layout */
.admin-app { display: flex; min-height: 100vh; }

/* ── Sidebar ── */
.admin-sidebar {
  width: 240px; flex-shrink: 0; background: var(--bg-sidebar);
  border-right: 1px solid var(--border-base);
  display: flex; flex-direction: column; gap: 0;
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 200;
  transition: transform var(--t-smooth) var(--ease-out);
  overflow: hidden;
}
.admin-sidebar.sidebar-collapsed { transform: translateX(-100%); }

.sidebar-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 18px 16px; border-bottom: 1px solid var(--border-base);
}
.sidebar-brand-icon {
  width: 36px; height: 36px; border-radius: var(--r-sm); flex-shrink: 0;
  background: linear-gradient(135deg, #0284c7, #1d4ed8); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.sidebar-brand-name { font-size: 0.9375rem; font-weight: 800; letter-spacing: -0.01em; color: var(--text-1); }
.sidebar-brand-sub { font-size: 0.6875rem; color: var(--text-3); font-weight: 500; }

.sidebar-status-pill {
  margin: 12px 14px; padding: 7px 14px; border-radius: var(--r-full);
  display: flex; align-items: center; gap: 8px;
  font-size: 0.75rem; font-weight: 600;
  background: var(--success-bg); border: 1px solid rgba(16,185,129,0.2); color: var(--success);
  transition: all var(--t-smooth);
}
.sidebar-status-pill.pill-danger { background: var(--danger-bg); border-color: rgba(239,68,68,0.2); color: var(--danger); }
.sidebar-status-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: statusPing 2.2s infinite; }

.sidebar-nav { flex: 1; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.sidebar-nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: var(--r-sm);
  color: var(--text-2); font-size: 0.875rem; font-weight: 500;
  transition: all var(--t-fast); cursor: pointer; border: none; background: none; width: 100%; text-align: left;
}
.sidebar-nav-item:hover { color: var(--text-1); background: var(--bg-subtle); }
.sidebar-nav-item.active { color: var(--brand); background: var(--brand-muted); font-weight: 700; }
.sidebar-nav-item.active .nav-icon { color: var(--brand); }
.nav-icon { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.7; transition: opacity var(--t-fast); }
.sidebar-nav-item:hover .nav-icon,
.sidebar-nav-item.active .nav-icon { opacity: 1; }
.nav-badge {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: var(--r-full); background: var(--brand); color: #fff;
  font-size: 0.625rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.nav-dot-live {
  margin-left: auto; width: 7px; height: 7px; border-radius: 50%;
  background: var(--success); box-shadow: 0 0 6px var(--success);
  opacity: 0; transition: opacity 0.4s;
}

.sidebar-footer { padding: 14px; border-top: 1px solid var(--border-base); display: flex; flex-direction: column; gap: 10px; }
.sidebar-user-info { display: flex; align-items: center; gap: 10px; }
.sidebar-user-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #0284c7, #7c3aed); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 0.875rem; font-weight: 700; flex-shrink: 0; }
.sidebar-user-meta { display: flex; flex-direction: column; }
.sidebar-user-name { font-size: 0.84375rem; font-weight: 600; color: var(--text-1); }
.sidebar-user-role { font-size: 0.6875rem; color: var(--text-3); }
.sidebar-footer-actions { display: flex; gap: 8px; }
.sidebar-action-btn { width: 32px; height: 32px; border-radius: var(--r-sm); background: var(--bg-subtle); border: 1px solid var(--border-base); color: var(--text-2); display: flex; align-items: center; justify-content: center; transition: all var(--t-fast); cursor: pointer; }
.sidebar-action-btn:hover { color: var(--text-1); background: var(--bg-card-hover); border-color: rgba(255,255,255,0.2); }

/* ── Content Area ── */
.admin-content-area {
  flex: 1; margin-left: 240px;
  min-height: 100vh; display: flex; flex-direction: column;
  transition: margin-left var(--t-smooth) var(--ease-out);
}

.content-header {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px; padding: 20px 28px 0;
  position: sticky; top: 0; z-index: 100;
  background: var(--bg-page);
  border-bottom: 1px solid var(--border-base);
  padding-bottom: 16px; margin-bottom: 28px;
}
.content-header-left { display: flex; align-items: center; gap: 14px; }
.sidebar-toggle-btn { width: 36px; height: 36px; border-radius: var(--r-sm); background: var(--bg-subtle); border: 1px solid var(--border-base); color: var(--text-2); display: flex; align-items: center; justify-content: center; transition: all var(--t-fast); }
.sidebar-toggle-btn:hover { color: var(--text-1); background: var(--bg-card-hover); }
.content-page-title { font-size: 1.375rem; font-weight: 800; letter-spacing: -0.025em; color: var(--text-1); }
.content-page-subtitle { font-size: 0.84375rem; color: var(--text-3); margin-top: 2px; }
.content-header-right { display: flex; align-items: center; gap: 10px; }
.header-uptime-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; background: var(--bg-subtle); border: 1px solid var(--border-base); border-radius: var(--r-full); font-size: 0.78125rem; font-weight: 600; font-family: var(--font-mono); color: var(--text-2); }
.header-refresh-indicator { display: inline-flex; align-items: center; gap: 6px; font-size: 0.71875rem; color: var(--text-3); }
.refresh-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); animation: statusPing 2.2s infinite; }

.content-pages { flex: 1; padding: 0 28px 40px; }
.page-section { display: none; flex-direction: column; gap: 24px; animation: pageIn 200ms var(--ease-out); }
.page-section.active { display: flex; }
@keyframes pageIn { from{opacity:0;transform:translateY(6px);} to{opacity:1;transform:none;} }

/* Section Cards */
.section-card { background: var(--bg-card); border: 1px solid var(--border-card); border-radius: var(--r-lg); padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.section-card-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 14px; }
.section-card-title { font-size: 1.0625rem; font-weight: 700; color: var(--text-1); }
.section-card-desc { font-size: 0.84375rem; color: var(--text-3); margin-top: 3px; }

/* ── KPI Cards ── */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.kpi-card { background: var(--bg-card); border: 1px solid var(--border-card); border-radius: var(--r-lg); padding: 20px; display: flex; flex-direction: column; gap: 12px; transition: transform var(--t-fast); }
.kpi-card:hover { transform: translateY(-2px); }
.kpi-header { display: flex; justify-content: space-between; align-items: center; }
.kpi-label { font-size: 0.78125rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); }
.kpi-icon { width: 32px; height: 32px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; }
.kpi-icon-blue   { background: rgba(2,132,199,0.14); color: var(--brand); }
.kpi-icon-purple { background: rgba(124,58,237,0.14); color: #7c3aed; }
.kpi-icon-emerald{ background: rgba(16,185,129,0.14); color: var(--success); }
.kpi-icon-amber  { background: rgba(245,158,11,0.14); color: var(--warning); }
.kpi-value { font-size: 1.875rem; font-weight: 800; letter-spacing: -0.04em; color: var(--text-1); }
.kpi-bar { width: 100%; height: 5px; background: var(--bg-subtle); border-radius: var(--r-full); overflow: hidden; }
.kpi-bar-fill { height: 100%; border-radius: var(--r-full); transition: width 0.6s var(--ease-out); }
.kpi-bar-blue   { background: linear-gradient(90deg, var(--brand), #60a5fa); }
.kpi-bar-purple { background: linear-gradient(90deg, #7c3aed, #a78bfa); }
.kpi-bar-emerald{ background: linear-gradient(90deg, var(--success), #6ee7b7); }
.kpi-meta { font-size: 0.75rem; color: var(--text-3); }
.kpi-net-row { display: flex; gap: 8px; }
.kpi-net-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 0.78125rem; font-family: var(--font-mono); padding: 3px 8px; border-radius: var(--r-full); font-weight: 600; }
.kpi-net-rx { background: var(--success-bg); color: var(--success); }
.kpi-net-tx { background: var(--info-bg); color: var(--info); }

/* ── Status Info Cards ── */
.overview-status-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.status-info-card { background: var(--bg-card); border: 1px solid var(--border-card); border-radius: var(--r-lg); padding: 18px 20px; display: flex; align-items: center; gap: 14px; }
.sic-icon { width: 40px; height: 40px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sic-green  { background: var(--success-bg); color: var(--success); }
.sic-blue   { background: var(--brand-muted); color: var(--brand); }
.sic-purple { background: rgba(124,58,237,0.12); color: #7c3aed; }
.sic-amber  { background: var(--warning-bg); color: var(--warning); }
.sic-value { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.04em; color: var(--text-1); }
.sic-label { font-size: 0.78125rem; color: var(--text-3); font-weight: 600; margin-top: 2px; }

/* ── Gauges ── */
.gauges-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.gauge-card { background: var(--bg-card); border: 1px solid var(--border-card); border-radius: var(--r-lg); padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.gauge-card-header { display: flex; justify-content: space-between; align-items: center; }
.gauge-card-header h3 { font-size: 0.9375rem; font-weight: 700; color: var(--text-1); }
.gauge-badge { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 700; padding: 3px 10px; border-radius: var(--r-sm); background: var(--bg-subtle); border: 1px solid var(--border-base); color: var(--text-2); }
.gauge-wrap { position: relative; width: 140px; height: 140px; margin: 0 auto; }
.gauge-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge-bg { fill: none; stroke: var(--bg-subtle); stroke-width: 8; }
.gauge-progress { fill: none; stroke-width: 8; stroke-linecap: round; stroke-dasharray: 264; stroke-dashoffset: 264; transition: stroke-dashoffset 0.7s var(--ease-out); }
.gauge-cpu  { stroke: #0284c7; }
.gauge-ram  { stroke: #7c3aed; }
.gauge-disk { stroke: #10b981; }
.gauge-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); text-align: center; }
.gauge-val { font-family: var(--font-mono); font-size: 1.125rem; font-weight: 800; color: var(--text-1); display: block; }
.gauge-sub { font-size: 0.6875rem; font-weight: 600; color: var(--text-3); text-transform: uppercase; }
.net-stats-container { display: flex; flex-direction: column; gap: 10px; padding: 4px 0; }
.net-stat-row { display: flex; justify-content: space-between; align-items: center; }
.net-label { font-size: 0.84375rem; color: var(--text-2); }
.net-stat-val { font-family: var(--font-mono); font-weight: 700; color: var(--brand); font-size: 0.9375rem; }
.net-stat-mono { font-family: var(--font-mono); font-size: 0.84375rem; color: var(--text-2); }
.net-divider { border-top: 1px solid var(--border-base); margin: 6px 0; }

/* ── Services / Infra Grid ── */
.infra-services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.infra-card { background: var(--bg-subtle); border: 1px solid var(--border-base); border-radius: var(--r-md); padding: 18px; display: flex; flex-direction: column; gap: 10px; transition: all var(--t-fast); }
.infra-card:hover { border-color: var(--border-hover); background: var(--bg-card); transform: translateY(-2px); }
.infra-card-skeleton { background: var(--bg-subtle); border: 1px solid var(--border-base); border-radius: var(--r-md); height: 140px; animation: shimmer 1.8s infinite; }
.infra-card-header { display: flex; justify-content: space-between; align-items: center; }
.infra-icon { font-size: 1.5rem; }
.infra-status { font-size: 0.71875rem; font-weight: 700; padding: 3px 9px; border-radius: var(--r-full); }
.infra-status-green { background: var(--success-bg); color: var(--success); }
.infra-status-red   { background: var(--danger-bg);  color: var(--danger); }
.infra-name { font-size: 0.9375rem; font-weight: 700; color: var(--text-1); }
.infra-desc { font-size: 0.8125rem; color: var(--text-3); line-height: 1.45; }
.infra-btn { align-self: flex-start; }
.empty-state-inline { color: var(--text-3); padding: 24px; text-align: center; font-size: 0.875rem; }

/* ── Network Page ── */
.network-cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.net-info-card { background: var(--bg-card); border: 1px solid var(--border-card); border-radius: var(--r-lg); padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.net-info-card-highlight { border-color: var(--brand-border); background: linear-gradient(135deg, rgba(2,132,199,0.06), transparent); }
.net-info-card-ssh { background: rgba(99,102,241,0.06); border-color: rgba(99,102,241,0.25); }
.nic-header { display: flex; align-items: center; gap: 10px; }
.nic-icon { width: 34px; height: 34px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nic-local    { background: var(--success-bg); color: var(--success); }
.nic-tailscale{ background: rgba(124,58,237,0.12); color: #7c3aed; }
.nic-ngrok    { background: var(--brand-muted); color: var(--brand); }
.nic-ssh      { background: var(--info-bg); color: var(--info); }
.nic-type { font-size: 0.84375rem; font-weight: 700; color: var(--text-1); }
.nic-value { font-family: var(--font-mono); font-size: 1rem; font-weight: 700; color: var(--brand); word-break: break-all; }
.nic-url { font-size: 0.84375rem; }
.nic-mono { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--info); }
.nic-desc { font-size: 0.8125rem; color: var(--text-3); }

/* ── Logs Page ── */
.logs-stats-bar { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--border-base); border-radius: var(--r-md); overflow: hidden; }
.log-stat { flex: 1; min-width: 120px; padding: 14px 18px; border-right: 1px solid var(--border-base); }
.log-stat:last-child { border-right: none; }
.log-stat-label { display: block; font-size: 0.71875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); margin-bottom: 4px; }
.log-stat-value { display: block; font-family: var(--font-mono); font-size: 1.25rem; font-weight: 800; color: var(--text-1); }
.logs-filter-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.search-input-wrap { display: flex; align-items: center; gap: 8px; flex: 1; background: var(--bg-subtle); border: 1px solid var(--border-base); border-radius: var(--r-sm); padding: 8px 14px; min-width: 200px; }
.search-input-wrap svg { color: var(--text-3); flex-shrink: 0; }
.search-input-wrap input { background: none; border: none; outline: none; color: var(--text-1); font-size: 0.875rem; width: 100%; }
.search-input-wrap input::placeholder { color: var(--text-3); }
.req-count-tag { font-family: var(--font-mono); font-size: 0.78125rem; font-weight: 600; color: var(--text-3); background: var(--bg-subtle); border: 1px solid var(--border-base); padding: 5px 12px; border-radius: var(--r-full); white-space: nowrap; }
.live-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 0.71875rem; font-weight: 700; letter-spacing: 0.05em; color: var(--success); background: var(--success-bg); border: 1px solid rgba(16,185,129,0.25); padding: 5px 12px; border-radius: var(--r-full); }
.live-pill.live-paused { color: var(--text-3); background: var(--bg-subtle); border-color: var(--border-base); }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: statusPing 1.4s infinite; }
.live-pill.live-paused .live-dot { animation: none; }

/* ── Settings Page ── */
.settings-cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; }
.settings-info-list { display: flex; flex-direction: column; gap: 0; }
.settings-info-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border-base); font-size: 0.875rem; }
.settings-info-row:last-child { border-bottom: none; }
.sir-label { color: var(--text-3); font-weight: 500; }
.sir-value { color: var(--text-1); font-weight: 600; text-align: right; }
.sir-mono { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--brand); }
.settings-links-list { display: flex; flex-direction: column; gap: 2px; }
.settings-link-item { display: flex; align-items: center; gap: 14px; padding: 14px 12px; border-radius: var(--r-md); transition: background var(--t-fast); }
.settings-link-item:hover { background: var(--bg-subtle); }
.sli-icon { width: 36px; height: 36px; border-radius: var(--r-sm); background: var(--bg-subtle); border: 1px solid var(--border-base); display: flex; align-items: center; justify-content: center; font-size: 1.125rem; flex-shrink: 0; }
.sli-name { font-size: 0.9375rem; font-weight: 700; color: var(--text-1); }
.sli-desc { font-size: 0.78125rem; color: var(--text-3); margin-top: 2px; }
.settings-link-item svg { margin-left: auto; color: var(--text-3); flex-shrink: 0; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 900px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar:not(.sidebar-collapsed) { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,0.5); }
  .admin-content-area { margin-left: 0; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .gauges-grid { grid-template-columns: 1fr 1fr; }
  .overview-status-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .portal-wrapper { padding: 12px 14px 48px; }
  .portal-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .portal-header-right { width: 100%; flex-wrap: wrap; }
  .header-search-bar { width: 100%; order: 3; }
  .header-search-bar:focus-within { width: 100%; }
  .portal-hero-title { font-size: 1.75rem; }
  .featured-grid, .apps-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr; }
  .gauges-grid { grid-template-columns: 1fr; }
  .overview-status-row { grid-template-columns: 1fr 1fr; }
  .logs-stats-bar { flex-direction: column; }
  .log-stat { border-right: none; border-bottom: 1px solid var(--border-base); }
  .log-stat:last-child { border-bottom: none; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .form-grid-2 [style*="span 2"] { grid-column: span 1; }
  .content-header { padding: 14px 16px 12px; }
  .content-pages { padding: 0 16px 32px; }
  .network-cards-grid { grid-template-columns: 1fr; }
  .settings-cards-grid { grid-template-columns: 1fr; }
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   DEPLOY CENTER & ENTERPRISE MODULES STYLES
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Sub-tabs bar */
.deploy-tabs-bar {
  display: flex; gap: 8px; border-bottom: 1px solid var(--border-base);
  padding-bottom: 14px; margin-bottom: 24px;
}
.deploy-tab-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px; border-radius: var(--r-full);
  background: var(--bg-subtle); border: 1px solid var(--border-base);
  color: var(--text-2); font-size: 0.84375rem; font-weight: 600;
  transition: all var(--t-fast);
}
.deploy-tab-btn:hover { color: var(--text-1); background: var(--bg-card-hover); }
.deploy-tab-btn.active {
  background: var(--brand); color: #fff; border-color: var(--brand);
  box-shadow: 0 4px 14px rgba(2,132,199,0.35);
}

.deploy-sub-view { display: none; flex-direction: column; gap: 24px; }
.deploy-sub-view.active { display: flex; }

.deploy-grid-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
@media (max-width: 1000px) { .deploy-grid-layout { grid-template-columns: 1fr; } }

/* Drag and Drop Zone */
.drop-zone {
  border: 2px dashed var(--border-hover); border-radius: var(--r-xl);
  padding: 36px 20px; text-align: center; cursor: pointer;
  background: rgba(2,132,199,0.03); transition: all var(--t-smooth);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.drop-zone:hover, .drop-zone.drag-over {
  background: rgba(2,132,199,0.08); border-color: var(--brand);
  transform: scale(1.01);
}
.drop-icon { font-size: 2.75rem; margin-bottom: 10px; }
.drop-title { font-size: 1.0625rem; font-weight: 700; color: var(--text-1); }
.drop-sub { font-size: 0.8125rem; color: var(--text-3); margin-top: 4px; }

.selected-file-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--brand-muted); border: 1px solid var(--brand-border);
  padding: 6px 14px; border-radius: var(--r-full); margin-top: 14px;
  font-size: 0.84375rem; font-weight: 600; color: var(--brand);
}

/* Stacks grid */
.stacks-grid { display: flex; flex-direction: column; gap: 10px; }
.stack-badge-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-subtle); border: 1px solid var(--border-base);
  padding: 10px 14px; border-radius: var(--r-md);
}
.sbc-icon { font-size: 1.5rem; flex-shrink: 0; }
.stack-badge-card div { display: flex; flex-direction: column; }
.stack-badge-card strong { font-size: 0.875rem; color: var(--text-1); }
.stack-badge-card span { font-size: 0.75rem; color: var(--text-3); }

.alert-box-info {
  background: rgba(2,132,199,0.08); border: 1px solid var(--brand-border);
  padding: 12px 16px; border-radius: var(--r-md); font-size: 0.8125rem; color: var(--text-2);
}
.alert-box-info code { background: rgba(0,0,0,0.2); padding: 2px 5px; border-radius: var(--r-xs); font-family: var(--font-mono); }

/* Pipeline Stepper (9 steps) */
.pipeline-stepper {
  display: flex; align-items: center; justify-content: space-between;
  overflow-x: auto; padding: 14px 4px; gap: 6px;
  border-bottom: 1px solid var(--border-base); margin-bottom: 18px;
}
.step-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 10px; border-radius: var(--r-md); background: var(--bg-subtle);
  border: 1px solid var(--border-base); min-width: 68px; text-align: center;
  transition: all var(--t-fast);
}
.step-icon { font-size: 1.25rem; }
.step-label { font-size: 0.6875rem; font-weight: 700; color: var(--text-3); text-transform: uppercase; }
.step-arrow { color: var(--text-4); font-weight: 700; font-size: 0.875rem; }

.step-item.step-active {
  border-color: var(--brand); background: var(--brand-muted);
  box-shadow: 0 0 12px rgba(2,132,199,0.3); transform: scale(1.05);
}
.step-item.step-active .step-label { color: var(--brand); }
.step-item.step-done {
  border-color: rgba(16,185,129,0.4); background: var(--success-bg);
}
.step-item.step-done .step-label { color: var(--success); }
.step-item.step-failed {
  border-color: rgba(239,68,68,0.4); background: var(--danger-bg);
}
.step-item.step-failed .step-label { color: var(--danger); }

/* Terminal Console */
.terminal-card {
  background: #050811; border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--r-md); overflow: hidden;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.6);
}
.terminal-header {
  display: flex; justify-content: space-between; align-items: center;
  background: #0c1222; padding: 10px 16px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.terminal-dots { display: flex; gap: 6px; }
.terminal-dots span { width: 10px; height: 10px; border-radius: 50%; }
.terminal-dots span:nth-child(1) { background: #ef4444; }
.terminal-dots span:nth-child(2) { background: #f59e0b; }
.terminal-dots span:nth-child(3) { background: #10b981; }
.terminal-title { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-3); }
.terminal-body {
  height: 240px; overflow-y: auto; padding: 14px;
  font-family: var(--font-mono); font-size: 0.8125rem; color: #a5b4fc;
  display: flex; flex-direction: column; gap: 4px;
}
.log-line { line-height: 1.4; word-break: break-all; }
.log-err { color: #f87171; font-weight: 700; }
.log-build { color: #94a3b8; }

/* Deployed Apps Grid */
.deployed-apps-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px;
}
.deployed-app-card {
  background: var(--bg-surface); border: 1px solid var(--border-card);
  border-radius: var(--r-lg); padding: 20px; display: flex; flex-direction: column;
  justify-content: space-between; gap: 16px; box-shadow: var(--shadow-card);
  transition: all var(--t-smooth);
}
.deployed-app-card:hover {
  border-color: var(--border-hover); transform: translateY(-3px); box-shadow: var(--shadow-hover);
}
.dac-header { display: flex; align-items: center; gap: 12px; }
.dac-icon { font-size: 2rem; }
.dac-title-group { flex: 1; }
.dac-title-group h3 { font-size: 1.0625rem; font-weight: 700; color: var(--text-1); }
.stack-pill {
  display: inline-block; font-size: 0.6875rem; font-weight: 700; text-transform: uppercase;
  background: var(--bg-subtle); border: 1px solid var(--border-base);
  padding: 2px 8px; border-radius: var(--r-full); color: var(--brand); margin-top: 2px;
}
.dac-meta-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  background: var(--bg-subtle); padding: 12px; border-radius: var(--r-sm); font-size: 0.8125rem;
}
.dac-label { color: var(--text-3); }
.dac-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* Security Checks List */
.security-checks-list { display: flex; flex-direction: column; gap: 12px; }
.security-check-card {
  background: var(--bg-surface); border: 1px solid var(--border-card);
  border-radius: var(--r-md); padding: 16px 20px; display: flex; flex-direction: column; gap: 8px;
}
.security-check-card.status-ok { border-left: 4px solid var(--success); }
.security-check-card.status-warning { border-left: 4px solid var(--warning); background: rgba(245,158,11,0.02); }
.security-check-card.status-error { border-left: 4px solid var(--danger); background: rgba(239,68,68,0.03); }
.scc-header { display: flex; justify-content: space-between; align-items: center; }
.scc-title { font-size: 0.9375rem; font-weight: 700; color: var(--text-1); }
.scc-desc { font-size: 0.84375rem; color: var(--text-2); }
.scc-action { font-size: 0.8125rem; color: var(--warning); background: var(--warning-bg); padding: 8px 12px; border-radius: var(--r-xs); }
.scc-action code { font-family: var(--font-mono); color: var(--text-1); }

/* Backup Module */
.backup-grid-layout { display: grid; grid-template-columns: 3fr 2fr; gap: 24px; }
@media (max-width: 900px) { .backup-grid-layout { grid-template-columns: 1fr; } }
.backup-kpis-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.backup-kpi-box { background: var(--bg-subtle); padding: 14px; border-radius: var(--r-md); border: 1px solid var(--border-base); }
.bkb-label { display: block; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; color: var(--text-3); }
.bkb-val { display: block; font-size: 1rem; font-weight: 700; color: var(--text-1); margin-top: 4px; }
#bkb-message.bkb-warn { color: var(--warning, #fbbf24); font-weight: 600; }

/* Pulse Animation for New badge */
.badge-pulse { animation: badgePulse 2s infinite; }
@keyframes badgePulse { 0%,100%{transform:scale(1);opacity:1;} 50%{transform:scale(1.1);opacity:0.8;} }

/* Deploy Center: one clear publication flow */
.deploy-create-shell { max-width: 1040px; margin: 0 auto; }
.deploy-create-card { gap: 24px; }
.deploy-eyebrow { display:inline-block; margin-bottom:7px; color:var(--brand); font-size:.6875rem; font-weight:800; letter-spacing:.09em; }
.deploy-source-switch { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:10px; padding:6px; background:var(--bg-deep); border:1px solid var(--border-card); border-radius:14px; }
.deploy-source-option { appearance:none; border:0; display:flex; align-items:center; gap:12px; padding:13px 15px; text-align:left; color:var(--text-2); background:transparent; border-radius:10px; cursor:pointer; transition:background .18s,color .18s,box-shadow .18s; }
.deploy-source-option:hover { background:rgba(36,161,230,.08); color:var(--text-1); }
.deploy-source-option.active { color:var(--text-1); background:var(--bg-card); box-shadow:0 1px 5px rgba(0,0,0,.2); }
.deploy-source-option strong,.deploy-source-option small { display:block; }
.deploy-source-option strong { font-size:.875rem; }
.deploy-source-option small { margin-top:2px; color:var(--text-3); font-size:.75rem; }
.deploy-source-icon { width:32px; height:32px; display:grid; place-items:center; border-radius:9px; background:rgba(36,161,230,.14); color:var(--brand); font-size:1.1rem; font-weight:800; }
.deploy-source-panel { display:none; border-top:1px solid var(--border-card); padding-top:22px; }
.deploy-source-panel.active { display:block; }
.deploy-source-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:20px; }
.deploy-source-heading h3 { margin:0; font-size:1rem; color:var(--text-1); }
.deploy-source-heading p { margin:5px 0 0; color:var(--text-3); font-size:.8125rem; }
.deploy-path-preview { white-space:nowrap; padding:6px 9px; border-radius:7px; background:rgba(36,161,230,.08); color:var(--brand); font-family:var(--font-mono); font-size:.6875rem; }
.deploy-advanced { margin-top:16px; padding:12px 14px; border:1px solid var(--border-card); border-radius:9px; }
.deploy-advanced summary,.deploy-support-details summary { cursor:pointer; color:var(--text-2); font-size:.8125rem; font-weight:600; }
.deploy-advanced .form-field { margin-top:14px; }
.deploy-footer { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-top:20px; padding-top:18px; border-top:1px solid var(--border-card); }
.deploy-publish-options { display:flex; flex-wrap:wrap; gap:8px 22px; }
.deploy-publish-options .toggle-row { gap:10px; font-size:.8125rem; }
.deploy-publish-options .toggle-row span { white-space:nowrap; }
.deploy-footer .btn span { margin-left:7px; font-size:1.1em; }
.deploy-support-details { max-width:1040px; margin:16px auto 0; padding:15px 18px; border:1px solid var(--border-card); border-radius:var(--r-lg); background:var(--bg-card); }
.deploy-support-details .stacks-grid { margin-top:18px; }
@media (max-width:700px) {
  .deploy-source-switch { grid-template-columns:1fr; }
  .deploy-source-heading,.deploy-footer { align-items:stretch; flex-direction:column; }
  .deploy-path-preview { align-self:flex-start; }
  .deploy-footer .btn { width:100%; justify-content:center; }
}

/* ── Backup jobs (Agendamentos) v2 ─────────────────────────────── */
.bj-empty-hint { padding: 8px 0; }
.bj-card { background: var(--bg-subtle, rgba(255,255,255,0.03)); border: 1px solid var(--border-base, rgba(255,255,255,0.08)); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 12px; }
.bj-card:hover { border-color: rgba(255,255,255,0.16); }
.bj-card-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.bj-card-head .bj-name { flex: 1; min-width: 160px; background: transparent; border: 1px solid transparent; border-radius: 8px; color: var(--text-1, #e2e8f0); font-weight: 600; font-size: 0.95rem; padding: 6px 8px; }
.bj-card-head .bj-name:hover { border-color: var(--border-base, rgba(255,255,255,0.12)); }
.bj-card-head .bj-name:focus { outline: none; border-color: var(--brand, #0284c7); background: rgba(0,0,0,0.2); }
.bj-switch { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8125rem; color: var(--text-2, #94a3b8); cursor: pointer; white-space: nowrap; }
.bj-switch input { accent-color: var(--brand, #0284c7); width: 15px; height: 15px; cursor: pointer; }
.bj-locked { font-size: 0.75rem; color: var(--text-2, #94a3b8); background: rgba(255,255,255,0.05); border: 1px solid var(--border-base, rgba(255,255,255,0.08)); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.bj-delete { background: transparent; border: 1px solid rgba(248,113,113,0.35); color: #f87171; border-radius: 8px; padding: 5px 10px; font-size: 0.8rem; cursor: pointer; white-space: nowrap; transition: background .15s ease, border-color .15s ease; }
.bj-delete:hover { background: rgba(248,113,113,0.12); border-color: rgba(248,113,113,0.6); }
.bj-fields { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.bj-field { display: flex; flex-direction: column; gap: 6px; }
.bj-field > label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-2, #94a3b8); font-weight: 600; }
.bj-field input[type="number"] { width: 74px; background: var(--bg-card, #0b1220); border: 1px solid var(--border-base, rgba(255,255,255,0.1)); border-radius: 8px; color: var(--text-1, #e2e8f0); padding: 6px 8px; font-size: 0.875rem; }
.bj-field input[type="number"]:focus { outline: none; border-color: var(--brand, #0284c7); box-shadow: 0 0 0 3px rgba(2,132,199,0.14); }
.bj-days { display: flex; gap: 4px; flex-wrap: wrap; }
.day-chip { background: transparent; border: 1px solid var(--border-base, rgba(255,255,255,0.12)); color: var(--text-2, #94a3b8); border-radius: 8px; padding: 5px 9px; font-size: 0.75rem; font-weight: 600; cursor: pointer; transition: all .15s ease; }
.day-chip:hover { border-color: rgba(255,255,255,0.3); color: var(--text-1, #e2e8f0); }
.day-chip.on { background: var(--brand, #0284c7); border-color: var(--brand, #0284c7); color: #fff; }

/* ── Histórico & Restauração ─────────────────────────────────────── */
.mono-id { font-size: 0.8rem; color: var(--info, #60a5fa); }
.btn-restore { white-space: nowrap; }
.btn-restore:disabled { opacity: 0.45; cursor: not-allowed; }
.restore-banner { background: rgba(2,132,199,0.12); border: 1px solid rgba(96,165,250,0.35); color: #93c5fd; border-radius: 10px; padding: 10px 14px; font-size: 0.875rem; display: flex; align-items: center; }
.restore-banner.hidden { display: none; }
.restore-spinner { display: inline-block; width: 12px; height: 12px; border: 2px solid rgba(255,255,255,0.25); border-top-color: #60a5fa; border-radius: 50%; animation: restore-spin 0.8s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes restore-spin { to { transform: rotate(360deg); } }


/* ── Usuários / RBAC ─────────────────────────────────────────────── */
.users-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.user-stat { background: var(--bg-card, #0b1220); border: 1px solid var(--border-base, rgba(255,255,255,0.08)); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.user-stat-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-2, #94a3b8); font-weight: 600; }
.user-stat-value { font-size: 1.5rem; font-weight: 700; color: var(--text-1, #e2e8f0); }
.role-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em; border: 1px solid transparent; white-space: nowrap; }
.role-pill.role-root      { background: rgba(239,68,68,0.14);  border-color: rgba(239,68,68,0.35);  color: #fca5a5; }
.role-pill.role-sysadmin  { background: rgba(245,158,11,0.14); border-color: rgba(245,158,11,0.35); color: #fcd34d; }
.role-pill.role-developer { background: rgba(2,132,199,0.14);  border-color: rgba(2,132,199,0.35);  color: #7dd3fc; }
.role-pill.role-user1     { background: rgba(16,185,129,0.14); border-color: rgba(16,185,129,0.35); color: #6ee7b7; }
.state-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 0.8125rem; font-weight: 600; }
.state-pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.state-pill.on  { color: var(--success, #10b981); }
.state-pill.off { color: var(--text-2, #94a3b8); }
.user-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.user-actions .btn { padding: 4px 9px; font-size: 0.75rem; }
.lock-icon { opacity: 0.75; margin-left: 4px; }
