/* modules/intentOsEntry.css */
/* IntentOS standalone entry point — deliberately its own visual identity,
   separate from wizardModule.css (the Daemon Wizard's stylesheet). Reuses
   the app's shared --bg/--text/--border tokens for theme consistency, but
   no class names or component shapes are shared with the Daemon Wizard. */

.intentos-entry-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.intentos-entry-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}

.intentos-entry-container {
  position: relative;
  width: 90%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--panel, #ffffff);
  border-radius: 14px;
  border: 1px solid var(--border-color, #e5e7eb);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  padding: 32px 28px 28px;
}

@media (prefers-color-scheme: dark) {
  .intentos-entry-container {
    background: var(--panel, #16161d);
    color: var(--text-primary, #ffffff);
  }
}

.intentos-entry-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-secondary, #6b7280);
  padding: 4px;
  border-radius: 6px;
}

.intentos-entry-close:hover {
  background: var(--bg-hover, #f3f4f6);
  color: var(--text-primary, #1f2937);
}

.intentos-entry-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7c5cff;
  margin-bottom: 6px;
}

.intentos-entry-title {
  margin: 0 0 8px 0;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--text-primary, #16161d);
}

@media (prefers-color-scheme: dark) {
  .intentos-entry-title {
    color: var(--text-primary, #ffffff);
  }
}

.intentos-entry-subtitle {
  margin: 0 0 22px 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary, #6b7280);
}

.intentos-entry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.intentos-entry-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  text-align: left;
  padding: 18px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-color, #e5e7eb);
  background: linear-gradient(160deg, rgba(124, 92, 255, 0.06), transparent 60%);
  cursor: pointer;
  transition: border-color 150ms, transform 150ms, background 150ms;
  font-family: inherit;
}

.intentos-entry-card:hover:not(:disabled) {
  border-color: #7c5cff;
  transform: translateY(-1px);
  background: linear-gradient(160deg, rgba(124, 92, 255, 0.14), transparent 60%);
}

.intentos-entry-card-disabled {
  cursor: default;
  opacity: 0.55;
}

.intentos-entry-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.intentos-entry-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary, #16161d);
}

@media (prefers-color-scheme: dark) {
  .intentos-entry-label {
    color: var(--text-primary, #ffffff);
  }
}

.intentos-entry-blurb {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary, #6b7280);
}

.intentos-entry-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 10px;
  background: var(--bg-secondary, #e5e7eb);
  color: var(--text-secondary, #6b7280);
}

.intentos-entry-footnote {
  margin: 0;
  font-size: 11.5px;
  color: var(--text-secondary, #9ca3af);
}

.intentos-entry-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(124, 92, 255, 0.25);
  border-top-color: #7c5cff;
  border-radius: 50%;
  animation: intentos-entry-spin 0.8s linear infinite;
}

@keyframes intentos-entry-spin {
  to { transform: rotate(360deg); }
}

.intentos-entry-card-error {
  margin-top: 4px;
  font-size: 11px;
  color: #ef4444;
}

.intentos-entry-textinput {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--border-color, #d1d5db);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: var(--input-bg, #ffffff);
  color: var(--text-primary, #1f2937);
  margin-bottom: 14px;
}

.intentos-entry-textinput:focus {
  outline: none;
  border-color: #7c5cff;
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.15);
}

@media (prefers-color-scheme: dark) {
  .intentos-entry-textinput {
    background: var(--input-bg, #23232e);
    border-color: var(--border-color, #4b5563);
    color: var(--text-primary, #ffffff);
  }
}

.intentos-entry-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid var(--border-color, #d1d5db);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 100px;
  background: var(--input-bg, #ffffff);
  color: var(--text-primary, #1f2937);
}

.intentos-entry-textarea:focus {
  outline: none;
  border-color: #7c5cff;
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.15);
}

@media (prefers-color-scheme: dark) {
  .intentos-entry-textarea {
    background: var(--input-bg, #23232e);
    border-color: var(--border-color, #4b5563);
    color: var(--text-primary, #ffffff);
  }
}

.intentos-entry-error {
  margin-top: -8px;
  font-size: 12px;
  color: #ef4444;
}

.intentos-entry-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.intentos-entry-btn-primary,
.intentos-entry-btn-back {
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
}

.intentos-entry-btn-primary {
  background: #7c5cff;
  color: white;
}

.intentos-entry-btn-primary:hover {
  background: #6a48f2;
}

.intentos-entry-btn-back {
  background: var(--bg-secondary, #f3f4f6);
  color: var(--text-primary, #1f2937);
  border: 1px solid var(--border-color, #d1d5db);
}

.intentos-entry-btn-back:hover {
  background: var(--bg-hover, #e5e7eb);
}

@media (prefers-color-scheme: dark) {
  .intentos-entry-btn-back {
    background: var(--bg-secondary, #2d2d2d);
    color: var(--text-primary, #ffffff);
    border-color: var(--border-color, #4b5563);
  }
}

.intentos-entry-birth {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 56px 0;
  text-align: center;
}

.intentos-entry-birth-glyph {
  font-size: 2.5rem;
  color: #7c5cff;
  animation: intentos-entry-birth-pulse 1.1s ease-in-out infinite;
}

.intentos-entry-birth-line {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary, #6b7280);
}

@keyframes intentos-entry-birth-pulse {
  0%, 100% { transform: scale(1); opacity: 0.75; }
  50% { transform: scale(1.25); opacity: 1; }
}

/* "Run locally" — modal-ui-hookup doc §3-§4 */

.intentos-orchestrator-section {
  margin-bottom: 16px;
}

.intentos-orchestrator-section-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary, #1f2937);
  margin-bottom: 6px;
}

@media (prefers-color-scheme: dark) {
  .intentos-orchestrator-section-label {
    color: var(--text-primary, #ffffff);
  }
}

.intentos-orchestrator-list {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary, #6b7280);
}

.intentos-orchestrator-note {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary, #9ca3af);
  margin: 8px 0 0;
}

.intentos-orchestrator-field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary, #1f2937);
  margin: 18px 0 6px;
}

@media (prefers-color-scheme: dark) {
  .intentos-orchestrator-field-label {
    color: var(--text-primary, #ffffff);
  }
}

.intentos-orchestrator-status-card {
  padding: 16px;
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(124, 92, 255, 0.08), transparent 60%);
  border: 1px solid var(--border-color, #e5e7eb);
  margin-bottom: 18px;
}

.intentos-orchestrator-status-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary, #16161d);
  margin-bottom: 4px;
}

@media (prefers-color-scheme: dark) {
  .intentos-orchestrator-status-title {
    color: var(--text-primary, #ffffff);
  }
}

.intentos-orchestrator-status-meta {
  font-size: 12px;
  color: var(--text-secondary, #6b7280);
  margin-bottom: 12px;
}

.intentos-orchestrator-status-task {
  font-size: 13px;
  color: var(--text-primary, #16161d);
  margin-bottom: 12px;
}

@media (prefers-color-scheme: dark) {
  .intentos-orchestrator-status-task {
    color: var(--text-primary, #ffffff);
  }
}

.intentos-orchestrator-status-task-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.intentos-orchestrator-status-task-row .intentos-orchestrator-status-task {
  margin-bottom: 0;
}

.intentos-orchestrator-status-task-empty {
  color: var(--text-secondary, #6b7280);
}

@media (prefers-color-scheme: dark) {
  .intentos-orchestrator-status-task-empty {
    color: var(--text-secondary, #9ca3af);
  }
}

.intentos-orchestrator-task-edit-trigger {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  color: #7c5cff;
  cursor: pointer;
}

.intentos-orchestrator-task-edit-trigger:hover {
  text-decoration: underline;
}

.intentos-orchestrator-status-task-edit {
  margin-bottom: 12px;
}

.intentos-orchestrator-status-task-edit .intentos-entry-textinput {
  margin-bottom: 8px;
}

.intentos-orchestrator-status-task-edit .intentos-entry-actions {
  justify-content: flex-start;
  gap: 8px;
}

.intentos-orchestrator-devices-link {
  display: inline-block;
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #7c5cff;
  cursor: pointer;
}

.intentos-orchestrator-devices-link:hover {
  text-decoration: underline;
}

.intentos-orchestrator-device-list {
  margin-bottom: 8px;
}

.intentos-orchestrator-device-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.intentos-orchestrator-device-row:last-child {
  border-bottom: none;
}

.intentos-orchestrator-device-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary, #16161d);
}

@media (prefers-color-scheme: dark) {
  .intentos-orchestrator-device-label {
    color: var(--text-primary, #ffffff);
  }
}

.intentos-orchestrator-device-meta {
  font-size: 12px;
  color: var(--text-secondary, #6b7280);
  margin-top: 2px;
}

.intentos-orchestrator-device-view {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  background: var(--bg-secondary, #f3f4f6);
  color: var(--text-primary, #1f2937);
  border: 1px solid var(--border-color, #d1d5db);
}

.intentos-orchestrator-device-view:hover {
  background: var(--bg-hover, #e5e7eb);
}

@media (prefers-color-scheme: dark) {
  .intentos-orchestrator-device-view {
    background: var(--bg-secondary, #2d2d2d);
    color: var(--text-primary, #ffffff);
    border-color: var(--border-color, #4b5563);
  }
}

.intentos-orchestrator-pending-heading {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-secondary, #9ca3af);
  margin: 4px 0 10px;
}

.intentos-orchestrator-pending-card {
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--border-color, #e5e7eb);
  background: var(--bg-secondary, #f9fafb);
  margin-bottom: 10px;
}

@media (prefers-color-scheme: dark) {
  .intentos-orchestrator-pending-card {
    background: var(--bg-secondary, #23232e);
  }
}

.intentos-orchestrator-pending-title {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text-primary, #1f2937);
  margin-bottom: 4px;
}

@media (prefers-color-scheme: dark) {
  .intentos-orchestrator-pending-title {
    color: var(--text-primary, #ffffff);
  }
}

.intentos-orchestrator-pending-why {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-secondary, #6b7280);
  margin-bottom: 10px;
}

.intentos-orchestrator-pending-card .intentos-entry-actions {
  margin-top: 4px;
}

.intentos-orchestrator-standing-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary, #6b7280);
  margin-bottom: 10px;
  cursor: pointer;
}

.intentos-orchestrator-standing-checkbox input {
  cursor: pointer;
}

.intentos-orchestrator-standing-section {
  margin-bottom: 18px;
}

.intentos-orchestrator-standing-heading {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-secondary, #9ca3af);
  margin: 4px 0 10px;
}

.intentos-orchestrator-standing-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
  font-size: 13px;
}

.intentos-orchestrator-standing-row:last-child {
  border-bottom: none;
}

.intentos-orchestrator-standing-label {
  color: var(--text-primary, #1f2937);
}

@media (prefers-color-scheme: dark) {
  .intentos-orchestrator-standing-label {
    color: var(--text-primary, #ffffff);
  }
}

.intentos-orchestrator-standing-revoke {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  color: #ef4444;
  cursor: pointer;
}

.intentos-orchestrator-standing-revoke:hover {
  text-decoration: underline;
}

.intentos-orchestrator-activity-section {
  margin-bottom: 18px;
}

.intentos-orchestrator-activity-heading {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-secondary, #9ca3af);
  margin: 4px 0 10px;
}

.intentos-orchestrator-activity-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.intentos-orchestrator-activity-row:last-child {
  border-bottom: none;
}

.intentos-orchestrator-activity-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary, #1f2937);
  margin-bottom: 2px;
}

@media (prefers-color-scheme: dark) {
  .intentos-orchestrator-activity-title {
    color: var(--text-primary, #ffffff);
  }
}

.intentos-orchestrator-activity-why {
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-secondary, #6b7280);
}

.intentos-orchestrator-activity-when {
  font-size: 11px;
  color: var(--text-secondary, #9ca3af);
  margin-top: 2px;
}

.intentos-orchestrator-folder-section {
  margin-bottom: 18px;
}

.intentos-orchestrator-folder-heading {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-secondary, #9ca3af);
  margin: 4px 0 10px;
}

.intentos-orchestrator-folder-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
  font-size: 13px;
}

.intentos-orchestrator-folder-path {
  color: var(--text-primary, #1f2937);
  word-break: break-all;
}

@media (prefers-color-scheme: dark) {
  .intentos-orchestrator-folder-path {
    color: var(--text-primary, #ffffff);
  }
}

.intentos-orchestrator-folder-remove {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  color: #ef4444;
  cursor: pointer;
}

.intentos-orchestrator-folder-remove:hover {
  text-decoration: underline;
}

.intentos-orchestrator-folder-add-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
}

.intentos-orchestrator-folder-add-row .intentos-entry-textinput {
  flex: 1;
  margin-bottom: 0;
}

.intentos-orchestrator-folder-add-btn {
  flex-shrink: 0;
  padding: 8px 14px;
}

.intentos-orchestrator-command {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--bg-secondary, #f3f4f6);
  border: 1px solid var(--border-color, #d1d5db);
  color: var(--text-primary, #1f2937);
  margin: 10px 0 4px;
  user-select: all;
  overflow-x: auto;
  white-space: nowrap;
}

@media (prefers-color-scheme: dark) {
  .intentos-orchestrator-command {
    background: var(--bg-secondary, #2d2d2d);
    border-color: var(--border-color, #4b5563);
    color: var(--text-primary, #ffffff);
  }
}

/* Top-bar pending-confirmations badge — modal-ui-hookup doc §5. Styled
   after the existing .credit-badge precedent (styles.css) rather than a
   new visual pattern; a small corner count, not a pill. */

#topBarIntentOsButton {
  position: relative;
}

.intentos-pending-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #7c5cff;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.intentos-pending-badge.hidden {
  display: none;
}

@media (max-width: 640px) {
  .intentos-entry-container {
    width: 95%;
    padding: 26px 18px 20px;
  }

  .intentos-entry-grid {
    grid-template-columns: 1fr;
  }
}
