:root {
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-title: 'Outfit', sans-serif;

  --orange: #F5821F;
  --orange-rgb: 245, 130, 31;
  --orange-hover: #e06810;
  --orange-glow: rgba(245, 130, 31, 0.25);
  --orange-subtle: rgba(245, 130, 31, 0.10);
  
  --glass-bg: rgba(17, 40, 85, 0.52);
  --glass-border: rgba(255, 255, 255, 0.11);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  
  --navy: #0C2A54;
  --navy-dark: #061226;
  
  --color-green: #10b981;
  --color-red: #ef4444;
  --color-yellow: #f59e0b;
  
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  
  --transition-speed: 0.3s;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--navy-dark);
  background-image: linear-gradient(135deg, #061226 0%, #0C2A54 45%, #0a1e3d 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-title);
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Background Glowing Orbs */
.bg-glow {
  position: fixed;
  width: 50vw;
  height: 50vw;
  max-width: 600px;
  max-height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  pointer-events: none;
  z-index: -1;
}

.bg-glow-orange {
  top: -10%;
  right: -5%;
  background: var(--orange);
}

.bg-glow-blue {
  bottom: -10%;
  left: -5%;
  background: #0070f3;
}

/* Liquid Glass Panel */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 20px;
  transition: border-color var(--transition-speed), box-shadow var(--transition-speed), transform var(--transition-speed), background var(--transition-speed);
}

/* Buttons */
button, .btn-outline {
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: 500;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 0.9rem;
  transition: all var(--transition-speed) ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-hover) 100%);
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px rgba(var(--orange-rgb), 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #ff9132 0%, var(--orange) 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(var(--orange-rgb), 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.15);
  text-decoration: none;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

/* Header */
.header {
  margin: 20px auto;
  width: 92%;
  max-width: 1400px;
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.dome-logo {
  height: 46px;
  width: auto;
  filter: drop-shadow(0 2px 10px rgba(var(--orange-rgb), 0.2));
}

.logo-text h1 {
  font-size: 1.5rem;
  color: #fff;
  font-weight: 700;
  line-height: 1.1;
  background: linear-gradient(135deg, #ffffff 60%, rgba(255,255,255,0.7));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-text .subtitle {
  font-size: 0.72rem;
  color: var(--orange);
  font-weight: 600;
  letter-spacing: 0.15em;
  margin-top: 2px;
}

.header-widgets {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.widget-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
}

.widget-icon {
  width: 20px;
  height: 20px;
  color: var(--orange);
}

.widget-icon svg {
  width: 100%;
  height: 100%;
}

.widget-details {
  display: flex;
  flex-direction: column;
}

.widget-val {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  font-family: var(--font-title);
}

.widget-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.settings-toggle-btn {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  padding: 0;
}

.settings-toggle-btn svg {
  width: 22px;
  height: 22px;
  transition: transform 0.5s ease;
}

.settings-toggle-btn:hover svg {
  transform: rotate(45deg);
}

.user-profile-widget {
  border-color: rgba(var(--orange-rgb), 0.25);
  background: rgba(var(--orange-rgb), 0.05);
}

.user-profile-widget .widget-val {
  color: var(--orange);
}

/* Dashboard Container */
.dashboard-container {
  width: 92%;
  max-width: 1400px;
  margin: 10px auto 40px auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Status Banner */
.status-banner {
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.status-summary {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-summary p {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.status-summary strong {
  color: #fff;
}

.status-summary-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  position: relative;
}

.status-summary-dot.online {
  background-color: var(--color-green);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.btn-refresh-status svg {
  width: 16px;
  height: 16px;
}

.icon-spin-hover:hover {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* System Tiles Grid */
.system-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 24px;
}

/* ── Centered Card Bubbles ─────────────────────────────────────── */
.system-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 28px;
  min-height: 310px;
  overflow: hidden;
  box-shadow: var(--glass-shadow);
  cursor: pointer;
}

.system-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: transparent;
  transition: background var(--transition-speed) ease;
}

.system-card:hover {
  transform: translateY(-6px);
  background: rgba(22, 54, 110, 0.65);
  border-color: rgba(var(--orange-rgb), 0.35);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 15px rgba(var(--orange-rgb), 0.08);
}

.system-card:hover::before {
  background: linear-gradient(90deg, var(--orange), #ff9f43);
}

.card-glow {
  position: absolute;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(var(--orange-rgb), 0.1) 0%, transparent 70%);
  top: -75px;
  right: -75px;
  pointer-events: none;
  transition: transform 0.5s ease;
}

.system-card:hover .card-glow {
  transform: scale(1.5);
}

.card-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  width: 100%;
}

.status-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.status-badge.online {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-green);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-badge.online::before {
  background: var(--color-green);
  box-shadow: 0 0 6px var(--color-green);
  animation: pulse 2s infinite;
}

.status-badge.offline {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-red);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-badge.offline::before {
  background: var(--color-red);
  box-shadow: 0 0 6px var(--color-red);
}

.status-badge.checking {
  background: rgba(245, 158, 11, 0.1);
  color: var(--color-yellow);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-badge.checking::before {
  background: var(--color-yellow);
  box-shadow: 0 0 6px var(--color-yellow);
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

.service-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--orange);
  transition: all var(--transition-speed) ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.system-card:hover .service-icon {
  background: rgba(var(--orange-rgb), 0.12);
  border-color: rgba(var(--orange-rgb), 0.25);
  color: #fff;
  box-shadow: 0 4px 10px rgba(var(--orange-rgb), 0.15);
}

.service-icon svg {
  width: 26px;
  height: 26px;
}

.card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.card-body h2 {
  font-size: 1.35rem;
  color: #fff;
  margin-bottom: 12px;
}

.service-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 18px;
  min-height: 54px;
}

.url-display {
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.25);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.03);
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-footer {
  display: flex;
  gap: 12px;
  margin-top: 25px;
  width: 100%;
}

.card-footer button, .card-footer a {
  flex: 1;
}

/* ─────────────────────────────────────────────────────────────
   AUTHENTICATION LAYOUTS & FORMS
   ───────────────────────────────────────────────────────────── */

.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 8, 17, 0.9);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.login-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.login-card {
  width: 420px;
  max-width: 90%;
  padding: 45px 35px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transform: translateY(20px);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  background: rgba(17, 45, 100, 0.55);
}

.login-overlay.active .login-card {
  transform: translateY(0);
}

.login-logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 30px;
}

.login-logo-container h1 {
  font-size: 1.8rem;
  color: #fff;
  font-weight: 700;
  margin-top: 12px;
}

.login-logo-container .subtitle {
  font-size: 0.75rem;
  color: var(--orange);
  font-weight: 600;
  letter-spacing: 0.18em;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-group input {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px 16px;
  color: #fff;
  font-size: 0.95rem;
  transition: all var(--transition-speed);
}

.form-group input:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 2px rgba(var(--orange-rgb), 0.25);
  background: rgba(0, 0, 0, 0.4);
}

.login-submit-btn {
  padding: 12px;
  font-weight: 600;
  font-size: 1rem;
  margin-top: 10px;
}

.login-error-msg {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  color: #ff8080;
  padding: 10px 14px;
  font-size: 0.85rem;
  text-align: center;
  display: none;
}

/* ─────────────────────────────────────────────────────────────
   WIDER & CLEANER SETTINGS SLIDER
   ───────────────────────────────────────────────────────────── */

.settings-slider {
  position: fixed;
  top: 0;
  right: -550px; /* Increased drawer panel width */
  width: 550px;
  max-width: 100vw;
  height: 100vh;
  background: #061327;
  border-left: 1px solid var(--glass-border);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.6);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.settings-slider.active {
  right: 0;
}

.settings-header {
  padding: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.settings-header h2 {
  font-size: 1.40rem;
  color: #fff;
}

.settings-close-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.settings-close-btn svg {
  width: 24px;
  height: 24px;
}

.settings-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.15);
}

