/* ============================================================
   Arbeitsabrechnung.de – Modern layout (single stylesheet)
   Replaces main.css + modern.css
   ============================================================ */

@import url("fontawesome-all.min.css");
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

/* ---- Reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--bar-height, 56px);
}

body, div, section, article, header, footer, nav, ul, ol, li,
h1, h2, h3, h4, h5, h6, p, a, form, label, input, select, textarea, button,
table, thead, tbody, tr, th, td {
  margin: 0;
  padding: 0;
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

input, select, textarea, button {
  font: inherit;
  color: inherit;
}

input::-moz-focus-inner,
button::-moz-focus-inner {
  border: 0;
  padding: 0;
}

/* ---- Variables ---- */
:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #dbeafe;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --radius: 6px;
  --radius-lg: 10px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --bar-height: 56px;
  --content-max: 1200px;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
}

/* ---- Base ---- */
body {
  min-height: 100vh;
  padding-top: var(--bar-height);
  background: var(--surface-alt);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  color: var(--primary-hover);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 0.75em;
}
h1 { font-size: 1.75rem; }
h2 { font-size: 1.35rem; margin-top: 1.5rem; }
h3 { font-size: 1.15rem; }
h4, h5, h6 { font-size: 1rem; }
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { color: inherit; text-decoration: none; }

p { margin-bottom: 1em; }
b, strong { font-weight: 600; color: var(--text); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ---- App bar ---- */
.app-bar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--bar-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.app-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  height: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.app-bar-brand { flex-shrink: 0; }

.app-logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary);
  text-decoration: none;
}
.app-logo:hover {
  text-decoration: underline;
  color: var(--primary-hover);
}

.app-bar-status {
  flex: 1;
  min-width: 150px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.app-bar-status .status-label {
  font-weight: 600;
  color: var(--text-secondary);
  margin-right: 0.35em;
}
.app-bar-status .status-value { color: var(--text-muted); }
.app-bar-status .status-meldung {
  display: block;
  margin-top: 0.2em;
  color: var(--primary);
  font-weight: 500;
}

.app-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.app-nav li a {
  display: block;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.app-nav li a:hover {
  background: var(--surface-alt);
  color: var(--text);
  text-decoration: none;
}
.app-nav li.current a {
  background: var(--primary-light);
  color: var(--primary);
}

.app-bar #nav {
  position: static;
  width: auto;
  height: auto;
  line-height: inherit;
  background: none;
  background-image: none;
  cursor: default;
}

/* ---- Page wrapper & container ---- */
#page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#page-wrapper > section {
  margin-bottom: 0;
  flex: 1;
}

.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ---- Banner (login / landing) ---- */
#banner {
  position: relative;
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-hover) 100%);
  padding: var(--space-2xl) 0;
  margin: 0;
  z-index: 0;
}

#banner .content {
  position: relative;
  background: none;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
  text-align: left;
}

#banner h2 {
  color: #fff;
  font-size: 1.5rem;
  margin: 0 0 0.5em 0;
}

#banner p {
  color: rgba(255,255,255,.9);
  font-weight: 400;
  font-size: 1rem;
  margin: 0 0 1em 0;
}

#banner .text-info,
#banner a {
  color: #e0e7ff;
  text-decoration: underline;
}
#banner a:hover { color: #fff; }

/* Login form card */
.login-form-card {
  display: inline-block;
  background: #fff;
  color: #0f172a;
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin: 1rem 0;
  box-shadow: 0 4px 20px rgba(0,0,0,.15);
  border: 1px solid rgba(0,0,0,.08);
  max-width: 360px;
}

.login-form-card .login-form {
  display: block;
  margin: 0;
  padding: 0;
  background: none;
  border: none;
}

.login-form-card label {
  color: #334155;
  font-size: 0.875rem;
  font-weight: 600;
  display: block;
  margin: 0 0 0.25rem 0;
}

