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

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

/* Login Page */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.login-box {
  background: white;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
}

.login-box h1 {
  margin-bottom: 30px;
  font-size: 24px;
  text-align: center;
  color: #2c3e50;
}

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

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 2px solid #e0e0e0;
  margin-bottom: 20px;
}

header h1 {
  font-size: 28px;
  color: #2c3e50;
}

.header-actions {
  display: flex;
  gap: 10px;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  border-bottom: 2px solid #e0e0e0;
}

.tab {
  padding: 12px 24px;
  text-decoration: none;
  color: #666;
  border-bottom: 3px solid transparent;
  transition: all 0.3s;
}

.tab:hover {
  color: #2c3e50;
  background: #f8f9fa;
}

.tab.active {
  color: #3498db;
  border-bottom-color: #3498db;
}

/* Content */
.content {
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  font-family: 'Courier New', monospace;
}

.form-group textarea {
  resize: vertical;
}

.form-group small {
  display: block;
  margin-top: 5px;
  color: #666;
  font-size: 12px;
}

/* Buttons */
.btn-primary,
.btn-secondary {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: #3498db;
  color: white;
}

.btn-primary:hover {
  background: #2980b9;
}

.btn-secondary {
  background: #95a5a6;
  color: white;
}

.btn-secondary:hover {
  background: #7f8c8d;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

/* Messages */
.error-message {
  background: #e74c3c;
  color: white;
  padding: 12px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.info-text {
  color: #666;
  margin-bottom: 20px;
}

/* Config Section */
.config-info-header {
  display: flex;
  gap: 30px;
  padding: 15px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 8px;
  margin-bottom: 30px;
  color: white;
}

.config-info-header p {
  margin: 0;
  font-size: 14px;
}

.config-info-header strong {
  font-weight: 600;
}

/* Accordion Styles */
.accordion-item {
  margin-bottom: 15px;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.accordion-item:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-left: 4px solid #3498db;
  transition: all 0.3s ease;
  user-select: none;
}

.accordion-header:hover {
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.accordion-header h3 {
  margin: 0;
  color: #2c3e50;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.accordion-icon {
  font-size: 14px;
  color: #3498db;
  transition: transform 0.3s ease;
}

.accordion-item.active .accordion-header {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  border-left-color: #2c3e50;
}

.accordion-item.active .accordion-header h3 {
  color: white;
}

.accordion-item.active .accordion-icon {
  color: white;
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 20px;
}

.accordion-item.active .accordion-content {
  max-height: 1000px;
  padding: 20px;
}

.accordion-content .form-group {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 15px;
}

.accordion-content .form-group:last-child {
  margin-bottom: 0;
}

.config-info {
  padding: 15px;
  background: #f8f9fa;
  border-radius: 4px;
  margin-top: 20px;
}

/* Checkbox styling */
.form-group label input[type="checkbox"] {
  width: auto;
  margin-right: 8px;
  cursor: pointer;
}

.form-group label:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: normal;
}

/* History */
.history-filter {
  margin-bottom: 30px;
}

.logs-summary,
.logs-detail {
  margin-bottom: 30px;
}

.logs-summary h3,
.logs-detail h3 {
  margin-bottom: 15px;
  color: #2c3e50;
}

.logs-table {
  width: 100%;
  border-collapse: collapse;
}

.logs-table th,
.logs-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

.logs-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #2c3e50;
}

.logs-table tr:hover {
  background: #f8f9fa;
}

.logs-table a {
  color: #3498db;
  text-decoration: none;
}

.logs-table a:hover {
  text-decoration: underline;
}

.no-data {
  text-align: center;
  padding: 40px;
  color: #999;
}

/* Responsive */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 15px;
  }

  .tabs {
    flex-direction: column;
  }

  .logs-table {
    font-size: 12px;
  }

  .logs-table th,
  .logs-table td {
    padding: 8px;
  }
}
