.rt-chart {
  position: relative;
  height: 260px;
  padding: 10px 0;
}

.rt-chart-svg {
  width: 100%;
  height: 100%;
}

/* ============================================
           ACTIVITY
        ============================================ */
.rt-activity {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rt-activity-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rt-border);
}

.rt-activity-item:last-child {
  border-bottom: none;
}

.rt-activity-icon {
  width: 36px;
  height: 36px;
  border-radius: 0;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--rt-white);
}

.rt-activity-icon svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}

.rt-activity-content {
  flex: 1;
  min-width: 0;
}

.rt-activity-text {
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.5;
}

.rt-activity-text strong {
  font-weight: 900;
}

.rt-activity-time {
  font-size: 0.72rem;
  color: var(--rt-muted);
  font-weight: 600;
  margin-top: 2px;
}

/* ============================================
           PROGRESS
        ============================================ */
.rt-progress {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rt-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.rt-progress-label {
  font-size: 0.82rem;
  font-weight: 800;
}

.rt-progress-value {
  font-size: 0.78rem;
  font-weight: 900;
  color: var(--rt-muted);
}

.rt-progress-bar {
  height: 8px;
  border-radius: 0;
  background: var(--rt-border);
  overflow: hidden;
}

.rt-progress-fill {
  height: 100%;
  border-radius: 0;
  background: linear-gradient(90deg, var(--rt-primary), var(--rt-primary-2));
  transition: width 0.6s ease;
}

.rt-progress-fill--accent {
  background: linear-gradient(90deg, var(--rt-accent), var(--rt-warning));
}

.rt-progress-fill--success {
  background: linear-gradient(90deg, var(--rt-success), #22d3ee);
}

.rt-progress-fill--purple {
  background: linear-gradient(90deg, var(--rt-purple), var(--rt-primary));
}

/* ============================================
           QUICK ACTIONS
        ============================================ */
.rt-quick {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.rt-quick-btn {
  padding: 14px;
  border: 1px solid var(--rt-border);
  border-radius: 0;
  background: var(--rt-surface-solid);
  color: var(--rt-text);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rt-quick-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--rt-primary-rgb), 0.3);
}

.rt-quick-btn svg {
  width: 20px;
  height: 20px;
  color: var(--rt-primary);
  stroke-width: 2;
}

.rt-quick-btn span {
  font-size: 0.8rem;
  font-weight: 800;
}

/* ============================================
           FORM CONTROLS
        ============================================ */
.rt-form-stack {
  display: grid;
  gap: 14px;
}

.rt-form-grid {
  display: grid;
  gap: 12px;
}

.rt-form-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rt-form-control,
.rt-form-select,
.rt-form-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--rt-border);
  background: var(--rt-surface);
  color: var(--rt-text);
  outline: none;
  font: inherit;
  border-radius: 0;
  transition:
    border-color 0.2s ease;
}

.rt-form-control,
.rt-form-select {
  min-height: 42px;
  padding: 0 14px;
}

.rt-form-textarea {
  min-height: 120px;
  padding: 12px 14px;
  resize: vertical;
}

.rt-form-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 42px;
  cursor: pointer;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--rt-muted) 50%),
    linear-gradient(135deg, var(--rt-muted) 50%, transparent 50%);
  background-position:
    calc(100% - 17px) 50%,
    calc(100% - 11px) 50%;
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
  line-height: 1.2;
}

.rt-form-select::-ms-expand {
  display: none;
}

.rt-form-control:focus,
.rt-form-select:focus,
.rt-form-textarea:focus {
  border-color: rgba(var(--rt-primary-rgb), 0.4);
}

.rt-form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  line-height: 1.4;
}

.rt-form-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--rt-primary);
  flex: 0 0 auto;
}

.rt-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rt-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
}

.rt-flow--sm {
  gap: 8px;
}

.rt-flow--lg {
  gap: 16px;
}

.rt-flow--x {
  column-gap: 12px;
  row-gap: 0;
}

.rt-flow--y {
  row-gap: 12px;
  column-gap: 0;
}

.rt-select {
  position: relative;
  width: 100%;
  min-width: 0;
}

.rt-select-native {
  display: none !important;
}

.rt-select-toggle {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--rt-border);
  border-radius: 0;
  background: var(--rt-surface);
  color: var(--rt-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font: inherit;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.rt-select-toggle:focus,
.rt-select-toggle:focus-visible,
.rt-select.is-open .rt-select-toggle {
  border-color: rgba(var(--rt-primary-rgb), 0.4);
}

.rt-select-toggle:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.rt-select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  flex: 1 1 auto;
}

.rt-select-caret {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-right: 2px solid var(--rt-muted);
  border-bottom: 2px solid var(--rt-muted);
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.2s ease;
}

.rt-select.is-open .rt-select-caret {
  transform: rotate(-135deg) translateY(1px);
}

