.encash-friends-public {
  --encash-green: #85bb65;
  --encash-blue: #89cff0;
  --encash-black: #1f2937;
  --encash-border: #e5e7eb;
  --encash-bg: #f8fafc;
  --encash-danger: #b91c1c;
  --encash-muted: #64748b;
  color: var(--encash-black);
}

.encash-store-shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.encash-card,
.encash-subcard {
  background: #fff;
  border: 1px solid var(--encash-border);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.encash-subcard--nested {
  margin-top: 16px;
}

.encash-card-header,
.encash-section-head,
.encash-modal-header {
  margin-bottom: 16px;
}

.encash-card-header h1,
.encash-card-header h2,
.encash-modal-header h3 {
  margin: 0 0 8px;
}

.encash-card-header p,
.encash-help,
.encash-meta {
  margin: 0;
  color: var(--encash-muted);
}

.encash-grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
}

.encash-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.encash-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 700;
}

.encash-form-grid input,
.encash-form-grid select,
.encash-form-grid textarea,
.encash-order-toolbar input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--encash-border);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  box-sizing: border-box;
}

.encash-form-grid textarea {
  min-height: 120px;
  resize: vertical;
}

.encash-field-full {
  grid-column: 1 / -1;
}

.encash-order-toolbar {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.encash-order-toolbar--compact {
  grid-template-columns: 1fr;
  align-items: end;
}

.encash-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.encash-list-item {
  border: 1px solid var(--encash-border);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  background: var(--encash-bg);
}

.encash-list-item--friend {
  padding: 14px 16px;
}

.encash-media {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.encash-media--friend {
  align-items: center;
  gap: 12px;
}

.encash-avatar {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: #eef2f7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
}

.encash-friend-copy,
.encash-media > div:last-child {
  min-width: 0;
}

.encash-friend-copy strong,
.encash-meta {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.encash-inline-actions,
.encash-form-actions,
.encash-invite-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.encash-inline-actions--tight {
  gap: 6px;
}

.encash-btn {
  border: 1px solid var(--encash-border);
  border-radius: 999px;
  background: #fff;
  color: var(--encash-black);
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
}

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

.encash-btn--danger {
  color: #fff;
  background: var(--encash-danger);
  border-color: var(--encash-danger);
}

.encash-segment-wrap {
  display: flex;
  border: 1px solid var(--encash-border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 16px;
}

.encash-segment-btn {
  flex: 1;
  padding: 12px 16px;
  border: 0;
  background: #fff;
  cursor: pointer;
  font-weight: 800;
  color: var(--encash-black);
}

.encash-segment-btn.is-active {
  background: var(--encash-green);
  color: #fff;
}

.encash-add-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.encash-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.encash-pill {
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef2ff;
  font-size: 12px;
  font-weight: 700;
}

.encash-pill--removable {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.encash-pill-remove {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-weight: 800;
  line-height: 1;
  color: #334155;
  padding: 0;
}

.encash-inline-message {
  margin-top: 14px;
  font-weight: 700;
}

.encash-inline-message.is-error {
  color: var(--encash-danger);
}

.encash-inline-message.is-success {
  color: #166534;
}

.encash-empty {
  color: var(--encash-muted);
}

.encash-status-dot {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef2ff;
  color: #334155;
  text-transform: capitalize;
}

.encash-status-dot.status-accepted { background: #dcfce7; color: #166534; }
.encash-status-dot.status-pending { background: #fef3c7; color: #92400e; }
.encash-status-dot.status-rejected,
.encash-status-dot.status-blocked { background: #fee2e2; color: #991b1b; }

.encash-summary {
  border-top: 1px solid var(--encash-border);
  margin-top: 20px;
  padding-top: 16px;
}

.encash-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
}

.encash-loading {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 14px 2px;
  color: var(--encash-muted);
  font-weight: 700;
}

.encash-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(133, 187, 101, 0.25);
  border-top-color: var(--encash-green);
  border-radius: 50%;
  animation: encash-spin .8s linear infinite;
}

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

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

.encash-modal.is-open {
  display: flex;
}

.encash-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.56);
}

.encash-modal-dialog {
  position: relative;
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  border-radius: 18px;
  background: #fff;
  padding: 20px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
}

.encash-modal-open {
  overflow: hidden;
}

.encash-confirm-detail {
  color: var(--encash-black);
  line-height: 1.5;
  margin-bottom: 16px;
}

.encash-order-nav {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

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

  .encash-store-shell {
    padding: 16px 12px 32px;
  }

  .encash-card,
  .encash-subcard,
  .encash-modal-dialog {
    padding: 16px;
    border-radius: 16px;
  }

  .encash-list-item {
    flex-direction: column;
    align-items: stretch;
  }

  .encash-add-row {
    grid-template-columns: 1fr;
  }
}

/* 1.5.2 manage-friends isolation + row fit fixes */
#encash-manage-friends-list,
#encash-manage-friends-list * {
  box-sizing: border-box;
}

#encash-manage-friends-list .encash-list-item,
#encash-manage-friends-list .encash-list-item--friend {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

#encash-manage-friends-list .encash-list-item--friend {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

#encash-manage-friends-list .encash-media,
#encash-manage-friends-list .encash-media--friend,
#encash-manage-friends-list .encash-friend-copy {
  min-width: 0;
  max-width: 100%;
}

#encash-manage-friends-list .encash-friend-copy strong,
#encash-manage-friends-list .encash-friend-copy .encash-meta {
  display: block;
  overflow-wrap: anywhere;
  word-break: break-word;
}

#encash-manage-friends-list .encash-inline-actions,
#encash-manage-friends-list .encash-friends-row-actions {
  min-width: 0;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

#encash-manage-friends-list .encash-btn {
  min-width: 0;
  white-space: nowrap;
}

#encash-manage-friend-form input[type="hidden"][name="status"] {
  display: none !important;
}

@media (max-width: 760px) {
  #encash-manage-friends-list .encash-list-item--friend {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  #encash-manage-friends-list .encash-friends-row-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
  }

  #encash-manage-friends-list .encash-friends-row-actions .encash-btn {
    width: 100%;
  }
}
