/* ═══════════════════════════════════════════════════════
   SETTINGS PAGE
═══════════════════════════════════════════════════════ */

.settings-page {
  max-width: 900px;
}

.settings-page-header {
  margin-bottom: var(--space-8);
}

.settings-sections {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.settings-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* ── Role select (inline badge) ── */
.role-select {
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='currentColor' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  padding-right: 20px !important;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.role-select option {
  background: var(--color-bg-elevated);
  color: var(--color-text-primary);
  text-transform: none;
  letter-spacing: 0;
}

/* ── Danger icon button ── */
.btn-icon-danger {
  color: var(--color-text-muted);
  padding: var(--space-2);
  min-height: 36px;
  min-width: 36px;
}

.btn-icon-danger:hover:not(:disabled) {
  color: var(--color-error);
  background: var(--color-error-dim);
}

.btn-icon-danger:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.btn-icon-danger i { width: 16px; height: 16px; }

/* ── Plan modal active row ── */
.plan-active-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-5);
  padding: var(--space-4);
  background: var(--color-bg-elevated);
  border-radius: 10px;
  border: 1px solid var(--color-border-default);
}

/* ── Feature flags grid ── */
.flags-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

/* ── Log list ── */
.logs-list {
  display: flex;
  flex-direction: column;
}

.log-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--color-border-subtle);
  transition: background 0.15s ease;
}

.log-row:last-child {
  border-bottom: none;
}

.log-row:hover {
  background: rgba(0, 229, 255, 0.02);
}

.log-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}

.log-dot-success { background: var(--color-success); box-shadow: 0 0 6px rgba(16,185,129,0.5); }
.log-dot-warning { background: var(--color-warning); box-shadow: 0 0 6px rgba(245,158,11,0.5); }
.log-dot-error   { background: var(--color-error);   box-shadow: 0 0 6px rgba(239,68,68,0.5); }

.log-content {
  flex: 1;
  min-width: 0;
}

.log-desc {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-primary);
  margin-bottom: var(--space-1);
}

.log-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .flags-grid {
    grid-template-columns: 1fr;
  }

  .log-row {
    padding: var(--space-3) var(--space-4);
  }

  .log-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-1);
  }

  .plan-active-row {
    flex-direction: row;
  }
}

@media (max-width: 480px) {
  .settings-page {
    max-width: 100%;
  }
}
