:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --text-main: #1f2937;
    --text-muted: #4b5563;
    --bg-page: #f9fafb;
    --bg-card: #ffffff;
    --border: #e5e7eb;
    --danger: #ef4444;
}

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

body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

h1, h2, h3 {
    color: var(--text-main);
    margin-bottom: 1rem;
}

a {
    color: var(--primary-dark);
    text-decoration: none;
}

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

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-dark);
}

.logo h1 {
    margin: 0;
    font-size: 1.5rem;
}

.site-header nav a {
    margin-left: 1rem;
    font-weight: 500;
}

.hero {
    margin-bottom: 2.5rem;
    text-align: center;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 1.5rem;
}

.tracker-app {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 3rem;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.total-balance {
    font-size: 1.25rem;
    font-weight: bold;
    padding: 0.5rem 1rem;
    background: #ecfdf5;
    color: var(--primary-dark);
    border-radius: 6px;
}

.card-form {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 1rem;
    align-items: end;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-group input {
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

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

.btn-danger {
    background: #fee2e2;
    color: var(--danger);
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
}

.table-responsive {
    overflow-x: auto;
}

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

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

th {
    background: #f3f4f6;
    font-weight: 600;
    color: var(--text-muted);
}

.info-block, .tips-block {
    margin-bottom: 3rem;
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 8px;
}

.info-block p, .tips-block p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.tips-block ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    color: var(--text-muted);
}

.tips-block li {
    margin-bottom: 0.5rem;
}

.site-footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}

.site-footer nav {
    margin-top: 1rem;
}

.site-footer nav a {
    margin: 0 0.5rem;
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .card-form {
        grid-template-columns: 1fr;
    }
    .app-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}


/* 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;
}
