:root {
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --bg-dark: #0f172a;
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --text-main: #f8fafc;
  --text-muted: #64748b;
  --success: #10b981;
  --danger: #ef4444;
  --radius: 16px;
}

.toast-container {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 90%;
  max-width: 400px;
}

.toast {
  background: #1e293b;
  color: white;
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: toastIn 0.3s ease-out forwards;
}

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

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

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(20px);
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Outfit', 'Inter', sans-serif;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
}

.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-width: 600px;
  /* Mobile focused */
  margin: 0 auto;
  position: relative;
}

/* Glassmorphism Sidebar/Nav */
nav {
  display: flex;
  justify-content: space-around;
  padding: 1rem;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-item {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  transition: all 0.3s ease;
}

.nav-item.active {
  color: var(--text-main);
  background: var(--glass-border);
}

/* Dashboard Content */
main {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
}

.card {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.8rem 1.2rem;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: opacity 0.2s;
}

.btn:hover {
  opacity: 0.9;
}

input,
select {
  width: 100%;
  background: #1e293b;
  /* Solid dark background for better contrast */
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 0.8rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  outline: none;
  appearance: none;
  /* Custom arrow for select */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.2rem;
}

select option {
  background: #1e293b;
  color: white;
}

/* Modal/Lightbox */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  backdrop-filter: blur(5px);
}

.modal-content {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 1.5rem;
  border-radius: var(--radius);
  max-width: 90%;
  max-height: 90%;
  overflow-y: auto;
  position: relative;
}

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

#detail-image {
  width: 100%;
  border-radius: 8px;
  margin-top: 1rem;
}

/* Admin Section */
.admin-badge {
  background: var(--danger);
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 5px;
}

.delete-btn {
  background: var(--danger);
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
}

/* Date input layout */
.date-row {
  display: flex;
  gap: 0.5rem;
}

/* Table sorting bar */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.filter-bar select {
  flex: 1;
  min-width: 120px;
}

/* Mobile responsive adjustments */
@media (max-width: 480px) {
  .app-container {
    max-width: 100%;
  }
}