@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --color-primary: #870AE0;
  --color-primary-light: #8B5CF6;
  --color-primary-dark: #6D28D9;
  --color-primary-50: #F5F3FF;
  --color-primary-100: #EDE9FE;
  --color-primary-200: #DDD6FE;
  --color-surface: #F8F8F8;
  --color-surface-card: #FFFFFF;
  --color-border: #E5E7EB;
  --color-text-muted: #6B7280;
  --color-earn: #22C55E;
  --color-use: #EF4444;
  --color-expire: #F59E0B;
  --font-family-sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --radius-card: 12px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  background-color: #F8F8F8;
  color: #111827;
  -webkit-font-smoothing: antialiased;
}

/* Common Layout Components */
.page-container {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Banner Component */
.ph-banner {
    background: #A452F61F;
    border-radius: 8px;
    padding: 20px 24px;
}
.ph-title {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}
.ph-subtitle {
    font-size: 14px;
    color: #6B7280;
}

/* Stat Card Component */
.stat-card {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 16px 20px;
    position: relative;
    overflow: hidden;
}
.stat-card.available { border-top: 3px solid #22C55E; }
.stat-card.expiring { border-top: 3px solid #EF4444; }
.stat-card.rate { border-top: 3px solid #870AE0; }

.stat-label {
    font-size: 12px;
    font-weight: 600;
    color: #6B7280;
    margin-bottom: 8px;
}
.stat-value {
    font-size: 32px;
    font-weight: 700;
}
.available .stat-value { color: #22C55E; }
.expiring .stat-value { color: #EF4444; }
.rate .stat-value { color: #870AE0; }

/* Table styles */
.ph-table-container {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    overflow-x: auto;
}
.ph-table {
    width: 100%;
    border-collapse: collapse;
}
.ph-table th {
    background: #F9FAFB;
    padding: 12px 16px;
    text-align: left;
    font-size: 10px;
    font-weight: 600;
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #E5E7EB;
}
.ph-table td {
    padding: 14px 16px;
    font-size: 12px;
    color: #374151;
    border-bottom: 1px solid #F3F4F6;
}

/* Badges */
.badge {
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
}
.badge-earn { background: #DCFCE7; color: #16A34A; }
.badge-use { background: #FEE2E2; color: #DC2626; }
.badge-expire { background: #FEF3C7; color: #D97706; }

/* Buttons */
.btn-primary {
    background: linear-gradient(90deg, #870AE0 0%, #A452F6 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
    height: 40px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-primary:hover { opacity: 0.88; }

.btn-secondary {
    background: #fff;
    border: 1px solid #E5E7EB;
    color: #6B7280;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    height: 40px;
    padding: 0 20px;
    cursor: pointer;
}

/* Forms */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.form-label {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
}
.form-input {
    height: 40px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 13px;
    outline: none;
}
.form-input:focus { border-color: var(--color-primary); }

@media (max-width: 767px) {
    .page-container { padding: 16px; }
}
