:root {
  --bg1: #f7f9ff;
  --bg2: #edf3ff;
  --card: #ffffff;
  --line: #e4eaf5;
  --text: #1d2433;
  --muted: #6f7890;
  --brand: #2f6fed;
  --brand-dark: #1f5ad2;
  --ok: #1f9d5b;
  --off: #9aa4ba;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg1) 0%, var(--bg2) 100%);
}

.container {
  max-width: 1280px;
  margin: 24px auto;
  padding: 0 16px 24px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(25, 45, 85, 0.08);
  padding: 18px;
  margin-bottom: 16px;
}

h1, h2 { margin: 0 0 8px 0; }
p { margin: 6px 0; }

hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 16px 0;
}

.grid { display: grid; gap: 12px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--muted);
}

input, button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  background: #fff;
}

input:focus {
  outline: 2px solid #dce7ff;
  border-color: #b8ccff;
}

button {
  cursor: pointer;
  font-weight: 600;
}
button:hover { border-color: #cad7f4; }

button.primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
button.primary:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}

.actions-inline { display: flex; align-items: end; }
.actions { margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; }

.actions.sticky {
  position: sticky;
  bottom: 8px;
  z-index: 10;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  padding: 10px;
  margin-top: 16px;
}

.month-card {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}
.month-header {
  background: #f8faff;
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.month-title { font-weight: 700; }
.month-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.month-actions button {
  width: auto;
  padding: 8px 10px;
  font-size: 12px;
}

.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  min-width: 1020px;
  border-collapse: collapse;
}
th, td {
  border: 1px solid #edf1f8;
  padding: 6px 5px;
  text-align: center;
  font-size: 13px;
}
thead th { background: #fbfcff; }

.day-col { width: 72px; font-weight: 700; }
.dow-col { width: 70px; }
.sig-col { width: 130px; }

.weekend { background: #fafbfe; color: var(--off); }

.badge-ok { color: var(--ok); font-weight: 700; font-size: 12px; }
.badge-off { color: var(--off); font-weight: 700; font-size: 12px; }

.note {
  font-size: 12px;
  color: var(--muted);
  padding: 8px 12px 12px;
}

@media (max-width: 1024px) {
  .grid-3, .grid-4, .grid-6 { grid-template-columns: 1fr; }
}