/* My Finance App Styles */

:root {
  --bg-primary: #0f0f1a;
  --bg-secondary: #1a1a2e;
  --bg-tertiary: #252542;
  --text-primary: #e8e8e8;
  --text-secondary: #a0a0b0;
  --text-muted: #6a6a7a;
  --accent: #4f8cff;
  --accent-hover: #3a7aef;
  --success: #4caf50;
  --warning: #ff9800;
  --error: #f44336;
  --border: #3a3a5a;
  --radius: 8px;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* Header */
.header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.nav {
  display: flex;
  gap: 0.5rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  transition: all 0.2s;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.nav-link.active {
  color: var(--accent);
  background: rgba(79, 140, 255, 0.1);
}

/* Disclaimer */
.disclaimer {
  background: rgba(255, 152, 0, 0.1);
  border-bottom: 1px solid rgba(255, 152, 0, 0.3);
  padding: 0.75rem 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--warning);
}

/* Main */
.main {
  padding: 2rem 1rem;
}

.container {
  max-width: 800px;
  margin: 0 auto;
}

/* Pages */
.page {
  display: none;
}

.page.active {
  display: block;
}

h2 {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.subtitle {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* Forms */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

input, textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 1rem;
  transition: border-color 0.2s;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--border);
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-full {
  width: 100%;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Research Form */
.research-form {
  margin-bottom: 2rem;
}

.research-form textarea {
  margin-bottom: 1rem;
}

/* Progress */
.progress-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.progress-status {
  font-weight: 500;
  color: var(--accent);
}

.progress-steps {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.progress-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius);
  font-size: 0.875rem;
}

.progress-step.active {
  border-left: 3px solid var(--accent);
}

.progress-step.done {
  border-left: 3px solid var(--success);
  opacity: 0.7;
}

.progress-step-icon {
  width: 20px;
  text-align: center;
}

/* Result */
.result-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
}

.result-header h3 {
  font-size: 1rem;
}

.result-actions {
  display: flex;
  gap: 0.5rem;
}

.result-content {
  padding: 1.5rem;
  max-height: 600px;
  overflow-y: auto;
}

.result-content h4 {
  margin: 1.5rem 0 0.75rem;
  color: var(--accent);
}

.result-content h4:first-child {
  margin-top: 0;
}

.result-content p {
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
}

.result-content ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.result-content li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

/* Reports List */
.reports-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.report-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.report-card:hover {
  border-color: var(--accent);
}

.report-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.report-card-question {
  font-weight: 500;
  color: var(--text-primary);
}

.report-card-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.report-card-date {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.btn-icon {
  padding: 0.25rem 0.5rem;
  font-size: 1rem;
  background: transparent;
  border: 1px solid var(--border);
}

.btn-icon.favorited {
  color: var(--warning);
  border-color: var(--warning);
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 3rem 1rem;
}

/* Auth Forms */
.auth-form {
  max-width: 400px;
  margin: 0 auto;
  background: var(--bg-secondary);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.auth-form h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}

.auth-switch {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.auth-switch a {
  color: var(--accent);
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* Account Info */
.account-info {
  max-width: 400px;
  margin: 0 auto;
  background: var(--bg-secondary);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.account-details {
  margin: 1.5rem 0;
}

.account-details p {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 1000;
}

.toast {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: slideIn 0.3s ease;
}

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

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

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

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Responsive */
@media (max-width: 600px) {
  .header-content {
    justify-content: center;
  }

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

  .result-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .report-card-header {
    flex-direction: column;
  }
}
