/* === Chipin Design System 2025 === */

:root {
  --cp-pink: #EE4C94;
  --cp-pink-dark: #E03A85;
  --cp-pink-soft: #FCE7F0;
  --cp-pink-tint: rgba(238,76,148,.08);
  --cp-cyan: #23BFF0;
  --cp-cyan-dark: #1AA8D6;
  --cp-cyan-soft: #E5F8FE;
  --cp-ink: #1C252E;
  --cp-body: #454F5B;
  --cp-mute: #637381;
  --cp-line: #DFE3E8;
  --cp-soft: #F4F6F8;
  --cp-green: #22C55E;
}

/* ---- Greeting ---- */
.cp-greeting-name {
  font-size: 24px;
  color: var(--cp-pink);
  font-weight: 700;
  letter-spacing: -.01em;
}
.cp-greeting-sub {
  font-size: 13px;
  color: var(--cp-mute);
  margin-top: 4px;
}

/* ---- Balance card ---- */
.cp-balance-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #F45CA0 0%, #D62E7E 100%);
  border-radius: 22px;
  padding: 26px 22px 28px;
  color: white;
  box-shadow: 0 16px 32px rgba(214,46,126,.28);
  text-align: center;
}
.cp-balance-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -30px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: rgba(255,255,255,.10);
  pointer-events: none;
}
.cp-balance-card::after {
  content: '';
  position: absolute;
  bottom: -50px; left: -20px;
  width: 130px; height: 130px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  pointer-events: none;
}
.cp-balance-label {
  position: relative;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .18em;
  opacity: .92;
  text-transform: uppercase;
}
.cp-balance-amount {
  position: relative;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-top: 10px;
  color: white !important;
}

/* ---- Navigation rows ---- */
.cp-nav-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: white;
  border: 1px solid var(--cp-line);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 1px 2px rgba(15,23,42,.03);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .18s;
}
.cp-nav-row:hover {
  box-shadow: 0 4px 14px rgba(15,23,42,.09);
  text-decoration: none;
  color: inherit;
}
.cp-nav-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.cp-nav-label {
  font-size: 15px;
  color: var(--cp-ink);
  font-weight: 700;
  letter-spacing: -.005em;
}
.cp-nav-sub {
  font-size: 12px;
  color: var(--cp-mute);
  margin-top: 2px;
}
.cp-nav-arrow {
  color: var(--cp-mute);
  font-size: 20px;
  line-height: 1;
  margin-left: auto;
  flex-shrink: 0;
}

/* ---- Section kicker ---- */
.cp-kicker {
  font-size: 12px;
  color: var(--cp-mute);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 0;
}

/* ---- Page title ---- */
.cp-page-title {
  font-size: 18px !important;
  color: var(--cp-pink) !important;
  font-weight: 700;
  margin: 0;
  letter-spacing: -.01em;
}

/* ---- Generic card ---- */
.cp-card {
  background: white;
  border: 1px solid var(--cp-line);
  border-radius: 14px;
  padding: 16px;
}

/* ---- Compact list card ---- */
.cp-list-card {
  background: white;
  border: 1px solid var(--cp-line);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: box-shadow .18s;
}
.cp-list-card:hover {
  box-shadow: 0 4px 14px rgba(15,23,42,.09);
}

/* ---- Icon chip buttons ---- */
.cp-icon-chip {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--cp-line);
  background: white;
  color: var(--cp-ink);
  cursor: pointer;
  font-size: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  padding: 0;
  line-height: 1;
  transition: background .15s;
}
.cp-icon-chip:hover {
  background: var(--cp-soft);
}

/* ---- Progress bar ---- */
.cp-progress {
  height: 8px;
  border-radius: 9999px;
  background: var(--cp-soft);
  overflow: hidden;
}
.cp-progress-bar {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--cp-pink), var(--cp-cyan));
  transition: width .3s;
}

