/* Immobilien-Steuererklärung – Basis-Styles */

:root {
  --bg: #f5f5f0;
  --card: #fff;
  --border: #ddd;
  --primary: #2c5f2d;
  --primary-light: #97b498;
  --text: #222;
  --text-muted: #666;
  --danger: #b33;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.header a {
  color: #fff;
  text-decoration: none;
}

.header .logo {
  font-weight: 700;
  font-size: 1.1rem;
}

.header nav {
  display: flex;
  gap: 1rem;
}

.header nav a:hover {
  text-decoration: underline;
}

.header nav .nav-sep {
  opacity: 0.6;
  margin: 0 0.25rem;
}

.main {
  flex: 1;
  padding: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.footer {
  padding: 0.75rem 1.5rem;
  background: #e8e8e0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Karten */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.card h2, .card h3 {
  margin-top: 0;
  color: var(--primary);
  font-size: 1.1rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  text-decoration: none;
  background: var(--primary);
  color: #fff;
}

.btn:hover {
  background: #234a24;
}

.btn-secondary {
  background: #666;
}

.btn-secondary:hover {
  background: #444;
}

.btn-danger {
  background: var(--danger);
}

.btn-danger:hover {
  background: #922;
}

/* Forms */
label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 500;
  color: var(--text-muted);
}

input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  max-width: 400px;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

textarea {
  min-height: 60px;
  resize: vertical;
}

.form-row {
  margin-bottom: 0.75rem;
}

.form-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Tabellen */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th, td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: #f0f0eb;
  font-weight: 600;
  color: var(--text-muted);
}

tr:hover td {
  background: #fafaf8;
}

/* Detail-Seite: Blöcke */
.detail-section {
  margin-bottom: 1.5rem;
}

.detail-section h3 {
  margin-bottom: 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--border);
}

/* Inline-Formulare (z. B. neuer Beleg) */
.inline-form {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.5rem;
  align-items: end;
  margin-bottom: 1rem;
}

.inline-form label {
  margin-bottom: 0;
}

.inline-form input, .inline-form select {
  margin-bottom: 0;
}

/* Links auf Belege */
.beleg-link {
  color: var(--primary);
  text-decoration: none;
}

.beleg-link:hover {
  text-decoration: underline;
}

/* Jahr-Auswahl Export */
.export-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.export-actions select {
  width: auto;
  margin: 0;
}

/* Meldungen */
.alert {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.alert-info {
  background: #e8f4f8;
  border: 1px solid #b8dce8;
}

.alert-warning {
  background: #fff8e6;
  border: 1px solid #f0d878;
}

.alert-error {
  background: #fce8e8;
  border: 1px solid #e0a0a0;
}

.text-muted {
  color: var(--text-muted);
  font-size: 0.95rem;
}
