/* meinGarten Terminbuchung – Mitarbeiter-App, mobile-first */
:root {
	--accent: #1F3328;       /* meinGarten Dunkelgrün */
	--accent-dark: #17251D;
	--sage: #98B9A4;         /* meinGarten Sage */
	--copper: #B86B43;
	--bg: #F6F1E8;           /* Creme */
	--card: #ffffff;
	--line: #E6E0D4;
	--text: #1B1D18;
	--muted: #6D746B;
	--safe-b: env(safe-area-inset-bottom, 0px);
	--safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
	font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	background: var(--bg);
	color: var(--text);
	-webkit-font-smoothing: antialiased;
	padding-bottom: calc(70px + var(--safe-b));
}
a { color: var(--accent); }

/* Top bar */
.topbar {
	position: sticky; top: 0; z-index: 50;
	background: var(--accent); color: #fff;
	display: flex; align-items: center; justify-content: space-between;
	padding: calc(12px + var(--safe-t)) 16px 12px;
	box-shadow: 0 1px 6px rgba(0,0,0,.15);
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: #fff; font-weight: 800; font-size: 17px; letter-spacing: .01em; }
.brand-logo { height: 30px; width: auto; display: block; border-radius: 7px; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.who { color: #fff; font-size: 13px; opacity: .92; }
.logout { color: #fff; text-decoration: none; font-size: 20px; line-height: 1; }

/* Location chips */
.locbar { display: flex; gap: 6px; overflow-x: auto; padding: 10px 14px; background: #fff; border-bottom: 1px solid var(--line); -webkit-overflow-scrolling: touch; }
.locchip { white-space: nowrap; padding: 6px 13px; border: 1px solid var(--line); border-radius: 20px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; background: #fff; }
.locchip.on { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Content */
.content { padding: 14px 14px 24px; max-width: 720px; margin: 0 auto; }
.content h2 { font-size: 15px; margin: 22px 0 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.empty { color: var(--muted); font-style: italic; }

/* KPI grid */
.kpis { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 10px; text-align: center; }
.kpi-num { font-size: 24px; font-weight: 800; }
.kpi-label { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; margin-bottom: 10px; }
.res-head { display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.res-time { color: var(--accent); font-weight: 800; }
.res-name { font-size: 16px; font-weight: 700; margin: 4px 0 2px; }
.res-meta { font-size: 13px; color: var(--muted); }
.res-meta a { text-decoration: none; }
.res-msg { font-size: 13px; color: #444; background: #f5f7f4; border-radius: 7px; padding: 7px 9px; margin-top: 7px; }
.res-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }

.daysep { font-weight: 700; font-size: 13px; color: var(--muted); margin: 16px 0 8px; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 11px; color: #fff; font-size: 11px; font-weight: 700; }

/* Buttons */
.btn { border: 1px solid var(--line); background: #fff; color: var(--text); border-radius: 8px; padding: 9px 13px; font-size: 14px; font-weight: 600; cursor: pointer; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.danger { color: #b32d2e; border-color: #e3b5b5; }
.btn[disabled] { opacity: .5; }

/* Filters / fields */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filters select, .filters input { padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; background: #fff; }
.filters input[type="search"] { flex: 1; min-width: 140px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 5px; }
.field input, .field select { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 15px; background: #fff; }
.check { display: flex; align-items: center; gap: 8px; margin: 4px 0 12px; font-size: 14px; }
.block-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* Bottom nav */
.bottomnav {
	position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
	background: #fff; border-top: 1px solid var(--line);
	display: flex; justify-content: space-around;
	padding-bottom: var(--safe-b);
}
.nav-item {
	flex: 1; min-width: 0; text-align: center; padding: 9px 2px 7px;
	color: var(--muted); text-decoration: none; font-size: 10px;
	display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.nav-item svg { width: 21px; height: 21px; }
.nav-item span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-item.on { color: var(--accent); }

/* Login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { background: #fff; border-radius: 16px; padding: 30px 26px; width: 100%; max-width: 360px; text-align: center; box-shadow: 0 6px 30px rgba(0,0,0,.08); }
.login-logo { width: 120px; height: auto; display: block; margin: 4px auto 14px; border-radius: 20px; box-shadow: 0 5px 18px rgba(31,51,40,.16); }
.login-card h1 { font-size: 26px; margin: 8px 0 2px; color: var(--accent); }
.login-sub { color: var(--muted); margin: 0 0 18px; letter-spacing: .12em; text-transform: uppercase; font-size: 12px; }
.login-card label { display: block; text-align: left; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 12px; }
.login-card input { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 9px; font-size: 16px; margin-top: 5px; }
.login-card button { width: 100%; background: var(--accent); color: #fff; border: 0; border-radius: 9px; padding: 13px; font-size: 16px; font-weight: 700; cursor: pointer; margin-top: 4px; }
.login-err { background: #fde8e8; color: #b32d2e; border-radius: 8px; padding: 9px; font-size: 13px; margin-bottom: 14px; }
.login-hint { color: var(--muted); font-size: 12px; margin: 14px 0 0; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: flex-end; justify-content: center; z-index: 100; }
.modal-box { background: #fff; border-radius: 16px 16px 0 0; padding: 22px 20px calc(22px + var(--safe-b)); width: 100%; max-width: 480px; position: relative; max-height: 86vh; overflow: auto; }
.modal-close { position: absolute; top: 10px; right: 14px; border: 0; background: none; font-size: 28px; color: #999; cursor: pointer; }
.modal-box h3 { margin: 0 0 12px; }
.mrow { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid #f1f1f1; font-size: 14px; }
.mrow span { color: var(--muted); }
.mrow textarea { width: 100%; min-height: 56px; border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin-top: 6px; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.legend { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
#tvr-cal { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px; font-size: 13px; }
.fc .fc-toolbar-title { font-size: 16px; }
.fc .fc-button { padding: 4px 8px; font-size: 13px; }
.fc .fc-button-primary { background: var(--accent); border-color: var(--accent); }
.fc .fc-button-primary:not(:disabled).fc-button-active { background: var(--accent-dark); border-color: var(--accent-dark); }
