:root {
  --primary: #1d2671;
  --secondary: #c33764;
  --accent: #00c9a7;
  --text-light: #ffffff;
  --text-dark: #2d3748;
  --bg-light: rgba(255, 255, 255, 0.1);
  --bg-dark: rgba(0, 0, 0, 0.2);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #e03e3e;
  --info: #3b82f6;
}

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

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--text-light);
  min-height: 100vh;
  line-height: 1.6;
  padding-bottom: 2rem;
}

/* Layout */
nav.app-nav {
  display: flex;
  background: rgba(29, 38, 113, 0.9);
  padding: 0.5rem;
  gap: 0.5rem;
  justify-content: center;
  position: sticky;
  top: 0;
  z-index: 100;
  border-radius: 0 0 12px 12px;
}

nav.app-nav button {
  padding: 0.75rem 1.5rem;
  border: none;
  background: transparent;
  color: var(--text-light);
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-size: 1rem;
}

nav.app-nav button:hover {
  background: rgba(255, 255, 255, 0.1);
}

nav.app-nav button.active {
  background: var(--accent);
  color: var(--text-dark);
  font-weight: 600;
}

main {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

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

/* Cards */
.card {
  background: var(--bg-light);
  backdrop-filter: blur(6px);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.summary-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin: 20px 0;
}

.summary-item {
  background: var(--bg-dark);
  padding: 15px;
  border-radius: 8px;
}

.summary-item h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: rgba(255, 255, 255, 0.8);
}

.summary-item p {
  font-size: 1.5rem;
  font-weight: 600;
}

.ai-card {
  background: rgba(0, 201, 167, 0.1);
  border-left: 4px solid var(--accent);
  padding: 15px;
  border-radius: 8px;
  margin: 20px 0;
}

.ai-card p {
  margin-bottom: 0.5rem;
}

/* Forms */
#vendor-form {
  display: grid;
  gap: 1.25rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  border-radius: 12px;
  margin-top: 1.5rem;
  backdrop-filter: blur(6px);
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  font-size: 0.95rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 201, 167, 0.3);
}

/* Buttons */
.btn-primary {
  background: var(--accent);
  color: var(--text-dark);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.btn-secondary {
  background: var(--bg-light);
  color: var(--text-light);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Vendor List */
#vendor-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.vendor-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.vendor-item:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.vendor-info {
  flex: 1;
}

.vendor-info div:first-child {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.vendor-info div:last-child {
  font-size: 0.9rem;
  opacity: 0.9;
}

.vendor-priority {
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  margin: 0 1rem;
}

.vendor-priority.low {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.vendor-priority.medium {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.vendor-priority.high {
  background: rgba(224, 62, 62, 0.2);
  color: #e03e3e;
}

.btn-remove {
  background: rgba(224, 62, 62, 0.3);
  color: #e03e3e;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.2s ease;
}

.btn-remove:hover {
  background: rgba(224, 62, 62, 0.5);
  transform: scale(1.1);
}

/* Calendar */
.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

#calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
}

.calendar-day-header {
  font-weight: 600;
  text-align: center;
  padding: 0.5rem;
}

.calendar-day {
  background: var(--bg-light);
  border-radius: 8px;
  padding: 12px;
  min-height: 120px;
}

.calendar-day.empty {
  background: transparent;
}

.calendar-day.weekend {
  background: rgba(255, 255, 255, 0.05);
}

.calendar-day.today {
  outline: 2px solid var(--accent);
}

.day-number {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.calendar-payment {
  background: var(--accent);
  color: var(--text-dark);
  padding: 6px;
  border-radius: 4px;
  margin-bottom: 6px;
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.calendar-payment span {
  margin-right: 0.5rem;
}

.btn-remove-payment {
  background: transparent;
  border: none;
  color: var(--text-dark);
  font-weight: bold;
  cursor: pointer;
}

/* Alerts */
.alert-container {
  display: grid;
  gap: 15px;
  margin-top: 1.5rem;
}

.alert-item {
  padding: 15px;
  border-radius: 8px;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.alert-danger {
  background: rgba(224, 62, 62, 0.2);
  border-left: 4px solid var(--danger);
}

.alert-warning {
  background: rgba(245, 158, 11, 0.2);
  border-left: 4px solid var(--warning);
}

.alert-info {
  background: rgba(59, 130, 246, 0.2);
  border-left: 4px solid var(--info);
}

.alert-content {
  flex: 1;
}

.alert-content strong {
  display: block;
  margin-bottom: 0.25rem;
}

.alert-content p {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.alert-icon {
  font-size: 1.5rem;
  margin-top: 0.25rem;
}

/* Notification */
.notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 15px 20px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--text-dark);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  font-weight: 500;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.notification.hidden {
  transform: translateY(100px);
  opacity: 0;
}

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

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

.notification.info {
  background: var(--info);
  color: white;
}

/* Responsive */
@media (max-width: 768px) {
  #calendar-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  nav.app-nav {
    flex-wrap: wrap;
  }
  
  .summary-card {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  #calendar-grid {
    grid-template-columns: 1fr;
  }
  
  .summary-card {
    grid-template-columns: 1fr;
  }
  
  nav.app-nav button {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}