:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --border: #e6e9f3;
  --text: #1f2a44;
  --muted: #6f7b8f;
  --accent: #2b50ed;
  --accent-2: #f58b1e;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app-header {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(120deg, #ffffff 0%, #f2f4ff 100%);
  border-bottom: 1px solid var(--border);
}

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark {
  background: var(--accent);
  color: white;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 10px 12px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(43, 80, 237, 0.25);
}
.brand-title { font-weight: 700; }
.brand-sub { color: var(--muted); font-size: 13px; }

.page { padding: 20px; max-width: 1200px; margin: 0 auto; }

.card {
  background: var(--card);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border);
}

.card h2, .card h3 { margin: 0 0 10px 0; }
.card p { margin: 0 0 8px 0; color: var(--muted); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #e9edff;
  color: #243a9b;
}

.pill-muted {
  background: #eef2f6;
  color: var(--muted);
}

.grid-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }

.form-grid { display: grid; gap: 10px; margin-top: 10px; }
input, select, button, textarea {
  font: inherit;
}

.input {
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #f8f9fe;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  border: none;
  background: var(--accent);
  color: white;
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.btn:active { transform: translateY(1px); }
.btn-secondary { background: #1f2a44; }
.btn-ghost { background: #eef2f6; color: var(--text); }

.btn:disabled {
  pointer-events: none;
  cursor: not-allowed;
  background: #d5d9e3;
  color: #808aa0;
  box-shadow: none;
  transform: none;
}

.btn-secondary:disabled {
  background: #c0c6d4;
  color: #6a758c;
}

.status {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 600;
}

.status.ok { color: #0c7c3a; }
.status.err { color: #b00020; }

.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.badge { background: #fff3e6; color: #b95c00; padding: 4px 10px; border-radius: 10px; font-size: 12px; }

.tabbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.tab {
  background: #eef2f6;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.tab.active { background: var(--card); color: var(--text); box-shadow: inset 0 0 0 2px var(--accent); }

.tab-content { display: none; }
.tab-content.active { display: block; }
.hidden { display: none !important; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: #eef4ff; color: #1f3c88; padding: 6px 10px; border-radius: 10px; font-weight: 600; }
.chip-good { background: #e5f5ea; color: #0e7a2f; }

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-head {
  text-align: center;
  font-weight: 700;
  color: var(--muted);
}

.calendar-cell {
  position: relative;
  min-height: 90px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  background: #f8fafc;
}

.calendar-cell.worked {
  background: #eef4ff;
  border-color: #1f3c88;
}

.calendar-cell.scheduled {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.calendar-cell.empty {
  background: transparent;
  border: none;
}

.calendar-day {
  font-weight: 700;
  color: var(--text);
}

.calendar-hours {
  position: absolute;
  right: 8px;
  bottom: 8px;
  font-weight: 700;
  color: #1f3c88;
}

.calendar-schedule {
  font-size: 11px;
  white-space: nowrap;
}

.shift-list { display: grid; gap: 8px; }

.shift-block {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: #f8fafc;
}

.shift-day { font-weight: 700; margin-bottom: 4px; }
.shift-times { display: flex; flex-wrap: wrap; gap: 6px; }

.session-row {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: #f8fafc;
  font-weight: 600;
}

.icon-button {
  border: none;
  background: #f3f4f6;
  border-radius: 999px;
  padding: 8px 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 600;
  color: #111827;
}

.avatar-chip {
  background: linear-gradient(135deg, #6366f1, #3b82f6);
  color: #fff;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.stack { display: grid; gap: 8px; }
.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.list li { background: #f6f7fb; border-radius: 10px; padding: 10px 12px; }

.app-footer { text-align: center; padding: 14px; color: var(--muted); font-size: 13px; }

@media (max-width: 640px) {
  .page { padding: 14px; }
  .app-header { flex-direction: column; align-items: flex-start; }
  .tabbar { grid-template-columns: repeat(2, 1fr); }
}
