/* account.css — Account page + billing cards + thank-you modal */

.if-account {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: auto;
  padding: 24px 28px 48px;
  background: linear-gradient(180deg, #faf8f3 0%, #f3efe6 100%);
  color: #29261b;
  font-family: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 15px;
}

.if-acc-header {
  margin-bottom: 20px;
  border-bottom: 0.5px solid rgba(42, 36, 25, 0.14);
  padding-bottom: 16px;
}

.if-acc-h1 {
  margin: 0 0 12px;
  font-family: "EB Garamond", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 28px;
  color: #1f1c16;
}

.if-acc-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.if-acc-tab {
  font: inherit;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 0.5px solid rgba(42, 36, 25, 0.18);
  background: rgba(255, 255, 255, 0.55);
  color: #3a3428;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}

.if-acc-tab:hover {
  background: #fff;
}

.if-acc-tab.is-active {
  border-color: rgba(168, 66, 61, 0.45);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 0 rgba(168, 66, 61, 0.12);
}

.if-acc-panel {
  max-width: 920px;
}

.if-acc-h2 {
  margin: 0 0 8px;
  font-family: "EB Garamond", Georgia, serif;
  font-style: italic;
  font-size: 22px;
  color: #1f1c16;
}

.if-acc-h3 {
  margin: 0 0 8px;
  font-family: "EB Garamond", Georgia, serif;
  font-style: italic;
  font-size: 18px;
}

.if-acc-lead {
  margin: 0 0 20px;
  color: #5c564a;
  line-height: 1.5;
}

.if-acc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  max-width: 480px;
}

.if-acc-field span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #7a7568;
}

.if-acc-field input,
.if-acc-field select {
  font: inherit;
  padding: 10px 12px;
  border-radius: 8px;
  border: 0.5px solid rgba(42, 36, 25, 0.2);
  background: #fff;
  color: #29261b;
}

.if-acc-readonly {
  opacity: 0.75;
  cursor: default;
}

.if-acc-btn {
  font: inherit;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 8px;
  border: 0.5px solid rgba(42, 36, 25, 0.22);
  background: rgba(255, 255, 255, 0.75);
  color: #29261b;
  cursor: pointer;
  transition: background 120ms ease;
}

.if-acc-btn:hover:not(:disabled) {
  background: #fff;
}

.if-acc-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.if-acc-btn-primary {
  background: #a8423d;
  border-color: #8e3834;
  color: #fffaf8;
}

.if-acc-btn-primary:hover:not(:disabled) {
  background: #963a36;
}

.if-acc-btn-secondary {
  background: rgba(255, 255, 255, 0.9);
}

.if-acc-btn-muted {
  opacity: 0.6;
}

.if-acc-btn-danger {
  background: #6b2f2c;
  border-color: #4f2422;
  color: #fff;
}

.if-acc-msg {
  margin: 12px 0;
  font-size: 14px;
}

.if-acc-msg.is-ok {
  color: #3d6b45;
}

.if-acc-msg.is-err {
  color: #a8423d;
}

.if-acc-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

@media (max-width: 900px) {
  .if-acc-cards {
    grid-template-columns: 1fr;
  }
}

.if-acc-card {
  border: 0.5px solid rgba(42, 36, 25, 0.16);
  border-radius: 12px;
  padding: 18px 16px 16px;
  background: rgba(255, 255, 255, 0.65);
  display: flex;
  flex-direction: column;
  min-height: 320px;
}

.if-acc-card.is-current {
  border-color: rgba(168, 66, 61, 0.45);
  box-shadow: 0 0 0 1px rgba(168, 66, 61, 0.08);
}

.if-acc-card-title {
  margin: 0 0 6px;
  font-family: "EB Garamond", Georgia, serif;
  font-style: italic;
  font-size: 20px;
}

.if-acc-card-price {
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 12px;
  color: #1f1c16;
}

.if-acc-card-list {
  margin: 0 0 14px;
  padding-left: 18px;
  color: #4a453c;
  line-height: 1.45;
  font-size: 13px;
  flex: 1;
}

.if-acc-card-note {
  font-size: 12px;
  color: #a8423d;
  margin: 0 0 8px;
}

.if-acc-card-cta {
  margin-top: auto;
}

.if-acc-upgrade-actions {
  display: grid;
  gap: 8px;
}

.if-acc-upgrade-actions .if-acc-btn {
  width: 100%;
}

.if-acc-usage-panel {
  border: 0.5px solid rgba(42, 36, 25, 0.12);
  border-radius: 12px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.55);
  margin-bottom: 28px;
}

.if-acc-pm-panel {
  border: 0.5px solid rgba(42, 36, 25, 0.12);
  border-radius: 12px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.55);
  margin-bottom: 28px;
}

.if-acc-pm-rows {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.if-acc-pm-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.if-acc-pm-row-title {
  font-size: 13px;
  font-weight: 600;
  color: #3a3428;
  margin: 0 0 4px;
}

.if-acc-pm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.if-acc-muted {
  color: #6b665b;
  font-size: 13px;
  margin: 0 0 12px;
}

.if-acc-usage-row {
  display: grid;
  grid-template-columns: 160px 1fr 100px;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

@media (max-width: 640px) {
  .if-acc-usage-row {
    grid-template-columns: 1fr;
  }
}

.if-acc-usage-label {
  font-size: 13px;
  color: #3a3428;
}

.if-acc-usage-track {
  height: 8px;
  border-radius: 99px;
  background: rgba(42, 36, 25, 0.08);
  overflow: hidden;
}

.if-acc-usage-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #7a9e6a, #a3c29a);
}

.if-acc-usage-num {
  font-size: 12px;
  color: #5c564a;
  text-align: right;
}

.if-acc-usage-warn {
  margin: 4px 0 12px 170px;
  color: #8a5a16;
  font-size: 12.5px;
  line-height: 1.4;
}

.if-acc-topup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 12px;
  margin-top: 6px;
  border-top: 0.5px solid rgba(42, 36, 25, 0.1);
  flex-wrap: wrap;
}

