/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Navbar */
.navbar {
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  padding: 15px 0;
  margin-bottom: 30px;
}

.nav-links {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 20px;
}

.nav-links a {
  color: #333;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
  background-color: #f0f0f0;
}

/* Plans Grid */
.plans-header {
  text-align: center;
  margin-bottom: 40px;
}

.plans-header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: #2c3e50;
}

.plans-header p {
  font-size: 1.1rem;
  color: #7f8c8d;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

/* Plan Card */
.plan-card {
  background: white;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.plan-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.plan-header {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 2px solid #ecf0f1;
}

.plan-header h3 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  color: #2c3e50;
}

.plan-price {
  font-size: 1.4rem;
  font-weight: bold;
  color: #3498db;
}

.plan-features {
  margin-bottom: 25px;
}

.plan-features ul {
  list-style: none;
}

.plan-features li {
  padding: 10px 0;
  border-bottom: 1px solid #ecf0f1;
  color: #555;
}

.plan-features li:before {
  content: "✓ ";
  color: #27ae60;
  font-weight: bold;
  margin-right: 8px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.3s, transform 0.1s;
  width: 100%;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background-color: #3498db;
  color: white;
}

.btn-primary:hover {
  background-color: #2980b9;
}

.btn-primary:disabled {
  background-color: #95a5a6;
  cursor: not-allowed;
}

.btn-secondary {
  background-color: #95a5a6;
  color: white;
}

.btn-secondary:hover {
  background-color: #7f8c8d;
}

.btn-danger {
  background-color: #e74c3c;
  color: white;
}

.btn-danger:hover {
  background-color: #c0392b;
}

.btn-warning {
  background-color: #f39c12;
  color: white;
}

.btn-warning:hover {
  background-color: #d68910;
}

.btn-success {
  background-color: #27ae60;
  color: white;
}

.btn-success:hover {
  background-color: #229954;
}

.btn-info {
  background-color: #16a085;
  color: white;
}

.btn-info:hover {
  background-color: #138d75;
}

/* Cards */
.callback-card,
.subscriptions-card,
.payments-card,
.refund-card {
  background: white;
  border-radius: 8px;
  padding: 40px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  text-align: center;
}

.callback-card h1,
.subscriptions-card h1,
.payments-card h1,
.refund-card h1 {
  margin-bottom: 20px;
  color: #2c3e50;
}

/* Subscription Card */
.subscription-card {
  background: white;
  border-radius: 8px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.subscription-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #ecf0f1;
}

.subscription-header h3 {
  font-size: 1.5rem;
  color: #2c3e50;
}

.subscription-info {
  margin-bottom: 20px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #ecf0f1;
}

.info-row label {
  font-weight: 600;
  color: #555;
}

.info-row span {
  color: #333;
}

.subscription-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.subscription-actions .btn {
  flex: 1;
  min-width: 120px;
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-active {
  background-color: #d4edda;
  color: #155724;
}

.status-cancelled {
  background-color: #f8d7da;
  color: #721c24;
}

.status-expired {
  background-color: #d6d8d9;
  color: #1b1e21;
}

.status-paid {
  background-color: #d4edda;
  color: #155724;
}

.status-failed {
  background-color: #f8d7da;
  color: #721c24;
}

.status-refunded {
  background-color: #fff3cd;
  color: #856404;
}

.status-paused {
  background-color: #fff3cd;
  color: #856404;
}

/* Table */
.payments-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: white;
}

.payments-table th,
.payments-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #ecf0f1;
}

.payments-table th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: #2c3e50;
}

.payments-table tr:hover {
  background-color: #f8f9fa;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #3498db;
}

/* Filters */
.filters {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
  align-items: center;
}

.filters select {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

/* Messages */
.error {
  color: #e74c3c;
  margin: 15px 0;
  padding: 12px;
  background-color: #f8d7da;
  border-radius: 4px;
  border: 1px solid #f5c6cb;
}

.success {
  color: #27ae60;
  margin: 15px 0;
  padding: 12px;
  background-color: #d4edda;
  border-radius: 4px;
  border: 1px solid #c3e6cb;
}

.alert-info {
  background-color: #d1ecf1;
  border: 1px solid #bee5eb;
  padding: 10px;
  border-radius: 4px;
  color: #0c5460;
}

/* Loading */
#loading {
  text-align: center;
  padding: 40px;
  color: #7f8c8d;
  font-size: 1.2rem;
}

/* Responsive */
@media (max-width: 768px) {
  .plans-grid {
    grid-template-columns: 1fr;
  }

  .subscription-actions {
    flex-direction: column;
  }

  .subscription-actions .btn {
    min-width: 100%;
  }

  .filters {
    flex-direction: column;
    align-items: stretch;
  }

  .filters select,
  .filters button {
    width: 100%;
  }

  .payments-table {
    font-size: 0.85rem;
  }

  .payments-table th,
  .payments-table td {
    padding: 8px;
  }
}
