/* ==========================================================================
   Plan & pricing (projects#index) and the public pricing page (pages#pricing).
   Same visual language as the dashboard (dashboard.css): white panels, 10px
   radius, #1f6feb accent. Everything is scoped to .pricing-page; it loads
   after application.css (Materialize), so the resets below win on specificity.
   ========================================================================== */

.pricing-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 0 40px;
  color: #1f2530;
  font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.pricing-page h4,
.pricing-page h6,
.pricing-page p {
  margin: 0;
  font-family: inherit;
}

.pricing-page h4 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  color: #1f2530;
}

.pricing-page h6 {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: #1f2530;
}

.pricing-page i {
  display: inline-block;
  width: 14px;
  font-size: 12px;
  line-height: 1;
  text-align: center;
}

/* ---------- Header ---------- */
.pricing-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 18px;
}

.pricing-head p {
  margin-top: 4px;
  font-size: 13px;
  color: #6a7280;
}

/* Selected repository, same pill as the navbar */
.pricing-repo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 320px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #eaf2ff;
  color: #163f8a;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pricing-repo i { color: #1f6feb; }

.pricing-page .pricing-section { margin: 26px 0 10px; }

.pricing-contact {
  margin-top: 22px;
  font-size: 13px;
  color: #6a7280;
}

.pricing-page .pricing-contact a { color: #1f6feb; }

/* ---------- Buttons (pills, like .dash-btn) ---------- */
.pricing-page .plan-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 100ms ease, border-color 100ms ease;
}

.pricing-page .plan-btn-primary {
  background: #1f6feb;
  border: 1px solid #1f6feb;
  color: #fff;
}

.pricing-page .plan-btn-primary:hover,
.pricing-page .plan-btn-primary:focus {
  background: #1a5fcc;
  border-color: #1a5fcc;
  color: #fff;
}

.pricing-page .plan-btn-ghost {
  background: #fff;
  border: 1px solid #c8ccd3;
  color: #1f2530;
}

.pricing-page .plan-btn-ghost:hover,
.pricing-page .plan-btn-ghost:focus {
  border-color: #8a94a3;
  color: #1f2530;
}

.pricing-page .plan-btn.is-static {
  background: #f6f7f9;
  border-color: #e2e5ea;
  color: #6a7280;
  cursor: default;
}

.pricing-page .plan-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(31, 111, 235, 0.3);
}

/* ---------- Status badge ---------- */
.plan-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.plan-badge.is-active  { background: #e3f6ea; color: #127a3a; }
.plan-badge.is-warning { background: #fff0e0; color: #8a4b00; }
.plan-badge.is-danger  { background: #fde8e8; color: #a12727; }
.plan-badge.is-muted   { background: #eef0f3; color: #4b5563; }

/* ---------- Current plan card ---------- */
.plan-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e2e5ea;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 20, 30, 0.04);
}

.plan-card-main { padding: 20px 24px 22px; }

.plan-card-aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 24px;
  border-left: 1px solid #edeef1;
  background: #f9fafb;
}

.plan-eyebrow {
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: #6a7280;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.plan-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 12px;
}

.plan-title strong {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.plan-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: #4b5563;
}

.plan-meta li {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.plan-meta i { color: #8a94a3; }

/* Users used vs. included */
.plan-users {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plan-users-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 13px;
  color: #4b5563;
}

.plan-users-label strong {
  font-size: 22px;
  font-weight: 700;
  color: #1f2530;
  font-variant-numeric: tabular-nums;
}

.plan-users-label small {
  margin-left: 3px;
  font-size: 13px;
  font-weight: 600;
  color: #6a7280;
}

.plan-bar {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e5ea;
}

.plan-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #1f6feb;
  transition: width 200ms ease;
}

.plan-bar.is-full span { background: #d9480f; }

.plan-users-note {
  font-size: 12px;
  color: #6a7280;
}

.plan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

/* ---------- Plan cards ---------- */
.plan-tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.plan-tier {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 20px 18px 16px;
  background: #fff;
  border: 1px solid #e2e5ea;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 20, 30, 0.04);
}

.plan-tier.is-current {
  border-color: #1f6feb;
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.12);
}

.plan-tier-tag {
  position: absolute;
  top: -9px;
  left: 16px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #1f6feb;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pricing-page .plan-tier-name { font-size: 16px; }

.plan-tier-tagline {
  min-height: 2.7em;
  font-size: 12px;
  line-height: 1.35;
  color: #6a7280;
}

.plan-tier-price {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 6px;
}

.plan-tier-price strong {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.plan-tier-price strong.is-text { font-size: 18px; }

.plan-tier-price span {
  font-size: 12px;
  color: #6a7280;
}

.plan-tier-alt {
  min-height: 1.3em;
  font-size: 12px;
  color: #6a7280;
}

.plan-tier-users {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 10px;
  padding-top: 12px;
  border-top: 1px solid #edeef1;
  font-size: 13px;
  color: #1f2530;
}

.plan-tier-users i { color: #1f6feb; }

.plan-tier .plan-btn { margin-top: auto; }

/* ---------- History ---------- */
.plan-history {
  overflow-x: auto;
  background: #fff;
  border: 1px solid #e2e5ea;
  border-radius: 12px;
}

.plan-history table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: 13px;
}

.plan-history th,
.plan-history td {
  padding: 9px 14px;
  border: 0;
  border-bottom: 1px solid #edeef1;
  border-radius: 0;
  text-align: left;
  white-space: nowrap;
  color: #1f2530;
}

.plan-history th {
  font-size: 11px;
  font-weight: 700;
  color: #6a7280;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: #f9fafb;
}

.plan-history tbody tr:last-child td { border-bottom: 0; }
.plan-history tbody tr:hover td { background: #f6f7f9; }

@media (max-width: 760px) {
  .plan-card { grid-template-columns: minmax(0, 1fr); }

  .plan-card-aside {
    border-left: 0;
    border-top: 1px solid #edeef1;
  }
}
