:root {
  --brand-blue: #0057b8;
  --brand-blue-hover: #004494;
  --bg: #0b0f19;
  --card-bg: #111827;
  --card-hover: #162032;
  --border: #1f2937;
  --border-hover: #374151;
  --text: #f3f4f6;
  --text-muted: #9ca3af;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --purple: #8b5cf6;
}

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  width: 100%;
  padding: 32px 20px;
  flex: 1;
}

/* Typography */
.wordmark {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.wordmark span { color: var(--brand-blue); }
.tagline {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

/* Orko Mascot & Animations */
@keyframes orkoFloat {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-7px) rotate(-1.5deg); }
}

.orko-avatar {
  animation: orkoFloat 3.2s ease-in-out infinite;
}

.orko-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
  position: relative;
}

.orko-speech-bubble {
  position: relative;
  background: #172133;
  border: 1px solid #2a3a52;
  border-radius: 12px;
  padding: 10px 16px;
  color: #e2e8f0;
  font-size: 0.86rem;
  line-height: 1.4;
  text-align: center;
  margin-top: 14px;
  max-width: 320px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.orko-speech-bubble::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0 8px 8px 8px;
  border-style: solid;
  border-color: transparent transparent #2a3a52 transparent;
}
.orko-speech-bubble::after {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0 7px 7px 7px;
  border-style: solid;
  border-color: transparent transparent #172133 transparent;
}

/* Orko Banner in Launchpad / Admin */
.orko-banner {
  background: linear-gradient(135deg, rgba(0, 87, 184, 0.12) 0%, rgba(17, 24, 39, 0.6) 100%);
  border: 1px solid rgba(0, 87, 184, 0.35);
  border-radius: 12px;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
.orko-banner--admin {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.12) 0%, rgba(17, 24, 39, 0.6) 100%);
  border-color: rgba(139, 92, 246, 0.35);
}
.orko-banner__avatar svg {
  width: 58px;
  height: 58px;
}
.orko-banner__title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: #93c5fd;
  margin-bottom: 4px;
}
.orko-banner--admin .orko-banner__title {
  color: #c4b5fd;
}
.orko-banner__message {
  color: #cbd5e1;
  font-size: 0.9rem;
  line-height: 1.45;
}

/* Navbar */
.portal-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 16px;
}
.portal-navbar__user {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.user-info-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-family: 'IBM Plex Mono', monospace;
  color: #e2e8f0;
}
.user-role-pill {
  background: rgba(0, 87, 184, 0.25);
  color: #60a5fa;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}
.status-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--success);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  font-family: 'IBM Plex Mono', monospace;
}
.badge-blue { background: rgba(0, 87, 184, 0.15); color: #60a5fa; border: 1px solid rgba(0, 87, 184, 0.35); }
.badge-amber { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.35); }
.badge-green { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.35); }
.badge-purple { background: rgba(139, 92, 246, 0.15); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.35); }
.badge-red { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.35); }

/* Access Pills */
.access-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  font-family: 'IBM Plex Mono', monospace;
}
.access-pill--granted {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.access-pill--denied {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

/* Cards & Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.card:hover {
  border-color: var(--brand-blue);
  transform: translateY(-2px);
  background: var(--card-hover);
}
.card--restricted {
  opacity: 0.72;
  border-color: #263346;
}
.card--restricted:hover {
  border-color: var(--border-hover);
  transform: none;
}
.card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.card__badge {
  align-self: flex-start;
  background: rgba(0, 87, 184, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(0, 87, 184, 0.35);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  font-family: 'IBM Plex Mono', monospace;
}
.card__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}
.card__desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.45;
  margin-bottom: 20px;
  flex: 1;
}
.card__main-btn {
  display: block;
  text-align: center;
  background: var(--brand-blue);
  color: #fff;
  text-decoration: none;
  padding: 11px 18px;
  border-radius: 7px;
  font-weight: 600;
  font-size: 0.92rem;
  transition: background 0.15s;
  margin-bottom: 14px;
}
.card__main-btn:hover { background: var(--brand-blue-hover); }

.card__restricted-notice {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 8px;
  padding: 14px;
  text-align: center;
  color: #fca5a5;
  font-size: 0.85rem;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.card__restricted-notice small {
  color: #9ca3af;
  font-size: 0.78rem;
}

.quick-links {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.quick-links__label {
  font-size: 0.72rem;
  color: #6b7280;
  text-transform: uppercase;
  font-weight: 700;
  font-family: 'IBM Plex Mono', monospace;
}
.quick-link {
  color: #93c5fd;
  text-decoration: none;
  font-size: 0.84rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  transition: color 0.15s;
}
.quick-link:hover { color: #fff; }
.quick-link span:last-child { color: #4b5563; font-size: 0.78rem; }

/* Login Page Layout */
.login-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}
.login-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}
.login-header {
  text-align: center;
  margin-bottom: 24px;
}
.login-header .wordmark {
  justify-content: center;
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 6px;
  font-family: 'Inter', sans-serif;
}
.form-group label .required {
  color: var(--danger);
}
.form-input {
  width: 100%;
  background: #0d131f;
  border: 1px solid #232d3d;
  color: #f3f4f6;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(0, 87, 184, 0.25);
}
.form-input--table {
  padding: 6px 10px;
  font-size: 0.85rem;
  background: #090e17;
}
.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
  display: block;
}

