* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  margin: 0;
  padding: 0;
  background: #f5f5f5;
  color: #333;
  --fc-small-font-size: .6em;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

header {
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

header h1 {
  margin: 0;
  color: #1a73e8;
  font-size: 24px;
}

nav {
  display: flex;
  gap: 10px;
  align-items: center;
}

#user-info {
  font-size: 14px;
  color: #666;
  margin-right: 10px;
}

#user-info strong {
  color: #333;
}

.nav-link {
  padding: 8px 16px;
  text-decoration: none;
  color: #666;
  border-radius: 4px;
  transition: background 0.2s;
}

.nav-link:hover {
  background: #f0f0f0;
}

.nav-link.active {
  background: #1a73e8;
  color: #fff;
}

.config-panel {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.config-section {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.config-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.config-section h3 {
  margin: 0 0 15px 0;
  font-size: 16px;
  color: #555;
}

.form-row {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.form-row label {
  width: 140px;
  font-size: 14px;
  color: #666;
}

.form-row input,
.form-row select {
  flex: 1;
  max-width: 400px;
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid #ddd;
  border-radius: 4px;
  outline: none;
}

.form-row input:focus,
.form-row select:focus {
  border-color: #1a73e8;
}

.btn {
  padding: 8px 16px;
  font-size: 14px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  background: #f0f0f0;
  color: #333;
  transition: background 0.2s;
}

.btn:hover {
  background: #e0e0e0;
}

.btn-primary {
  background: #1a73e8;
  color: #fff;
}

.btn-primary:hover {
  background: #1557b0;
}

.btn-small {
  padding: 4px 10px;
  font-size: 12px;
}

.btn-danger {
  background: #dc3545;
  color: #fff;
}

.btn-danger:hover {
  background: #c82333;
}

.btn-success {
  background: #28a745;
  color: #fff;
  text-decoration: none;
  display: inline-block;
  margin-left: 10px;
}

.btn-success:hover {
  background: #218838;
}

.filter-builder {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.filter-builder select,
.filter-builder input {
  padding: 6px 10px;
  font-size: 14px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.filter-builder select {
  min-width: 150px;
}

.filter-builder input {
  flex: 1;
  min-width: 150px;
  max-width: 200px;
}

#filter-list {
  margin-bottom: 15px;
}

.filter-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  margin-bottom: 8px;
  background: #f8f9fa;
  border-radius: 4px;
  font-size: 14px;
}

.calendar-section {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#calendar {
  min-height: 600px;
}

.loading {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 20px 40px;
  border-radius: 8px;
  font-size: 16px;
  z-index: 1000;
}

.error {
  background: #f8d7da;
  color: #721c24;
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
  font-size: 14px;
}

.notice {
  background: #fff3cd;
  color: #856404;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  font-size: 16px;
}

.notice a {
  color: #533f03;
  font-weight: bold;
}

.full-width {
  max-width: 100%;
  padding: 20px 40px;
}

/* Responsive */
@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .form-row label {
    width: 100%;
    margin-bottom: 5px;
  }

  .form-row input,
  .form-row select {
    max-width: 100%;
    width: 100%;
  }

  .filter-builder {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-builder select,
  .filter-builder input {
    max-width: 100%;
  }
}
