/* ============================================
   BILLING PAGE - Compact & Modern Design
   ============================================ */

.billing-container {
  max-width: 1100px;
  margin: 20px auto;
  padding: 0 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

/* Header - Compact */
.billing-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid #e5e7eb;
}

.billing-title h1 {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 4px 0;
}

.billing-title h1 i {
  color: #667eea;
  margin-right: 8px;
}

.billing-title p {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

.btn-upgrade {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
  border: none;
  cursor: pointer;
}

.btn-upgrade:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Subscription Card - Compact */
.subscription-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 16px;
  overflow: hidden;
}

.subscription-card.active {
  border: 2px solid #10b981;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
}

.card-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-body {
  padding: 20px;
}

/* Plan Info - Grid layout */
.plan-info {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.plan-name h3 {
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 4px 0;
}

.plan-code {
  font-size: 12px;
  color: #6b7280;
  background: #f3f4f6;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-top: 60px !important;
}

.plan-price {
  text-align: right;
}

.plan-price .price {
  font-size: 32px;
  font-weight: 700;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
}

.plan-price .period {
  font-size: 13px;
  color: #6b7280;
}

/* Subscription Details - Compact Grid */
.subscription-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.detail-row {
  background: #f9fafb;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.detail-row .label {
  font-size: 13px;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.detail-row .value {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
}

.detail-row .value.remaining {
  color: #10b981;
  font-size: 20px;
}

/* Progress Bar - Slim */
.progress-bar-container {
  margin: 16px 0;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  border-radius: 3px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Card Actions - Compact */
.card-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.btn {
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-renew {
  background: #3b82f6;
  color: white;
}

.btn-renew:hover {
  background: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-upgrade {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: white;
}

.btn-upgrade:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.btn-cancel {
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #d1d5db;
}

.btn-cancel:hover {
  background: #ef4444;
  color: white;
  border-color: #ef4444;
}

.btn-primary {
  background: #b81f5c;
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Empty State - Compact */
.subscription-card.empty {
  border: 2px dashed #d1d5db;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
}

.empty-state i {
  font-size: 48px;
  color: #d1d5db;
  /* margin-bottom: 12px; */
}

.empty-state h3 {
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 6px 0;
}

.empty-state p {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 16px;
}

/* Badges - Compact */
.badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-active {
  background: #d1fae5;
  color: #065f46;
}

.badge-pending {
  background: #fef3c7;
  color: #92400e;
}

.badge-expired {
  background: #fee2e2;
  color: #991b1b;
}

.badge-cancelled {
  background: #f3f4f6;
  color: #6b7280;
}

.badge-warning {
  background: #fcd34d;
  color: #92400e;
}

/* Upcoming Invoice - Compact */
.upcoming-invoice {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 2px solid #fcd34d;
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
}

.upcoming-invoice .card-header {
  background: #fef3c7;
  border-bottom-color: #fcd34d;
}

.invoice-item {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.invoice-info strong {
  font-size: 15px;
  color: #1f2937;
  display: block;
  margin-bottom: 4px;
}

.invoice-code {
  font-size: 12px;
  color: #6b7280;
  font-family: "Courier New", monospace;
  background: white;
  padding: 2px 6px;
  border-radius: 4px;
}

.invoice-date {
  font-size: 13px;
  color: #6b7280;
  margin-top: 4px;
}

.invoice-amount {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.invoice-amount .amount {
  font-size: 24px;
  font-weight: 700;
  color: #dc2626;
}

.btn-pay {
  padding: 8px 16px;
  background: #dc2626;
  color: white;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s;
}

.btn-pay:hover {
  background: #b91c1c;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

/* Payment History - Compact Table */
.payment-history {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 16px;
  overflow: hidden;
}

.history-table {
  overflow-x: auto;
}

.history-table table {
  width: 100%;
  border-collapse: collapse;
}

.history-table thead {
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
}

.history-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #e5e7eb;
}

.history-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f3f4f6;
  font-size: 13px;
  color: #1f2937;
}

.history-table tr:hover {
  background: #f9fafb;
}

.history-table td.amount {
  font-weight: 700;
  color: #10b981;
  font-size: 15px;
}

.history-table code {
  background: #f3f4f6;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-family: "Courier New", monospace;
  color: #6b7280;
}

.btn-action {
  padding: 6px 12px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
}

.btn-action:hover:not(:disabled) {
  background: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn-action:disabled {
  background: #e5e7eb;
  color: #9ca3af;
  cursor: not-allowed;
}

.payment-status {
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.payment-status.paid {
  background: #d1fae5;
  color: #065f46;
}

.payment-status.pending {
  background: #fef3c7;
  color: #92400e;
}

.payment-status.failed {
  background: #fee2e2;
  color: #991b1b;
}

/* Empty History */
.empty-history {
  text-align: center;
  padding: 40px 20px;
}

.empty-history i {
  font-size: 40px;
  color: #d1d5db;
  margin-bottom: 12px;
}

.empty-history p {
  font-size: 14px;
  color: #6b7280;
}

/* Footer - Compact */
.billing-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: #f3f4f6;
  color: #6b7280;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s;
}

.btn-back:hover {
  background: #e5e7eb;
  color: #1f2937;
}

/* Responsive - Mobile */
@media (max-width: 768px) {
  .billing-container {
    padding: 0 12px;
  }

  .billing-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .billing-title h1 {
    font-size: 24px;
  }

  .plan-info {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .plan-price {
    text-align: left;
  }

  .subscription-details {
    grid-template-columns: 1fr;
  }

  .card-body {
    padding: 16px;
  }

  .card-actions {
    grid-template-columns: 1fr;
  }

  .invoice-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .invoice-amount {
    align-items: flex-start;
  }

  .history-table {
    font-size: 12px;
  }

  .history-table th,
  .history-table td {
    padding: 10px 12px;
  }
}
