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

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

/* Login */
.login-container {
  max-width: 360px;
  margin: 120px auto;
  background: #fff;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.login-container h1 {
  text-align: center;
  margin-bottom: 24px;
  color: #2c3e50;
}
.login-container input {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}
.login-container button {
  width: 100%;
  padding: 10px;
  background: #3498db;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
}
.login-container button:hover { background: #2980b9; }
.error { color: #e74c3c; margin-top: 12px; font-size: 13px; }

/* Layout */
.app-header {
  background: #2c3e50;
  color: #fff;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.app-header h1 { font-size: 18px; }
.app-header button {
  background: none;
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}
.app-header button:hover { background: rgba(255,255,255,.1); }

/* Tabs */
.tabs {
  display: flex;
  background: #fff;
  border-bottom: 1px solid #ddd;
}
.tab {
  padding: 12px 24px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  font-size: 14px;
  color: #666;
}
.tab.active {
  color: #3498db;
  border-bottom-color: #3498db;
}

/* Content */
.content {
  max-width: 960px;
  margin: 24px auto;
  padding: 0 24px;
}
.panel { display: none; }
.panel.active { display: block; }

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
th, td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid #eee;
  font-size: 13px;
}
th {
  background: #f8f9fa;
  font-weight: 600;
  color: #555;
}
tr:hover { background: #f8f9fa; }

/* Buttons */
.btn {
  padding: 6px 14px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}
.btn-primary { background: #3498db; color: #fff; }
.btn-primary:hover { background: #2980b9; }
.btn-danger { background: #e74c3c; color: #fff; }
.btn-danger:hover { background: #c0392b; }
.btn-sm { padding: 4px 10px; font-size: 12px; }

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.4);
  z-index: 100;
  justify-content: center;
  align-items: center;
}
.modal-overlay.active { display: flex; }
.modal {
  background: #fff;
  padding: 24px;
  border-radius: 8px;
  width: 420px;
  max-width: 90vw;
}
.modal h2 { margin-bottom: 16px; font-size: 16px; }
.modal label {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  color: #555;
}
.modal input, .modal select {
  width: 100%;
  padding: 8px 10px;
  margin-bottom: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
}
.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 8px;
}

/* Checkbox list */
.checkbox-list label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.checkbox-list input[type="checkbox"] { width: auto; margin: 0; }

/* Settings form */
.settings-form label { margin-top: 8px; }
.settings-form input { margin-bottom: 16px; }
.settings-form button { margin-top: 8px; }

/* Status badge */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
}
.badge-active { background: #d4edda; color: #155724; }
.badge-inactive { background: #f8d7da; color: #721c24; }
