/* ===== Applications UI (scoped) ===== */
.apps-page {
  --card: #fff;
  --bg: #f6f7fb;
  --line: #e6e8ee;
  --muted: #6b7280;
  --text: #111827;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 10px 24px rgba(17, 24, 39, .06);
  --primary: #1677ff;
  --primary-press: #0f63d8;
  --chip: #f3f4f6;
  padding: 16px;
  background: transparent;
}

/* Title bar */
.apps-head {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 22px 16px;
  box-shadow: var(--shadow);
}

.apps-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

/* Search card */
.apps-search {
  margin-top: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 14px;
}

.apps-search__row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.apps-search__inputwrap {
  position: relative;
  flex: 1;
}

.apps-search__icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9aa3af;
}

.apps-input {
  width: 96%;
  height: 44px;
  padding: 0 12px 0 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.apps-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px #e0f2fe, var(--shadow);
}

.apps-btn {
  height: 40px;
  padding: 0 16px;
  border-radius: 6px;
  border: 1px solid var(--line);
  font-weight: 600;
  background: #fff;
  color: #111827;
  padding: 0 30px;
}

.apps-btn--primary {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
}

.apps-btn--primary:hover {
  background: var(--primary-press);
}

.apps-search__filters {
  margin-top: 12px;
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

/* App Filter Tabs */
.apps-tabs {
  display: flex;
  gap: 0;
  background: #f3f4f6;
  border-radius: 10px;
  padding: 4px;
  width: fit-content;
}

.apps-tab {
  padding: 10px 20px;
  border: none;
  background: transparent;
  color: #6b7280;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  white-space: nowrap;
}

.apps-tab:hover {
  color: #111827;
  background: rgba(255, 255, 255, 0.5);
}

.apps-tab--active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.apps-tab--active:hover {
  background: #fff;
  color: var(--primary);
}

.apps-tab__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  margin-left: 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 10px;
  background: #e5e7eb;
  color: #6b7280;
}

.apps-tab--active .apps-tab__count {
  background: var(--primary);
  color: #fff;
}

.apps-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.apps-toggle__label {
  color: #111827;
  font-weight: 600;
}

.apps-toggle__check {
  width: 18px;
  height: 18px;
  accent-color: #0C8CE9;
}

/* Legacy browsers fallback */
.apps-toggle__check:checked {
  background-color: #0C8CE9;
  border-color: #0C8CE9;
}

/* Pagination alignment */
.apps-pagination-top {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
  margin-bottom: 6px;
}


.apps-space {
  margin-left: auto;
  color: var(--muted);
}

/* Grid */
.app-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 16px;
}

@media (max-width:1200px) {
  .app-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width:900px) {
  .app-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* Card */
.app-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.app-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Card Content Row - Icon + Details */
.app-card__content {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
}

/* App Icon Container */
.app-card__icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #a4c639 0%, #7cb342 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(164, 198, 57, 0.3);
}

.app-card__icon img {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: cover;
}

.app-card__icon .android-icon {
  width: 32px;
  height: 32px;
  color: #fff;
}

/* App Details Container */
.app-card__details {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.app-card__title {
  font-weight: 700;
  font-size: 15px;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 8px;
}

/* Meta Info Row (Version & Size) */
.app-card__meta {
  display: flex;
  gap: 16px;
  margin-bottom: 8px;
}

/* Key-Value Pairs */
.app-kv {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 4px;
}

.app-kv__k {
  font-size: 12px;
  color: #6b7280;
  font-weight: 600;
  white-space: nowrap;
}

.app-kv__v {
  font-size: 13px;
  color: #111827;
  word-break: break-all;
}

/* Package name styling */
.app-kv--pkg {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px dashed #e6e8ee;
}

.app-kv--pkg .app-kv__v {
  font-size: 11px;
  color: #6b7280;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

.configuration-hint {
  color: #6b7280;
  font-weight: 600;
}

.warning-font {
  color: #b91c1c;
}

/* Actions */
.app-card__actions {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  justify-content: flex-end;
  background: #f9fafb;
  border-top: 1px solid #e6e8ee;
}

.apps-icbtn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.apps-icbtn:hover {
  background: #e0f2fe;
  border-color: #3b82f6;
}

.apps-icbtn[disabled] {
  opacity: .5;
  cursor: not-allowed;
}

/* Optional center text style reuse */
.center {
  color: #6b7280;
  padding: 20px;
}