/* ── Vichinthanam module shared styles ──────────────────────────────────── */

.vich-page {
  max-width: 560px;
}

/* ── Amount display card ─────────────────────────────────────────────────── */
.vich-amount-card {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: 16px;
  padding: 1.25rem 1rem;
  margin-bottom: 1rem;
  text-align: center;
}

.vich-amount-label {
  font-size: 2.25rem;
  font-weight: 800;
  color: #0f766e;
  letter-spacing: -1px;
}

.vich-amount-sub {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.2rem;
}

/* ── Copies stepper ──────────────────────────────────────────────────────── */
.vich-copies-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.vich-copies-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  font-size: 1.4rem;
  font-weight: 700;
  color: #0f766e;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}

.vich-copies-btn:active {
  background: #e0f2f1;
}

.vich-copies-input {
  flex: 1;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  height: 44px;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
}

/* ── Form labels ─────────────────────────────────────────────────────────── */
.vich-form label {
  display: block;
  margin-top: 0.75rem;
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.vich-form select {
  width: 100%;
  box-sizing: border-box;
}

.vich-optional-hint {
  font-weight: 400;
  font-size: 0.78rem;
  color: #94a3b8;
}

/* ── Action grid ─────────────────────────────────────────────────────────── */
.vich-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 1rem;
}

.vich-action-grid--view {
  margin-bottom: 1rem;
}

.vich-action-grid--2col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vich-icon-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 72px;
  padding: 0.65rem 0.45rem;
  border-radius: 12px;
  border: 1px solid transparent;
  text-decoration: none;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.vich-icon-btn:active {
  opacity: 0.85;
}

.vich-icon-btn i {
  font-size: 1.2rem;
}

.vich-icon-btn--primary {
  color: #fff;
  background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
}

.vich-icon-btn--pay {
  color: #fff;
  background: linear-gradient(135deg, #b45309 0%, #f59e0b 100%);
}

.vich-icon-btn--export {
  color: #fff;
  background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
}

.vich-icon-btn--neutral {
  color: #334155;
  border-color: #cbd5e1;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

.vich-icon-btn--download {
  color: #fff;
  background: linear-gradient(135deg, #1d4ed8 0%, #60a5fa 100%);
}

/* ── Summary result panel ────────────────────────────────────────────────── */
.vich-result {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.9rem;
  background: #fff;
}

.vich-result-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f766e;
  margin-bottom: 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #e2e8f0;
}

.vich-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.vich-list-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.875rem;
}

.vich-list-row:last-child {
  border-bottom: none;
}

.vich-row-main {
  flex: 1;
  color: #1e293b;
  line-height: 1.4;
}

.vich-row-amount {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f766e;
  white-space: nowrap;
}

.vich-row-sub {
  font-size: 0.72rem;
  color: #64748b;
}

.vich-link-btn {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.5rem;
  text-align: center;
  border: none;
  background: none;
  color: #0f766e;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.hidden {
  display: none !important;
}

/* ── Subscription search page ────────────────────────────────────────────── */
.vich-page--subscription {
  max-width: 720px;
}

.vich-search-panel {
  margin-bottom: 1.25rem;
}

.vich-search-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 1rem;
}

.vich-search-actions .vich-icon-btn {
  flex-direction: row;
  gap: 0.4rem;
  min-height: 0;
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
}

.vich-search-actions .vich-icon-btn i {
  font-size: 0.9rem;
}

.vich-share-wrap {
  display: flex;
  justify-content: center;
  margin-top: 1.1rem;
  padding-top: 0.9rem;
  border-top: 1px solid #f1f5f9;
}

.vich-share-wrap .vich-icon-btn {
  flex-direction: row;
  gap: 0.4rem;
  min-height: 0;
  min-width: 140px;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  background: linear-gradient(135deg, #128c7e 0%, #25d366 100%);
}

.vich-share-wrap .vich-icon-btn i {
  font-size: 1rem;
}

.vich-muted {
  color: #64748b;
  font-size: 0.9rem;
  margin: 0.5rem 0;
}

.vich-sub-charts {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.vich-chart-block {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.9rem;
  background: #fff;
}

.vich-chart-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f766e;
  margin-bottom: 0.65rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #e2e8f0;
}

.vich-bar-chart {
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  gap: 14px;
  padding: 6px 4px 0;
}

.vich-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  max-width: 160px;
}

.vich-bar-track {
  width: 100%;
  height: 148px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-bottom: 2px solid #e5e7eb;
}

.vich-bar {
  width: 100%;
  border-radius: 8px 8px 0 0;
}

.vich-bar-value {
  margin-top: 10px;
  font-size: 1.25rem;
  font-weight: 700;
}

.vich-bar-label {
  font-size: 0.75rem;
  color: #6b7280;
  text-align: center;
  line-height: 1.2;
}

.vich-sub-lists {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.vich-collapse {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.vich-collapse__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  cursor: pointer;
  font-weight: 700;
  color: #0f172a;
  list-style: none;
}

.vich-collapse__summary::-webkit-details-marker {
  display: none;
}

.vich-collapse__summary::after {
  content: "\f078";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 0.75rem;
  color: #94a3b8;
  transition: transform 0.15s;
}

.vich-collapse[open] > .vich-collapse__summary::after {
  transform: rotate(180deg);
}

.vich-collapse__count {
  margin-left: auto;
  margin-right: 0.5rem;
  min-width: 1.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: #ecfdf5;
  color: #0f766e;
  font-size: 0.8rem;
  text-align: center;
}

.vich-collapse__body {
  padding: 0 1rem 0.9rem;
  border-top: 1px solid #f1f5f9;
}

.vich-member-list {
  margin-top: 0.5rem;
}

.vich-member-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.vich-contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #bdd3f1;
  background: #fff;
  color: #1455cc;
  text-decoration: none;
}

.vich-contact-btn--tel {
  color: #0d9488;
  border-color: #99f6e4;
}

.vich-contact-btn--wa {
  color: #25d366;
  border-color: #b8e6c8;
}

.vich-contact-btn--disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* Horizontal clustered bars (Summary dashboard) */
.vich-hbar-chart {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.vich-hbar-entity {
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #f1f5f9;
}

.vich-hbar-entity:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.vich-hbar-entity-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: #0f172a;
  margin-bottom: 0.4rem;
}

.vich-hbar-series {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr) 2.25rem;
  gap: 0.45rem;
  align-items: center;
  margin-top: 0.25rem;
}

.vich-hbar-series-label {
  font-size: 0.72rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vich-hbar-track-wrap {
  min-width: 0;
}

.vich-hbar-track {
  height: 10px;
  border-radius: 999px;
  background: #f1f5f9;
  overflow: hidden;
}

.vich-hbar-fill {
  height: 100%;
  border-radius: 999px;
  min-width: 0;
}

.vich-hbar-count {
  font-size: 0.8rem;
  font-weight: 700;
  text-align: right;
}

@media (max-width: 520px) {
  .vich-hbar-series {
    grid-template-columns: 5.5rem minmax(0, 1fr) 2rem;
  }
}
