/* ========================================================
   BLUEONNIX APP STORE & RUNTIME STACK MANAGER STYLESHEET
   Strict Solid Minimal Design — Zero Gradients — Zero Border Radius
   ======================================================== */

.appstore-container {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
}

.appstore-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-bg, #18181b);
  border: 1px solid var(--border, #27272a);
  padding: 0.85rem 1.25rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.appstore-categories {
  display: flex;
  background: var(--bg, #0d0a04);
  border: 1px solid var(--border, #27272a);
}

.appstore-cat-btn {
  background: transparent;
  color: var(--text-muted, #a1a1aa);
  border: none;
  border-right: 1px solid var(--border, #27272a);
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  border-radius: 0 !important;
}

.appstore-cat-btn:last-child {
  border-right: none;
}

.appstore-cat-btn:hover {
  color: var(--text, #ffffff);
  background: rgba(255, 255, 255, 0.04);
}

.appstore-cat-btn.active {
  background: var(--primary, #3b82f6);
  color: #ffffff;
  font-weight: 600;
}

.appstore-search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.appstore-search-input {
  background: var(--bg, #0d0a04);
  color: var(--text, #ffffff);
  border: 1px solid var(--border, #27272a);
  padding: 0.45rem 0.75rem 0.45rem 2.2rem;
  font-size: 0.82rem;
  width: 240px;
  outline: none;
  border-radius: 0 !important;
  transition: border-color 0.15s ease;
}

.appstore-search-input:focus {
  border-color: var(--primary, #3b82f6);
}

.appstore-search-icon {
  position: absolute;
  left: 0.75rem;
  pointer-events: none;
  color: var(--text-muted, #71717a);
}

/* App Grid */
.appstore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.15rem;
  width: 100%;
}

.app-card {
  background: var(--card-bg, #18181b);
  border: 1px solid var(--border, #27272a);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  transition: border-color 0.15s ease;
  border-radius: 0 !important;
}

.app-card:hover {
  border-color: #3f3f46;
}

.app-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
}

.app-card-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.app-card-icon {
  width: 42px;
  height: 42px;
  background: var(--bg, #09090b);
  border: 1px solid var(--border, #27272a);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 0 !important;
}

.app-card-icon svg {
  width: 22px;
  height: 22px;
}

.app-card-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.app-card-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text, #ffffff);
}

.app-card-version-pill {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  color: var(--text-muted, #a1a1aa);
  background: var(--bg, #09090b);
  border: 1px solid var(--border, #27272a);
  padding: 0.1rem 0.4rem;
  display: inline-block;
  align-self: flex-start;
  border-radius: 0 !important;
}

/* App Status Badges */
.app-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 0 !important;
  border: 1px solid transparent;
  flex-shrink: 0;
}

.app-status-running {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.25);
}

.app-status-stopped {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.25);
}

.app-status-installed {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.25);
}

.app-status-uninstalled {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted, #71717a);
  border-color: var(--border, #27272a);
}

.app-card-desc {
  font-size: 0.82rem;
  color: var(--text-muted, #a1a1aa);
  line-height: 1.45;
  margin: 0;
  flex: 1;
}

.app-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border, #27272a);
  gap: 0.6rem;
  flex-wrap: wrap;
}

.app-card-meta {
  font-size: 0.76rem;
  color: var(--text-muted, #71717a);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.app-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* App Store Modal Editor */
.app-config-editor {
  width: 100%;
  height: 400px;
  background: #09090b;
  color: #e4e4e7;
  border: 1px solid var(--border, #27272a);
  font-family: var(--font-mono, monospace);
  font-size: 0.82rem;
  line-height: 1.5;
  padding: 1rem;
  outline: none;
  resize: vertical;
  border-radius: 0 !important;
}

.app-config-editor:focus {
  border-color: var(--primary, #3b82f6);
}

