:root {
  --bg: #0c0818;
  --bg-deep: #07040f;
  --surface: #1e1733;
  --surface2: #271f42;
  --stroke: rgba(255,255,255,0.12);
  --gold: #d4b26a;
  --gold-bright: #f3dfa3;
  --purple: #7c3fe4;
  --text: #f4efe6;
  --text2: #a79fc2;
  --red: #e0473a;
  --green: #3fa34d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: linear-gradient(180deg, var(--bg-deep), var(--bg), var(--surface));
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  min-height: 100vh;
  padding: 20px 16px 60px;
}

.wrap { max-width: 720px; margin: 0 auto; }

h1 {
  color: var(--gold);
  font-size: 22px;
  margin: 4px 0 2px;
}
h2 {
  color: var(--gold);
  font-size: 16px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin: 28px 0 10px;
  border-left: 3px solid var(--gold);
  padding-left: 8px;
}
.subtitle { color: var(--text2); font-size: 14px; margin-bottom: 18px; }

.card {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}

label { display: block; font-size: 13px; color: var(--text2); margin: 10px 0 4px; }

input[type=text], input[type=date], input[type=number], input[type=datetime-local], select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
}

button, .btn {
  display: inline-block;
  background: linear-gradient(90deg, #8c6d34, var(--gold), var(--gold-bright));
  color: var(--bg-deep);
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  margin-top: 12px;
}
button.secondary, .btn.secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--stroke);
}
button.danger { background: var(--red); color: white; }
button:disabled { opacity: 0.5; cursor: default; }

table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 14px; }
th, td { padding: 8px 6px; text-align: center; border-bottom: 1px solid var(--stroke); }
th { color: var(--text2); font-weight: 600; text-align: left; }
td:first-child, th:first-child { text-align: left; }

.day-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 8px;
}
.day-toggle .switch {
  width: 46px; height: 26px; border-radius: 13px; background: #3a3160;
  position: relative; cursor: pointer; transition: background 0.15s;
}
.day-toggle .switch.on { background: var(--green); }
.day-toggle .switch .knob {
  position: absolute; top: 2px; left: 2px; width: 22px; height: 22px;
  border-radius: 50%; background: white; transition: left 0.15s;
}
.day-toggle .switch.on .knob { left: 22px; }

.pill {
  display: inline-block; padding: 2px 8px; border-radius: 8px;
  font-size: 12px; font-weight: 700; background: var(--surface2); color: var(--text2);
}
.pill.ok { background: var(--green); color: white; }
.pill.no { background: var(--red); color: white; }

.msg-box {
  background: var(--bg);
  border: 1px dashed var(--gold);
  border-radius: 10px;
  padding: 12px;
  margin-top: 10px;
  font-size: 14px;
  white-space: pre-wrap;
}

.footer-note { color: var(--text2); font-size: 12px; margin-top: 30px; text-align: center; }
a { color: var(--gold-bright); }
