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

/* Beta Notice Banner */
.beta-notice {
  background: #ff9800;
  color: white;
  padding: 12px 20px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.beta-notice a {
  color: white;
  text-decoration: underline;
  font-weight: 600;
}

.beta-notice a:hover {
  color: #fff3e0;
}

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;
  padding-top: 60px;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  min-height: 600px;
}

.screen {
  padding: 60px 40px;
  text-align: center;
}

/* Loading Screen */
.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Auth Screen */
#auth-screen h1 {
  color: #333;
  font-size: 32px;
  margin-bottom: 10px;
}

.subtitle {
  color: #666;
  font-size: 16px;
  margin-bottom: 30px;
}

.google-icon {
  width: 20px;
  height: 20px;
}

/* Header */
.header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 30px;
  border-radius: 12px 12px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.header h1 {
  font-size: 28px;
  color: white;
  margin: 0;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-email {
  font-size: 14px;
  opacity: 0.9;
}

/* Content */
.content {
  padding: 30px;
}

/* Buttons */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

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

.btn-primary:hover {
  background: #5568d3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
  background: #f1f3f5;
  color: #333;
}

.btn-secondary:hover {
  background: #e9ecef;
}

.btn-small {
  padding: 8px 16px;
  font-size: 14px;
}

.btn-large {
  padding: 16px 32px;
  font-size: 18px;
}

.btn-danger {
  background: #dc3545;
  color: white;
}

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

/* Form Card */
.form-card {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 20px;
}

.form-card h2 {
  color: #333;
  font-size: 24px;
  margin-bottom: 20px;
}

.form-card .subtitle {
  margin-bottom: 20px;
}

/* Mileage Note */
.mileage-note {
  background: #e7f3ff;
  border-left: 4px solid #667eea;
  padding: 12px 15px;
  margin-bottom: 20px;
  color: #333;
  font-size: 14px;
  border-radius: 4px;
}

/* Form Groups */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  color: #333;
  font-weight: 500;
  margin-bottom: 8px;
  font-size: 14px;
}

.form-group small {
  display: block;
  color: #6c757d;
  font-size: 12px;
  margin-top: 4px;
}

.receipt-note {
  display: block;
  background: #fff3cd;
  border-left: 3px solid #ffc107;
  padding: 8px 12px;
  margin-bottom: 10px;
  color: #856404;
  font-size: 12px;
  border-radius: 4px;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 10px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: #667eea;
}

.form-control:disabled,
.form-control:read-only {
  background: #f1f3f5;
  cursor: not-allowed;
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

/* Radio Groups */
.radio-group {
  display: flex;
  gap: 20px;
  margin-top: 8px;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: normal;
}

/* Expense Item */
.expense-item {
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 15px;
  position: relative;
}

.expense-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e0e0e0;
}

.expense-item-header h3 {
  color: #667eea;
  font-size: 16px;
  margin: 0;
}

.remove-expense-btn {
  background: none;
  border: none;
  color: #dc3545;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.2s;
}

.remove-expense-btn:hover {
  background: #f8d7da;
}

.expense-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.file-input-wrapper {
  position: relative;
}

.file-input-label {
  display: block;
  padding: 10px 15px;
  background: #f8f9fa;
  border: 2px dashed #667eea;
  border-radius: 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.file-input-label:hover {
  background: #e7f3ff;
  border-color: #5568d3;
}

.file-input-label.has-file {
  background: #d4edda;
  border-color: #28a745;
  border-style: solid;
}

input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.file-name {
  display: block;
  font-size: 13px;
  color: #666;
  margin-top: 5px;
  word-break: break-all;
}

/* Total Card */
.total-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  position: sticky;
  top: 20px;
  z-index: 100;
}

.total-card h2 {
  color: white;
}

.total-breakdown {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 20px;
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-size: 16px;
}

.total-row.total-final {
  border-top: 2px solid rgba(255, 255, 255, 0.3);
  margin-top: 10px;
  padding-top: 15px;
  font-size: 20px;
}

.total-row .amount {
  font-family: 'Courier New', monospace;
  font-size: 18px;
}

.total-final .amount {
  font-size: 24px;
}

/* Form Actions */
.form-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
}

/* Success Card */
.success-card {
  background: #d4edda;
  border: 2px solid #28a745;
  border-radius: 12px;
  padding: 40px;
  text-align: center;
}

.success-card h2 {
  color: #28a745;
  font-size: 28px;
  margin-bottom: 15px;
}

.success-card p {
  color: #333;
  font-size: 16px;
  margin-bottom: 10px;
}

.success-card strong {
  color: #667eea;
  font-family: 'Courier New', monospace;
}

/* Messages */
.error-message {
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-weight: 500;
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    border-radius: 0;
  }

  body {
    padding: 10px;
    padding-top: 60px;
  }

  .content {
    padding: 20px;
  }

  .header {
    flex-direction: column;
    align-items: stretch;
  }

  .header h1 {
    font-size: 24px;
  }

  .expense-row {
    grid-template-columns: 1fr;
  }

  .radio-group {
    flex-direction: column;
    gap: 10px;
  }

  .form-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .total-card {
    position: static;
  }
}
