/* public/shared/subscription.css */

.fsub-container {
  padding: 1rem 0;
}

.fsub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.fsub-header h2 {
  margin: 0;
  color: var(--text-primary, #e2e8f0);
  font-size: 1.4rem;
}
.fsub-btn-dashboard {
  background: var(--bg-secondary, #334155);
  color: var(--text-primary, #e2e8f0);
  border: 1px solid var(--border, #475569);
  border-radius: 6px;
  padding: 0.6rem 1.2rem;
  font-weight: bold;
  cursor: pointer;
  font-size: 0.9rem;
}

.fsub-content {
  max-width: 640px;
}

/* ---- Plan Card ---- */
.fsub-card {
  background: var(--bg-secondary, #1e293b);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--accent, #f39c12);
}

.fsub-plan-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.fsub-plan-header h2 {
  margin: 0;
  color: var(--accent, #f39c12);
  font-size: 1.5rem;
}
.fsub-vehicles {
  display: block;
  color: var(--text-muted, #94a3b8);
  font-size: 0.9rem;
  margin-top: 0.2rem;
}

.fsub-price {
  text-align: right;
}
.fsub-amount {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary, #e2e8f0);
}
.fsub-period {
  display: block;
  color: var(--text-muted, #94a3b8);
  font-size: 0.85rem;
}

/* Status badge */
.fsub-badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.fsub-status-active {
  background: #14532d;
  color: #86efac;
}
.fsub-status-cancelled {
  background: #334155;
  color: #94a3b8;
}
.fsub-status-expired {
  background: #7f1d1d;
  color: #fca5a5;
}

/* Dates */
.fsub-dates p {
  margin: 0.3rem 0;
  color: var(--text-muted, #94a3b8);
  font-size: 0.9rem;
}
.fsub-dates strong {
  color: var(--text-primary, #e2e8f0);
}

/* Progress bar */
.fsub-progress-bar {
  height: 6px;
  background: var(--border, #334155);
  border-radius: 3px;
  margin: 1rem 0;
}
.fsub-progress-fill {
  height: 100%;
  background: var(--accent, #f39c12);
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* Payment method */
.fsub-payment {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted, #94a3b8);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* Actions */
.fsub-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.fsub-btn-danger {
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1.2rem;
  font-weight: bold;
  cursor: pointer;
  font-size: 0.9rem;
}
.fsub-btn-danger:hover {
  background: #dc2626;
}

.fsub-btn-upgrade {
  background: transparent;
  border: 1px solid var(--accent, #f39c12);
  color: var(--accent, #f39c12);
  border-radius: 6px;
  padding: 0.6rem 1.2rem;
  font-weight: bold;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.fsub-btn-upgrade:hover {
  background: rgba(243,156,18,0.1);
}

/* ---- Billing History ---- */
.fsub-card h3 {
  margin: 0 0 1rem;
  color: var(--text-primary, #e2e8f0);
  font-size: 1.1rem;
}

.fsub-table-wrap {
  overflow-x: auto;
}
.fsub-table {
  width: 100%;
  border-collapse: collapse;
}
.fsub-table th {
  text-align: left;
  padding: 0.6rem;
  color: var(--text-muted, #94a3b8);
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border, #334155);
}
.fsub-table td {
  padding: 0.6rem;
  color: var(--text-primary, #e2e8f0);
  font-size: 0.9rem;
  border-bottom: 1px solid #1e293b;
}

/* ---- Modal ---- */
.fsub-modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.6);
  z-index: 4000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.fsub-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.fsub-modal {
  background: var(--bg-secondary, #1e293b);
  border: 1px solid var(--border, #475569);
  border-radius: 16px;
  padding: 2rem;
  max-width: 440px;
  width: 90%;
  color: var(--text-primary, #e2e8f0);
  text-align: center;
}
.fsub-modal h2 {
  margin: 0 0 1rem;
  color: var(--accent, #f39c12);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.fsub-modal p {
  margin: 0.5rem 0;
  line-height: 1.5;
}

.fsub-modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.fsub-btn-cancel {
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1.2rem;
  font-weight: bold;
  cursor: pointer;
}
.fsub-btn-secondary {
  background: transparent;
  border: 1px solid var(--border, #475569);
  color: var(--text-primary, #e2e8f0);
  border-radius: 6px;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
}

/* Toast */
.fsub-toast {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  animation: fsub-slide-in 0.2s ease;
}
.fsub-toast-error {
  background: var(--danger, #7f1d1d);
  color: var(--danger-text, #fca5a5);
  border: 1px solid #ef4444;
}
.fsub-toast-success {
  background: var(--success, #14532d);
  color: var(--success-text, #86efac);
  border: 1px solid #22c55e;
}
@keyframes fsub-slide-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}