.if-acc-topup-title {
  font-size: 13px;
  font-weight: 600;
  color: #3a3428;
}

@media (max-width: 640px) {
  .if-acc-usage-warn {
    margin-left: 0;
  }
}

.if-acc-invoices-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.if-acc-linkish {
  font: inherit;
  font-size: 13px;
  background: none;
  border: none;
  color: #a8423d;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.if-acc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.if-acc-table th,
.if-acc-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 0.5px solid rgba(42, 36, 25, 0.1);
}

.if-acc-table th {
  color: #7a7568;
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.if-acc-table-actions a {
  margin-right: 12px;
  color: #a8423d;
}

.if-acc-data-actions {
  margin-bottom: 14px;
}

.if-acc-veil {
  position: fixed;
  inset: 0;
  background: rgba(28, 24, 18, 0.35);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.if-acc-modal {
  position: relative;
  max-width: 520px;
  width: 100%;
  border-radius: 14px;
  padding: 24px 26px 22px;
  background: #fdfbf7;
  border: 0.5px solid rgba(42, 36, 25, 0.18);
  box-shadow: 0 18px 48px rgba(20, 16, 10, 0.18);
}

.if-acc-modal-x {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #7a7568;
}

.if-acc-modal-title {
  margin: 0 0 12px;
  font-family: "EB Garamond", Georgia, serif;
  font-style: italic;
  font-size: 24px;
}

.if-acc-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
}

.if-acc-thanks .if-acc-modal-title {
  padding-right: 28px;
}

.if-acc-thanks-inner {
  position: relative;
  z-index: 1;
}

.if-acc-thanks-wait {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  margin: 8px 0 0;
}

.if-acc-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(42, 36, 25, 0.15);
  border-top-color: #a8423d;
  border-radius: 50%;
  animation: if-acc-spin 0.7s linear infinite;
}

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

.if-acc-thanks-list {
  margin: 12px 0 16px;
  padding-left: 20px;
  line-height: 1.45;
  color: #3a3428;
}

.if-acc-thanks-meta {
  font-size: 14px;
  color: #4a453c;
  line-height: 1.5;
}

.if-acc-thanks-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

/* Confetti — hard stop 1.8s */
.if-acc-confetti {
  pointer-events: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 14px;
}

.if-acc-confetti-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  opacity: 0;
  top: -8px;
  animation: if-acc-confetti-fall 1.8s ease-out forwards;
}

.if-acc-confetti-dot.c0 {
  background: #c95a3e;
}
.if-acc-confetti-dot.c1 {
  background: #6aa46a;
}
.if-acc-confetti-dot.c2 {
  background: #c9a24a;
}
.if-acc-confetti-dot.c3 {
  background: #6b8fc9;
}

.if-acc-confetti-dot:nth-child(1) {
  left: 8%;
  animation-delay: 0s;
}
.if-acc-confetti-dot:nth-child(2) {
  left: 18%;
  animation-delay: 0.05s;
}
.if-acc-confetti-dot:nth-child(3) {
  left: 28%;
  animation-delay: 0.1s;
}
.if-acc-confetti-dot:nth-child(4) {
  left: 38%;
  animation-delay: 0.02s;
}
.if-acc-confetti-dot:nth-child(5) {
  left: 48%;
  animation-delay: 0.12s;
}
.if-acc-confetti-dot:nth-child(6) {
  left: 58%;
  animation-delay: 0.08s;
}
.if-acc-confetti-dot:nth-child(7) {
  left: 68%;
  animation-delay: 0.15s;
}
.if-acc-confetti-dot:nth-child(8) {
  left: 78%;
  animation-delay: 0.03s;
}
.if-acc-confetti-dot:nth-child(9) {
  left: 88%;
  animation-delay: 0.11s;
}
.if-acc-confetti-dot:nth-child(10) {
  left: 12%;
  animation-delay: 0.09s;
}
.if-acc-confetti-dot:nth-child(11) {
  left: 92%;
  animation-delay: 0.06s;
}
.if-acc-confetti-dot:nth-child(12) {
  left: 22%;
  animation-delay: 0.14s;
}
.if-acc-confetti-dot:nth-child(13) {
  left: 42%;
  animation-delay: 0.04s;
}
.if-acc-confetti-dot:nth-child(14) {
  left: 52%;
  animation-delay: 0.13s;
}
.if-acc-confetti-dot:nth-child(15) {
  left: 72%;
  animation-delay: 0.07s;
}
.if-acc-confetti-dot:nth-child(16) {
  left: 32%;
  animation-delay: 0.16s;
}
.if-acc-confetti-dot:nth-child(17) {
  left: 62%;
  animation-delay: 0.01s;
}
.if-acc-confetti-dot:nth-child(18) {
  left: 96%;
  animation-delay: 0.1s;
}

@keyframes if-acc-confetti-fall {
  0% {
    opacity: 0;
    transform: translateY(0) rotate(0deg);
  }
  12% {
    opacity: 0.95;
  }
  100% {
    opacity: 0;
    transform: translateY(220px) rotate(260deg);
  }
}