.login-form-card input[type="text"],
.login-form-card input[type="password"] {
  background: #f8fafc;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  width: 100%;
  display: block;
  margin-bottom: 1rem;
  font-size: 1rem;
}
.login-form-card input::placeholder { color: #94a3b8; }

.login-form-card .login-form-actions {
  margin-top: 1.25rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.login-form-card .btn-login {
  background: var(--primary);
  color: #fff;
  padding: 0.5rem 1.25rem;
  border: none;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
}
.login-form-card .btn-login:hover {
  background: var(--primary-hover);
  color: #fff;
}

.login-form-card .btn-logout {
  background: #64748b;
  color: #fff;
  padding: 0.5rem 1.25rem;
  border: none;
  font-weight: 500;
  border-radius: var(--radius);
  cursor: pointer;
}
.login-form-card .btn-logout:hover {
  background: #475569;
  color: #fff;
}

#banner .card-form {
  background: #fff;
  color: #0f172a;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  max-width: 340px;
  margin: 1rem 0;
  box-shadow: 0 4px 20px rgba(0,0,0,.12);
}
#banner .card-form label { color: #334155; }

/* ---- Landing page: hero, features, pricing ---- */
.landing-hero {
  text-align: center;
  padding: var(--space-2xl) 0;
}
.landing-hero h1 {
  color: #fff;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin: 0 0 0.5em 0;
  font-weight: 700;
}
.landing-hero .lead {
  color: rgba(255,255,255,.9) !important;
  font-size: 1.125rem !important;
  max-width: 36em !important;
  margin: 0 auto 1.5rem !important;
  line-height: 1.6 !important;
}

.landing-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-lg);
  margin: var(--space-2xl) 0;
}
.landing-feature {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  color: #fff;
}
.landing-feature h3 {
  color: #fff;
  font-size: 1.1rem;
  margin: 0 0 0.5em 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.landing-feature h3::before {
  content: '';
  width: 0.35rem;
  height: 1.25em;
  background: rgba(255,255,255,.6);
  border-radius: 2px;
}
.landing-feature p {
  color: rgba(255,255,255,.9);
  font-size: 0.9375rem;
  margin: 0;
  line-height: 1.5;
}

.landing-pricing {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  max-width: 400px;
  margin: var(--space-xl) 0;
  box-shadow: 0 4px 24px rgba(0,0,0,.12);
  border: 1px solid rgba(0,0,0,.06);
  color: var(--text);
}
.landing-pricing h3 {
  color: var(--text);
  font-size: 1.25rem;
  margin: 0 0 0.5em 0;
}
.landing-pricing .price {
  font-size: 2rem !important;
  font-weight: 700 !important;
  color: var(--primary) !important;
  margin: 0 0 0.25em 0 !important;
}
.landing-pricing .price-note {
  font-size: 0.875rem !important;
  color: var(--text-muted) !important;
  margin-bottom: 1rem !important;
}
.landing-pricing ul {
  list-style: none;
  margin: 0 0 1.5rem 0;
  padding: 0;
}
.landing-pricing li {
  padding: 0.35em 0;
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}
.landing-pricing li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}
.landing-pricing .btn-cta {
  display: inline-block;
  width: 100%;
  text-align: center;
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 0.75rem;
  transition: background .2s;
}
.landing-pricing .btn-cta:hover {
  background: var(--primary-hover);
  color: #fff;
  text-decoration: none;
}
.landing-pricing .btn-cta.secondary {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,.5);
}
.landing-pricing .btn-cta.secondary:hover {
  background: rgba(255,255,255,.15);
  color: #fff;
}
.landing-pricing .legal {
  font-size: 0.8125rem !important;
  color: var(--text-muted) !important;
  margin-top: 1rem !important;
}
.landing-pricing .legal a { color: var(--primary) !important; }

.landing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
  margin-top: var(--space-xl);
}
@media (max-width: 900px) {
  .landing-grid { grid-template-columns: 1fr; }
}

.landing-section-title {
  color: #fff;
  font-size: 1.25rem;
  margin: 0 0 1rem 0;
  font-weight: 600;
}

.landing-test {
  background: rgba(255,255,255,.1);
  border-radius: var(--radius);
  padding: var(--space-md);
  margin-top: 1rem;
  font-size: 0.875rem;
  color: rgba(255,255,255,.95);
}
.landing-test strong { color: #fff; }

/* ---- Main content ---- */
#main {
  background: var(--surface-alt);
  padding: var(--space-xl) 0 var(--space-2xl);
}

.row {
  display: block;
}

.row .col-12 {
  width: 100%;
}

.content { margin: 0; }

.box.page-content {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: var(--space-xl);
  margin: 0;
}

.box.page-content > header {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-light);
}

.box.page-content > header h2 {
  margin: 0;
  font-size: 1.35rem;
}

