/* Gemma CRM — clean, Apple-like. Akzent: Gemma-Golfn-Grün. */
:root {
  --bg: #f5f5f7; --card: #fff; --text: #1d1d1f; --muted: #6e6e73;
  --accent: #1e7a46; --accent-dark: #166137; --line: #e5e5ea;
  --radius: 16px; --shadow: 0 1px 3px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.05);
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}
main { max-width: 1000px; margin: 0 auto; padding: 24px 20px 60px; }
h1 { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin: 8px 0 16px; }
h2 { font-size: 17px; font-weight: 600; margin: 0 0 12px; }
a { color: var(--accent); text-decoration: none; }

nav {
  display: flex; align-items: center; gap: 4px; padding: 10px 20px;
  background: rgba(255,255,255,.85); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10;
}
nav a { padding: 6px 12px; border-radius: 8px; color: var(--text); font-weight: 500; }
nav a.on, nav a:hover { background: #ececf0; }
nav .brand { font-size: 17px; margin-right: 12px; }
nav .brand b { color: var(--accent); }
nav .spacer { flex: 1; }
nav .who { color: var(--muted); font-size: 13px; margin-right: 8px; }
nav .nav-logo { height: 26px; width: auto; margin-right: 12px; }

.logos { display: flex; justify-content: center; align-items: center; gap: 24px; }
.logos img { height: 44px; width: auto; max-width: 45%; object-fit: contain; }
.login .logos { margin-bottom: 16px; }
.logos.start { margin-top: 6vh; }
.logos.start img { height: 54px; }
.logos.start + .apps { margin-top: 32px; }

.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; margin-bottom: 16px;
}
.table-wrap { padding: 6px 0; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
     color: var(--muted); font-weight: 600; padding: 10px 16px; border-bottom: 1px solid var(--line); }
