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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
  color: #333;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

header {
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

header h1 {
  color: #667eea;
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.subtitle {
  color: #666;
  font-size: 1.1rem;
}

.user-info {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-info span {
  color: #666;
  font-weight: 500;
}

/* Rates Section */
.rates-section {
  margin-bottom: 40px;
}

.rates-section h2 {
  color: #333;
  margin-bottom: 20px;
  font-size: 1.8rem;
}

.rates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.rate-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
}

.rate-card:hover {
  transform: translateY(-5px);
}

.rate-card.loading {
  background: #f0f0f0;
  color: #999;
  text-align: center;
}

.rate-card h3 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  opacity: 0.9;
}

.rate-value {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 5px;
}

.rate-date {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Auth Section */
.auth-section {
  margin-bottom: 40px;
}

.auth-toggle {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.auth-toggle button {
  padding: 10px 20px;
  border: none;
  background: #f0f0f0;
  color: #666;
  cursor: pointer;
  border-radius: 5px;
  font-size: 1rem;
  transition: all 0.2s;
}

.auth-toggle button.active {
  background: #667eea;
  color: white;
}

.auth-form {
  background: #f8f9fa;
  padding: 30px;
  border-radius: 10px;
}

.auth-form h3 {
  margin-bottom: 20px;
  color: #333;
}

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

.form-group label {
  display: block;
  margin-bottom: 5px;
  color: #555;
  font-weight: 500;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #667eea;
}

.form-group small {
  display: block;
  margin-top: 5px;
  color: #888;
  font-size: 0.85rem;
}

.btn {
  padding: 12px 30px;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.btn-primary {
  background: #667eea;
  color: white;
}

.btn-primary:hover {
  background: #5568d3;
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #5a6268;
}

.btn-danger {
  background: #dc3545;
  color: white;
  padding: 8px 15px;
  font-size: 0.9rem;
}

.btn-danger:hover {
  background: #c82333;
}

.error-message {
  color: #dc3545;
  margin-top: 10px;
  padding: 10px;
  display: none;
}

.error-message.active {
  display: block;
  background: #f8d7da;
  border-radius: 5px;
}

/* Alert Section */
.alert-section {
  margin-bottom: 40px;
}

.alert-section h2 {
  color: #333;
  margin-bottom: 20px;
  font-size: 1.8rem;
}

.alert-form {
  background: #f8f9fa;
  padding: 25px;
  border-radius: 10px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 15px;
  align-items: end;
}

/* Alerts List */
.alerts-list-section h2 {
  color: #333;
  margin-bottom: 20px;
  font-size: 1.8rem;
}

.alerts-list {
  display: grid;
  gap: 15px;
}

.alert-item {
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: border-color 0.2s;
}

.alert-item:hover {
  border-color: #667eea;
}

.alert-item.inactive {
  opacity: 0.6;
  background: #f8f9fa;
}

.alert-info h4 {
  color: #333;
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.alert-info p {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 5px;
}

.alert-actions {
  display: flex;
  gap: 10px;
}

.loading {
  text-align: center;
  color: #999;
  padding: 20px;
}

.success-message {
  background: #d4edda;
  color: #155724;
  padding: 12px;
  border-radius: 5px;
  margin-top: 10px;
  display: none;
}

.success-message.active {
  display: block;
}

/* Responsive */
@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .rates-grid {
    grid-template-columns: 1fr;
  }
  
  .user-info {
    position: static;
    justify-content: center;
    margin-top: 15px;
  }
  
  header h1 {
    font-size: 2rem;
  }
}
