:root {
  --color-banner-bg: #FFC059;
  --color-divider: #7E893B;
  --color-btn-primary: #EDC915;
  --color-btn-hover: #7E893B;
  --color-text: #2b2b1f;
  --color-bg: #fdfaf3;
  --color-card: #ffffff;
  --color-danger: #c94f4f;
  --color-warning: #d98a2b;
  --color-ok: #4c8a4c;
  --radius: 10px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
}

header.banner {
  background: var(--color-banner-bg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}

header.banner img.logo {
  height: 52px;
  width: auto;
  border-radius: 6px;
  background: #fff;
  padding: 4px;
}

header.banner h1 {
  margin: 0;
  font-size: 1.4rem;
}

main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 16px 60px;
}

.card {
  background: var(--color-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 18px;
  border: 1px solid #eee;
}

h2 { margin-top: 0; color: var(--color-text); border-bottom: 2px solid var(--color-divider); padding-bottom: 8px; }

label { display: block; font-weight: 600; margin: 12px 0 4px; }

input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--color-divider);
  box-shadow: 0 0 0 2px rgba(126,137,59,0.25);
}

button, .btn {
  background: var(--color-btn-primary);
  color: #3a3200;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.2s ease, color 0.2s ease;
}

button:hover, .btn:hover {
  background: var(--color-btn-hover);
  color: #ffffff;
}

button.secondary {
  background: #eee;
  color: var(--color-text);
}
button.secondary:hover {
  background: var(--color-divider);
  color: #fff;
}

button.danger {
  background: var(--color-danger);
  color: #fff;
}
button.danger:hover { background: #a73a3a; }

button:disabled { opacity: 0.5; cursor: not-allowed; }

.form-narrow {
  max-width: 640px;
}

.activity-list {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .activity-list {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    align-items: start;
  }
  .activity-list h3 {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }
}

.activity-choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e3e3e3;
  border-radius: 8px;
  cursor: pointer;
}
.activity-choice:hover { border-color: var(--color-divider); }
.activity-choice input { width: auto; margin-top: 3px; }
.activity-choice .meta { color: #666; font-size: 0.85rem; }

.activity-choice.activity-promoted {
  border: 2px solid var(--color-danger);
  background: #fff7f2;
}

.activity-comment {
  margin-top: 6px;
  padding: 8px 10px;
  background: #faf6ea;
  border-left: 3px solid var(--color-divider);
  border-radius: 4px;
  font-size: 0.85rem;
  color: #444;
  white-space: pre-line;
}

.day-tag {
  display: inline-block;
  background: var(--color-divider);
  color: #fff;
  border-radius: 12px;
  padding: 2px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-right: 6px;
}

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--color-divider);
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.tabs button {
  background: transparent;
  color: var(--color-text);
  border-radius: 8px 8px 0 0;
  padding: 10px 16px;
  font-weight: 600;
}
.tabs button.active {
  background: var(--color-divider);
  color: #fff;
}
.tabs button:hover:not(.active) {
  background: #eee;
  color: var(--color-text);
}

.progress-bar-track {
  background: #eee;
  border-radius: 20px;
  height: 18px;
  overflow: hidden;
  width: 100%;
}
.progress-bar-fill {
  height: 100%;
  transition: width 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 6px;
  font-size: 0.7rem;
  color: #fff;
  font-weight: 700;
}
.fill-empty { background: var(--color-danger); }
.fill-partial { background: var(--color-warning); }
.fill-full { background: var(--color-ok); }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th, td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #eee;
}
th { background: #faf6ea; }

.table-scroll { overflow-x: auto; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 700;
}
.badge-warning { background: #fdecc8; color: #8a5a00; }
.badge-ok { background: #e2f0e2; color: #2e5c2e; }
.badge-urgent {
  background: var(--color-danger);
  color: #fff;
}

.warning-icon {
  color: var(--color-danger);
  font-weight: 900;
  cursor: help;
  margin-left: 4px;
}

.info-icon {
  display: inline-block;
  color: var(--color-divider);
  background: #eef0e2;
  border-radius: 10px;
  padding: 1px 8px;
  cursor: pointer;
  margin-left: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  user-select: none;
}
.info-icon:hover, .info-icon:focus {
  background: var(--color-divider);
  color: #fff;
  outline: none;
}

.flash {
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
  font-weight: 600;
}
.flash-success { background: #e2f0e2; color: #2e5c2e; }
.flash-error { background: #fbe0e0; color: #8a2e2e; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 700px) {
  .grid-2 { grid-template-columns: 1fr; }
  header.banner h1 { font-size: 1.1rem; }
  main { padding: 14px 10px 50px; }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}
.modal {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  max-width: 480px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
}

.footer-note {
  text-align: center;
  color: #999;
  font-size: 0.8rem;
  margin-top: 30px;
}

.pill-input-row { display: flex; gap: 8px; flex-wrap: wrap; }
.pill-input-row > * { flex: 1; min-width: 140px; }

.link-box {
  background: #faf6ea;
  border: 1px dashed var(--color-divider);
  border-radius: 8px;
  padding: 10px 12px;
  word-break: break-all;
  font-size: 0.85rem;
}