.box.page-content section {
  margin-bottom: var(--space-xl);
}
.box.page-content section:last-child { margin-bottom: 0; }

/* ---- Buttons ---- */
.btn,
button[type="submit"],
input[type="submit"],
.button {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s, color .2s;
  text-decoration: none;
  line-height: 1.4;
}
.btn:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
  background: var(--primary-hover);
  color: #fff;
}

.btn-primary { background: var(--primary); }
.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.8125rem;
}
.btn-danger { background: #dc2626; }
.btn-danger:hover { background: #b91c1c; }
.btn-secondary { background: var(--text-muted); }
.btn-secondary:hover { background: var(--text-secondary); }

.btn-download {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9375rem;
}
.btn-download:hover {
  background: var(--primary-hover);
  color: #fff;
  text-decoration: none;
}

/* ---- Forms ---- */
.form-control,
input[type="text"],
input[type="password"],
input[type="email"],
select.form-control,
select.form-select {
  display: block;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  color: var(--text);
  font-size: 0.9375rem;
  margin-bottom: var(--space-sm);
}

.form-label,
label {
  display: block;
  margin-bottom: var(--space-xs);
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text);
}

.filter-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  padding: var(--space-lg);
  background: var(--surface-alt);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.filter-form label { margin-bottom: 0; }
.filter-form select { min-width: 120px; margin-bottom: 0; }

.card-form {
  display: block;
  margin-bottom: var(--space-lg);
  padding: var(--space-lg);
  background: var(--surface-alt);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  max-width: 480px;
}
.card-form label { margin-top: 0.75rem; }
.card-form label:first-of-type { margin-top: 0; }
.card-form .form-control,
.card-form input,
.card-form select { margin-bottom: 0; }
.card-form button[type="submit"],
.card-form .btn { margin-top: 1rem; }

.inline-form { display: inline; }

/* ---- Tables ---- */
.data-table,
.table.table-light,
table.table {
  width: 100%;
  border-collapse: collapse;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: var(--surface);
  margin-bottom: var(--space-lg);
}

.data-table th,
.table.table-light th,
table.table th {
  background: var(--surface-alt);
  color: var(--text);
  padding: 0.65rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.8125rem;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
}

.data-table td,
.table.table-light td,
table.table td {
  padding: 0.6rem 1rem;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.9375rem;
  vertical-align: middle;
}

.data-table tbody tr:hover td,
.table.table-light tbody tr:hover td {
  background: var(--surface-alt);
}

/* ---- Footer ---- */
#footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: var(--space-xl) 0;
  margin-top: auto;
  text-align: center;
}

#copyright {
  display: block;
  padding: 0;
  color: var(--text-muted);
  margin: 0;
  font-size: 0.875rem;
}

#copyright .menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

#copyright .menu a {
  color: var(--text-muted);
  text-decoration: none;
}
#copyright .menu a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* ---- Map ---- */
.map {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  min-height: 400px;
  width: 100%;
}

/* ---- Utility ---- */
.h3 { font-size: 1.15rem; margin: 1rem 0; }
.text-info { color: var(--primary); }
.form-select { width: 100%; }

/* ---- Responsive ---- */
@media (max-width: 980px) {
  .app-bar-inner {
    flex-wrap: wrap;
    height: auto;
    min-height: var(--bar-height);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }
  .app-bar-status {
    order: 3;
    min-width: 150px;
    flex: none;
    margin-top: 0.25rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-light);
  }
  body { padding-top: 0; }
  .app-bar { height: auto; min-height: var(--bar-height); }
  html { scroll-padding-top: 0; }
}

@media (max-width: 736px) {
  .app-bar-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .app-bar-brand { text-align: center; }
  .app-nav ul { justify-content: center; }
  .filter-form {
    flex-direction: column;
    align-items: stretch;
  }
  .filter-form select { min-width: 0; }
  .box.page-content { padding: 1.25rem; }
  #banner .content { padding: 1.5rem 1rem; }
}

@media (max-width: 600px) {
  .data-table thead,
  .table.table-light thead,
  table.table thead { display: none; }
  .data-table td,
  .table.table-light td,
  table.table td {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
  }
  .data-table td::before,
  .table.table-light td::before,
  table.table td::before {
    content: attr(data-label);
    font-weight: 600;
    min-width: 7rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
  }
}