td { padding: 11px 16px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
tr.row { cursor: pointer; }
tr.row:hover td { background: #fafafa; }

/* App-Startbildschirm (Odoo-Stil, aber aufgeräumt) */
.apps {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 26px 14px; max-width: 720px; margin: 8vh auto 24px; justify-items: center;
}
.app { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--text); font-weight: 500; }
.app-icon {
  position: relative; width: 78px; height: 78px; border-radius: 20px; color: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow);
  transition: transform .12s;
}
.app-icon svg { width: 40px; height: 40px; }
.app:hover .app-icon { transform: translateY(-3px) scale(1.03); }
.app-name { font-size: 14px; }
.c-green { background: linear-gradient(145deg, #2c9a5c, #166137); }
.c-blue { background: linear-gradient(145deg, #3b82f6, #1d4ed8); }
.c-orange { background: linear-gradient(145deg, #f59e0b, #d97706); }
.c-purple { background: linear-gradient(145deg, #8b5cf6, #6d28d9); }
.c-grey { background: linear-gradient(145deg, #64748b, #475569); }
.app-badge {
  position: absolute; top: -6px; right: -6px; background: #e11d48; color: #fff;
  border-radius: 999px; min-width: 22px; height: 22px; padding: 0 6px;
  font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg);
}
.app.soon { opacity: .45; cursor: default; }
.app.soon .app-icon { background: #d3d3da; color: #fff; box-shadow: none; }
.app-soon { font-size: 11px; color: var(--muted); margin-top: -6px; }
.stats-line { text-align: center; color: var(--muted); font-size: 13px; }

button, .button {
  font: inherit; border: 0; border-radius: 10px; padding: 9px 16px; cursor: pointer;
  font-weight: 500; display: inline-block;
}
.primary { background: var(--accent); color: #fff; }
.primary:hover { background: var(--accent-dark); }
.ghost { background: #ececf0; color: var(--text); }
.ghost:hover { background: #e2e2e8; }
.small { padding: 5px 10px; font-size: 13px; }
.wide { width: 100%; }

input, select, textarea {
  font: inherit; width: 100%; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; margin-top: 4px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.two { display: flex; gap: 8px; }
.checks { display: flex; gap: 18px; align-items: center; grid-column: 1 / -1; font-weight: 500; color: var(--text); }
.checks input { width: auto; margin: 0 6px 0 0; }
.form .actions, .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.inline-form { display: flex; gap: 10px; align-items: center; }
.inline-form select, .inline-form input { width: auto; margin: 0; }

.pagehead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.searchbar { display: flex; gap: 10px; margin-bottom: 12px; }
.chips { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.chip { background: #ececf0; color: var(--text); border-radius: 999px; padding: 5px 14px; font-size: 13px; font-weight: 500; }
.chip.on { background: var(--accent); color: #fff; }

.badge { display: inline-block; border-radius: 6px; padding: 2px 8px; font-size: 12px; font-weight: 600; margin-right: 4px; }
.badge.green { background: #e2f4e8; color: var(--accent-dark); }
.badge.blue { background: #e3edfb; color: #1d4ed8; }
.badge.gold { background: #fdf1d7; color: #92600a; }
.badge.grey { background: #ececf0; color: var(--muted); }
.badge.mehrgruen { background: #d5efd6; color: #2f7d32; }
.badge.small { font-size: 10px; padding: 1px 6px; }
tr.ehemalig td { color: var(--muted); }
.hint { background: #fef6e0; color: #92610a; border-radius: 12px; padding: 12px 16px; font-size: 14px; margin: 0 0 18px; }
.hint b { color: #7a5108; }
.termine { display: flex; flex-direction: column; gap: 10px; }
.tz { display: grid; grid-template-columns: 1.5fr 1fr 1.4fr auto; gap: 16px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; cursor: pointer; }
.tz:hover { border-color: var(--accent); }
.tz .d-datum { display: block; font-weight: 600; font-size: 16px; }
.tz .d-wtag { display: block; color: var(--muted); font-size: 13px; font-weight: 400; margin-top: 1px; }
.kurstag { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 2px 8px; border-radius: 6px; margin-bottom: 6px; }
.kurstag.pe { background: #d5efd6; color: #2f7d32; }
.kurstag.ws { background: #e3edfb; color: #1d4ed8; }
.kurstag.sonst { background: #ececf0; color: var(--muted); }
.tz .d-zeit { color: var(--muted); }
.tz .d-kap small { color: var(--muted); font-size: 13px; }
.kapbar { height: 6px; background: #ececf0; border-radius: 4px; overflow: hidden; margin-top: 5px; max-width: 170px; }
.kapbar i { display: block; height: 100%; background: var(--accent); }
.switch { border: 0; border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; }
.switch.on { background: #d5efd6; color: #2f7d32; }
.switch.off { background: #ececf0; color: var(--muted); }
.vergangen { margin-top: 22px; }
.vergangen summary { cursor: pointer; color: var(--muted); font-weight: 600; padding: 8px 0; }
@media (max-width: 620px) {
  .tz { grid-template-columns: 1fr auto; gap: 8px 12px; }
  .tz .d-zeit, .tz .d-kap { grid-column: 1; }
}
.altersstruktur { margin-top: 16px; }
.alter-bars { display: flex; gap: 18px; align-items: flex-end; padding: 8px 4px 0; }
.alter-bar { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.alter-n { font-size: 12px; font-weight: 600; color: var(--muted); }
.alter-bal { width: 42px; background: #d5efd6; border-radius: 6px 6px 0 0; min-height: 4px; }
.alter-label { font-size: 12px; color: var(--muted); }

.muted { color: var(--muted); font-weight: 400; }
.empty { color: var(--muted); text-align: center; padding: 24px 0; }
.pad { padding: 0 16px 12px; }
.error { background: #fdebeb; color: #b91c1c; border-radius: 10px; padding: 10px 14px; }
.ok { background: #e2f4e8; color: var(--accent-dark); border-radius: 10px; padding: 10px 14px; }
.hinweis { background: #fef6e0; color: #92610a; border-radius: 10px; padding: 10px 14px; }

.login-wrap { display: flex; justify-content: center; padding-top: 10vh; }
.login { width: 360px; text-align: center; }
.login h1 { margin-bottom: 2px; }
.login form { text-align: left; margin-top: 18px; }

.dup-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dup .actions { justify-content: flex-start; }

footer { text-align: center; color: var(--muted); font-size: 12px; padding: 20px; }
@media (max-width: 640px) { .grid2, .dup-pair { grid-template-columns: 1fr; } nav .who, nav .nav-logo { display: none; } }
