:root{
  --bg: #f6f4ee;
  --card: #ffffff;
  --text: #1f2a1f;
  --muted: #5b6b5b;
  --accent: #2f6b3f;
  --accent2:#8c6a3d;
  --border:#e2dfd6;
  --shadow: 0 10px 30px rgba(0,0,0,.08);
  --radius: 16px;
}

*{ box-sizing:border-box; }
body{
  margin:0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: radial-gradient(circle at 20% 0%, #ffffff 0%, var(--bg) 45%, #efeadd 100%);
  color: var(--text);
}

.topbar{
  position: sticky;
  top: 0;
  z-index: 10;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 12px 16px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.brand{ display:flex; align-items:center; gap:10px; }
.logo{ font-size:20px; }
.name{ font-weight:800; letter-spacing:.2px; }

.topbar-right{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.pill{
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  color: var(--muted);
}

.nav{
  display:flex;
  gap:10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(246,244,238,.8);
  overflow-x:auto;
}
.nav a{
  text-decoration:none;
  color: var(--muted);
  padding:8px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space:nowrap;
}
.nav a.active, .nav a:hover{
  color: var(--text);
  border-color: var(--border);
  background:#fff;
}

.container{
  max-width: 95%;
  margin: 0 auto;
  padding: 16px;
}

.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.auth-card{ max-width: 420px; margin: 28px auto; }

h1{ margin:0 0 8px 0; font-size: 26px; }
h2{ margin:10px 0 6px 0; font-size: 18px; }
h3{ margin:10px 0 6px 0; font-size: 16px; }

.muted{ color: var(--muted); }
.hint{ margin-top: 12px; color: var(--muted); font-size: 13px; }

label{ display:block; margin-top: 10px; font-weight: 600; font-size: 13px; color: var(--text); }
input, textarea, select{
  width:100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background:#fff;
  outline:none;
  margin-top: 6px;
  font-size: 15px;
}
textarea{ resize: vertical; }

.sep{ border:none; border-top:1px solid var(--border); margin: 14px 0; }

.row{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.row-between{ justify-content:space-between; align-items:flex-start; }

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background:#fff;
  cursor:pointer;
  text-decoration:none;
  color: var(--text);
  font-weight: 700;
}
.btn-primary{
  background: linear-gradient(180deg, #3b7d4c, var(--accent));
  border-color: rgba(0,0,0,.05);
  color: #fff;
}
.btn-outline{ background:#fff; border-color: var(--accent); color: var(--accent); }
.btn-ghost{ background: transparent; border-color: transparent; color: var(--muted); }
.btn-small{ padding: 8px 10px; border-radius: 10px; font-size: 13px; }

.btn:disabled{ opacity:.6; cursor:not-allowed; }

.grid-2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 900px){
  .grid-2{ grid-template-columns: 1fr; }
  .container{ padding: 12px; }
  .btn{ width: 100%; }
  .row .btn{ width:auto; }
}

.table{
  width:100%;
  border-collapse: collapse;
  margin-top: 10px;
}
.table th, .table td{
  text-align:left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.table th{ color: var(--muted); font-weight: 800; font-size: 12px; letter-spacing:.4px; text-transform: uppercase; }

.shift-card{
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  margin-top: 10px;
  background: #fff;
}
.shift-card-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}
.empty{
  padding: 14px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(246,244,238,.6);
}

.badge{
  display:inline-flex;
  align-items:center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid var(--border);
  color: var(--muted);
  background:#fff;
}
.badge-pending{ color: #7a5a2a; background: rgba(140,106,61,.10); border-color: rgba(140,106,61,.25); }
.badge-accepted{ color: #1f6a3a; background: rgba(47,107,63,.10); border-color: rgba(47,107,63,.25); }
.badge-declined{ color: #8a2f2f; background: rgba(138,47,47,.10); border-color: rgba(138,47,47,.25); }

.checklist label{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top: 8px;
  font-weight: 600;
}
.checklist input[type="checkbox"]{
  width: 18px; height: 18px; margin:0;
}

.task-item{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px;
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(246,244,238,.35);
}
.task-item input[type="checkbox"]{ width: 20px; height: 20px; }
.task-item .btn{ margin-left:auto; }

.msg{ border:1px solid var(--border); border-radius:14px; padding:12px; margin-top:10px; background:#fff; }
.msg.unread{ box-shadow: 0 8px 18px rgba(47,107,63,.12); border-color: rgba(47,107,63,.25); }

.toast{
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  background: rgba(31,42,31,.92);
  color: #fff;
  padding: 10px 12px;
  border-radius: 999px;
  transition: all .25s ease;
  z-index: 9999;
  max-width: 90vw;
  text-align:center;
}
.toast.show{ opacity:1; transform: translateX(-50%) translateY(0); }

/* Calendar views */
.cal-table{
  width:100%;
  border-collapse: separate;
  border-spacing: 8px;
  margin-top: 8px;
}
.cal-table th{
  text-align:left;
  color: var(--muted);
  font-weight: 800;
  font-size: 12px;
  padding: 6px 8px;
}
.cal-cell{
  vertical-align: top;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  min-height: 96px;
  height:165px;
  max-width:90px;
}
.cal-cell.dim{
  opacity: .55;
  background: rgba(255,255,255,.6);
}
.cal-daynum{
  font-weight: 900;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.cal-pill{
  display:block;
  border: 1px solid rgba(47,107,63,.25);
  background: rgba(47,107,63,.08);
  color: var(--text);
  padding: 6px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  margin-top: 6px;
  cursor: pointer;
}
.cal-pill:hover{
  background: rgba(47,107,63,.12);
}
.cal-empty{
  color: var(--muted);
  padding: 10px 0;
}
@media (max-width: 900px){
  .cal-table{ border-spacing: 6px; }
  .cal-cell{ padding: 8px; }
}