.settings-tab-btn {
  flex: 1;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 0;
  padding: 14px;
  font-size: 0.9rem;
  font-weight: 500;
}

.settings-tab-btn:hover {
  background: rgba(255, 255, 255, 0.02);
  color: #fff;
}

.settings-tab-btn.active {
  color: var(--orange);
  border-bottom-color: var(--orange);
  background: rgba(var(--orange-rgb), 0.03);
}

.settings-tab-content {
  display: none;
  flex-direction: column;
  gap: 20px;
}

.settings-tab-content.active {
  display: flex;
}

.settings-body {
  padding: 24px;
  flex: 1;
  overflow-y: auto;
}

.settings-intro {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.settings-helper-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: -5px;
  line-height: 1.4;
}

/* Inner config editor card boxes inside settings drawer */
.settings-card-editor {
  padding: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}

.editor-header {
  font-size: 0.98rem;
  color: var(--orange);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.settings-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-form-group label {
  font-size: 0.8rem;
  font-weight: 500;
  color: #fff;
}

.settings-form-group input, .settings-form-group textarea {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 10px 12px;
  color: #fff;
  font-size: 0.85rem;
  transition: border-color var(--transition-speed);
}

.settings-form-group textarea {
  resize: vertical;
  font-family: var(--font-sans);
}

.settings-form-group input:focus, .settings-form-group textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 2px rgba(var(--orange-rgb), 0.15);
}

.settings-actions {
  display: flex;
  gap: 12px;
}

.settings-actions button {
  flex: 1;
}

.settings-slider-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.settings-slider-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* ── Access Permissions Checkboxes ──────────────────────────────── */
.access-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 25px;
}

.access-section:last-child {
  border-bottom: none;
}

