/* ═══════════════════════════════════════════════════════════════
   HEXSTACK SECURITY CENTER - NEO-SURFACE STYLING
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg-darkest: #07090e;
  --bg-darker: #0d1117;
  --bg-card: #131823;
  --bg-card-hover: #182030;
  --bg-surface: #1e2638;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(56, 189, 248, 0.4);
  --border-danger: rgba(239, 68, 68, 0.4);

  --accent-cyan: #38bdf8;
  --accent-blue: #3b82f6;
  --accent-emerald: #10b981;
  --accent-purple: #a855f7;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-glow: 0 0 20px rgba(56, 189, 248, 0.15);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg-darkest);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* TOP NAVIGATION */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 24px;
  background: var(--bg-darker);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.logo-shield {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(59, 130, 246, 0.3));
  border: 1px solid var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  box-shadow: var(--shadow-glow);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 15px;
  color: #fff;
}

.brand-sub {
  font-size: 11px;
  color: var(--accent-cyan);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.security-posture-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-emerald);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
}

.avatar-sm {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
}

.user-name {
  font-size: 13px;
  font-weight: 500;
}

/* MAIN LAYOUT */
.main-layout {
  display: flex;
  min-height: calc(100vh - 64px);
}

/* SIDEBAR */
.sidebar {
  width: 250px;
  background: var(--bg-darker);
  border-right: 1px solid var(--border-subtle);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sidebar-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  padding: 0 12px 10px 12px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.nav-item:hover {
  background: var(--bg-card);
  color: var(--text-main);
}

.nav-item.active {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.3);
  color: var(--accent-cyan);
}

.sidebar-footer {
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.server-status-widget {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-dim);
}

.status-indicator.live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-emerald);
}

/* CONTENT PANEL */
.content-panel {
  flex: 1;
  padding: 32px 40px;
  max-width: 1100px;
  margin: 0 auto;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.panel-title {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}

.panel-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #fff;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-success {
  background: var(--accent-emerald);
  color: #000;
  font-weight: 700;
}

.btn-danger {
  background: var(--accent-rose);
  color: #fff;
}

.btn-danger-outline {
  background: transparent;
  color: var(--accent-rose);
  border: 1px solid var(--border-danger);
}

.btn-danger-outline:hover {
  background: rgba(244, 63, 94, 0.1);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* CARDS & SURFACES */
.card-surface {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
}

/* HEALTH SCORE CARD */
.score-card {
  display: flex;
  align-items: center;
  gap: 32px;
  background: linear-gradient(135deg, #131b2c 0%, #0d121e 100%);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-glow);
}

.score-dial {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 4px solid var(--accent-cyan);
  background: rgba(56, 189, 248, 0.05);
}

.score-number {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  font-family: var(--font-mono);
}

.score-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 0.08em;
}

.score-details h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}

.score-details p {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 14px;
  max-width: 600px;
}

.score-tags {
  display: flex;
  gap: 8px;
}

.tag {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
}

.tag-success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.tag-info {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

/* CARDS GRID */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.2s ease;
}

.feature-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-icon.blue { background: rgba(56, 189, 248, 0.15); color: var(--accent-cyan); }
.card-icon.emerald { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }
.card-icon.purple { background: rgba(168, 85, 247, 0.15); color: var(--accent-purple); }
.card-icon.amber { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }

.card-info h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.card-info p {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
  min-height: 36px;
}

/* WIZARD CONTAINER */
.wizard-container {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.wizard-steps-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.step-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
}

.step-badge.active {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.step-line {
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
  margin: 0 10px;
}

.wizard-step-content {
  display: none;
}

.wizard-step-content.active {
  display: block;
}

.wizard-step-content h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.wizard-step-content p {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 13px;
}

.wizard-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

/* FORMS */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.form-input {
  background: var(--bg-darkest);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 14px;
  color: #fff;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease;
}

.form-input:focus {
  border-color: var(--accent-cyan);
}

.form-input.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.15em;
}

.password-strength-bar {
  width: 100%;
  height: 4px;
  background: var(--bg-surface);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 4px;
}

.strength-fill {
  height: 100%;
  width: 0%;
  background: var(--accent-rose);
  transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-text {
  font-size: 11px;
  color: var(--text-dim);
}

/* FACTOR SELECTOR */
.mfa-factor-selector {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.factor-choice {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-darkest);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 13px;
  color: var(--text-muted);
}

.factor-choice input {
  accent-color: var(--accent-cyan);
}

.factor-choice.active {
  border-color: var(--accent-cyan);
  color: #fff;
  background: rgba(56, 189, 248, 0.05);
}

/* 2FA SETUP STYLES */
.qr-box-wrapper {
  display: flex;
  gap: 32px;
  background: var(--bg-darkest);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 28px;
}

.qr-container {
  width: 160px;
  height: 160px;
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.secret-key-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.secret-field {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.secret-field code {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent-cyan);
}

.hint {
  font-size: 11px;
  color: var(--text-dim);
}

.inline-form {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.inline-form .form-input {
  max-width: 180px;
}

/* RECOVERY CODES */
.recovery-codes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 24px 0;
}

.code-pill {
  padding: 10px 16px;
  background: var(--bg-darkest);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent-cyan);
  text-align: center;
  letter-spacing: 0.1em;
}

.code-pill.hidden-pill {
  color: var(--text-dim);
}

/* AUDIT LOG TABLE */
.audit-table-wrapper {
  padding: 0;
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  padding: 12px 18px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-subtle);
}

.data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 13px;
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-main);
}

.empty-cell {
  text-align: center;
  padding: 32px !important;
  color: var(--text-dim);
}

/* SESSIONS */
.sessions-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.session-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

.session-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
}

.session-meta {
  flex: 1;
}

.session-header-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.session-header-row h4 {
  font-size: 14px;
  font-weight: 600;
}

.session-meta p {
  font-size: 12px;
  color: var(--text-dim);
}

/* MODAL BACKDROP */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-card {
  background: var(--bg-darker);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 440px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 20px;
  cursor: pointer;
}

.modal-body {
  padding: 24px;
}

.modal-body p {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 18px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  background: var(--bg-darkest);
  border-top: 1px solid var(--border-subtle);
}
