/* Modern Admin Portal Styles */
:root {
  --primary-green: #609e43;
  --secondary-green: #5a8f3d;
  --brown: #73634d;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --red-50: #fef2f2;
  --red-100: #fee2e2;
  --red-600: #dc2626;
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-600: #2563eb;
  --green-50: #f0fdf4;
  --green-100: #dcfce7;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.5;
  color: var(--gray-900);
  background-color: var(--gray-50);
}

/* Login Page Styles */
.login-container {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--gray-50) 0%, #ffffff 50%, var(--gray-100) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.login-wrapper {
  max-width: 28rem;
  width: 100%;
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.logo-card {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-100);
  margin-bottom: 1.5rem;
}

.logo {
  height: 4rem;
  width: auto;
  margin: 0 auto;
  display: block;
}

.login-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.login-subtitle {
  color: var(--gray-600);
  font-size: 1rem;
}

.login-form-card {
  background: white;
  border-radius: 1rem;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--gray-100);
  padding: 2rem;
}

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

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-200);
  border-radius: 0.75rem;
  font-size: 1rem;
  transition: all 0.2s ease;
  background: white;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgba(96, 158, 67, 0.1);
}

.btn-primary {
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
  color: white;
  border: none;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--secondary-green) 0%, #527a37 100%);
  box-shadow: var(--shadow-xl);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.spinner {
  animation: spin 1s linear infinite;
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.75rem;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.create-account-link {
  text-align: center;
  padding-top: 1rem;
}

.create-account-btn {
  color: var(--primary-green);
  font-weight: 600;
  font-size: 0.875rem;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.create-account-btn:hover {
  color: var(--secondary-green);
}

.login-footer {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.875rem;
  color: var(--gray-500);
}

.error-message {
  background: var(--red-50);
  border: 1px solid var(--red-100);
  color: #dc2626;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  backdrop-filter: blur(4px);
  padding: 1rem;
}

.modal-content {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  width: 100%;
  max-width: 28rem;
  box-shadow: var(--shadow-2xl);
  border: 1px solid var(--gray-100);
  max-height: 90vh;
  overflow-y: auto;
}

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

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
}

.modal-close {
  color: var(--gray-400);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.2s ease;
}

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

/* Dashboard Styles */
.dashboard-container {
  min-height: 100vh;
  background: var(--gray-50);
}

.top-nav {
  background: white;
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--gray-200);
  padding: 1rem 1.5rem;
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.nav-logo {
  height: 2.5rem;
  width: auto;
}

.nav-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0;
}

.nav-subtitle {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin: 0;
}

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

.user-info {
  text-align: right;
}

.user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-900);
  margin: 0;
}

.user-email {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin: 0;
}

.logout-btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #dc2626;
  background: none;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.logout-btn:hover {
  background: var(--red-50);
  color: #b91c1c;
}

.dashboard-layout {
  display: flex;
  height: calc(100vh - 80px);
}

.sidebar {
  width: 16rem;
  background: white;
  box-shadow: var(--shadow-sm);
  border-right: 1px solid var(--gray-200);
  position: relative;
}

.sidebar-nav {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: none;
  background: none;
  color: var(--gray-700);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
}

.nav-item:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

.nav-item.active {
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
  color: white;
  box-shadow: var(--shadow-lg);
}

.nav-icon {
  font-size: 1.125rem;
}

.nav-indicator {
  margin-left: auto;
  width: 0.5rem;
  height: 0.5rem;
  background: white;
  border-radius: 50%;
}

.sidebar-footer {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
  border-radius: 0.75rem;
  padding: 1rem;
  text-align: center;
  color: white;
}

.footer-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0;
}

.footer-version {
  font-size: 0.75rem;
  opacity: 0.8;
  margin: 0;
}

.main-content {
  flex: 1;
  overflow: auto;
  padding: 2rem;
}

/* Section Header */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.section-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-icon-container {
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
  padding: 0.75rem;
  border-radius: 0.75rem;
  color: white;
  font-size: 1.25rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0;
  text-transform: capitalize;
}