.rt-select-menu {
  position: fixed;
  z-index: 10020;
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--rt-border);
  border-radius: 0;
  background: var(--rt-surface);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  box-sizing: border-box;
  max-height: min(260px, calc(100vh - 24px));
}

.rt-select-search {
  position: relative;
}

.rt-select-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 11px;
  height: 11px;
  border: 1.75px solid var(--rt-muted);
  border-radius: 999px;
  transform: translateY(-50%);
  pointer-events: none;
  opacity: 0.9;
}

.rt-select-search-icon::after {
  content: "";
  position: absolute;
  right: -4px;
  bottom: -3px;
  width: 6px;
  height: 1.75px;
  border-radius: 0;
  background: var(--rt-muted);
  transform: rotate(45deg);
  transform-origin: center;
}

.rt-select-search-input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px 0 34px;
  border: 1px solid var(--rt-border);
  border-radius: 0;
  background: var(--rt-surface-solid);
  color: var(--rt-text);
  font: inherit;
  outline: none;
  box-sizing: border-box;
}

.rt-select-search-input:focus {
  border-color: rgba(var(--rt-primary-rgb), 0.4);
}

.rt-select-list {
  display: grid;
  gap: 6px;
  max-height: min(260px, calc(100vh - 128px));
  overflow: auto;
  padding-right: 2px;
}

.rt-select-option {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--rt-text);
  text-align: left;
  font: inherit;
  padding: 10px 12px;
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    color 0.18s ease;
}

.rt-select-option:hover,
.rt-select-option:focus-visible {
  outline: none;
  background: rgba(var(--rt-primary-rgb), 0.08);
}

.rt-select-option.is-selected {
  background: rgba(var(--rt-primary-rgb), 0.14);
  color: var(--rt-primary);
  font-weight: 700;
}

.rt-select-option:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.rt-select-empty {
  padding: 10px 12px;
  color: var(--rt-muted);
  font-size: 0.92rem;
}

/* ============================================
           TERMINAL WINDOW
        ============================================ */
.rt-terminal-window {
  position: relative;
  display: grid;
  gap: 0;
  border: 1px solid rgba(var(--rt-primary-rgb), 0.2);
  border-radius: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 24%),
    linear-gradient(180deg, rgba(8, 12, 22, 0.96), rgba(5, 8, 16, 0.98));
}

.rt-terminal-window::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 50%, rgba(0, 0, 0, 0) 50%),
    linear-gradient(90deg, rgba(var(--rt-primary-rgb), 0.04), rgba(var(--rt-accent-rgb), 0.02));
  background-size: 100% 4px, 100% 100%;
  opacity: 0.26;
}

.rt-terminal-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.88);
}

.rt-terminal-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.rt-terminal-title .rt {
  width: 16px;
  height: 16px;
  color: #8fdcff;
}

.rt-terminal-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.rt-terminal-dot {
  width: 11px;
  height: 11px;
  border-radius: 0;
}

.rt-terminal-dot--danger {
  background: #ff5f57;
  border-radius: 999px !important;
}

.rt-terminal-dot--warning {
  background: #febc2e;
  border-radius: 999px !important;
}

.rt-terminal-dot--success {
  background: #28c840;
  border-radius: 999px !important;
}

.rt-terminal-toolbar {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(99, 91, 255, 0.08);
}

.rt-terminal-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.76rem;
  font-weight: 700;
}

.rt-terminal-body {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  padding: 20px;
  color: #d9ecff;
  font-family:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    Menlo,
    monospace;
  font-size: 0.88rem;
  line-height: 1.7;
}

.rt-terminal-line {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
}

.rt-terminal-prompt {
  color: #56f0a9;
  font-weight: 700;
}

.rt-terminal-command {
  color: #eff6ff;
}

.rt-terminal-response {
  grid-column: 2;
  color: #9ec6e8;
}

.rt-terminal-response--success {
  color: #68f0a5;
}

.rt-terminal-response--warning {
  color: #ffd166;
}

.rt-terminal-response--danger {
  color: #ff8b8b;
}

.rt-terminal-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.85em;
  min-height: 1.85em;
  padding: 0 0.5em;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom-width: 2px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  font-size: 0.86em;
  font-weight: 700;
}

.rt-terminal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.rt-terminal-card {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.04);
}

.rt-terminal-card-title {
  margin-bottom: 6px;
  color: #f8fafc;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.rt-terminal-card-text {
  color: #9ec6e8;
  font-size: 0.82rem;
}

@media (max-width: 640px) {
  .rt-select-menu {
    max-height: min(48vh, calc(100vh - 24px));
  }

  .rt-terminal-header,
  .rt-terminal-toolbar,
  .rt-terminal-body {
    padding-left: 14px;
    padding-right: 14px;
  }

  .rt-terminal-line {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .rt-terminal-response {
    grid-column: 1;
    padding-left: 0;
  }
}

