* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

nav {
  background: #1a73e8;
  color: white;
  padding: 0.75rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav .brand { color: white; text-decoration: none; font-weight: 700; font-size: 1.1rem; }
nav .nav-links { display: flex; gap: 1.25rem; align-items: center; }
nav .nav-links a { color: rgba(255,255,255,0.9); text-decoration: none; }
nav .nav-links a:hover { color: white; }
nav .user-name { color: rgba(255,255,255,0.7); font-size: 0.9rem; }

main { max-width: 960px; margin: 2rem auto; padding: 0 1rem; }

.login-container { text-align: center; margin-top: 4rem; }
.login-container h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.login-container p { color: #666; margin-bottom: 1.5rem; }

.btn {
  display: inline-block; padding: 0.75rem 1.5rem; border-radius: 6px;
  text-decoration: none; font-weight: 600; cursor: pointer; border: none; font-size: 1rem;
}
.btn-google { background: #1a73e8; color: white; }
.btn-google:hover { background: #1557b0; }
.btn-primary { background: #1a73e8; color: white; }
.btn-primary:hover { background: #1557b0; }
.btn-danger { background: #d93025; color: white; }
.btn-danger:hover { background: #b3261e; }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.85rem; }

.error { color: #d93025; margin-bottom: 1rem; }
.success { color: #0d652d; margin-bottom: 1rem; }

.card {
  background: white; border-radius: 8px; padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1); margin-bottom: 1rem;
}

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.75rem; border-bottom: 1px solid #eee; }
th { font-weight: 600; color: #666; font-size: 0.85rem; text-transform: uppercase; }

.badge {
  display: inline-block; padding: 0.2rem 0.6rem; border-radius: 12px;
  font-size: 0.75rem; font-weight: 600;
}
.badge-active { background: #e6f4ea; color: #0d652d; }
.badge-inactive { background: #f1f3f4; color: #666; }
.badge-error { background: #fce8e6; color: #d93025; }

form.inline { display: inline; }

input[type="text"], input[type="url"] {
  width: 100%; padding: 0.6rem; border: 1px solid #ddd;
  border-radius: 6px; font-size: 1rem; margin-bottom: 1rem;
}

label { display: block; font-weight: 600; margin-bottom: 0.25rem; color: #444; }

.form-group { margin-bottom: 1rem; }

.page-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem;
}
.page-header h1, .page-header h2 { font-size: 1.5rem; }

.day-group { margin-bottom: 1.5rem; }
.day-header {
  font-weight: 700; font-size: 0.9rem; color: #555;
  text-transform: uppercase; letter-spacing: 0.03em;
  padding: 0.5rem 0; margin-bottom: 0.25rem;
}
.event-list { list-style: none; }
.event-item {
  padding: 0.75rem 0; border-bottom: 1px solid #eee;
  display: flex; justify-content: space-between; align-items: center;
}
.event-item:last-child { border-bottom: none; }
.event-date { color: #666; font-size: 0.85rem; white-space: nowrap; margin-left: 1rem; }
.event-location { color: #888; font-size: 0.85rem; }
.feed-label { font-size: 0.75rem; color: #1a73e8; font-weight: 600; }

.filter-bar { margin-bottom: 1.5rem; }
.filter-bar select { padding: 0.5rem; border: 1px solid #ddd; border-radius: 6px; }

.feed-label-custom { color: #7c3aed; }

input[type="date"], input[type="time"] {
  width: 100%; padding: 0.6rem; border: 1px solid #ddd;
  border-radius: 6px; font-size: 1rem; margin-bottom: 1rem;
}

select {
  padding: 0.6rem; border: 1px solid #ddd;
  border-radius: 6px; font-size: 1rem;
}

.form-group select { width: 100%; margin-bottom: 1rem; }

.checkbox-label {
  display: flex; align-items: center; gap: 0.5rem;
  font-weight: 600; color: #444; cursor: pointer;
}

.form-row { display: flex; gap: 1rem; }
.form-group-half { flex: 1; }

.day-picker { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.day-chip { cursor: pointer; }
.day-chip input { display: none; }
.day-chip span {
  display: inline-block; width: 2.5rem; height: 2.5rem; line-height: 2.5rem;
  text-align: center; border-radius: 50%; border: 2px solid #ddd;
  font-size: 0.85rem; font-weight: 600; color: #444;
  transition: all 0.15s;
}
.day-chip input:checked + span {
  background: #1a73e8; color: white; border-color: #1a73e8;
}

/* Modal dialog */
dialog {
  border: none;
  border-radius: 8px;
  padding: 0;
  max-width: 560px;
  width: 90%;
  margin: auto;
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
}
dialog::backdrop {
  background: rgba(0,0,0,0.4);
}
.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #eee;
}
.dialog-header h2 { font-size: 1.25rem; margin: 0; }
.dialog-close {
  background: none; border: none; font-size: 1.5rem;
  cursor: pointer; color: #666; padding: 0; line-height: 1;
}
.dialog-close:hover { color: #333; }
.dialog-body { padding: 1.5rem; }
.dialog-body .form-group:last-of-type { margin-bottom: 0; }
.dialog-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}