.section-count {
  color: var(--gray-600);
  font-size: 0.875rem;
  margin: 0;
}

.add-btn {
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.add-btn:hover {
  background: linear-gradient(135deg, var(--secondary-green) 0%, #527a37 100%);
  box-shadow: var(--shadow-xl);
  transform: translateY(-1px);
}

/* Table Styles */
.table-container {
  background: white;
  border-radius: 1rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  overflow: hidden;
}

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

.table-header {
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
  border-bottom: 1px solid var(--gray-200);
}

.table-header th {
  padding: 1rem 1.5rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table-row {
  border-bottom: 1px solid var(--gray-100);
  transition: background-color 0.2s ease;
}

.table-row:hover {
  background: var(--gray-50);
}

.table-row:nth-child(even) {
  background: rgba(249, 250, 251, 0.3);
}

.table-row:nth-child(even):hover {
  background: var(--gray-50);
}

.table-cell {
  padding: 1rem 1.5rem;
  font-size: 0.875rem;
  color: var(--gray-900);
  white-space: nowrap;
}

.actions-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 0.5rem;
  border: 1px solid;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn.edit {
  color: var(--primary-green);
  background: var(--green-50);
  border-color: rgba(96, 158, 67, 0.2);
}

.action-btn.edit:hover {
  background: var(--green-100);
  border-color: rgba(96, 158, 67, 0.3);
}

.action-btn.delete {
  color: var(--red-600);
  background: var(--red-50);
  border-color: rgba(220, 38, 38, 0.2);
}

.action-btn.delete:hover {
  background: var(--red-100);
  border-color: rgba(220, 38, 38, 0.3);
}

.action-btn.redeem {
  color: var(--blue-600);
  background: var(--blue-50);
  border-color: rgba(37, 99, 235, 0.2);
}

.action-btn.redeem:hover {
  background: var(--blue-100);
  border-color: rgba(37, 99, 235, 0.3);
}

.badge {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 9999px;
}

.badge.admin {
  background: var(--green-100);
  color: #166534;
}

.badge.user {
  background: var(--gray-100);
  color: var(--gray-800);
}

.badge.public {
  background: var(--green-100);
  color: #166534;
}

.badge.private {
  background: var(--red-100);
  color: #991b1b;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
}

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

.empty-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.empty-description {
  color: var(--gray-500);
  margin-bottom: 1.5rem;
}

/* Form Styles */
.form-container {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  backdrop-filter: blur(4px);
  padding: 1rem;
}

.form-modal {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  width: 100%;
  max-width: 48rem;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-2xl);
  border: 1px solid var(--gray-100);
}

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

.form-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
}

.form-fields {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.form-field {
  display: flex;
  flex-direction: column;
}

.textarea {
  resize: none;
  min-height: 100px;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.checkbox {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--primary-green);
}

.checkbox-label {
  font-size: 0.875rem;
  color: var(--gray-600);
}

.image-upload {
  margin-top: 0.5rem;
}

.image-preview {
  margin-top: 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid var(--gray-200);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-100);
}

.btn-secondary {
  padding: 0.75rem 1.5rem;
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
  background: white;
  border-radius: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
}

/* Loading State */
.loading-container {
  text-align: center;
  padding: 2rem;
}

.loading-spinner {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  border: 2px solid var(--gray-200);
  border-radius: 50%;
  border-top-color: var(--primary-green);
  animation: spin 1s ease-in-out infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
  .dashboard-layout {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    height: auto;
  }
  
  .sidebar-nav {
    flex-direction: row;
    overflow-x: auto;
    padding: 0.5rem;
  }
  
  .nav-item {
    white-space: nowrap;
    min-width: max-content;
  }
  
  .sidebar-footer {
    display: none;
  }
  
  .main-content {
    padding: 1rem;
  }
  
  .section-header {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .form-modal {
    margin: 1rem;
    max-width: calc(100% - 2rem);
  }
} 