/* Livedesignrundan 2026-11-18 (B1-B4): Appar är en vanlig detaljpanel (.detail-container > .detail-body) som
   husets övriga Systemkonfiguration-flikar, så scroll, ram, rubrikkort och inställningskort kommer från husets regler.
   Här står bara det som är unikt för Appar. Inga fasta färger: allt via temavariabler. */
.atlas-admin-apps { color: var(--text-primary); }
.atlas-admin-apps .atlas-apps-body { display: flex; flex-direction: column; gap: 0; }
.atlas-admin-apps .atlas-apps-body h4 {
  margin: 14px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--accent-primary);
}
.atlas-admin-apps .atlas-apps-invite > h4 { margin-top: 4px; }
.atlas-admin-apps .atlas-apps-card { display: flex; align-items: center; gap: 12px; }
.atlas-apps-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.atlas-apps-main > label, .atlas-apps-main > .atlas-apps-label-link, .atlas-apps-platform > label {
  font-size: 13.5px; font-weight: 600; letter-spacing: 0.2px; text-transform: uppercase; color: var(--text-primary);
  display: inline-flex; align-items: center; gap: 6px;
}
.atlas-apps-main > .atlas-apps-label-link { color: var(--accent-primary); text-decoration: underline; text-underline-offset: 3px; }
.atlas-apps-main > .atlas-apps-value { width: 100%; box-sizing: border-box; cursor: text; }
.atlas-apps-qr { display: block; width: 132px; height: 132px; border-radius: 8px; align-self: center; }
.atlas-apps-field > .atlas-apps-help, .atlas-apps-body > .atlas-apps-help { display: block; }
/* Hjälptext under kort: samma som E-postkonfigurationens (font, ton, luft till nästa kort). Mobilens husregel
   (.admin-config-row + p) gör den till kortets fot. */
.atlas-apps-help, .atlas-apps-note { color: var(--text-secondary); font-size: var(--text-micro-size); opacity: var(--text-help-opacity); line-height: 1.45; margin: 4px 0 16px; }
.atlas-admin-apps .atlas-apps-platform { justify-content: space-between; flex-wrap: wrap; }
.atlas-admin-apps .atlas-apps-platform svg { width: 16px; height: 16px; }
.atlas-admin-apps .atlas-apps-platform > a:not(.atlas-play-badge) { color: var(--accent-primary); font-weight: 600; }
.atlas-admin-apps .atlas-apps-actions { justify-content: flex-start; flex-wrap: wrap; gap: 8px 20px; }
.atlas-admin-apps [data-apps-recipients] { margin: 0 0 12px; padding: 12px 16px; border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--accent-primary) 18%, transparent); }
.atlas-admin-apps [data-apps-recipients] h4 { margin-top: 0; }
/* Svenskt originalmärke från Google Play badges, hämtat 2026-11-17. */
.atlas-apps-platform .atlas-play-badge { display: inline-block; }
body.atlas-light-theme .atlas-apps-platform .atlas-play-badge { background: transparent; }
body:not(.atlas-light-theme) .atlas-admin-apps .atlas-apps-field a { color: var(--text-primary); }
.atlas-apps-platform .atlas-play-badge img { height: 44px; width: auto; display: block; }
/* Kopiera: husets runda åtgärdsknapp, bara ikonen (Patrik 11-18). */
.atlas-admin-apps .atlas-apps-copy { padding: 0; min-width: 40px; min-height: 40px; color: var(--accent-primary); }
.atlas-apps-copy-circle {
  width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-primary); color: #fff; /* samma som husets låsknapp (mobile-soft-admin-detail.css) */
  box-shadow: 0 2px 8px color-mix(in srgb, var(--accent-primary) 30%, transparent);
}
.atlas-apps-icon {
  padding: 5px; min-width: 34px; min-height: 34px; border: 0; background: transparent; display: inline-flex;
  align-items: center; justify-content: center; gap: 6px; color: var(--accent-primary); cursor: pointer; flex: 0 0 auto;
}
.atlas-apps-icon span { font-size: 13px; font-weight: 600; }
.atlas-apps-icon svg { width: 18px; height: 18px; }
.atlas-apps-icon:disabled { opacity: .45; cursor: default; }
.atlas-apps-icon:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.atlas-apps-recipients label, .atlas-apps-selection label { display: flex; gap: 10px; align-items: center; padding-block: 8px; cursor: pointer; }
.atlas-apps-recipients { max-height: 320px; overflow-y: auto; }
.atlas-admin-apps input[type="checkbox"] {
  appearance: auto; -webkit-appearance: checkbox; width: 18px; height: 18px; min-width: 18px;
  flex: 0 0 auto; margin: 0; padding: 0; accent-color: var(--accent-primary); cursor: pointer !important;
}
.atlas-apps-recipients label:has(input:checked) { font-weight: 600; color: var(--accent-primary); }
.atlas-apps-selection { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.atlas-apps-unavailable { padding-top: 16px; }
.atlas-apps-unavailable h5 { font-size: 13px; margin: 0 0 4px; }
.atlas-apps-unavailable ul { margin: 8px 0; padding-inline-start: 20px; font-size: 13px; }
@media (max-width: 600px) {
  .atlas-apps-icon { min-width: 44px; min-height: 44px; }
}

.atlas-change-company {
  border: 0; background: transparent; color: var(--text-secondary, inherit); font: inherit;
  font-size: 12px; padding: 6px 10px; cursor: pointer; text-decoration: underline;
}

/* Husets mobilregler gör .admin-config-row till ett centrerat rutnät (mobile-soft-admin-detail.css). Appars kort
   behåller etikett och värde vänsterställda och Kopiera i en egen högerspalt. */
:root body #view-admin #admin-detail-content .atlas-admin-apps .atlas-apps-card.atlas-apps-card {
  display: flex !important; flex-wrap: nowrap !important; align-items: center !important;
}
:root body #view-admin #admin-detail-content .atlas-admin-apps .atlas-apps-card.atlas-apps-platform { flex-wrap: wrap !important; justify-content: space-between !important; }
:root body #view-admin #admin-detail-content .atlas-admin-apps .atlas-apps-main { align-items: stretch !important; text-align: start !important; }
:root body #view-admin #admin-detail-content .atlas-admin-apps .atlas-apps-main > :is(label, a) { align-self: flex-start !important; }
:root body #view-admin #admin-detail-content .atlas-admin-apps .atlas-apps-main > .atlas-apps-qr { align-self: center !important; }
:root body #view-admin #admin-detail-content .atlas-admin-apps .atlas-apps-card.atlas-apps-actions {
  flex-wrap: wrap !important; justify-content: flex-start !important; gap: 8px 24px !important;
}
.atlas-admin-apps .atlas-apps-grid { display: flex; flex-direction: column; }
/* Kort med värdefält: knappen står i höjd med fältet, inte mitt i kortet (Patrik 11-18: "lite sned"). */
:root body #view-admin #admin-detail-content .atlas-admin-apps .atlas-apps-card.atlas-apps-card:has(.atlas-apps-value) { align-items: flex-end !important; }
.atlas-admin-apps .atlas-apps-card:has(.atlas-apps-value) > .atlas-apps-copy { margin-bottom: 1px; }
