:root {
  --primary-color: #ff5722;
  --secondary-color: #ff9800;
  --bg-color: #fcfcfc;
  --text-dark: #333333;
  --text-light: #666666;
  --border-color: #e0e0e0;
  --header-bg: #ffffff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-dark);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  width: 90%;
  max-width: 1000px;
  margin: 0 auto;
}

.site-header {
  background: var(--header-bg);
  padding: 1rem 0;
  border-bottom: 2px solid var(--primary-color);
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-header h1 {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin: 0;
}

.site-header nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
}

.site-header nav a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 600;
}

.site-header nav a:hover {
  color: var(--primary-color);
}

main {
  flex: 1;
  padding: 2rem 0;
}

section {
  margin-bottom: 2.5rem;
  padding: 1.5rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.hero h2 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.tool-section h3, .content-section h3 {
  margin-bottom: 1rem;
  color: var(--text-dark);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.content-section h4 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.planner-controls {
  background: #fafafa;
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
}

#expense-form {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.form-group {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 120px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: bold;
  margin-bottom: 0.25rem;
}

.form-group input, .form-group select {
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.btn-primary {
  background: var(--primary-color);
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
}

.btn-primary:hover {
  background: var(--secondary-color);
}

.planner-table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

 table th, table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

table th {
  background: #f4f4f4;
  font-weight: 600;
}

.delete-btn {
  background: #e53935;
  color: white;
  border: none;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
}

.site-footer {
  background: var(--text-dark);
  color: #fff;
  text-align: center;
  padding: 1.5rem 0;
  margin-top: auto;
}

.site-footer p {
  margin-bottom: 0.5rem;
}

.site-footer nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.site-footer nav a {
  text-decoration: none;
  color: #ccc;
  font-size: 0.9rem;
}

.site-footer nav a:hover {
  color: #fff;
}

@media (max-width: 768px) {
  #expense-form {
    flex-direction: column;
    align-items: stretch;
  }
  .form-group {
    width: 100%;
  }
}


/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