.access-section h3 {
  font-size: 1.1rem;
  color: #fff;
}

.role-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 8px;
}

.role-row-group h4 {
  font-size: 0.85rem;
  color: var(--orange);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.check-container {
  display: block;
  position: relative;
  padding-left: 30px;
  margin-bottom: 12px;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text-secondary);
  user-select: none;
  transition: color var(--transition-speed);
}

.check-container:hover {
  color: #fff;
}

.check-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 18px;
  width: 18px;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  transition: all var(--transition-speed);
}

.check-container:hover input ~ .checkmark {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.check-container input:checked ~ .checkmark {
  background-color: var(--orange);
  border-color: var(--orange);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.check-container input:checked ~ .checkmark:after {
  display: block;
}

.check-container .checkmark:after {
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* User Directory List & Forms */
.section-sub-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.form-group-sub {
  display: flex;
  gap: 8px;
  width: 100%;
}

.form-group-sub input, .form-group-sub select {
  flex: 1;
  min-width: 0;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 10px 14px;
  color: #fff;
  font-size: 0.85rem;
  height: 38px;
}

.form-group-sub input:focus, .form-group-sub select:focus {
  outline: none;
  border-color: var(--orange);
}

.form-group-creds {
  margin-top: 10px;
}

.add-user-box {
  padding: 22px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255,255,255,0.05);
}

.user-list-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 250px;
  overflow-y: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 12px;
}

.user-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.user-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.user-item-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
}

.user-item-role {
  font-size: 0.72rem;
  color: var(--orange);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.btn-user-delete {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: var(--color-red);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
}

.btn-user-delete:hover {
  background: var(--color-red);
  color: #fff;
}

/* ─────────────────────────────────────────────────────────────
   IFRAME MODAL VIEWER
   ───────────────────────────────────────────────────────────── */

.frame-modal {
  position: fixed;
  top: 0;
  right: -100vw;
  width: 80vw;
  height: 100vh;
  background: #050b14;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.6);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.frame-modal.active {
  right: 0;
}

.modal-header {
  padding: 16px 24px;
  background: rgba(10, 20, 38, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.modal-status-dot.online { background-color: var(--color-green); box-shadow: 0 0 8px var(--color-green); }
.modal-status-dot.offline { background-color: var(--color-red); box-shadow: 0 0 8px var(--color-red); }

#modal-app-name {
  color: #fff;
  font-size: 1.15rem;
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-modal-action {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-speed);
  cursor: pointer;
}

.btn-modal-action:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.btn-modal-action svg {
  width: 18px;
  height: 18px;
}

.btn-modal-close {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--color-red);
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-speed);
}

.btn-modal-close:hover {
  background: var(--color-red);
  color: #fff;
}

.btn-modal-close svg {
  width: 20px;
  height: 20px;
}

.modal-body {
  flex: 1;
  position: relative;
  background: #000;
}

.frame-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #050b14;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  z-index: 5;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.frame-loader.hidden {
  opacity: 0;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.05);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.frame-loader p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.iframe-container {
  width: 100%;
  height: 100%;
}

#app-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
}

.frame-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.frame-modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* Footer */
.footer {
  text-align: center;
  padding: 30px;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: auto;
}

/* Media Queries */
@media (max-width: 1024px) {
  .frame-modal {
    width: 95vw;
  }
}

@media (max-width: 768px) {
  .header {
    flex-direction: column;
    align-items: stretch;
    padding: 20px;
    width: 95%;
  }

  .logo-container {
    justify-content: center;
  }

  .header-widgets {
    justify-content: center;
  }

  .dashboard-container {
    width: 95%;
  }

  .status-banner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 15px;
  }

  .status-summary {
    justify-content: center;
  }

  .btn-refresh-status {
    width: 100%;
  }

  .system-grid {
    grid-template-columns: 1fr;
  }
  
  .settings-slider {
    width: 100vw;
  }
}

/* ─────────────────────────────────────────────────────────────
   CARD DEVELOPMENT OVERLAY STYLES
   ───────────────────────────────────────────────────────────── */

.system-card.disabled-tile {
  pointer-events: none;
}

.dev-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 12, 28, 0.76);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-speed) ease;
}

.system-card.disabled-tile .dev-overlay {
  opacity: 1;
  pointer-events: all;
}

.dev-overlay-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dev-overlay-content svg {
  filter: drop-shadow(0 2px 8px rgba(var(--orange-rgb), 0.35));
}

/* Profile updates messaging */
.profile-error-msg {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  color: #ff8080;
  padding: 10px 14px;
  font-size: 0.85rem;
  text-align: center;
}

.profile-success-msg {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 8px;
  color: #80ff80;
  padding: 10px 14px;
  font-size: 0.85rem;
  text-align: center;
}

/* Systems config list container (removes inner scrollbar) */
.systems-list-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 12px;
}