/* ---- Info box ---- */
.cp-info-box {
  background: var(--cp-cyan-soft);
  border-radius: 12px;
  padding: 14px;
  font-size: 12px;
  color: var(--cp-ink);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.cp-info-box-icon {
  color: var(--cp-cyan-dark);
  flex-shrink: 0;
  font-size: 14px;
  line-height: 1.5;
}

/* ---- Quick amount buttons ---- */
.cp-quick-amounts {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  margin-bottom: 14px;
}
.cp-quick-btn {
  flex: 1;
  padding: 8px 0;
  border-radius: 9999px;
  border: 1px solid var(--cp-line);
  background: white;
  color: var(--cp-ink) !important;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.cp-quick-btn:hover {
  background: var(--cp-soft);
}

/* ---- Soft pill buttons (list detail secondary actions) ---- */
.cp-btn-soft-secondary {
  width: 100%;
  padding: 9px 16px;
  border: 1.5px solid var(--cp-cyan);
  border-radius: 9999px;
  background: var(--cp-cyan-soft);
  color: var(--cp-cyan);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: opacity .15s;
}
.cp-btn-soft-secondary:hover { opacity: .82; }

.cp-btn-soft-primary {
  width: 100%;
  padding: 9px 16px;
  border: 1.5px solid var(--cp-pink);
  border-radius: 9999px;
  background: white;
  color: var(--cp-pink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: opacity .15s;
}
.cp-btn-soft-primary:hover { opacity: .82; }

/* ---- Gradient frame (Share page) ---- */
.cp-gradient-frame {
  background: linear-gradient(180deg, #EE4C94 0%, #B967C9 50%, #23BFF0 100%);
  padding: 24px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

/* ---- Social icon circles ---- */
.cp-social-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
  text-decoration: none;
  transition: opacity .15s;
}
.cp-social-icon:hover {
  opacity: .82;
  text-decoration: none;
}

/* ---- Share link pill ---- */
.cp-share-link {
  display: flex;
  border-radius: 9999px;
  border: 1px solid var(--cp-line);
  overflow: hidden;
}
.cp-share-link-text {
  flex: 1;
  padding: 9px 14px;
  color: var(--cp-cyan-dark);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: white;
  border: none;
  outline: none;
}
.cp-share-copy-btn {
  background: var(--cp-cyan);
  color: white !important;
  border: none;
  padding: 0 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  border-radius: 0 9999px 9999px 0;
}
.cp-share-copy-btn:hover {
  background: var(--cp-cyan-dark);
}

/* ---- Gradient flow (import product / add-to-list) ---- */
/* Suppress body scroll on any page that uses .cp-grad-page */
body:has(.cp-grad-page) {
  overflow: hidden;
}

.cp-grad-page {
  height: calc(100vh - 90px);
  overflow: hidden;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 18px;
  /* Break out of Bootstrap container to fill full viewport width */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  /* Pull up by the <hr> margin-bottom (1rem) to sit flush against the header border */
  margin-top: -1rem;
}
.cp-grad-card {
  background: white;
  border-radius: 20px;
  padding: 26px 22px 24px;
  box-shadow: 0 20px 50px rgba(0,0,0,.18);
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 420px;
}
.cp-grad-logo {
  height: 28px;
  display: block;
  margin: 0 auto;
}
.cp-grad-title {
  margin: 0;
  text-align: center;
  font-size: 22px;
  color: var(--cp-ink);
  font-weight: 700;
  letter-spacing: -.01em;
}
.cp-grad-product-row {
  background: var(--cp-soft);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.cp-grad-product-thumb {
  width: 68px;
  height: 68px;
  border-radius: 10px;
  object-fit: cover;
  flex: 0 0 auto;
  background: var(--cp-line);
}
.cp-grad-product-label {
  font-size: 12px;
  color: var(--cp-mute);
  font-weight: 600;
  margin-bottom: 4px;
}
.cp-grad-product-name {
  font-size: 13px;
  color: var(--cp-body);
  line-height: 1.45;
}
.cp-grad-product-badge {
  background: var(--cp-soft);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--cp-mute);
}
.cp-grad-product-badge strong {
  font-weight: 600;
  color: var(--cp-ink);
}
.cp-grad-btn-primary {
  display: block;
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: 9999px;
  background: linear-gradient(90deg, #EE4C94, #B566B5);
  color: white;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 6px 18px rgba(238,76,148,.30);
  transition: opacity .15s;
}
.cp-grad-btn-primary:hover { opacity: .9; }
.cp-grad-btn-primary:disabled { opacity: .6; cursor: not-allowed; }
.cp-grad-btn-secondary {
  display: block;
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: 9999px;
  background: #23BFF0;
  color: white;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 6px 18px rgba(35,191,240,.25);
  transition: opacity .15s;
}
.cp-grad-btn-secondary:hover { opacity: .9; }
.cp-grad-btn-secondary:disabled { opacity: .6; cursor: not-allowed; }
.cp-grad-cancel {
  background: transparent;
  border: none;
  color: var(--cp-mute);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px;
  text-align: center;
  width: 100%;
}
.cp-grad-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--cp-ink);
  margin-bottom: 6px;
}
.cp-grad-label .req { color: var(--cp-pink); margin-left: 3px; }
.cp-grad-input {
  width: 100%;
  border: 1px solid var(--cp-line);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--cp-ink);
  outline: none;
  box-sizing: border-box;
}
.cp-grad-input:focus { border-color: var(--cp-pink); }
.cp-grad-select {
  width: 100%;
  border: 1px solid var(--cp-line);
  border-radius: 8px;
  padding: 12px 36px 12px 14px;
  font-size: 14px;
  color: var(--cp-ink);
  outline: none;
  appearance: none;
  background: white url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1l5 5 5-5' stroke='%2364748B' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat right 14px center;
  box-sizing: border-box;
}
.cp-grad-select:focus { border-color: var(--cp-pink); }
.cp-grad-field { display: flex; flex-direction: column; gap: 0; }
.cp-grad-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 14px;
  background: linear-gradient(135deg, #22C55E, #15803d);
  display: grid;
  place-items: center;
  color: white;
  font-size: 30px;
  box-shadow: 0 10px 24px rgba(34,197,94,.30);
}
.cp-grad-success-text {
  text-align: center;
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 700;
  color: var(--cp-ink);
}
.cp-grad-success-sub {
  text-align: center;
  margin: 0 0 18px;
  font-size: 14px;
  color: var(--cp-body);
}
