/* Fine Rooms Reinigung – PWA Styles */

:root {
  --blue:    #0b5ed7;
  --blue-d:  #094db2;
  --blue-bg: #eff6ff;
  --green:   #16a34a;
  --green-bg:#f0fdf4;
  --amber:   #d97706;
  --amber-bg:#fffbeb;
  --text:    #1d2433;
  --muted:   #667085;
  --border:  #e2e8f0;
  --bg:      #f0f4ff;
  --card:    #ffffff;
  --radius:  14px;
  --shadow:  0 2px 12px rgba(11,94,215,.08);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Screens ─────────────────────────────────────────────── */
.screen { display: none; min-height: 100dvh; }
.screen.active { display: flex; flex-direction: column; }

/* ── Login ───────────────────────────────────────────────── */
#screen-login {
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
}
.login-wrap {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 4px 32px rgba(11,94,215,.12);
  padding: 32px 28px;
}
.login-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}
.logo-name { font-size: 18px; font-weight: 700; color: var(--text); }
.logo-sub  { font-size: 13px; color: var(--muted); }

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 16px;
  background: #fff;
  color: var(--text);
  transition: border-color .15s;
  -webkit-appearance: none;
}
.field input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(11,94,215,.12);
}

.err-msg {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  margin-bottom: 14px;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn-main {
  width: 100%;
  padding: 14px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
}
.btn-main:hover  { background: var(--blue-d); }
.btn-main:active { transform: scale(.98); }
.btn-main:disabled { opacity: .6; cursor: default; }

.btn-outline {
  width: 100%;
  padding: 13px;
  background: transparent;
  color: var(--muted);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn-outline:active { background: var(--bg); }

.btn-confirm {
  padding: 12px 20px;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn-confirm:hover  { background: #15803d; }
.btn-confirm:active { transform: scale(.97); }

.btn-reload {
  margin-top: 12px;
  padding: 10px 20px;
  background: var(--blue-bg);
  color: var(--blue);
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.btn-ghost-sm {
  padding: 8px 14px;
  background: transparent;
  color: var(--muted);
  border: none;
  font-size: 13px;
  cursor: pointer;
}

/* ── Header ──────────────────────────────────────────────── */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; }
.icon-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* ── Logo Icon ───────────────────────────────────────────── */
.logo-icon {
  width: 44px; height: 44px;
  background: var(--blue);
  color: #fff;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
}
.logo-icon.sm { width: 30px; height: 30px; border-radius: 8px; font-size: 11px; }

/* ── Content ─────────────────────────────────────────────── */
.content {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  padding-bottom: calc(16px + var(--safe-bottom));
}

/* ── Push-Banner ─────────────────────────────────────────── */
.push-banner {
  background: var(--blue-bg);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.push-banner-text { flex: 1; min-width: 160px; }
.push-banner-text strong { display: block; font-size: 14px; color: var(--blue); }
.push-banner-text span   { font-size: 13px; color: var(--muted); }
.btn-push {
  padding: 8px 16px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

/* ── States (loading / empty) ────────────────────────────── */
.state-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
  color: var(--muted);
  gap: 10px;
}
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.check-icon {
  font-size: 48px;
  line-height: 1;
  color: var(--green);
}

/* ── Task Cards ──────────────────────────────────────────── */
.task-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin: 20px 0 8px 4px;
}
.task-section-label:first-child { margin-top: 4px; }

.task-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
  transition: border-color .15s;
}
.task-card.today   { border-color: #fbbf24; background: #fffdf0; }
.task-card.done    { border-color: #86efac; background: var(--green-bg); opacity: .75; }

.task-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
}
.task-accommodation {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.task-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge-released  { background: var(--blue-bg);  color: var(--blue); }
.badge-today     { background: #fef3c7; color: #92400e; }
.badge-confirmed { background: var(--green-bg); color: var(--green); }

.task-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
}
.task-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}
.task-meta-icon { font-size: 14px; flex-shrink: 0; }
.task-meta-row strong { color: var(--text); }

.task-time-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg);
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 14px;
}
.time-pill {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
}
.time-arrow { color: var(--muted); font-size: 16px; }

.task-footer { display: flex; justify-content: flex-end; }

.done-check {
  font-size: 15px;
  font-weight: 600;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Modal ───────────────────────────────────────────────── */
.modal-bg {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  padding: 0 0 var(--safe-bottom);
  animation: fadein .2s ease;
}
@keyframes fadein { from { opacity: 0; } }

.modal-card {
  background: var(--card);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 28px 24px;
  width: 100%;
  max-width: 480px;
  text-align: center;
  animation: slideup .25s ease;
}
@keyframes slideup { from { transform: translateY(40px); opacity: 0; } }

.modal-icon { font-size: 40px; margin-bottom: 12px; }
.modal-card h2 { font-size: 20px; margin-bottom: 8px; }
.modal-card p  { color: var(--muted); font-size: 15px; margin-bottom: 20px; }
.modal-actions { display: flex; flex-direction: column; gap: 10px; }

/* Fix: hidden-Attribut sicherstellen */
[hidden] { display: none !important; }
