/* Chicken Shop - Styles */

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

/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
  --primary-color: #FF8C42;
  --primary-dark: #FF6B35;
  --secondary-color: #FFB366;
  --danger-color: #F44336;
  --warning-color: #FF9800;
  --success-color: #4CAF50;
  --text-color: #1a1a1a;
  --text-light: #666;
  --bg-color: #fafafa;
  --bg-warm: #FFF9F5;
  --card-bg: #ffffff;
  --border-color: #e0e0e0;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.1);
  --border-radius: 12px;
  --transition: all 0.3s ease;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background: linear-gradient(135deg, #fafafa 0%, #FFF9F5 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

h1, h2, h3, h4, h5, h6 {
  margin-bottom: 1rem;
  font-weight: 600;
  line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: #45a049;
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */
.navbar {
  background-color: #fff;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand a {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.chicken-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-menu a {
  color: var(--text-color);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.nav-menu a:hover {
  background-color: var(--bg-warm);
  color: var(--primary-color);
}

.nav-menu a.active {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-user .balance {
  font-weight: 600;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #FFF9F5 0%, #FFE8D6 100%);
  border-radius: 20px;
  color: var(--primary-color);
  border: 1px solid rgba(255, 140, 66, 0.2);
}

.nav-user .username {
  color: var(--text-light);
}

.btn-logout {
  padding: 0.5rem 1rem;
  background-color: var(--danger-color);
  color: white;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
}

.btn-logout:hover {
  background-color: #d32f2f;
}

/* ==========================================================================
   Container & Layout
   ========================================================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.page-header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem;
  background: linear-gradient(135deg, #FFF9F5 0%, #FFE8D6 100%);
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 140, 66, 0.2);
}

.subtitle {
  font-size: 1.2rem;
  color: var(--text-light);
  margin-top: 0.5rem;
}

.balance-highlight {
  color: var(--primary-color);
  font-size: 1.3em;
}

.section {
  margin-bottom: 3rem;
}

/* ==========================================================================
   Cards
   ========================================================================== */
.card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  border-color: rgba(255, 140, 66, 0.3);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.balance-card {
  text-align: center;
}

.balance-display {
  font-size: 4rem;
  font-weight: bold;
  color: var(--primary-color);
  margin: 1rem 0;
}

.balance-info {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.balance-breakdown {
  display: flex;
  justify-content: space-around;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.balance-stat {
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-light);
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
}

.actions-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(255, 140, 66, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 140, 66, 0.4);
  color: white;
}

.btn-secondary {
  background-color: white;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #FFF9F5 0%, #FFE8D6 100%);
  color: var(--primary-color);
}

.btn-danger {
  background-color: var(--danger-color);
  color: white;
}

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

.btn-admin {
  background-color: #9C27B0;
  color: white;
}

.btn-admin:hover {
  background-color: #7B1FA2;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* ==========================================================================
   Rewards Grid
   ========================================================================== */
.rewards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.reward-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.reward-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.reward-card.disabled {
  opacity: 0.6;
}

.reward-emoji {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 1rem;
}

.reward-name {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.reward-description {
  color: var(--text-light);
  flex: 1;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.reward-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.reward-cost {
  font-weight: bold;
  font-size: 1.1rem;
  color: var(--primary-color);
}

.insufficient-balance {
  font-size: 0.9rem;
  color: var(--danger-color);
  font-style: italic;
}

/* ==========================================================================
   Redemptions List
   ========================================================================== */
.redemptions-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.redemption-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.redemption-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.redemption-info {
  flex: 1;
}

.redemption-info h4 {
  margin-bottom: 0.25rem;
}

.redemption-meta {
  font-size: 0.9rem;
  color: var(--text-light);
}

.status {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
}

.status-pending {
  background-color: #FFF3E0;
  color: #E65100;
}

.status-fulfilled {
  background-color: #E8F5E9;
  color: #2E7D32;
}

.status-cancelled {
  background-color: #FFEBEE;
  color: #C62828;
}

.status-active {
  background-color: #E8F5E9;
  color: #2E7D32;
}

.status-inactive {
  background-color: #F5F5F5;
  color: #757575;
}

/* ==========================================================================
   Admin Styles
   ========================================================================== */
.admin-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: var(--border-radius);
  border-bottom: 3px solid var(--primary-color);
}

.admin-header h1 {
  font-size: 2rem;
  margin: 0;
  color: var(--text-color);
  font-weight: 700;
  letter-spacing: -0.5px;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.metric-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  text-align: center;
  border-left: 4px solid var(--primary-color);
  transition: var(--transition);
}

.metric-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.metric-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  line-height: 1;
}

.metric-label {
  font-size: 0.9rem;
  color: var(--text-light);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--border-color);
}

.admin-tab {
  padding: 1rem 2rem;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-light);
  transition: var(--transition);
  margin-bottom: -2px;
}

.admin-tab:hover {
  color: var(--primary-color);
  background-color: rgba(255, 140, 66, 0.05);
}

.admin-tab.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  background-color: transparent;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.section-header h2 {
  margin: 0;
  font-size: 1.5rem;
}

.rewards-summary {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.rewards-summary p {
  margin: 0.5rem 0;
  color: var(--text-color);
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon {
  font-size: 3rem;
}

.stat-info h3 {
  font-size: 2rem;
  margin-bottom: 0.25rem;
  color: var(--primary-color);
}

.stat-info p {
  color: var(--text-light);
  margin: 0;
}

.admin-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.admin-table {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  overflow-x: auto;
}

.admin-table table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.admin-table th {
  font-weight: 600;
  color: var(--text-light);
  background-color: var(--bg-color);
}

.admin-table tr:hover {
  background-color: var(--bg-color);
}

.reward-emoji-col {
  font-size: 1.5rem;
}

/* ==========================================================================
   Forms & Modals
   ========================================================================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.modal-content {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  cursor: pointer;
  color: var(--text-light);
}

.modal-close:hover {
  color: var(--text-color);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-family: inherit;
}

.form-group textarea {
  resize: vertical;
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
}

/* ==========================================================================
   Login Page
   ========================================================================== */
.login-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
  width: 100%;
  max-width: 400px;
  padding: 2rem;
}

.login-box {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 3rem 2rem;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.login-box h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.btn-slack {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem;
  margin: 2rem 0;
  background-color: #4A154B;
  color: white;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 1.1rem;
  transition: var(--transition);
}

.btn-slack:hover {
  background-color: #3a0f3c;
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.help-text {
  color: var(--text-light);
  font-size: 0.9rem;
}

.alert {
  padding: 1rem;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
}

.alert-error {
  background-color: #FFEBEE;
  color: #C62828;
  border: 1px solid #EF9A9A;
}

/* ==========================================================================
   Error Page
   ========================================================================== */
.error-page {
  text-align: center;
  padding: 4rem 2rem;
}

.error-icon {
  font-size: 6rem;
  margin-bottom: 1rem;
}

.error-message {
  font-size: 1.2rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

.error-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */
#toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 3000;
}

.toast {
  background: var(--card-bg);
  padding: 1rem 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  margin-bottom: 1rem;
  min-width: 300px;
  animation: slideIn 0.3s ease;
}

.toast.toast-success {
  border-left: 4px solid var(--success-color);
}

.toast.toast-error {
  border-left: 4px solid var(--danger-color);
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ==========================================================================
   Utilities
   ========================================================================== */
.text-center {
  text-align: center;
}

.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-light);
}

.empty-state h2 {
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background-color: var(--card-bg);
  padding: 2rem;
  text-align: center;
  color: var(--text-light);
  margin-top: 4rem;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-menu {
    gap: 1rem;
  }

  .dashboard-grid,
  .rewards-grid {
    grid-template-columns: 1fr;
  }

  .admin-stats-grid {
    grid-template-columns: 1fr;
  }

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

  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
}

/* ==========================================================================
   Leaderboard Styles
   ========================================================================== */
.tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--border-color);
}

.tab {
  padding: 1rem 2rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-light);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
}

.tab:hover {
  color: var(--text-color);
  background-color: rgba(0, 0, 0, 0.05);
}

.tab.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.rank-card {
  margin-bottom: 2rem;
}

.rank-display {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.rank-number {
  font-size: 4rem;
  font-weight: bold;
  color: var(--primary-color);
  line-height: 1;
}

.rank-info {
  flex: 1;
}

.rank-info p {
  margin-bottom: 0.5rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.leaderboard-table-container {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow-x: auto;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
}

.leaderboard-table thead {
  background-color: var(--bg-color);
}

.leaderboard-table th,
.leaderboard-table td {
  padding: 1.25rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.leaderboard-table th {
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

.leaderboard-table tr:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

.leaderboard-table tr.current-user {
  background: linear-gradient(135deg, #FFF9F5 0%, #FFE8D6 100%);
  font-weight: 600;
}

.leaderboard-table tr.top-three {
  background: linear-gradient(135deg, #FFFDE7 0%, #FFF9C4 100%);
}

.leaderboard-table tr.current-user.top-three {
  background: linear-gradient(135deg, #FFE8D6 0%, #FFD9B3 100%);
}

.rank-col {
  width: 100px;
  text-align: center;
}

.name-col {
  width: auto;
}

.chickens-col {
  width: 150px;
  text-align: right;
}

.rank-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: var(--bg-color);
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 1.1rem;
}

.top-three .rank-badge {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  color: white;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-name {
  font-size: 1rem;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-you {
  background-color: var(--primary-color);
  color: white;
}

.chicken-count {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-color);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.stat-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  text-align: center;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--primary-color);
  margin: 0.5rem 0;
}

.stat-label {
  color: var(--text-light);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .tabs {
    flex-direction: column;
    gap: 0;
  }

  .tab {
    border-bottom: none;
    border-left: 3px solid transparent;
    margin-bottom: 0;
  }

  .tab.active {
    border-left-color: var(--primary-color);
    border-bottom-color: transparent;
  }

  .rank-display {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .leaderboard-table th,
  .leaderboard-table td {
    padding: 0.75rem 0.5rem;
    font-size: 0.9rem;
  }

  .rank-col {
    width: 60px;
  }

  .chickens-col {
    width: 100px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Transactions List Styles
   ========================================================================== */
.transactions-list {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.transaction-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.transaction-item:last-child {
  border-bottom: none;
}

.transaction-item:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

.transaction-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.transaction-info {
  flex: 1;
  min-width: 0;
}

.transaction-info h4 {
  margin: 0 0 0.25rem 0;
  font-size: 1rem;
  font-weight: 500;
}

.transaction-meta {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.transaction-amount {
  font-size: 1.1rem;
  font-weight: bold;
  flex-shrink: 0;
  min-width: 80px;
  text-align: right;
}

.transaction-amount.received {
  color: var(--success-color);
}

.transaction-amount.given {
  color: var(--text-light);
}

@media (max-width: 768px) {
  .transaction-item {
    padding: 1rem;
  }

  .transaction-info h4 {
    font-size: 0.9rem;
  }

  .transaction-meta {
    font-size: 0.8rem;
  }

  .transaction-amount {
    font-size: 1rem;
    min-width: 70px;
  }
}

/* ==========================================================================
   Admin Settings Page
   ========================================================================== */
.settings-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.settings-section {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.settings-section h2 {
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border-color);
}

.settings-section select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-family: inherit;
  background-color: var(--card-bg);
}

.form-help {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-light);
}

.billing-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.plan-badge {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #FFF9F5 0%, #FFE8D6 100%);
  border-radius: var(--border-radius);
  border: 2px solid rgba(255, 140, 66, 0.3);
}

.plan-badge-free .plan-icon {
  font-size: 2.5rem;
}

.plan-details h3 {
  margin: 0 0 0.25rem 0;
  color: var(--primary-color);
}

.plan-details p {
  margin: 0;
  color: var(--text-light);
}

.billing-notice {
  padding: 1.5rem;
  background-color: var(--bg-color);
  border-radius: var(--border-radius);
  border-left: 4px solid var(--primary-color);
}

.billing-notice p {
  margin: 0 0 0.75rem 0;
}

.billing-notice p:last-child {
  margin-bottom: 0;
}

.billing-notice-small {
  font-size: 0.9rem;
  color: var(--text-light);
}

.billing-notice a {
  color: var(--primary-color);
  text-decoration: underline;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.info-item label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-item span,
.info-item code {
  font-size: 1rem;
  color: var(--text-color);
}

.info-item code {
  background-color: var(--bg-color);
  padding: 0.5rem;
  border-radius: 6px;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 0.9rem;
  word-break: break-all;
}

.support-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.support-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background-color: var(--bg-color);
  border-radius: var(--border-radius);
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.support-link:hover {
  background-color: var(--bg-warm);
  border-color: var(--primary-color);
  box-shadow: var(--shadow);
}

.support-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.support-link strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--text-color);
}

.support-link small {
  color: var(--text-light);
}

.danger-zone {
  border: 2px solid var(--danger-color);
  background: linear-gradient(135deg, #FFEBEE 0%, #FFCDD2 100%);
}

.danger-zone h2 {
  color: var(--danger-color);
  border-bottom-color: var(--danger-color);
}

.danger-actions {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.danger-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background-color: white;
  border-radius: var(--border-radius);
  gap: 1rem;
}

.danger-item strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--text-color);
}

.danger-item p {
  margin: 0;
  color: var(--text-light);
  font-size: 0.9rem;
}

.danger-note {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-light);
}

/* ==========================================================================
   Redemptions Page
   ========================================================================== */
.filter-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 0.75rem 1.5rem;
  background-color: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  color: var(--text-light);
  font-weight: 500;
  transition: var(--transition);
}

.filter-tab:hover {
  background-color: var(--bg-warm);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.filter-tab.active {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  border-color: var(--primary-color);
  color: white;
}

.redemptions-table .user-cell {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.redemptions-table .user-cell small {
  color: var(--text-light);
  font-size: 0.85rem;
}

.redemptions-table .reward-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.redemptions-table .reward-emoji {
  font-size: 1.5rem;
}

.redemptions-table .date-cell {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.redemptions-table .date-cell small {
  color: var(--text-light);
  font-size: 0.85rem;
}

.redemptions-table .status-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.redemptions-table .fulfilled-info,
.redemptions-table .pending-note {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: var(--text-light);
}

.redemptions-table .actions-cell {
  white-space: nowrap;
}

.redemption-pending {
  background-color: rgba(255, 243, 224, 0.3);
}

.btn-success {
  background-color: var(--success-color);
  color: white;
}

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

.pagination-notice {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-light);
  background-color: var(--bg-color);
  border-radius: var(--border-radius);
  margin-top: 1rem;
}

.fulfill-summary {
  padding: 1rem;
  background-color: var(--bg-color);
  border-radius: var(--border-radius);
  margin-bottom: 1.5rem;
}

.fulfill-summary p {
  margin: 0.5rem 0;
}

.redemption-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-row strong {
  color: var(--text-light);
  font-weight: 600;
}

.detail-row span {
  text-align: right;
}

/* ==========================================================================
   History Page
   ========================================================================== */
.history-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.summary-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.summary-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.summary-info h3 {
  font-size: 2rem;
  margin: 0 0 0.25rem 0;
  color: var(--primary-color);
}

.summary-info p {
  margin: 0;
  color: var(--text-light);
  font-size: 0.9rem;
}

.history-table {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  overflow-x: auto;
  margin-bottom: 2rem;
}

.history-table table {
  width: 100%;
  border-collapse: collapse;
}

.history-table th,
.history-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.history-table th {
  font-weight: 600;
  color: var(--text-light);
  background-color: var(--bg-color);
}

.history-table tr:hover {
  background-color: var(--bg-color);
}

.history-row.status-pending-row {
  background-color: rgba(255, 243, 224, 0.2);
}

.history-row.status-fulfilled-row {
  background-color: rgba(232, 245, 233, 0.2);
}

.reward-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.reward-info .reward-emoji {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.reward-info strong {
  display: block;
  margin-bottom: 0.25rem;
}

.reward-info small {
  display: block;
  color: var(--text-light);
  font-size: 0.85rem;
}

.chicken-cost {
  color: var(--primary-color);
}

.date-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.date-info small {
  color: var(--text-light);
  font-size: 0.85rem;
}

.status-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.status-info .fulfilled-date,
.status-info .pending-note {
  font-size: 0.8rem;
  color: var(--text-light);
}

.history-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .settings-container {
    padding: 1rem;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .danger-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-tabs {
    flex-direction: column;
  }

  .filter-tab {
    text-align: center;
  }

  .history-summary {
    grid-template-columns: 1fr;
  }

  .summary-card {
    padding: 1.25rem;
  }

  .summary-icon {
    font-size: 2rem;
  }

  .summary-info h3 {
    font-size: 1.5rem;
  }
}
