* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Noto Sans Thai', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
}
.container {
  max-width: 900px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}
.header {
  text-align: center;
  margin-bottom: 30px;
}
.header h1 {
  color: #4a5568;
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.header p {
  color: #718096;
  font-size: 1rem;
}
.form-section {
  background: white;
  padding: 25px;
  border-radius: 15px;
  margin-bottom: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #4a5568;
}
.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.3s ease;
}
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
.form-row {
  display: flex;
  gap: 15px;
}
.form-row .form-group {
  flex: 1;
}
.btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}
.btn-secondary {
  background: #e2e8f0;
  color: #4a5568;
}
.btn-secondary:hover {
  background: #cbd5e0;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.summary-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}
.summary-card {
  background: white;
  padding: 20px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease;
}
.summary-card:hover {
  transform: translateY(-5px);
}
.summary-card .icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
}
.summary-card.income .icon {
  color: #48bb78;
}
.summary-card.expense .icon {
  color: #f56565;
}
.summary-card.balance .icon {
  color: #667eea;
}
.summary-card h3 {
  color: #4a5568;
  font-size: 0.9rem;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.summary-card .amount {
  font-size: 1.5rem;
  font-weight: 600;
}
.summary-card.income .amount {
  color: #48bb78;
}
.summary-card.expense .amount {
  color: #f56565;
}
.summary-card.balance .amount {
  color: #667eea;
}
.transactions-section {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  margin-top: 30px;
}
.transactions-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.transactions-header h2 {
  font-size: 1.3rem;
  font-weight: 500;
}
.date-filter {
  display: flex;
  align-items: center;
  gap: 10px;
}
.date-filter input {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 14px;
}
.date-filter input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}
.transactions-list {
  max-height: 400px;
  overflow-y: auto;
}
.transaction-item {
  padding: 15px 20px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.2s ease;
}
.transaction-item:hover {
  background-color: #f7fafc;
}
.transaction-item:last-child {
  border-bottom: none;
}
.transaction-info {
  display: flex;
  align-items: center;
  gap: 15px;
}
.transaction-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.transaction-icon.food {
  background: #fed7d7;
  color: #c53030;
}
.transaction-icon.transport {
  background: #bee3f8;
  color: #2b6cb0;
}
.transaction-icon.entertainment {
  background: #d6f5d6;
  color: #276749;
}
.transaction-icon.other {
  background: #e2e8f0;
  color: #4a5568;
}
.transaction-icon.income {
  background: #c6f6d5;
  color: #22543d;
}
.transaction-details h4 {
  color: #4a5568;
  font-size: 1rem;
  margin-bottom: 3px;
}
.transaction-details p {
  color: #718096;
  font-size: 0.8rem;
}
.transaction-amount {
  font-size: 1.1rem;
  font-weight: 600;
}
.transaction-amount.income {
  color: #48bb78;
}
.transaction-amount.expense {
  color: #f56565;
}
.ai-section {
  background: white;
  padding: 25px;
  border-radius: 15px;
  margin-top: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}
.ai-section h3 {
  color: #4a5568;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ai-status {
  padding: 10px 15px;
  border-radius: 8px;
  margin-bottom: 15px;
  font-size: 0.9rem;
}
.ai-status.loading {
  background: #fef5e7;
  color: #c05621;
}
.ai-status.success {
  background: #f0fff4;
  color: #22543d;
}
.ai-status.error {
  background: #fed7d7;
  color: #c53030;
}
.loading {
  display: none;
}
.loading.show {
  display: block;
}
.empty-state {
  text-align: center;
  padding: 40px;
  color: #718096;
}
.empty-state .material-icons {
  font-size: 4rem;
  margin-bottom: 15px;
  opacity: 0.5;
}
@media (max-width: 768px) {
  .container {
    padding: 20px;
    margin: 10px;
  }
  .form-row {
    flex-direction: column;
  }
  .summary-section {
    grid-template-columns: 1fr;
  }
  .date-filter {
    flex-direction: column;
    gap: 5px;
  }
  .transaction-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .transaction-amount {
    align-self: flex-end;
  }
}