.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.password-input-wrapper .form-input {
  padding-right: 42px;
}
.btn-toggle-pw {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px 8px;
  font-size: 1rem;
  border-radius: 4px;
}
.btn-toggle-pw:hover {
  color: #fff;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all 0.15s ease;
  font-family: 'Inter', sans-serif;
}
.btn-primary {
  background: var(--brand-blue);
  color: #fff;
}
.btn-primary:hover {
  background: var(--brand-blue-hover);
}
.btn-secondary {
  background: #1f2937;
  color: #cbd5e1;
  border-color: #374151;
}
.btn-secondary:hover {
  background: #374151;
  color: #fff;
}
.btn-outline {
  background: transparent;
  color: #93c5fd;
  border-color: rgba(0, 87, 184, 0.5);
}
.btn-outline:hover {
  background: rgba(0, 87, 184, 0.15);
  color: #fff;
}
.btn-success {
  background: #059669;
  color: #fff;
}
.btn-success:hover {
  background: #047857;
}
.btn-danger {
  background: #dc2626;
  color: #fff;
}
.btn-danger:hover {
  background: #b91c1c;
}
.btn-block {
  width: 100%;
}
.btn-sm {
  padding: 6px 12px;
  font-size: 0.82rem;
}
.btn-xs {
  padding: 4px 8px;
  font-size: 0.75rem;
  border-radius: 5px;
}

.login-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0 16px;
  color: #4b5563;
  font-size: 0.78rem;
}
.login-divider::before, .login-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}
.login-divider span {
  padding: 0 10px;
}

.login-footer {
  margin-top: 24px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
  font-size: 0.76rem;
  color: #6b7280;
}
.login-footer a {
  color: #9ca3af;
  text-decoration: none;
}
.login-footer a:hover {
  color: #fff;
}

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.86rem;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.alert-danger {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}
.alert-success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #86efac;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-dialog {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  animation: modalIn 0.2s ease-out;
  overflow: hidden;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.modal-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}
.btn-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}
.btn-close:hover { color: #fff; }
.modal-body {
  padding: 24px;
}
.modal-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 20px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

/* Admin Sections & Tables */
.admin-section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 28px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.section-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}
.table-responsive {
  overflow-x: auto;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}
.admin-table th {
  text-align: left;
  padding: 10px 12px;
  background: #0d1422;
  color: #9ca3af;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
  font-family: 'IBM Plex Mono', monospace;
}
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #1a2233;
  vertical-align: middle;
}
.admin-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.checkbox-custom {
  width: 18px;
  height: 18px;
  accent-color: var(--brand-blue);
  cursor: pointer;
}

.project-checkbox-group {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.project-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.project-checkbox input {
  accent-color: var(--brand-blue);
}

.empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.empty-state__icon {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 8px;
}

/* Footer */
.portal-footer {
  margin-top: 48px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  color: #6b7280;
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 10px;
}

/* Jurassic Park Dennis Nedry Modal & Terminal */
.nedry-modal-dialog {
  border-top: 4px solid #ef4444;
  border-color: #14532d;
  background: #0d1420;
  box-shadow: 0 24px 64px rgba(0,0,0,0.8), 0 0 30px rgba(0, 255, 102, 0.2);
  max-width: 480px;
}
.nedry-modal-body {
  padding: 28px 24px;
  text-align: center;
}
.nedry-gif-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}
.nedry-modal-gif {
  width: 180px;
  height: auto;
  border-radius: 12px;
  border: 2px solid #2a3d52;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6), 0 0 16px rgba(0, 255, 102, 0.25);
}
.jp-terminal-box {
  background: #020804;
  border: 1px solid #14532d;
  border-radius: 8px;
  padding: 12px 16px;
  margin: 16px 0;
  font-family: 'IBM Plex Mono', monospace;
  color: #00ff66;
  font-size: 0.88rem;
  line-height: 1.5;
  text-align: left;
  box-shadow: inset 0 0 12px rgba(0, 255, 102, 0.15);
}
.jp-terminal-box .blink {
  animation: terminalBlink 1s infinite;
}
@keyframes terminalBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
.nedry-error-text {
  color: #fca5a5;
  font-size: 0.88rem;
  margin-bottom: 10px;
}

/* Power of Grayskull Enhancements */
.grayskull-btn {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(234, 179, 8, 0.25));
  border: 1px solid #f59e0b;
  color: #fbbf24;
  font-weight: 700;
  border-radius: 8px;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.grayskull-btn:hover {
  background: #f59e0b;
  color: #0f172a;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.5);
  transform: translateY(-1px);
}

.banner-power-active {
  border-color: #f59e0b !important;
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.35) !important;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(17, 24, 39, 0.9) 100%) !important;
  transition: all 0.5s ease;
}

.orko-lightning-aura {
  animation: orko-pulse 0.8s infinite alternate ease-in-out;
  filter: drop-shadow(0 0 14px #ffd166) drop-shadow(0 0 25px #f59e0b);
}

@keyframes orko-pulse {
  0% { transform: scale(1) translateY(0); filter: drop-shadow(0 0 10px #ffd166); }
  100% { transform: scale(1.1) translateY(-6px); filter: drop-shadow(0 0 24px #f59e0b) drop-shadow(0 0 35px #fbbf24); }
}

/* Access Activity & Session Tracker Styles */
.activity-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.activity-kpi-card {
  background: rgba(13, 20, 34, 0.85);
  border: 1px solid #1e293b;
  border-radius: 10px;
  padding: 14px 16px;
}
.activity-kpi-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9ca3af;
  font-family: 'IBM Plex Mono', monospace;
  margin-bottom: 6px;
}
.activity-kpi-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
}
.activity-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  background: #0d1422;
  border: 1px solid #1e293b;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
  align-items: center;
}
.activity-filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 180px;
}
.activity-filter-item label {
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 600;
  white-space: nowrap;
}
.activity-row--online td {
  background: rgba(16, 185, 129, 0.05);
}
.duration-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.14);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.duration-pill--online {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
}


